summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-08 16:27:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-08 16:27:06 +0000
commit47b0d1c5c22714622a528d1de0d7ab8bcc5dfec7 (patch)
treee463a431c75658b40c6a0c518b10028526e23ce6 /src
parentdff76e1a9840fe00a6c738d89de5d1074eae858a (diff)
downloadhercules-47b0d1c5c22714622a528d1de0d7ab8bcc5dfec7.tar.gz
hercules-47b0d1c5c22714622a528d1de0d7ab8bcc5dfec7.tar.bz2
hercules-47b0d1c5c22714622a528d1de0d7ab8bcc5dfec7.tar.xz
hercules-47b0d1c5c22714622a528d1de0d7ab8bcc5dfec7.zip
- Normalized the mapname in guild get/set castle data, should fix guild flags.
- Added log options 0x800/0x1000 to log storage moves ('R') and guild storage moves ('G') - Added upgrade_svn9976.sql to include 'R'/'G' on the picklog type column set. - Updated the logs_athena description to include the letter of each type (512 - M, 32 - N, etc) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9976 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c4
-rw-r--r--src/map/storage.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 259ab7073..55771c6e3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9147,6 +9147,8 @@ BUILDIN_FUNC(getcastledata)
struct guild_castle *gc;
int i,j;
+ map_normalize_name(mapname);
+
if( st->end>st->start+4 && index==0){
for(i=0,j=-1;i<MAX_GUILDCASTLE;i++)
if( (gc=guild_castle_search(i)) != NULL &&
@@ -9210,6 +9212,8 @@ BUILDIN_FUNC(setcastledata)
struct guild_castle *gc;
int i;
+ map_normalize_name(mapname);
+
for(i=0;i<MAX_GUILDCASTLE;i++){
if( (gc=guild_castle_search(i)) != NULL ){
if(strcmp(mapname,gc->map_name)==0){
diff --git a/src/map/storage.c b/src/map/storage.c
index 529f2acde..4d652903b 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -18,6 +18,7 @@
#include "guild.h"
#include "battle.h"
#include "atcommand.h"
+#include "log.h"
static struct dbt *storage_db;
static struct dbt *guild_storage_db;
@@ -188,6 +189,8 @@ static int storage_additem(struct map_session_data *sd,struct storage *stor,stru
stor->storage_[i].amount+=amount;
clif_storageitemadded(sd,stor,i,amount);
stor->dirty = 1;
+ if(log_config.enable_logs&0x800)
+ log_pick_pc(sd, "R", item_data->nameid, -amount, item_data);
return 0;
}
}
@@ -204,6 +207,8 @@ static int storage_additem(struct map_session_data *sd,struct storage *stor,stru
clif_storageitemadded(sd,stor,i,amount);
clif_updatestorageamount(sd,stor);
stor->dirty = 1;
+ if(log_config.enable_logs&0x800)
+ log_pick_pc(sd, "R", item_data->nameid, -amount, item_data);
return 0;
}
/*==========================================
@@ -217,6 +222,8 @@ static int storage_delitem(struct map_session_data *sd,struct storage *stor,int
return 1;
stor->storage_[n].amount-=amount;
+ if(log_config.enable_logs&0x800)
+ log_pick_pc(sd, "R", stor->storage_[n].nameid, amount, &stor->storage_[n]);
if(stor->storage_[n].amount==0){
memset(&stor->storage_[n],0,sizeof(stor->storage_[0]));
stor->storage_amount--;
@@ -537,6 +544,8 @@ int guild_storage_additem(struct map_session_data *sd,struct guild_storage *stor
stor->storage_[i].amount+=amount;
clif_guildstorageitemadded(sd,stor,i,amount);
stor->dirty = 1;
+ if(log_config.enable_logs&0x1000)
+ log_pick_pc(sd, "G", item_data->nameid, -amount, item_data);
return 0;
}
}
@@ -553,6 +562,8 @@ int guild_storage_additem(struct map_session_data *sd,struct guild_storage *stor
clif_guildstorageitemadded(sd,stor,i,amount);
clif_updateguildstorageamount(sd,stor);
stor->dirty = 1;
+ if(log_config.enable_logs&0x1000)
+ log_pick_pc(sd, "G", item_data->nameid, -amount, item_data);
return 0;
}
@@ -565,6 +576,8 @@ int guild_storage_delitem(struct map_session_data *sd,struct guild_storage *stor
return 1;
stor->storage_[n].amount-=amount;
+ if(log_config.enable_logs&0x1000)
+ log_pick_pc(sd, "G", stor->storage_[n].nameid, amount, &stor->storage_[n]);
if(stor->storage_[n].amount==0){
memset(&stor->storage_[n],0,sizeof(stor->storage_[0]));
stor->storage_amount--;