summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-18 00:45:35 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-18 00:45:35 +0000
commit7bdb98374ade0b0d2aad8e2f85b0c799112c170d (patch)
tree25b738619cf960e7bfc933cf5beecd958cf240f8 /src/map/mob.c
parentc3743d84907e4aea48a02d43f453b957287238e4 (diff)
downloadhercules-7bdb98374ade0b0d2aad8e2f85b0c799112c170d.tar.gz
hercules-7bdb98374ade0b0d2aad8e2f85b0c799112c170d.tar.bz2
hercules-7bdb98374ade0b0d2aad8e2f85b0c799112c170d.tar.xz
hercules-7bdb98374ade0b0d2aad8e2f85b0c799112c170d.zip
Reorganized picklog functions a bit to reuse some common code.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15486 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 3d48ba9ba..7b5e0265c 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1490,7 +1490,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, unsigned int tick)
fitem = (struct flooritem_data *)tbl;
//Logs items, taken by (L)ooter Mobs [Lupus]
- log_pick_mob(md, LOG_TYPE_LOOT, fitem->item_data.nameid, fitem->item_data.amount, &fitem->item_data);
+ log_pick_mob(md, LOG_TYPE_LOOT, fitem->item_data.amount, &fitem->item_data);
if (md->lootitem_count < LOOTITEM_SIZE) {
memcpy (&md->lootitem[md->lootitem_count++], &fitem->item_data, sizeof(md->lootitem[0]));
@@ -1731,10 +1731,7 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str
TBL_PC* sd;
//Logs items, dropped by mobs [Lupus]
- if (loot)
- log_pick_mob(md, LOG_TYPE_LOOT, ditem->item_data.nameid, -ditem->item_data.amount, &ditem->item_data);
- else
- log_pick_mob(md, LOG_TYPE_PICKDROP_MONSTER, ditem->item_data.nameid, -ditem->item_data.amount, NULL);
+ log_pick_mob(md, loot?LOG_TYPE_LOOT:LOG_TYPE_PICKDROP_MONSTER, -ditem->item_data.amount, &ditem->item_data);
sd = map_charid2sd(dlist->first_charid);
if( sd == NULL ) sd = map_charid2sd(dlist->second_charid);
@@ -2410,7 +2407,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
//Logs items, MVP prizes [Lupus]
- log_pick_mob(md, LOG_TYPE_PICKDROP_MONSTER, item.nameid, -1, NULL);
+ log_pick_mob(md, LOG_TYPE_PICKDROP_MONSTER, -1, &item);
break;
}