Core/Cleanup: move repeating code for locale strings retrieval into separate method. Related code cleanup.
--HG-- branch : trunk
This commit is contained in:
@@ -995,6 +995,14 @@ class ObjectMgr
|
||||
|
||||
// for wintergrasp only
|
||||
GraveYardMap mGraveYardMap;
|
||||
|
||||
void AddLocaleString(std::string& s, LocaleConstant locale, StringVector& data);
|
||||
inline void GetLocaleString(const StringVector& data, int loc_idx, std::string& value) const
|
||||
{
|
||||
if (data.size() > size_t(loc_idx) && !data[loc_idx].empty())
|
||||
value = data[loc_idx];
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// first free id for selected id type
|
||||
@@ -1071,8 +1079,6 @@ class ObjectMgr
|
||||
|
||||
int DBCLocaleIndex;
|
||||
|
||||
void AddLocaleString(std::string& s, LocaleConstant locale, StringVector& data);
|
||||
|
||||
private:
|
||||
void LoadScripts(ScriptsType type);
|
||||
void CheckScripts(ScriptsType type, std::set<int32>& ids);
|
||||
|
||||
Reference in New Issue
Block a user