Added Guild Storage Expansion Skill (#3244)

* Fixes #499 and part of #1303.
* Implements Guild Storage Expansion Skill which requires client 2013-12-23 or newer (enable by default depending on client date in src/config/packets.hpp).
* Implements guild storage permission which requires client 2014-02-05 or newer.
* Expanded script command guildopenstorage return values.
This commit is contained in:
Aleos
2018-07-03 08:49:34 -04:00
committed by GitHub
parent e4eddc3e61
commit e13ca63cc8
18 changed files with 187 additions and 83 deletions

View File

@@ -594,7 +594,7 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
if(tsd==NULL || g==NULL)
return 0;
if( (i=guild_getposition(sd))<0 || !(g->position[i].mode&0x0001) )
if( (i=guild_getposition(sd))<0 || !(g->position[i].mode&GUILD_PERM_INVITE) )
return 0; //Invite permission.
if(!battle_config.invite_request_check) {
@@ -806,7 +806,7 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, uint32 account_id
if(sd->status.guild_id!=guild_id)
return 0;
if( (ps=guild_getposition(sd))<0 || !(g->position[ps].mode&0x0010) )
if( (ps=guild_getposition(sd))<0 || !(g->position[ps].mode&GUILD_PERM_EXPEL) )
return 0; //Expulsion permission
//Can't leave inside guild castles.
@@ -1092,14 +1092,11 @@ int guild_memberposition_changed(struct guild *g,int idx,int pos) {
/*====================================================
* Change guild title or member
*---------------------------------------------------*/
int guild_change_position(int guild_id,int idx,
int mode,int exp_mode,const char *name) {
int guild_change_position(int guild_id,int idx, int mode, int exp_mode, const char *name) {
struct guild_position p;
exp_mode = cap_value(exp_mode, 0, battle_config.guild_exp_limit);
//Mode 0x01 <- Invite
//Mode 0x10 <- Expel.
p.mode=mode&0x11;
p.mode = mode&GUILD_PERM_ALL;
p.exp_mode=exp_mode;
safestrncpy(p.name,name,NAME_LENGTH);
return intif_guild_position(guild_id,idx,&p);