[8934] Implement aura PELL_AURA_MOD_MINIMUM_SPEED (305) and it used for FORM_GHOSTWOLF.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
darkstalker 2009-12-06 23:05:25 +03:00 committed by VladimirMangos
parent 014f92870d
commit 486c628ce2
5 changed files with 14 additions and 3 deletions

View file

@ -347,7 +347,7 @@ enum AuraType
SPELL_AURA_302 = 302, SPELL_AURA_302 = 302,
SPELL_AURA_303 = 303, SPELL_AURA_303 = 303,
SPELL_AURA_304 = 304, SPELL_AURA_304 = 304,
SPELL_AURA_305 = 305, SPELL_AURA_MOD_MINIMUM_SPEED = 305,
SPELL_AURA_306 = 306, SPELL_AURA_306 = 306,
TOTAL_AURAS = 307 TOTAL_AURAS = 307
}; };

View file

@ -355,7 +355,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleUnused, //302 unused (3.2.2a) &Aura::HandleUnused, //302 unused (3.2.2a)
&Aura::HandleNULL, //303 17 spells &Aura::HandleNULL, //303 17 spells
&Aura::HandleNULL, //304 2 spells (alcohol effect?) &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 &Aura::HandleNULL //306 1 spell
}; };
@ -5726,6 +5726,8 @@ void Aura::HandleShapeshiftBoosts(bool apply)
((Player*)m_target)->RemoveSpellCooldown(49868); ((Player*)m_target)->RemoveSpellCooldown(49868);
break; break;
case FORM_GHOSTWOLF: case FORM_GHOSTWOLF:
spellId1 = 67116;
break;
case FORM_AMBIENT: case FORM_AMBIENT:
case FORM_GHOUL: case FORM_GHOUL:
case FORM_STEALTH: case FORM_STEALTH:

View file

@ -1661,6 +1661,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
if( spellInfo_1->SpellIconID==220 && spellInfo_2->SpellIconID==220 && if( spellInfo_1->SpellIconID==220 && spellInfo_2->SpellIconID==220 &&
spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags ) spellInfo_1->SpellFamilyFlags != spellInfo_2->SpellFamilyFlags )
return false; return false;
// Ghost Wolf
if (spellInfo_1->SpellIconID == 67 && spellInfo_2->SpellIconID == 67)
return false;
} }
// Bloodlust and Bloodthirst (multi-family check) // Bloodlust and Bloodthirst (multi-family check)
if( spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual[0] == 0 ) if( spellInfo_1->Id == 2825 && spellInfo_2->SpellIconID == 38 && spellInfo_2->SpellVisual[0] == 0 )

View file

@ -10364,7 +10364,12 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
// Apply strongest slow aura mod to speed // Apply strongest slow aura mod to speed
int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED); int32 slow = GetMaxNegativeAuraModifier(SPELL_AURA_MOD_DECREASE_SPEED);
if (slow) if (slow)
{
speed *=(100.0f + slow)/100.0f; 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); SetSpeed(mtype, speed, forced);
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8933" #define REVISION_NR "8934"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__