Issue information

Issue ID
#1197
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Mar 16, 2008 12:08
Last Post
Hercules Elf Bot
Mar 16, 2008 12:08
Confirmation
N/A

Hercules Elf Bot - Mar 16, 2008 12:08

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1197

I had an idea how to improve on the current dynamic mobs mechanism.
Currently, only mobs that have 0/0 respawn time and aren't damaged (if the 'damaged mob removal' setting is off) are allowed to be unloaded.
According to startup information, this leaves overall 8000 out of 40000 mobs active.

My suggestion is, to also remove mobs that have a respawn time, but are already spawned. Since they were already spawned, and since we don't track the "lifetime" of a mob anymore, unloading it and re-adding it on demand will be equivalent to just leaving it there active. This would get rid of all those 'plant' mobs that just loiter around doing nothing in maps that noone visits.

Of course, care needs to be taken to not disrupt anything else. What people would probably not want is having a mob with a filled damage log - but healed back to full - getting unloaded after it killed them and they had to get back. Another thing is MVP slaves, which I think always stay on the map - so, don't unload MVPs whose mobs are damaged?

Another thing is that 'unloading' currently happens once, after the last player leaves the map. This would mean that a mob that's in its respawn process does not get unloaded once it spawns. This might be interesting to examine.