From 33af82efa149ada28596fa6b815cc66605577b98 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 9 Feb 2012 03:27:59 +0000 Subject: Added minor autolootitem code improvement. saves from scenarios like: Kill a monsters on a aoe, with 10 drops looking up a empty autolootitem array -- 100 times ? -- (10 per loot with AUTOLOOITEM_SIZE as 10). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15556 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 0d0ebe4bf..22f165374 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8249,6 +8249,8 @@ void pc_overheat(struct map_session_data *sd, int val) { bool pc_isautolooting(struct map_session_data *sd, int nameid) { int i; + if( !sd->state.autolooting ) + return false; ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == nameid); return (i != AUTOLOOTITEM_SIZE); } -- cgit v1.2.3-70-g09d2