diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-19 21:25:56 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-19 21:25:56 +0000 |
commit | 0a98391b9dba8f27a0c285fcdafc564d93a37e23 (patch) | |
tree | 06157117643325a15f5fd570767897856184e96b /src/map/mob.c | |
parent | ebed223aec7badf0b6ca7cf6e3341a5c81e7174d (diff) | |
download | hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.tar.gz hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.tar.bz2 hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.tar.xz hercules-0a98391b9dba8f27a0c285fcdafc564d93a37e23.zip |
- Cleaned up the log.c file.
- Splitted log_pick into log_pick_pc and log_pick_mob to avoid ugly type-casting.
- Fixed log_chat not recording anything if the server is compiled in SQL mode and sql_logs is turned off (it should then record to a plain txt file)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9017 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index f27370587..fa0d0f135 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1280,7 +1280,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) if (md->lootitem_count < LOOTITEM_SIZE) { memcpy (&md->lootitem[md->lootitem_count++], &fitem->item_data, sizeof(md->lootitem[0])); if(log_config.enable_logs&0x10) //Logs items, taken by (L)ooter Mobs [Lupus] - log_pick((struct map_session_data*)md, "L", md->class_, md->lootitem[md->lootitem_count-1].nameid, md->lootitem[md->lootitem_count-1].amount, &md->lootitem[md->lootitem_count-1]); + log_pick_mob(md, "L", md->lootitem[md->lootitem_count-1].nameid, md->lootitem[md->lootitem_count-1].amount, &md->lootitem[md->lootitem_count-1]); } else { //Destroy first looted item... if (md->lootitem[0].card[0] == (short)0xff00) intif_delete_petdata( MakeDWord(md->lootitem[0].card[1],md->lootitem[0].card[2]) ); @@ -1487,9 +1487,9 @@ static void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, str if(log_config.enable_logs&0x10) { //Logs items, dropped by mobs [Lupus] if (loot) - log_pick((struct map_session_data*)md, "L", md->class_, ditem->item_data.nameid, -ditem->item_data.amount, &ditem->item_data); + log_pick_mob(md, "L", ditem->item_data.nameid, -ditem->item_data.amount, &ditem->item_data); else - log_pick((struct map_session_data*)md, "M", md->class_, ditem->item_data.nameid, -ditem->item_data.amount, NULL); + log_pick_mob(md, "M", ditem->item_data.nameid, -ditem->item_data.amount, NULL); } if (dlist->first_sd && dlist->first_sd->state.autoloot && @@ -2102,8 +2102,8 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } if(log_config.enable_logs&0x200) {//Logs items, MVP prizes [Lupus] - log_pick((struct map_session_data*)md, "M", md->class_, item.nameid, -1, NULL); - log_pick(mvp_sd, "P", 0, item.nameid, 1, NULL); + log_pick_mob(md, "M", item.nameid, -1, NULL); + log_pick_pc(mvp_sd, "P", item.nameid, 1, NULL); } break; } |