Jump to content

DaC

Members
  • Posts

    68
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by DaC

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

    This will provide a function for SD2 to catch an avoid of a melee hit. This should be at least used for Zul'Aman's last encounter Zul'Jin - Spell Overpower.

    He casts this spell when his target dodges one of his melee attacks.

    Warrior's Overpower for players is handled in a special way with combopoints, which do not exist for creatures. (and Zul'Jin's spell does not have combopoint flag)

    For which repository revision was the patch created?

    MaNGOS One - some before latest revision

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    From 96ec132991775707a0bf1d602c4d774b9d9f2b61 Mon Sep 17 00:00:00 2001
    From: DaC <[email protected]>
    Date: Thu, 22 Sep 2011 00:08:41 +0200
    Subject: [PATCH] Implement CreatureAI function for avoided melee damage
    
    ---
    src/game/CreatureAI.h |    3 +++
    src/game/Unit.cpp     |    5 +++++
    2 files changed, 8 insertions(+), 0 deletions(-)
    
    diff --git a/src/game/CreatureAI.h b/src/game/CreatureAI.h
    index 2a49d50..1056421 100644
    --- a/src/game/CreatureAI.h
    +++ b/src/game/CreatureAI.h
    @@ -109,6 +109,9 @@ class MANGOS_DLL_SPEC CreatureAI
            // Called when owner of m_creature (if m_creature is PROTECTOR_PET) kills a unit
            virtual void OwnerKilledUnit(Unit *) {}
    
    +        // Called when the creatures target avoids a normal meleehit
    +        virtual void TargetAvoidedNormalMeleeHit(uint32 /*MeleeHitOutcome*/) {}
    +
            // Called when the creature summon successfully other creature
            virtual void JustSummoned(Creature* ) {}
    
    diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
    index 50c1ef0..beda809 100644
    --- a/src/game/Unit.cpp
    +++ b/src/game/Unit.cpp
    @@ -555,6 +555,11 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
                pVictim->SetStandState(UNIT_STAND_STATE_STAND);
        }
    
    +    // call TargetAvoidedNormalMeleeHit for unit
    +    if (cleanDamage && (cleanDamage->hitOutCome != MELEE_HIT_NORMAL))
    +        if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->AI())
    +            ((Creature*)this)->AI()->TargetAvoidedNormalMeleeHit(cleanDamage->hitOutCome);
    +
        if(!damage)
        {
            // Rage from physical damage received .
    -- 
    1.7.1
    
    

    greetings, DaC

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

    Pets summoned by jewelcrafting trinkets should be ooc-pets and not guardians.

    For which repository revision was the patch created?

    MaNGOS One - latest revision

    Who has been writing this patch? Please include either forum user names or email addresses.

    me

    The small pets spawned by jewelcrafting items like 35700 should be passiv and not act like guardian pets.

    From 9857d04bf835b197e3af2711d20c3ec23f7ca980 Mon Sep 17 00:00:00 2001
    From: DaC <[email protected]>
    Date: Tue, 21 Jun 2011 22:04:04 +0200
    Subject: [PATCH] Jewelcrafting trinkes - Pets should be ooc-pets
    
    ---
    src/game/SpellEffects.cpp |    5 ++++-
    1 files changed, 4 insertions(+), 1 deletions(-)
    
    diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
    index f490c03..a761372 100644
    --- a/src/game/SpellEffects.cpp
    +++ b/src/game/SpellEffects.cpp
    @@ -3095,7 +3095,10 @@ void Spell::EffectSummonType(SpellEffectIndex eff_idx)
                        break;
                    }
                    case UNITNAME_SUMMON_TITLE_PET:
    -                    DoSummonGuardian(eff_idx, summon_prop->FactionId);
    +                    if (prop_id == 407)
    +                        DoSummonCritter(eff_idx, summon_prop->FactionId);
    +                    else
    +                        DoSummonGuardian(eff_idx, summon_prop->FactionId);
                        break;
                    case UNITNAME_SUMMON_TITLE_GUARDIAN:
                    {
    -- 
    1.7.0.2.msysgit.0
    
    

    regards, DaC

  3. Thanks for the notice. :cool:

    From fd55f0853148229352ab9a50423b02e16b0186e5 Mon Sep 17 00:00:00 2001
    From: DaC <[email protected]>
    Date: Sat, 11 Jun 2011 19:11:34 +0200
    Subject: [PATCH 1/5] set rage to zero and energy to 100% on battleground join
    
    ---
    src/game/BattleGround.cpp |    4 ++++
    1 files changed, 4 insertions(+), 0 deletions(-)
    
    diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
    index ea07204..78ee872 100644
    --- a/src/game/BattleGround.cpp
    +++ b/src/game/BattleGround.cpp
    @@ -447,7 +447,10 @@ void BattleGround::Update(uint32 diff)
    
                    for(BattleGroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
                        if (Player *plr = sObjectMgr.GetPlayer(itr->first))
    +                    {
                            plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
    +                        plr->SetPower(POWER_RAGE, 0);
    +                    }
    
                    CheckArenaWinConditions();
                }
    @@ -1196,6 +1199,7 @@ void BattleGround::AddPlayer(Player *plr)
    
                plr->SetHealth(plr->GetMaxHealth());
                plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
    +            plr->SetPower(POWER_ENERGY, plr->GetMaxPower(POWER_ENERGY));
            }
        }
        else
    -- 
    1.7.0.2.msysgit.0
    
    

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