Mercurial > hg > skillbot
changeset 58:7d43407a9214
Update skill times when skill hasn't changed
author | Dominic Cleal <dominic@computerkb.co.uk> |
---|---|
date | Sun, 28 Dec 2008 18:36:29 +0000 |
parents | fabae7870b52 |
children | 74213ea642da |
files | skillbot.pl |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/skillbot.pl Sun Dec 28 16:41:53 2008 +0000 +++ b/skillbot.pl Sun Dec 28 18:36:29 2008 +0000 @@ -500,8 +500,15 @@ # Check for changes in the skill, skip or cancel announcement if (defined $f->{skill}) { - return if $skill->id eq $f->{skill}; + # If the skill's the same, update the times + if ($skill->id eq $f->{skill}) + { + $f->{skill_finish} = $skill->finish_time; + $f->{skill_countdown} = $skill->time_remaining; + return; + } + # Skill has changed, delet previous announcement del_one_shot_timer($f->{timer}); delete $f->{timer}; }