Jump to content

[fix] Guardian Spirit


Guest Lightguard

Recommended Posts

2

1

2

1

2

1

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0d79bde..e610563 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1724,7 +1724,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
            case SPELLFAMILY_PRIEST:
            {
                // Reflective Shield
-                if (spellProto->SpellFamilyFlags == 0x1)
+                if (spellProto->SpellFamilyFlags == 0x1 && spellProto->SpellIconID == 566)
                {
                    if (pVictim == this)
                        break;

Patchfile

Note: Reflective Shield has no SpellFamilyFlags that's why i used SpellIconID.

Link to comment
Share on other sites

the funny thing about this is, that

if (spellProto->SpellFamilyFlags == 0x1) is spellfamily of POWER WORD SHIELD, not reflective shield. as you can see in source a bit above :

    AuraList const& vSchoolAbsorb = pVictim->GetAurasByType(SPELL_AURA_SCHOOL_ABSORB);
   for(AuraList::const_iterator i = vSchoolAbsorb.begin(); i != vSchoolAbsorb.end() && RemainingDamage > 0; ++i)
   {
       Modifier* mod = (*i)->GetModifier();
       if (!(mod->m_miscvalue & schoolMask))
           continue;

       SpellEntry const* spellProto = (*i)->GetSpellProto();

spellproto is from aura that absorb dmg -> in this case power word shield. and power word shield has spell family flag = 0x1. so the code is correct

and you used spell icon id 566, whitch is the same for reflective shield and power word shield so it was still working.. But i never had problems with reflective shield, i dont know why is not working on your server

Link to comment
Share on other sites

Rev. 7487 with patch:

Compiling...
Unit.cpp
..\\..\\src\\game\\Unit.cpp(1727) : error C2146: syntax error : missing ')' before identifier 'SpellProto'
..\\..\\src\\game\\Unit.cpp(1727) : error C2065: 'SpellProto' : undeclared identifier
..\\..\\src\\game\\Unit.cpp(1727) : error C2227: left of '->SpellIconID' must point to class/struct/union/generic type
       type is ''unknown-type''
..\\..\\src\\game\\Unit.cpp(1727) : error C2059: syntax error : ')'
..\\..\\src\\game\\Unit.cpp(1728) : error C2143: syntax error : missing ';' before '{'

Without it, compiles normally.

Link to comment
Share on other sites

×
×
  • 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