diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 59 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 6 |
7 files changed, 63 insertions, 16 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 94d2a95f618..db8a9a5ace2 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -278,7 +278,7 @@ class spell_gen_animal_blood : public SpellScriptLoader void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { // Remove all auras with spell id 46221, except the one currently being applied - while (Aura* aur = GetUnitOwner()->GetOwnedAura(SPELL_ANIMAL_BLOOD, 0, 0, 0, GetAura())) + while (Aura* aur = GetUnitOwner()->GetOwnedAura(SPELL_ANIMAL_BLOOD, ObjectGuid::Empty, ObjectGuid::Empty, 0, GetAura())) GetUnitOwner()->RemoveOwnedAura(aur); } diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index f72f6435b0c..d72c6d5c775 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -670,7 +670,7 @@ class spell_mage_glyph_of_icy_veins : public SpellScriptLoader { PreventDefaultAction(); - GetTarget()->RemoveAurasByType(SPELL_AURA_HASTE_SPELLS, 0, 0, true, false); + GetTarget()->RemoveAurasByType(SPELL_AURA_HASTE_SPELLS, ObjectGuid::Empty, 0, true, false); GetTarget()->RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED); } @@ -708,7 +708,7 @@ class spell_mage_glyph_of_polymorph : public SpellScriptLoader PreventDefaultAction(); Unit* target = eventInfo.GetProcTarget(); - target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. + target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, ObjectGuid::Empty, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); } diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 3bd61ddf465..0f78790bcee 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -710,7 +710,7 @@ class spell_pri_mind_sear : public SpellScriptLoader void FilterTargets(std::list<WorldObject*>& unitList) { - unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT))); + unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetChannelObjectGuid())); } void Register() override diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 92eeef5e8a8..9c65567fe7f 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -754,7 +754,7 @@ class spell_q12937_relief_for_the_fallen : public SpellScriptLoader if (Creature* target = GetHitCreature()) { caster->CastSpell(caster, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true, NULL); - caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER, 0); + caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER); target->DespawnOrUnsummon(); } } @@ -885,7 +885,7 @@ class spell_q12659_ahunaes_knife : public SpellScriptLoader if (Creature* target = GetHitCreature()) { target->DespawnOrUnsummon(); - caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY, 0); + caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY); } } @@ -929,7 +929,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader if (Creature* target = GetHitCreature()) if (target && !target->HasAura(SPELL_FLAMES)) { - caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0); + caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT); target->CastSpell(target, SPELL_FLAMES, true); target->DespawnOrUnsummon(60000); } @@ -973,7 +973,7 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader Player* caster = GetCaster()->ToPlayer(); if (Creature* target = GetHitCreature()) { - caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT, 0); + caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT); target->CastSpell(target, uint32(GetEffectValue()), true); target->DespawnOrUnsummon(2000); } @@ -1016,7 +1016,7 @@ class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader Unit* caster = GetCaster(); if (caster->IsVehicle()) if (Unit* player = caster->GetVehicleKit()->GetPassenger(0)) - player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC, 0); + player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC); } void Register() override @@ -1356,7 +1356,7 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad if (Vehicle* vehicle = caster->GetVehicleKit()) if (Unit* passenger = vehicle->GetPassenger(0)) if (Player* player = passenger->ToPlayer()) - player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT, 0); + player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT); } void Register() override @@ -2348,6 +2348,52 @@ class spell_q14100_q14111_make_player_destroy_totems : public SpellScriptLoader } }; +enum Fumping +{ + SPELL_SUMMON_SAND_GNOME = 39240, + SPELL_SUMMON_BONE_SLICER = 39241 +}; + +// 39238 - Fumping +class spell_q10929_fumping : SpellScriptLoader +{ + public: + spell_q10929_fumping() : SpellScriptLoader("spell_q10929_fumping") { } + + class spell_q10929_fumpingAuraScript : public AuraScript + { + PrepareAuraScript(spell_q10929_fumpingAuraScript); + + bool Validate(SpellInfo const* /*spell*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SAND_GNOME)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_BONE_SLICER)) + return false; + return true; + } + + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + if (Unit* caster = GetCaster()) + caster->CastSpell(caster, urand(SPELL_SUMMON_SAND_GNOME, SPELL_SUMMON_BONE_SLICER), true); + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_q10929_fumpingAuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_q10929_fumpingAuraScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2405,4 +2451,5 @@ void AddSC_quest_spell_scripts() new spell_q12919_gymers_throw(); new spell_q13400_illidan_kill_master(); new spell_q14100_q14111_make_player_destroy_totems(); + new spell_q10929_fumping(); } diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index e8546c4214e..175a3c4f361 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -400,7 +400,7 @@ class spell_rog_killing_spree : public SpellScriptLoader { while (!_targets.empty()) { - uint64 guid = Trinity::Containers::SelectRandomContainerElement(_targets); + ObjectGuid guid = Trinity::Containers::SelectRandomContainerElement(_targets); if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid)) { GetTarget()->CastSpell(target, SPELL_ROGUE_KILLING_SPREE_TELEPORT, true); @@ -431,7 +431,7 @@ class spell_rog_killing_spree : public SpellScriptLoader } private: - std::list<uint64> _targets; + GuidList _targets; }; AuraScript* GetAuraScript() const override diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 4c6e2b942da..42acb474169 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1001,7 +1001,7 @@ class spell_warl_seduction : public SpellScriptLoader { if (caster->GetOwner() && caster->GetOwner()->HasAura(SPELL_WARLOCK_GLYPH_OF_SUCCUBUS)) { - target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. + target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, ObjectGuid::Empty, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); } diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index ecbc6ca1bdc..4bf57d116fe 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -245,13 +245,13 @@ class spell_warr_deep_wounds : public SpellScriptLoader ApplyPct(damage, 16 * GetSpellInfo()->GetRank()); SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC); - uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude; + uint32 ticks = uint32(spellInfo->GetDuration()) / spellInfo->Effects[EFFECT_0].Amplitude; // Add remaining ticks to damage done if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, EFFECT_0, caster->GetGUID())) - damage += aurEff->GetDamage() * (ticks - aurEff->GetTickNumber()); + damage += aurEff->GetDamage() * int32(ticks - aurEff->GetTickNumber()); - damage /= ticks; + damage /= int32(ticks); caster->CastCustomSpell(target, SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, &damage, NULL, NULL, true); } |
