[Bots] Fix timers loading on spawn and zone (#4516)

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.
This commit is contained in:
nytmyr authored and GitHub committed 2024-10-20 10:44:30 -04:00
1 parent 311af7bbe9
commit cf3483b402
1 file changed
+1 -1
+1 -1
View File
@@ -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;