mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[7169] Fixed use castable trainer spells (some from its explictly self-castable).
This commit is contained in:
parent
4dc06d6d9e
commit
f88696d31d
2 changed files with 11 additions and 13 deletions
|
|
@ -240,24 +240,22 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
_player->ModifyMoney( -int32(nSpellCost) );
|
_player->ModifyMoney( -int32(nSpellCost) );
|
||||||
|
|
||||||
|
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer
|
||||||
|
data << uint64(guid) << uint32(0xB3);
|
||||||
|
SendPacket(&data);
|
||||||
|
|
||||||
|
data.Initialize(SMSG_PLAY_SPELL_IMPACT, 12); // visual effect on player
|
||||||
|
data << uint64(_player->GetGUID()) << uint32(0x016A);
|
||||||
|
SendPacket(&data);
|
||||||
|
|
||||||
// learn explicitly or cast explicitly
|
// learn explicitly or cast explicitly
|
||||||
if(trainer_spell->IsCastable ())
|
if(trainer_spell->IsCastable ())
|
||||||
//FIXME: prof. spell entry in trainer list not marked gray until list re-open.
|
//FIXME: prof. spell entry in trainer list not marked gray until list re-open.
|
||||||
unit->CastSpell(_player,trainer_spell->spell,true);
|
_player->CastSpell(_player,trainer_spell->spell,true);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer
|
|
||||||
data << uint64(guid) << uint32(0xB3);
|
|
||||||
SendPacket(&data);
|
|
||||||
|
|
||||||
data.Initialize(SMSG_PLAY_SPELL_IMPACT, 12); // visual effect on player
|
|
||||||
data << uint64(_player->GetGUID()) << uint32(0x016A);
|
|
||||||
SendPacket(&data);
|
|
||||||
|
|
||||||
_player->learnSpell(spellId,false);
|
_player->learnSpell(spellId,false);
|
||||||
}
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_TRAINER_BUY_SUCCEEDED, 12);
|
data.Initialize(SMSG_TRAINER_BUY_SUCCEEDED, 12);
|
||||||
data << uint64(guid) << uint32(trainer_spell->spell);
|
data << uint64(guid) << uint32(trainer_spell->spell);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7168"
|
#define REVISION_NR "7169"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue