mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -172,7 +172,7 @@ public:
|
||||
}
|
||||
}
|
||||
ASSERT(!allowedArenas.empty());
|
||||
BattlegroundTypeId randomizedArenaBgTypeId = Trinity::Containers::SelectRandomContainerElement(allowedArenas);
|
||||
BattlegroundTypeId randomizedArenaBgTypeId = acore::Containers::SelectRandomContainerElement(allowedArenas);
|
||||
|
||||
uint8 count = 0;
|
||||
if (i != tokens.end())
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
CellCoord cellCoord = Trinity::ComputeCellCoord(object->GetPositionX(), object->GetPositionY());
|
||||
CellCoord cellCoord = acore::ComputeCellCoord(object->GetPositionX(), object->GetPositionY());
|
||||
Cell cell(cellCoord);
|
||||
|
||||
uint32 zoneId, areaId;
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
float groundZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), MAX_HEIGHT);
|
||||
float floorZ = map->GetHeight(object->GetPhaseMask(), object->GetPositionX(), object->GetPositionY(), object->GetPositionZ());
|
||||
|
||||
GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
|
||||
GridCoord gridCoord = acore::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
|
||||
|
||||
// 63? WHY?
|
||||
int gridX = 63 - gridCoord.x_coord;
|
||||
@@ -745,7 +745,7 @@ public:
|
||||
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE));
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), handler->GetAcoreString(LANG_OFFLINE));
|
||||
|
||||
// in point where GM stay
|
||||
Player::SavePositionInDB(handler->GetSession()->GetPlayer()->GetMapId(),
|
||||
@@ -1024,13 +1024,13 @@ public:
|
||||
|
||||
if (!sSpellMgr->GetSpellInfo(spellIid))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_UNKNOWN_SPELL, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_UNKNOWN_SPELL, target == handler->GetSession()->GetPlayer() ? handler->GetAcoreString(LANG_YOU) : nameLink.c_str());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
target->RemoveSpellCooldown(spellIid, true);
|
||||
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, target == handler->GetSession()->GetPlayer() ? handler->GetTrinityString(LANG_YOU) : nameLink.c_str());
|
||||
handler->PSendSysMessage(LANG_REMOVE_COOLDOWN, spellIid, target == handler->GetSession()->GetPlayer() ? handler->GetAcoreString(LANG_YOU) : nameLink.c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1285,14 +1285,14 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_NOTEAM);
|
||||
std::string team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_NOTEAM);
|
||||
|
||||
if (data->teamId == TEAM_NEUTRAL)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_ANY);
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ANY);
|
||||
else if (data->teamId == TEAM_HORDE)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_HORDE);
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_HORDE);
|
||||
else if (data->teamId == TEAM_ALLIANCE)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_GRAVEYARDNEAREST, graveyardId, team_name.c_str(), zone_id);
|
||||
}
|
||||
@@ -1301,11 +1301,11 @@ public:
|
||||
std::string team_name;
|
||||
|
||||
if (teamId == TEAM_NEUTRAL)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_ANY);
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ANY);
|
||||
else if (teamId == TEAM_HORDE)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_HORDE);
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_HORDE);
|
||||
else if (teamId == TEAM_ALLIANCE)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
team_name = handler->GetAcoreString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
|
||||
//if (team == ~uint32(0))
|
||||
// handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAVEYARDS, zone_id);
|
||||
@@ -1484,7 +1484,7 @@ public:
|
||||
playerTarget = player;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail(handler->GetTrinityString(LANG_ADDITEM), itemId, count);
|
||||
sLog->outDetail(handler->GetAcoreString(LANG_ADDITEM), itemId, count);
|
||||
#endif
|
||||
|
||||
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(itemId);
|
||||
@@ -1573,7 +1573,7 @@ public:
|
||||
playerTarget = player;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail(handler->GetTrinityString(LANG_ADDITEMSET), itemSetId);
|
||||
sLog->outDetail(handler->GetAcoreString(LANG_ADDITEMSET), itemSetId);
|
||||
#endif
|
||||
|
||||
bool found = false;
|
||||
@@ -1754,38 +1754,38 @@ public:
|
||||
return false;
|
||||
|
||||
// Account data print variables
|
||||
std::string userName = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string userName = handler->GetAcoreString(LANG_ERROR);
|
||||
uint32 lowguid = GUID_LOPART(targetGuid);
|
||||
uint32 accId = 0;
|
||||
std::string eMail = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string regMail = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string eMail = handler->GetAcoreString(LANG_ERROR);
|
||||
std::string regMail = handler->GetAcoreString(LANG_ERROR);
|
||||
uint32 security = 0;
|
||||
std::string lastIp = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string lastIp = handler->GetAcoreString(LANG_ERROR);
|
||||
uint8 locked = 0;
|
||||
std::string lastLogin = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string lastLogin = handler->GetAcoreString(LANG_ERROR);
|
||||
uint32 failedLogins = 0;
|
||||
uint32 latency = 0;
|
||||
std::string OS = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
std::string OS = handler->GetAcoreString(LANG_UNKNOWN);
|
||||
|
||||
// Mute data print variables
|
||||
int64 muteTime = -1;
|
||||
std::string muteReason = handler->GetTrinityString(LANG_NO_REASON);
|
||||
std::string muteBy = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
std::string muteReason = handler->GetAcoreString(LANG_NO_REASON);
|
||||
std::string muteBy = handler->GetAcoreString(LANG_UNKNOWN);
|
||||
|
||||
// Ban data print variables
|
||||
int64 banTime = -1;
|
||||
std::string banType = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
std::string banReason = handler->GetTrinityString(LANG_NO_REASON);
|
||||
std::string bannedBy = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
std::string banType = handler->GetAcoreString(LANG_UNKNOWN);
|
||||
std::string banReason = handler->GetAcoreString(LANG_NO_REASON);
|
||||
std::string bannedBy = handler->GetAcoreString(LANG_UNKNOWN);
|
||||
|
||||
// Character data print variables
|
||||
uint8 raceid, classid = 0; //RACE_NONE, CLASS_NONE
|
||||
std::string raceStr, classStr = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
std::string raceStr, classStr = handler->GetAcoreString(LANG_UNKNOWN);
|
||||
uint8 gender = 0;
|
||||
int8 locale = handler->GetSessionDbcLocale();
|
||||
uint32 totalPlayerTime = 0;
|
||||
uint8 level = 0;
|
||||
std::string alive = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string alive = handler->GetAcoreString(LANG_ERROR);
|
||||
uint32 money = 0;
|
||||
uint32 xp = 0;
|
||||
uint32 xptotal = 0;
|
||||
@@ -1822,7 +1822,7 @@ public:
|
||||
muteTime = target->GetSession()->m_muteTime;
|
||||
mapId = target->GetMapId();
|
||||
areaId = target->GetAreaId();
|
||||
alive = target->IsAlive() ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO);
|
||||
alive = target->IsAlive() ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO);
|
||||
gender = target->getGender();
|
||||
phase = target->GetPhaseMask();
|
||||
}
|
||||
@@ -1855,9 +1855,9 @@ public:
|
||||
uint32 playerFlags = fields[10].GetUInt32();
|
||||
|
||||
if (!health || playerFlags & PLAYER_FLAGS_GHOST)
|
||||
alive = handler->GetTrinityString(LANG_NO);
|
||||
alive = handler->GetAcoreString(LANG_NO);
|
||||
else
|
||||
alive = handler->GetTrinityString(LANG_YES);
|
||||
alive = handler->GetAcoreString(LANG_YES);
|
||||
}
|
||||
|
||||
// Query the prepared statement for login data
|
||||
@@ -1888,7 +1888,7 @@ public:
|
||||
} **/
|
||||
|
||||
uint32 ip = inet_addr(lastIp.c_str());
|
||||
#if TRINITY_ENDIAN == BIGENDIAN
|
||||
#if ACORE_ENDIAN == BIGENDIAN
|
||||
EndianConvertReverse(ip);
|
||||
#endif
|
||||
stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP2NATION_COUNTRY);
|
||||
@@ -1907,10 +1907,10 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
eMail = handler->GetTrinityString(LANG_UNAUTHORIZED);
|
||||
regMail = handler->GetTrinityString(LANG_UNAUTHORIZED);
|
||||
lastIp = handler->GetTrinityString(LANG_UNAUTHORIZED);
|
||||
lastLogin = handler->GetTrinityString(LANG_UNAUTHORIZED);
|
||||
eMail = handler->GetAcoreString(LANG_UNAUTHORIZED);
|
||||
regMail = handler->GetAcoreString(LANG_UNAUTHORIZED);
|
||||
lastIp = handler->GetAcoreString(LANG_UNAUTHORIZED);
|
||||
lastLogin = handler->GetAcoreString(LANG_UNAUTHORIZED);
|
||||
}
|
||||
muteTime = fields[6].GetUInt64();
|
||||
muteReason = fields[7].GetString();
|
||||
@@ -1929,7 +1929,7 @@ public:
|
||||
PreparedQueryResult accBannedResult = LoginDatabase.Query(banQuery);
|
||||
if (!accBannedResult)
|
||||
{
|
||||
banType = handler->GetTrinityString(LANG_CHARACTER);
|
||||
banType = handler->GetAcoreString(LANG_CHARACTER);
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PINFO_BANS);
|
||||
stmt->setUInt32(0, GUID_LOPART(targetGuid));
|
||||
accBannedResult = CharacterDatabase.Query(stmt);
|
||||
@@ -1984,7 +1984,7 @@ public:
|
||||
|
||||
// Initiate output
|
||||
// Output I. LANG_PINFO_PLAYER
|
||||
handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetTrinityString(LANG_OFFLINE), nameLink.c_str(), GUID_LOPART(targetGuid));
|
||||
handler->PSendSysMessage(LANG_PINFO_PLAYER, target ? "" : handler->GetAcoreString(LANG_OFFLINE), nameLink.c_str(), GUID_LOPART(targetGuid));
|
||||
|
||||
// Output II. LANG_PINFO_GM_ACTIVE if character is gamemaster
|
||||
if (target && target->IsGameMaster())
|
||||
@@ -1992,7 +1992,7 @@ public:
|
||||
|
||||
// Output III. LANG_PINFO_BANNED if ban exists and is applied
|
||||
if (banTime >= 0)
|
||||
handler->PSendSysMessage(LANG_PINFO_BANNED, banType.c_str(), banReason.c_str(), banTime > 0 ? secsToTimeString(banTime - time(nullptr), true).c_str() : handler->GetTrinityString(LANG_PERMANENTLY), bannedBy.c_str());
|
||||
handler->PSendSysMessage(LANG_PINFO_BANNED, banType.c_str(), banReason.c_str(), banTime > 0 ? secsToTimeString(banTime - time(nullptr), true).c_str() : handler->GetAcoreString(LANG_PERMANENTLY), bannedBy.c_str());
|
||||
|
||||
// Output IV. LANG_PINFO_MUTED if mute is applied
|
||||
if (muteTime > 0)
|
||||
@@ -2011,7 +2011,7 @@ public:
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_REGMAILS, regMail.c_str(), eMail.c_str());
|
||||
|
||||
// Output IX. LANG_PINFO_ACC_IP
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_IP, lastIp.c_str(), locked ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO));
|
||||
handler->PSendSysMessage(LANG_PINFO_ACC_IP, lastIp.c_str(), locked ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO));
|
||||
|
||||
// Output X. LANG_PINFO_CHR_LEVEL
|
||||
if (level != sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
@@ -2089,7 +2089,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
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());
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_RACE, (gender == 0 ? handler->GetAcoreString(LANG_CHARACTER_GENDER_MALE) : handler->GetAcoreString(LANG_CHARACTER_GENDER_FEMALE)), raceStr.c_str(), classStr.c_str());
|
||||
|
||||
// Output XII. LANG_PINFO_CHR_ALIVE
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_ALIVE, alive.c_str());
|
||||
@@ -2120,7 +2120,7 @@ public:
|
||||
}
|
||||
|
||||
if (!zoneName)
|
||||
zoneName = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
zoneName = handler->GetAcoreString(LANG_UNKNOWN);
|
||||
|
||||
if (areaName)
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP_WITH_AREA, map->name[locale], zoneName, areaName);
|
||||
@@ -2180,14 +2180,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
CellCoord p(Trinity::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()));
|
||||
CellCoord p(acore::ComputeCellCoord(player->GetPositionX(), player->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::RespawnDo u_do;
|
||||
Trinity::WorldObjectWorker<Trinity::RespawnDo> worker(player, u_do);
|
||||
acore::RespawnDo u_do;
|
||||
acore::WorldObjectWorker<acore::RespawnDo> worker(player, u_do);
|
||||
|
||||
TypeContainerVisitor<Trinity::WorldObjectWorker<Trinity::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
|
||||
TypeContainerVisitor<acore::WorldObjectWorker<acore::RespawnDo>, GridTypeMapContainer > obj_worker(worker);
|
||||
cell.Visit(p, obj_worker, *player->GetMap(), *player, player->GetGridActivationRange());
|
||||
|
||||
return true;
|
||||
@@ -2261,7 +2261,7 @@ public:
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
|
||||
// pussywizard: notify all online GMs
|
||||
TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||
ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
|
||||
HashMapHolder<Player>::MapType const& m = sObjectAccessor->GetPlayers();
|
||||
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
if (itr->second->GetSession()->GetSecurity())
|
||||
|
||||
Reference in New Issue
Block a user