summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-05 11:24:46 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-05 11:24:46 +0000
commitc131bdc71a98961738d9e996ce45d767b2212860 (patch)
tree0efa9a588765636736ee26b059ec7728253b3586 /src/map/pet.c
parent399338cefe9da1405fed2e69d6708ae2d8c9311d (diff)
downloadhercules-c131bdc71a98961738d9e996ce45d767b2212860.tar.gz
hercules-c131bdc71a98961738d9e996ce45d767b2212860.tar.bz2
hercules-c131bdc71a98961738d9e996ce45d767b2212860.tar.xz
hercules-c131bdc71a98961738d9e996ce45d767b2212860.zip
- Small fix in pet_attack that would make pets not unlock their target in some situations.
- Fixed invisible shops. callshop scrip command now works! - Added proper documentation of script command callshop git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5195 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index 17d97d225..f94154fe4 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -176,9 +176,6 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
target= map_id2bl(pd->target_id);
- if(!status_check_skilluse(&pd->bl, target, 0, 0))
- return 0;
-
if(target == NULL || pd->bl.m != target->m || target->prev == NULL ||
!check_distance_bl(&pd->bl, target, pd->db->range3))
{
@@ -186,6 +183,9 @@ static int pet_attack(struct pet_data *pd,unsigned int tick,int data)
return 0;
}
+ if(!status_check_skilluse(&pd->bl, target, 0, 0))
+ return 0;
+
range = pd->db->range;
if (battle_iswalking(&pd->bl)) range++;
if (battle_iswalking(target)) range++;