1989 {
1992 {
1993 Position p = {4356.77f, 2971.90f, 360.52f, M_PI / 2};
1995 {
1996 bool hasTarget = false;
1997 Unit* target =
nullptr;
1998 if ((target = l->SelectNearestTarget(20.0f)))
1999 hasTarget = true;
2000 else
2001 {
2002 target = l->SelectNearestTarget(120.0f);
2004 }
2005 l->AI()->Talk(0);
2006 l->AI()->AttackStart(target);
2007 l->AddThreat(target, 1.0f);
2008 for (
uint8 i = 0; i < 5; ++i)
2009 {
2013 l->MovePosition(pos, dist, angle);
2015 {
2016 c->AI()->AttackStart(l->GetVictim());
2017 c->AddThreat(l->GetVictim(), 1.0f);
2018 if (!hasTarget)
2019 c->GetMotionMaster()->MoveJump(c->GetPositionX(), c->GetPositionY() + 55.0f, c->GetPositionZ(), 20.0f, 6.0f);
2020 }
2021 }
2022 }
2023 }
2024 }
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
@ NPC_VENGEFUL_FLESHREAPER
Definition: icecrown_citadel.h:371
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: Object.h:49
Definition: Creature.h:43
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:2366
Definition: Position.h:27
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
Definition: InstanceScript.h:142
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=0)
Definition: MotionMaster.h:229
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:590
Unit * GetCaster()
Definition: SpellScript.cpp:401