Commit 72128ad2 authored by Chen Bill's avatar Chen Bill Committed by GitHub

Merge branch 'master' into patch-draw

parents ff2733a8 6a2deaac
...@@ -270,8 +270,8 @@ std::vector<unsigned int> DataManager::GetSetCodes(std::wstring setname) const { ...@@ -270,8 +270,8 @@ std::vector<unsigned int> DataManager::GetSetCodes(std::wstring setname) const {
} }
return matchingCodes; return matchingCodes;
} }
const wchar_t* DataManager::FormatLocation(int location, int sequence) { const wchar_t* DataManager::FormatLocation(int location, int sequence) const {
if(location == 0x8) { if(location == LOCATION_SZONE) {
if(sequence < 5) if(sequence < 5)
return GetSysString(1003); return GetSysString(1003);
else if(sequence == 5) else if(sequence == 5)
...@@ -279,12 +279,16 @@ const wchar_t* DataManager::FormatLocation(int location, int sequence) { ...@@ -279,12 +279,16 @@ const wchar_t* DataManager::FormatLocation(int location, int sequence) {
else else
return GetSysString(1009); return GetSysString(1009);
} }
unsigned filter = 1;
int i = 1000; int i = 1000;
for(; filter != 0x100 && filter != location; filter <<= 1) int string_id = 0;
++i; for (unsigned filter = LOCATION_DECK; filter <= LOCATION_PZONE; filter <<= 1, ++i) {
if(filter == location) if (filter == location) {
return GetSysString(i); string_id = i;
break;
}
}
if (string_id)
return GetSysString(string_id);
else else
return unknown_string; return unknown_string;
} }
......
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
const wchar_t* GetCounterName(int code) const; const wchar_t* GetCounterName(int code) const;
const wchar_t* GetSetName(int code) const; const wchar_t* GetSetName(int code) const;
std::vector<unsigned int> GetSetCodes(std::wstring setname) const; std::vector<unsigned int> GetSetCodes(std::wstring setname) const;
const wchar_t* FormatLocation(int location, int sequence); const wchar_t* FormatLocation(int location, int sequence) const;
const wchar_t* FormatAttribute(int attribute); const wchar_t* FormatAttribute(int attribute);
const wchar_t* FormatRace(int race); const wchar_t* FormatRace(int race);
const wchar_t* FormatType(int type); const wchar_t* FormatType(int type);
......
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