summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4218aad55..838a1fc23 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -358,7 +358,8 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo
nullpo_retr(0, sd);
sd->bl.id = account_id;
- sd->char_id = char_id;
+ sd->status.char_id = account_id;
+ sd->status.char_id = char_id;
sd->login_id1 = login_id1;
sd->login_id2 = 0; // at this point, we can not know the value :(
sd->client_tick = client_tick;
@@ -970,7 +971,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
}
} while(flag);
- if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_famerank(sd->char_id, MAPID_TAEKWON)) {
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_famerank(sd->status.char_id, MAPID_TAEKWON)) {
//Grant all Taekwon Tree, but only as bonus skills in case they drop from ranking. [Skotlex]
for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){
if ((skill_get_inf2(id)&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)))
@@ -3357,7 +3358,7 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
){ //It is allowed on top of Moonlight/icewall tiles to prevent force-warping 'cheats' [Skotlex]
if(x||y) {
if(battle_config.error_log)
- ShowError("pc_setpos: attempt to place player on non-walkable tile (%s-%d,%d)\n",mapindex_id2name(mapindex),x,y);
+ ShowError("pc_setpos: attempt to place player %s (%d:%d) on non-walkable tile (%s-%d,%d)\n", sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(mapindex),x,y);
}
do {
x=rand()%(map[m].xs-2)+1;
@@ -4952,8 +4953,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
item_tmp.identify=1;
item_tmp.card[0]=CARD0_CREATE;
item_tmp.card[1]=0;
- item_tmp.card[2]=GetWord(sd->char_id,0); // CharId
- item_tmp.card[3]=GetWord(sd->char_id,1);
+ item_tmp.card[2]=GetWord(sd->status.char_id,0); // CharId
+ item_tmp.card[3]=GetWord(sd->status.char_id,1);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
}
@@ -5071,8 +5072,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
}
// pvp
// disable certain pvp functions on pk_mode [Valaris]
- if (map[sd->bl.m].flag.pvp && !battle_config.pk_mode &&
- (!map[sd->bl.m].flag.pvp_nocalcrank || map[sd->bl.m].flag.gvg_dungeon))
+ if (map[sd->bl.m].flag.gvg_dungeon ||
+ (map[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map[sd->bl.m].flag.pvp_nocalcrank))
{ //Pvp points always take effect on gvg_dungeon maps.
sd->pvp_point -= 5;
sd->pvp_lost++;