本文整理汇总了C++中ExecuteEvent函数的典型用法代码示例。如果您正苦于以下问题:C++ ExecuteEvent函数的具体用法?C++ ExecuteEvent怎么用?C++ ExecuteEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ExecuteEvent函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STAT_CASTING))
return;
if (_banished)
{
// If all three shades are dead, OR it has taken too long, end the current event and get Taerar back into business
if (_banishedTimer <= diff || !_shades)
{
_banished = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE);
me->RemoveAurasDueToSpell(SPELL_SHADE);
me->SetReactState(REACT_AGGRESSIVE);
}
// _banishtimer has not expired, and we still have active shades:
else
_banishedTimer -= diff;
return;
}
while (uint32 eventId = events.ExecuteEvent())
ExecuteEvent(eventId);
DoMeleeAttackIfReady();
}
开发者ID:Alluring,项目名称:TrinityCore,代码行数:32,代码来源:boss_emerald_dragons.cpp
示例2: ExecuteEvent
void ExclusivePoolMgr::CheckEvents()
{
for (std::pair<const uint32, ExclusivePool>& poolPair : m_pools)
{
ExclusivePool& pool = poolPair.second;
if (pool.currentRespawnTime <= time(nullptr))
ExecuteEvent(pool);
}
}
开发者ID:Phatcat,项目名称:mangos,代码行数:9,代码来源:ExclusivePoolMgr.cpp
示例3: while
void WorldBossAI::UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STAT_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
ExecuteEvent(eventId);
}
开发者ID:Zakamurite,项目名称:TrilliumEMU,代码行数:13,代码来源:ScriptedCreature.cpp
示例4: while
void BossAI::UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
ExecuteEvent(eventId);
DoMeleeAttackIfReady();
}
开发者ID:Reann,项目名称:TrinityCore,代码行数:15,代码来源:ScriptedCreature.cpp
示例5: UpdateAI
void UpdateAI(uint32 const diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STAT_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
ExecuteEvent(eventId);
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, -50.0f, true))
DoCast(target, SPELL_SUMMON_PLAYER);
DoMeleeAttackIfReady();
}
开发者ID:naffbeats,项目名称:SkyFireEMU_rebase,代码行数:18,代码来源:boss_emerald_dragons.cpp
示例6: UpdateAI
void UpdateAI(auint32 diff) // (uint32 diff)
{
if(!UbdateVictim()) // !UpdateVictim
return;
event.Update(diff); //events.Update(diff)
while(uint32 eventID = events* ExecuteEvent()) // events.ExecuteEvent()
{
switch(eventID)
{
case DRAIN_ESENCE; // case EVENT_DRAIN_ESENCE:
if (!me->isInCombat())
if(Unit* target = me->FindNearestCreature(npcID, distance)) // a jeje... distance v yardech for example 100.0f
DoCast (target, SPELL_DRAIN_ESENCE);
return false; // wtf? break;
case EVENT_DARK_COMMAND;
if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
if(!Heroic()) //If(!IsHeroic())
DoCast(target, SPELL_DARK_COMMAND);
else
DoCast(target, DARK_COMMAND_H);
}
events.RescheduleEvent(EVENT_DARK_COMMAND, 20000);
break;
case EVENT_AURA_OF_ACCELERATION;
DoCast(SPELL_AURA_OF_ACCELERATION)
break;
}
}
DoMeleeAttackIfReady();
}
开发者ID:JiniaTS,项目名称:JardaCore,代码行数:44,代码来源:boss_corla.cpp
示例7: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim() && !events.IsInPhase(PHASE_EVENT))
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
ExecuteEvent(eventId);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
}
DoMeleeAttackIfReady();
}
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:19,代码来源:boss_northrend_beasts.cpp
示例8: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
ExecuteEvent(eventId);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
}
DoSpellAttackIfReady(SPELL_EMPOWERED_SMITE);
}
开发者ID:martial69320,项目名称:cerberus,代码行数:19,代码来源:boss_illidari_council.cpp
示例9: UpdateAdventure
void UpdateAdventure(void)
{
if(!adventureWindowVisible)
return;
if(IsBattleForced())
{
INFO_LOG("Triggering forced battle.");
ShowBattleWindow();
return;
}
#if EVENT_CHANCE_SCALING
++ticksSinceLastEvent;
#endif
if(updateDelay > 0 && !GetFastMode())
{
--updateDelay;
return;
}
ExecuteEvent(ComputeRandomEvent_inline(baseChanceOfEvent, ticksSinceLastEvent, chances, sizeof(chances), GetFastMode()));
LoadRandomDungeonImage();
}
开发者ID:BlackLamb,项目名称:MiniDungeon,代码行数:24,代码来源:Adventure.c
示例10: ExecuteEvent
bool NFActorModule::Execute()
{
ExecuteEvent();
return true;
}
开发者ID:ketoo,项目名称:NoahGameFrame,代码行数:5,代码来源:NFActorModule.cpp
示例11: while
void IICHANEventAllocator::Process()
{
if(current_time - _tick >= 1000)
{
_time++;
_tick = current_time;
}
int i = 0;
while(i < _count)
{
if(events[i]->solved)
{
delete events[i];
events.erase(events.begin() + i);
_count--;
continue;
}
else
{
EVENT* e = events[i];
if(e)
{
if(e->condition == EVENT_CONDITION_TIME_ELAPSED)
{
if(e->condition_param == _time)
{
ExecuteEvent(e);
e->solved = true;
}
}
else if(e->condition == EVENT_CONDITION_HERO_X_GR)
{
if(GetItemAllocator())
{
if(GetItemAllocator()->GetFirstPlayer())
{
if(GetItemAllocator()->GetFirstPlayer()->GetSprite())
{
if(GetItemAllocator()->GetFirstPlayer()->
GetSprite()->GetX() > e->condition_param)
{
ExecuteEvent(e);
e->solved = true;
}
}
else
WriteToLog("Event error: Player sprite does not exist");
}
else
WriteToLog("Event error: Player does not exist");
}
else
WriteToLog("Event error: Item Allocator does not exist");
}
else if(e->condition == EVENT_CONDITION_ID_X_GR)
{
if(GetItemAllocator())
{
int id = e->action_param_int;
CHARACTER* enemy = (CHARACTER*)GetItemAllocator()->GetItem(id);
if(enemy)
{
ANIMATEDSPRITE* sprite = enemy->GetSprite();
if(sprite)
if(sprite->GetX() > e->condition_param)
{
ExecuteEvent(e);
e->solved = true;
}
}
else
WriteToLog("Event error: Character sprite does not exist");
}
else
WriteToLog("Event error: Item Allocator does not exist");
}
else if(e->condition == EVENT_CONDITION_ID_X_EQ)
{
if(GetItemAllocator())
{
int id = e->action_param_int;
CHARACTER* enemy = (CHARACTER*)GetItemAllocator()->GetItem(id);
if(enemy)
{
ANIMATEDSPRITE* sprite = enemy->GetSprite();
if(sprite)
if(sprite->GetX() == e->condition_param)
{
ExecuteEvent(e);
e->solved = true;
}
}
else
WriteToLog("Event error: Character sprite does not exist");
}
else
WriteToLog("Event error: Item Allocator does not exist");
}
}
//.........这里部分代码省略.........
开发者ID:lightsgoout,项目名称:interview,代码行数:101,代码来源:iichan_eventalloc.cpp
示例12: ForceEvent
void ForceEvent(void)
{
PopMenu();
ExecuteEvent(ComputeRandomEvent_inline(baseChanceOfEvent, ticksSinceLastEvent, chances, sizeof(chances), true));
}
开发者ID:BlackLamb,项目名称:MiniDungeon,代码行数:5,代码来源:Adventure.c
注:本文中的ExecuteEvent函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论