mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-25 00:12:27 +00:00
[Bug Fix] NPC::CountItem and Corpse::CountItem 0 Charge Item Fix. (#1959)
- Fixes an issue where 0 charged or out of charge items do not count towards the return value.
This commit is contained in:
parent
5ce2889210
commit
0400504adc
@ -1570,7 +1570,7 @@ uint16 Corpse::CountItem(uint32 item_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (loot_item->item_id == item_id) {
|
if (loot_item->item_id == item_id) {
|
||||||
item_count += loot_item->charges;
|
item_count += loot_item->charges > 0 ? loot_item->charges : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return item_count;
|
return item_count;
|
||||||
|
|||||||
@ -758,7 +758,7 @@ uint16 NPC::CountItem(uint32 item_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (loot_item->item_id == item_id) {
|
if (loot_item->item_id == item_id) {
|
||||||
item_count += loot_item->charges;
|
item_count += loot_item->charges > 0 ? loot_item->charges : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return item_count;
|
return item_count;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user