summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-08 01:16:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-08 01:16:56 +0000
commitbc8350f550226c4d7d848ea9737f46c4a5d61575 (patch)
tree09945b6d680864c4fec46b63ab8a4a5844c45fd0 /src/map/pc.c
parent8630d5ddbb8c544096ebd7e6f023c23e9d7e407d (diff)
downloadhercules-bc8350f550226c4d7d848ea9737f46c4a5d61575.tar.gz
hercules-bc8350f550226c4d7d848ea9737f46c4a5d61575.tar.bz2
hercules-bc8350f550226c4d7d848ea9737f46c4a5d61575.tar.xz
hercules-bc8350f550226c4d7d848ea9737f46c4a5d61575.zip
- Changed define EQP_WEAPON to specify only the right-hand weapon, added define EQP_ARMS to specify both arm-slots.
- Some minor code cleanups to take account for the above, fixed Strip shield/weapon removing both. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8177 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 92dc175cc..8614d5956 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -390,7 +390,7 @@ int pc_equippoint(struct map_session_data *sd,int n)
sd->inventory_data[n]->look == W_1HSWORD ||
sd->inventory_data[n]->look == W_1HAXE) {
if(ep == EQP_HAND_R && (pc_checkskill(sd,AS_LEFT) > 0 || (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN))
- return EQP_WEAPON;
+ return EQP_ARMS;
}
return ep;
}
@@ -524,9 +524,9 @@ int pc_isequip(struct map_session_data *sd,int n)
return 0;
if (sd->sc.count) {
- if(item->equip & EQP_WEAPON && item->type == 4 && sd->sc.data[SC_STRIPWEAPON].timer != -1) // Also works with left-hand weapons [DracoRPG]
+ if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON].timer != -1) // Also works with left-hand weapons [DracoRPG]
return 0;
- if(item->equip & EQP_SHIELD && item->type == 5 && sd->sc.data[SC_STRIPSHIELD].timer != -1)
+ if(item->equip & EQP_SHIELD && item->type == IT_ARMOR && sd->sc.data[SC_STRIPSHIELD].timer != -1)
return 0;
if(item->equip & EQP_ARMOR && sd->sc.data[SC_STRIPARMOR].timer != -1)
return 0;
@@ -538,7 +538,7 @@ int pc_isequip(struct map_session_data *sd,int n)
if (sd->status.base_level > 90 && item->equip & EQP_HELM)
return 1; //Can equip all helms
- if (sd->status.base_level > 96 && item->equip & EQP_WEAPON && item->type == IT_WEAPON)
+ if (sd->status.base_level > 96 && item->equip & EQP_ARMS && item->type == IT_WEAPON)
switch(item->look) { //In weapons, the look determines type of weapon.
case W_DAGGER: //Level 4 Knives are equippable.. this means all knives, I'd guess?
case W_1HSWORD: //All 1H swords
@@ -6215,12 +6215,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
pos = sd->equip_index[EQI_ACC_L] >= 0 ? EQP_ACC_R : EQP_ACC_L;
}
- if(pos == EQP_WEAPON && id->equip == EQP_HAND_R &&
+ if(pos == EQP_ARMS && id->equip == EQP_HAND_R &&
(pc_checkskill(sd, AS_LEFT) > 0 ||
(sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN)
) { //Dual wield capable weapon.
- pos = (req_pos&EQP_WEAPON);
- if (pos == EQP_WEAPON) //User specified both slots, pick one for them.
+ pos = (req_pos&EQP_ARMS);
+ if (pos == EQP_ARMS) //User specified both slots, pick one for them.
pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
}
@@ -6404,7 +6404,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
- if((sd->status.inventory[n].equip & EQP_WEAPON) &&
+ if((sd->status.inventory[n].equip & EQP_ARMS) &&
sd->weapontype1 == 0 && sd->weapontype2 == 0)
skill_enchant_elemental_end(&sd->bl,-1);