summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-26 13:59:21 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-26 13:59:21 +0000
commitdb4bf8d09b97e6320374a6162815c03952624eea (patch)
treef73c611523908e6a58653ad3e83b0bc2e3d4dc8b /src/map/battle.c
parent4fa74f63b163da3defdf22c7135b91cb6acfdcf0 (diff)
downloadhercules-db4bf8d09b97e6320374a6162815c03952624eea.tar.gz
hercules-db4bf8d09b97e6320374a6162815c03952624eea.tar.bz2
hercules-db4bf8d09b97e6320374a6162815c03952624eea.tar.xz
hercules-db4bf8d09b97e6320374a6162815c03952624eea.zip
- Updated battle_check_target so that non-offensive skills cannot be used on a homun except for the homun and it's master.
- Steal zeny won't work on treasure chests now. - Small optimization in the dual-wielding check. - Some cleaning in char_sql/itemdb.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8875 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6d000c46b..db50d4db4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3198,8 +3198,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
}
break;
- //Valid targets with no special checks here.
case BL_HOM:
+ //Except for the master/itself, hom can't be targetted with non-offensive skills. [Skotlex]
+ if (t_bl != s_bl && !(flag&BCT_ENEMY))
+ return 0;
break;
//All else not specified is an invalid target.
default: