comparison skillbot.pl @ 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
comparison
equal deleted inserted replaced
57:fabae7870b52 58:7d43407a9214
498 return; 498 return;
499 } 499 }
500 500
501 # Check for changes in the skill, skip or cancel announcement 501 # Check for changes in the skill, skip or cancel announcement
502 if (defined $f->{skill}) { 502 if (defined $f->{skill}) {
503 return if $skill->id eq $f->{skill}; 503 # If the skill's the same, update the times
504 504 if ($skill->id eq $f->{skill})
505 {
506 $f->{skill_finish} = $skill->finish_time;
507 $f->{skill_countdown} = $skill->time_remaining;
508 return;
509 }
510
511 # Skill has changed, delet previous announcement
505 del_one_shot_timer($f->{timer}); 512 del_one_shot_timer($f->{timer});
506 delete $f->{timer}; 513 delete $f->{timer};
507 } 514 }
508 515
509 my $finish = $skill->finish_time - time(); 516 my $finish = $skill->finish_time - time();