mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-11-19 08:32:26 +00:00
updated more logs
This commit is contained in:
@@ -273,7 +273,7 @@ void ActivityComponent::Update(float deltaTime) {
|
||||
|
||||
// The timer has elapsed, start the instance
|
||||
if (lobby->timer <= 0.0f) {
|
||||
LOG("Setting up instance.");
|
||||
Log::Info("Setting up instance.");
|
||||
ActivityInstance* instance = NewInstance();
|
||||
LoadPlayersIntoInstance(instance, lobby->players);
|
||||
instance->StartZone();
|
||||
|
||||
@@ -540,7 +540,7 @@ bool BaseCombatAIComponent::IsEnemy(LWOOBJID target) const {
|
||||
auto* entity = Game::entityManager->GetEntity(target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Invalid entity for checking validity (%llu)!", target);
|
||||
Log::Warn("Invalid entity for checking validity ({})!", target);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -554,7 +554,7 @@ bool BaseCombatAIComponent::IsEnemy(LWOOBJID target) const {
|
||||
auto* referenceDestroyable = m_Parent->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (referenceDestroyable == nullptr) {
|
||||
LOG("Invalid reference destroyable component on (%llu)!", m_Parent->GetObjectID());
|
||||
Log::Warn("Invalid reference destroyable component on ({})!", m_Parent->GetObjectID());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -81,13 +81,13 @@ void BouncerComponent::LookupPetSwitch() {
|
||||
|
||||
Game::entityManager->SerializeEntity(m_Parent);
|
||||
|
||||
LOG("Loaded pet bouncer");
|
||||
Log::Info("Loaded pet bouncer");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_PetSwitchLoaded) {
|
||||
LOG("Failed to load pet bouncer");
|
||||
Log::Warn("Failed to load pet bouncer");
|
||||
|
||||
m_Parent->AddCallbackTimer(0.5f, [this]() {
|
||||
LookupPetSwitch();
|
||||
|
||||
@@ -24,7 +24,7 @@ void BuildBorderComponent::OnUse(Entity* originator) {
|
||||
if (!entities.empty()) {
|
||||
buildArea = entities[0]->GetObjectID();
|
||||
|
||||
LOG("Using PropertyPlaque");
|
||||
Log::Info("Using PropertyPlaque");
|
||||
}
|
||||
|
||||
auto* inventoryComponent = originator->GetComponent<InventoryComponent>();
|
||||
@@ -41,7 +41,7 @@ void BuildBorderComponent::OnUse(Entity* originator) {
|
||||
|
||||
inventoryComponent->PushEquippedItems();
|
||||
|
||||
LOG("Starting with %llu", buildArea);
|
||||
Log::Info("Starting with {}", buildArea);
|
||||
|
||||
if (PropertyManagementComponent::Instance() != nullptr) {
|
||||
GameMessages::SendStartArrangingWithItem(
|
||||
|
||||
@@ -50,7 +50,7 @@ ControllablePhysicsComponent::ControllablePhysicsComponent(Entity* entity) : Phy
|
||||
return;
|
||||
|
||||
if (entity->GetLOT() == 1) {
|
||||
LOG("Using patch to load minifig physics");
|
||||
Log::Info("Using patch to load minifig physics");
|
||||
|
||||
float radius = 1.5f;
|
||||
m_dpEntity = new dpEntity(m_Parent->GetObjectID(), radius, false);
|
||||
@@ -161,7 +161,7 @@ void ControllablePhysicsComponent::Serialize(RakNet::BitStream& outBitStream, bo
|
||||
void ControllablePhysicsComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
||||
tinyxml2::XMLElement* character = doc->FirstChildElement("obj")->FirstChildElement("char");
|
||||
if (!character) {
|
||||
LOG("Failed to find char tag!");
|
||||
Log::Warn("Failed to find char tag!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void ControllablePhysicsComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
||||
void ControllablePhysicsComponent::UpdateXml(tinyxml2::XMLDocument* doc) {
|
||||
tinyxml2::XMLElement* character = doc->FirstChildElement("obj")->FirstChildElement("char");
|
||||
if (!character) {
|
||||
LOG("Failed to find char tag while updating XML!");
|
||||
Log::Warn("Failed to find char tag while updating XML!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ void ControllablePhysicsComponent::RemoveSpeedboost(float value) {
|
||||
|
||||
void ControllablePhysicsComponent::ActivateBubbleBuff(eBubbleType bubbleType, bool specialAnims) {
|
||||
if (m_IsInBubble) {
|
||||
LOG("Already in bubble");
|
||||
Log::Warn("Already in bubble");
|
||||
return;
|
||||
}
|
||||
m_BubbleType = bubbleType;
|
||||
|
||||
@@ -188,7 +188,7 @@ void DestroyableComponent::Update(float deltaTime) {
|
||||
void DestroyableComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
||||
tinyxml2::XMLElement* dest = doc->FirstChildElement("obj")->FirstChildElement("dest");
|
||||
if (!dest) {
|
||||
LOG("Failed to find dest tag!");
|
||||
Log::Warn("Failed to find dest tag!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void DestroyableComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
||||
void DestroyableComponent::UpdateXml(tinyxml2::XMLDocument* doc) {
|
||||
tinyxml2::XMLElement* dest = doc->FirstChildElement("obj")->FirstChildElement("dest");
|
||||
if (!dest) {
|
||||
LOG("Failed to find dest tag!");
|
||||
Log::Warn("Failed to find dest tag!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,14 +175,14 @@ void InventoryComponent::AddItem(
|
||||
const bool bound,
|
||||
int32_t preferredSlot) {
|
||||
if (count == 0) {
|
||||
LOG("Attempted to add 0 of item (%i) to the inventory!", lot);
|
||||
Log::Warn("Attempted to add 0 of item ({}) to the inventory!", lot);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Inventory::IsValidItem(lot)) {
|
||||
if (lot > 0) {
|
||||
LOG("Attempted to add invalid item (%i) to the inventory!", lot);
|
||||
Log::Warn("Attempted to add invalid item ({} to the inventory!", lot);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -296,7 +296,7 @@ void InventoryComponent::AddItem(
|
||||
|
||||
bool InventoryComponent::RemoveItem(const LOT lot, const uint32_t count, eInventoryType inventoryType, const bool ignoreBound, const bool silent) {
|
||||
if (count == 0) {
|
||||
LOG("Attempted to remove 0 of item (%i) from the inventory!", lot);
|
||||
Log::Warn("Attempted to remove 0 of item ({}) from the inventory!", lot);
|
||||
return false;
|
||||
}
|
||||
if (inventoryType == INVALID) inventoryType = Inventory::FindInventoryTypeForLot(lot);
|
||||
@@ -478,7 +478,7 @@ void InventoryComponent::LoadXml(tinyxml2::XMLDocument* document) {
|
||||
auto* inventoryElement = document->FirstChildElement("obj")->FirstChildElement("inv");
|
||||
|
||||
if (inventoryElement == nullptr) {
|
||||
LOG("Failed to find 'inv' xml element!");
|
||||
Log::Warn("Failed to find 'inv' xml element!");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -486,7 +486,7 @@ void InventoryComponent::LoadXml(tinyxml2::XMLDocument* document) {
|
||||
auto* bags = inventoryElement->FirstChildElement("bag");
|
||||
|
||||
if (bags == nullptr) {
|
||||
LOG("Failed to find 'bags' xml element!");
|
||||
Log::Warn("Failed to find 'bags' xml element!");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ void InventoryComponent::LoadXml(tinyxml2::XMLDocument* document) {
|
||||
auto* items = inventoryElement->FirstChildElement("items");
|
||||
|
||||
if (items == nullptr) {
|
||||
LOG("Failed to find 'items' xml element!");
|
||||
Log::Warn("Failed to find 'items' xml element!");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -527,7 +527,7 @@ void InventoryComponent::LoadXml(tinyxml2::XMLDocument* document) {
|
||||
auto* inventory = GetInventory(static_cast<eInventoryType>(type));
|
||||
|
||||
if (inventory == nullptr) {
|
||||
LOG("Failed to find inventory (%i)!", type);
|
||||
Log::Warn("Failed to find inventory ({})!", type);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -600,7 +600,7 @@ void InventoryComponent::UpdateXml(tinyxml2::XMLDocument* document) {
|
||||
auto* inventoryElement = document->FirstChildElement("obj")->FirstChildElement("inv");
|
||||
|
||||
if (inventoryElement == nullptr) {
|
||||
LOG("Failed to find 'inv' xml element!");
|
||||
Log::Warn("Failed to find 'inv' xml element!");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -623,7 +623,7 @@ void InventoryComponent::UpdateXml(tinyxml2::XMLDocument* document) {
|
||||
auto* bags = inventoryElement->FirstChildElement("bag");
|
||||
|
||||
if (bags == nullptr) {
|
||||
LOG("Failed to find 'bags' xml element!");
|
||||
Log::Warn("Failed to find 'bags' xml element!");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -642,7 +642,7 @@ void InventoryComponent::UpdateXml(tinyxml2::XMLDocument* document) {
|
||||
auto* items = inventoryElement->FirstChildElement("items");
|
||||
|
||||
if (items == nullptr) {
|
||||
LOG("Failed to find 'items' xml element!");
|
||||
Log::Warn("Failed to find 'items' xml element!");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -917,7 +917,7 @@ void InventoryComponent::EquipScripts(Item* equippedItem) {
|
||||
CDScriptComponent scriptCompData = scriptCompTable->GetByID(scriptComponentID);
|
||||
auto* itemScript = CppScripts::GetScript(m_Parent, scriptCompData.script_name);
|
||||
if (!itemScript) {
|
||||
LOG("null script?");
|
||||
Log::Warn("null script?");
|
||||
}
|
||||
itemScript->OnFactionTriggerItemEquipped(m_Parent, equippedItem->GetId());
|
||||
}
|
||||
@@ -932,7 +932,7 @@ void InventoryComponent::UnequipScripts(Item* unequippedItem) {
|
||||
CDScriptComponent scriptCompData = scriptCompTable->GetByID(scriptComponentID);
|
||||
auto* itemScript = CppScripts::GetScript(m_Parent, scriptCompData.script_name);
|
||||
if (!itemScript) {
|
||||
LOG("null script?");
|
||||
Log::Warn("null script?");
|
||||
}
|
||||
itemScript->OnFactionTriggerItemUnequipped(m_Parent, unequippedItem->GetId());
|
||||
}
|
||||
@@ -1312,7 +1312,7 @@ std::vector<uint32_t> InventoryComponent::FindBuffs(Item* item, bool castOnEquip
|
||||
const auto entry = behaviors->GetSkillByID(result.skillID);
|
||||
|
||||
if (entry.skillID == 0) {
|
||||
LOG("Failed to find buff behavior for skill (%i)!", result.skillID);
|
||||
Log::Warn("Failed to find buff behavior for skill ({})!", result.skillID);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ LevelProgressionComponent::LevelProgressionComponent(Entity* parent) : Component
|
||||
void LevelProgressionComponent::UpdateXml(tinyxml2::XMLDocument* doc) {
|
||||
tinyxml2::XMLElement* level = doc->FirstChildElement("obj")->FirstChildElement("lvl");
|
||||
if (!level) {
|
||||
LOG("Failed to find lvl tag while updating XML!");
|
||||
Log::Warn("Failed to find lvl tag while updating XML!");
|
||||
return;
|
||||
}
|
||||
level->SetAttribute("l", m_Level);
|
||||
@@ -27,7 +27,7 @@ void LevelProgressionComponent::UpdateXml(tinyxml2::XMLDocument* doc) {
|
||||
void LevelProgressionComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
||||
tinyxml2::XMLElement* level = doc->FirstChildElement("obj")->FirstChildElement("lvl");
|
||||
if (!level) {
|
||||
LOG("Failed to find lvl tag while loading XML!");
|
||||
Log::Warn("Failed to find lvl tag while loading XML!");
|
||||
return;
|
||||
}
|
||||
level->QueryAttribute("l", &m_Level);
|
||||
|
||||
@@ -69,7 +69,7 @@ void MissionOfferComponent::OfferMissions(Entity* entity, const uint32_t specifi
|
||||
auto* missionComponent = entity->GetComponent<MissionComponent>();
|
||||
|
||||
if (!missionComponent) {
|
||||
LOG("Unable to get mission component for Entity %llu", entity->GetObjectID());
|
||||
Log::Warn("Unable to get mission component for Entity {}", entity->GetObjectID());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -908,7 +908,7 @@ void PetComponent::AddDrainImaginationTimer(Item* item, bool fromTaming) {
|
||||
// Set this to a variable so when this is called back from the player the timer doesn't fire off.
|
||||
m_Parent->AddCallbackTimer(m_PetInfo.imaginationDrainRate, [playerDestroyableComponent, this, item]() {
|
||||
if (!playerDestroyableComponent) {
|
||||
LOG("No petComponent and/or no playerDestroyableComponent");
|
||||
Log::Warn("No petComponent and/or no playerDestroyableComponent");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -361,10 +361,10 @@ void PhantomPhysicsComponent::SetDirection(const NiPoint3& pos) {
|
||||
void PhantomPhysicsComponent::SpawnVertices() {
|
||||
if (!m_dpEntity) return;
|
||||
|
||||
LOG("%llu", m_Parent->GetObjectID());
|
||||
Log::Info("{}", m_Parent->GetObjectID());
|
||||
auto box = static_cast<dpShapeBox*>(m_dpEntity->GetShape());
|
||||
for (auto vert : box->GetVertices()) {
|
||||
LOG("%f, %f, %f", vert.x, vert.y, vert.z);
|
||||
Log::Info("{}, {}, {}", vert.x, vert.y, vert.z);
|
||||
|
||||
EntityInfo info;
|
||||
info.lot = 33;
|
||||
|
||||
@@ -219,7 +219,7 @@ void PropertyEntranceComponent::OnPropertyEntranceSync(Entity* entity, bool incl
|
||||
delete nameLookup;
|
||||
nameLookup = nullptr;
|
||||
|
||||
LOG("Failed to find property owner name for %llu!", cloneId);
|
||||
Log::Warn("Failed to find property owner name for {}!", cloneId);
|
||||
|
||||
continue;
|
||||
} else {
|
||||
|
||||
@@ -266,7 +266,7 @@ void PropertyManagementComponent::OnFinishBuilding() {
|
||||
}
|
||||
|
||||
void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const NiPoint3 position, NiQuaternion rotation) {
|
||||
LOG("Placing model <%f, %f, %f>", position.x, position.y, position.z);
|
||||
Log::Info("Placing model <{}, {}, {}>", position.x, position.y, position.z);
|
||||
|
||||
auto* entity = GetOwner();
|
||||
|
||||
@@ -283,7 +283,7 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N
|
||||
auto* item = inventoryComponent->FindItemById(id);
|
||||
|
||||
if (item == nullptr) {
|
||||
LOG("Failed to find item with id %d", id);
|
||||
Log::Warn("Failed to find item with id {}", id);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -381,7 +381,7 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N
|
||||
}
|
||||
|
||||
void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int deleteReason) {
|
||||
LOG("Delete model: (%llu) (%i)", id, deleteReason);
|
||||
Log::Info("Delete model: ({}) ({})", id, deleteReason);
|
||||
|
||||
auto* entity = GetOwner();
|
||||
|
||||
@@ -398,13 +398,13 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet
|
||||
auto* model = Game::entityManager->GetEntity(id);
|
||||
|
||||
if (model == nullptr) {
|
||||
LOG("Failed to find model entity");
|
||||
Log::Warn("Failed to find model entity");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (model->GetLOT() == 14 && deleteReason == 0) {
|
||||
LOG("User is trying to pick up a BBB model, but this is not implemented, so we return to prevent the user from losing the model");
|
||||
Log::Info("User is trying to pick up a BBB model, but this is not implemented, so we return to prevent the user from losing the model");
|
||||
|
||||
GameMessages::SendUGCEquipPostDeleteBasedOnEditMode(entity->GetObjectID(), entity->GetSystemAddress(), LWOOBJID_EMPTY, 0);
|
||||
|
||||
@@ -417,7 +417,7 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet
|
||||
const auto index = models.find(id);
|
||||
|
||||
if (index == models.end()) {
|
||||
LOG("Failed to find model");
|
||||
Log::Warn("Failed to find model");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -429,12 +429,12 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet
|
||||
models.erase(id);
|
||||
|
||||
if (spawner == nullptr) {
|
||||
LOG("Failed to find spawner");
|
||||
Log::Warn("Failed to find spawner");
|
||||
}
|
||||
|
||||
Game::entityManager->DestructEntity(model);
|
||||
|
||||
LOG("Deleting model LOT %i", model->GetLOT());
|
||||
Log::Info("Deleting model LOT {}", model->GetLOT());
|
||||
|
||||
if (model->GetLOT() == 14) {
|
||||
//add it to the inv
|
||||
@@ -517,13 +517,13 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet
|
||||
{
|
||||
item->SetCount(item->GetCount() - 1);
|
||||
|
||||
LOG("DLU currently does not support breaking apart brick by brick models.");
|
||||
Log::Info("DLU currently does not support breaking apart brick by brick models.");
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
LOG("Invalid delete reason");
|
||||
Log::Warn("Invalid delete reason");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,7 +685,7 @@ void PropertyManagementComponent::OnQueryPropertyData(Entity* originator, const
|
||||
const auto zoneId = worldId.GetMapID();
|
||||
const auto cloneId = worldId.GetCloneID();
|
||||
|
||||
LOG("Getting property info for %d", zoneId);
|
||||
Log::Info("Getting property info for {}", zoneId);
|
||||
GameMessages::PropertyDataMessage message = GameMessages::PropertyDataMessage(zoneId);
|
||||
|
||||
const auto isClaimed = GetOwnerId() != LWOOBJID_EMPTY;
|
||||
|
||||
Reference in New Issue
Block a user