summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-18 10:36:09 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-18 10:36:09 +0000
commitad3c28295537a5d942809ca07cae49bc350c45ab (patch)
tree36ca2554405b41fcb8d279d85e1efe7ad76923ab /src/map/map.h
parent16ef82dd78c2facf754e911fbaab1e5f279c50d4 (diff)
downloadhercules-ad3c28295537a5d942809ca07cae49bc350c45ab.tar.gz
hercules-ad3c28295537a5d942809ca07cae49bc350c45ab.tar.bz2
hercules-ad3c28295537a5d942809ca07cae49bc350c45ab.tar.xz
hercules-ad3c28295537a5d942809ca07cae49bc350c45ab.zip
* Replaced jA's way of allocating npc shop data with a simple dynamic array that gets allocated during loading and freed on unload
- automatically fixes bugreport:404, which would otherwise require manipulating the npcname_db (the original author didn't, hence the bug) - now a supporting variable 'count' is used for tracking the length instead of an extra dummy entry at the end of the shop list - partially removed the MAX_SHOPITEM restriction (if this was written properly, the system could support an unlimited amount of entries) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11753 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/map.h b/src/map/map.h
index b2660e124..4258b3cb8 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -847,14 +847,16 @@ struct npc_data {
struct npc_label_list *label_list;
int src_id;
} scr;
- struct npc_item_list shop_item[1];// dynamic array, allocated with extra entries (last one has nameid 0)
+ struct {
+ struct npc_item_list* shop_item;
+ int count;
+ } shop;
struct {
short xs,ys; // OnTouch area radius
short x,y; // destination coords
unsigned short mapindex; // destination map
} warp;
} u;
- //Do NOT place anything afterwards... shop data NPC will override any variables from here and on! [Skotlex]
};
//For quick linking to a guardian's info. [Skotlex]