Issue information

Issue ID
#2247
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Sep 18, 2008 14:53
Last Post
Hercules Elf Bot
Sep 18, 2008 14:53
Confirmation
N/A

Hercules Elf Bot - Sep 18, 2008 14:53

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

The 'reloadscript' command contains yet another defect. It doesn't wipe previous mapflag data before loading new data.
The mapflag system works one-way: if you write a 'mapflag' command, it sets the mapflag to a particular value. But if you don't specify this command, then the value remains what it was. There is no such thing as 'initialization' in the script loading code - everything starts at zero because that's what allocated memory is set to when map data is constructed.

The 'npc_reload' function doesn't clear mapflag data before reloading scripts. Therefore, mapflags that were removed instead of changing them to 'off' will still be enabled in the map data structure. This may lead to inconsistency of scripts and confusion of the server administration.