trying another method from mod-aoe-loot
This commit is contained in:
parent
ff4d63ef39
commit
d86112823b
@ -131,26 +131,34 @@ namespace
|
||||
{
|
||||
Loot *loot = &lootGo->loot;
|
||||
|
||||
// 1) Normal items
|
||||
for (uint32 slot = 0; slot < loot->items.size(); ++slot)
|
||||
for (uint8 slot = 0; slot < loot->items.size(); ++slot)
|
||||
{
|
||||
LootItem &li = loot->items[slot];
|
||||
if (li.is_looted)
|
||||
continue;
|
||||
|
||||
InventoryResult msg = EQUIP_ERR_OK;
|
||||
plr->StoreLootItem(uint8(slot), loot, msg);
|
||||
plr->StoreLootItem(slot, loot, msg);
|
||||
}
|
||||
|
||||
if (!loot->quest_items.empty())
|
||||
const QuestItemMap &questItems = loot->GetPlayerQuestItems();
|
||||
if (!questItems.empty())
|
||||
{
|
||||
uint32 baseSlot = loot->items.size();
|
||||
for (uint32 q = 0; q < loot->quest_items.size(); ++q)
|
||||
uint8 baseSlot = static_cast<uint8>(loot->items.size());
|
||||
for (uint8 i = 0; i < questItems.size(); ++i)
|
||||
{
|
||||
QuestItem &qi = loot->quest_items[q];
|
||||
if (qi.is_looted)
|
||||
continue;
|
||||
uint8 slot = baseSlot + i;
|
||||
InventoryResult msg = EQUIP_ERR_OK;
|
||||
plr->StoreLootItem(slot, loot, msg);
|
||||
}
|
||||
}
|
||||
|
||||
uint8 slot = uint8(baseSlot + q);
|
||||
const QuestItemMap &ffaItems = loot->GetPlayerFFAItems();
|
||||
if (!ffaItems.empty())
|
||||
{
|
||||
for (uint8 i = 0; i < ffaItems.size(); ++i)
|
||||
{
|
||||
uint8 slot = i;
|
||||
InventoryResult msg = EQUIP_ERR_OK;
|
||||
plr->StoreLootItem(slot, loot, msg);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user