本文整理汇总了C++中SummonList类的典型用法代码示例。如果您正苦于以下问题:C++ SummonList类的具体用法?C++ SummonList怎么用?C++ SummonList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SummonList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summoned)
{
Summons.Despawn(summoned);
++KillCount;
}
示例2: JustDied
void JustDied(Unit* /*Killer*/)
{
DoScriptText(SAY_DEAD, me);
summons.DespawnAll();
}
示例3: JustSummoned
void JustSummoned(Creature* pSummoned) {
Summons.Summon(pSummoned);
}
示例4: EnterEvadeMode
void EnterEvadeMode()
{
summons.DespawnAll();
ScriptedAI::EnterEvadeMode();
}
示例5: JustSummoned
void JustSummoned(Creature* summon)
{
summons.Summon(summon);
}
示例6: Reset
void Reset()
{
summons.DespawnAll();
}
示例7: JustSummoned
void JustSummoned(Creature* summoned) override
{
Summons.Summon(summoned);
++KillCount;
}
示例8: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
switch (m_uiStage)
{
case 0:
if (m_uiFreezeSlashTimer <= uiDiff)
{
DoCastVictim(SPELL_FREEZE_SLASH);
m_uiFreezeSlashTimer = 15*IN_MILLISECONDS;
} else m_uiFreezeSlashTimer -= uiDiff;
if (m_uiPenetratingColdTimer <= uiDiff)
{
me->CastCustomSpell(SPELL_PENETRATING_COLD, SPELLVALUE_MAX_TARGETS, RAID_MODE(2, 5));
m_uiPenetratingColdTimer = 20*IN_MILLISECONDS;
} else m_uiPenetratingColdTimer -= uiDiff;
if (m_uiSummonNerubianTimer <= uiDiff && (IsHeroic() || !m_bReachedPhase3))
{
me->CastCustomSpell(SPELL_SUMMON_BURROWER, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 2, 2, 4));
m_uiSummonNerubianTimer = 45*IN_MILLISECONDS;
} else m_uiSummonNerubianTimer -= uiDiff;
if (IsHeroic() && m_uiNerubianShadowStrikeTimer <= uiDiff)
{
Summons.DoAction(NPC_BURROWER, ACTION_SHADOW_STRIKE);
m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
} else m_uiNerubianShadowStrikeTimer -= uiDiff;
if (m_uiSubmergeTimer <= uiDiff && !m_bReachedPhase3 && !me->HasAura(SPELL_BERSERK))
{
m_uiStage = 1;
m_uiSubmergeTimer = 60*IN_MILLISECONDS;
} else m_uiSubmergeTimer -= uiDiff;
break;
case 1:
DoCast(me, SPELL_SUBMERGE_ANUBARAK);
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoScriptText(SAY_BURROWER, me);
m_uiScarabSummoned = 0;
m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
m_uiStage = 2;
break;
case 2:
if (m_uiPursuingSpikeTimer <= uiDiff)
{
DoCast(SPELL_SPIKE_CALL);
// Just to make sure it won't happen again in this phase
m_uiPursuingSpikeTimer = 90*IN_MILLISECONDS;
} else m_uiPursuingSpikeTimer -= uiDiff;
if (m_uiSummonScarabTimer <= uiDiff)
{
/* WORKAROUND
* - The correct implementation is more likely the comment below but it needs spell knowledge
*/
std::list<uint64>::iterator i = m_vBurrowGUID.begin();
uint32 at = urand(0, m_vBurrowGUID.size()-1);
for (uint32 k = 0; k < at; k++)
++i;
if (Creature *pBurrow = Unit::GetCreature(*me, *i))
pBurrow->CastSpell(pBurrow, 66340, false);
m_uiScarabSummoned++;
m_uiSummonScarabTimer = 4*IN_MILLISECONDS;
if (m_uiScarabSummoned == 4) m_uiSummonScarabTimer = RAID_MODE(4, 20)*IN_MILLISECONDS;
/*It seems that this spell have something more that needs to be taken into account
//Need more sniff info
DoCast(SPELL_SUMMON_BEATLES);
// Just to make sure it won't happen again in this phase
m_uiSummonScarabTimer = 90*IN_MILLISECONDS;*/
} else m_uiSummonScarabTimer -= uiDiff;
if (m_uiSubmergeTimer <= uiDiff)
{
m_uiStage = 3;
m_uiSubmergeTimer = 80*IN_MILLISECONDS;
} else m_uiSubmergeTimer -= uiDiff;
break;
case 3:
m_uiStage = 0;
DoCast(SPELL_SPIKE_TELE);
Summons.DespawnEntry(NPC_SPIKE);
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_ANUBARAK);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_EMERGE_ANUBARAK);
me->GetMotionMaster()->MoveChase(me->getVictim());
m_uiSummonNerubianTimer = 10*IN_MILLISECONDS;
m_uiNerubianShadowStrikeTimer = 30*IN_MILLISECONDS;
m_uiSummonScarabTimer = 2*IN_MILLISECONDS;
break;
}
if (!IsHeroic())
{
if (m_uiSummonFrostSphereTimer <= uiDiff)
//.........这里部分代码省略.........
示例9: JustDied
void JustDied(Unit* killer)
{
summons.DespawnAll();
}
示例10: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
if (!bIsFrenzy && HealthBelowPct(25) && !bIsExploded)
{
Talk(SAY_ENRAGE);
DoCast(me, SPELL_FRENZY, true);
bIsFrenzy = true;
}
if (!bIsFrenzy)
{
if (uiBubbleCheckerTimer <= uiDiff)
{
if (!bIsExploded)
{
if (!me->HasAura(SPELL_PROTECTIVE_BUBBLE, 0))
{
Talk(SAY_SHATTER);
DoCast(me, SPELL_WATER_BLAST);
DoCast(me, SPELL_DRAINED);
bIsExploded = true;
me->AttackStop();
me->SetVisible(false);
for (uint8 i = 0; i < 10; i++)
{
int tmp = urand(0, MAX_SPAWN_LOC-1);
me->SummonCreature(NPC_ICHOR_GLOBULE, SpawnLoc[tmp], TEMPSUMMON_CORPSE_DESPAWN);
}
}
}
else
{
bool bIsWaterElementsAlive = false;
if (!m_waterElements.empty())
{
for (std::list<uint64>::const_iterator itr = m_waterElements.begin(); itr != m_waterElements.end(); ++itr)
if (Creature* temp = Unit::GetCreature(*me, *itr))
if (temp->isAlive())
{
bIsWaterElementsAlive = true;
break;
}
}
if (!bIsWaterElementsAlive)
DoExplodeCompleted();
}
uiBubbleCheckerTimer = 1000;
}
else uiBubbleCheckerTimer -= uiDiff;
}
if (!bIsExploded)
{
if (uiWaterBoltVolleyTimer <= uiDiff)
{
DoCast(me, SPELL_WATER_BOLT_VOLLEY);
uiWaterBoltVolleyTimer = urand(10000, 15000);
}
else uiWaterBoltVolleyTimer -= uiDiff;
DoMeleeAttackIfReady();
}
}
示例11: DespawnWaterElements
void DespawnWaterElements()
{
m_waterElements.DespawnAll();
}
示例12: JustSummoned
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
summon->AI()->AttackStart(me->GetVictim());
}
示例13: Reset
void Reset()
{
events.Reset();
summons.DespawnAll();
}
示例14: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summoned) override
{
Summons.Despawn(summoned);
--KillCount;
}
示例15: Reset
void Reset()
{
summons.DespawnAll();
events.Reset();
stage = 0;
}