Jump to content

rastikzzz

Members
  • Posts

    34
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by rastikzzz

  1. What bug does the patch fix? What features does the patch add?

    there is mistake : SetFloatValue(UNIT_FIELD_POWER_COST_MODIFIER+i,0.0f);

    UNIT_FIELD_POWER_COST_MODIFIER is uint32 value, not float.

    UNIT_FIELD_POWER_COST_MODIFIER // Size: 7, Type: INT, Flags: PRIVATE, OWNER_ONLY

    For which repository revision was the patch created?

    76xx

    Is there a thread in the bug report section or at lighthouse?

    no

    Who has been writing this patch?

    rastikzzz

    diff --git a/src/game/Player.cpp b/src/game/Player.cpp
    index 97e198a..e5f8ed7 100644
    --- a/src/game/Player.cpp
    +++ b/src/game/Player.cpp
    @@ -2414,7 +2414,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
        SetUInt32Value(PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE,0);
        for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
        {
    -        SetFloatValue(UNIT_FIELD_POWER_COST_MODIFIER+i,0.0f);
    +        SetUInt32Value(UNIT_FIELD_POWER_COST_MODIFIER+i,0.0f);
            SetFloatValue(UNIT_FIELD_POWER_COST_MULTIPLIER+i,0.0f);
        }
        // Reset no reagent cost field
    

  2. 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

  3. update `spell_bonus_data` set `direct_bonus` = 0.6453 where `entry` = 33763;

    Lifebloom has a 0 coefficient for final heal, which is incorrect...

    lifebloom final heal is not working due to this check

    uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack)
    {
       // No heal amount for this class spells
       if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE)
           return healamount;

    so i changed it a bit

       if (spellProto->DmgClass == SPELL_DAMAGE_CLASS_NONE && spellProto->SpellFamilyName == SPELLFAMILY_GENERIC)
           return healamount;

    and now is working perfectly

    • * What bug does the patch fix? Cyclone isnt disableing spell tick on Healing over time spells that have been casted before target is affected by cyclone. (it correclty negate DOT spells tick as well friendly spells that are cast while target is already affected by cyclone)
      * What features does the patch add? Cyclone should negate all ticks from HOT spells.
      * For which repository revision was the patch created? 6767 (all)
      * Who has been writing this patch? Deedlit with the help of Mobel, who found out the problem and write some of this patch.

    Index: src/game/SpellAuras.cpp
    ===================================================================
    --- src/game/SpellAuras.cpp (revision 6767)
    +++ src/game/SpellAuras.cpp (working copy)
    @@ -5790,10 +5790,14 @@
    
                uint32 heal = pCaster->SpellHealingBonus(spellProto, uint32(new_damage * multiplier), DOT, pCaster);
    
    -            int32 gain = pCaster->ModifyHealth(heal);
    -            pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
    +           //only heal caster for leeched health if caster can be healed
    +           if(!(m_target->IsBanished()))
    +           {
    +               int32 gain = pCaster->ModifyHealth(heal);
    +                pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
    
    -            pCaster->SendHealSpellLog(pCaster, spellProto->Id, heal);
    +                pCaster->SendHealSpellLog(pCaster, spellProto->Id, heal);
    +           }
                break;
            }
            case SPELL_AURA_PERIODIC_HEAL:
    @@ -5806,6 +5810,9 @@
                // heal for caster damage (must be alive)
                if(m_target != pCaster && GetSpellProto()->SpellVisual==163 && !pCaster->isAlive())
                    return;
    +            //don't heal caster if banished
    +           if(m_target->IsBanished())
    +                return;
    
                // ignore non positive values (can be result apply spellmods to aura damage
                uint32 amount = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0;
    Index: src/game/Unit.cpp
    ===================================================================
    --- src/game/Unit.cpp   (revision 6767)
    +++ src/game/Unit.cpp   (working copy)
    @@ -10460,6 +10460,16 @@
        return GetSpellSpecific(getTransForm())==SPELL_MAGE_POLYMORPH;
    }
    
    +bool Unit::IsBanished() const
    +{
    +    AuraList const& mImmunityAuraList = GetAurasByType(SPELL_AURA_SCHOOL_IMMUNITY);
    +    for(AuraList::const_iterator i = mImmunityAuraList .begin();i != mImmunityAuraList .end(); ++i)
    +    {
    +        if (((*i)->GetSpellProto()->Mechanic) == MECHANIC_BANISH)
    +            return true;
    +    }
    +    return false;
    +}
    void Unit::SetDisplayId(uint32 modelId)
    {
        SetUInt32Value(UNIT_FIELD_DISPLAYID, modelId);
    Index: src/game/Unit.h
    ===================================================================
    --- src/game/Unit.h (revision 6767)
    +++ src/game/Unit.h (working copy)
    @@ -908,6 +908,7 @@
            bool isFeared()  const { return HasAuraType(SPELL_AURA_MOD_FEAR); }
            bool isInRoots() const { return HasAuraType(SPELL_AURA_MOD_ROOT); }
            bool IsPolymorphed() const;
    +         bool IsBanished() const;
    
            bool isFrozen() const;

    >With helper function Unit::IsBanished(), scans all unit's auras that cause school immunity and checks if one was applied by a spell with MECHANIC_BANISH

    >Changed immunity check to banish check in PeriodicTick();

    Did a little testing and it seems to properly deal with bandages, iceblock and cyclone,etc. Divine shield should work too.

    Other information: http://www.wowwiki.com/Cyclone

    you have error there, do not use if(!(m_target->IsBanished())), but try rather if(!(target->IsBanished())), there is even comment

    Unit* target = m_target;                        // aura can be deleted in DealDamage

    it will crash server if aura was deleted, because m_target do not exist

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