Core/Pets: Fix crash with Shadowfiend. Closes #7803
This commit is contained in:
@@ -136,7 +136,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
||||
}
|
||||
}
|
||||
else if (owner && !me->HasUnitState(UNIT_STATE_FOLLOW)) // no charm info and no victim
|
||||
HandleReturnMovement();
|
||||
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle());
|
||||
|
||||
if (!me->GetCharmInfo())
|
||||
return;
|
||||
|
||||
@@ -25252,7 +25252,7 @@ void Player::SendClearAllCooldowns(Unit* target)
|
||||
{
|
||||
uint32 spellCount = m_spellCooldowns.size();
|
||||
ObjectGuid guid = target ? target->GetGUID() : 0;
|
||||
|
||||
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWNS, 4+8);
|
||||
data.WriteBit(guid[1]);
|
||||
data.WriteBit(guid[3]);
|
||||
@@ -25263,9 +25263,9 @@ void Player::SendClearAllCooldowns(Unit* target)
|
||||
data.WriteBit(guid[2]);
|
||||
data.WriteBit(guid[4]);
|
||||
data.WriteBit(guid[0]);
|
||||
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
|
||||
data.WriteByteSeq(guid[7]);
|
||||
data.WriteByteSeq(guid[2]);
|
||||
data.WriteByteSeq(guid[4]);
|
||||
@@ -25274,10 +25274,10 @@ void Player::SendClearAllCooldowns(Unit* target)
|
||||
data.WriteByteSeq(guid[3]);
|
||||
for (SpellCooldowns::const_iterator itr = m_spellCooldowns.begin(); itr != m_spellCooldowns.end(); ++itr)
|
||||
data << uint32(itr->first); // Spell ID
|
||||
|
||||
|
||||
data.WriteByteSeq(guid[0]);
|
||||
data.WriteByteSeq(guid[6]);
|
||||
|
||||
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user