summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-21 13:35:41 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-21 13:35:41 +0000
commit27f226cfcd6c119da809e3c71aba819b9a9a182a (patch)
tree2fadbb6ee1c9cafd5681fb180272c26469718dab /src
parent266f0273f733a27b9bcb040c4d6c0d4e995f06bb (diff)
downloadhercules-27f226cfcd6c119da809e3c71aba819b9a9a182a.tar.gz
hercules-27f226cfcd6c119da809e3c71aba819b9a9a182a.tar.bz2
hercules-27f226cfcd6c119da809e3c71aba819b9a9a182a.tar.xz
hercules-27f226cfcd6c119da809e3c71aba819b9a9a182a.zip
- Fixed items not really getting unequipped when they should.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6214 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 9602a9b2c..665e380ff 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6245,6 +6245,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int pos)
*/
int pc_unequipitem(struct map_session_data *sd,int n,int flag)
{
+ int i;
nullpo_retr(0, sd);
// -- moonsoul (if player is berserk then cannot unequip)
@@ -6261,6 +6262,10 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
clif_unequipitemack(sd,n,0,0);
return 0;
}
+ for(i=0;i<11;i++) {
+ if(sd->status.inventory[n].equip & equip_pos[i])
+ sd->equip_index[i] = -1;
+ }
if(sd->status.inventory[n].equip & 0x0002) {
sd->weapontype1 = 0;
@@ -6303,7 +6308,6 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
}
//OnUnEquip script [Skotlex]
if (sd->inventory_data[n]) {
- int i;
struct item_data *data;
if (sd->inventory_data[n]->unequip_script)
run_script(sd->inventory_data[n]->unequip_script,0,sd->bl.id,0);