mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-13 11:34:07 -04:00
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:
@@ -354,7 +354,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
|
||||
for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
|
||||
{
|
||||
AuraEffect* aurEff = *itr;
|
||||
if (aurEff->GetSpellProto()->SpellIconID == 1563)
|
||||
if (aurEff->GetSpellInfo()->SpellIconID == 1563)
|
||||
{
|
||||
switch (aurEff->GetEffIndex())
|
||||
{
|
||||
@@ -725,10 +725,10 @@ void Player::UpdateExpertise(WeaponAttackType attack)
|
||||
for (AuraEffectList::const_iterator itr = expAuras.begin(); itr != expAuras.end(); ++itr)
|
||||
{
|
||||
// item neutral spell
|
||||
if ((*itr)->GetSpellProto()->EquippedItemClass == -1)
|
||||
if ((*itr)->GetSpellInfo()->EquippedItemClass == -1)
|
||||
expertise += (*itr)->GetAmount();
|
||||
// item dependent spell
|
||||
else if (weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellProto()))
|
||||
else if (weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellInfo()))
|
||||
expertise += (*itr)->GetAmount();
|
||||
}
|
||||
|
||||
@@ -1016,8 +1016,8 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0);
|
||||
if (aurEff)
|
||||
{
|
||||
SpellEntry const* sProto = aurEff->GetSpellProto(); // Then get the SpellProto and add the dummy effect value
|
||||
AddPctN(mod, SpellMgr::CalculateSpellEffectAmount(sProto, 1)); // Ravenous Dead edits the original scale
|
||||
SpellInfo const* spellInfo = aurEff->GetSpellInfo(); // Then get the SpellProto and add the dummy effect value
|
||||
AddPctN(mod, spellInfo->Effects[EFFECT_1].CalcValue()); // Ravenous Dead edits the original scale
|
||||
}
|
||||
// Glyph of the Ghoul
|
||||
aurEff = owner->GetAuraEffect(58686, 0);
|
||||
@@ -1044,8 +1044,8 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
|
||||
if (itr != ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
AddPctN(mod, SpellMgr::CalculateSpellEffectAmount(sProto, 0));
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
AddPctN(mod, spellInfo->Effects[EFFECT_0].CalcValue());
|
||||
}
|
||||
}
|
||||
ownersBonus = float(owner->GetStat(stat)) * mod;
|
||||
@@ -1213,8 +1213,8 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
|
||||
|
||||
if (itr != ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += CalculatePctN(1.0f, SpellMgr::CalculateSpellEffectAmount(sProto, 1));
|
||||
SpellInfo const* sProto = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += CalculatePctN(1.0f, sProto->Effects[1].CalcValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1328,7 +1328,7 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
|
||||
Unit::AuraEffectList const& mDummy = GetAuraEffectsByType(SPELL_AURA_MOD_ATTACKSPEED);
|
||||
for (Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
|
||||
{
|
||||
switch ((*itr)->GetSpellProto()->Id)
|
||||
switch ((*itr)->GetSpellInfo()->Id)
|
||||
{
|
||||
case 61682:
|
||||
case 61683:
|
||||
|
||||
Reference in New Issue
Block a user