Jump to content

Stealth disabled with hots


Guest texen

Recommended Posts

This is what I wrote for this annoying bug, hacky but I couldnt find real source of it too, stealth has procflag & PROC_FLAG_ON_TAKE_PERIODIC but problem is with

- Taken spell periodic (damage / healing, determined from 14-17 flags) mangos doesnt determine whether its damage or healing (and I dont know wtf these 14-17 flags are..)

this code doesnt break anything but it doesnt change that its hacky and damage mismatch for proc may be bugging not only stealth...

diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
index 95bab48..838b6d7 100644
--- a/src/game/UnitAuraProcHandler.cpp
+++ b/src/game/UnitAuraProcHandler.cpp
@@ -383,6 +383,19 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, SpellAuraHolder* holder, S
        if (!allow)
            return false;
    }
+
+    if (EventProcFlag & PROC_FLAG_ON_TAKE_PERIODIC && GetTypeId() == TYPEID_PLAYER && procSpell && IsPositiveSpell(procSpell->Id))
+    {
+        bool allow = true;
+        for(int i = 0; i < 3; ++i)
+            if(Aura * pAur = holder->GetAuraByEffectIndex(SpellEffectIndex(i)))
+                if(pAur->GetModifier()->m_auraname == SPELL_AURA_MOD_STEALTH)
+                    allow = false;
+
+        if (!allow)
+            return false;
+    }
+
    // Aura added by spell can`t trogger from self (prevent drop charges/do triggers)
    // But except periodic triggers (can triggered from self)
    if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags & PROC_FLAG_ON_TAKE_PERIODIC))

Link to comment
Share on other sites

as i see this is fixed in [10522]

no, it isnt

Anyone has tested this? it's secure?

no , it s break some healing procs(beacon of light for example)

we need something like

 
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
{
bool positive = (!triggered_spell_id && IsPositiveSpell(aurEff->GetId()) && aurEff->GetBase()->GetCharges()) ||
                               // check for positive auras that triggers unknown spells (Blessing Recovery, etc...)
                               (!sSpellStore.LookupEntry(triggered_spell_id) && IsPositiveSpell(aurEff->GetId())) ||
                               // final check for positive triggered spell
                               IsPositiveSpell(triggered_spell_id);
               if (!damage && (procExtra & PROC_EX_ABSORB) && isVictim && positive)
                   continue;

in Unit:: ProcDamageAndSpellFor

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use