*Fix some bugs of pet.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-27 22:47:28 -06:00
parent d0a58f705f
commit ff83e4a9b1
18 changed files with 260 additions and 182 deletions

View File

@@ -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();