diff options
author | megamage <none@none> | 2009-03-27 22:47:28 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-27 22:47:28 -0600 |
commit | ff83e4a9b13594be4a682da535c9522c9f9de186 (patch) | |
tree | b948e5d4508f23b9c99335d4a92475d9d1f6aea1 /src/game/SpellHandler.cpp | |
parent | d0a58f705f34a6831a242977b0059a03dba8b5a6 (diff) |
*Fix some bugs of pet.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r-- | src/game/SpellHandler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 2fd5384d03e..c43bd1c45c9 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -369,7 +369,7 @@ void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket) return; } - if(pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm()) + if(pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharm()) { sLog.outError( "HandlePetCancelAura.Pet %u isn't pet of player %s", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() ); return; @@ -417,13 +417,14 @@ void WorldSession::HandleTotemDestroy( WorldPacket& recvPacket) recvPacket >> slotId; - if (slotId >= MAX_TOTEM) + ++slotId; + if (slotId >= MAX_TOTEM_SLOT) return; - if(!_player->m_TotemSlot[slotId]) + if(!_player->m_SummonSlot[slotId]) return; - Creature* totem = ObjectAccessor::GetCreature(*_player,_player->m_TotemSlot[slotId]); + Creature* totem = ObjectAccessor::GetCreature(*_player,_player->m_SummonSlot[slotId]); // Don't unsummon sentry totem if(totem && totem->isTotem() && totem->GetEntry() != SENTRY_TOTEM_ENTRY) ((Totem*)totem)->UnSummon(); |