feat: add messaging system for manager and add example usage to Loot

tested that loot still drops at the entities position
This commit is contained in:
David Markowitz
2025-06-29 00:09:40 -07:00
parent 55d181ea4b
commit 5c296b8ef0
22 changed files with 62 additions and 32 deletions

View File

@@ -11,7 +11,7 @@ void AgPicnicBlanket::OnUse(Entity* self, Entity* user) {
self->SetVar<bool>(u"active", true);
auto lootTable = std::unordered_map<LOT, int32_t>{ {935, 3} };
Loot::DropLoot(user, self, lootTable, 0, 0);
Loot::DropLoot(user, self->GetObjectID(), lootTable, 0, 0);
self->AddCallbackTimer(5.0f, [self]() {
self->SetVar<bool>(u"active", false);

View File

@@ -572,7 +572,7 @@ void SGCannon::StopGame(Entity* self, bool cancel) {
missionComponent->Progress(eMissionTaskType::ACTIVITY, m_CannonLot, 0, "", self->GetVar<int32_t>(TotalScoreVariable));
}
Loot::GiveActivityLoot(player, self, GetGameID(self), self->GetVar<int32_t>(TotalScoreVariable));
Loot::GiveActivityLoot(player, self->GetObjectID(), GetGameID(self), self->GetVar<int32_t>(TotalScoreVariable));
SaveScore(self, player->GetObjectID(),
static_cast<float>(self->GetVar<int32_t>(TotalScoreVariable)), static_cast<float>(self->GetVar<uint32_t>(MaxStreakVariable)), percentage);