Jump to content

[11644] Arena/BG Join: rage- and energiehandling


Guest DaC

Recommended Posts

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

Sets rage to zero and energie to 100% when entering battleground and arena

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

Without this patch e.g. warriors can enter the arena right before the start and use rage they had before.

So this patch will set the rage to zero and also, if available, energie value to 100 percent.

From 6e94b58684137f282bc282f26a975be8e8062545 Mon Sep 17 00:00:00 2001
From: DaC <[email protected]>
Date: Sat, 11 Jun 2011 19:11:34 +0200
Subject: [PATCH] set rage to zero and energy to 100% on battleground join

---
src/game/BattleGround.cpp |    2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index ea07204..e5e40b2 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -1196,6 +1196,8 @@ void BattleGround::AddPlayer(Player *plr)

            plr->SetHealth(plr->GetMaxHealth());
            plr->SetPower(POWER_MANA, plr->GetMaxPower(POWER_MANA));
+            plr->SetPower(POWER_RAGE, 0);
+            plr->SetPower(POWER_ENERGY, plr->GetMaxPower(POWER_ENERGY));
        }
    }
    else
-- 
1.7.0.2.msysgit.0

regards, DaC

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Vladimir, they should get full mana at the enter of the arena, and since they cannot loose any mana with preparation there is no need to set the mana to full when the gates open.

I were playing on a server where DK's could do some spell with a glyph so they had 100 runic power when the gates opened.

So:

On arena join:

Cast Preparation (And clear all arena cooldowns)

Set full mana

On arena gates:

Remove preparation

Ret rage to 0 & Runic power to 0

I think thats the way it shall be done, atleast with some info from my retail geekish friends :)

- LilleCarl

Link to comment
Share on other sites

But this is what vladimir did.

Entering arena: Buff applied -> mana&energy set to 100%

Leaving prep. phase (doors open) -> rage&runic power set to 0%

And moving this to HandleArenaPreparation seams to be better than handling in battleground.cpp!

Link to comment
Share on other sites

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