From c131bdc71a98961738d9e996ce45d767b2212860 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sun, 5 Feb 2006 11:24:46 +0000 Subject: - 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 --- src/map/npc.c | 2 +- src/map/pet.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/npc.c b/src/map/npc.c index e3517458b..cf0632416 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1764,7 +1764,7 @@ static int npc_parse_shop (char *w1, char *w2, char *w3, char *w4) nd->flag = 0; memcpy(nd->name, w3, NAME_LENGTH-1); nd->name[NAME_LENGTH-1] = '\0'; - nd->class_ = m==-1?0:atoi(w4); + nd->class_ = m==-1?-1:atoi(w4); nd->speed = 200; nd = (struct npc_data *)aRealloc(nd, 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++; -- cgit v1.2.3-70-g09d2