mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9742] Final cleanup in non proper now EffectBasePoints use.
This commit is contained in:
parent
958edb65f7
commit
ee0089826d
4 changed files with 10 additions and 9 deletions
|
|
@ -384,7 +384,7 @@ m_isRemovedOnShapeLost(true), m_in_use(0), m_deleted(false)
|
|||
|
||||
m_spellProto = spellproto;
|
||||
|
||||
m_currentBasePoints = currentBasePoints ? *currentBasePoints : m_spellProto->EffectBasePoints[eff] + 1;
|
||||
m_currentBasePoints = currentBasePoints ? *currentBasePoints : m_spellProto->CalculateSimpleValue(eff);
|
||||
|
||||
m_isPassive = IsPassiveSpell(GetId());
|
||||
m_positive = IsPositiveEffect(GetId(), m_effIndex);
|
||||
|
|
@ -397,7 +397,7 @@ m_isRemovedOnShapeLost(true), m_in_use(0), m_deleted(false)
|
|||
if(!caster)
|
||||
{
|
||||
m_caster_guid = target->GetGUID();
|
||||
damage = m_currentBasePoints; // stored value-1
|
||||
damage = m_currentBasePoints;
|
||||
m_maxduration = target->CalculateSpellDuration(m_spellProto, m_effIndex, target);
|
||||
}
|
||||
else
|
||||
|
|
@ -818,7 +818,7 @@ void AreaAura::Update(uint32 diff)
|
|||
int32 actualBasePoints = m_currentBasePoints;
|
||||
// recalculate basepoints for lower rank (all AreaAura spell not use custom basepoints?)
|
||||
if(actualSpellInfo != GetSpellProto())
|
||||
actualBasePoints = actualSpellInfo->EffectBasePoints[m_effIndex];
|
||||
actualBasePoints = actualSpellInfo->CalculateSimpleValue(m_effIndex);
|
||||
AreaAura *aur = new AreaAura(actualSpellInfo, m_effIndex, &actualBasePoints, (*tIter), caster, NULL);
|
||||
aur->SetAuraDuration(GetAuraDuration());
|
||||
(*tIter)->AddAura(aur);
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ class MANGOS_DLL_SPEC Aura
|
|||
uint64 m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted
|
||||
time_t m_applyTime;
|
||||
|
||||
int32 m_currentBasePoints; // cache SpellEntry::EffectBasePoints and use for set custom base points
|
||||
int32 m_currentBasePoints; // cache SpellEntry::EffectBasePoints+1 and use for set custom base points
|
||||
int32 m_maxduration; // Max aura duration
|
||||
int32 m_duration; // Current time
|
||||
int32 m_timeCla; // Timer for power per sec calcultion
|
||||
|
|
|
|||
|
|
@ -1985,8 +1985,9 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||
spellProto->Id == 60218) // Essence of Gossamer
|
||||
{
|
||||
// Max absorb stored in 1 dummy effect
|
||||
if (spellProto->EffectBasePoints[EFFECT_INDEX_1] < currentAbsorb)
|
||||
currentAbsorb = spellProto->EffectBasePoints[EFFECT_INDEX_1];
|
||||
uint32 max_absorb = spellProto->CalculateSimpleValue(EFFECT_INDEX_1);
|
||||
if (max_absorb < currentAbsorb)
|
||||
currentAbsorb = max_absorb;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -6540,7 +6541,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
{
|
||||
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
|
||||
{
|
||||
int32 mana = procSpell->EffectBasePoints[i];
|
||||
int32 mana = procSpell->CalculateSimpleValue(SpellEffectIndex(i));
|
||||
CastCustomSpell(this, 54986, NULL, &mana, NULL, true, castItem, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
|
|
@ -7252,7 +7253,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
// 27526; - drain mana if possible
|
||||
case 43820: // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket)
|
||||
// Pct value stored in dummy
|
||||
basepoints[0] = pVictim->GetCreateHealth() * auraSpellInfo->EffectBasePoints[EFFECT_INDEX_1] / 100;
|
||||
basepoints[0] = pVictim->GetCreateHealth() * auraSpellInfo->CalculateSimpleValue(EFFECT_INDEX_1) / 100;
|
||||
target = pVictim;
|
||||
break;
|
||||
//case 45205: break; // Copy Offhand Weapon
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9741"
|
||||
#define REVISION_NR "9742"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue