[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 committed by tomrus88
parent fdd4fcd48f
commit 52da5abf4d
2 changed files with 5 additions and 1 deletions

View file

@ -10612,6 +10612,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;