Skip to content

Commit

Permalink
[Bots] Fix timers loading on spawn and zone (#4516)
Browse files Browse the repository at this point in the history
Timers were not properly checking their expiration time on spawn and load and could cause invalid timers to load if the server was restarted resulting in improper lockouts.
  • Loading branch information
nytmyr authored Oct 20, 2024
1 parent 311af7b commit cf3483b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zone/bot_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ bool BotDatabase::LoadTimers(Bot* b)
BotTimer_Struct t{ };

for (const auto& e : l) {
if (t.timer_value < (Timer::GetCurrentTime() + t.recast_time)) {
if (e.timer_value < (Timer::GetCurrentTime() + e.recast_time)) {
t.timer_id = e.timer_id;
t.timer_value = e.timer_value;
t.recast_time = e.recast_time;
Expand Down

0 comments on commit cf3483b

Please sign in to comment.