mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8082] Update Diminishing Returns.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
1b085414ab
commit
df064ebd9f
7 changed files with 86 additions and 55 deletions
|
|
@ -9847,13 +9847,13 @@ void Unit::IncrDiminishing(DiminishingGroup group)
|
|||
m_Diminishing.push_back(DiminishingReturn(group,getMSTime(),DIMINISHING_LEVEL_2));
|
||||
}
|
||||
|
||||
void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster,DiminishingLevels Level)
|
||||
void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Unit* caster,DiminishingLevels Level, int32 limitduration)
|
||||
{
|
||||
if(duration == -1 || group == DIMINISHING_NONE || caster->IsFriendlyTo(this) )
|
||||
return;
|
||||
|
||||
// Duration of crowd control abilities on pvp target is limited by 10 sec. (2.2.0)
|
||||
if(duration > 10000 && IsDiminishingReturnsGroupDurationLimited(group))
|
||||
if(limitduration > 0 && duration > limitduration)
|
||||
{
|
||||
// test pet/charm masters instead pets/charmeds
|
||||
Unit const* targetOwner = GetCharmerOrOwner();
|
||||
|
|
@ -9863,7 +9863,7 @@ void Unit::ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration,Un
|
|||
Unit const* source = casterOwner ? casterOwner : caster;
|
||||
|
||||
if(target->GetTypeId() == TYPEID_PLAYER && source->GetTypeId() == TYPEID_PLAYER)
|
||||
duration = 10000;
|
||||
duration = limitduration;
|
||||
}
|
||||
|
||||
float mod = 1.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue