本文整理汇总了C++中SummonList::HasEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ SummonList::HasEntry方法的具体用法?C++ SummonList::HasEntry怎么用?C++ SummonList::HasEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SummonList
的用法示例。
在下文中一共展示了SummonList::HasEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(uint32 diff)
{
// Some nice visuals
dropSludgeTimer += diff;
if (!me->IsInCombat() && dropSludgeTimer >= 5000)
{
if (me->IsWithinDist3d(3178, -3305, 319, 5.0f) && !summons.HasEntry(NPC_SEWAGE_SLIME))
me->CastSpell(3128.96f+irand(-20, 20), -3312.96f+irand(-20, 20), 293.25f, SPELL_BOMBARD_SLIME, false);
dropSludgeTimer = 0;
}
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch (events.GetEvent())
{
case EVENT_SPELL_POISON_CLOUD:
me->CastSpell(me, SPELL_POISON_CLOUD, true);
events.RepeatEvent(15000);
break;
case EVENT_SPELL_BERSERK:
me->CastSpell(me, SPELL_BERSERK, true);
events.PopEvent();
break;
case EVENT_SPELL_SLIME_SPRAY:
me->MonsterTextEmote("Grobbulus sprays slime across the room!", 0, true);
me->CastSpell(me->GetVictim(), RAID_MODE(SPELL_SLIME_SPRAY_10, SPELL_SLIME_SPRAY_25), false);
events.RepeatEvent(20000);
break;
case EVENT_SPELL_MUTATING_INJECTION:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_MUTATING_INJECTION))
me->CastSpell(target, SPELL_MUTATING_INJECTION, false);
events.RepeatEvent(8000 + uint32(120 * me->GetHealthPct()));
break;
}
DoMeleeAttackIfReady();
}