From fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 13 Jul 2008 16:14:32 +0000 Subject: Modified storage data loading * storage is now loaded/saved along with character status * as a consequence, a lot of storage handling code was removed * there is no more locking done within storage data * mapservers no longer cache the data (solves muiltimapserver exploit) * loading storage on char select may decrease charserver performance git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12950 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/mmo.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'src/common/mmo.h') diff --git a/src/common/mmo.h b/src/common/mmo.h index 61cd6266c..2e96e8910 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -178,6 +178,20 @@ struct status_change_data { int val1, val2, val3, val4, tick; //Remaining duration. }; +struct storage_data { + int account_id; // used by charserver + int storage_amount; + struct item items[MAX_STORAGE]; +}; + +struct guild_storage { + int dirty; + int guild_id; + short storage_status; + short storage_amount; + struct item storage_[MAX_GUILD_STORAGE]; +}; + struct s_pet { int account_id; int char_id; @@ -264,6 +278,7 @@ struct mmo_charstatus { struct point last_point,save_point,memo_point[MAX_MEMOPOINTS]; struct item inventory[MAX_INVENTORY],cart[MAX_CART]; + struct storage_data storage; struct skill skill[MAX_SKILL]; struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex] @@ -329,22 +344,6 @@ struct registry { struct global_reg account2[ACCOUNT_REG2_NUM]; }; -struct storage_data { - int dirty; - int account_id; - short storage_status; - short storage_amount; - struct item items[MAX_STORAGE]; -}; - -struct guild_storage { - int dirty; - int guild_id; - short storage_status; - short storage_amount; - struct item storage_[MAX_GUILD_STORAGE]; -}; - struct gm_account { int account_id; int level; -- cgit v1.2.3-60-g2f50