本文整理汇总了C++中EventMap::CancelEventGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ EventMap::CancelEventGroup方法的具体用法?C++ EventMap::CancelEventGroup怎么用?C++ EventMap::CancelEventGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventMap
的用法示例。
在下文中一共展示了EventMap::CancelEventGroup方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SummonedCreatureDespawn
void SummonedCreatureDespawn(Creature* summon)
{
if (summon->GetEntry() == 46842)
{
killedEggs++;
if (killedEggs >= 2 && phase == PHASE_TWO)
{
phase = PHASE_THREE;
events.CancelEventGroup(PHASE_TWO);
me->CastStop();
me->RemoveAura(SPELL_MANA_BARRIER);
if (Creature* calen = me->FindNearestCreature(46277, 100.0f, true))
{
calen->CastStop();
calen->CastSpell(calen, SPELL_ESSENCE_OF_THE_RED, true);
calen->DisappearAndDie();
}
events.ScheduleEvent(EVENT_WRACK, 15000, PHASE_THREE);
events.ScheduleEvent(EVENT_FLAME_BREATH, 20000, PHASE_THREE);
events.ScheduleEvent(EVENT_TWILIGHT_SLICER, 28000, PHASE_THREE);
events.ScheduleEvent(EVENT_CHECK_MELEE, 2000, PHASE_THREE);
events.ScheduleEvent(EVENT_WHELP, 15000, PHASE_THREE);
}
}
}
示例2: DoAction
void DoAction( int32 action)
{
switch (action)
{
case ACTION_AZURE_SERPENT_P_1:
movementTimer = 100;
break;
case ACTION_AZURE_SERPENT_P_2:
events.CancelEventGroup(PHASE_ONE);
events.ScheduleEvent(EVENT_MAGNETIC_SHROUD, urand(10000, 15000), PHASE_TWO);
events.ScheduleEvent(EVENT_LIGHTNING_BREATH, urand (2500, 7500), PHASE_TWO);
me->SetReactState(REACT_AGGRESSIVE);
me->GetMotionMaster()->MovePoint(4, azureSerpentPositions[3].GetPositionX(), azureSerpentPositions[3].GetPositionY(), azureSerpentPositions[3].GetPositionZ());
me->RemoveAurasDueToSpell(SPELL_LIGHTNING_SHIELD);
DoZoneInCombat();
break;
case ACTION_AZURE_SERPENT_RESET:
if (!me->IsAlive())
me->Respawn();
me->CombatStop();
Reset();
me->NearTeleportTo(3829.19f, 2927.29f, 705.71f, 0.0f);
break;
}
}
示例3: DamageTaken
void DamageTaken(Unit* who, uint32& damage)
{
if (me->GetHealthPct() <= 30.0f && phase == PHASE_ONE)
{
phase = PHASE_TWO;
events.CancelEventGroup(PHASE_ONE);
me->RemoveAura(SPELL_DRAINED);
DoCast(SPELL_MANA_BARRIER);
events.ScheduleEvent(EVENT_START_MAGIC_FIGHT, 2000, PHASE_TWO);
events.ScheduleEvent(EVENT_TWILIGHT_DRAKE, urand(18000, 30000), PHASE_TWO);
events.ScheduleEvent(EVENT_SPITECALLER, urand(18000, 35000), PHASE_TWO);
}
}
示例4: DoAction
void DoAction(const int32 action)
{
switch (action)
{
case ACTION_SIMON_ROUND_FINISHED:
listening = false;
DoCast(SPELL_VISUAL_START_AI_LEVEL);
GiveRewardForLevel(gameLevel);
_events.CancelEventGroup(0);
if (gameLevel == 10)
ResetNode();
else
_events.ScheduleEvent(EVENT_SIMON_SETUP_PRE_GAME, 1000);
break;
case ACTION_SIMON_CORRECT_FULL_SEQUENCE:
gameLevel++;
DoAction(ACTION_SIMON_ROUND_FINISHED);
break;
case ACTION_SIMON_WRONG_SEQUENCE:
GivePunishment();
DoAction(ACTION_SIMON_ROUND_FINISHED);
break;
}
}
示例5: UpdateAI
void UpdateAI(const uint32 diff)
{
// Falled to water in out of platform = die
CheckPlayersInWater();
if (!UpdateVictim())
return;
events.Update(diff);
switch (events.ExecuteEvent())
{
case EVENT_HARD_STARE:
if (me->getVictim())
{
DoPlaySoundToSet(me, 35334); // wound
DoCast(me->getVictim(),SPELL_HARD_STARE);
}
events.ScheduleEvent(EVENT_HARD_STARE, 13000);
break;
case EVENT_GAZE:
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 2.0f, true);
if (!target)
if (!me->HasUnitState(UNIT_STATE_CASTING))
DoCast(SPELL_GAZE);
events.ScheduleEvent(EVENT_GAZE, 2000);
break;
}
case EVENT_BERSERK:
events.CancelEventGroup(0); // clear all events
me->AI()->Talk(SAY_BERSERK);
DoCast(SPELL_BERSERK_KILLALL);
break;
// Spectrum phase start
case EVENT_LIGHT_SPECTRUM_SAY_SUMMON:
FogKilled = 0;
me->AI()->Talk(SAY_SUMMON_SPECTRUM);
SummonSomeCreatures(RED_FOG, 3, 10.0f); // 3 red fog
SummonSomeCreatures(BLUE_FOG, 1, 10.0f); // 1 blue fog
events.ScheduleEvent(EVENT_LIGHT_SPECTRUM, 3000);
break;
case EVENT_LIGHT_SPECTRUM:
me->AI()->Talk(SAY_SPECTRUM_INF);
SummonBeamsEye();
break;
// Spectrum phase end
// Disintegration Beam phase start
case EVENT_MAZE_TIME:
Maze(true);
events.ScheduleEvent(EVENT_MAZE_ORIENTATION, 5000);
events.ScheduleEvent(EVENT_MAZE_END, 47000);
events.ScheduleEvent(EVENT_MIND_DAGGERS, 6000);
SendMazeToEyes(true);
break;
case EVENT_MAZE_ORIENTATION:
UpdateOrientation();
TryKillPlayerInFront();
events.ScheduleEvent(EVENT_MAZE_ORIENTATION, 200);
break;
case EVENT_MAZE_END:
Maze(false);
SendMazeToEyes(false);
events.ScheduleEvent(EVENT_LIGHT_SPECTRUM_SAY_SUMMON, 40000);
break;
case EVENT_MIND_DAGGERS:
DoCast(SPELL_MIND_DAGGERS);
events.ScheduleEvent(EVENT_MIND_DAGGERS, 6000);
break;
// Disintegration Beam phase end
default:
break;
}
if (!me->HasUnitState(UNIT_STATE_CASTING))
DoMeleeAttackIfReady();
}