Revert "chore(Script/Misc): cleanup" (#19627)

Revert "chore(Script/Misc): cleanup (#19619)"

This reverts commit 7ff8f72397.
This commit is contained in:
Andrew
2024-08-15 00:43:11 -03:00
committed by GitHub
parent 7ff8f72397
commit 1565758da4
21 changed files with 122 additions and 145 deletions

View File

@@ -27,33 +27,19 @@ def islog(line):
else :
return False
def isSendErrorMessage(line):
substring = 'SendErrorMessage'
if substring in line:
return True
else :
return False
# def isSendSysMessage(line):
# substring = 'SendSysMessage'
# if substring in line:
# return True
# else :
# return False
def isSendWorldText(line):
substring = 'SendWorldText'
if substring in line:
return True
else :
return False
def isSendSysMessage(line):
substring = 'SendSysMessage'
if substring in line:
return True
else :
return False
def isPSendSysMessage(line):
substring = 'PSendSysMessage'
if substring in line:
return True
else :
return False
# def isPSendSysMessage(line):
# substring = 'PSendSysMessage'
# if substring in line:
# return True
# else :
# return False
def isPQuery(line):
substring = 'PQuery'
@@ -106,14 +92,10 @@ def checkSoloLine(line):
elif isPAppend(line):
line = line.replace("PAppend", "Append");
return handleCleanup(line), False
elif isSendErrorMessage(line):
return handleCleanup(line), False
elif isSendWorldText(line):
return handleCleanup(line), False
elif isSendSysMessage(line):
return handleCleanup(line), False
elif isPSendSysMessage(line):
return handleCleanup(line), False
# elif isSendSysMessage(line):
# return handleCleanup(line), False
# elif isPSendSysMessage(line):
# return handleCleanup(line), False
# elif isStringFormat(line):
# return handleCleanup(line), False
else:
@@ -127,14 +109,10 @@ def startMultiLine(line):
return handleCleanup(line), True
elif islog(line):
return handleCleanup(line), True
elif isSendErrorMessage(line):
return handleCleanup(line), True
elif isSendWorldText(line):
return handleCleanup(line), True
elif isSendSysMessage(line):
return handleCleanup(line), True
elif isPSendSysMessage(line):
return handleCleanup(line), True
# elif isSendSysMessage(line):
# return handleCleanup(line), True
# elif isPSendSysMessage(line):
# return handleCleanup(line), True
elif isPQuery(line):
line = line.replace("PQuery", "Query");
return handleCleanup(line), True
@@ -199,7 +177,6 @@ def handleCleanup(line):
line = line.replace("%3.1f", "{:3.1f}");
line = line.replace("%%", "%");
line = line.replace(".c_str()", "");
line = line.replace("->c_str()", "");
line = line.replace("\" SZFMTD \"", "{}");
line = line.replace("\" UI64FMTD \"", "{}");
# line = line.replace("\" STRING_VIEW_FMT \"", "{}");

View File

@@ -996,7 +996,7 @@ void BattlegroundQueue::BattlegroundQueueAnnouncerUpdate(uint32 diff, Battlegrou
uint32 q_min_level = std::min(bracketEntry->minLevel, (uint32) 80);
uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32) 80);
ChatHandler(nullptr).SendWorldTextOptional(LANG_BG_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_BG_QUEUE, bgName, q_min_level, q_max_level, qPlayers, MaxPlayers);
ChatHandler(nullptr).SendWorldTextOptional(LANG_BG_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_BG_QUEUE, bgName.c_str(), q_min_level, q_max_level, qPlayers, MaxPlayers);
}
else
{
@@ -1077,7 +1077,7 @@ void BattlegroundQueue::SendMessageBGQueue(Player* leader, Battleground* bg, PvP
return;
}
ChatHandler(nullptr).SendWorldTextOptional(LANG_BG_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_BG_QUEUE, bgName, q_min_level, q_max_level, qAlliance + qHorde, MaxPlayers);
ChatHandler(nullptr).SendWorldTextOptional(LANG_BG_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_BG_QUEUE, bgName.c_str(), q_min_level, q_max_level, qAlliance + qHorde, MaxPlayers);
}
}
}
@@ -1128,7 +1128,7 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo
return;
}
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, bgName, arenatype, q_min_level, q_max_level, qPlayers, playersNeed);
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, bgName.c_str(), arenatype.c_str(), q_min_level, q_max_level, qPlayers, playersNeed);
}
}
else
@@ -1147,7 +1147,7 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo
switch (announcementDetail)
{
case 3:
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName, ArenaType, ArenaType, ArenaTeamRating);
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating);
break;
case 2:
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN_NAME, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName, ArenaType, ArenaType);
@@ -1187,7 +1187,7 @@ void BattlegroundQueue::SendExitMessageArenaQueue(GroupQueueInfo* ginfo)
switch (announcementDetail)
{
case 3:
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName, ArenaType, ArenaType, ArenaTeamRating);
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME_RATING, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName.c_str(), ArenaType, ArenaType, ArenaTeamRating);
break;
case 2:
ChatHandler(nullptr).SendWorldTextOptional(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT_NAME, ANNOUNCER_FLAG_DISABLE_ARENA_QUEUE, TeamName, ArenaType, ArenaType);

View File

@@ -2366,7 +2366,7 @@ void Aura::LoadScripts()
m_loadedScripts.erase(bitr);
continue;
}
LOG_DEBUG("spells.aura", "Aura::LoadScripts: Script `{}` for aura `{}` is loaded now", (*itr)->_GetScriptName(), m_spellInfo->Id);
LOG_DEBUG("spells.aura", "Aura::LoadScripts: Script `{}` for aura `{}` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
(*itr)->Register();
++itr;
}

View File

@@ -8493,7 +8493,7 @@ void Spell::LoadScripts()
m_loadedScripts.erase(bitr);
continue;
}
LOG_DEBUG("spells.aura", "Spell::LoadScripts: Script `{}` for spell `{}` is loaded now", (*itr)->_GetScriptName(), m_spellInfo->Id);
LOG_DEBUG("spells.aura", "Spell::LoadScripts: Script `{}` for spell `{}` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
(*itr)->Register();
++itr;
}

View File

@@ -25,7 +25,7 @@ bool _SpellScript::_Validate(SpellInfo const* entry)
{
if (!Validate(entry))
{
LOG_ERROR("scripts.spells", "_SpellScript::_Validate: Spell `{}` did not pass Validate() function of script `{}` - script will not be added to the spell", entry->Id, m_scriptName);
LOG_ERROR("scripts.spells", "_SpellScript::_Validate: Spell `{}` did not pass Validate() function of script `{}` - script will not be added to the spell", entry->Id, m_scriptName->c_str());
return false;
}
return true;
@@ -317,31 +317,31 @@ bool SpellScript::_Validate(SpellInfo const* entry)
{
for (std::list<EffectHandler>::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectLaunchTarget.begin(); itr != OnEffectLaunchTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectHit.begin(); itr != OnEffectHit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectHandler>::iterator itr = OnEffectHitTarget.begin(); itr != OnEffectHitTarget.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<ObjectAreaTargetSelectHandler>::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<ObjectTargetSelectHandler>::iterator itr = OnObjectTargetSelect.begin(); itr != OnObjectTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<DestinationTargetSelectHandler>::iterator itr = OnDestinationTargetSelect.begin(); itr != OnDestinationTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
@@ -449,7 +449,7 @@ Unit* SpellScript::GetHitUnit()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->unitTarget;
@@ -459,7 +459,7 @@ Creature* SpellScript::GetHitCreature()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
if (m_spell->unitTarget)
@@ -472,7 +472,7 @@ Player* SpellScript::GetHitPlayer()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
if (m_spell->unitTarget)
@@ -485,7 +485,7 @@ Item* SpellScript::GetHitItem()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->itemTarget;
@@ -495,7 +495,7 @@ GameObject* SpellScript::GetHitGObj()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->gameObjTarget;
@@ -505,7 +505,7 @@ WorldLocation* SpellScript::GetHitDest()
{
if (!IsInEffectHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
return m_spell->destTarget;
@@ -515,7 +515,7 @@ int32 SpellScript::GetHitDamage()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->m_damage;
@@ -525,7 +525,7 @@ void SpellScript::SetHitDamage(int32 damage)
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_damage = damage;
@@ -535,7 +535,7 @@ int32 SpellScript::GetHitHeal()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->m_healing;
@@ -545,7 +545,7 @@ void SpellScript::SetHitHeal(int32 heal)
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->m_healing = heal;
@@ -555,7 +555,7 @@ Aura* SpellScript::GetHitAura()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return nullptr;
}
if (!m_spell->m_spellAura)
@@ -569,7 +569,7 @@ void SpellScript::PreventHitAura()
{
if (!IsInTargetHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
if (m_spell->m_spellAura)
@@ -580,7 +580,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_hitPreventEffectMask |= 1 << effIndex;
@@ -591,7 +591,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
{
if (!IsInHitPhase() && !IsInEffectHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_hitPreventDefaultEffectMask |= 1 << effIndex;
@@ -601,7 +601,7 @@ int32 SpellScript::GetEffectValue() const
{
if (!IsInEffectHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return 0;
}
return m_spell->damage;
@@ -611,7 +611,7 @@ void SpellScript::SetEffectValue(int32 value)
{
if (!IsInEffectHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
m_spell->damage = value;
@@ -647,7 +647,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
{
if (!IsInCheckCastHook())
{
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
return;
}
@@ -663,99 +663,99 @@ bool AuraScript::_Validate(SpellInfo const* entry)
{
for (std::list<CheckAreaTargetHandler>::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr)
if (!entry->HasAreaAuraEffect() && !entry->HasEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectPeriodicHandler>::iterator itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectUpdatePeriodicHandler>::iterator itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectCalcAmountHandler>::iterator itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectCalcPeriodicHandler>::iterator itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectCalcSpellModHandler>::iterator itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectAbsorbHandler>::iterator itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectAbsorbHandler>::iterator itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectManaShieldHandler>::iterator itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectManaShieldHandler>::iterator itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectSplitHandler>::iterator itr = OnEffectSplit.begin(); itr != OnEffectSplit.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<CheckProcHandler>::iterator itr = DoCheckProc.begin(); itr != DoCheckProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AfterCheckProcHandler>::iterator itr = DoAfterCheckProc.begin(); itr != DoAfterCheckProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoAfterCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoAfterCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraProcHandler>::iterator itr = DoPrepareProc.begin(); itr != DoPrepareProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraProcHandler>::iterator itr = OnProc.begin(); itr != OnProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<AuraProcHandler>::iterator itr = AfterProc.begin(); itr != AfterProc.end(); ++itr)
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
for (std::list<EffectProcHandler>::iterator itr = OnEffectProc.begin(); itr != OnEffectProc.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
for (std::list<EffectProcHandler>::iterator itr = AfterEffectProc.begin(); itr != AfterEffectProc.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName);
LOG_ERROR("spells.scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString(), m_scriptName->c_str());
return _SpellScript::_Validate(entry);
}
@@ -997,7 +997,7 @@ void AuraScript::PreventDefaultAction()
m_defaultActionPrevented = true;
break;
default:
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
break;
}
}
@@ -1185,7 +1185,7 @@ Unit* AuraScript::GetTarget() const
case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
return m_auraApplication->GetTarget();
default:
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName, m_scriptSpellId);
LOG_ERROR("spells.scripts", "Script: `{}` Spell: `{}` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
}
return nullptr;

View File

@@ -407,7 +407,7 @@ void TicketMgr::ShowList(ChatHandler& handler, bool onlineOnly) const
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end(); ++itr)
if (!itr->second->IsClosed() && !itr->second->IsCompleted())
if (!onlineOnly || itr->second->GetPlayer())
handler.SendSysMessage(itr->second->FormatMessageString(handler));
handler.SendSysMessage(itr->second->FormatMessageString(handler).c_str());
}
void TicketMgr::ShowClosedList(ChatHandler& handler) const
@@ -415,7 +415,7 @@ void TicketMgr::ShowClosedList(ChatHandler& handler) const
handler.SendSysMessage(LANG_COMMAND_TICKETSHOWCLOSEDLIST);
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end(); ++itr)
if (itr->second->IsClosed())
handler.SendSysMessage(itr->second->FormatMessageString(handler));
handler.SendSysMessage(itr->second->FormatMessageString(handler).c_str());
}
void TicketMgr::ShowEscalatedList(ChatHandler& handler) const
@@ -423,7 +423,7 @@ void TicketMgr::ShowEscalatedList(ChatHandler& handler) const
handler.SendSysMessage(LANG_COMMAND_TICKETSHOWESCALATEDLIST);
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end(); ++itr)
if (!itr->second->IsClosed() && itr->second->GetEscalatedStatus() == TICKET_IN_ESCALATION_QUEUE)
handler.SendSysMessage(itr->second->FormatMessageString(handler));
handler.SendSysMessage(itr->second->FormatMessageString(handler).c_str());
}
void TicketMgr::SendTicket(WorldSession* session, GmTicket* ticket) const

View File

@@ -37,7 +37,7 @@ bool Acore::PlayerCommand::HandleLearnSpellCommand(ChatHandler* handler, Player*
}
else
{
handler->SendErrorMessage(LANG_TARGET_KNOWN_SPELL, handler->GetNameLink(targetPlayer));
handler->SendErrorMessage(LANG_TARGET_KNOWN_SPELL, handler->GetNameLink(targetPlayer).c_str());
}
return false;

View File

@@ -164,7 +164,7 @@ public:
}
// new suggestion, or no token specified, output TOTP parameters
handler->SendErrorMessage(LANG_2FA_SECRET_SUGGESTION, Acore::Encoding::Base32::Encode(pair.first->second));
handler->SendErrorMessage(LANG_2FA_SECRET_SUGGESTION, Acore::Encoding::Base32::Encode(pair.first->second).c_str());
return false;
}
@@ -328,14 +328,14 @@ public:
std::string accountName = account;
if (!Utf8ToUpperOnlyLatin(accountName))
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
return false;
}
uint32 accountId = AccountMgr::GetId(accountName);
if (!accountId)
{
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
return false;
}
@@ -352,13 +352,13 @@ public:
handler->PSendSysMessage(LANG_ACCOUNT_DELETED, accountName);
break;
case AOR_NAME_NOT_EXIST:
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName);
handler->SendErrorMessage(LANG_ACCOUNT_NOT_EXIST, accountName.c_str());
return false;
case AOR_DB_INTERNAL_ERROR:
handler->SendErrorMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR, accountName);
handler->SendErrorMessage(LANG_ACCOUNT_NOT_DELETED_SQL_ERROR, accountName.c_str());
return false;
default:
handler->SendErrorMessage(LANG_ACCOUNT_NOT_DELETED, accountName);
handler->SendErrorMessage(LANG_ACCOUNT_NOT_DELETED, accountName.c_str());
return false;
}

View File

@@ -148,7 +148,7 @@ public:
str << " items from your bags.";
handler->SendSysMessage(str.str());
handler->SendSysMessage(str.str().c_str());
return true;
};

View File

@@ -444,7 +444,7 @@ public:
if (banResult)
{
Field* fields2 = banResult->Fetch();
handler->PSendSysMessage("{}", fields2[0].Get<std::string>());
handler->PSendSysMessage("%s", fields2[0].Get<std::string>());
}
} while (result->NextRow());
}
@@ -480,14 +480,14 @@ public:
if (fields2[0].Get<uint32>() == fields2[1].Get<uint32>())
{
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}| permanent |%-15.15s|%-15.15s|",
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
}
else
{
tm tmUnban = Acore::Time::TimeBreakdown(fields2[1].Get<uint32>());
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}|{:02}-{:02}-{:02} {:02}:{:02}|%-15.15s|%-15.15s|",
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
accountName, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
fields2[2].Get<std::string>(), fields2[3].Get<std::string>());
@@ -534,7 +534,7 @@ public:
PreparedQueryResult banResult = CharacterDatabase.Query(stmt2);
if (banResult)
handler->PSendSysMessage("{}", (*banResult)[0].Get<std::string>());
handler->PSendSysMessage("%s", (*banResult)[0].Get<std::string>());
} while (result->NextRow());
}
// Console wide output
@@ -564,14 +564,14 @@ public:
if (banFields[0].Get<uint32>() == banFields[1].Get<uint32>())
{
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}| permanent |%-15.15s|%-15.15s|",
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
}
else
{
tm tmUnban = Acore::Time::TimeBreakdown(banFields[1].Get<uint32>());
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}|{:02}-{:02}-{:02} {:02}:{:02}|%-15.15s|%-15.15s|",
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
char_name, tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
banFields[2].Get<std::string>(), banFields[3].Get<std::string>());
@@ -621,7 +621,7 @@ public:
do
{
Field* fields = result->Fetch();
handler->PSendSysMessage("{}", fields[0].Get<std::string>());
handler->PSendSysMessage("%s", fields[0].Get<std::string>());
} while (result->NextRow());
}
// Console wide output
@@ -637,14 +637,14 @@ public:
tm tmBan = Acore::Time::TimeBreakdown(fields[1].Get<uint32>());
if (fields[1].Get<uint32>() == fields[2].Get<uint32>())
{
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}| permanent |%-15.15s|%-15.15s|",
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d| permanent |%-15.15s|%-15.15s|",
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
fields[3].Get<std::string>(), fields[4].Get<std::string>());
}
else
{
tm tmUnban = Acore::Time::TimeBreakdown(fields[2].Get<uint32>());
handler->PSendSysMessage("|%-15.15s|{:02}-{:02}-{:02} {:02}:{:02}|{:02}-{:02}-{:02} {:02}:{:02}|%-15.15s|%-15.15s|",
handler->PSendSysMessage("|%-15.15s|%02d-%02d-%02d %02d:%02d|%02d-%02d-%02d %02d:%02d|%-15.15s|%-15.15s|",
fields[0].Get<std::string>(), tmBan.tm_year % 100, tmBan.tm_mon + 1, tmBan.tm_mday, tmBan.tm_hour, tmBan.tm_min,
tmUnban.tm_year % 100, tmUnban.tm_mon + 1, tmUnban.tm_mday, tmUnban.tm_hour, tmUnban.tm_min,
fields[3].Get<std::string>(), fields[4].Get<std::string>());

View File

@@ -570,7 +570,7 @@ public:
if (faction.Flags & FACTION_FLAG_INACTIVE)
ss << handler->GetAcoreString(LANG_FACTION_INACTIVE);
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
}
return true;

View File

@@ -535,7 +535,7 @@ public:
if (!listQueue && !checkAll)
{
itemState = "The player has the following " + itemState + " items: ";
handler->SendSysMessage(itemState);
handler->SendSysMessage(itemState.c_str());
for (uint8 i = PLAYER_SLOT_START; i < PLAYER_SLOT_END; ++i)
{
if (i >= BUYBACK_SLOT_START && i < BUYBACK_SLOT_END)
@@ -941,7 +941,7 @@ public:
while (ss.str().size() < 128000)
ss << "This is a dummy string to push the packet's size beyond 128000 bytes. ";
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
return true;
}

View File

@@ -173,7 +173,7 @@ public:
str << ".";
handler->SendSysMessage(str.str());
handler->SendSysMessage(str.str().c_str());
return true;
}

View File

@@ -153,7 +153,7 @@ public:
ss << areaEntry->ID << " - " << name << ' ' << localeNames[locale];
}
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
if (!found)
{
@@ -455,7 +455,7 @@ public:
ss << handler->GetAcoreString(LANG_FACTION_NOREPUTATION);
}
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
if (!found)
{
@@ -1147,7 +1147,7 @@ public:
ss << handler->GetAcoreString(LANG_ACTIVE);
}
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
if (!found)
{
@@ -1262,7 +1262,7 @@ public:
ss << handler->GetAcoreString(LANG_ACTIVE);
}
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
if (!found)
{
@@ -1587,7 +1587,7 @@ public:
break;
}
handler->SendSysMessage(ss.str());
handler->SendSysMessage(ss.str().c_str());
++counter;
}

View File

@@ -170,12 +170,12 @@ public:
if (Player* player = ObjectAccessor::FindPlayerByName(*playerNameArg))
{
handler->GetSession()->GetPlayer()->RemoveFromWhisperWhiteList(player->GetGUID());
handler->PSendSysMessage(LANG_COMMAND_WHISPEROFFPLAYER, playerNameArg);
handler->PSendSysMessage(LANG_COMMAND_WHISPEROFFPLAYER, playerNameArg->c_str());
return true;
}
else
{
handler->SendErrorMessage(LANG_PLAYER_NOT_FOUND, playerNameArg);
handler->SendErrorMessage(LANG_PLAYER_NOT_FOUND, playerNameArg->c_str());
return false;
}
}

View File

@@ -627,7 +627,7 @@ public:
if (object->GetTransport())
{
handler->PSendSysMessage("Transport offset: {0:.2f}, {0:.2f}, {0:.2f}, {0:.2f}", object->m_movementInfo.transport.pos.GetPositionX(), object->m_movementInfo.transport.pos.GetPositionY(), object->m_movementInfo.transport.pos.GetPositionZ(), object->m_movementInfo.transport.pos.GetOrientation());
handler->PSendSysMessage("Transport offset: %.2f, %.2f, %.2f, %.2f", object->m_movementInfo.transport.pos.GetPositionX(), object->m_movementInfo.transport.pos.GetPositionY(), object->m_movementInfo.transport.pos.GetPositionZ(), object->m_movementInfo.transport.pos.GetOrientation());
}
return true;

View File

@@ -217,7 +217,7 @@ public:
static bool HandleMmapStatsCommand(ChatHandler* handler)
{
handler->PSendSysMessage("mmap stats:");
//handler->PSendSysMessage(" global mmap pathfinding is {}abled", DisableMgr::IsPathfindingEnabled(mapId) ? "en" : "dis");
//handler->PSendSysMessage(" global mmap pathfinding is %sabled", DisableMgr::IsPathfindingEnabled(mapId) ? "en" : "dis");
MMAP::MMapMgr* manager = MMAP::MMapFactory::createOrGetMMapMgr();
handler->PSendSysMessage(" {} maps loaded with {} tiles overall", manager->getLoadedMapsCount(), manager->getLoadedTilesCount());

View File

@@ -409,7 +409,7 @@ public:
if (player->IsInFlight() && checkInFlight)
{
handler->SendErrorMessage(LANG_CHAR_IN_FLIGHT, handler->GetNameLink(player));
handler->SendErrorMessage(LANG_CHAR_IN_FLIGHT, handler->GetNameLink(player).c_str());
return false;
}
}
@@ -799,7 +799,7 @@ public:
if (r >= MAX_REPUTATION_RANK)
{
handler->SendErrorMessage(LANG_COMMAND_FACTION_INVPARAM, rankStr);
handler->SendErrorMessage(LANG_COMMAND_FACTION_INVPARAM, rankStr.c_str());
return false;
}
}

View File

@@ -796,7 +796,7 @@ public:
if (!sCreatureDisplayInfoStore.LookupEntry(displayId))
{
handler->SendErrorMessage(LANG_COMMAND_FACTION_INVPARAM, Acore::ToString(displayId));
handler->SendErrorMessage(LANG_COMMAND_FACTION_INVPARAM, Acore::ToString(displayId).c_str());
return false;
}
@@ -1086,7 +1086,7 @@ public:
if (/*creature->GetMotionMaster()->empty() ||*/
creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE)
{
handler->SendErrorMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName());
handler->SendErrorMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName().c_str());
return false;
}
@@ -1094,7 +1094,7 @@ public:
if (mgen->GetTarget() != player)
{
handler->SendErrorMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName());
handler->SendErrorMessage(LANG_CREATURE_NOT_FOLLOW_YOU, creature->GetName().c_str());
return false;
}
@@ -1259,7 +1259,7 @@ public:
if (!sObjectMgr->SetCreatureLinkedRespawn(creature->GetSpawnId(), linkguid))
{
handler->SendErrorMessage("Selected creature can't link with guid '{}'", linkguid);
handler->SendErrorMessage("Selected creature can't link with guid '%u'", linkguid);
return false;
}

View File

@@ -81,7 +81,7 @@ public:
{
if (player->IsActiveQuest(entry))
{
handler->SendErrorMessage(LANG_COMMAND_QUEST_ACTIVE, quest->GetTitle(), entry);
handler->SendErrorMessage(LANG_COMMAND_QUEST_ACTIVE, quest->GetTitle().c_str(), entry);
return false;
}
@@ -98,7 +98,7 @@ public:
if (result)
{
handler->SendErrorMessage(LANG_COMMAND_QUEST_ACTIVE, quest->GetTitle(), entry);
handler->SendErrorMessage(LANG_COMMAND_QUEST_ACTIVE, quest->GetTitle().c_str(), entry);
return false;
}

View File

@@ -130,7 +130,7 @@ public:
if (target->IsBeingTeleported())
{
handler->SendErrorMessage(LANG_IS_TELEPORTED, chrNameLink);
handler->SendErrorMessage(LANG_IS_TELEPORTED, chrNameLink.c_str());
return false;
}
@@ -233,7 +233,7 @@ public:
Group* grp = target->GetGroup();
if (!grp)
{
handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink);
handler->SendErrorMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
return false;
}
@@ -256,7 +256,7 @@ public:
continue;
}
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink, "", tele->name);
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name);
if (handler->needReportToTarget(player))
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink);