void DoAction(const int32 actionId) { if (actionId == ACTION_START_RIMEFANG) { _events.SetPhase(PHASE_COMBAT); DoZoneInCombat(); _events.ScheduleEvent(EVENT_MOVE_NEXT, 500, 0, PHASE_COMBAT); _events.ScheduleEvent(EVENT_ICY_BLAST, 15000, 0, PHASE_COMBAT); } else if (actionId == ACTION_END_COMBAT) _EnterEvadeMode(); }
void CreatureAI::EnterEvadeMode() { if (!_EnterEvadeMode()) return; sLog.outDebug("Creature %u enters evade mode.", me->GetEntry()); me->GetMotionMaster()->MoveTargetedHome(); if (CreatureGroup *formation = me->GetFormation()) formation->EvadeFormation(me); Reset(); }
void EnterEvadeMode() { Reset(); me->DespawnOrUnsummon(1000); me->SummonCreature(NPC_NEFARIAN_INTRO, -167.093f, -224.479f, 40.399f, 6.278f, TEMPSUMMON_MANUAL_DESPAWN); if (instance) { instance->SetBossState(DATA_NEFARIAN, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void EnterEvadeMode() { Reset(); removeSound(); me->GetMotionMaster()->MoveTargetedHome(); if (instance) { instance->SetBossState(DATA_ATRAMEDES, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void EnterEvadeMode() { Reset(); me->DeleteThreatList(); me->CombatStop(false); me->GetMotionMaster()->MoveTargetedHome(); if (instance) { instance->SetData(DATA_HOPTALLUS_EVENT, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void EnterEvadeMode() { _EnterEvadeMode(); Reset(); if (Creature *pStalagg = me->GetCreature(*m_creature, instance->GetData64(DATA_STALAGG))) { pStalagg->Respawn(); pStalagg->GetMotionMaster()->MovePoint(0, pStalagg->GetHomePosition()); } if (Creature *pFeugen = me->GetCreature(*m_creature, instance->GetData64(DATA_FEUGEN))) { pFeugen->Respawn(); pFeugen->GetMotionMaster()->MovePoint(0, pFeugen->GetHomePosition()); } }
void EnterEvadeMode() { me->GetMotionMaster()->MoveTargetedHome(); Reset(); me->SetHealth(me->GetMaxHealth()); if (instance) { instance->SetBossState(BOSS_ECHO_OF_BAINE, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void NpcTheLichKingControllerAI::EnterEvadeMode() { if (!_EnterEvadeMode()) return; me->RemoveAurasDueToSpell(SPELL_TIMER_GLUTTONOUS_ABOMINATION); me->RemoveAurasDueToSpell(SPELL_TIMER_SUPPRESSER); me->RemoveAurasDueToSpell(SPELL_TIMER_BLISTERING_ZOMBIE); me->RemoveAurasDueToSpell(SPELL_TIMER_RISEN_ARCHMAGE); me->RemoveAurasDueToSpell(SPELL_TIMER_BLAZING_SKELETON); _summons.DespawnAll(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); }
void EnterEvadeMode() { _EnterEvadeMode(); if (killMinchar) { me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01); me->SetFlying(true); me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos); } else { me->GetMotionMaster()->MoveTargetedHome(); Reset(); } }
void EnterEvadeMode() { if (!_engaged) { if (_wpCount >= 13) me->SetReactState(REACT_AGGRESSIVE); else me->SetReactState(REACT_PASSIVE); return; } _EnterEvadeMode(); me->SetHomePosition(_home); me->GetMotionMaster()->MoveTargetedHome(); Reset(); }
void EnterEvadeMode() { _EnterEvadeMode(); if (_killMinchar) { _killMinchar = false; me->SetLevitate(true); me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, 0x01); me->SetFlying(true); me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos); } else { me->GetMotionMaster()->MoveTargetedHome(); Reset(); } }
void CreatureAI::EnterEvadeMode() { if (!_EnterEvadeMode()) return; sLog->outDebug(LOG_FILTER_UNITS, "Creature %u enters evade mode.", me->GetEntry()); if (Unit* owner = me->GetCharmerOrOwner()) { me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); } else me->GetMotionMaster()->MoveTargetedHome(); Reset(); }
void EnterEvadeMode() override { _EnterEvadeMode(); CleanAuras(); if (_killMinchar) { _killMinchar = false; me->SetDisableGravity(true); me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND); me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos); } else { me->GetMotionMaster()->MoveTargetedHome(); Reset(); } }
void SmartAI::EnterEvadeMode(EvadeReason /*why*/) { if (mEvadeDisabled) { GetScript()->ProcessEventsFor(SMART_EVENT_EVADE); return; } if (!IsAIControlled()) { me->AttackStop(); return; } if (!_EnterEvadeMode()) return; me->AddUnitState(UNIT_STATE_EVADE); GetScript()->ProcessEventsFor(SMART_EVENT_EVADE); // must be after _EnterEvadeMode (spells, auras, ...) SetRun(mRun); if (Unit* owner = me->GetCharmerOrOwner()) { me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); me->ClearUnitState(UNIT_STATE_EVADE); } else if (HasEscortState(SMART_ESCORT_ESCORTING)) { AddEscortState(SMART_ESCORT_RETURNING); ReturnToLastOOCPos(); } else if (Unit* target = mFollowGuid ? ObjectAccessor::GetUnit(*me, mFollowGuid) : nullptr) { me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle); // evade is not cleared in MoveFollow, so we can't keep it me->ClearUnitState(UNIT_STATE_EVADE); } else me->GetMotionMaster()->MoveTargetedHome(); if (!me->HasUnitState(UNIT_STATE_EVADE)) GetScript()->OnReset(); }
void EnterEvadeMode() { Reset(); removeCorruption(); Talk(SAY_EVADE); me->GetMotionMaster()->MoveTargetedHome(); if (Creature* trigger = me->FindNearestCreature(NPC_CHOGALL_COG_TRIGGER, 200.0f, true)) if(trigger->HasAura(SPELL_CORR_OLD_GOD)) trigger->RemoveAurasDueToSpell(SPELL_CORR_OLD_GOD); if (instance) { instance->SetBossState(DATA_CHOGALL, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void EnterEvadeMode() { me->AddUnitState(UNIT_STATE_EVADE); me->RemoveAllAuras(); Reset(); me->DeleteThreatList(); me->CombatStop(true); me->GetMotionMaster()->MovementExpired(); me->GetMotionMaster()->MoveTargetedHome(); if (instance) { instance->SetData(DATA_TORTOS_EVENT, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void EnterEvadeMode(EvadeReason why) override { if (!_EnterEvadeMode(why)) return; CleanAuras(); if (_killMinchar) { _killMinchar = false; me->SetDisableGravity(true); me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND); me->GetMotionMaster()->MovePoint(POINT_MINCHAR, mincharPos); } else { me->AddUnitState(UNIT_STATE_EVADE); me->GetMotionMaster()->MoveTargetedHome(); Reset(); } }
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask) { if( damage >= me->GetHealth() ) { damage = me->GetHealth() - 1; if( me->getFaction() != 35 ) { me->CastSpell((Unit*)NULL, 68575, true); // achievements me->GetMap()->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, 68574, me); // paletress' spell credits encounter, but shouldn't credit achievements me->setFaction(35); events.Reset(); Talk(TEXT_EADRIC_DEATH); me->getThreatManager().clearReferences(); me->SetRegeneratingHealth(false); _EnterEvadeMode(); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if( pInstance ) pInstance->SetData(BOSS_ARGENT_CHALLENGE, DONE); } } }
void CreatureAI::EnterEvadeMode() { if (!_EnterEvadeMode()) return; sLog->outDebug(LOG_FILTER_UNITS, "Creature %u enters evade mode.", me->GetEntry()); if (!me->GetVehicle()) // otherwise me will be in evade mode forever { if (Unit *owner = me->GetCharmerOrOwner()) { me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); } else me->GetMotionMaster()->MoveTargetedHome(); } Reset(); if (me->IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons! me->GetVehicleKit()->Reset(); }
void CreatureAI::EnterEvadeMode() { if (!_EnterEvadeMode()) return; sLog.outDebug("Creature %u enters evade mode.", me->GetEntry()); if (Unit* owner = me->GetCharmerOrOwner()) { me->GetMotionMaster()->Clear(false); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); } else { // Required to prevent attacking creatures that are evading and cause them to reenter combat // Does not apply to MoveFollow me->AddUnitState(UNIT_STATE_EVADE); me->GetMotionMaster()->MoveTargetedHome(); } Reset(); }
void EnterEvadeMode(EvadeReason why) override { if (!_EnterEvadeMode(why)) return; if (!me->GetVehicle()) { if (Unit* owner = me->GetCharmerOrOwner()) { me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle()); } else { me->AddUnitState(UNIT_STATE_EVADE); me->GetMotionMaster()->MoveTargetedHome(); } } if (me->IsVehicle()) me->GetVehicleKit()->Reset(true); }
void EnterEvadeMode() { if (!wipeRaid) { summons.DespawnAll(); // remove players from phase instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PHASE_PUNCH_PHASE); instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BLACK_HOLE_PHASE); wipeRaid = true; me->InterruptNonMeleeSpells(true); DoCast(SPELL_ASCEND); return; } if (me->HasUnitState(UNIT_STAT_CASTING)) return; _EnterEvadeMode(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); }
void EnterEvadeMode() { Reset(); me->GetMotionMaster()->MoveTargetedHome(); if (Unit* head = vehicle->GetPassenger(0)) head->ToCreature()->ClearInCombat(); if (sTar) { //sTarget->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if (Unit* hTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) sTarget->JumpTo(hTarget,10); } if (instance) { instance->SetBossState(DATA_MAGMAW, FAIL); instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me); // Remove } _EnterEvadeMode(); }
void EnterEvadeMode(EvadeReason /*why*/) override { _EnterEvadeMode(); summons.DespawnAll(); _DespawnAtEvade(Seconds(10)); }
void EnterEvadeMode() { DoScriptText(SAY_WIPE, me); _EnterEvadeMode(); }
void EnterEvadeMode() override { Talk(SAY_WIPE); _EnterEvadeMode(); }
void EnterEvadeMode(EvadeReason /*why*/) override { Reset(); // teleport back first _EnterEvadeMode(); }
void EnterEvadeMode() { bCombat = false; _EnterEvadeMode(); Reset(); }
void Evade() { _EnterEvadeMode(); me->GetMotionMaster()->MoveTargetedHome(); Reset(); }
void EnterEvadeMode() { Talk(SAY_WIPE); _EnterEvadeMode(); }