本文整理汇总了C++中SummonList::DespawnAll方法的典型用法代码示例。如果您正苦于以下问题:C++ SummonList::DespawnAll方法的具体用法?C++ SummonList::DespawnAll怎么用?C++ SummonList::DespawnAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SummonList
的用法示例。
在下文中一共展示了SummonList::DespawnAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JustReachedHome
void JustReachedHome()
{
Summons.DespawnAll();
Reset();
}
示例2: JustDied
void JustDied(Unit* /*killer*/)
{
Talk(SAY_DEAD);
summons.DespawnAll();
}
示例3: JustDied
void JustDied(Unit* /*Killer*/)
{
DoScriptText(SAY_DEATH, me);
summons.DespawnAll();
}
示例4: JustDied
void JustDied(Unit* /*killer*/)
{
DoSendQuantumText(SAY_DEATH, me);
Summons.DespawnAll();
}
示例5: Reset
void Reset()
{
summons.DespawnAll();
textCounter = SAY_DS_DOWN_1;
}
示例6: Reset
void Reset()
{
summons.DespawnAll();
}
示例7: JustDied
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
Summons.DespawnAll();
instance->SetBossState(DATA_SKADI_THE_RUTHLESS, DONE);
}
示例8: UpdateAI
void UpdateAI(uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if( me->HasUnitState(UNIT_STATE_CASTING) )
return;
switch( events.GetEvent() )
{
case 0:
break;
case EVENT_YELL_DEAD_1:
Talk(YELL_DEAD_1);
events.PopEvent();
break;
case EVENT_START_RESURRECTION:
me->CastSpell(me, SPELL_SUMMON_VALKYR, true);
events.PopEvent();
events.RescheduleEvent(EVENT_VALKYR_BEAM, 7000);
events.RescheduleEvent(EVENT_VALKYR_MOVE, 1);
events.RescheduleEvent(EVENT_ANNHYLDE_YELL, 3000);
break;
case EVENT_VALKYR_MOVE:
if( Creature* s = ObjectAccessor::GetCreature(*me, ValkyrGUID) )
s->GetMotionMaster()->MovePoint(1, s->GetPositionX(), s->GetPositionY(), s->GetPositionZ()-15.0f);
events.PopEvent();
break;
case EVENT_ANNHYLDE_YELL:
if( Creature* s = ObjectAccessor::GetCreature(*me, ValkyrGUID) )
s->AI()->Talk(YELL_ANHYLDE_2);
events.PopEvent();
break;
case EVENT_VALKYR_BEAM:
me->RemoveAura(SPELL_SUMMON_VALKYR);
if( Creature* c = ObjectAccessor::GetCreature(*me, ValkyrGUID) )
c->CastSpell(me, SPELL_RESURRECTION_BEAM, false);
events.PopEvent();
events.RescheduleEvent(EVENT_RESURRECTION_BALL, 4000);
break;
case EVENT_RESURRECTION_BALL:
me->CastSpell(me, SPELL_RESURRECTION_BALL, true);
events.PopEvent();
events.RescheduleEvent(EVENT_RESURRECTION_HEAL, 4000);
break;
case EVENT_RESURRECTION_HEAL:
me->RemoveAura(SPELL_RESURRECTION_BALL);
me->CastSpell(me, SPELL_RESURRECTION_HEAL, true);
FeignDeath(false);
events.PopEvent();
events.RescheduleEvent(EVENT_MORPH_TO_UNDEAD, 3000);
break;
case EVENT_MORPH_TO_UNDEAD:
me->CastSpell(me, SPELL_INGVAR_TRANSFORM, true);
events.PopEvent();
events.RescheduleEvent(EVENT_START_PHASE_2, 1000);
break;
case EVENT_START_PHASE_2:
if( Creature* c = ObjectAccessor::GetCreature(*me, ValkyrGUID) )
{
c->DespawnOrUnsummon();
summons.DespawnAll();
}
events.PopEvent();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
AttackStart(me->GetVictim());
me->GetMotionMaster()->MoveChase(me->GetVictim());
Talk(YELL_AGGRO_2);
// schedule Phase 2 abilities
events.RescheduleEvent(EVENT_SPELL_ROAR, 15000);
events.RescheduleEvent(EVENT_SPELL_CLEAVE_OR_WOE_STRIKE, 2000);
events.RescheduleEvent(EVENT_SPELL_SMASH, 5000);
events.RescheduleEvent(EVENT_SPELL_ENRAGE_OR_SHADOW_AXE, 10000);
break;
// ABILITIES HERE:
case EVENT_UNROOT:
me->SetControlled(false, UNIT_STATE_ROOT);
me->DisableRotate(false);
events.PopEvent();
break;
case EVENT_SPELL_ROAR:
Talk(EMOTE_ROAR);
me->_AddCreatureSpellCooldown(SPELL_STAGGERING_ROAR, 0);
me->_AddCreatureSpellCooldown(SPELL_DREADFUL_ROAR, 0);
if (me->GetDisplayId() == DISPLAYID_DEFAULT)
me->CastSpell((Unit*)NULL, SPELL_STAGGERING_ROAR, false);
else
me->CastSpell((Unit*)NULL, SPELL_DREADFUL_ROAR, false);
events.RepeatEvent(urand(15000,20000));
break;
case EVENT_SPELL_CLEAVE_OR_WOE_STRIKE:
if( me->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID) == 0 )
{
//.........这里部分代码省略.........
示例9: Reset
void Reset()
{
me->RemoveAurasDueToSpell(SPELL_PERIODIC_SPAWN_SWARMER);
me->RemoveAurasDueToSpell(SPELL_PERIODIC_SPAWN_SABOTEUR);
summons.DespawnAll();
}
示例10: Reset
void Reset()
{
pInstance->SetData(DATA_WYRMBREAKER_EVENT,NOT_STARTED);
Summons.DespawnAll();
}
示例11: JustDied
void JustDied()
{
Summons.DespawnAll();
}
示例12: JustDied
void JustDied(Unit *u)
{
Summons.DespawnAll();
}
示例13: Reset
void Reset() override
{
Initialize();
summons.DespawnAll();
}
示例14: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (Phase == 1)
{
while (uint32 eventId = events.GetEvent())
{
switch (eventId)
{
case EVENT_WASTE:
DoSummon(NPC_WASTE, Pos[RAND(0, 3, 6, 9)]);
events.RepeatEvent(urand(2000, 5000));
break;
case EVENT_ABOMIN:
if (nAbomination < 8)
{
DoSummon(NPC_ABOMINATION, Pos[RAND(1, 4, 7, 10)]);
nAbomination++;
events.RepeatEvent(20000);
}
else
events.PopEvent();
break;
case EVENT_WEAVER:
if (nWeaver < 8)
{
DoSummon(NPC_WEAVER, Pos[RAND(0, 3, 6, 9)]);
nWeaver++;
events.RepeatEvent(25000);
}
else
events.PopEvent();
break;
case EVENT_TRIGGER:
if (GameObject* pKTTrigger = me->GetMap()->GetGameObject(KTTriggerGUID))
pKTTrigger->SetPhaseMask(2, true);
events.PopEvent();
break;
case EVENT_PHASE:
events.Reset();
DoScriptText(RAND(SAY_AGGRO_1, SAY_AGGRO_2, SAY_AGGRO_3), me);
spawns.DespawnAll();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE);
me->CastStop();
DoStartMovement(me->getVictim());
events.ScheduleEvent(EVENT_BOLT, urand(5000, 10000));
events.ScheduleEvent(EVENT_NOVA, 15000);
events.ScheduleEvent(EVENT_DETONATE, urand(30000, 40000));
events.ScheduleEvent(EVENT_FISSURE, urand(10000, 30000));
events.ScheduleEvent(EVENT_BLAST, urand(60000, 120000));
if (GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
events.ScheduleEvent(EVENT_CHAIN, urand(30000, 60000));
Phase = 2;
break;
default:
events.PopEvent();
break;
}
}
}
else
{
//start phase 3 when we are 45% health
if (Phase != 3)
{
if (HealthBelowPct(45))
{
Phase = 3;
DoScriptText(SAY_REQUEST_AID, me);
//here Lich King should respond to KelThuzad but I don't know which Creature to make talk
//so for now just make Kelthuzad says it.
DoScriptText(SAY_ANSWER_REQUEST, me);
for (uint8 i = 0; i <= 3; ++i)
{
if (GameObject* pPortal = me->GetMap()->GetGameObject(PortalsGUID[i]))
{
if (pPortal->getLootState() == GO_READY)
pPortal->UseDoorOrButton();
}
}
}
}
else if (nGuardiansOfIcecrownCount < RAID_MODE(2, 4))
{
if (uiGuardiansOfIcecrownTimer <= diff)
{
// TODO : Add missing text
if (Creature* pGuardian = DoSummon(NPC_ICECROWN, Pos[RAND(2, 5, 8, 11)]))
pGuardian->SetFloatValue(UNIT_FIELD_COMBATREACH, 2);
++nGuardiansOfIcecrownCount;
uiGuardiansOfIcecrownTimer = 5000;
}
else uiGuardiansOfIcecrownTimer -= diff;
}
//.........这里部分代码省略.........
示例15: UpdateAI
void UpdateAI(uint32 Diff) override
{
if (AttackStartTimer <= Diff)
{
switch (Phase)
{
case 1:
instance->SetBossState(BOSS_RAZORSCALE, IN_PROGRESS);
summons.DespawnAll();
AttackStartTimer = 1000;
Phase = 2;
break;
case 2:
for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
{
if (Creature* summonedEngineer = me->SummonCreature(NPC_ENGINEER, PosEngSpawn, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000))
{
summonedEngineer->SetWalk(false);
summonedEngineer->SetSpeedRate(MOVE_RUN, 0.5f);
summonedEngineer->SetHomePosition(PosEngRepair[n]);
summonedEngineer->GetMotionMaster()->MoveTargetedHome();
Engineer[n] = summonedEngineer->GetGUID();
}
}
if (Creature* firstSummon = ObjectAccessor::GetCreature(*me, Engineer[0]))
firstSummon->AI()->Talk(SAY_AGGRO_3);
Phase = 3;
AttackStartTimer = 14000;
break;
case 3:
for (uint8 n = 0; n < 4; n++)
{
if (Creature* summonedDefender = me->SummonCreature(NPC_DEFENDER, PosDefSpawn[n], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 3000))
{
summonedDefender->SetWalk(false);
summonedDefender->SetHomePosition(PosDefCombat[n]);
summonedDefender->GetMotionMaster()->MoveTargetedHome();
Defender[n] = summonedDefender->GetGUID();
}
}
Phase = 4;
break;
case 4:
for (uint8 n = 0; n < RAID_MODE(2, 4); n++)
if (Creature* summonedEngineer = ObjectAccessor::GetCreature(*me, Engineer[n]))
summonedEngineer->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
for (uint8 n = 0; n < 4; ++n)
if (Creature* summonedDefender = ObjectAccessor::GetCreature(*me, Defender[n]))
summonedDefender->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
Talk(SAY_AGGRO_2);
AttackStartTimer = 16000;
Phase = 5;
break;
case 5:
if (Creature* Razorscale = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_RAZORSCALE)))
{
Razorscale->AI()->DoAction(ACTION_EVENT_START);
me->SetInCombatWith(Razorscale);
}
if (Creature* firstEngineer = ObjectAccessor::GetCreature(*me, Engineer[0]))
firstEngineer->AI()->Talk(SAY_AGGRO_1);
Phase = 6;
break;
}
}
else
AttackStartTimer -= Diff;
}