void HandleScriptEffect(SpellEffIndex /*effIndex*/) { if (roll_chance_i(chance)) GetCaster()->CastSpell(GetHitUnit(), SHAMAN_SPELL_EARTHQUAKE_KNOCKDOWN, true); }
void HandleScriptEffect(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); for (uint8 i = 0; i < 4; ++i) GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue() + i), true); }
void CountTarget(SpellEffIndex /*effIndex*/) { ++_targetCount; GetCaster()->GetAI()->SetGUID(GetHitUnit()->GetGUID(), DATA_SPIKE_IMMUNE); }
void NotifyTargets() { if (Creature* caster = GetCaster()->ToCreature()) if (Unit* target = GetHitUnit()) caster->AI()->Talk(EMOTE_MUTATED_INFECTION, target->GetGUID()); }
void HandleScript(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); if (Unit* target = GetHitUnit()) target->CastSpell(target, GetEffectValue(), false); }
void HandleScriptEffect(SpellEffIndex /*effIndex*/) { Unit* caster = GetCaster(); if (Unit* unitTarget = GetHitUnit()) { uint32 spellId = 0; int32 basePoint = 0; Unit::AuraApplicationMap& Auras = unitTarget->GetAppliedAuras(); for (Unit::AuraApplicationMap::iterator i = Auras.begin(); i != Auras.end(); ++i) { Aura* aura = i->second->GetBase(); if (aura->GetCasterGUID() != caster->GetGUID()) continue; // Search only Serpent Sting, Viper Sting, Scorpid Sting auras flag96 familyFlag = aura->GetSpellInfo()->SpellFamilyFlags; if (!(familyFlag[1] & 0x00000080 || familyFlag[0] & 0x0000C000)) continue; if (AuraEffect* aurEff = aura->GetEffect(0)) { // Serpent Sting - Instantly deals 40% of the damage done by your Serpent Sting. if (familyFlag[0] & 0x4000) { int32 TickCount = aurEff->GetTotalTicks(); spellId = SPELL_HUNTER_CHIMERA_SHOT_SERPENT; basePoint = aurEff->GetDamage(); ApplyPct(basePoint, TickCount * 40); basePoint = unitTarget->SpellDamageBonusTaken(caster, aura->GetSpellInfo(), basePoint, DOT, aura->GetStackAmount()); // Recalculate bonus damage on roll. uint32 damage = std::max(aurEff->GetAmount(), 0); sScriptMgr->ModifyPeriodicDamageAurasTick(unitTarget, caster, damage); aurEff->SetDamage(caster->SpellDamageBonusDone(unitTarget, aurEff->GetSpellInfo(), damage, DOT) * aurEff->GetDonePct()); } // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. else if (familyFlag[1] & 0x00000080) { int32 TickCount = aura->GetEffect(0)->GetTotalTicks(); spellId = SPELL_HUNTER_CHIMERA_SHOT_VIPER; // Amount of one aura tick basePoint = int32(CalculatePct(unitTarget->GetMaxPower(POWER_MANA), aurEff->GetAmount())); int32 casterBasePoint = aurEff->GetAmount() * unitTarget->GetMaxPower(POWER_MANA) / 50; /// @todo WTF? caster uses unitTarget? if (basePoint > casterBasePoint) basePoint = casterBasePoint; ApplyPct(basePoint, TickCount * 60); } // Scorpid Sting - Attempts to Disarm the target for 10 sec. This effect cannot occur more than once per 1 minute. else if (familyFlag[0] & 0x00008000) spellId = SPELL_HUNTER_CHIMERA_SHOT_SCORPID; // ?? nothing say in spell desc (possibly need addition check) //if (familyFlag & 0x0000010000000000LL || // dot // familyFlag & 0x0000100000000000LL) // stun //{ // spellId = 53366; // 53366 Chimera Shot - Wyvern //} // Refresh aura duration aura->RefreshDuration(); } break; } if (spellId) caster->CastCustomSpell(unitTarget, spellId, &basePoint, 0, 0, true); if (spellId == SPELL_HUNTER_CHIMERA_SHOT_SCORPID && caster->ToPlayer()) // Scorpid Sting - Add 1 minute cooldown caster->ToPlayer()->AddSpellCooldown(spellId, 0, uint32(time(NULL) + 60)); } }
void HandleScript(SpellEffIndex /*effIndex*/) { GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true); }
void HandleScriptEffect(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) target->GetAI()->DoAction(ACTION_FLY_DOWN); }
void HandleScript(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) target->RemoveAura(SPELL_GIFT_OF_THARON_JA); }
void HandleScript(SpellEffIndex /*effIndex*/) { Unit* caster = GetCaster(); if (Unit* target = GetHitUnit()) caster->CastSpell(target, uint32(GetEffectValue()), true); }
void HandleScriptEffect(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) target->CastSpell(target, SPELL_SUMMON_LIQUID_FIRE, true); }
void HandleEffect(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); float curThreat = GetCaster()->getThreatManager().getThreat(GetHitUnit(), true); GetCaster()->getThreatManager().addThreat(GetHitUnit(), -curThreat + 50000.0f / std::min(1.0f, GetCaster()->GetDistance(GetHitUnit()))); }
void TurnBird(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); GetHitUnit()->PlayOneShotAnimKit(ANIM_KIT_BIRD_TURN); }
void HandleDummy(SpellEffIndex /*effIndex*/) { Unit* caster = GetCaster(); if (Unit* unitTarget = GetHitUnit()) caster->CastSpell(unitTarget, SPELL_ROGUE_SHIV_TRIGGERED, true); }
void HandleEffect(SpellEffIndex /*effIndex*/) { GetCaster()->CastSpell(GetHitUnit(), SPELL_GENERIC_DISMOUNT, true); GetCaster()->CastSpell(GetHitUnit(), SPELL_TRUE_FULFILLMENT_2, true); }
void HandleDummy(SpellEffIndex /*effIndex*/) { uint32 roll = urand(1, 100); uint8 ev; if (roll <= 50) ev = EVENT_MISS; else if (roll <= 83) ev = EVENT_HIT; else ev = EVENT_MISS_BIRD; Unit* shooter = GetCaster(); Creature* wilhelm = GetHitUnit()->ToCreature(); Creature* apple = shooter->FindNearestCreature(NPC_APPLE, 30); Creature* drostan = shooter->FindNearestCreature(NPC_DROSTAN, 30); if (!wilhelm || !apple || !drostan) return; switch (ev) { case EVENT_MISS_BIRD: { Creature* crunchy = shooter->FindNearestCreature(NPC_CRUNCHY, 30); Creature* bird = shooter->FindNearestCreature(NPC_THICKBIRD, 30); if (!bird || !crunchy) ; // fall to EVENT_MISS else { shooter->CastSpell(bird, SPELL_MISS_BIRD_APPLE); bird->CastSpell(bird, SPELL_BIRD_FALL); wilhelm->AI()->Talk(SAY_WILHELM_MISS); drostan->AI()->Talk(SAY_DROSTAN_REPLY_MISS); bird->Kill(bird); crunchy->GetMotionMaster()->MovePoint(0, bird->GetPositionX(), bird->GetPositionY(), bird->GetMap()->GetWaterOrGroundLevel(bird->GetPositionX(), bird->GetPositionY(), bird->GetPositionZ())); /// @todo Make crunchy perform emote eat when he reaches the bird break; } } case EVENT_MISS: { shooter->CastSpell(wilhelm, SPELL_MISS_APPLE); wilhelm->AI()->Talk(SAY_WILHELM_MISS); drostan->AI()->Talk(SAY_DROSTAN_REPLY_MISS); break; } case EVENT_HIT: { shooter->CastSpell(apple, SPELL_HIT_APPLE); apple->CastSpell(apple, SPELL_APPLE_FALL); wilhelm->AI()->Talk(SAY_WILHELM_HIT); if (Player* player = shooter->ToPlayer()) player->KilledMonsterCredit(NPC_APPLE); apple->DespawnOrUnsummon(); break; } } }
void HandleDummy(SpellEffIndex /*effIndex*/) { if (Unit* unitTarget = GetHitUnit()) if (SpellInfo const* spell_proto = sSpellMgr->GetSpellInfo(GetEffectValue())) GetCaster()->CastSpell(unitTarget, spell_proto, true, NULL); }
void HandleDummy(SpellEffIndex effIndex) { if (Unit *unitTarget = GetHitUnit()) if (unitTarget->GetTypeId() == TYPEID_UNIT) unitTarget->CastSpell(unitTarget, spell_list[urand(0, 5)], true); }
void HandleScript(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); GetHitUnit()->CastSpell(GetHitUnit(), GetEffectValue(), false); }
void HandleDummy(SpellEffIndex /*effIndex*/) { int32 bp0 = GetEffectValue(); if (GetHitUnit()) GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_SLAM, &bp0, NULL, NULL, true, 0); }
void HandleDummy(SpellEffIndex /*effIndex*/) { uint32 spellid = RAND(SPELL_BREW, SPELL_GHOSTLY, RAND(SPELL_HEX1, SPELL_HEX2, SPELL_HEX3), SPELL_GROW, SPELL_LAUNCH); if (Unit* target = GetHitUnit()) GetCaster()->CastSpell(target, spellid, false); }
void HandleEffect(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_FROST, true); }
void RecalculateDamage() { SetHitDamage(GetHitUnit()->CountPctFromMaxHealth(GetHitDamage())); }
void HandleScriptEffect(SpellEffIndex /*effIndex*/) { if (Unit* target = GetHitUnit()) target->CastSpell(GetCaster(), SPELL_BEAM_CHANNEL, true); }
void HandleScriptEffect(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true); }
void HandleDummy(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); GetCaster()->CastSpell(GetHitUnit(), SPELL_FLAME_BEACON, true); GetCaster()->CastSpell(GetHitUnit(), SPELL_CONFLAGRATION_2, false); }
void RecalculateDamage() { SetHitDamage(int32(GetHitDamage() / std::max(sqrtf(GetHitUnit()->GetExactDist2d(GetCaster())), 1.0f))); }
void HandleScript(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true); GetHitUnit()->GetMotionMaster()->MovePoint(POINT_LAND, SavianaRagefireLandPos); }
void HandleAfterHit() { if (Unit* unitTarget = GetHitUnit()) unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH)); }
void HandleScript(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); if (Unit* target = GetHitUnit()) target->CastSpell(target, SPELL_BLAZE_SUMMON, true); }