summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-09 15:38:39 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-09 15:38:39 +0000
commit99af19cda37c8dc88c401edafce71a80ca2bbb20 (patch)
treee43890f4e5fd18f75ddf4b7b71ac70b9c47e8bb8 /src/map/pet.c
parent560250a022a95bd9678c5a81e5f14a34959e356a (diff)
downloadhercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.tar.gz
hercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.tar.bz2
hercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.tar.xz
hercules-99af19cda37c8dc88c401edafce71a80ca2bbb20.zip
* Don't allow Pets to attack Guardians outside of WoE [Codemaster] [SVN 940]
* Require 15% of HP or more for WE_MALE skill [Codemaster] [SVN 940] * Require 15% of SP or more for WE_FEMALE skill [Codemaster] [SVN 940] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@940 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index 545cc079f..c198c1fb5 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -178,7 +178,9 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
md=(struct mob_data *)map_id2bl(pd->target_id);
if(md == NULL || md->bl.type != BL_MOB || pd->bl.m != md->bl.m || md->bl.prev == NULL ||
- distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13) {
+ distance(pd->bl.x,pd->bl.y,md->bl.x,md->bl.y) > 13 ||
+ (!agit_flag && md->class_ >= 1285 && md->class_ <= 1288)) // Cannot attack Guardians outside of WoE
+ {
pd->target_id=0;
return 0;
}