summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/guild.c7
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/unit.c4
3 files changed, 11 insertions, 8 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index da579300f..5a4162730 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -641,11 +641,14 @@ int guild_invite(struct map_session_data *sd,int account_id)
return 0;
}
}
- if( tsd->status.guild_id>0 || tsd->guild_invite>0 ){ // 相手の所属確認
+ if(tsd->status.guild_id>0 ||
+ tsd->guild_invite>0 ||
+ map[tsd->bl.m].flag.gvg_castle)
+ { //Can't invite people inside castles. [Skotlex]
clif_guild_inviteack(sd,0);
return 0;
}
-
+
// 定員確認
for(i=0;i<g->max_member;i++)
if(g->member[i].account_id==0)
diff --git a/src/map/pc.c b/src/map/pc.c
index 93e0da84a..baf7c7dcc 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3044,14 +3044,14 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
if(sd->mapindex){
int ip,port;
if(map_mapname2ipport(mapindex,&ip,&port)==0){
- unit_remove_map(&sd->bl,3);
+ unit_remove_map(&sd->bl,clrtype);
sd->mapindex = mapindex;
sd->bl.x=x;
sd->bl.y=y;
sd->state.waitingdisconnect=1;
pc_clean_skilltree(sd);
if(sd->status.pet_id > 0 && sd->pd) {
- unit_remove_map(&sd->pd->bl, 0);
+ unit_remove_map(&sd->pd->bl, clrtype);
intif_save_petdata(sd->status.account_id,&sd->pet);
}
chrif_save(sd,1);
@@ -3083,9 +3083,9 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
}
if(sd->bl.prev != NULL){
- unit_remove_map(&sd->bl, 3);
+ unit_remove_map(&sd->bl, clrtype);
if(sd->status.pet_id > 0 && sd->pd)
- unit_remove_map(&sd->pd->bl, 3);
+ unit_remove_map(&sd->pd->bl, clrtype);
clif_changemap(sd,map[m].index,x,y); // [MouseJstr]
}
diff --git a/src/map/unit.c b/src/map/unit.c
index dd2ee0505..e928178cd 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1476,8 +1476,8 @@ int unit_free(struct block_list *bl) {
nullpo_retr(0, ud);
map_freeblock_lock();
- if( bl->prev )
- unit_remove_map(bl, 0);
+ if( bl->prev ) //Players are supposed to logout with a "warp" effect.
+ unit_remove_map(bl, bl->type==BL_PC?3:0);
if( bl->type == BL_PC ) {
struct map_session_data *sd = (struct map_session_data*)bl;