slashdiablo-maphack
slashdiablo-maphack copied to clipboard
Issue with displaying item name as ??? when the game language is not english
In pull requests this issue described with screenshots. In any not english game language mod make item names as "???" And colors instead of color itself start to show as "y4c" before item name. It causes by different code pages when game is not english. All colors must be set like this to work properly:
#define COLOR_REPLACEMENTS
{"WHITE", "\377c0"},
{"RED", "\377c1"},
{"GREEN", "\377c2"},
{"BLUE", "\377c3"},
{"GOLD", "\377c4"},
{"GRAY", "\377c5"},
{"BLACK", "\377c6"},
{"TAN", "\377c7"},
{"ORANGE", "\377c8"},
{"YELLOW", "\377c9"},
{"PURPLE", "\377c;"},
{"DARK_GREEN", "\377c:"}
On Item.cpp must be added next to right colors on any language: for (DWORD i = 0; i < wcslen(name); i++) { if ((name[i] >= 0xFF || name[i] == 0x79) && name[i + 1] == L'c') { name[i] = L'\377'; }; } To fix "???" in item names in Constants.h for russian:
#define CODE_PAGE 1251
I think it must be the way to set CODE_PAGE as system code page...
Hello, could you please share your Item.cpp? I don't quite understand the line "On Item.cpp must be added next to right colors on any language".
Item.zip 288 string
Same problem, can any one please to resolve?