diff options
author | megamage <none@none> | 2009-02-13 20:12:01 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-13 20:12:01 -0600 |
commit | 1c3f478ecc5745b880ca6610d64aa5522eb24b1b (patch) | |
tree | abbaf56201c8b40f41bf5af20eb76c370ba32182 /src/game/Unit.cpp | |
parent | 59be8223e4f25e28ede94f9694a2b151caffd9ed (diff) | |
parent | 29f3d67fb8d47ea25291fa040f1cfd33b53c9da6 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6996df9ed97..0801ba454bb 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10158,13 +10158,13 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un if(duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this) ) return; + // test pet/charm masters instead pets/charmeds + Unit const* targetOwner = GetCharmerOrOwner(); + Unit const* casterOwner = caster->GetCharmerOrOwner(); + // Duration of crowd control abilities on pvp target is limited by 10 sec. (2.2.0) if(duration > 10000 && IsDiminishingReturnsGroupDurationLimited(group)) { - // test pet/charm masters instead pets/charmeds - Unit const* targetOwner = GetCharmerOrOwner(); - Unit const* casterOwner = caster->GetCharmerOrOwner(); - Unit const* target = targetOwner ? targetOwner : this; Unit const* source = casterOwner ? casterOwner : caster; @@ -10175,7 +10175,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un float mod = 1.0f; // Some diminishings applies to mobs too (for example, Stun) - if((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER && GetTypeId() == TYPEID_PLAYER) || GetDiminishingReturnsGroupType(group) == DRTYPE_ALL) + if((GetDiminishingReturnsGroupType(group) == DRTYPE_PLAYER && (targetOwner ? targetOwner->GetTypeId():GetTypeId()) == TYPEID_PLAYER) || GetDiminishingReturnsGroupType(group) == DRTYPE_ALL) { DiminishingLevels diminish = Level; switch(diminish) |