328 {
331 {
332 if (aurEff->GetTickNumber() < 30)
333 {
334
335 float diff = (2 * M_PI) / (4 * 30);
336 float new_o = t->GetOrientation() + diff *
dir;
337 if (new_o >= 2 * M_PI)
338 new_o -= 2 * M_PI;
339 else if (new_o < 0)
340 new_o += 2 * M_PI;
341 t->UpdateOrientation(new_o);
342 t->SetFacingTo(new_o);
344 }
345 else if (aurEff->GetTickNumber() == 33)
346 {
348 t->DisableRotate(false);
351 if (t->GetVictim())
352 {
354 t->GetMotionMaster()->MoveChase(t->GetVictim());
355 }
356 }
357 else if (aurEff->GetTickNumber() >= 34)
359 }
360 }
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ UNIT_FIELD_TARGET
Definition: UpdateFields.h:92
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ UNIT_STATE_ROOT
Definition: Unit.h:335
@ AURA_REMOVE_BY_EXPIRE
Definition: SpellAuraDefines.h:395
@ SPELL_WAILING_SOULS_DMG_N
Definition: boss_devourer_of_souls.cpp:55
void PreventDefaultAction()
Definition: SpellScript.cpp:985
void Remove(uint32 removeMode=0)
Definition: SpellScript.cpp:1040
Unit * GetTarget() const
Definition: SpellScript.cpp:1165
int8 dir
Definition: boss_devourer_of_souls.cpp:319