summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-21 13:53:36 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-21 13:53:36 +0000
commit6a71c68fd365d0b7e91fe89a2d02296ef465a720 (patch)
tree8f9cc4485e78f23207e3edab3751d8bfe316b66c /src/map/mob.c
parent5834376714bc7f39480eae14b9eb8e15f117d634 (diff)
downloadhercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.tar.gz
hercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.tar.bz2
hercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.tar.xz
hercules-6a71c68fd365d0b7e91fe89a2d02296ef465a720.zip
- Vending is now cancelled on a pc_setpos
- Pressure again ignores Basilica. - Fixed attacker's sc being nulled when the target's sc is empty. - Slaves now do a battle_check_target to check if the new target is an enemy when acquired through sd->skilltarget. - Fixed SC_SKE halving defense2 twice. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5355 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index db752c556..93198ddb4 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1469,8 +1469,11 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
struct block_list *tbl = NULL;
if(msd->attacktarget)
tbl = map_id2bl(msd->attacktarget);
- else if (msd->skilltarget)
+ else if (msd->skilltarget) {
tbl = map_id2bl(msd->skilltarget);
+ if (tbl && battle_check_target(&md->bl, tbl, BCT_ENEMY) <= 0)
+ tbl = NULL; //Required check as skilltarget is not always an enemy. [Skotlex]
+ }
if(tbl && status_check_skilluse(&md->bl, tbl, 0, 0)) {
md->target_id=tbl->id;
md->state.targettype = ATTACKABLE;