mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user