mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
*Fix some bugs of pet.
--HG-- branch : trunk
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user