mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-25 23:13:35 +00:00
fc75d6048f
* moving branch * Add deleteinven slash command * Change name of BRICKS_IN_BBB * Use string_view instead of strcmp * Clean up include tree * Remove unneeded headers from PCH files Removes unneeded headers from pre-compiled headers. This increases compile time, however reduces development time for most files. * Update Entity.h * Update EntityManager.h * Update GameMessages.cpp * There it compiles now Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
19 lines
558 B
C++
19 lines
558 B
C++
#include "AgPicnicBlanket.h"
|
|
#include "Loot.h"
|
|
#include "GameMessages.h"
|
|
#include "Entity.h"
|
|
|
|
void AgPicnicBlanket::OnUse(Entity* self, Entity* user) {
|
|
GameMessages::SendTerminateInteraction(user->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
|
|
if (self->GetVar<bool>(u"active"))
|
|
return;
|
|
self->SetVar<bool>(u"active", true);
|
|
|
|
auto lootTable = std::unordered_map<LOT, int32_t>{ {935, 3} };
|
|
LootGenerator::Instance().DropLoot(user, self, lootTable, 0, 0);
|
|
|
|
self->AddCallbackTimer(5.0f, [self]() {
|
|
self->SetVar<bool>(u"active", false);
|
|
});
|
|
}
|