Commit 1e980497 authored by salix5's avatar salix5

update DataManager::GetDesc()

max id: 28bits
parent 3ecfeece
......@@ -188,10 +188,10 @@ const wchar_t* DataManager::GetText(int code) {
return csit->second.text.c_str();
return unknown_string;
}
const wchar_t* DataManager::GetDesc(int strCode) {
if((unsigned int)strCode < 10000u)
const wchar_t* DataManager::GetDesc(unsigned int strCode) {
if(strCode < 10000u)
return GetSysString(strCode);
unsigned int code = strCode >> 4;
unsigned int code = (strCode >> 4) & 0x0fffffff;
unsigned int offset = strCode & 0xf;
auto csit = _strings.find(code);
if(csit == _strings.end())
......
......@@ -22,7 +22,7 @@ public:
bool GetString(int code, CardString* pStr);
const wchar_t* GetName(int code);
const wchar_t* GetText(int code);
const wchar_t* GetDesc(int strCode);
const wchar_t* GetDesc(unsigned int strCode);
const wchar_t* GetSysString(int code);
const wchar_t* GetVictoryString(int code);
const wchar_t* GetCounterName(int code);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment