summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-23 17:54:04 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-23 17:55:13 +0300
commit6612f0bb52d11c2a097f80174cbbb2e98e2ff4aa (patch)
tree4c102c1f6bf2fb663cf4dec21aa1bace12ce9aec
parenteb684950f70502f070811465b2d0488484611b3b (diff)
downloadhercules-6612f0bb52d11c2a097f80174cbbb2e98e2ff4aa.tar.gz
hercules-6612f0bb52d11c2a097f80174cbbb2e98e2ff4aa.tar.bz2
hercules-6612f0bb52d11c2a097f80174cbbb2e98e2ff4aa.tar.xz
hercules-6612f0bb52d11c2a097f80174cbbb2e98e2ff4aa.zip
Show item drop effects only if monster dropping non looted items.
-rw-r--r--src/map/mob.c13
-rw-r--r--src/map/mob.h1
2 files changed, 10 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index e1c145d43..e93c9009d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1838,11 +1838,13 @@ int mob_ai_hard(int tid, int64 tick, int id, intptr_t data) {
/*==========================================
* Initializes the delay drop structure for mob-dropped items.
*------------------------------------------*/
-struct item_drop* mob_setdropitem(int nameid, int qty, struct item_data *data) {
+struct item_drop* mob_setdropitem(int nameid, int qty, struct item_data *data)
+{
struct item_drop *drop = ers_alloc(item_drop_ers, struct item_drop);
drop->item_data.nameid = nameid;
drop->item_data.amount = qty;
drop->item_data.identify = data ? itemdb->isidentified2(data) : itemdb->isidentified(nameid);
+ drop->showdropeffect = true;
drop->next = NULL;
return drop;
}
@@ -1857,6 +1859,7 @@ struct item_drop* mob_setlootitem(struct item* item)
nullpo_retr(NULL, item);
drop = ers_alloc(item_drop_ers, struct item_drop);
memcpy(&drop->item_data, item, sizeof(struct item));
+ drop->showdropeffect = false;
drop->next = NULL;
return drop;
}
@@ -1864,7 +1867,8 @@ struct item_drop* mob_setlootitem(struct item* item)
/*==========================================
* item drop with delay (timer function)
*------------------------------------------*/
-int mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
+int mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data)
+{
struct item_drop_list *list;
struct item_drop *ditem;
list=(struct item_drop_list *)data;
@@ -1872,8 +1876,9 @@ int mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) {
while (ditem) {
struct item_drop *ditem_prev;
map->addflooritem(NULL, &ditem->item_data,ditem->item_data.amount,
- list->m,list->x,list->y,
- list->first_charid,list->second_charid,list->third_charid,0,true);
+ list->m,list->x,list->y,
+ list->first_charid,list->second_charid,list->third_charid,0,
+ ditem->showdropeffect);
ditem_prev = ditem;
ditem = ditem->next;
ers_free(item_drop_ers, ditem_prev);
diff --git a/src/map/mob.h b/src/map/mob.h
index 83e022899..98d64873b 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -406,6 +406,7 @@ enum mob_id {
// The data structures for storing delayed item drops
struct item_drop {
struct item item_data;
+ bool showdropeffect;
struct item_drop* next;
};
struct item_drop_list {