[6879] Not apply casting time spell bonuses mods to creature (non-pets) casted spells with 0 cast time.

This commit is contained in:
VladimirMangos 2008-12-06 08:05:00 +03:00
parent aef1542792
commit 43f713f660
2 changed files with 5 additions and 1 deletions

View file

@ -10552,6 +10552,10 @@ void Unit::ApplyCastTimePercentMod(float val, bool apply )
uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectType damagetype, uint32 CastingTime )
{
// Not apply this to creature casted spells with casttime==0
if(CastingTime==0 && GetTypeId()==TYPEID_UNIT && !((Creature*)this)->isPet())
return 3500;
if (CastingTime > 7000) CastingTime = 7000;
if (CastingTime < 1500) CastingTime = 1500;