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

@@ -21,15 +21,17 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) {
//figure out which faction the player belongs to:
auto character = user->GetCharacter();
if (!character) return;
// At this point the player has to be in a faction.
LOT tokenLOT = 0;
if (character->GetPlayerFlag(ePlayerFlags::VENTURE_FACTION)) //venture
inv->AddItem(8321, tokensToGive);
tokenLOT = 8321;
else if (character->GetPlayerFlag(ePlayerFlags::ASSEMBLY_FACTION)) //assembly
inv->AddItem(8318, tokensToGive);
tokenLOT = 8318;
else if (character->GetPlayerFlag(ePlayerFlags::PARADOX_FACTION)) //paradox
inv->AddItem(8320, tokensToGive);
tokenLOT = 8320;
else if (character->GetPlayerFlag(ePlayerFlags::SENTINEL_FACTION)) //sentinel
inv->AddItem(8319, tokensToGive);
tokenLOT = 8319;
inv->AddItem(tokenLOT, tokensToGive, eInventoryType::INVALID, {}, 0LL, true, false, 0LL, eInventoryType::INVALID, 0, false, -1, eLootSourceType::LOOT_SOURCE_NONE);
}
GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID());