Hi guys, can anyone show me example, because i something can't to recognize and understand.
Here is code example, if player in game -> do something
If player not in game -> do another.
I found some bug in that system, and i request for a way to kick from the map server & the game a player with aid (account id) if he is in game, but on another character on account.
#ifdef BOUND_ITEMS
void guild_retrieveitembound(int char_id,int aid,int guild_id) {
TBL_PC *sd = map_id2sd(aid);
if(sd){ //Character is online
int idxlist[MAX_INVENTORY];
int j;
j = pc_bound_chk(sd,2,idxlist);
if(j) {
struct guild_storage* stor = guild2storage(sd->status.guild_id);
int i;
for(i=0;i<j;i++) { //Loop the matching items, guild_storage_additem takes care of opening storage
if(stor)
guild_storage_additem(sd,stor,&sd->status.inventory[idxlist[i]],sd->status.inventory[idxlist[i]].amount);
pc_delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,4,LOG_TYPE_GSTORAGE);
}
storage_guild_storageclose(sd); //Close and save the storage
}
ShowError( "Player is ONLINE! sd= %d aid= %d char_id= %d \n", sd, aid, char_id ); // need to remove this line
} else { //Character is offline, ask char server to do the job
struct guild_storage* stor = guild2storage2(guild_id);
struct guild *g = guild_search(guild_id);
nullpo_retv(g);
if(stor && stor->storage_status == 1) { //Someone is in guild storage, close them
int i;
for(i=0; i<g->max_member; i++){
TBL_PC *pl_sd = g->member[i].sd;
if(pl_sd && pl_sd->state.storage_flag == 2)
storage_guild_storageclose(pl_sd);
}
}
ShowError( "Player is OFFLINE!!! sd= %d aid= %d char_id= %d \n", sd, aid, char_id ); // need to remove this line
intif_itembound_req(char_id,aid,guild_id);
}
}
#endif
Question
anacondaq
Hi guys, can anyone show me example, because i something can't to recognize and understand.
Here is code example, if player in game -> do something
If player not in game -> do another.
I found some bug in that system, and i request for a way to kick from the map server & the game a player with aid (account id) if he is in game, but on another character on account.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.