本文整理汇总了C++中Position::HasInArc方法的典型用法代码示例。如果您正苦于以下问题:C++ Position::HasInArc方法的具体用法?C++ Position::HasInArc怎么用?C++ Position::HasInArc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Position
的用法示例。
在下文中一共展示了Position::HasInArc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_CHECK_ROOM_POSITION:
{
if (me->GetExactDist2dSq(RoomCenter[0], RoomCenter[1]) > 1500.0f || !BoosSP.HasInArc(M_PI, me))
{
BossAI::EnterEvadeMode();
return;
}
events.ScheduleEvent(EVENT_CHECK_ROOM_POSITION, 1000);
}
break;
case EVENT_VENOMOUS_EFFUSION:
VenomousEffusion();
break;
case EVENT_REMOVE_EFFUSION_VISUAL:
{
for (int i = 0; i < 2; ++i)
if (Creature* totem = ObjectAccessor::GetCreature(*me, TotemGUID[i]))
totem->CastStop();
}
break;
case EVENT_WHISPERS_OF_HETHISS:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
me->CastSpell(target, 96466, false);
events.ScheduleEvent(EVENT_WHISPERS_OF_HETHISS, urand(10000, 20000));
}
break;
case EVENT_TOXIC_LINK:
Talk(SAY_TOXIC_LINK);
me->CastSpell((Unit*)NULL, 96475, false);
events.ScheduleEvent(EVENT_TOXIC_LINK, 10000);
break;
case EVENT_BLESSING_OF_THE_SNAKE_GOD:
Talk(SAY_TRANSFROM);
me->CastSpell(me, 96602, false);
me->CastSpell(me, 97354, false);
events.Reset();
events.ScheduleEvent(EVENT_POOL_OF_ACRID_TEARS, urand(3000, 7000));
events.ScheduleEvent(EVENT_BREATH_OF_HETHISS, urand(4000, 8000));
events.ScheduleEvent(EVENT_TRANSFORM_REMOVAL_PRIMER, 30000);
events.ScheduleEvent(EVENT_CHECK_ROOM_POSITION, 1000);
break;
case EVENT_POOL_OF_ACRID_TEARS:
{
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 100.0f, true))
me->CastSpell(target, 96515, false);
events.ScheduleEvent(EVENT_POOL_OF_ACRID_TEARS, urand(3000, 7000));
}
break;
case EVENT_BREATH_OF_HETHISS:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 15.0f, true))
{
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
me->StopMoving();
me->SetFacingTo(me->GetAngle(target));
events.ScheduleEvent(EVENT_RETURN_TO_FIGHT, 3000);
}
me->CastSpell(me, 96509, false);
events.ScheduleEvent(EVENT_BREATH_OF_HETHISS, urand(5000, 10000));
}
break;
case EVENT_RETURN_TO_FIGHT:
me->SetReactState(REACT_AGGRESSIVE);
break;
case EVENT_TRANSFORM_REMOVAL_PRIMER:
me->CastSpell(me, 96617, false);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
me->GetMotionMaster()->MoveTargetedHome();
events.Reset();
break;
case EVENT_VENOM_WITHDRAWAL:
{
for (SummonList::iterator itr = summons.begin(); itr != summons.end(); )
{
if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
{
summon->CastStop();
summon->RemoveAllAuras();
summon->DespawnOrUnsummon(2000);
//.........这里部分代码省略.........