diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-06-03 14:43:34 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-06-03 14:43:34 +0000 |
commit | 89d430b2c4d770d7d5c073710a21bd24df5f3f0c (patch) | |
tree | e5f93768098ffc862b279316dc20c78d7c96835d /src/map/pc.c | |
parent | 85db2023cb033928a190ac7fa6f05b5d6cbad14a (diff) | |
download | hercules-89d430b2c4d770d7d5c073710a21bd24df5f3f0c.tar.gz hercules-89d430b2c4d770d7d5c073710a21bd24df5f3f0c.tar.bz2 hercules-89d430b2c4d770d7d5c073710a21bd24df5f3f0c.tar.xz hercules-89d430b2c4d770d7d5c073710a21bd24df5f3f0c.zip |
- Fixed missing client update when 'return to savepoint' fails
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied)
- Added clif_standing() to clif_sitting(), and used them in clif.c
- Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 127020e1e..5d7ec6782 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -333,10 +333,12 @@ int pc_makesavestatus(struct map_session_data *sd) if (sd->sc.count && sd->sc.data[SC_JAILED].timer != -1) { //When Jailed, do not move last point. - if(pc_isdead(sd)) + if(pc_isdead(sd)){ pc_setrestartvalue(sd,0); - sd->status.hp = sd->battle_status.hp; - sd->status.sp = sd->battle_status.sp; + } else { + sd->status.hp = sd->battle_status.hp; + sd->status.sp = sd->battle_status.sp; + } sd->status.last_point.map = sd->mapindex; sd->status.last_point.x = sd->bl.x; sd->status.last_point.y = sd->bl.y; @@ -1196,7 +1198,7 @@ int pc_disguise(struct map_session_data *sd, int class_) } pc_stop_walking(sd, 0); - clif_clearchar(&sd->bl, 0); + clif_clearunit_area(&sd->bl, 0); if (!class_) { sd->disguise = 0; @@ -3622,8 +3624,7 @@ int pc_checkallowskill(struct map_session_data *sd) for (i = 0; i < sizeof(scw_list)/sizeof(scw_list[0]); i++) { // Skills requiring specific weapon types if(sd->sc.data[scw_list[i]].timer!=-1 && - !pc_check_weapontype(sd, - skill_get_weapontype(StatusSkillChangeTable[scw_list[i]]))) + !pc_check_weapontype(sd,skill_get_weapontype(StatusSkillChangeTable[scw_list[i]]))) status_change_end(&sd->bl,scw_list[i],-1); } @@ -3633,7 +3634,7 @@ int pc_checkallowskill(struct map_session_data *sd) if(sd->status.shield <= 0) { // Skills requiring a shield for (i = 0; i < sizeof(scs_list)/sizeof(scs_list[0]); i++) - if(sd->sc.data[scs_list[i]].timer!=-1) // Guard + if(sd->sc.data[scs_list[i]].timer!=-1) status_change_end(&sd->bl,scs_list[i],-1); } return 0; @@ -4869,7 +4870,9 @@ static int pc_respawn(int tid,unsigned int tick,int id,int data) { //Auto-respawn [Skotlex] pc_setstand(sd); pc_setrestartvalue(sd,3); - pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,0); + if(pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 0)) + clif_resurrection(&sd->bl, 1); //If warping fails, send a normal stand up packet. + } return 0; } |