diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 29 | ||||
-rw-r--r-- | src/map/mob.c | 6 | ||||
-rw-r--r-- | src/map/mob.h | 3 |
3 files changed, 33 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9bcf0a511..2964c8ce4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1874,12 +1874,25 @@ int atcommand_storage( const int fd, struct map_session_data* sd, const char* command, const char* message) { + struct storage *stor; //changes from Freya/Yor nullpo_retr(-1, sd); + + if (sd->state.storage_flag == 1) { + clif_displaymessage(fd, "You have opened your guild storage. Close it before."); + return -1; + } + + if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) { + clif_displaymessage(fd, "You have already opened your storage."); + return -1; + } + storage_storageopen(sd); return 0; } + /*========================================== * *------------------------------------------ @@ -1888,9 +1901,23 @@ int atcommand_guildstorage( const int fd, struct map_session_data* sd, const char* command, const char* message) { + struct storage *stor; //changes from Freya/Yor nullpo_retr(-1, sd); - if (sd->status.guild_id > 0) + + if (sd->status.guild_id > 0) { + if (sd->state.storage_flag == 1) { + clif_displaymessage(fd, "You have already opened your guild storage."); + return -1; + } + if ((stor = account2storage2(sd->status.account_id)) != NULL && stor->storage_status == 1) { + clif_displaymessage(fd, "Your storage is opened. Close it before."); + return -1; + } storage_guild_storageopen(sd); + } else { + clif_displaymessage(fd, "You are not in a guild."); + return -1; + } return 0; } diff --git a/src/map/mob.c b/src/map/mob.c index 833332b89..584d9de2e 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -32,10 +32,8 @@ #define MOB_LAZYMOVEPERC 50 // Move probability in the negligent mode MOB (rate of 1000 minute) #define MOB_LAZYWARPPERC 20 // Warp probability in the negligent mode MOB (rate of 1000 minute) -#define MAX_MOB_DB 2000 /* Change this to increase the table size in your mob_db to accomodate - numbers more than 2000 for mobs if you want to (and know what you're doing). - Be sure to note that 4001 to 4047 are for advanced classes. */ -struct mob_db mob_db[2001]; + +struct mob_db mob_db[MAX_MOB_DB+1]; #define CLASSCHANGE_BOSS_NUM 21 diff --git a/src/map/mob.h b/src/map/mob.h index 83a07d301..aa5753902 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -4,6 +4,9 @@ #define MAX_RANDOMMONSTER 3 #define MAX_MOB_RACE_DB 6 +#define MAX_MOB_DB 2000 /* Change this to increase the table size in your mob_db to accomodate + numbers more than 2000 for mobs if you want to (and know what you're doing). + Be sure to note that 4001 to 4047 are for advanced classes. */ struct mob_skill { short state; |