Let me explain quickly : my server has 76 guild rank(one by a guild member)I would ensure that only the first 20 positions of the guild can access the guildstorage,I think you have found the place or I must do my modification but I have no idea how..
Thatif someone could give me the correct code to do what I wishI would be very grateful.
int storage_guild_storageopen(struct map_session_data* sd)
{
struct guild_storage *gstor;
nullpo_ret(sd);
if(sd->status.guild_id <= 0)
return 2;
if(sd->state.storage_flag)
return 1; //Can't open both storages at a time.
if( !pc_can_give_items(pc_isGM(sd)) ) { //check is this GM level can open guild storage and store items [Lupus]
clif_displaymessage(sd->fd, msg_txt(246));
return 1;
}
if((gstor = guild2storage2(sd->status.guild_id)) == NULL) {
intif_request_guild_storage(sd->status.account_id,sd->status.guild_id);
return 0;
}
if(gstor->storage_status)
return 1;
gstor->storage_status = 1;
sd->state.storage_flag = 2;
storage_sortitem(gstor->items, ARRAYLENGTH(gstor->items));
clif_storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items));
clif_updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE);
return 0;
}
Hi all,
Let me explain quickly : my server has 76 guild rank(one by a guild member)I would ensure that only the first 20 positions of the guild can access the guildstorage,I think you have found the place or I must do my modification but I have no idea how..
Thatif someone could give me the correct code to do what I wishI would be very grateful.
int storage_guild_storageopen(struct map_session_data* sd) { struct guild_storage *gstor; nullpo_ret(sd); if(sd->status.guild_id <= 0) return 2; if(sd->state.storage_flag) return 1; //Can't open both storages at a time. if( !pc_can_give_items(pc_isGM(sd)) ) { //check is this GM level can open guild storage and store items [Lupus] clif_displaymessage(sd->fd, msg_txt(246)); return 1; } if((gstor = guild2storage2(sd->status.guild_id)) == NULL) { intif_request_guild_storage(sd->status.account_id,sd->status.guild_id); return 0; } if(gstor->storage_status) return 1; gstor->storage_status = 1; sd->state.storage_flag = 2; storage_sortitem(gstor->items, ARRAYLENGTH(gstor->items)); clif_storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items)); clif_updatestorageamount(sd, gstor->storage_amount, MAX_GUILD_STORAGE); return 0; }Edited by EmistryCodeboxed Content
Link to comment
Share on other sites