本文整理汇总了C++中SummonList::GetCreatureWithEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ SummonList::GetCreatureWithEntry方法的具体用法?C++ SummonList::GetCreatureWithEntry怎么用?C++ SummonList::GetCreatureWithEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SummonList
的用法示例。
在下文中一共展示了SummonList::GetCreatureWithEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(uint32 diff)
{
events2.Update(diff);
switch (events2.ExecuteEvent())
{
case EVENT_AKAMA_START_ENCOUNTER:
me->RemoveAura(SPELL_STEALTH);
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(POINT_START, 517.4877f, 400.7993f, 112.7837f, false);
events2.ScheduleEvent(EVENT_AKAMA_START_CHANNEL, 11000);
break;
case EVENT_AKAMA_START_CHANNEL:
me->CastSpell(me, SPELL_AKAMA_SOUL_CHANNEL, false);
if (Creature* shade = ObjectAccessor::GetCreature(*me, instance->GetData64(NPC_SHADE_OF_AKAMA)))
{
shade->AI()->AttackStart(me);
shade->GetMotionMaster()->Clear();
shade->AI()->DoAction(ACTION_START_ENCOUNTER);
}
break;
case EVENT_AKAMA_SCENE0:
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(POINT_CHANNEL_SOUL, 467.0f, 400.7993f, 118.537f);
break;
case EVENT_AKAMA_SCENE1:
me->CastSpell(me, SPELL_AKAMA_SOUL_RETRIEVE, true);
break;
case EVENT_AKAMA_SCENE2:
Talk(SAY_BROKEN_FREE_0);
break;
case EVENT_AKAMA_SCENE3:
me->SummonCreatureGroup(SUMMON_GROUP_BROKENS);
break;
case EVENT_AKAMA_SCENE4:
Talk(SAY_BROKEN_FREE_1);
break;
case EVENT_AKAMA_SCENE5:
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
if (Creature* broken = ObjectAccessor::GetCreature(*me, *itr))
broken->SetStandState(UNIT_STAND_STATE_KNEEL);
Talk(SAY_BROKEN_FREE_2);
break;
case EVENT_AKAMA_SCENE6:
if (Creature* broken = summons.GetCreatureWithEntry(NPC_ASHTONGUE_BROKEN))
broken->AI()->Talk(SAY_BROKEN_S1);
break;
case EVENT_AKAMA_SCENE7:
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
if (Creature* broken = ObjectAccessor::GetCreature(*me, *itr))
broken->AI()->Talk(SAY_BROKEN_S2);
break;
}
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch (events.ExecuteEvent())
{
case EVENT_SPELL_CHAIN_LIGHTNING:
me->CastSpell(me->GetVictim(), SPELL_CHAIN_LIGHTNING, false);
events.ScheduleEvent(EVENT_SPELL_CHAIN_LIGHTNING, urand(10000, 15000));
break;
case EVENT_SPELL_DESTRUCTIVE_POISON:
me->CastSpell(me, SPELL_DESTRUCTIVE_POISON, false);
events.ScheduleEvent(EVENT_SPELL_DESTRUCTIVE_POISON, urand(4000, 5000));
break;
}
DoMeleeAttackIfReady();
}