mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-09 17:08:06 +00:00
chore: cleanup objectIdManager overloading and classes (#1391)
* objectIdManager fixes * Remove debug log
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "Game.h"
|
||||
#include "Logger.h"
|
||||
#include "CDClientManager.h"
|
||||
#include "../dWorldServer/ObjectIDManager.h"
|
||||
#include "ObjectIDManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "GameMessages.h"
|
||||
#include "SkillComponent.h"
|
||||
@@ -68,7 +68,7 @@ InventoryComponent::InventoryComponent(Entity* parent, tinyxml2::XMLDocument* do
|
||||
continue;
|
||||
}
|
||||
|
||||
const LWOOBJID id = ObjectIDManager::Instance()->GenerateObjectID();
|
||||
const LWOOBJID id = ObjectIDManager::GenerateObjectID();
|
||||
|
||||
const auto& info = Inventory::FindItemComponent(item.itemid);
|
||||
|
||||
@@ -86,7 +86,7 @@ InventoryComponent::InventoryComponent(Entity* parent, tinyxml2::XMLDocument* do
|
||||
const auto proxyLOT = static_cast<LOT>(std::stoi(proxyLotAsString));
|
||||
|
||||
const auto& proxyInfo = Inventory::FindItemComponent(proxyLOT);
|
||||
const LWOOBJID proxyId = ObjectIDManager::Instance()->GenerateObjectID();
|
||||
const LWOOBJID proxyId = ObjectIDManager::GenerateObjectID();
|
||||
|
||||
// Use item.count since we equip item.count number of the item this is a requested proxy of
|
||||
UpdateSlot(proxyInfo.equipLocation, { proxyId, proxyLOT, item.count, slot++ });
|
||||
@@ -1341,7 +1341,7 @@ void InventoryComponent::SetNPCItems(const std::vector<LOT>& items) {
|
||||
auto slot = 0u;
|
||||
|
||||
for (const auto& item : items) {
|
||||
const LWOOBJID id = ObjectIDManager::Instance()->GenerateObjectID();
|
||||
const LWOOBJID id = ObjectIDManager::GenerateObjectID();
|
||||
|
||||
const auto& info = Inventory::FindItemComponent(item);
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include "DestroyableComponent.h"
|
||||
#include "dpWorld.h"
|
||||
#include "PetDigServer.h"
|
||||
#include "../dWorldServer/ObjectIDManager.h"
|
||||
#include "ObjectIDManager.h"
|
||||
#include "eUnequippableActiveType.h"
|
||||
#include "eTerminateType.h"
|
||||
#include "ePetTamingNotifyType.h"
|
||||
@@ -562,7 +562,7 @@ void PetComponent::NotifyTamingBuildSuccess(NiPoint3 position) {
|
||||
return;
|
||||
}
|
||||
|
||||
LWOOBJID petSubKey = ObjectIDManager::Instance()->GenerateRandomObjectID();
|
||||
LWOOBJID petSubKey = ObjectIDManager::GenerateRandomObjectID();
|
||||
|
||||
GeneralUtils::SetBit(petSubKey, eObjectBits::CHARACTER);
|
||||
GeneralUtils::SetBit(petSubKey, eObjectBits::PERSISTENT);
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include "Game.h"
|
||||
#include "Item.h"
|
||||
#include "Database.h"
|
||||
#include "../dWorldServer/ObjectIDManager.h"
|
||||
#include "ObjectIDManager.h"
|
||||
#include "Player.h"
|
||||
#include "RocketLaunchpadControlComponent.h"
|
||||
#include "PropertyEntranceComponent.h"
|
||||
@@ -334,7 +334,7 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N
|
||||
node->position = position;
|
||||
node->rotation = rotation;
|
||||
|
||||
ObjectIDManager::Instance()->RequestPersistentID([this, node, modelLOT, entity, position, rotation, originalRotation](uint32_t persistentId) {
|
||||
ObjectIDManager::RequestPersistentID([this, node, modelLOT, entity, position, rotation, originalRotation](uint32_t persistentId) {
|
||||
SpawnerInfo info{};
|
||||
|
||||
info.templateID = modelLOT;
|
||||
|
Reference in New Issue
Block a user