Jump to content

DiSlord

Members
  • Posts

    59
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by DiSlord

  1. I replace

    +                                        GetSpellProto()->Mechanic != MECHANIC_BLEED &&
    +                                        GetSpellProto()->EffectMechanic[GetEffIndex()] != MECHANIC_BLEED

    by more correct

    GetEffectMechanic(GetSpellProto(), m_effIndex) != MECHANIC_BLEED

    Patch in 6104 thank you

  2. Arcane Missle aura trigger have TargetA = TARGET_SINGLE_ENEMY and its detect as POSITIVE target and spell -> so can`t be resisted -> fix it

    TARGET_SINGLE_ENEMY target type have spells (all of them now can be resisted and detect as non positive spells)

    Arcane Missle

    35108 - Electrified Net (Mekgineer Steamrigger boss cast)

    43363 - Electrified Net (?? cast)

    13481 - Tame Beast

    36311 - Scan Ground Effect (Eye of Culuthas boss)

    So i think nothing broked if add this:

    Index: SpellMgr.cpp
    ===================================================================
    --- SpellMgr.cpp        (revision 5740)
    +++ SpellMgr.cpp        (working copy)
    @@ -281,6 +281,7 @@
                    case TARGET_IN_FRONT_OF_CASTER:
                    case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
                    case TARGET_CURRENT_SELECTED_ENEMY:
    +                case TARGET_SINGLE_ENEMY:
                            return false;
                    case TARGET_ALL_AROUND_CASTER:
                            return (targetB == TARGET_ALL_PARTY || targetB == TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER);

  3. Show charges in player buffs (example Lighting Shield or Inner Fire)

    Base idea by TERRANZ

    Code by me :)

    Index: SpellAuras.cpp
    ===================================================================
    --- SpellAuras.cpp        (revision 5688)
    +++ SpellAuras.cpp        (working copy)
    @@ -790,7 +790,7 @@
    
            // we can found aura in NULL_AURA_SLOT and then need store state instead check slot != NULL_AURA_SLOT
            bool samespell = false;
    -
    +        bool secondaura = false;
            uint8 slot = NULL_AURA_SLOT;
    
            for(uint8 i = 0; i < 3; i++)
    @@ -802,6 +802,8 @@
                            if(itr->second->GetCasterGUID()==GetCasterGUID())
                            {
                                    samespell = true;
    +                                if (m_effIndex > itr->second->GetEffIndex())
    +                                         secondaura = true;
                                    slot = itr->second->GetAuraSlot();
                                    break;
                            }
    @@ -865,6 +867,9 @@
                                    SetAuraFlag(slot, true);
                                    SetAuraLevel(slot,caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
    
    +                                if (m_procCharges >= 1)                            // Add charge count (as aura stack count) for show in client
    +                                        SetAuraApplication(slot, m_procCharges - 1);
    +
                                    // update for out of range group members
                                    m_target->UpdateAuraForGroup(slot);
                            }
    @@ -875,7 +880,9 @@
                    else                                                                                                // use found slot
                    {
                            SetAuraSlot( slot );
    -                        UpdateSlotCounterAndDuration(true);
    +                        // Not recalculate stack count for second aura of the same spell
    +                        if (!secondaura)
    +                                UpdateSlotCounterAndDuration(true);
                    }
    
                    // Update Seals information
    @@ -935,6 +942,7 @@
                            if(itr->second->GetAuraSlot()==slot)
                            {
                                    samespell = true;
    +
                                    break;
                            }
                    }
    @@ -949,6 +957,7 @@
                    SetAuraFlag(slot, false);
                    SetAuraLevel(slot,caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
    
    +                SetAuraApplication(slot, 0);
                    // update for out of range group members
                    m_target->UpdateAuraForGroup(slot);
    
    @@ -1019,7 +1028,7 @@
            uint32 byte         = (slot % 4) * 8;
            uint32 val            = m_target->GetUInt32Value(UNIT_FIELD_AURAAPPLICATIONS + index);
            val &= ~(0xFF << byte);
    -        val |= (count << byte);
    +        val |= ((uint8(count)) << byte);
            m_target->SetUInt32Value(UNIT_FIELD_AURAAPPLICATIONS + index, val);
    }
    
    @@ -3165,7 +3174,10 @@
                    // some spell have charges by functionality not have its in spell data
                    switch (m_spellId)
                    {
    -                        case 28200: m_procCharges = 6; break;                     // Ascendance (Talisman of Ascendance trinket
    +                        case 28200:                                                 // Ascendance (Talisman of Ascendance trinket
    +                                m_procCharges = 6; 
    +                                UpdateAuraCharges(); 
    +                                break;
                            default: break;
                    }
            }
    Index: SpellAuras.h
    ===================================================================
    --- SpellAuras.h        (revision 5688)
    +++ SpellAuras.h        (working copy)
    @@ -239,6 +239,12 @@
    
                    uint8 GetAuraSlot() const { return m_auraSlot; }
                    void SetAuraSlot(uint8 slot) { m_auraSlot = slot; }
    +                void UpdateAuraCharges()
    +                {
    +                        uint8 slot = GetAuraSlot();
    +                        if (slot < MAX_AURAS && m_procCharges >= 1)
    +                                SetAuraApplication(slot, m_procCharges - 1);
    +                }
    
                    bool IsPositive() { return m_positive; }
                    void SetNegative() { m_positive = false; }
    Index: Unit.cpp
    ===================================================================
    --- Unit.cpp        (revision 5688)
    +++ Unit.cpp        (working copy)
    @@ -9499,6 +9499,22 @@
                                            break;
                                    }
                            }
    +                        // Update charge (aura can be removed by triggers)
    +                        // Not validate aura on check (for speed)
    +                        if(i->triggeredByAura->m_procCharges > 0)
    +                        {
    +                                // need found aura (can be dropped by triggers)
    +                                AuraMap::const_iterator lower = GetAuras().lower_bound(i->triggeredByAura_SpellPair);
    +                                AuraMap::const_iterator upper = GetAuras().upper_bound(i->triggeredByAura_SpellPair);
    +                                for(AuraMap::const_iterator itr = lower; itr!= upper; ++itr)
    +                                {
    +                                        if(itr->second == i->triggeredByAura)
    +                                        {
    +                                                i->triggeredByAura->UpdateAuraCharges();
    +                                                break;
    +                                        }
    +                                }
    +                        }
                    }
    
                    // Safely remove auras with zero charges

    http://pastebin.ca/994899

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