mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Removed GetClassName preprocessor hack
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
|
||||
#include "DB2Stores.h"
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2LoadInfo.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Hash.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "IteratorPair.h"
|
||||
@@ -29,19 +29,14 @@
|
||||
#include "Timer.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include <boost/filesystem/directory.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <boost/filesystem/directory.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <numeric>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
|
||||
// temporary hack until includes are sorted out (don't want to pull in Windows.h)
|
||||
#ifdef GetClassName
|
||||
#undef GetClassName
|
||||
#endif
|
||||
|
||||
DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", &AchievementLoadInfo::Instance);
|
||||
DB2Storage<Achievement_CategoryEntry> sAchievementCategoryStore("Achievement_Category.db2", &AchievementCategoryLoadInfo::Instance);
|
||||
DB2Storage<AdventureJournalEntry> sAdventureJournalStore("AdventureJournal.db2", &AdventureJournalLoadInfo::Instance);
|
||||
@@ -2112,7 +2107,7 @@ ChrClassUIDisplayEntry const* DB2Manager::GetUiDisplayForClass(Classes unitClass
|
||||
return _uiDisplayByClass[unitClass];
|
||||
}
|
||||
|
||||
char const* DB2Manager::GetClassName(uint8 class_, LocaleConstant locale /*= DEFAULT_LOCALE*/)
|
||||
char const* DB2Manager::GetChrClassName(uint8 class_, LocaleConstant locale /*= DEFAULT_LOCALE*/)
|
||||
{
|
||||
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_);
|
||||
if (!classEntry)
|
||||
|
||||
@@ -26,13 +26,8 @@
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
#include <unordered_set>
|
||||
|
||||
// temporary hack until includes are sorted out (don't want to pull in Windows.h)
|
||||
#ifdef GetClassName
|
||||
#undef GetClassName
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
class DB2HotfixGeneratorBase;
|
||||
|
||||
@@ -454,7 +449,7 @@ public:
|
||||
int32 const* GetBroadcastTextDuration(uint32 broadcastTextId, LocaleConstant locale = DEFAULT_LOCALE) const;
|
||||
static CharBaseInfoEntry const* GetCharBaseInfo(Races race, Classes class_);
|
||||
ChrClassUIDisplayEntry const* GetUiDisplayForClass(Classes unitClass) const;
|
||||
static char const* GetClassName(uint8 class_, LocaleConstant locale = DEFAULT_LOCALE);
|
||||
static char const* GetChrClassName(uint8 class_, LocaleConstant locale = DEFAULT_LOCALE);
|
||||
uint32 GetPowerIndexByClass(Powers power, uint32 classId) const;
|
||||
std::vector<ChrCustomizationChoiceEntry const*> const* GetCustomiztionChoices(uint32 chrCustomizationOptionId) const;
|
||||
std::vector<ChrCustomizationOptionEntry const*> const* GetCustomiztionOptions(uint8 race, uint8 gender) const;
|
||||
|
||||
@@ -50,11 +50,6 @@
|
||||
#include "World.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
// temporary hack until includes are sorted out (don't want to pull in Windows.h)
|
||||
#ifdef GetClassName
|
||||
#undef GetClassName
|
||||
#endif
|
||||
|
||||
#if TRINITY_COMPILER == TRINITY_COMPILER_GNU
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@@ -1212,8 +1207,7 @@ public:
|
||||
std::vector<int32> contextBonuses = ItemBonusMgr::GetBonusListsForItem(itemId, itemContext);
|
||||
bonusListIDs.insert(bonusListIDs.begin(), contextBonuses.begin(), contextBonuses.end());
|
||||
std::ranges::sort(bonusListIDs);
|
||||
std::ranges::borrowed_subrange_t<std::vector<int>&> removed = std::ranges::unique(bonusListIDs);
|
||||
bonusListIDs.erase(removed.begin(), removed.end());
|
||||
bonusListIDs.erase(std::unique(bonusListIDs.begin(), bonusListIDs.end()), bonusListIDs.end());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1767,7 +1761,7 @@ public:
|
||||
|
||||
// Output XI. LANG_PINFO_CHR_RACE
|
||||
raceStr = DB2Manager::GetChrRaceName(raceid, locale);
|
||||
classStr = DB2Manager::GetClassName(classid, locale);
|
||||
classStr = DB2Manager::GetChrClassName(classid, locale);
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetTrinityString(LANG_CHARACTER_GENDER_MALE) : handler->GetTrinityString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str());
|
||||
|
||||
// Output XII. LANG_PINFO_CHR_ALIVE
|
||||
|
||||
Reference in New Issue
Block a user