From 2ea755914fbb932c5941693f1fa41982c2abacd2 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Wed, 23 Dec 2009 19:29:40 +0300 Subject: [PATCH] [9049] Additional fixes for talent 17056 and ranks. Thanks to Sarjuuk for clarify existed problems and help in prepare fix. --- src/game/SpellAuras.cpp | 15 ++++++++------- src/game/Unit.cpp | 1 - src/shared/revision_nr.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e2c1993d7..990ce43b4 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3019,16 +3019,17 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) } } - if(!furorChance) - break; - if (m_modifier.m_miscvalue == FORM_CAT) { - m_target->SetPower(POWER_ENERGY, 0); - // Furor chance is now amount of energy for cat form - m_target->CastCustomSpell(m_target, 17099, &furorChance, NULL, NULL, this); + // Furor chance is now amount allowed to save energy for cat form + // without talent it reset to 0 + if (m_target->GetPower(POWER_ENERGY) > furorChance) + { + m_target->SetPower(POWER_ENERGY, 0); + m_target->CastCustomSpell(m_target, 17099, &furorChance, NULL, NULL, this); + } } - else + else if(furorChance) // only if talent known { m_target->SetPower(POWER_RAGE, 0); if(urand(1,100) <= furorChance) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 65275da7b..c2baad92e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7741,7 +7741,6 @@ void Unit::setPowerType(Powers new_powertype) break; case POWER_ENERGY: SetMaxPower(POWER_ENERGY,GetCreatePowers(POWER_ENERGY)); - SetPower( POWER_ENERGY,0); break; case POWER_HAPPINESS: SetMaxPower(POWER_HAPPINESS,GetCreatePowers(POWER_HAPPINESS)); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c581e2347..e530e3d21 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9048" + #define REVISION_NR "9049" #endif // __REVISION_NR_H__ -- 2.11.4.GIT