Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.31] The duration of the Stamina bonus hours was increased from 2 to 3 hours #3772

Merged
1 commit merged into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/creaturescripts/scripts/regeneratestamina.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ function onLogin(player)
end

local staminaMinutes = player:getStamina()
local maxNormalStaminaRegen = 2400 - math.min(2400, staminaMinutes)
local maxNormalStaminaRegen = 2340 - math.min(2340, staminaMinutes)

local regainStaminaMinutes = offlineTime / 180
if regainStaminaMinutes > maxNormalStaminaRegen then
local happyHourStaminaRegen = (offlineTime - (maxNormalStaminaRegen * 180)) / 600
staminaMinutes = math.min(2520, math.max(2400, staminaMinutes) + happyHourStaminaRegen)
staminaMinutes = math.min(2520, math.max(2340, staminaMinutes) + happyHourStaminaRegen)
else
staminaMinutes = staminaMinutes + regainStaminaMinutes
end
Expand Down
2 changes: 1 addition & 1 deletion data/events/scripts/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function Player:onGainExperience(source, exp, rawExp)
useStamina(self)

local staminaMinutes = self:getStamina()
if staminaMinutes > 2400 and self:isPremium() then
if staminaMinutes > 2340 and self:isPremium() then
exp = exp * 1.5
elseif staminaMinutes <= 840 then
exp = exp * 0.5
Expand Down