added lootsource send in GM

WIP commit
This commit is contained in:
EmosewaMC
2022-04-23 05:13:06 -07:00
parent 0eece14b68
commit a4d934913c
29 changed files with 71 additions and 62 deletions

View File

@@ -285,7 +285,7 @@ void LootGenerator::GiveLoot(Entity* player, std::unordered_map<LOT, int32_t>& r
return;
for (const auto& pair : result) {
inventoryComponent->AddItem(pair.first, pair.second);
inventoryComponent->AddItem(pair.first, pair.second, eInventoryType::INVALID, {}, 0LL, true, false, 0LL, eInventoryType::INVALID, 0, false, -1, eLootSourceType::LOOT_SOURCE_ACTIVITY);
}
}

View File

@@ -363,7 +363,7 @@ void Mail::HandleAttachmentCollect(RakNet::BitStream* packet, const SystemAddres
auto inv = static_cast<InventoryComponent*>(player->GetComponent(COMPONENT_TYPE_INVENTORY));
if (!inv) return;
inv->AddItem(attachmentLOT, attachmentCount);
inv->AddItem(attachmentLOT, attachmentCount, eInventoryType::INVALID, {}, 0LL, true, false, 0LL, eInventoryType::INVALID, 0, false, -1, eLootSourceType::LOOT_SOURCE_MAIL);
Mail::SendAttachmentRemoveConfirm(sysAddr, mailID);

View File

@@ -794,7 +794,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
InventoryComponent * inventory = static_cast<InventoryComponent*>(entity->GetComponent(COMPONENT_TYPE_INVENTORY));
inventory->AddItem(itemLOT, 1);
inventory->AddItem(itemLOT, 1, eInventoryType::INVALID, {}, 0LL, true, false, 0LL, eInventoryType::INVALID, 0, false, -1, eLootSourceType::LOOT_SOURCE_MODERATION);
} else if(args.size() == 2) {
uint32_t itemLOT;
@@ -814,7 +814,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
InventoryComponent* inventory = static_cast<InventoryComponent*>(entity->GetComponent(COMPONENT_TYPE_INVENTORY));
inventory->AddItem(itemLOT, count);
inventory->AddItem(itemLOT, count, eInventoryType::INVALID, {}, 0LL, true, false, 0LL, eInventoryType::INVALID, 0, false, -1, eLootSourceType::LOOT_SOURCE_MODERATION);
}
else {
ChatPackets::SendSystemMessage(sysAddr, u"Correct usage: /gmadditem <lot>");
@@ -1626,7 +1626,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
std::vector<LDFBaseData*> data {};
data.push_back(new LDFData<int32_t>(u"reforgedLOT", reforgedItem));
inventoryComponent->AddItem(baseItem, 1, INVALID, data);
inventoryComponent->AddItem(baseItem, 1, eInventoryType::INVALID, data, 0LL, true, false, 0LL, eInventoryType::INVALID, 0, false, -1, eLootSourceType::LOOT_SOURCE_MODERATION);
}
if (chatCommand == "crash" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_OPERATOR)