summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-21 20:34:37 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-21 20:34:37 +0000
commit53d34018d92d1ec1c1dd1fc79b59f151ea571eb3 (patch)
treea2024546f505ef5c56a468ef424d6504cae8588f
parent80f9698540a1e79b386b5c6863d0a412067c7086 (diff)
downloadhercules-53d34018d92d1ec1c1dd1fc79b59f151ea571eb3.tar.gz
hercules-53d34018d92d1ec1c1dd1fc79b59f151ea571eb3.tar.bz2
hercules-53d34018d92d1ec1c1dd1fc79b59f151ea571eb3.tar.xz
hercules-53d34018d92d1ec1c1dd1fc79b59f151ea571eb3.zip
- battle_check_target will now tag homunculus as invalid target when the source is a skill-type object.
- Added a check on pc_equipitem so that when the client specifies to equip a weapon on the right hand when the left hand is available, the weapon will be sent to the left hand instead (when dual-wielding is possible, obviously). Same for the left/right accessories. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7816 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt6
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/pc.c11
3 files changed, 21 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index a1897c997..b11425093 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,12 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/21
+ * battle_check_target will now tag homunculus as invalid target when the
+ source is a skill-type object. [Skotlex]
+ * Added a check on pc_equipitem so that when the client specifies to equip
+ a weapon on the right hand when the left hand is available, the weapon will
+ be sent to the left hand instead (when dual-wielding is possible,
+ obviously). Same for the left/right accessories. [Skotlex]
* Added the necessary checks so that Suiton makes Fogwall have double
duration, and to make water-requiring skills to consume their cells.
[Skotlex]
diff --git a/src/map/battle.c b/src/map/battle.c
index ad59a9685..257fceb16 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3082,7 +3082,11 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0; //Pets cannot be targetted.
}
case BL_HOMUNCULUS:
- { //Just fallback on master.
+ {
+ //For some mysterious reason ground-skills can't target homun.
+ if (src->type == BL_SKILL)
+ return 0;
+ //Just fallback on master.
t_bl=(struct block_list *)((TBL_HOMUNCULUS*)target)->master;
break;
}
diff --git a/src/map/pc.c b/src/map/pc.c
index 50773029d..6191012ba 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6192,6 +6192,11 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
pos = req_pos&EQP_ACC;
if (pos == EQP_ACC) //User specified both slots..
pos = sd->equip_index[EQI_ACC_L] >= 0 ? EQP_ACC_R : EQP_ACC_L;
+ if (pos == EQP_ACC_L &&
+ sd->equip_index[EQI_ACC_L] >= 0 &&
+ sd->equip_index[EQI_ACC_R] < 0
+ ) //Requesting to reequip on left when right is available?
+ pos = EQP_ACC_R;
}
if(pos == EQP_WEAPON && id->equip == EQP_HAND_R &&
@@ -6201,8 +6206,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
pos = (req_pos&EQP_WEAPON);
if (pos == EQP_WEAPON) //User specified both slots, pick one for them.
pos = sd->equip_index[EQI_HAND_R] >= 0 ? EQP_HAND_L : EQP_HAND_R;
+ if (pos == EQP_HAND_R &&
+ sd->equip_index[EQI_HAND_R] >= 0 &&
+ sd->equip_index[EQI_HAND_L] < 0
+ ) //Requesting to reequip on right when left is available?
+ pos = EQP_HAND_L;
}
-
if (pos&EQP_HAND_R && battle_config.use_weapon_skill_range)
{ //Update skill-block range database when weapon range changes. [Skotlex]