mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 21:40:05 +00:00
Fix a bug where the server would crash if Drain killed a mob.
This commit is contained in:
parent
90754665a0
commit
2744ed64e3
@ -481,6 +481,10 @@ void MobManager::combatStep(Mob *mob, time_t currTime) {
|
||||
mob->lastDrainTime = currTime;
|
||||
}
|
||||
|
||||
// if drain killed the mob, return early
|
||||
if (mob->appearanceData.iHP <= 0)
|
||||
return;
|
||||
|
||||
// unbuffing
|
||||
std::unordered_map<int32_t, time_t>::iterator it = mob->unbuffTimes.begin();
|
||||
while (it != mob->unbuffTimes.end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user