mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Scripts/Spells): Remove some magic numbers (#13193)
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
#include "SpellScript.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
enum MassiveSeaforiumCharge
|
||||
{
|
||||
ITEM_MASSIVE_SEAFORIUM_CHARGE = 39213,
|
||||
};
|
||||
|
||||
class spell_item_massive_seaforium_charge : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_item_massive_seaforium_charge);
|
||||
@@ -41,7 +46,7 @@ class spell_item_massive_seaforium_charge : public SpellScript
|
||||
return;
|
||||
|
||||
Player* target = GetHitUnit()->ToPlayer();
|
||||
target->DestroyItemCount(39213, 1, true);
|
||||
target->DestroyItemCount(ITEM_MASSIVE_SEAFORIUM_CHARGE, 1, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -136,6 +141,11 @@ class spell_item_mind_amplify_dish : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum RunescrollOfFortitude
|
||||
{
|
||||
SPELL_FORTITUDE = 72590,
|
||||
};
|
||||
|
||||
class spell_item_runescroll_of_fortitude : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_item_runescroll_of_fortitude)
|
||||
@@ -149,7 +159,7 @@ class spell_item_runescroll_of_fortitude : public SpellScript
|
||||
if (target->getLevel() < 70)
|
||||
return;
|
||||
|
||||
target->CastSpell(target, 72590, true); // Stamina spell (Fortitude)
|
||||
target->CastSpell(target, SPELL_FORTITUDE, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +169,12 @@ class spell_item_runescroll_of_fortitude : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum BrannsCommunicator
|
||||
{
|
||||
NPC_BRANN_BRONZEBEARD = 29579,
|
||||
SPELL_CONTACT_BRANN = 55038,
|
||||
};
|
||||
|
||||
class spell_item_branns_communicator : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_item_branns_communicator)
|
||||
@@ -169,8 +185,8 @@ class spell_item_branns_communicator : public SpellScript
|
||||
|
||||
if (Player* target = GetHitPlayer())
|
||||
{
|
||||
target->KilledMonsterCredit(29579); // Brann's entry
|
||||
target->CastSpell(target, 55038, true); // Brann summoning spell
|
||||
target->KilledMonsterCredit(NPC_BRANN_BRONZEBEARD); // Brann's entry
|
||||
target->CastSpell(target, SPELL_CONTACT_BRANN, true); // Brann summoning spell
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2301,6 +2317,7 @@ enum Shadowmourne
|
||||
SPELL_SHADOWMOURNE_VISUAL_LOW = 72521,
|
||||
SPELL_SHADOWMOURNE_VISUAL_HIGH = 72523,
|
||||
SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF = 73422,
|
||||
SPELL_BLOOD_PLAGUE = 55078,
|
||||
};
|
||||
|
||||
// 71903 - Item - Shadowmourne Legendary
|
||||
@@ -2336,7 +2353,7 @@ class spell_item_shadowmourne : public AuraScript
|
||||
}
|
||||
else if (procSpell->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT)
|
||||
{
|
||||
if (procSpell->Id != 55078 /*Blood Plague*/)
|
||||
if (procSpell->Id != SPELL_BLOOD_PLAGUE)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user