Closed cala closed 5 years ago
Give me 10 minutes.
@cala My proposed change: void SpellAuraHolder::SetStackAmount(uint32 stackAmount, Unit* newCaster)
int32 baseAmount = aur->GetModifier()->m_baseAmount;
int32 amount = m_stackAmount * baseAmount;
// Reapply if amount change
if (!baseAmount || amount != aur->GetModifier()->m_amount)
{
aur->SetRemoveMode(AURA_REMOVE_BY_GAINED_STACK);
if (IsAuraRemoveOnStacking(this->GetSpellProto(), aur->GetEffIndex()))
aur->ApplyModifier(false, true);
aur->GetModifier()->m_amount = amount;
aur->GetModifier()->m_recentAmount = baseAmount * (stackAmount - oldStackAmount);
aur->ApplyModifier(true, true);
}
The dummy has 0 in base amount and amount. There are 29 such spells in tbc. select Id,SpellName from spell_template where StackAmount>0 AND Effect1 = 6 AND EffectBasePoints1=0 AND EffectRealPointsPerLevel1=0 AND EffectBaseDice1=0 AND EffectBasePoints1=0;
Well spotted, I did not investigate the logic in the (base) amount values! Your fix works like a charm. 👍
There are 8 spells in Classic that match the query above. Four of them are the Four Horsemen mark spells, three more are related to an AQ20 mechanics that should also gain from this fix. There is only one spell 27673 (Five Fat Finger Exploding Heart Technique) that I don't know of. The spell is commented out in the core and does nothing.
So, if you are fine with it, I'll push your fix to all three branches. Thanks for looking at it this quickly.
Five Fat Finger Exploding Heart Technique is from BRD https://www.wowhead.com/npc=16049/lefty and its a kill bill reference.
Thanks. One more Classic NPC I don't know of (even though I did BRD numerous times for librams or forging MC gear).
From what I understand from the description of the NPC, this spell should have the same mechanics than Horsemen marks, so I think we can push your fix if you have no objection.
Yes, you can go ahead and push it.
Current behavior:
Four Horsemen encounter uses a mechanics where a stacking dummy aura is applied to players. Every time the aura is applied, players should take damages based on the amount of stacks. The relevant code lives in
void Aura::HandleAuraDummy(bool apply, bool Real)
. (see https://github.com/cmangos/mangos-classic/commit/7051c539fa1533d2bf92d744c539165f192053e2)However, this code is only executed once: when the aura is first applied. All others stacks do not run this code and instead execute
bool SpellAuraHolder::ModStackAmount(int32 num, Unit* newCaster)
and thenvoid SpellAuraHolder::SetStackAmount(uint32 stackAmount, Unit* newCaster)
The code handling this two differents cases lives in
bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)
.Poking @killerwife as I think he is the man for this question. I see two main options to fix this:
Aura::HandleAuraDummy
toSpellAuraHolder::SetStackAmount
(and I don't think this is proper)Unit::AddSpellAuraHolder
instead of just updating stack amount, at least for dummy auras as they are supposed to have custom effects (I like this one better but I would value your opinion here)What do you think?
Expected behavior:
Four Horsemen encounter uses a mechanics where a stacking dummy aura is applied to players. Every time the aura is applied, players do take damages based on the amount of stacks.
Steps to reproduce:
.gm on
.go creature blaumeux
Aura::HandleAuraDummy
for the first and only timeClient version: Classic 1.12.1 (not tested with TBC and WotLK but should also be relevant there)
Commit hash: https://github.com/cmangos/mangos-classic/commit/7051c539fa1533d2bf92d744c539165f192053e2
Database version:
Classic DB 1.9
Operating system: mac OS / Win 7