本文整理汇总了C++中DoAction函数的典型用法代码示例。如果您正苦于以下问题:C++ DoAction函数的具体用法?C++ DoAction怎么用?C++ DoAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DoAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnterCombat
void EnterCombat(Unit * who) {
StartEncounter(instance, me, who);
DoScriptText(SAY_STEELBREAKER_AGGRO, me);
DoZoneInCombat();
DoCast(me, RAID_MODE(SPELL_HIGH_VOLTAGE, SPELL_HIGH_VOLTAGE_H));
events.ScheduleEvent(EVENT_ENRAGE, 900000);
DoAction(EVENT_UPDATEPHASE);
}
示例2: DamageTaken
void DamageTaken(Unit* /*attacker*/, uint32& damage)
{
if (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
{
if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 1)
DoAction(ACTION_CLONE);
}
else
{
if ((me->HealthBelowPctDamaged(66, damage) && _cloneCount == 2)
|| (me->HealthBelowPctDamaged(33, damage) && _cloneCount == 1))
DoAction(ACTION_CLONE);
}
if (me->GetHealth() > damage)
instance->SetData(DATA_BALTHARUS_SHARED_HEALTH, me->GetHealth() - damage);
}
示例3: DamageTaken
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
{
if (!_isStonePhase && HealthBelowPct(45))
{
_isStonePhase = true;
DoAction(ACTION_STONE_PHASE_START);
}
}
示例4: DamageTaken
void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType, SpellSchoolMask)
{
if (!_isStonePhase && HealthBelowPct(45))
{
_isStonePhase = true;
DoAction(ACTION_STONE_PHASE_START);
}
}
示例5: DamageTaken
void DamageTaken(Unit* caster, uint32& damage)
{
if (me->GetHealth() < damage || eggPhase)
{
damage = 0;
if (!eggPhase)
DoAction(ACTION_UNEGG);
}
}
示例6: Reset
void Reset()
{
_Reset();
AcidSpray_Timer = 10000;
PoisonSpawn_Timer = 5000;
PoisonBolt_Timer = 7000;
DoAction(ACTION_RESET_BROGGOK);
instance->SetData(TYPE_BROGGOK_EVENT, NOT_STARTED);
}
示例7: Reset
void Reset()
{
_Reset();
phase = PHASE_NORMAL;
me->SetSpeed(MOVE_FLIGHT, 2.8f);
DoAction(ACTION_SET_NORMAL_EVENTS);
}
示例8: GossipSelect
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
{
if (menuId == MENU_OPTION_YOU_CHALLENGED_US && gossipListId == OPTION_ID_YOU_CHALLENGED_US)
{
CloseGossipMenuFor(player);
DoAction(ACTION_START_RAGNAROS);
}
return false;
}
示例9: Reset
void Reset()
{
_Reset();
phase = PHASE_NORMAL;
started=false;
DoAction(ACTION_SET_NORMAL_EVENTS);
}
示例10: GossipSelect
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
{
if (menuId == GOSSIP_MENU_HUMMEL && gossipListId == GOSSIP_OPTION_START)
{
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
CloseGossipMenuFor(player);
DoAction(ACTION_START_EVENT);
}
return false;
}
示例11: main
task main()
{
int state, event, action;
while(true){
if(event==NULL) event=getEvent();
action=GetAction(state, event);
event=DoAction(action);
state=NewState(state, event);
}
}
示例12: DamageTaken
void DamageTaken(Unit* done_by, uint32 &damage)
{
if (!HealthAbovePct(20))
{
me->GetVehicleKit()->RemoveAllPassengers();
if (Creature *dragah = Unit::GetCreature(*me, dragahGUID))
dragah->AI()->DoAction(ACTION_VALIONA_SHOULD_FLY_AWAY);
DoAction(ACTION_VALIONA_SHOULD_FLY_AWAY);
}
}
示例13: EnterCombat
void EnterCombat(Unit* who)
{
me->setActive(true);
StartEncounter(instance, me, who);
DoScriptText(SAY_BRUNDIR_AGGRO, me);
DoZoneInCombat();
events.ScheduleEvent(EVENT_ENRAGE, 900000);
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, urand(9000, 17000), 1);
events.ScheduleEvent(EVENT_OVERLOAD, urand(60000, 80000), 1);
DoAction(EVENT_UPDATEPHASE);
}
示例14: Reset
void Reset()
{
_Reset();
//EmeraldVoid = true;
//RubyVoid = true;
//AmberVoid = true;
_phase = PHASE_NORMAL;
DoAction(ACTION_SET_NORMAL_EVENTS);
}
示例15: JustDied
void JustDied(Unit* /*killer*/) override
{
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.isEmpty())
{
if (Group* group = players.begin()->GetSource()->GetGroup())
if (group->isLFGGroup())
sLFGMgr->FinishDungeon(group->GetGUID(), 288);
}
DoAction(APOTHECARY_DIED);
}