Issue information

Issue ID
#4282
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jun 7, 2010 1:37
Last Post
Hercules Elf Bot
Jun 7, 2010 1:37
Confirmation
N/A

Hercules Elf Bot - Jun 7, 2010 1:37

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

The mapflag "pvp_nightmaredrop" has a little problem when the command reloadscript is run.
The struct "map[m].drop_list[i]" isn't reset and item drop is duplicated.

Ex:
CODE
pvp_n_1-1    mapflag    pvp_nightmaredrop    random,equip,10000

This code drop items with 100% sucess.
If I die in appropriate map, I drop one item of my equipement.
Now, if I reloadscript 2 times, and die in map pvp_n_1-1, I drop 3 items.

I did a quick fix in npc.c function "npc_reload".

CODE
    for (m = 0; m < map_num; m++) {
        for( i = 0; i < MAX_DROP_PER_MAP; i++ ){
            map[m].drop_list[i].drop_id = NULL;
            map[m].drop_list[i].drop_type = NULL;
            map[m].drop_list[i].drop_per = NULL;
        }
    }


This post has been edited by kamitsu: Jun 6 2010, 06:48 PM