summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-22 16:47:03 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-22 16:47:03 +0000
commit2780b8440b598c0ceb8a391cfb4c2b9724511651 (patch)
treef47c4a6a5748c107f0a9370ef3e077dbc628c3ee /src/map/pet.c
parent2fb26a430a18adfe09a97f9e6e5d0f1972a727eb (diff)
downloadhercules-2780b8440b598c0ceb8a391cfb4c2b9724511651.tar.gz
hercules-2780b8440b598c0ceb8a391cfb4c2b9724511651.tar.bz2
hercules-2780b8440b598c0ceb8a391cfb4c2b9724511651.tar.xz
hercules-2780b8440b598c0ceb8a391cfb4c2b9724511651.zip
- Applied Toms's suggested corrections to homun code.
- Corrected Cannibalize/Marine Sphere ignoring the selected summon spot. - Fixed looting pets ignoring the item pick-up priority of other players. - Should have fixed a signess warning in login txt. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7828 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index 2f5e210ad..317145cb7 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1034,8 +1034,9 @@ static int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap)
sd_id = fitem->first_get_id;
- if(bl->m == pd->bl.m && unit_can_reach_bl(&pd->bl,bl, pd->db->range2, 1, NULL, NULL)
- && rand()%1000<1000/(++(*itc)))
+ if(bl->m == pd->bl.m && (!sd_id || sd_id == pd->msd->bl.id) &&
+ unit_can_reach_bl(&pd->bl,bl, pd->db->range2, 1, NULL, NULL) &&
+ rand()%1000<1000/(++(*itc)))
pd->target_id=bl->id;
return 0;
}