fix: Fixes skill cooldown for some target skills (#2231)
### Summary Stealing, Detect Hidden, and Begging will now give credit for the time it took the player to use the targeter against the total skill cooldown. So if the player takes longer than 10s to target, then they can use a skill again immediately. > [!NOTE] > This does not change the requirement that players can no longer stack target these skills.
This commit is contained in:
parent
c0948fd0e2
commit
55d653d752
3 changed files with 74 additions and 63 deletions
|
|
@ -114,7 +114,13 @@ namespace Server.SkillHandlers
|
|||
src.SendLocalizedMessage(500817); // You can see nothing hidden there.
|
||||
}
|
||||
|
||||
src.NextSkillTime = Core.TickCount + 6000; // 6 seconds cooldown
|
||||
const int TargeterCooldown = 30000; // 30s
|
||||
const int SkillCooldown = 10000; // 10s
|
||||
|
||||
// Calculate how much time has passed since the targeter was opened
|
||||
int ticksSinceTargeter = (int)(Core.TickCount - (src.NextSkillTime - TargeterCooldown));
|
||||
int remainingCooldown = Math.Max(0, SkillCooldown - ticksSinceTargeter);
|
||||
src.NextSkillTime = Core.TickCount + remainingCooldown;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue