Jump to content

Sarjuuk

Members
  • Posts

    99
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Posts posted by Sarjuuk

  1. yay, for more visual appeal (:

    for master @ 1f4ddbf71ad2ef824b30aa0a639685f2ed61601c :

    http://paste2.org/p/691723

    for 0.12 @ 66809ac9576d359c416b442c3104819ba287b72a :

    http://paste2.org/p/691730

    it would be nice, if someone with a player-base, could actually test the master-version a bit more in depths.

    /e: got SegFaults .. apparently GetCaster() can be NULL..... diffs updated manually.

    Thanks to DasMy, for throwing crashlogs at me.

  2. got finally around to test this.

    Weapon cast buffs are stacking, other item-cast Auras are not.

    diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
    index 6d02ea4..e078127 100644
    --- a/src/game/SpellAuras.cpp
    +++ b/src/game/SpellAuras.cpp
    @@ -849,8 +849,9 @@ void Aura::_AddAura()
            Unit::spellEffectPair spair = Unit::spellEffectPair(GetId(), i);
            for(Unit::AuraMap::const_iterator itr = m_target->GetAuras().lower_bound(spair); itr != m_target->GetAuras().upper_bound(spair); ++itr)
            {
    -            // allow use single slot only by auras from same caster
    -            if(itr->second->GetCasterGUID()==GetCasterGUID())
    +            // allow use single slot only by auras from same caster (and item)
    +            if (itr->second->GetCasterGUID() == GetCasterGUID() &&
    +                itr->second->GetCastItemGUID() == GetCastItemGUID())
                {
                    samespell = true;
                    if (m_effIndex > itr->second->GetEffIndex())
    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 076f6e7..fd3d0a5 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -3657,11 +3657,25 @@ bool Unit::AddAura(Aura *Aur)
                // if StackAmount==0 not allow auras from same caster
                else
                {
    +                bool isWeaponCastAura = false;
    +                if (GetTypeId() == TYPEID_PLAYER)
    +                {
    +                    if (Item* castItem = ((Player*)this)->GetItemByGuid(Aur->GetCastItemGUID()))
    +                    {
    +                        if (castItem->GetPos() == ((INVENTORY_SLOT_BAG_0<<8) + EQUIPMENT_SLOT_MAINHAND) ||
    +                            castItem->GetPos() == ((INVENTORY_SLOT_BAG_0<<8) + EQUIPMENT_SLOT_OFFHAND))
    +                                isWeaponCastAura = true;
    +                    }
    +                }
                    for(AuraMap::iterator i2 = m_Auras.lower_bound(spair); i2 != m_Auras.upper_bound(spair); ++i2)
                    {
                        Aura* aur2 = i2->second;
                        if(aur2->GetCasterGUID()==Aur->GetCasterGUID())
                        {
    +                        // proced Auras may stack, if their Source-Item differ
    +                        if (aur2->GetCastItemGUID() != Aur->GetCastItemGUID() && isWeaponCastAura)
    +                            continue;
    +
                            // Carry over removed Aura's remaining damage if Aura still has ticks remaining
                            if (!aurSpellInfo->StackAmount && aur2->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_STACK_DOT_MODIFIER &&
                                aurName == SPELL_AURA_PERIODIC_DAMAGE && aur2->GetAuraDuration() > 0)
    

    I'll try to get this for master too.

  3. aaarg..!

    thats not what i meant :(

    This Talent got intentionally changed, to prevent Powershifting:

    For example, you depleted your energy and instead of waiting for it to regenerate, you could shift out and in Cat Form again, to have a chance of (20*rank)% to set your energy to 40. Simple trading of Mana for Energy.

    How it works now (r9040):

    You powershift and have a chance of 100% to set your energy to 20*rank. (effectively 100)

    So, it just got worse...

    How it should work:

    Think of it, like Mana. You cant see it, but its still there and regenerating after the usual rules (5sec-Spirit-regen. ect)

    Lets asume, you have 3/5 points in this talent ("[..]you keep up to 60 Energy[..]") and shift out of Cat Form to cast a spell with 2sec casttime, to shift into Cat Form immediately after.

    with 60 Energy out:

    - regenerates 20 Energy while casting

    - now 80 Energy > 60 allowed by Talent => Energy is set to 60

    with 40 Energy out:

    - still 20 energy silently regenerated while casting the spell.

    - now 60 Energy = 60 allowed by Talent => Final outcome is 60

    with 20 Energy out:

    - regenerates 20 Energy while out of Form

    - now 40 Energy < 60 Allowed by Talent => Energy is left at 40

    I hope, that made it clearer :)

  4. What bug does the patch fix?

    Units with this aura being oneshotted by magic damage

    (yes this one is actually used by SD2 (or at least should be^^))

    For which repository revision was the patch created?

    r8958

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

    was reported via IRC

    Who has been writing this patch?

    me

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 70837d2..7817993 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -1995,12 +1995,18 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
                currentAbsorb = RemainingDamage;
    
            float manaMultiplier = (*i)->GetSpellProto()->EffectMultipleValue[(*i)->GetEffIndex()];
    -        if(Player *modOwner = pVictim->GetSpellModOwner())
    -            modOwner->ApplySpellMod((*i)->GetId(), SPELLMOD_MULTIPLE_VALUE, manaMultiplier);
    +        if(manaMultiplier)
    +        {
    +            if(Player *modOwner = pVictim->GetSpellModOwner())
    +                modOwner->ApplySpellMod((*i)->GetId(), SPELLMOD_MULTIPLE_VALUE, manaMultiplier);
    +
    +            int32 maxAbsorb = int32(pVictim->GetPower(POWER_MANA) / manaMultiplier);
    +            if (currentAbsorb > maxAbsorb)
    +                currentAbsorb = maxAbsorb;
    
    -        int32 maxAbsorb = int32(pVictim->GetPower(POWER_MANA) / manaMultiplier);
    -        if (currentAbsorb > maxAbsorb)
    -            currentAbsorb = maxAbsorb;
    +            int32 manaReduction = int32(currentAbsorb * manaMultiplier);
    +            pVictim->ApplyPowerMod(POWER_MANA, manaReduction, false);
    +        }
    
            (*i)->GetModifier()->m_amount -= currentAbsorb;
            if((*i)->GetModifier()->m_amount <= 0)
    @@ -2009,9 +2015,6 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
                next = vManaShield.begin();
            }
    
    -        int32 manaReduction = int32(currentAbsorb * manaMultiplier);
    -        pVictim->ApplyPowerMod(POWER_MANA, manaReduction, false);
    -
            RemainingDamage -= currentAbsorb;
        }

    ok, that implies, that an EffectMultipleValue of zero means, that no mana should be drained... hmm

    /e: on second thought. Maybe it should be checked if the Unit has POWER_MANA..?

  5. Your right, they're no Auras. So when cast at someone/-thing, you have to catch the spellcast in Spell::EffectScriptEffect() and write what should happen there manually.

    ie: if there are "extension-charges" (which i added to Aura) left, decrement those and extend the Duration of the Aura by X seconds.

    But i didn't get it to work without those 'charges', so this patch will most likely stay custom content :/

  6. from reading i'm sure they should not affect Greater Blessing of X (Thorns is out of question)

    From a look into the Spell.dbc i now realize, that the FamilyFlags of Blessings and Greater Blessings are identical. So its more than likely, that this patch will affect Greater Blessings whereras it should not....

    oh well...

    /e: fixed

  7. and here is your patchfile ;)

    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 24354a8..a880583 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -10689,6 +10689,37 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, uint8 effect_in
        else
            duration = minduration;
    
    +    if (unitPlayer && target == this)
    +    {
    +        switch(spellProto->SpellFamilyName)
    +        {
    +            case SPELLFAMILY_DRUID:
    +                if (spellProto->SpellFamilyFlags & UI64LIT(0x100))
    +                {
    +                    // Glyph of Thorns
    +                    if (Aura *aur = GetAura(57862, 0))
    +                        duration += aur->GetModifier()->m_amount * MINUTE * IN_MILISECONDS;
    +                }
    +                break;
    +            case SPELLFAMILY_PALADIN:
    +                if (spellProto->SpellIconID == 298 && spellProto->SpellFamilyFlags & UI64LIT(0x00000002))
    +                {
    +                    // Glyph of Blessing of Might
    +                    if (Aura *aur = GetAura(57958, 0))
    +                        duration += aur->GetModifier()->m_amount * MINUTE * IN_MILISECONDS;
    +                }
    +                else if (spellProto->SpellIconID == 306 && spellProto->SpellFamilyFlags & UI64LIT(0x00010000))
    +                {
    +                    // Glyph of Blessing of Wisdom
    +                    if (Aura *aur = GetAura(57979, 0))
    +                        duration += aur->GetModifier()->m_amount * MINUTE * IN_MILISECONDS;
    +                }
    +                break;
    +            default:
    +                break;
    +        }
    +    }
    +       
        if (duration > 0)
        {
            int32 mechanic = GetEffectMechanic(spellProto, effect_index);
    

  8. right, i give up^^

    what i tried was to:

    extend m_maxduration too to +X seconds like m_duration to have a reference

    before each possible extend, calculate the regular maximum SpellDuration with ->CalculateSpellDuration()

    if m_maxduration is equal or larger than the just calculated duration plus three times the Glyphs modifier in ms, do not extend any more.

    Works on paper, but does not in reality, since Ruptures duration can't be recalculated as it was based upon Combo Points that got used up :/

    So, i'm out of ideas .. again

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