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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user