Core/Chat Commands: add name of GM (or Console) into output of gmannounce command (and also fix typo from previous commit)

This commit is contained in:
Az@zel
2011-05-11 12:58:50 +06:00
parent 52bc1e5fd3
commit 574f55382a
4 changed files with 8 additions and 3 deletions
+5 -1
View File
@@ -78,7 +78,11 @@ bool ChatHandler::HandleGMAnnounceCommand(const char* args)
if (!*args)
return false;
sWorld->SendGMText(LANG_GM_BROADCAST, args);
std::string name("Console");
if (Player* _player = m_session->GetPlayer())
name = _player->GetName();
sWorld->SendGMText(LANG_GM_BROADCAST, name.c_str(), args);
return true;
}
@@ -748,7 +748,7 @@ class spell_shield_of_runes : public SpellScriptLoader
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
caster->CastSpell(caster, SPELL_SHIELD_OF_RUNES_BUFF, false);
}