diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 26a489f12..514f0c402 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -115,14 +115,20 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) if (pet->getVictim()) pet->AttackStop(); - if(pet->GetTypeId() != TYPEID_PLAYER) + if (pet->hasUnitState(UNIT_STAT_CONTROLLED)) + { + pet->Attack(TargetUnit, true); + pet->SendPetAIReaction(guid1); + } + else { pet->GetMotionMaster()->Clear(); + if (((Creature*)pet)->AI()) ((Creature*)pet)->AI()->AttackStart(TargetUnit); - //10% chance to play special pet attack talk, else growl - if(((Creature*)pet)->isPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10) + // 10% chance to play special pet attack talk, else growl + if(((Creature*)pet)->isPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && roll_chance_i(10)) pet->SendPetTalk((uint32)PET_TALK_ATTACK); else { @@ -130,11 +136,6 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data ) pet->SendPetAIReaction(guid1); } } - else // charmed player - { - pet->Attack(TargetUnit,true); - pet->SendPetAIReaction(guid1); - } } break; } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index c092eef8b..23aea9e4d 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1776,7 +1776,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) } case 64385: // Spinning (from Unusual Compass) { - m_caster->SetFacingTo(frand(0, M_PI*2), true); + m_caster->SetFacingTo(frand(0, M_PI_F*2), true); return; } case 67019: // Flask of the North diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index e2a402bad..2ae0fe63b 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10560" + #define REVISION_NR "10561" #endif // __REVISION_NR_H__