Ejemplo n.º 1
0
            void UpdateAI(uint32 const diff)
            {
                if(!UpdateVictim())
                    return;

                events.Update(diff);

                if(me->HasUnitState(UNIT_STATE_CASTING))
                    return;

                if(uint32 eventId = events.ExecuteEvent())
                {
                    switch(eventId)
                    {
                        case EVENT_CLOSE_GATE:
                            CloseGate();
                            break;
                        case EVENT_THROW:
                            DoCast(SPELL_PIERCING_THROW);
                            events.ScheduleEvent(EVENT_THROW, 28000);
                            break;
                        case EVENT_BLOSSOM:
                            if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
                            {
                                DoCast(target, SPELL_BLOSSOM_JUMP);
                                DoCastAOE(SPELL_DEATH_BLOSSOM);
                                events.ScheduleEvent(EVENT_BLOSSOM, 25000);
                            }
                            break;
                        default:
                            break;
                    }
                }
                DoMeleeAttackIfReady();
            }
Ejemplo n.º 2
0
/*
================
rvTramGate::Event_CloseGate
================
*/
void rvTramGate::Event_CloseGate() {
	CloseGate();
}