298 {
301 {
302 if (aurEff->GetTickNumber() < 30)
303 {
304 float diff = (2 * M_PI) / (4 * 30);
305 float newOrientation = target->GetOrientation() + diff *
dir;
306 if (newOrientation >= 2 * M_PI)
307 newOrientation -= 2 * M_PI;
308 else if (newOrientation < 0)
309 newOrientation += 2 * M_PI;
310 target->UpdateOrientation(newOrientation);
311 target->SetFacingTo(newOrientation);
313 }
314 else if (aurEff->GetTickNumber() == 33)
315 {
317 target->DisableRotate(false);
318 if (target->IsCreature())
320 if (target->GetVictim())
321 {
323 target->GetMotionMaster()->MoveChase(target->GetVictim());
324 }
325 }
326 else if (aurEff->GetTickNumber() >= 34)
328 }
329 }
@ AURA_REMOVE_BY_EXPIRE
Definition SpellAuraDefines.h:395
@ UNIT_STATE_ROOT
Definition UnitDefines.h:183
@ REACT_AGGRESSIVE
Definition Unit.h:568
@ UNIT_FIELD_TARGET
Definition UpdateFields.h:92
@ SPELL_WAILING_SOULS_DMG_N
Definition boss_devourer_of_souls.cpp:56
void PreventDefaultAction()
Definition SpellScript.cpp:1000
Unit * GetTarget() const
Definition SpellScript.cpp:1180
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition SpellScript.cpp:1055
int8 dir
Definition boss_devourer_of_souls.cpp:289