Jump to content

[patch][6194] fix For Totems Summoned By Spells W/o Damage


Recommended Posts

Posted

Hello,

Mangos Rev: 6154

with this patch a totem summoned by a spell without damage will keep the health values from DB

Indeed , in the source code, the totem recieve the damage value for his hp (damage value into spell information)

The matter is that the spell information damage has no value.

Totem has 0 hp and when he's spawn , mangos consider that totem is dead. So player can't see it.

Example: SpellID 42452-plant Captured Totem

Index: src/game/SpellEffects.cpp
    ===================================================================
    --- src/game/SpellEffects.cpp        (revision 6154)
    +++ src/game/SpellEffects.cpp        (working copy)
    @@ -4541,8 +4541,11 @@
                       modOwner->ApplySpellMod(m_spellInfo->Id,SPELLMOD_DURATION, duration);
               pTotem->SetDuration(duration);
       
    -        pTotem->SetMaxHealth(damage);
    -        pTotem->SetHealth(damage);
    +        if (damage)
    +        {
    +                pTotem->SetMaxHealth(damage);
    +                pTotem->SetHealth(damage);
    +        }
               pTotem->SetUInt32Value(UNIT_CREATED_BY_SPELL,m_spellInfo->Id);
               pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);

PS: sorry for my bad english

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