Skip to content

Commit

Permalink
Changed PACKETVER requirements of having a dynamic storage to 20131223
Browse files Browse the repository at this point in the history
  • Loading branch information
panikon authored and MishimaHaruna committed Jan 17, 2016
1 parent b256b17 commit 22c0ef9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/char/int_guild.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ int inter_guild_calcinfo(struct guild *g)
// Save next exp step
g->next_exp = nextexp;
// Set the max storage size
#if PACKETVER >= 20140205
#if PACKETVER >= 20131223
g->max_storage = inter_guild->checkskill(g, GD_GUILD_STORAGE)*100;
#else
g->max_storage = MAX_GUILD_STORAGE;
Expand Down Expand Up @@ -1240,7 +1240,7 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member
g->average_lv = master->lv;
g->connect_member = 1;
g->guild_lv = 1;
#if PACKETVER >= 20140205
#if PACKETVER >= 20131223
g->max_storage = 0;
#else
g->max_storage = MAX_GUILD_STORAGE;
Expand Down
2 changes: 1 addition & 1 deletion src/map/intif.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ int intif_send_guild_storage(int account_id,struct guild_storage *gs) {
if( intif->CheckForCharServer() )
return 0;

nullpo_ret(gstor);
nullpo_ret(gs);
size = (gs->items)?(14 + (sizeof(struct item)*gs->storage_amount) ):14;

WFIFOHEAD(inter_fd, size);
Expand Down
9 changes: 5 additions & 4 deletions src/map/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ bool storage_guild_storage_allocate_items( struct guild_storage *gs ) {

// It is expected that g->max_storage is already available, but it doesn't hurt to
// re-set it to the proper value
#if PACKETVER >= 20140205
#if PACKETVER >= 20131223
g->max_storage = guild->checkskill(g, GD_GUILD_STORAGE)*100;
#else
g->max_storage = MAX_GUILD_STORAGE;
Expand All @@ -442,7 +442,7 @@ bool storage_guild_storage_allocate_items( struct guild_storage *gs ) {
* @retval 0 success (open or req to create a new one)
* @retval 1 storage is already open (storage_flag)
* @retval 2 sd has no guild / guild information hasn't arrived yet
* @retval 3 sd's guild doesn't have GD_GUILD_STORAGE (msg_txt(335)) (PACKETVER >= 20140205)
* @retval 3 sd's guild doesn't have GD_GUILD_STORAGE (msg_txt(335)) (PACKETVER >= 20131223)
* @retval 4 sd doesn't have permission to use storage (msg_txt(336)) (PACKETVER >= 20140205)
**/
int storage_guild_storageopen(struct map_session_data* sd)
Expand All @@ -457,9 +457,10 @@ int storage_guild_storageopen(struct map_session_data* sd)
if (sd->state.storage_flag != STORAGE_FLAG_CLOSED)
return 1; // Can't open both storages at a time.

#if PACKETVER >= 20131223
if (!guild->checkskill(sd->guild, GD_GUILD_STORAGE))
return 3; // Can't open storage if guild has none

#endif
#if PACKETVER >= 20140205
{
int pos;
Expand Down Expand Up @@ -796,7 +797,7 @@ int storage_guild_storageclose(struct map_session_data* sd) {
* @retval true success
**/
bool storage_guild_storage_grow( struct guild *g ) {
#if PACKETVER >= 20140205
#if PACKETVER >= 20131223
struct guild_storage *gs;
struct item *temp;
int new_size;
Expand Down

0 comments on commit 22c0ef9

Please sign in to comment.