diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index a8bf7d371..fd11b6c5f 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1948,7 +1948,11 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list) break; case ADDITEM_OVERAMOUNT: +#if PACKETVER >= 20110705 + return 9; +#else return 2; +#endif } value = pc->modifybuyvalue(sd,value); @@ -2231,7 +2235,7 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) struct itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); int nameid, value, idx = entry->id; - if (idx >= MAX_INVENTORY || idx < 0 || entry->amount < 0) { + if (idx >= sd->status.inventorySize || idx < 0 || entry->amount < 0) { return 1; } @@ -4971,6 +4975,7 @@ static int npc_reload(void) npc->npc_mob = npc->npc_cache_mob = npc->npc_delay_mob = 0; // reset mapflags + map->zone_reload(); map->flags_init(); // Reprocess npc files and reload constants @@ -4980,7 +4985,6 @@ static int npc_reload(void) instance->reload(); - map->zone_reload(); map->zone_init(); npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ |