Skip to content
Snippets Groups Projects
Commit 4a4e9b27 authored by dg's avatar dg
Browse files

Resting when all ressources are at maximun will trigger resting for cooldowns

git-svn-id: http://svn.net-core.org/repos/t-engine4@2679 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1c8ce8c4
No related branches found
No related tags found
No related merge requests found
......@@ -509,6 +509,18 @@ function _M:restCheck()
return true
end
-- Enter cooldown waiting rest if we are at max already
if self.resting.cnt == 1 then
self.resting.wait_cooldowns = true
end
if self.resting.wait_cooldowns then
for tid, cd in pairs(self.talents_cd) do
if cd > 0 then return true end
end
end
self.resting.wait_cooldowns = nil
return false, "all resources and life at maximum"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment