Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo *GetSpellProto is now GetSpellInfo *SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].* *sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo() *SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff() *SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class. *GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections *code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
This commit is contained in:
1 parent
29c228a801
commit
b0fe236265
195 files changed
+4630
-6929
No files matched your search
@@ -49,13 +49,13 @@ public:
|
||||
class spell_hun_chimera_shot_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_chimera_shot_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_SERPENT))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SERPENT))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_VIPER))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_VIPER))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(HUNTER_SPELL_CHIMERA_SHOT_SCORPID))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_CHIMERA_SHOT_SCORPID))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
continue;
|
||||
|
||||
// Search only Serpent Sting, Viper Sting, Scorpid Sting auras
|
||||
flag96 familyFlag = aura->GetSpellProto()->SpellFamilyFlags;
|
||||
flag96 familyFlag = aura->GetSpellInfo()->SpellFamilyFlags;
|
||||
if (!(familyFlag[1] & 0x00000080 || familyFlag[0] & 0x0000C000))
|
||||
continue;
|
||||
if (AuraEffect const* aurEff = aura->GetEffect(0))
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
{
|
||||
int32 TickCount = aurEff->GetTotalTicks();
|
||||
spellId = HUNTER_SPELL_CHIMERA_SHOT_SERPENT;
|
||||
basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellProto(), aurEff->GetAmount(), DOT, aura->GetStackAmount());
|
||||
basePoint = caster->SpellDamageBonus(unitTarget, aura->GetSpellInfo(), aurEff->GetAmount(), DOT, aura->GetStackAmount());
|
||||
ApplyPctN(basePoint, TickCount * 40);
|
||||
}
|
||||
// Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting.
|
||||
@@ -145,9 +145,9 @@ public:
|
||||
class spell_hun_invigoration_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_invigoration_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(HUNTER_SPELL_INVIGORATION_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_INVIGORATION_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -180,9 +180,9 @@ public:
|
||||
class spell_hun_last_stand_pet_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_last_stand_pet_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_LAST_STAND_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -215,13 +215,13 @@ public:
|
||||
class spell_hun_masters_call_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_masters_call_SpellScript)
|
||||
bool Validate(SpellEntry const* spellEntry)
|
||||
bool Validate(SpellInfo const* spellEntry)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(HUNTER_SPELL_MASTERS_CALL_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_SPELL_MASTERS_CALL_TRIGGERED))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(spellEntry, EFFECT_0)))
|
||||
if (!sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_0].CalcValue()))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(SpellMgr::CalculateSpellEffectAmount(spellEntry, EFFECT_1)))
|
||||
if (!sSpellMgr->GetSpellInfo(spellEntry->Effects[EFFECT_1].CalcValue()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
if (Unit* ally = GetTargetUnit())
|
||||
{
|
||||
target->CastSpell(ally, GetEffectValue(), true);
|
||||
target->CastSpell(ally, SpellMgr::CalculateSpellEffectAmount(GetSpellInfo(), EFFECT_0), true);
|
||||
target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,14 +273,14 @@ public:
|
||||
const SpellCooldowns& cm = caster->ToPlayer()->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
|
||||
///! If spellId in cooldown map isn't valid, the above will return a null pointer.
|
||||
if (spellInfo &&
|
||||
spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
|
||||
spellInfo->Id != HUNTER_SPELL_READINESS &&
|
||||
spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH &&
|
||||
GetSpellRecoveryTime(spellInfo) > 0)
|
||||
spellInfo->GetRecoveryTime() > 0)
|
||||
caster->ToPlayer()->RemoveSpellCooldown((itr++)->first, true);
|
||||
else
|
||||
++itr;
|
||||
@@ -348,11 +348,11 @@ public:
|
||||
class spell_hun_sniper_training_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_hun_sniper_training_AuraScript)
|
||||
bool Validate(SpellEntry const* /*entry*/)
|
||||
bool Validate(SpellInfo const* /*entry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_SNIPER_TRAINING_R1))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_R1))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(SPELL_SNIPER_TRAINING_BUFF_R1))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SNIPER_TRAINING_BUFF_R1))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -372,8 +372,8 @@ public:
|
||||
Unit* target = GetTarget();
|
||||
if (!target->HasAura(spellId))
|
||||
{
|
||||
SpellEntry const* triggeredSpellInfo = sSpellStore.LookupEntry(spellId);
|
||||
Unit* triggerCaster = GetTriggeredSpellCaster(triggeredSpellInfo, caster, target);
|
||||
SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
Unit* triggerCaster = triggeredSpellInfo->IsRequiringSelectedTarget() ? caster : target;
|
||||
triggerCaster->CastSpell(target, triggeredSpellInfo, true, 0, aurEff);
|
||||
}
|
||||
}
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
{
|
||||
int32 baseAmount = aurEff->GetBaseAmount();
|
||||
int32 amount = playerTarget->isMoving() ?
|
||||
target->CalculateSpellDamage(target, GetSpellProto(), aurEff->GetEffIndex(), &baseAmount) :
|
||||
target->CalculateSpellDamage(target, GetSpellInfo(), aurEff->GetEffIndex(), &baseAmount) :
|
||||
aurEff->GetAmount() - 1;
|
||||
aurEff->SetAmount(amount);
|
||||
}
|
||||
@@ -412,11 +412,11 @@ public:
|
||||
class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED))
|
||||
return false;
|
||||
if (!sSpellStore.LookupEntry(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -459,9 +459,9 @@ public:
|
||||
class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
|
||||
if (!sSpellMgr->GetSpellInfo(HUNTER_PET_SPELL_CARRION_FEEDER_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user