summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-19 04:36:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-19 04:36:44 +0000
commit90e11bb615a4df66fcc3b538fffe6595bca05015 (patch)
tree291d75b907783d4d89b23a7bebef3baf142e9799 /src/map/pc.c
parent6ce5dacb5b15f16ff4c672596c091a41a190d687 (diff)
downloadhercules-90e11bb615a4df66fcc3b538fffe6595bca05015.tar.gz
hercules-90e11bb615a4df66fcc3b538fffe6595bca05015.tar.bz2
hercules-90e11bb615a4df66fcc3b538fffe6595bca05015.tar.xz
hercules-90e11bb615a4df66fcc3b538fffe6595bca05015.zip
- Rewrote the jail logic to always use a status change. This means that the character's save point is not changed when jailed, and the char is always warped back to the point where it was before being jailed on unjail.
- Made pc_setpos fail if you are jailed, effectively blocking you from being moved out of the jail map for the duration of jail. - Modified @adjcmdlvl so you can't set a command to require higher level than yourself, and so you can't edit the level of a command which is higher than your own. - Corrected attack_attr_none setting disabling elemental resist cards. - Added missing cap check of 100% to drop rate configs for heal/use/adddrop (cards)/treasures. - Corrected Autoblitz yelling the skill name if the attack splashed. - Corrected Dispell removing Jailed status. - Corrected being able to revive with 0 hp. - Modified the "Restart" code so that it makes you stand on spot when pc_setpos fails to move you back to your originating location. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10028 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index e8515b553..059dc41fd 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -319,6 +319,19 @@ int pc_makesavestatus(struct map_session_data *sd)
sd->status.clothes_color=0;
sd->status.option = sd->sc.option; //Since the option saved is in
+
+ if (sd->sc.count && sd->sc.data[SC_JAILED].timer != -1)
+ { //When Jailed, do not move last point.
+ if(pc_isdead(sd))
+ pc_setrestartvalue(sd,0);
+ 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;
+ return 0;
+ }
+
if(pc_isdead(sd)){
pc_setrestartvalue(sd,0);
memcpy(&sd->status.last_point,&sd->status.save_point,sizeof(sd->status.last_point));
@@ -3335,12 +3348,10 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
if (sd->mapindex != mapindex)
{ //Misc map-changing settings
- party_send_dot_remove(sd); //minimap dot fix [Kevin]
- guild_send_dot_remove(sd);
- if (sd->regen.state.gc)
- sd->regen.state.gc = 0;
if (sd->sc.count)
{ //Cancel some map related stuff.
+ if (sd->sc.data[SC_JAILED].timer != -1)
+ return 1; //You may not get out!
if (sd->sc.data[SC_WARM].timer != -1)
status_change_end(&sd->bl,SC_WARM,-1);
if (sd->sc.data[SC_SUN_COMFORT].timer != -1)
@@ -3356,6 +3367,10 @@ int pc_setpos(struct map_session_data *sd,unsigned short mapindex,int x,int y,in
}
if (battle_config.clear_unit_onwarp&BL_PC)
skill_clear_unitgroup(&sd->bl);
+ party_send_dot_remove(sd); //minimap dot fix [Kevin]
+ guild_send_dot_remove(sd);
+ if (sd->regen.state.gc)
+ sd->regen.state.gc = 0;
}
if(m<0){