mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG-- branch : trunk
This commit is contained in:
@@ -30,26 +30,26 @@ public:
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_ADDON:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog.outChat("[ADDON] Player %s sends: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s sends: %s",
|
||||
player->GetName(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_SAY:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog.outChat("[SAY] Player %s says (language %u): %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog->outChat("[SAY] Player %s says (language %u): %s",
|
||||
player->GetName(), lang, msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_EMOTE:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog.outChat("[TEXTEMOTE] Player %s emotes: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog->outChat("[TEXTEMOTE] Player %s emotes: %s",
|
||||
player->GetName(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_YELL:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog.outChat("[YELL] Player %s yells (language %u): %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PUBLIC))
|
||||
sLog->outChat("[YELL] Player %s yells (language %u): %s",
|
||||
player->GetName(), lang, msg.c_str());
|
||||
break;
|
||||
}
|
||||
@@ -57,8 +57,8 @@ public:
|
||||
|
||||
void OnChat(Player *player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player *receiver)
|
||||
{
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_WHISPER))
|
||||
sLog.outChat("[WHISPER] Player %s tells %s: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_WHISPER))
|
||||
sLog->outChat("[WHISPER] Player %s tells %s: %s",
|
||||
player->GetName(), receiver ? receiver->GetName() : "<unknown>", msg.c_str());
|
||||
}
|
||||
|
||||
@@ -67,44 +67,44 @@ public:
|
||||
switch (type)
|
||||
{
|
||||
case CHAT_MSG_PARTY:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_PARTY))
|
||||
sLog.outChat("[PARTY] Player %s tells group with leader %s: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
|
||||
sLog->outChat("[PARTY] Player %s tells group with leader %s: %s",
|
||||
player->GetName(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_PARTY_LEADER:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_PARTY))
|
||||
sLog.outChat("[PARTY] Leader %s tells group: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_PARTY))
|
||||
sLog->outChat("[PARTY] Leader %s tells group: %s",
|
||||
player->GetName(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_RAID:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog.outChat("[RAID] Player %s tells raid with leader %s: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog->outChat("[RAID] Player %s tells raid with leader %s: %s",
|
||||
player->GetName(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_RAID_LEADER:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog.outChat("[RAID] Leader player %s tells raid: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog->outChat("[RAID] Leader player %s tells raid: %s",
|
||||
player->GetName(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_RAID_WARNING:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog.outChat("[RAID] Leader player %s warns raid with: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_RAID))
|
||||
sLog->outChat("[RAID] Leader player %s warns raid with: %s",
|
||||
player->GetName(), msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_BATTLEGROUND:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog.outChat("[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog->outChat("[BATTLEGROUND] Player %s tells battleground with leader %s: %s",
|
||||
player->GetName(), group ? group->GetLeaderName() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_BATTLEGROUND_LEADER:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog.outChat("[BATTLEGROUND] Leader player %s tells battleground: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_BGROUND))
|
||||
sLog->outChat("[BATTLEGROUND] Leader player %s tells battleground: %s",
|
||||
player->GetName(), msg.c_str());
|
||||
break;
|
||||
}
|
||||
@@ -115,17 +115,17 @@ public:
|
||||
switch(type)
|
||||
{
|
||||
case CHAT_MSG_GUILD:
|
||||
if (lang != LANG_ADDON && sWorld.getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
sLog.outChat("[GUILD] Player %s tells guild %s: %s",
|
||||
if (lang != LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
sLog->outChat("[GUILD] Player %s tells guild %s: %s",
|
||||
player->GetName(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
else if (lang == LANG_ADDON && sWorld.getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog.outChat("[ADDON] Player %s sends to guild %s: %s",
|
||||
else if (lang == LANG_ADDON && sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
|
||||
sLog->outChat("[ADDON] Player %s sends to guild %s: %s",
|
||||
player->GetName(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
|
||||
case CHAT_MSG_OFFICER:
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
sLog.outChat("[OFFICER] Player %s tells guild %s officers: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_GUILD))
|
||||
sLog->outChat("[OFFICER] Player %s tells guild %s officers: %s",
|
||||
player->GetName(), guild ? guild->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
break;
|
||||
}
|
||||
@@ -139,11 +139,11 @@ public:
|
||||
channel->HasFlag(CHANNEL_FLAG_CITY) ||
|
||||
channel->HasFlag(CHANNEL_FLAG_LFG));
|
||||
|
||||
if (sWorld.getBoolConfig(CONFIG_CHATLOG_SYSCHAN) && isSystem)
|
||||
sLog.outChat("[SYSCHAN] Player %s tells channel %s: %s",
|
||||
if (sWorld->getBoolConfig(CONFIG_CHATLOG_SYSCHAN) && isSystem)
|
||||
sLog->outChat("[SYSCHAN] Player %s tells channel %s: %s",
|
||||
player->GetName(), channel->GetName().c_str(), msg.c_str());
|
||||
else if (sWorld.getBoolConfig(CONFIG_CHATLOG_CHANNEL))
|
||||
sLog.outChat("[CHANNEL] Player %s tells channel %s: %s",
|
||||
else if (sWorld->getBoolConfig(CONFIG_CHATLOG_CHANNEL))
|
||||
sLog->outChat("[CHANNEL] Player %s tells channel %s: %s",
|
||||
player->GetName(), channel ? channel->GetName().c_str() : "<unknown>", msg.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
if (Spell)
|
||||
pCreature->CastSpell(pPlayer, Spell, false);
|
||||
else
|
||||
sLog.outError("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
|
||||
sLog->outError("TSCR: go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", pCreature->GetEntry(), pCreature->getFaction());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300)
|
||||
return false;
|
||||
|
||||
sLog.outDebug("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
|
||||
sLog->outDebug("TSCR: Player attempt to use item %u, but did not meet riding requirement",itemId);
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_EQUIP_SKILL,pItem,NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ bool EquippedOk(Player* pPlayer, uint32 spellId)
|
||||
if (pItem->GetProto()->RequiredSpell == reqSpell)
|
||||
{
|
||||
//player has item equipped that require specialty. Not allow to unlearn, player has to unequip first
|
||||
sLog.outDebug("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
|
||||
sLog->outDebug("TSCR: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
}
|
||||
|
||||
if (!m_pSpawnAssoc)
|
||||
sLog.outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
|
||||
sLog->outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
|
||||
else
|
||||
{
|
||||
CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
if (!spawnedTemplate)
|
||||
{
|
||||
m_pSpawnAssoc = NULL;
|
||||
sLog.outErrorDb("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
sLog->outErrorDb("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
m_uiSpawnedGUID = pSummoned->GetGUID();
|
||||
else
|
||||
{
|
||||
sLog.outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
sLog->outErrorDb("TCSR: npc_air_force_bots: wasn't able to spawn Creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
m_pSpawnAssoc = NULL;
|
||||
}
|
||||
|
||||
@@ -831,7 +831,7 @@ void npc_doctor::npc_doctorAI::UpdateAI(const uint32 diff)
|
||||
case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[rand()%3]; break;
|
||||
case DOCTOR_HORDE: patientEntry = HordeSoldierId[rand()%3]; break;
|
||||
default:
|
||||
sLog.outError("TSCR: Invalid entry for Triage doctor. Please check your database");
|
||||
sLog->outError("TSCR: Invalid entry for Triage doctor. Please check your database");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1282,7 +1282,7 @@ public:
|
||||
if (pCreature->isCanTrainingAndResetTalentsOf(pPlayer))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE1, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS);
|
||||
|
||||
if (!(pPlayer->GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < sWorld.getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
|
||||
if (!(pPlayer->GetSpecsCount() == 1 && pCreature->isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL))))
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_HELLO_ROGUE3, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_LEARNDUALSPEC);
|
||||
|
||||
if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681))
|
||||
@@ -1312,7 +1312,7 @@ public:
|
||||
pPlayer->SendTalentWipeConfirm(pCreature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_OPTION_LEARNDUALSPEC:
|
||||
if (pPlayer->GetSpecsCount() == 1 && !(pPlayer->getLevel() < sWorld.getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
|
||||
if (pPlayer->GetSpecsCount() == 1 && !(pPlayer->getLevel() < sWorld->getIntConfig(CONFIG_MIN_DUALSPEC_LEVEL)))
|
||||
{
|
||||
if (!pPlayer->HasEnoughMoney(10000000))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user