diff options
| author | Nay <dnpd.dd@gmail.com> | 2011-07-04 14:46:48 +0100 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2011-07-04 14:46:48 +0100 |
| commit | d6782fa826508920f8de22709a32e83611bfdffe (patch) | |
| tree | 21cdf6632f528ad247ef9fd01069d4adeb3c835f /src/server/game/Server | |
| parent | 40b17fd862f46193930ea647c926abe14a21db38 (diff) | |
Core/Misc: Refactor SendPlaySpellVisual and SendPlaySpellImpact and move them to Unit (from Spell)
Diffstat (limited to 'src/server/game/Server')
| -rwxr-xr-x | src/server/game/Server/Protocol/Handlers/NPCHandler.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index cbe9896065a..3332632d25e 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -279,16 +279,9 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data) return; _player->ModifyMoney(-int32(nSpellCost)); - - WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer - data << uint64(guid); - data << uint32(0xB3); // index from SpellVisualKit.dbc - SendPacket(&data); - - data.Initialize(SMSG_PLAY_SPELL_IMPACT, 12); // visual effect on player - data << uint64(_player->GetGUID()); - data << uint32(0x016A); // index from SpellVisualKit.dbc - SendPacket(&data); + + unit->SendPlaySpellVisual(179); // 53 SpellCastDirected + unit->SendPlaySpellImpact(_player->GetGUID(), 362); // 113 EmoteSalute // learn explicitly or cast explicitly if (trainer_spell->IsCastable()) @@ -296,7 +289,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data) else _player->learnSpell(spellId, false); - data.Initialize(SMSG_TRAINER_BUY_SUCCEEDED, 12); + WorldPacket data(SMSG_TRAINER_BUY_SUCCEEDED, 12); data << uint64(guid); data << uint32(spellId); // should be same as in packet from client SendPacket(&data); |
