mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-24 00:08:07 +00:00
fix: powerup drops and hardcore loot drops (#1914)
tested the following are now functional ag buff station tiki torch ve rocket part boxes ns statue property behavior extra items from full inventory hardcore drops (items and coins)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "dChatFilter.h"
|
||||
|
||||
#include "DluAssert.h"
|
||||
#include "Loot.h"
|
||||
|
||||
template <>
|
||||
void Strip::HandleMsg(AddStripMessage& msg) {
|
||||
@@ -148,7 +149,14 @@ void Strip::Spawn(LOT lot, Entity& entity) {
|
||||
// Spawns a specific drop for all
|
||||
void Strip::SpawnDrop(LOT dropLOT, Entity& entity) {
|
||||
for (auto* const player : PlayerManager::GetAllPlayers()) {
|
||||
GameMessages::SendDropClientLoot(player, entity.GetObjectID(), dropLOT, 0, entity.GetPosition());
|
||||
GameMessages::DropClientLoot lootMsg{};
|
||||
lootMsg.target = player->GetObjectID();
|
||||
lootMsg.ownerID = player->GetObjectID();
|
||||
lootMsg.sourceID = entity.GetObjectID();
|
||||
lootMsg.item = dropLOT;
|
||||
lootMsg.count = 1;
|
||||
lootMsg.spawnPos = entity.GetPosition();
|
||||
Loot::DropItem(*player, lootMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user