diff options
author | ccrs <ccrs@users.noreply.github.com> | 2019-06-24 13:32:43 +0200 |
---|---|---|
committer | ccrs <ccrs@users.noreply.github.com> | 2019-06-24 13:32:43 +0200 |
commit | 4a8736b82924acf109970d317aa493b19914cea1 (patch) | |
tree | fdd1a3720e8ee5025f10a1064947286795f2fa3f /src | |
parent | 3c77c04b052f721efb96bdaaceeca8de09926f12 (diff) |
Scripts/Misc: couple corrections to the recent PRs
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/zone_borean_tundra.cpp | 28 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 54 |
2 files changed, 51 insertions, 31 deletions
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 7033fa74310..6a8e3a2f708 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -16,30 +16,14 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Borean_Tundra -SD%Complete: 100 -SDCategory: Borean Tundra -EndScriptData */ - -/* ContentData -npc_iruk -npc_corastrasza -npc_sinkhole_kill_credit -npc_khunok_the_behemoth -npc_nerubar_victim -npc_nesingwary_trapper -npc_lurgglbr -EndContentData */ - #include "ScriptMgr.h" +#include "CreatureAIImpl.h" #include "GameObject.h" #include "MotionMaster.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Player.h" #include "QuestDef.h" -#include "CreatureAIImpl.h" #include "ScriptedEscortAI.h" #include "ScriptedFollowerAI.h" #include "ScriptedGossip.h" @@ -2551,12 +2535,10 @@ class spell_q11653_shortening_blaster : public SpellScript Unit* caster = GetCaster(); Unit* target = GetHitUnit(); - uint32 spellId = RAND(SPELL_SHORTENING_BLASTER_BIGGER1, SPELL_SHORTENING_BLASTER_SHRUNK1, - SPELL_SHORTENING_BLASTER_YELLOW1, - SPELL_SHORTENING_BLASTER_GHOST1, SPELL_SHORTENING_BLASTER_POLYMORPH1); - uint32 spellId2 = RAND(SPELL_SHORTENING_BLASTER_BIGGER2, SPELL_SHORTENING_BLASTER_SHRUNK2, - SPELL_SHORTENING_BLASTER_YELLOW2, - SPELL_SHORTENING_BLASTER_GHOST2, SPELL_SHORTENING_BLASTER_POLYMORPH2); + uint32 spellId = RAND(SPELL_SHORTENING_BLASTER_BIGGER1, SPELL_SHORTENING_BLASTER_SHRUNK1, SPELL_SHORTENING_BLASTER_YELLOW1, + SPELL_SHORTENING_BLASTER_GHOST1, SPELL_SHORTENING_BLASTER_POLYMORPH1); + uint32 spellId2 = RAND(SPELL_SHORTENING_BLASTER_BIGGER2, SPELL_SHORTENING_BLASTER_SHRUNK2, SPELL_SHORTENING_BLASTER_YELLOW2, + SPELL_SHORTENING_BLASTER_GHOST2, SPELL_SHORTENING_BLASTER_POLYMORPH2); caster->CastSpell(caster, spellId, true); target->CastSpell(target, spellId2, true); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 9a2062a475d..c2454d5b9e1 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -22,9 +22,14 @@ */ #include "ScriptMgr.h" +#include "Creature.h" +#include "Errors.h" #include "GridNotifiers.h" #include "Player.h" +#include "Random.h" +#include "SharedDefines.h" #include "SpellAuraEffects.h" +#include "SpellDefines.h" #include "SpellMgr.h" #include "SpellScript.h" #include "TemporarySummon.h" @@ -62,7 +67,13 @@ enum PriestSpells SPELL_PRIEST_BLESSED_HEALING = 70772, SPELL_PRIEST_MIND_BLAST_R1 = 8092, SPELL_PRIEST_SHADOW_WORD_DEATH_R1 = 32379, - SPELL_PRIEST_MIND_FLAY_DAMAGE = 58381 + SPELL_PRIEST_MIND_FLAY_DAMAGE = 58381, + SPELL_PRIEST_LIGHTWELL_RENEW_R1 = 7001, + SPELL_PRIEST_LIGHTWELL_RENEW_R2 = 27873, + SPELL_PRIEST_LIGHTWELL_RENEW_R3 = 27874, + SPELL_PRIEST_LIGHTWELL_RENEW_R4 = 28276, + SPELL_PRIEST_LIGHTWELL_RENEW_R5 = 48084, + SPELL_PRIEST_LIGHTWELL_RENEW_R6 = 48085, }; enum PriestSpellIcons @@ -72,7 +83,7 @@ enum PriestSpellIcons PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874, }; -enum Mics +enum PriestMisc { PRIEST_LIGHTWELL_NPC_1 = 31897, PRIEST_LIGHTWELL_NPC_2 = 31896, @@ -695,6 +706,19 @@ class spell_pri_lightwell : public SpellScript { PrepareSpellScript(spell_pri_lightwell); + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_PRIEST_LIGHTWELL_RENEW_R1, + SPELL_PRIEST_LIGHTWELL_RENEW_R2, + SPELL_PRIEST_LIGHTWELL_RENEW_R3, + SPELL_PRIEST_LIGHTWELL_RENEW_R4, + SPELL_PRIEST_LIGHTWELL_RENEW_R5, + SPELL_PRIEST_LIGHTWELL_RENEW_R6 + }); + } + bool Load() override { return GetCaster()->GetTypeId() == TYPEID_UNIT; @@ -709,12 +733,26 @@ class spell_pri_lightwell : public SpellScript uint32 lightwellRenew = 0; switch (caster->GetEntry()) { - case PRIEST_LIGHTWELL_NPC_1: lightwellRenew = 7001; break; - case PRIEST_LIGHTWELL_NPC_2: lightwellRenew = 27873; break; - case PRIEST_LIGHTWELL_NPC_3: lightwellRenew = 27874; break; - case PRIEST_LIGHTWELL_NPC_4: lightwellRenew = 28276; break; - case PRIEST_LIGHTWELL_NPC_5: lightwellRenew = 48084; break; - case PRIEST_LIGHTWELL_NPC_6: lightwellRenew = 48085; break; + case PRIEST_LIGHTWELL_NPC_1: + lightwellRenew = SPELL_PRIEST_LIGHTWELL_RENEW_R1; + break; + case PRIEST_LIGHTWELL_NPC_2: + lightwellRenew = SPELL_PRIEST_LIGHTWELL_RENEW_R2; + break; + case PRIEST_LIGHTWELL_NPC_3: + lightwellRenew = SPELL_PRIEST_LIGHTWELL_RENEW_R3; + break; + case PRIEST_LIGHTWELL_NPC_4: + lightwellRenew = SPELL_PRIEST_LIGHTWELL_RENEW_R4; + break; + case PRIEST_LIGHTWELL_NPC_5: + lightwellRenew = SPELL_PRIEST_LIGHTWELL_RENEW_R5; + break; + case PRIEST_LIGHTWELL_NPC_6: + lightwellRenew = SPELL_PRIEST_LIGHTWELL_RENEW_R6; + break; + default: + return; } // proc a spellcast |