[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 ) 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 > 7000) CastingTime = 7000;
if (CastingTime < 1500) CastingTime = 1500; if (CastingTime < 1500) CastingTime = 1500;

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 "6878" #define REVISION_NR "6879"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__