mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 13:37:08 +00:00
[8161] Partial revert and fix of my prev. commit in Aura::SetStackAmount
* Aura should be refreshed also when stackAmount == m_stackAmount this fixing problem that aura not refreshed if you have already full stack and cast "stack spell" again on target Thanks Corfen for problem reporting and testing Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
aed2a9f9b3
commit
45eda48693
2 changed files with 12 additions and 13 deletions
|
|
@ -1178,16 +1178,14 @@ void Aura::SendAuraUpdate(bool remove)
|
||||||
|
|
||||||
void Aura::SetStackAmount(uint8 stackAmount)
|
void Aura::SetStackAmount(uint8 stackAmount)
|
||||||
{
|
{
|
||||||
if (stackAmount == m_stackAmount)
|
|
||||||
// Nothing changed
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit *target = GetTarget();
|
Unit *target = GetTarget();
|
||||||
Unit *caster = GetCaster();
|
Unit *caster = GetCaster();
|
||||||
if (!target || !caster)
|
if (!target || !caster)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool refresh = stackAmount > m_stackAmount;
|
bool refresh = stackAmount >= m_stackAmount;
|
||||||
|
if (stackAmount != m_stackAmount)
|
||||||
|
{
|
||||||
m_stackAmount = stackAmount;
|
m_stackAmount = stackAmount;
|
||||||
int32 amount = m_stackAmount * caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_currentBasePoints, target);
|
int32 amount = m_stackAmount * caster->CalculateSpellDamage(m_spellProto, m_effIndex, m_currentBasePoints, target);
|
||||||
// Reapply if amount change
|
// Reapply if amount change
|
||||||
|
|
@ -1197,6 +1195,7 @@ void Aura::SetStackAmount(uint8 stackAmount)
|
||||||
m_modifier.m_amount = amount;
|
m_modifier.m_amount = amount;
|
||||||
ApplyModifier(true, true);
|
ApplyModifier(true, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (refresh)
|
if (refresh)
|
||||||
// Stack increased refresh duration
|
// Stack increased refresh duration
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8160"
|
#define REVISION_NR "8161"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue