void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (Unit* caster = GetCaster()) if (Unit* target = GetTarget()) if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) caster->CastSpell(target, SPELL_WATCH_CHARGE); }
void AfterRemove(AuraEffect const* eff, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; GetTarget()->CastSpell(nullptr, SPELL_DEATHBLOOM_FINAL_DAMAGE, CastSpellExtraArgs(eff).SetOriginalCaster(GetCasterGUID())); }
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { // Final heal only on duration end if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; // final heal int32 stack = GetStackAmount(); int32 healAmount = aurEff->GetAmount(); if (Unit* caster = GetCaster()) { healAmount = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), healAmount, HEAL, aurEff->GetSpellEffectInfo(), stack); healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, aurEff->GetSpellEffectInfo(), stack); GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID()); // restore mana std::vector<SpellInfo::CostData> costs = GetSpellInfo()->CalcPowerCost(caster, GetSpellInfo()->GetSchoolMask()); auto m = std::find_if(costs.begin(), costs.end(), [](SpellInfo::CostData const& cost) { return cost.Power == POWER_MANA; }); if (m != costs.end()) { int32 returnMana = m->Amount * stack / 2; caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, aurEff, GetCasterGUID()); } return; } GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID()); }
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) if (Unit* caster = GetCaster()) if (caster->ToCreature() && caster->isAlive()) caster->ToCreature()->DespawnOrUnsummon(1000); }
void AfterRemove(AuraEffect const* eff, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; GetTarget()->CastSpell(NULL, SPELL_DEATHBLOOM_FINAL_DAMAGE, true, NULL, eff, GetCasterGUID()); }
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); if (removeMode != AURA_REMOVE_BY_EXPIRE) return; int32 spell = 0; if (InstanceScript* instance = GetTarget()->GetInstanceScript()) { if (instance->instance->Is25ManRaid()) { if (instance->instance->IsHeroic()) spell = SPELL_SEARING_SEEDS_DMG_25H; else spell = SPELL_SEARING_SEEDS_DMG_25N; } else { if (instance->instance->IsHeroic()) spell = SPELL_SEARING_SEEDS_DMG_10H; else spell = SPELL_SEARING_SEEDS_DMG_10N; } } if (spell != 0) GetUnitOwner()->CastSpell(GetUnitOwner(),spell,true); }
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); Unit* caster = GetCaster(); if (target && target->ToPlayer() && caster && GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEATH) target->CastSpell(caster, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), true); }
void HandleEffectRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT) if (InstanceScript* instance = GetUnitOwner()->GetInstanceScript()) if (Creature* leotheras = ObjectAccessor::GetCreature(*GetUnitOwner(), instance->GetData64(NPC_LEOTHERAS_THE_BLIND))) leotheras->CastSpell(GetUnitOwner(), SPELL_CONSUMING_MADNESS, true); }
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; GetUnitOwner()->CastSpell(GetUnitOwner(), RAND(SPELL_SUMMON_HAISHULUD, SPELL_SUMMON_MATURE_BONE_SIFTER1, SPELL_SUMMON_MATURE_BONE_SIFTER3), true); }
//! This will be called when Right Arm (vehicle) has sustained a specific amount of damage depending on instance mode //! What we do here is remove all harmful aura's related and teleport to safe spot. void OnRemove(constAuraEffectPtr /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) return; if (!GetOwner()->ToCreature()) return; if (Vehicle * vehicle = GetOwner()->ToCreature()->GetVehicle()) { if (Unit* rightArm = vehicle->GetPassenger(1)) { if (Unit* pass = rightArm->GetVehicleKit()->GetPassenger(0)) { Position exitPosition; exitPosition.m_positionX = 1750.0f; exitPosition.m_positionY = -7.5f + frand(-3.0f, 3.0f); exitPosition.m_positionZ = 457.9322f; pass->_ExitVehicle(&exitPosition); pass->RemoveAurasDueToSpell(62056); Position oldPos; pass->GetPosition(&oldPos); pass->Relocate(exitPosition); pass->GetMotionMaster()->MoveFall(); pass->Relocate(oldPos); rightArm->GetVehicleKit()->Reset(); } } } }
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; if (Unit* target = GetTarget()) target->CastSpell(target, SPELL_WEB_WRAP_WRAPPED, true); }
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) return; if (Unit* caster = GetCaster()) caster->CastSpell(caster, SPELL_DK_SOUL_REAPER_HASTE, true); }
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (Creature* target = GetTarget()->ToCreature()) { AuraRemoveMode mode = GetTargetApplication()->GetRemoveMode(); if (mode == AURA_REMOVE_BY_ENEMY_SPELL || mode == AURA_REMOVE_BY_EXPIRE) target->AI()->DoAction(ACTION_REFRESH_DAMPEN); } }
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_UNK_31); GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH); if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) if (GetTarget()->IsAIEnabled) GetTarget()->GetAI()->DoAction(ACTION_DRAINED); }
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { // Final heal only on duration end if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; Unit* target = GetUnitOwner(); target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false); }
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); if (removeMode != AURA_REMOVE_BY_ENEMY_SPELL && removeMode != AURA_REMOVE_BY_EXPIRE) return; if (Unit* caster = GetCaster()) caster->CastSpell(GetTarget(), uint32(aurEff->GetAmount()), true, NULL, aurEff); }
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) return; if (GetTarget()->HasAura(SPELL_MAGE_SHATTERED_BARRIER_R1)) GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_SHATTERED_BARRIER_FREEZE_R1, true); else if (GetTarget()->HasAura(SPELL_MAGE_SHATTERED_BARRIER_R2)) GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_SHATTERED_BARRIER_FREEZE_R2, true); }
void HandleShareBuff (AuraEffect const* aurEff, AuraEffectHandleModes mode) { if (!GetTargetApplication()) return; if (!GetTargetApplication()->GetBase()) return; if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL) { if (Unit* target = GetTarget()) { CustomSpellValues values; values.AddSpellMod(SPELLVALUE_MAX_TARGETS, 2); values.AddSpellMod(SPELLVALUE_BASE_POINT1, GetTargetApplication()->GetBase()->GetDuration()); GetTarget()->CastCustomSpell(SPELL_WRACK_JUMP, values, NULL, TRIGGERED_FULL_MASK, NULL, NULL, GetCasterGUID()); } } }
void OnRemove(AuraEffect const * /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) if (auto target = GetTarget()->ToCreature()) if (target->GetEntry() == 60925) { target->RemoveAurasDueToSpell(106246); target->ForcedDespawn(); } }
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF)) if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f)) { target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF); finklestein->AI()->Talk(SAY_RUINED, target); } }
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEATH) return; if (GetTarget()->IsGuardian()) return; if (Unit* caster = GetCaster()) caster->CastSpell(caster, SPELL_LEECH_POISON_HEAL, true); }
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) return; if (Unit* caster = GetCaster()) { int32 amount = aurEff->GetAmount(); GetTarget()->CastCustomSpell(caster, WARLOCK_HAUNT_HEAL, &amount, NULL, NULL, true, NULL, aurEff, GetCasterGUID()); } }
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetCaster()) { AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); if (removeMode == AURA_REMOVE_BY_DEATH) GetCaster()->CastSpell(GetCaster(), SPELL_DK_SOUL_REAPER_HASTE, true); else if (removeMode == AURA_REMOVE_BY_EXPIRE && GetTarget()->GetHealthPct() < 35.0f) GetCaster()->CastSpell(GetTarget(), SPELL_DK_SOUL_REAPER_DAMAGE, true); } }
void HandleEffectRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) return; if (Unit* caster = GetCaster()) { int32 remainingDamage = aurEff->GetAmount() * (aurEff->GetTotalTicks() - aurEff->GetTickNumber()); if (remainingDamage > 0) caster->CastCustomSpell(SPELL_SHARED_SUFFERING_DISPEL, SPELLVALUE_BASE_POINT1, remainingDamage, GetTarget(), TRIGGERED_FULL_MASK); } }
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { if (!GetCaster()) return; AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); if (removeMode != AURA_REMOVE_BY_DEATH || !IsExpired()) return; if (GetCaster()->ToPlayer()->isHonorOrXPTarget(GetTarget())) GetCaster()->CastSpell(GetTarget(), SPELL_WARLOCK_CURSE_OF_DOOM_EFFECT, true, NULL, aurEff); }
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) // All-raid damage, 8-sec tick at time expire. { SpellInfo const* damageSpell = sSpellMgr->GetSpellInfo(SPELL_COUNTDOWN_DAMAGE); int32 damage = damageSpell->Effects[EFFECT_0].CalcValue(); damage = int32(damage); AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); if (removeMode == AURA_REMOVE_BY_DEATH || !IsExpired()) return; GetUnitOwner()->CastCustomSpell(SPELL_COUNTDOWN_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetUnitOwner(), true); }
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); if (removeMode != AURA_REMOVE_BY_ENEMY_SPELL && removeMode != AURA_REMOVE_BY_EXPIRE) return; if (Unit* caster = GetCaster()) { caster->CastSpell(GetTarget(), SPELL_MUTATING_EXPLOSION, true); GetTarget()->CastSpell(GetTarget(), SPELL_POISON_CLOUD, true, NULL, aurEff, GetCasterGUID()); } }
//! This will be called when Right Arm (vehicle) has sustained a specific amount of damage depending on instance mode //! What we do here is remove all harmful aura's related and teleport to safe spot. void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) return; if (!GetOwner()->ToCreature()) return; uint32 rubbleStalkerEntry = (GetOwner()->GetMap()->GetDifficulty() == DUNGEON_DIFFICULTY_NORMAL ? 33809 : 33942); Creature* rubbleStalker = GetOwner()->FindNearestCreature(rubbleStalkerEntry, 200.0f, true); if (rubbleStalker) rubbleStalker->CastSpell(rubbleStalker, SPELL_STONE_GRIP_CANCEL, true); }
//! This will be called when Right Arm (vehicle) has sustained a specific amount of damage depending on instance mode //! What we do here is remove all harmful aura's related and teleport to safe spot. void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) return; if (!GetOwner()->ToCreature()) return; if (Vehicle* vehicle = GetOwner()->ToCreature()->GetVehicleKit()) for (uint8 i = 0; i < 3; ++i) if (Unit* passenger = vehicle->GetPassenger(i)) passenger->ExitVehicle(); }
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL) return; if (Creature* target = GetTarget()->ToCreature()) { target->SetReactState(REACT_PASSIVE); target->AttackStop(); target->StopMoving(); target->CastSpell(target, SPELL_DARKFIEND_VISUAL, true); target->DespawnOrUnsummon(3000); } }