From 61248161ad0386b46d3f37ed4457366841501036 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 1 Dec 2006 17:17:09 +0000 Subject: - Fixed txt-converter compilation. - Added my_global.h include to login converter - Removed sd->char_id since we can use sd->status.char_id instead. - Small speedup in STRECOVERY, and made it not unlock a mob's target. - Fixed GS_GROUNDDRIFT consuming ammo when it's time expires (so it was consuming 2 grenades instead of one). Also added a "explosion effect" when their time runs out. - gvg_dungeon mapflag won't set pvp related mapflags anymore, pc_dead will force pvp ranking gain/loss on gvg_dungeon maps now. - Now when coming out of hiding land-effects will trigger on the character. - Made the pc_setpos message when being placed on an unwalkable tile tell you which player triggered it. - Fixed land effects not taking effect inmediately on map-load when the invincible timer is disabled. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9374 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/map/pc.c') 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++; -- cgit v1.2.3-70-g09d2