Core/Chat: Refactored building chat packets

* Moved everything into one specialized method instead of being scattered all over the place
* Allow localizing creature names in chat messages (when using $N)
* Send SMSG_GM_MESSAGECHAT for gm messages
This commit is contained in:
Shauren
2013-12-23 14:23:49 +01:00
parent 6402fa02ac
commit 107af52853
130 changed files with 766 additions and 934 deletions

View File

@@ -128,7 +128,7 @@ class example_creature : public CreatureScript
void EnterCombat(Unit* who) OVERRIDE
{
//Say some stuff
Talk(SAY_AGGRO, who->GetGUID());
Talk(SAY_AGGRO, who);
}
// *** HANDLED FUNCTION ***
@@ -236,7 +236,7 @@ class example_creature : public CreatureScript
if (m_uiBeserkTimer <= uiDiff)
{
//Say our line then cast uber death spell
Talk(SAY_BERSERK, me->GetVictim() ? me->GetVictim()->GetGUID() : 0);
Talk(SAY_BERSERK, me->GetVictim());
DoCastVictim(SPELL_BERSERK);
//Cast our beserk spell agian in 12 seconds if we didn't kill everyone