mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells
* Removed deprecated dbc field and properly initialize ManaCostPerlevel * Corrected order of required shapeshift form fields
This commit is contained in:
@@ -1884,9 +1884,9 @@ struct SpellShapeshiftFormEntry
|
||||
struct SpellShapeshiftEntry
|
||||
{
|
||||
uint32 Id; // 0 - m_ID
|
||||
uint32 Stances; // 1 - m_shapeshiftMask
|
||||
// uint32 unk_320_2; // 2 - 3.2.0
|
||||
uint32 StancesNot; // 3 - m_shapeshiftExclude
|
||||
// uint32 unk_320_2; // 2 - 3.2.0
|
||||
uint32 Stances; // 1 - m_shapeshiftMask
|
||||
// uint32 unk_320_3; // 4 - 3.2.0
|
||||
// uint32 StanceBarOrder; // 5 - m_stanceBarOrder not used
|
||||
};
|
||||
|
||||
@@ -352,7 +352,7 @@ m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0),
|
||||
m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1),
|
||||
m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false)
|
||||
{
|
||||
if (m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel)
|
||||
if (m_spellInfo->ManaPerSecond)
|
||||
m_timeCla = 1 * IN_MILLISECONDS;
|
||||
|
||||
m_maxDuration = CalcMaxDuration(caster);
|
||||
@@ -681,7 +681,7 @@ void Aura::Update(uint32 diff, Unit* caster)
|
||||
m_timeCla -= diff;
|
||||
else if (caster)
|
||||
{
|
||||
if (int32 manaPerSecond = m_spellInfo->ManaPerSecond + m_spellInfo->ManaPerSecondPerLevel * caster->getLevel())
|
||||
if (int32 manaPerSecond = m_spellInfo->ManaPerSecond)
|
||||
{
|
||||
m_timeCla += 1000 - diff;
|
||||
|
||||
@@ -749,7 +749,7 @@ void Aura::RefreshDuration()
|
||||
{
|
||||
SetDuration(GetMaxDuration());
|
||||
|
||||
if (m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel)
|
||||
if (m_spellInfo->ManaPerSecond)
|
||||
m_timeCla = 1 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
|
||||
@@ -981,8 +981,9 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry)
|
||||
// SpellPowerEntry
|
||||
SpellPowerEntry const* _power = GetSpellPower();
|
||||
ManaCost = _power ? _power->manaCost : 0;
|
||||
ManaPerSecond = _power ? _power->manaPerSecond : 0;
|
||||
ManaCostPerlevel = _power ? _power->manaCostPerlevel : 0;
|
||||
ManaCostPercentage = _power ? _power->ManaCostPercentage : 0;
|
||||
ManaPerSecond = _power ? _power->manaPerSecond : 0;
|
||||
|
||||
// SpellReagentsEntry
|
||||
SpellReagentsEntry const* _reagents = GetSpellReagents();
|
||||
|
||||
@@ -358,7 +358,6 @@ public:
|
||||
uint32 ManaCost;
|
||||
uint32 ManaCostPerlevel;
|
||||
uint32 ManaPerSecond;
|
||||
uint32 ManaPerSecondPerLevel;
|
||||
uint32 ManaCostPercentage;
|
||||
uint32 RuneCostID;
|
||||
SpellRangeEntry const* RangeEntry;
|
||||
|
||||
Reference in New Issue
Block a user