Core/Misc: Explicitly include required headers instead of relying on them to be included by other headers

This commit is contained in:
Shauren
2022-02-11 14:33:35 +01:00
parent 5b02c53fc5
commit cbcd149ce5
21 changed files with 41 additions and 28 deletions

View File

@@ -336,7 +336,7 @@ public:
}
else
{
handler->PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, std::to_string(spawnId));
handler->PSendSysMessage(LANG_COMMAND_CREATGUIDNOTFOUND, std::to_string(spawnId).c_str());
handler->SetSentErrorMessage(true);
return false;
}
@@ -1190,7 +1190,7 @@ public:
if (!pair.second)
continue;
Player const* player = ObjectAccessor::FindConnectedPlayer(pair.first);
handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_SUBLABEL, player ? player->GetName() : Trinity::StringFormat("Offline player (GUID %s)", pair.first.ToString()).c_str(), pair.second->size());
handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_SUBLABEL, player ? player->GetName().c_str() : Trinity::StringFormat("Offline player (GUID %s)", pair.first.ToString().c_str()).c_str(), pair.second->size());
for (auto it = pair.second->cbegin(); it != pair.second->cend(); ++it)
{
@@ -1213,12 +1213,12 @@ public:
Loot const& loot = creatureTarget->loot;
if (!creatureTarget->isDead() || loot.empty())
{
handler->PSendSysMessage(LANG_COMMAND_NOT_DEAD_OR_NO_LOOT, creatureTarget->GetName());
handler->PSendSysMessage(LANG_COMMAND_NOT_DEAD_OR_NO_LOOT, creatureTarget->GetName().c_str());
handler->SetSentErrorMessage(true);
return false;
}
handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_HEADER, creatureTarget->GetName(), creatureTarget->GetEntry());
handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_HEADER, creatureTarget->GetName().c_str(), creatureTarget->GetEntry());
handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_MONEY, loot.gold / GOLD, (loot.gold%GOLD) / SILVER, loot.gold%SILVER);
if (!all)