Fixed the dynamic shop system memory allocation and id_db problem. Added sample script.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5842 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lance
2006-04-01 09:37:50 +00:00
parent e051037bce
commit 008b473603
5 changed files with 94 additions and 8 deletions

View File

@@ -9871,7 +9871,9 @@ int buildin_npcshopitem(struct script_state *st)
}
nd = (struct npc_data *)aRealloc(nd,sizeof(struct npc_data) +
sizeof(nd->u.shop_item[0]) * n);
sizeof(nd->u.shop_item[0]) * (n+1));
map_addiddb(&nd->bl);
nd->master_nd = ((struct npc_data *)map_id2bl(st->oid));
} else {