refactor(Core): rename namespaces and macros to acore (#2454)

This commit is contained in:
Viste
2019-12-01 15:13:31 +03:00
committed by Francesco Borzì
parent e19e95e5d0
commit e22d78ecd6
278 changed files with 1292 additions and 1309 deletions

View File

@@ -289,9 +289,9 @@ public:
if (fields[2].GetBool() && (fields[1].GetUInt64() == uint64(0) || unbanDate >= time(nullptr)))
active = true;
bool permanent = (fields[1].GetUInt64() == uint64(0));
std::string banTime = permanent ? handler->GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
fields[0].GetCString(), banTime.c_str(), active ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO), fields[4].GetCString(), fields[5].GetCString());
fields[0].GetCString(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].GetCString(), fields[5].GetCString());
}
while (result->NextRow());
@@ -337,9 +337,9 @@ public:
if (fields[2].GetUInt8() && (!fields[1].GetUInt32() || unbanDate >= time(nullptr)))
active = true;
bool permanent = (fields[1].GetUInt32() == uint32(0));
std::string banTime = permanent ? handler->GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
std::string banTime = permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
fields[0].GetCString(), banTime.c_str(), active ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO), fields[4].GetCString(), fields[5].GetCString());
fields[0].GetCString(), banTime.c_str(), active ? handler->GetAcoreString(LANG_YES) : handler->GetAcoreString(LANG_NO), fields[4].GetCString(), fields[5].GetCString());
}
while (result->NextRow());
@@ -371,8 +371,8 @@ public:
Field* fields = result->Fetch();
bool permanent = !fields[6].GetUInt64();
handler->PSendSysMessage(LANG_BANINFO_IPENTRY,
fields[0].GetCString(), fields[1].GetCString(), permanent ? handler->GetTrinityString(LANG_BANINFO_NEVER) : fields[2].GetCString(),
permanent ? handler->GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].GetUInt64(), true).c_str(), fields[4].GetCString(), fields[5].GetCString());
fields[0].GetCString(), fields[1].GetCString(), permanent ? handler->GetAcoreString(LANG_BANINFO_NEVER) : fields[2].GetCString(),
permanent ? handler->GetAcoreString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[3].GetUInt64(), true).c_str(), fields[4].GetCString(), fields[5].GetCString());
return true;

View File

@@ -259,7 +259,7 @@ public:
LocaleConstant loc = handler->GetSessionDbcLocale();
char const* targetName = target->GetName().c_str();
char const* knownStr = handler->GetTrinityString(LANG_KNOWN);
char const* knownStr = handler->GetAcoreString(LANG_KNOWN);
// Search in CharTitles.dbc
for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++)
@@ -273,7 +273,7 @@ public:
continue;
char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index
? handler->GetTrinityString(LANG_ACTIVE)
? handler->GetAcoreString(LANG_ACTIVE)
: "";
char titleNameStr[80];
@@ -466,7 +466,7 @@ public:
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction.ID);
char const* factionName = factionEntry ? factionEntry->name[loc] : "#Not found#";
ReputationRank rank = target->GetReputationMgr().GetRank(factionEntry);
std::string rankName = handler->GetTrinityString(ReputationRankStrIndex[rank]);
std::string rankName = handler->GetAcoreString(ReputationRankStrIndex[rank]);
std::ostringstream ss;
if (handler->GetSession())
ss << faction.ID << " - |cffffffff|Hfaction:" << faction.ID << "|h[" << factionName << ' ' << localeNames[loc] << "]|h|r";
@@ -476,17 +476,17 @@ public:
ss << ' ' << rankName << " (" << target->GetReputationMgr().GetReputation(factionEntry) << ')';
if (faction.Flags & FACTION_FLAG_VISIBLE)
ss << handler->GetTrinityString(LANG_FACTION_VISIBLE);
ss << handler->GetAcoreString(LANG_FACTION_VISIBLE);
if (faction.Flags & FACTION_FLAG_AT_WAR)
ss << handler->GetTrinityString(LANG_FACTION_ATWAR);
ss << handler->GetAcoreString(LANG_FACTION_ATWAR);
if (faction.Flags & FACTION_FLAG_PEACE_FORCED)
ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED);
ss << handler->GetAcoreString(LANG_FACTION_PEACE_FORCED);
if (faction.Flags & FACTION_FLAG_HIDDEN)
ss << handler->GetTrinityString(LANG_FACTION_HIDDEN);
ss << handler->GetAcoreString(LANG_FACTION_HIDDEN);
if (faction.Flags & FACTION_FLAG_INVISIBLE_FORCED)
ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
ss << handler->GetAcoreString(LANG_FACTION_INVISIBLE_FORCED);
if (faction.Flags & FACTION_FLAG_INACTIVE)
ss << handler->GetTrinityString(LANG_FACTION_INACTIVE);
ss << handler->GetAcoreString(LANG_FACTION_INACTIVE);
handler->SendSysMessage(ss.str().c_str());
}

View File

@@ -879,8 +879,8 @@ public:
else
{
Creature* passenger = nullptr;
Trinity::AllCreaturesOfEntryInRange check(handler->GetSession()->GetPlayer(), entry, 20.0f);
Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(handler->GetSession()->GetPlayer(), passenger, check);
acore::AllCreaturesOfEntryInRange check(handler->GetSession()->GetPlayer(), entry, 20.0f);
acore::CreatureSearcher<acore::AllCreaturesOfEntryInRange> searcher(handler->GetSession()->GetPlayer(), passenger, check);
handler->GetSession()->GetPlayer()->VisitNearbyObject(30.0f, searcher);
if (!passenger || passenger == target)
return false;

View File

@@ -45,7 +45,7 @@ public:
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
char const* active = handler->GetTrinityString(LANG_ACTIVE);
char const* active = handler->GetAcoreString(LANG_ACTIVE);
for (GameEventMgr::ActiveEvents::const_iterator itr = activeEvents.begin(); itr != activeEvents.end(); ++itr)
{
@@ -98,7 +98,7 @@ public:
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList();
bool active = activeEvents.find(eventId) != activeEvents.end();
char const* activeStr = active ? handler->GetTrinityString(LANG_ACTIVE) : "";
char const* activeStr = active ? handler->GetAcoreString(LANG_ACTIVE) : "";
std::string startTimeStr = TimeToTimestampStr(eventData.start);
std::string endTimeStr = TimeToTimestampStr(eventData.end);

View File

@@ -109,7 +109,7 @@ public:
bool first = true;
bool footer = false;
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)
{
@@ -186,7 +186,7 @@ public:
if (!*args)
{
handler->PSendSysMessage(LANG_YOU_ARE, _player->isGMVisible() ? handler->GetTrinityString(LANG_VISIBLE) : handler->GetTrinityString(LANG_INVISIBLE));
handler->PSendSysMessage(LANG_YOU_ARE, _player->isGMVisible() ? handler->GetAcoreString(LANG_VISIBLE) : handler->GetAcoreString(LANG_INVISIBLE));
handler->SetSentErrorMessage(true);
return false;
}

View File

@@ -414,8 +414,8 @@ public:
return false;
}
char const* talentStr = handler->GetTrinityString(LANG_TALENT);
char const* passiveStr = handler->GetTrinityString(LANG_PASSIVE);
char const* talentStr = handler->GetAcoreString(LANG_TALENT);
char const* passiveStr = handler->GetAcoreString(LANG_PASSIVE);
Unit::AuraApplicationMap const& auras = unit->GetAppliedAuras();
handler->PSendSysMessage(LANG_COMMAND_TARGET_LISTAURAS, auras.size());

View File

@@ -258,7 +258,7 @@ public:
return true;
}
char const* active = activeEvents.find(id) != activeEvents.end() ? handler->GetTrinityString(LANG_ACTIVE) : "";
char const* active = activeEvents.find(id) != activeEvents.end() ? handler->GetAcoreString(LANG_ACTIVE) : "";
if (handler->GetSession())
handler->PSendSysMessage(LANG_EVENT_ENTRY_LIST_CHAT, id, id, eventData.description.c_str(), active);
@@ -345,25 +345,25 @@ public:
if (factionState) // and then target != nullptr also
{
uint32 index = target->GetReputationMgr().GetReputationRankStrIndex(factionEntry);
std::string rankName = handler->GetTrinityString(index);
std::string rankName = handler->GetAcoreString(index);
ss << ' ' << rankName << "|h|r (" << target->GetReputationMgr().GetReputation(factionEntry) << ')';
if (factionState->Flags & FACTION_FLAG_VISIBLE)
ss << handler->GetTrinityString(LANG_FACTION_VISIBLE);
ss << handler->GetAcoreString(LANG_FACTION_VISIBLE);
if (factionState->Flags & FACTION_FLAG_AT_WAR)
ss << handler->GetTrinityString(LANG_FACTION_ATWAR);
ss << handler->GetAcoreString(LANG_FACTION_ATWAR);
if (factionState->Flags & FACTION_FLAG_PEACE_FORCED)
ss << handler->GetTrinityString(LANG_FACTION_PEACE_FORCED);
ss << handler->GetAcoreString(LANG_FACTION_PEACE_FORCED);
if (factionState->Flags & FACTION_FLAG_HIDDEN)
ss << handler->GetTrinityString(LANG_FACTION_HIDDEN);
ss << handler->GetAcoreString(LANG_FACTION_HIDDEN);
if (factionState->Flags & FACTION_FLAG_INVISIBLE_FORCED)
ss << handler->GetTrinityString(LANG_FACTION_INVISIBLE_FORCED);
ss << handler->GetAcoreString(LANG_FACTION_INVISIBLE_FORCED);
if (factionState->Flags & FACTION_FLAG_INACTIVE)
ss << handler->GetTrinityString(LANG_FACTION_INACTIVE);
ss << handler->GetAcoreString(LANG_FACTION_INACTIVE);
}
else
ss << handler->GetTrinityString(LANG_FACTION_NOREPUTATION);
ss << handler->GetAcoreString(LANG_FACTION_NOREPUTATION);
handler->SendSysMessage(ss.str().c_str());
@@ -655,13 +655,13 @@ public:
switch (status)
{
case QUEST_STATUS_COMPLETE:
statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_COMPLETE);
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_COMPLETE);
break;
case QUEST_STATUS_INCOMPLETE:
statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_ACTIVE);
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_ACTIVE);
break;
case QUEST_STATUS_REWARDED:
statusStr = handler->GetTrinityString(LANG_COMMAND_QUEST_REWARDED);
statusStr = handler->GetAcoreString(LANG_COMMAND_QUEST_REWARDED);
break;
default:
break;
@@ -745,13 +745,13 @@ public:
char const* knownStr = "";
if (target && target->HasSkill(id))
{
knownStr = handler->GetTrinityString(LANG_KNOWN);
knownStr = handler->GetAcoreString(LANG_KNOWN);
uint32 curValue = target->GetPureSkillValue(id);
uint32 maxValue = target->GetPureMaxSkillValue(id);
uint32 permValue = target->GetSkillPermBonusValue(id);
uint32 tempValue = target->GetSkillTempBonusValue(id);
char const* valFormat = handler->GetTrinityString(LANG_SKILL_VALUES);
char const* valFormat = handler->GetAcoreString(LANG_SKILL_VALUES);
snprintf(valStr, 50, valFormat, curValue, maxValue, permValue, tempValue);
}
@@ -853,7 +853,7 @@ public:
// include rank in link name
if (rank)
ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
ss << handler->GetAcoreString(LANG_SPELL_RANK) << rank;
if (handler->GetSession())
ss << ' ' << localeNames[locale] << "]|h|r";
@@ -861,15 +861,15 @@ public:
ss << ' ' << localeNames[locale];
if (talent)
ss << handler->GetTrinityString(LANG_TALENT);
ss << handler->GetAcoreString(LANG_TALENT);
if (passive)
ss << handler->GetTrinityString(LANG_PASSIVE);
ss << handler->GetAcoreString(LANG_PASSIVE);
if (learn)
ss << handler->GetTrinityString(LANG_LEARN);
ss << handler->GetAcoreString(LANG_LEARN);
if (known)
ss << handler->GetTrinityString(LANG_KNOWN);
ss << handler->GetAcoreString(LANG_KNOWN);
if (active)
ss << handler->GetTrinityString(LANG_ACTIVE);
ss << handler->GetAcoreString(LANG_ACTIVE);
handler->SendSysMessage(ss.str().c_str());
@@ -941,7 +941,7 @@ public:
// include rank in link name
if (rank)
ss << handler->GetTrinityString(LANG_SPELL_RANK) << rank;
ss << handler->GetAcoreString(LANG_SPELL_RANK) << rank;
if (handler->GetSession())
ss << ' ' << localeNames[locale] << "]|h|r";
@@ -949,15 +949,15 @@ public:
ss << ' ' << localeNames[locale];
if (talent)
ss << handler->GetTrinityString(LANG_TALENT);
ss << handler->GetAcoreString(LANG_TALENT);
if (passive)
ss << handler->GetTrinityString(LANG_PASSIVE);
ss << handler->GetAcoreString(LANG_PASSIVE);
if (learn)
ss << handler->GetTrinityString(LANG_LEARN);
ss << handler->GetAcoreString(LANG_LEARN);
if (known)
ss << handler->GetTrinityString(LANG_KNOWN);
ss << handler->GetAcoreString(LANG_KNOWN);
if (active)
ss << handler->GetTrinityString(LANG_ACTIVE);
ss << handler->GetAcoreString(LANG_ACTIVE);
handler->SendSysMessage(ss.str().c_str());
@@ -1163,10 +1163,10 @@ public:
return true;
}
char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetTrinityString(LANG_KNOWN) : "";
char const* knownStr = target && target->HasTitle(titleInfo) ? handler->GetAcoreString(LANG_KNOWN) : "";
char const* activeStr = target && target->GetUInt32Value(PLAYER_CHOSEN_TITLE) == titleInfo->bit_index
? handler->GetTrinityString(LANG_ACTIVE)
? handler->GetAcoreString(LANG_ACTIVE)
: "";
char titleNameStr[80];
@@ -1226,21 +1226,21 @@ public:
ss << id << " - [" << name << ']';
if (mapInfo->IsContinent())
ss << handler->GetTrinityString(LANG_CONTINENT);
ss << handler->GetAcoreString(LANG_CONTINENT);
switch (mapInfo->map_type)
{
case MAP_INSTANCE:
ss << handler->GetTrinityString(LANG_INSTANCE);
ss << handler->GetAcoreString(LANG_INSTANCE);
break;
case MAP_RAID:
ss << handler->GetTrinityString(LANG_RAID);
ss << handler->GetAcoreString(LANG_RAID);
break;
case MAP_BATTLEGROUND:
ss << handler->GetTrinityString(LANG_BATTLEGROUND);
ss << handler->GetAcoreString(LANG_BATTLEGROUND);
break;
case MAP_ARENA:
ss << handler->GetTrinityString(LANG_ARENA);
ss << handler->GetAcoreString(LANG_ARENA);
break;
}

View File

@@ -69,7 +69,7 @@ public:
return false;
char buff[2048];
sprintf(buff, handler->GetTrinityString(LANG_SYSTEMMESSAGE), args);
sprintf(buff, handler->GetAcoreString(LANG_SYSTEMMESSAGE), args);
sWorld->SendServerMessage(SERVER_MSG_STRING, buff);
return true;
}
@@ -88,7 +88,7 @@ public:
if (!*args)
return false;
std::string str = handler->GetTrinityString(LANG_GLOBAL_NOTIFY);
std::string str = handler->GetAcoreString(LANG_GLOBAL_NOTIFY);
str += args;
WorldPacket data(SMSG_NOTIFICATION, (str.size()+1));
@@ -103,7 +103,7 @@ public:
if (!*args)
return false;
std::string str = handler->GetTrinityString(LANG_GM_NOTIFY);
std::string str = handler->GetAcoreString(LANG_GM_NOTIFY);
str += args;
WorldPacket data(SMSG_NOTIFICATION, (str.size()+1));
@@ -117,7 +117,7 @@ public:
{
if (!*args)
{
handler->PSendSysMessage(LANG_COMMAND_WHISPERACCEPTING, handler->GetSession()->GetPlayer()->isAcceptWhispers() ? handler->GetTrinityString(LANG_ON) : handler->GetTrinityString(LANG_OFF));
handler->PSendSysMessage(LANG_COMMAND_WHISPERACCEPTING, handler->GetSession()->GetPlayer()->isAcceptWhispers() ? handler->GetAcoreString(LANG_ON) : handler->GetAcoreString(LANG_OFF));
return true;
}

View File

@@ -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())

View File

@@ -260,15 +260,15 @@ public:
float radius = 40.0f;
WorldObject* object = handler->GetSession()->GetPlayer();
CellCoord pair(Trinity::ComputeCellCoord(object->GetPositionX(), object->GetPositionY()));
CellCoord pair(acore::ComputeCellCoord(object->GetPositionX(), object->GetPositionY()));
Cell cell(pair);
cell.SetNoCreate();
std::list<Creature*> creatureList;
Trinity::AnyUnitInObjectRangeCheck go_check(object, radius);
Trinity::CreatureListSearcher<Trinity::AnyUnitInObjectRangeCheck> go_search(object, creatureList, go_check);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AnyUnitInObjectRangeCheck>, GridTypeMapContainer> go_visit(go_search);
acore::AnyUnitInObjectRangeCheck go_check(object, radius);
acore::CreatureListSearcher<acore::AnyUnitInObjectRangeCheck> go_search(object, creatureList, go_check);
TypeContainerVisitor<acore::CreatureListSearcher<acore::AnyUnitInObjectRangeCheck>, GridTypeMapContainer> go_visit(go_search);
// Get Creatures
cell.Visit(pair, go_visit, *(object->GetMap()), *object, radius);

View File

@@ -191,7 +191,7 @@ public:
target->SetPower(POWER_ENERGY, energy);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDetail(handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
sLog->outDetail(handler->GetAcoreString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
#endif
return true;
@@ -1019,7 +1019,7 @@ public:
int32 newmoney = int32(targetMoney) + moneyToAdd;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_CHATSYS, handler->GetTrinityString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
sLog->outDebug(LOG_FILTER_CHATSYS, handler->GetAcoreString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
#endif
if (newmoney <= 0)
{
@@ -1056,7 +1056,7 @@ public:
}
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_CHATSYS, handler->GetTrinityString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
sLog->outDebug(LOG_FILTER_CHATSYS, handler->GetAcoreString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
#endif
return true;
@@ -1199,7 +1199,7 @@ public:
amount = -42000;
for (; r < MAX_REPUTATION_RANK; ++r)
{
std::string rank = handler->GetTrinityString(ReputationRankStrIndex[r]);
std::string rank = handler->GetAcoreString(ReputationRankStrIndex[r]);
if (rank.empty())
continue;

View File

@@ -140,7 +140,7 @@ public:
{ "spell_target_position", SEC_ADMINISTRATOR, true, &HandleReloadSpellTargetPositionCommand, "" },
{ "spell_threats", SEC_ADMINISTRATOR, true, &HandleReloadSpellThreatsCommand, "" },
{ "spell_group_stack_rules", SEC_ADMINISTRATOR, true, &HandleReloadSpellGroupStackRulesCommand, "" },
{ "trinity_string", SEC_ADMINISTRATOR, true, &HandleReloadTrinityStringCommand, "" },
{ "acore_string", SEC_ADMINISTRATOR, true, &HandleReloadAcoreStringCommand, "" },
{ "warden_action", SEC_ADMINISTRATOR, true, &HandleReloadWardenactionCommand, "" },
{ "waypoint_scripts", SEC_ADMINISTRATOR, true, &HandleReloadWpScriptsCommand, "" },
{ "waypoint_data", SEC_ADMINISTRATOR, true, &HandleReloadWpCommand, "" },
@@ -179,7 +179,7 @@ public:
HandleReloadMailLevelRewardCommand(handler, "");
HandleReloadCommandCommand(handler, "");
HandleReloadReservedNameCommand(handler, "");
HandleReloadTrinityStringCommand(handler, "");
HandleReloadAcoreStringCommand(handler, "");
HandleReloadGameTeleCommand(handler, "");
HandleReloadVehicleAccessoryCommand(handler, "");
@@ -718,11 +718,11 @@ public:
return true;
}
static bool HandleReloadTrinityStringCommand(ChatHandler* handler, const char* /*args*/)
static bool HandleReloadAcoreStringCommand(ChatHandler* handler, const char* /*args*/)
{
sLog->outString("Re-Loading trinity_string Table!");
sObjectMgr->LoadTrinityStrings();
handler->SendGlobalGMSysMessage("DB table `trinity_string` reloaded.");
sLog->outString("Re-Loading acore_string Table!");
sObjectMgr->LoadAcoreStrings();
handler->SendGlobalGMSysMessage("DB table `acore_string` reloaded.");
return true;
}

View File

@@ -284,7 +284,7 @@ public:
stmt->setUInt16(0, uint16(atLogin));
CharacterDatabase.Execute(stmt);
TRINITY_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
ACORE_READ_GUARD(HashMapHolder<Player>::LockType, *HashMapHolder<Player>::GetLock());
HashMapHolder<Player>::MapType const& plist = sObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = plist.begin(); itr != plist.end(); ++itr)
itr->second->SetAtLoginFlag(atLogin);

View File

@@ -190,7 +190,7 @@ public:
std::string nameLink = handler->playerLink(target_name);
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE), tele->name.c_str());
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetAcoreString(LANG_OFFLINE), tele->name.c_str());
Player::SavePositionInDB(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation,
sMapMgr->GetZoneId(tele->mapId, tele->position_x, tele->position_y, tele->position_z), target_guid);
}