mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
[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:
parent
311af7bbe9
commit
cf3483b402
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user