summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-13 16:14:32 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-13 16:14:32 +0000
commitfb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63 (patch)
tree52b66f102c20e6b47e060efe0e7ceabd36d5aa29 /src/common
parent2e7ba13554118cdc78c9bfa5a6f0e5e8e58baf7b (diff)
downloadhercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.tar.gz
hercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.tar.bz2
hercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.tar.xz
hercules-fb45ace1b19f98add7e1d0a0fc6fe45bc1ebac63.zip
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
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mmo.h31
1 files changed, 15 insertions, 16 deletions
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;