mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
updated more logs
This commit is contained in:
parent
3164bad9af
commit
cfb0826d22
@ -54,7 +54,7 @@ uint32_t BrickByBrickFix::TruncateBrokenBrickByBrickXml() {
|
||||
completeUncompressedModel.append(reinterpret_cast<char*>(uncompressedChunk.get()));
|
||||
completeUncompressedModel.resize(previousSize + actualUncompressedSize);
|
||||
} else {
|
||||
Log::Warn("Failed to inflate chunk {:d} for model %llu. Error: {:d}", chunkCount, model.id, err);
|
||||
Log::Warn("Failed to inflate chunk {} for model %llu. Error: {}", chunkCount, model.id, err);
|
||||
break;
|
||||
}
|
||||
chunkCount++;
|
||||
@ -70,13 +70,13 @@ uint32_t BrickByBrickFix::TruncateBrokenBrickByBrickXml() {
|
||||
"</LXFML>",
|
||||
completeUncompressedModel.length() >= 15 ? completeUncompressedModel.length() - 15 : 0) == std::string::npos
|
||||
) {
|
||||
LOG("Brick-by-brick model %llu will be deleted!", model.id);
|
||||
Log::Info("Brick-by-brick model {} will be deleted!", model.id);
|
||||
Database::Get()->DeleteUgcModelData(model.id);
|
||||
modelsTruncated++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG("Brick-by-brick model %llu will be deleted!", model.id);
|
||||
Log::Info("Brick-by-brick model {} will be deleted!", model.id);
|
||||
Database::Get()->DeleteUgcModelData(model.id);
|
||||
modelsTruncated++;
|
||||
}
|
||||
@ -121,11 +121,11 @@ uint32_t BrickByBrickFix::UpdateBrickByBrickModelsToSd0() {
|
||||
|
||||
try {
|
||||
Database::Get()->UpdateUgcModelData(model.id, outputStringStream);
|
||||
Log::Info("Updated model {:d} to sd0", model.id);
|
||||
Log::Info("Updated model {} to sd0", model.id);
|
||||
updatedModels++;
|
||||
} catch (sql::SQLException exception) {
|
||||
Log::Warn("Failed to update model {:d}. This model should be inspected manually to see why."
|
||||
"The database error is {:s}", model.id, exception.what());
|
||||
Log::Warn("Failed to update model {}. This model should be inspected manually to see why."
|
||||
"The database error is {}", model.id, exception.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace {
|
||||
|
||||
void Database::Connect() {
|
||||
if (database) {
|
||||
LOG("Tried to connect to database when it's already connected!");
|
||||
Log::Warn("Tried to connect to database when it's already connected!");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ void Database::Connect() {
|
||||
|
||||
GameDatabase* Database::Get() {
|
||||
if (!database) {
|
||||
LOG("Tried to get database when it's not connected!");
|
||||
Log::Warn("Tried to get database when it's not connected!");
|
||||
Connect();
|
||||
}
|
||||
return database;
|
||||
@ -35,6 +35,6 @@ void Database::Destroy(std::string source) {
|
||||
delete database;
|
||||
database = nullptr;
|
||||
} else {
|
||||
LOG("Trying to destroy database when it's not connected!");
|
||||
Log::Warn("Trying to destroy database when it's not connected!");
|
||||
}
|
||||
}
|
||||
|
@ -147,91 +147,91 @@ private:
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const std::string_view param) {
|
||||
// Log::Info("{:s}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setString(index, param.data());
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const char* param) {
|
||||
// Log::Info("{:s}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setString(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const std::string param) {
|
||||
// Log::Info("{:s}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setString(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const int8_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setByte(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const uint8_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setByte(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const int16_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setShort(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const uint16_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setShort(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const uint32_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setUInt(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const int32_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setInt(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const int64_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setInt64(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const uint64_t param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setUInt64(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const float param) {
|
||||
// Log::Info({:f}", param);
|
||||
// Log::Info({}", param);
|
||||
stmt->setFloat(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const double param) {
|
||||
// Log::Info("{:f}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setDouble(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const bool param) {
|
||||
// Log::Info("{:d}", param);
|
||||
// Log::Info("{}", param);
|
||||
stmt->setBoolean(index, param);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const std::istream* param) {
|
||||
// LOG("Blob");
|
||||
// Log::Info("Blob");
|
||||
// This is the one time you will ever see me use const_cast.
|
||||
stmt->setBlob(index, const_cast<std::istream*>(param));
|
||||
}
|
||||
@ -239,7 +239,7 @@ inline void SetParam(UniquePreppedStmtRef stmt, const int index, const std::istr
|
||||
template<>
|
||||
inline void SetParam(UniquePreppedStmtRef stmt, const int index, const std::optional<uint32_t> param) {
|
||||
if (param) {
|
||||
// Log::Info("{:f}", param.value());
|
||||
// Log::Info("{}", param.value());
|
||||
stmt->setInt(index, param.value());
|
||||
} else {
|
||||
// Log::Info("Null");
|
||||
|
@ -138,11 +138,11 @@ Entity::Entity(const LWOOBJID& objectID, EntityInfo info, User* parentUser, Enti
|
||||
|
||||
Entity::~Entity() {
|
||||
if (IsPlayer()) {
|
||||
LOG("Deleted player");
|
||||
Log::Info("Deleted player");
|
||||
|
||||
// Make sure the player exists first. Remove afterwards to prevent the OnPlayerExist functions from not being able to find the player.
|
||||
if (!PlayerManager::RemovePlayer(this)) {
|
||||
LOG("Unable to find player to remove from manager.");
|
||||
Log::Warn("Unable to find player to remove from manager.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ void EntityManager::KillEntities() {
|
||||
auto* entity = GetEntity(toKill);
|
||||
|
||||
if (!entity) {
|
||||
LOG("Attempting to kill null entity %llu", toKill);
|
||||
Log::Warn("Attempting to kill null entity {}", toKill);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ void EntityManager::DeleteEntities() {
|
||||
|
||||
if (ghostingToDelete != m_EntitiesToGhost.end()) m_EntitiesToGhost.erase(ghostingToDelete);
|
||||
} else {
|
||||
LOG("Attempted to delete non-existent entity %llu", toDelete);
|
||||
Log::Warn("Attempted to delete non-existent entity {}", toDelete);
|
||||
}
|
||||
m_Entities.erase(toDelete);
|
||||
}
|
||||
@ -322,7 +322,7 @@ const std::unordered_map<std::string, LWOOBJID>& EntityManager::GetSpawnPointEnt
|
||||
|
||||
void EntityManager::ConstructEntity(Entity* entity, const SystemAddress& sysAddr, const bool skipChecks) {
|
||||
if (!entity) {
|
||||
LOG("Attempted to construct null entity");
|
||||
Log::Warn("Attempted to construct null entity");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ void Trade::SetAccepted(LWOOBJID participant, bool value) {
|
||||
if (participant == m_ParticipantA) {
|
||||
m_AcceptedA = !value;
|
||||
|
||||
LOG("Accepted from A (%d), B: (%d)", value, m_AcceptedB);
|
||||
Log::Info("Accepted from A ({}), B: ({})", value, m_AcceptedB);
|
||||
|
||||
auto* entityB = GetParticipantBEntity();
|
||||
|
||||
@ -77,7 +77,7 @@ void Trade::SetAccepted(LWOOBJID participant, bool value) {
|
||||
} else if (participant == m_ParticipantB) {
|
||||
m_AcceptedB = !value;
|
||||
|
||||
LOG("Accepted from B (%d), A: (%d)", value, m_AcceptedA);
|
||||
Log::Info("Accepted from B ({}), A: ({})", value, m_AcceptedA);
|
||||
|
||||
auto* entityA = GetParticipantAEntity();
|
||||
|
||||
@ -194,7 +194,7 @@ void Trade::SendUpdateToOther(LWOOBJID participant) {
|
||||
uint64_t coins;
|
||||
std::vector<TradeItem> itemIds;
|
||||
|
||||
LOG("Attempting to send trade update");
|
||||
Log::Info("Attempting to send trade update");
|
||||
|
||||
if (participant == m_ParticipantA) {
|
||||
other = GetParticipantBEntity();
|
||||
@ -228,7 +228,7 @@ void Trade::SendUpdateToOther(LWOOBJID participant) {
|
||||
items.push_back(tradeItem);
|
||||
}
|
||||
|
||||
LOG("Sending trade update");
|
||||
Log::Info("Sending trade update");
|
||||
|
||||
GameMessages::SendServerTradeUpdate(other->GetObjectID(), coins, items, other->GetSystemAddress());
|
||||
}
|
||||
@ -281,7 +281,7 @@ Trade* TradingManager::NewTrade(LWOOBJID participantA, LWOOBJID participantB) {
|
||||
|
||||
trades[tradeId] = trade;
|
||||
|
||||
LOG("Created new trade between (%llu) <-> (%llu)", participantA, participantB);
|
||||
Log::Info("Created new trade between ({}) <-> ({})", participantA, participantB);
|
||||
|
||||
return trade;
|
||||
}
|
||||
|
@ -75,31 +75,31 @@ void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::Bit
|
||||
}
|
||||
|
||||
if (!bitStream.Read(isImmune)) {
|
||||
LOG("Unable to read isImmune");
|
||||
Log::Warn("Unable to read isImmune");
|
||||
return;
|
||||
}
|
||||
|
||||
if (isImmune) {
|
||||
LOG_DEBUG("Target targetEntity %llu is immune!", branch.target);
|
||||
Log::Debug("Target targetEntity {} is immune!", branch.target);
|
||||
this->m_OnFailImmune->Handle(context, bitStream, branch);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bitStream.Read(isSuccess)) {
|
||||
LOG("failed to read success from bitstream");
|
||||
Log::Warn("failed to read success from bitstream");
|
||||
return;
|
||||
}
|
||||
|
||||
if (isSuccess) {
|
||||
uint32_t armorDamageDealt{};
|
||||
if (!bitStream.Read(armorDamageDealt)) {
|
||||
LOG("Unable to read armorDamageDealt");
|
||||
Log::Warn("Unable to read armorDamageDealt");
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t healthDamageDealt{};
|
||||
if (!bitStream.Read(healthDamageDealt)) {
|
||||
LOG("Unable to read healthDamageDealt");
|
||||
Log::Warn("Unable to read healthDamageDealt");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::Bit
|
||||
|
||||
bool died{};
|
||||
if (!bitStream.Read(died)) {
|
||||
LOG("Unable to read died");
|
||||
Log::Warn("Unable to read died");
|
||||
return;
|
||||
}
|
||||
auto previousArmor = destroyableComponent->GetArmor();
|
||||
@ -123,7 +123,7 @@ void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::Bit
|
||||
|
||||
uint8_t successState{};
|
||||
if (!bitStream.Read(successState)) {
|
||||
LOG("Unable to read success state");
|
||||
Log::Warn("Unable to read success state");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::Bit
|
||||
break;
|
||||
default:
|
||||
if (static_cast<eBasicAttackSuccessTypes>(successState) != eBasicAttackSuccessTypes::FAILIMMUNE) {
|
||||
Log::Warn("Unknown success state ({:d})!", successState);
|
||||
Log::Warn("Unknown success state ({})!", successState);
|
||||
return;
|
||||
}
|
||||
this->m_OnFailImmune->Handle(context, bitStream, branch);
|
||||
@ -166,13 +166,13 @@ void BasicAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitStream&
|
||||
void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
||||
auto* targetEntity = Game::entityManager->GetEntity(branch.target);
|
||||
if (!targetEntity) {
|
||||
LOG("Target entity %llu is null!", branch.target);
|
||||
Log::Warn("Target entity {} is null!", branch.target);
|
||||
return;
|
||||
}
|
||||
|
||||
auto* destroyableComponent = targetEntity->GetComponent<DestroyableComponent>();
|
||||
if (!destroyableComponent || !destroyableComponent->GetParent()) {
|
||||
LOG("No destroyable component on %llu", branch.target);
|
||||
Log::Warn("No destroyable component on {}", branch.target);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet
|
||||
bitStream.Write(isImmune);
|
||||
|
||||
if (isImmune) {
|
||||
LOG_DEBUG("Target targetEntity %llu is immune!", branch.target);
|
||||
Log::Debug("Target targetEntity {} is immune!", branch.target);
|
||||
this->m_OnFailImmune->Calculate(context, bitStream, branch);
|
||||
return;
|
||||
}
|
||||
@ -241,7 +241,7 @@ void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet
|
||||
break;
|
||||
default:
|
||||
if (static_cast<eBasicAttackSuccessTypes>(successState) != eBasicAttackSuccessTypes::FAILIMMUNE) {
|
||||
Log::Warn("Unknown success state ({:d})!", GeneralUtils::ToUnderlying(successState));
|
||||
Log::Warn("Unknown success state ({})!", GeneralUtils::ToUnderlying(successState));
|
||||
break;
|
||||
}
|
||||
this->m_OnFailImmune->Calculate(context, bitStream, branch);
|
||||
|
@ -31,7 +31,7 @@ uint32_t BehaviorContext::GetUniqueSkillId() const {
|
||||
auto* entity = Game::entityManager->GetEntity(this->originator);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Invalid entity for (%llu)!", this->originator);
|
||||
Log::Warn("Invalid entity for ({})!", this->originator);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -39,7 +39,7 @@ uint32_t BehaviorContext::GetUniqueSkillId() const {
|
||||
auto* component = entity->GetComponent<SkillComponent>();
|
||||
|
||||
if (component == nullptr) {
|
||||
LOG("No skill component attached to (%llu)!", this->originator);;
|
||||
Log::Warn("No skill component attached to ({})!", this->originator);;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -126,7 +126,7 @@ void BehaviorContext::SyncBehavior(const uint32_t syncId, RakNet::BitStream& bit
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
Log::Warn("Failed to find behavior sync entry with sync id ({:d})!", syncId);
|
||||
Log::Warn("Failed to find behavior sync entry with sync id ({})!", syncId);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -135,7 +135,7 @@ void BehaviorContext::SyncBehavior(const uint32_t syncId, RakNet::BitStream& bit
|
||||
const auto branch = entry.branchContext;
|
||||
|
||||
if (behavior == nullptr) {
|
||||
Log::Warn("Invalid behavior for sync id ({:d})!", syncId);
|
||||
Log::Warn("Invalid behavior for sync id ({})!", syncId);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -317,7 +317,7 @@ void BehaviorContext::FilterTargets(std::vector<Entity*>& targets, std::forward_
|
||||
// if the caster is not there, return empty targets list
|
||||
auto* caster = Game::entityManager->GetEntity(this->caster);
|
||||
if (!caster) {
|
||||
Log::Debug("Invalid caster for ({:d})!", this->originator);
|
||||
Log::Debug("Invalid caster for ({})!", this->originator);
|
||||
targets.clear();
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ void BlockBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStrea
|
||||
auto* entity = Game::entityManager->GetEntity(target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -43,7 +43,7 @@ void BlockBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext branc
|
||||
auto* entity = Game::entityManager->GetEntity(target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ void BuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStream
|
||||
auto* entity = Game::entityManager->GetEntity(target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Invalid target (%llu)!", target);
|
||||
Log::Warn("Invalid target ({})!", target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -21,7 +21,7 @@ void BuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStream
|
||||
auto* component = entity->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (component == nullptr) {
|
||||
LOG("Invalid target, no destroyable component (%llu)!", target);
|
||||
Log::Warn("Invalid target, no destroyable component ({})!", target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -47,7 +47,7 @@ void BuffBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext branch
|
||||
auto* entity = Game::entityManager->GetEntity(target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Invalid target (%llu)!", target);
|
||||
Log::Warn("Invalid target ({})!", target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -55,7 +55,7 @@ void BuffBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext branch
|
||||
auto* component = entity->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (component == nullptr) {
|
||||
LOG("Invalid target, no destroyable component (%llu)!", target);
|
||||
Log::Warn("Invalid target, no destroyable component ({})!", target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ void CarBoostBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitSt
|
||||
return;
|
||||
}
|
||||
|
||||
LOG("Activating car boost!");
|
||||
Log::Info("Activating car boost!");
|
||||
|
||||
auto* possessableComponent = entity->GetComponent<PossessableComponent>();
|
||||
if (possessableComponent != nullptr) {
|
||||
@ -27,7 +27,7 @@ void CarBoostBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitSt
|
||||
|
||||
auto* characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
if (characterComponent != nullptr) {
|
||||
LOG("Tracking car boost!");
|
||||
Log::Info("Tracking car boost!");
|
||||
characterComponent->UpdatePlayerStatistic(RacingCarBoostsActivated);
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ void ChargeUpBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitSt
|
||||
uint32_t handle{};
|
||||
|
||||
if (!bitStream.Read(handle)) {
|
||||
LOG("Unable to read handle from bitStream, aborting Handle! variable_type");
|
||||
Log::Warn("Unable to read handle from bitStream, aborting Handle! variable_type");
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -11,7 +11,7 @@ void DamageAbsorptionBehavior::Handle(BehaviorContext* context, RakNet::BitStrea
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -37,7 +37,7 @@ void DamageAbsorptionBehavior::Timer(BehaviorContext* context, BehaviorBranchCon
|
||||
auto* target = Game::entityManager->GetEntity(second);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", second);
|
||||
Log::Warn("Failed to find target ({})!", second);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ void DamageReductionBehavior::Handle(BehaviorContext* context, RakNet::BitStream
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -35,7 +35,7 @@ void DamageReductionBehavior::Timer(BehaviorContext* context, BehaviorBranchCont
|
||||
auto* target = Game::entityManager->GetEntity(second);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", second);
|
||||
Log::Warn("Failed to find target ({})!", second);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ void HealBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bit_strea
|
||||
auto* entity = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Failed to find entity for (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find entity for ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -19,7 +19,7 @@ void HealBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bit_strea
|
||||
auto* destroyable = static_cast<DestroyableComponent*>(entity->GetComponent(eReplicaComponentType::DESTROYABLE));
|
||||
|
||||
if (destroyable == nullptr) {
|
||||
LOG("Failed to find destroyable component for %(llu)!", branch.target);
|
||||
Log::Warn("Failed to find destroyable component for ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ void ImmunityBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitSt
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (!target) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ void ImmunityBehavior::Timer(BehaviorContext* context, BehaviorBranchContext bra
|
||||
auto* target = Game::entityManager->GetEntity(second);
|
||||
|
||||
if (!target) {
|
||||
LOG("Failed to find target (%llu)!", second);
|
||||
Log::Warn("Failed to find target ({})!", second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ void ProjectileAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitSt
|
||||
auto* entity = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Failed to find originator (%llu)!", context->originator);
|
||||
Log::Warn("Failed to find originator ({})!", context->originator);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -72,7 +72,7 @@ void ProjectileAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitSt
|
||||
auto* skillComponent = entity->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent == nullptr) {
|
||||
LOG("Failed to find skill component for (%llu)!", context->originator);
|
||||
Log::Warn("Failed to find skill component for ({})!", context->originator);
|
||||
|
||||
return;
|
||||
|
||||
@ -81,7 +81,7 @@ void ProjectileAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitSt
|
||||
auto* other = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (other == nullptr) {
|
||||
LOG("Invalid projectile target (%llu)!", branch.target);
|
||||
Log::Warn("Invalid projectile target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bit_str
|
||||
auto* entity = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Failed to find entity for (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find entity for ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -19,7 +19,7 @@ void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bit_str
|
||||
auto* destroyable = static_cast<DestroyableComponent*>(entity->GetComponent(eReplicaComponentType::DESTROYABLE));
|
||||
|
||||
if (destroyable == nullptr) {
|
||||
LOG("Failed to find destroyable component for %(llu)!", branch.target);
|
||||
Log::Warn("Failed to find destroyable component for ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ void SpawnBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStrea
|
||||
auto* origin = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
if (origin == nullptr) {
|
||||
LOG("Failed to find self entity (%llu)!", context->originator);
|
||||
Log::Warn("Failed to find self entity ({})!", context->originator);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -45,7 +45,7 @@ void SpawnBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStrea
|
||||
);
|
||||
|
||||
if (entity == nullptr) {
|
||||
Log::Warn("Failed to spawn entity ({:d})!", this->m_lot);
|
||||
Log::Warn("Failed to spawn entity ({})!", this->m_lot);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -82,7 +82,7 @@ void SpawnBehavior::Timer(BehaviorContext* context, const BehaviorBranchContext
|
||||
auto* entity = Game::entityManager->GetEntity(second);
|
||||
|
||||
if (entity == nullptr) {
|
||||
LOG("Failed to find spawned entity (%llu)!", second);
|
||||
Log::Warn("Failed to find spawned entity ({})!", second);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -17,14 +17,14 @@ void StunBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStream
|
||||
|
||||
bool blocked{};
|
||||
if (!bitStream.Read(blocked)) {
|
||||
LOG("Unable to read blocked from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read blocked from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -47,7 +47,7 @@ void StunBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStr
|
||||
auto* self = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
if (self == nullptr) {
|
||||
LOG("Invalid self entity (%llu)!", context->originator);
|
||||
Log::Warn("Invalid self entity ({})!", context->originator);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -82,7 +82,7 @@ void StunBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStr
|
||||
bitStream.Write(blocked);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ void SwitchBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
|
||||
if (this->m_imagination > 0 || !this->m_isEnemyFaction) {
|
||||
if (!bitStream.Read(state)) {
|
||||
LOG("Unable to read state from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read state from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
}
|
||||
@ -28,7 +28,7 @@ void SwitchBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_DEBUG("[%i] State: (%d), imagination: (%i) / (%f)", entity->GetLOT(), state, destroyableComponent->GetImagination(), destroyableComponent->GetMaxImagination());
|
||||
Log::Debug("[{}] State: ({}), imagination: ({}) / ({})", entity->GetLOT(), state, destroyableComponent->GetImagination(), destroyableComponent->GetMaxImagination());
|
||||
|
||||
if (state) {
|
||||
this->m_actionTrue->Handle(context, bitStream, branch);
|
||||
|
@ -13,7 +13,7 @@ void SwitchMultipleBehavior::Handle(BehaviorContext* context, RakNet::BitStream&
|
||||
float value{};
|
||||
|
||||
if (!bitStream.Read(value)) {
|
||||
LOG("Unable to read value from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read value from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -16,7 +16,7 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
|
||||
if (this->m_usePickedTarget && branch.target != LWOOBJID_EMPTY) {
|
||||
auto target = Game::entityManager->GetEntity(branch.target);
|
||||
if (!target) LOG("target %llu is null", branch.target);
|
||||
if (!target) Log::Warn("target {} is null", branch.target);
|
||||
else {
|
||||
targets.push_back(target);
|
||||
context->FilterTargets(targets, this->m_ignoreFactionList, this->m_includeFactionList, this->m_targetSelf, this->m_targetEnemy, this->m_targetFriend, this->m_targetTeam);
|
||||
@ -29,7 +29,7 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
|
||||
bool hasTargets = false;
|
||||
if (!bitStream.Read(hasTargets)) {
|
||||
LOG("Unable to read hasTargets from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read hasTargets from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
|
||||
@ -37,7 +37,7 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
bool blocked = false;
|
||||
|
||||
if (!bitStream.Read(blocked)) {
|
||||
LOG("Unable to read blocked from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read blocked from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
|
||||
@ -50,12 +50,12 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
if (hasTargets) {
|
||||
uint32_t count = 0;
|
||||
if (!bitStream.Read(count)) {
|
||||
LOG("Unable to read count from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read count from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
|
||||
if (count > m_maxTargets) {
|
||||
LOG("Bitstream has too many targets Max:%i Recv:%i", this->m_maxTargets, count);
|
||||
Log::Warn("Bitstream has too many targets Max:{} Recv:{}", this->m_maxTargets, count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
LWOOBJID id{};
|
||||
|
||||
if (!bitStream.Read(id)) {
|
||||
LOG("Unable to read id from bitStream, aborting Handle! %i", bitStream.GetNumberOfUnreadBits());
|
||||
Log::Warn("Unable to read id from bitStream, aborting Handle! {}", bitStream.GetNumberOfUnreadBits());
|
||||
return;
|
||||
};
|
||||
|
||||
@ -71,7 +71,7 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
auto* canidate = Game::entityManager->GetEntity(id);
|
||||
if (canidate) targets.push_back(canidate);
|
||||
} else {
|
||||
LOG("Bitstream has LWOOBJID_EMPTY as a target!");
|
||||
Log::Warn("Bitstream has LWOOBJID_EMPTY as a target!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ void TacArcBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStre
|
||||
void TacArcBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitStream, BehaviorBranchContext branch) {
|
||||
auto* self = Game::entityManager->GetEntity(context->originator);
|
||||
if (self == nullptr) {
|
||||
LOG("Invalid self for (%llu)!", context->originator);
|
||||
Log::Warn("Invalid self for ({})!", context->originator);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ void TauntBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bitStrea
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -26,7 +26,7 @@ void TauntBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitSt
|
||||
auto* target = Game::entityManager->GetEntity(branch.target);
|
||||
|
||||
if (target == nullptr) {
|
||||
LOG("Failed to find target (%llu)!", branch.target);
|
||||
Log::Warn("Failed to find target ({})!", branch.target);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ void VerifyBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitS
|
||||
auto* self = Game::entityManager->GetEntity(context->originator);
|
||||
|
||||
if (self == nullptr) {
|
||||
LOG("Invalid self for (%llu)", context->originator);
|
||||
Log::Warn("Invalid self for ({})", context->originator);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user