From 486c628ce2ce1b7d507a7c3698d6c47ae3fafa08 Mon Sep 17 00:00:00 2001 From: darkstalker Date: Sun, 6 Dec 2009 23:05:25 +0300 Subject: [PATCH] [8934] Implement aura PELL_AURA_MOD_MINIMUM_SPEED (305) and it used for FORM_GHOSTWOLF. Signed-off-by: VladimirMangos --- src/game/SpellAuraDefines.h | 2 +- src/game/SpellAuras.cpp | 4 +++- src/game/SpellMgr.cpp | 4 ++++ src/game/Unit.cpp | 5 +++++ src/shared/revision_nr.h | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 3ccdb1ee6..9ab461284 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -347,7 +347,7 @@ enum AuraType SPELL_AURA_302 = 302, SPELL_AURA_303 = 303, SPELL_AURA_304 = 304, - SPELL_AURA_305 = 305, + SPELL_AURA_MOD_MINIMUM_SPEED = 305, SPELL_AURA_306 = 306, TOTAL_AURAS = 307 }; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 9311b4211..0e67c1cf5 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -355,7 +355,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleUnused, //302 unused (3.2.2a) &Aura::HandleNULL, //303 17 spells &Aura::HandleNULL, //304 2 spells (alcohol effect?) - &Aura::HandleNULL, //305 2 spells + &Aura::HandleAuraModIncreaseSpeed, //305 SPELL_AURA_MOD_MINIMUM_SPEED &Aura::HandleNULL //306 1 spell }; @@ -5726,6 +5726,8 @@ void Aura::HandleShapeshiftBoosts(bool apply) ((Player*)m_target)->RemoveSpellCooldown(49868); break; case FORM_GHOSTWOLF: + spellId1 = 67116; + break; case FORM_AMBIENT: case FORM_GHOUL: case FORM_STEALTH: diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index cba3c9635..75bf86ccf 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1661,6 +1661,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons if( spellInfo_1->SpellIconID==220 && spellInfo_2->SpellIconID==220 && spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags ) return false; + + // Ghost Wolf + if (spellInfo_1->SpellIconID == 67 && spellInfo_2->SpellIconID == 67) + return false; } // Bloodlust and Bloodthirst (multi-family check) if( spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual[0] == 0 ) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1c7a8a7e8..6480b1ef4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10364,7 +10364,12 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) // Apply strongest slow aura mod to speed int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); if (slow) + { speed *=(100.0f + slow)/100.0f; + float min_speed = (float)GetMaxPositiveAuraModifier(SPELL_AURA_MOD_MINIMUM_SPEED) / 100.0f; + if (speed < min_speed) + speed = min_speed; + } SetSpeed(mtype, speed, forced); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 925633ff8..791db7c40 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 "8933" + #define REVISION_NR "8934" #endif // __REVISION_NR_H__