Fix a potential issue with PTP and Chimera Wing teleportation cooldowns.

This commit is contained in:
GJ
2013-07-24 13:50:33 -04:00
parent 02126c93b9
commit e0e574c19e
3 changed files with 20 additions and 11 deletions

View File

@ -76,10 +76,10 @@ public class PtpCommand implements TabExecutor {
}
int ptpCooldown = Config.getInstance().getPTPCommandCooldown();
long lastTeleport = mcMMOPlayer.getLastTeleport();
long ptpLastUse = mcMMOPlayer.getPtpLastUse();
if (ptpCooldown > 0) {
int timeRemaining = SkillUtils.calculateTimeLeft(lastTeleport * Misc.TIME_CONVERSION_FACTOR, ptpCooldown, player);
int timeRemaining = SkillUtils.calculateTimeLeft(ptpLastUse * Misc.TIME_CONVERSION_FACTOR, ptpCooldown, player);
if (timeRemaining > 0) {
player.sendMessage(LocaleLoader.getString("Item.Generic.Wait", timeRemaining));
@ -196,6 +196,6 @@ public class PtpCommand implements TabExecutor {
teleportingPlayer.sendMessage(LocaleLoader.getString("Party.Teleport.Player", targetPlayer.getName()));
targetPlayer.sendMessage(LocaleLoader.getString("Party.Teleport.Target", teleportingPlayer.getName()));
mcMMOPlayer.actualizeRecentlyHurt();
mcMMOPlayer.actualizePtpLastUse();
}
}