1988 {
1991 {
1992 Position p = {4356.77f, 2971.90f, 360.52f, M_PI / 2};
1994 {
1995 bool hasTarget = false;
1996 Unit* target =
nullptr;
1997 if ((target = l->SelectNearestTarget(20.0f)))
1998 hasTarget = true;
1999 else
2000 {
2001 target = l->SelectNearestTarget(120.0f);
2003 }
2004 l->AI()->Talk(0);
2005 l->AI()->AttackStart(target);
2006 l->AddThreat(target, 1.0f);
2007 for (
uint8 i = 0; i < 5; ++i)
2008 {
2012 l->MovePosition(pos, dist, angle);
2014 {
2015 c->AI()->AttackStart(l->GetVictim());
2016 c->AddThreat(l->GetVictim(), 1.0f);
2017 if (!hasTarget)
2018 c->GetMotionMaster()->MoveJump(c->GetPositionX(), c->GetPositionY() + 55.0f, c->GetPositionZ(), 20.0f, 6.0f);
2019 }
2020 }
2021 }
2022 }
2023 }
constexpr auto IN_MILLISECONDS
Definition: Common.h:53
constexpr auto MINUTE
Definition: Common.h:47
double rand_norm()
Definition: Random.cpp:77
std::uint8_t uint8
Definition: Define.h:109
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:48
@ NPC_VENGEFUL_FLESHREAPER
Definition: icecrown_citadel.h:377
Definition: Creature.h:46
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
Definition: Position.h:28
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
Definition: InstanceScript.h:142
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=0)
Definition: MotionMaster.h:227
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:590
Unit * GetCaster()
Definition: SpellScript.cpp:401