summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-11 17:35:28 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-11 17:35:28 +0000
commite782bd5f2f7cd73634dfd8616a351a1b97c2109c (patch)
tree319366658d419bed37df23fc67b1c80957a141f4 /src/map/atcommand.c
parente18603bb1985d5628f1213999e92eaed8d008eb1 (diff)
downloadhercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.gz
hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.bz2
hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.tar.xz
hercules-e782bd5f2f7cd73634dfd8616a351a1b97c2109c.zip
Picklog improvements:
- now it is finally possible to log every item players gain or lose - added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`) - it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3ac0fe572..40d1590b1 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1722,14 +1722,11 @@ ACMD_FUNC(item)
item_tmp.nameid = item_id;
item_tmp.identify = 1;
- if ((flag = pc_additem(sd, &item_tmp, get_count)))
+ if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
clif_additem(sd, 0, 0, flag);
}
}
- //Logs (A)dmins items [Lupus]
- log_pick_pc(sd, LOG_TYPE_COMMAND, item_id, number, NULL);
-
clif_displaymessage(fd, msg_txt(18)); // Item created.
return 0;
}
@@ -1797,13 +1794,10 @@ ACMD_FUNC(item2)
item_tmp.card[1] = c2;
item_tmp.card[2] = c3;
item_tmp.card[3] = c4;
- if ((flag = pc_additem(sd, &item_tmp, get_count)))
+ if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND)))
clif_additem(sd, 0, 0, flag);
}
- //Logs (A)dmins items [Lupus]
- log_pick_pc(sd, LOG_TYPE_COMMAND, item_tmp.nameid, number, &item_tmp);
-
clif_displaymessage(fd, msg_txt(18)); // Item created.
} else {
clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
@@ -1823,11 +1817,7 @@ ACMD_FUNC(itemreset)
for (i = 0; i < MAX_INVENTORY; i++) {
if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) {
-
- //Logs (A)dmins items [Lupus]
- log_pick_pc(sd, LOG_TYPE_COMMAND, sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
-
- pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0);
+ pc_delitem(sd, i, sd->status.inventory[i].amount, 0, 0, LOG_TYPE_COMMAND);
}
}
clif_displaymessage(fd, msg_txt(20)); // All of your items have been removed.
@@ -2887,10 +2877,7 @@ ACMD_FUNC(produce)
clif_produceeffect(sd, 0, item_id);
clif_misceffect(&sd->bl, 3);
- //Logs (A)dmins items [Lupus]
- log_pick_pc(sd, LOG_TYPE_COMMAND, tmp_item.nameid, 1, &tmp_item);
-
- if ((flag = pc_additem(sd, &tmp_item, 1)))
+ if ((flag = pc_additem(sd, &tmp_item, 1, LOG_TYPE_COMMAND)))
clif_additem(sd, 0, 0, flag);
} else {
sprintf(atcmd_output, msg_txt(169), item_id, item_data->name); // The item (%d: '%s') is not equipable.
@@ -5970,10 +5957,7 @@ void getring (struct map_session_data* sd)
item_tmp.card[2] = sd->status.partner_id;
item_tmp.card[3] = sd->status.partner_id >> 16;
- //Logs (A)dmins items [Lupus]
- log_pick_pc(sd, LOG_TYPE_COMMAND, item_id, 1, &item_tmp);
-
- if((flag = pc_additem(sd,&item_tmp,1))) {
+ if((flag = pc_additem(sd,&item_tmp,1,LOG_TYPE_COMMAND))) {
clif_additem(sd,0,0,flag);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
@@ -8747,11 +8731,7 @@ ACMD_FUNC(delitem)
{// delete pet
intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2]));
}
-
- //Logs (A)dmins items [Lupus]
- log_pick_pc(sd, LOG_TYPE_COMMAND, nameid, -delamount, &sd->status.inventory[idx]);
-
- pc_delitem(sd, idx, delamount, 0, 0);
+ pc_delitem(sd, idx, delamount, 0, 0, LOG_TYPE_COMMAND);
amount-= delamount;
}