summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-01 12:05:02 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-01 12:05:02 +0000
commit2fd87c062a72a6a17fccdaa822086221baae0e15 (patch)
tree836c2a8e15bd07cf4af256b8bc3a28872795df23 /src/map/pc.c
parent23a884ba4d24efdb80fc7a81ac2199e5ec7a2bb0 (diff)
downloadhercules-2fd87c062a72a6a17fccdaa822086221baae0e15.tar.gz
hercules-2fd87c062a72a6a17fccdaa822086221baae0e15.tar.bz2
hercules-2fd87c062a72a6a17fccdaa822086221baae0e15.tar.xz
hercules-2fd87c062a72a6a17fccdaa822086221baae0e15.zip
Fixed bugreport:6107 item restrictions are now checked upon logoff/mapchange which leads to gear being unequipped when conditions are not met. Super-Mega-Ultra Thanks/Credits To: Daegaladh
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16360 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 928eec87c..64b835c1b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4511,11 +4511,10 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
sd->state.changemap = (sd->mapindex != mapindex);
sd->state.warping = 1;
- if( sd->state.changemap )
- { // Misc map-changing settings
+ if( sd->state.changemap ) { // Misc map-changing settings
+ int i;
sd->state.pmap = sd->bl.m;
- if (sd->sc.count)
- { // Cancel some map related stuff.
+ if (sd->sc.count) { // Cancel some map related stuff.
if (sd->sc.data[SC_JAILED])
return 1; //You may not get out!
status_change_end(&sd->bl, SC_BOSSMAPINFO, INVALID_TIMER);
@@ -4531,6 +4530,11 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
sce->timer = add_timer(gettick() + skill_get_time(SG_KNOWLEDGE, sce->val1), status_change_timer, sd->bl.id, SC_KNOWLEDGE);
}
}
+ for( i = 0; i < EQI_MAX; i++ ) {
+ if( sd->equip_index[ i ] >= 0 )
+ if( !pc_isequip( sd , sd->equip_index[ i ] ) )
+ pc_unequipitem( sd , sd->equip_index[ i ] , 2 );
+ }
if (battle_config.clear_unit_onwarp&BL_PC)
skill_clear_unitgroup(&sd->bl);
party_send_dot_remove(sd); //minimap dot fix [Kevin]