void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (Unit* caster = GetCaster()) { int32 damage; switch (GetStackAmount()) { case 1: damage = 0; break; case 2: damage = 500; break; case 3: damage = 1000; break; case 4: damage = 1500; break; case 5: damage = 4000; break; case 6: damage = 12000; break; default: damage = 20000 + 1000 * (GetStackAmount() - 7); break; } if (damage) caster->CastCustomSpell(SPELL_MARK_DAMAGE, SPELLVALUE_BASE_POINT0, damage, GetTarget()); } }
void ExtraEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { GetTarget()->CastSpell(GetTarget(), SPELL_INOCULATED, true); if (InstanceScript* instance = GetTarget()->GetInstanceScript()) if (Creature* festergut = ObjectAccessor::GetCreature(*GetTarget(), instance->GetData64(DATA_FESTERGUT))) festergut->AI()->SetData(DATA_INOCULATED_STACK, GetStackAmount()); }
void OnUpdate(uint32 diff, AuraEffectPtr aurEff) { if (GetCaster()) { if (GetCaster()->HasAura(EYE_OF_THE_EMPRESS)) { if (GetStackAmount() >= 5) { GetCaster()->RemoveAura(EYE_OF_THE_EMPRESS); // transform GetCaster()->AddAura(TRANSFORM_AURA, GetCaster()); if (Creature* boss = GetCaster()->FindNearestCreature(62837, 100.0f, true)) { if (boss_empress_shekzeer::boss_empress_shekzeerAI* linkAI = CAST_AI(boss_empress_shekzeer::boss_empress_shekzeerAI, boss->GetAI())) { if (!linkAI->SayCharmed) { linkAI->SayCharmed = true; } } } } } } }
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 OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { if (GetStackAmount() == 5) { GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_FIRE, true, NULL, aurEff); GetTarget()->RemoveAura(GetId()); } }
void HandlePeriodic(AuraEffect const* aurEff) { PreventDefaultAction(); if (GetStackAmount() >= 5) { SetDuration(0); GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SNAKE_WRAP, true); } }
void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes mode) { PreventDefaultAction(); Aura* aura = aurEff->GetBase(); if (aura->GetStackAmount() == 1) aura->Remove(AURA_REMOVE_BY_DEFAULT); else aura->SetStackAmount(GetStackAmount() - 1); }
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); if (target->GetTypeId() == TYPEID_PLAYER) if (GetStackAmount() == GetSpellInfo()->StackAmount) { Remove(); target->CastSpell(target, SPELL_WORGENS_CALL, true); } }
void HandlePeriodicTick(AuraEffect const* /*aurEff*/) { if (GetStackAmount() < 2) return; Unit* caster = GetCaster(); /// @todo the caster should be boss but not the player if (!caster || !caster->GetAI()) return; caster->GetAI()->SetGUID(GetTarget()->GetGUID(), DATA_INTENSE_COLD); }
void HandleEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { if (Unit* caster = GetCaster()) { int32 mana = int32(aurEff->GetAmount() * std::pow(2.0f, GetStackAmount())); // mana restore - bp * 2^stackamount int32 damage = mana * 2; caster->CastCustomSpell(GetTarget(), SPELL_SARONITE_VAPORS_ENERGIZE, &mana, NULL, NULL, true); caster->CastCustomSpell(GetTarget(), SPELL_SARONITE_VAPORS_DAMAGE, &damage, NULL, NULL, true); } }
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { Unit* caster = GetCaster(); if (!caster) return; int32 damage = int32(200 * pow(2.0f, GetStackAmount())); caster->CastCustomSpell(caster, SPELL_BITING_COLD_DAMAGE, &damage, NULL, NULL, true); if (caster->isMoving()) caster->RemoveAuraFromStack(SPELL_BITING_COLD_TRIGGERED); }
void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetStackAmount() == 15) { Unit* target = GetTarget(); // store target because aura gets removed target->CastSpell(target, SPELL_EXPLOSIVE_BARRAGE_DAMAGE, false); target->RemoveAurasDueToSpell(SPELL_HASTY_GROW); target->RemoveAurasDueToSpell(SPELL_AUTO_GROW); target->RemoveAurasDueToSpell(SPELL_EXPLODING_ORB); if (Creature* creature = target->ToCreature()) creature->DespawnOrUnsummon(); } }
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { Unit* caster = GetCaster(); if (!caster) return; int32 damage = int32(200 * std::pow(2.0f, GetStackAmount())); CastSpellExtraArgs args(TRIGGERED_FULL_MASK); args.AddSpellBP0(damage); caster->CastSpell(caster, SPELL_BITING_COLD_DAMAGE, args); if (caster->isMoving()) caster->RemoveAuraFromStack(SPELL_BITING_COLD_TRIGGERED); }
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); if (GetStackAmount() == 101) { target->RemoveAura(SPELL_RAM_LEVEL_NEUTRAL); target->RemoveAura(SPELL_RAM_TROT); target->RemoveAura(SPELL_RAM_CANTER); target->RemoveAura(SPELL_RAM_GALLOP); target->RemoveAura(SPELL_GIDDYUP); target->CastSpell(target, SPELL_EXHAUSTED_RAM, true); } }
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Player* player = GetTarget()->ToPlayer(); if (!player) return; if ((player->HasAura(SPELL_TORCH_TOSSING_TRAINING) && GetStackAmount() == 8) || (player->HasAura(SPELL_TORCH_TOSSING_PRACTICE) && GetStackAmount() == 20)) { if (player->GetTeam() == ALLIANCE) player->CastSpell(player, SPELL_TORCH_TOSSING_TRAINING_SUCCESS_ALLIANCE, true); else if (player->GetTeam() == HORDE) player->CastSpell(player, SPELL_TORCH_TOSSING_TRAINING_SUCCESS_HORDE, true); Remove(); } }
void OnStackChange(AuraEffect const* /*aurEff*/, AuraApplication const* aurApp, AuraEffectHandleModes /*mode*/) { Unit* target = aurApp->GetTarget(); if (!target) return; switch (GetStackAmount()) { case 1: target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_LOW, true); break; case 6: target->RemoveAurasDueToSpell(SPELL_SHADOWMOURNE_VISUAL_LOW); target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_HIGH, true); break; case 10: target->RemoveAurasDueToSpell(SPELL_SHADOWMOURNE_VISUAL_HIGH); target->CastSpell(target, SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF, true); break; } }
void OnChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { Unit* target = GetTarget(); if (!target->HasAura(SPELL_RENTAL_RACING_RAM)) { target->RemoveAura(GetId()); return; } if (target->HasAura(SPELL_EXHAUSTED_RAM)) return; switch (GetStackAmount()) { case 1: // green target->RemoveAura(SPELL_RAM_LEVEL_NEUTRAL); target->RemoveAura(SPELL_RAM_CANTER); target->CastSpell(target, SPELL_RAM_TROT, true); break; case 6: // yellow target->RemoveAura(SPELL_RAM_TROT); target->RemoveAura(SPELL_RAM_GALLOP); target->CastSpell(target, SPELL_RAM_CANTER, true); break; case 11: // red target->RemoveAura(SPELL_RAM_CANTER); target->CastSpell(target, SPELL_RAM_GALLOP, true); break; default: break; } if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEFAULT) { target->RemoveAura(SPELL_RAM_TROT); target->CastSpell(target, SPELL_RAM_LEVEL_NEUTRAL, true); } }
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, stack); healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, stack); GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID()); // restore mana int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * 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 HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (GetStackAmount() == GetSpellInfo()->StackAmount) GetTarget()->CastSpell(GetTarget(), 93683, true); }
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) { PreventDefaultAction(); Unit* healer = eventInfo.GetProcTarget(); if (healer->HasAura(SPELL_VITAL_FLAME)) return; bool is25ManHeroic = healer->GetMap()->IsHeroic() && healer->GetMap()->Is25ManRaid(); uint32 stacks = healer->GetAuraCount(SPELL_VITAL_SPARK) + std::min(uint8(ceil(GetStackAmount() / (is25ManHeroic ? 5.0 : 3.0))), uint8(255)); healer->SetAuraStack(SPELL_VITAL_SPARK, healer, stacks); if (Aura* aura = healer->GetAura(SPELL_VITAL_SPARK)) aura->RefreshDuration(); }