diff --git a/dGame/Character.cpp b/dGame/Character.cpp index f06416c1..319b9376 100644 --- a/dGame/Character.cpp +++ b/dGame/Character.cpp @@ -427,7 +427,7 @@ void Character::SetPlayerFlag(const int32_t flagId, const bool value) { auto* player = EntityManager::Instance()->GetEntity(m_ObjectID); if (player != nullptr) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::PLAYER_FLAG, flagId); @@ -538,7 +538,7 @@ void Character::OnZoneLoad() { return; } - auto missionComponent = m_OurEntity->GetComponent(); + auto* missionComponent = m_OurEntity->GetComponent(); if (missionComponent != nullptr) { // Fix the monument race flag @@ -563,7 +563,7 @@ void Character::OnZoneLoad() { } } - auto inventoryComponent = m_OurEntity->GetComponent(); + auto* inventoryComponent = m_OurEntity->GetComponent(); if (inventoryComponent == nullptr) { return; diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index c6f1dca4..04b3d94b 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -690,7 +690,7 @@ void Entity::OnCollisionPhantom(const LWOOBJID otherEntity) { const auto& poi = GetVar(u"POI"); if (!poi.empty()) { - auto missionComponent = other->GetComponent(); + auto* missionComponent = other->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::EXPLORE, 0, 0, GeneralUtils::UTF16ToWTF8(poi)); @@ -936,7 +936,7 @@ void Entity::Kill(Entity* murderer) { // Track a player smashing something else if (murderer != nullptr) { - auto murdererCharacterComponent = murderer->GetComponent(); + auto* murdererCharacterComponent = murderer->GetComponent(); if (murdererCharacterComponent != nullptr) { murdererCharacterComponent->UpdatePlayerStatistic(SmashablesSmashed); } diff --git a/dGame/EntityManager.cpp b/dGame/EntityManager.cpp index c4ccbcdb..511d7557 100644 --- a/dGame/EntityManager.cpp +++ b/dGame/EntityManager.cpp @@ -483,7 +483,7 @@ void EntityManager::UpdateGhosting(Player* player) { return; } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) { return; @@ -599,7 +599,7 @@ void EntityManager::ScheduleForKill(Entity* entity) { if (!entity) return; - auto switchComp = entity->GetComponent(); + auto* switchComp = entity->GetComponent(); if (switchComp) { entity->TriggerEvent(eTriggerEventType::DEACTIVATED, entity); } diff --git a/dGame/Player.cpp b/dGame/Player.cpp index 8c12d38a..77b96b43 100644 --- a/dGame/Player.cpp +++ b/dGame/Player.cpp @@ -90,7 +90,7 @@ void Player::SendToZone(LWOMAPID zoneId, LWOCLONEID cloneId) { const auto sysAddr = entity->GetSystemAddress(); auto* character = entity->GetCharacter(); - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (character != nullptr && characterComponent != nullptr) { character->SetZoneID(zoneID); diff --git a/dGame/TradingManager.cpp b/dGame/TradingManager.cpp index 638e98f8..9984633b 100644 --- a/dGame/TradingManager.cpp +++ b/dGame/TradingManager.cpp @@ -114,10 +114,10 @@ void Trade::Complete() { if (entityA == nullptr || entityB == nullptr) return; - auto inventoryA = entityA->GetComponent(); - auto inventoryB = entityB->GetComponent(); - auto missionsA = entityA->GetComponent(); - auto missionsB = entityB->GetComponent(); + auto* inventoryA = entityA->GetComponent(); + auto* inventoryB = entityB->GetComponent(); + auto* missionsA = entityA->GetComponent(); + auto* missionsB = entityB->GetComponent(); auto* characterA = entityA->GetCharacter(); auto* characterB = entityB->GetCharacter(); @@ -214,7 +214,7 @@ void Trade::SendUpdateToOther(LWOOBJID participant) { std::vector items{}; - auto inventoryComponent = self->GetComponent(); + auto* inventoryComponent = self->GetComponent(); if (inventoryComponent == nullptr) return; diff --git a/dGame/UserManager.cpp b/dGame/UserManager.cpp index 1d58b783..0161395c 100644 --- a/dGame/UserManager.cpp +++ b/dGame/UserManager.cpp @@ -214,7 +214,7 @@ void UserManager::RequestCharacterList(const SystemAddress& sysAddr) { continue; } - auto skillComponent = chars[i]->GetEntity()->GetComponent(); + auto* skillComponent = chars[i]->GetEntity()->GetComponent(); if (skillComponent != nullptr) { skillComponent->Reset(); diff --git a/dGame/dBehaviors/ApplyBuffBehavior.cpp b/dGame/dBehaviors/ApplyBuffBehavior.cpp index e162b5e4..5b4b6ae2 100644 --- a/dGame/dBehaviors/ApplyBuffBehavior.cpp +++ b/dGame/dBehaviors/ApplyBuffBehavior.cpp @@ -9,7 +9,7 @@ void ApplyBuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitS if (entity == nullptr) return; - auto buffComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); if (buffComponent == nullptr) return; @@ -22,7 +22,7 @@ void ApplyBuffBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext b if (entity == nullptr) return; - auto buffComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); if (buffComponent == nullptr) return; diff --git a/dGame/dBehaviors/AreaOfEffectBehavior.cpp b/dGame/dBehaviors/AreaOfEffectBehavior.cpp index e2f1921d..dedede2a 100644 --- a/dGame/dBehaviors/AreaOfEffectBehavior.cpp +++ b/dGame/dBehaviors/AreaOfEffectBehavior.cpp @@ -87,7 +87,7 @@ void AreaOfEffectBehavior::Calculate(BehaviorContext* context, RakNet::BitStream continue; } - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (destroyableComponent == nullptr) { continue; diff --git a/dGame/dBehaviors/BasicAttackBehavior.cpp b/dGame/dBehaviors/BasicAttackBehavior.cpp index c0269e36..08d468ef 100644 --- a/dGame/dBehaviors/BasicAttackBehavior.cpp +++ b/dGame/dBehaviors/BasicAttackBehavior.cpp @@ -11,7 +11,7 @@ void BasicAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi if (context->unmanaged) { auto* entity = EntityManager::Instance()->GetEntity(branch.target); - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (destroyableComponent != nullptr) { PlayFx(u"onhit", entity->GetObjectID()); destroyableComponent->Damage(this->m_MaxDamage, context->originator, context->skillID); @@ -44,7 +44,7 @@ void BasicAttackBehavior::DoHandleBehavior(BehaviorContext* context, RakNet::Bit return; } - auto destroyableComponent = targetEntity->GetComponent(); + auto* destroyableComponent = targetEntity->GetComponent(); if (!destroyableComponent) { Game::logger->Log("BasicAttackBehavior", "No destroyable found on the obj/lot %llu/%i", branch.target, targetEntity->GetLOT()); return; @@ -161,7 +161,7 @@ void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet return; } - auto destroyableComponent = targetEntity->GetComponent(); + auto* destroyableComponent = targetEntity->GetComponent(); if (!destroyableComponent || !destroyableComponent->GetOwningEntity()) { Game::logger->Log("BasicAttackBehavior", "No destroyable component on %llu", branch.target); return; diff --git a/dGame/dBehaviors/Behavior.cpp b/dGame/dBehaviors/Behavior.cpp index cd33da29..8b34507a 100644 --- a/dGame/dBehaviors/Behavior.cpp +++ b/dGame/dBehaviors/Behavior.cpp @@ -328,7 +328,7 @@ void Behavior::PlayFx(std::u16string type, const LWOOBJID target, const LWOOBJID return; } - auto renderComponent = targetEntity->GetComponent(); + auto* renderComponent = targetEntity->GetComponent(); const auto typeString = GeneralUtils::UTF16ToWTF8(type); diff --git a/dGame/dBehaviors/BehaviorContext.cpp b/dGame/dBehaviors/BehaviorContext.cpp index 09920939..ed420ae6 100644 --- a/dGame/dBehaviors/BehaviorContext.cpp +++ b/dGame/dBehaviors/BehaviorContext.cpp @@ -35,7 +35,7 @@ uint32_t BehaviorContext::GetUniqueSkillId() const { return 0; } - auto component = entity->GetComponent(); + auto* component = entity->GetComponent(); if (component == nullptr) { Game::logger->Log("BehaviorContext", "No skill component attached to (%llu)!", this->originator);; @@ -331,7 +331,7 @@ std::vector BehaviorContext::GetValidTargets(int32_t ignoreFaction, in } if (ignoreFaction || includeFaction || (!entity->HasComponent(eReplicaComponentType::PHANTOM_PHYSICS) && targets.empty())) { - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (!destroyableComponent) { return targets; } diff --git a/dGame/dBehaviors/BlockBehavior.cpp b/dGame/dBehaviors/BlockBehavior.cpp index bc8e3c3f..cdbb3d80 100644 --- a/dGame/dBehaviors/BlockBehavior.cpp +++ b/dGame/dBehaviors/BlockBehavior.cpp @@ -18,7 +18,7 @@ void BlockBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStrea return; } - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (destroyableComponent == nullptr) { return; @@ -48,7 +48,7 @@ void BlockBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext branc return; } - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); destroyableComponent->SetAttacksToBlock(this->m_numAttacksCanBlock); diff --git a/dGame/dBehaviors/BuffBehavior.cpp b/dGame/dBehaviors/BuffBehavior.cpp index 552ca160..a39fd165 100644 --- a/dGame/dBehaviors/BuffBehavior.cpp +++ b/dGame/dBehaviors/BuffBehavior.cpp @@ -18,7 +18,7 @@ void BuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream return; } - auto component = entity->GetComponent(); + auto* component = entity->GetComponent(); if (component == nullptr) { Game::logger->Log("BuffBehavior", "Invalid target, no destroyable component (%llu)!", target); @@ -52,7 +52,7 @@ void BuffBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext branch return; } - auto component = entity->GetComponent(); + auto* component = entity->GetComponent(); if (component == nullptr) { Game::logger->Log("BuffBehavior", "Invalid target, no destroyable component (%llu)!", target); diff --git a/dGame/dBehaviors/CarBoostBehavior.cpp b/dGame/dBehaviors/CarBoostBehavior.cpp index 1ed64735..1ab0af95 100644 --- a/dGame/dBehaviors/CarBoostBehavior.cpp +++ b/dGame/dBehaviors/CarBoostBehavior.cpp @@ -19,13 +19,13 @@ void CarBoostBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitSt Game::logger->Log("Car boost", "Activating car boost!"); - auto possessableComponent = entity->GetComponent(); + auto* possessableComponent = entity->GetComponent(); if (possessableComponent != nullptr) { auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor()); if (possessor != nullptr) { - auto characterComponent = possessor->GetComponent(); + auto* characterComponent = possessor->GetComponent(); if (characterComponent != nullptr) { Game::logger->Log("Car boost", "Tracking car boost!"); characterComponent->UpdatePlayerStatistic(RacingCarBoostsActivated); diff --git a/dGame/dBehaviors/DamageAbsorptionBehavior.cpp b/dGame/dBehaviors/DamageAbsorptionBehavior.cpp index 84f597f1..48dbf705 100644 --- a/dGame/dBehaviors/DamageAbsorptionBehavior.cpp +++ b/dGame/dBehaviors/DamageAbsorptionBehavior.cpp @@ -16,7 +16,7 @@ void DamageAbsorptionBehavior::Handle(BehaviorContext* context, RakNet::BitStrea return; } - auto destroyable = target->GetComponent(); + auto* destroyable = target->GetComponent(); if (destroyable == nullptr) { return; @@ -42,7 +42,7 @@ void DamageAbsorptionBehavior::Timer(BehaviorContext* context, BehaviorBranchCon return; } - auto destroyable = target->GetComponent(); + auto* destroyable = target->GetComponent(); if (destroyable == nullptr) { return; diff --git a/dGame/dBehaviors/DamageReductionBehavior.cpp b/dGame/dBehaviors/DamageReductionBehavior.cpp index e28839d5..2b18b7c2 100644 --- a/dGame/dBehaviors/DamageReductionBehavior.cpp +++ b/dGame/dBehaviors/DamageReductionBehavior.cpp @@ -16,7 +16,7 @@ void DamageReductionBehavior::Handle(BehaviorContext* context, RakNet::BitStream return; } - auto destroyable = target->GetComponent(); + auto* destroyable = target->GetComponent(); if (destroyable == nullptr) { return; @@ -40,7 +40,7 @@ void DamageReductionBehavior::Timer(BehaviorContext* context, BehaviorBranchCont return; } - auto destroyable = target->GetComponent(); + auto* destroyable = target->GetComponent(); if (destroyable == nullptr) { return; diff --git a/dGame/dBehaviors/DarkInspirationBehavior.cpp b/dGame/dBehaviors/DarkInspirationBehavior.cpp index 45d501b1..ea80cbba 100644 --- a/dGame/dBehaviors/DarkInspirationBehavior.cpp +++ b/dGame/dBehaviors/DarkInspirationBehavior.cpp @@ -14,7 +14,7 @@ void DarkInspirationBehavior::Handle(BehaviorContext* context, RakNet::BitStream return; } - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent == nullptr) { return; @@ -34,7 +34,7 @@ void DarkInspirationBehavior::Calculate(BehaviorContext* context, RakNet::BitStr return; } - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent == nullptr) { return; diff --git a/dGame/dBehaviors/FallSpeedBehavior.cpp b/dGame/dBehaviors/FallSpeedBehavior.cpp index 5b8a50cd..158c87f6 100644 --- a/dGame/dBehaviors/FallSpeedBehavior.cpp +++ b/dGame/dBehaviors/FallSpeedBehavior.cpp @@ -11,7 +11,7 @@ void FallSpeedBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitS auto* target = EntityManager::Instance()->GetEntity(branch.target); if (!target) return; - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->SetGravityScale(m_PercentSlowed); EntityManager::Instance()->SerializeEntity(target); @@ -39,7 +39,7 @@ void FallSpeedBehavior::End(BehaviorContext* context, BehaviorBranchContext bran auto* target = EntityManager::Instance()->GetEntity(branch.target); if (!target) return; - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->SetGravityScale(1); EntityManager::Instance()->SerializeEntity(target); diff --git a/dGame/dBehaviors/ForceMovementBehavior.cpp b/dGame/dBehaviors/ForceMovementBehavior.cpp index 5c0cafba..52359cf7 100644 --- a/dGame/dBehaviors/ForceMovementBehavior.cpp +++ b/dGame/dBehaviors/ForceMovementBehavior.cpp @@ -44,7 +44,7 @@ void ForceMovementBehavior::Calculate(BehaviorContext* context, RakNet::BitStrea auto* casterEntity = EntityManager::Instance()->GetEntity(context->caster); if (casterEntity != nullptr) { - auto controllablePhysicsComponent = casterEntity->GetComponent(); + auto* controllablePhysicsComponent = casterEntity->GetComponent(); if (controllablePhysicsComponent != nullptr) { if (m_Forward == 1) { @@ -74,7 +74,7 @@ void ForceMovementBehavior::Load() { void ForceMovementBehavior::SyncCalculation(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) { auto* casterEntity = EntityManager::Instance()->GetEntity(context->caster); if (casterEntity != nullptr) { - auto controllablePhysicsComponent = casterEntity->GetComponent(); + auto* controllablePhysicsComponent = casterEntity->GetComponent(); if (controllablePhysicsComponent != nullptr) { controllablePhysicsComponent->SetPosition(controllablePhysicsComponent->GetPosition() + controllablePhysicsComponent->GetVelocity() * m_Duration); diff --git a/dGame/dBehaviors/HealBehavior.cpp b/dGame/dBehaviors/HealBehavior.cpp index 4c4c2bf7..d5eebae9 100644 --- a/dGame/dBehaviors/HealBehavior.cpp +++ b/dGame/dBehaviors/HealBehavior.cpp @@ -16,7 +16,7 @@ void HealBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_strea return; } - auto destroyable = entity->GetComponent(); + auto* destroyable = entity->GetComponent(); if (destroyable == nullptr) { Game::logger->Log("HealBehavior", "Failed to find destroyable component for %(llu)!", branch.target); diff --git a/dGame/dBehaviors/ImaginationBehavior.cpp b/dGame/dBehaviors/ImaginationBehavior.cpp index f46d7ad6..59b192b0 100644 --- a/dGame/dBehaviors/ImaginationBehavior.cpp +++ b/dGame/dBehaviors/ImaginationBehavior.cpp @@ -13,7 +13,7 @@ void ImaginationBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi return; } - auto destroyable = entity->GetComponent(); + auto* destroyable = entity->GetComponent(); if (destroyable == nullptr) { return; diff --git a/dGame/dBehaviors/ImmunityBehavior.cpp b/dGame/dBehaviors/ImmunityBehavior.cpp index 9082bb80..a5dd4c85 100644 --- a/dGame/dBehaviors/ImmunityBehavior.cpp +++ b/dGame/dBehaviors/ImmunityBehavior.cpp @@ -17,7 +17,7 @@ void ImmunityBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitSt return; } - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent) { destroyableComponent->SetStatusImmunity( eStateChangeType::PUSH, @@ -33,7 +33,7 @@ void ImmunityBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitSt ); } - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (controllablePhysicsComponent) { controllablePhysicsComponent->SetStunImmunity( eStateChangeType::PUSH, @@ -63,7 +63,7 @@ void ImmunityBehavior::Timer(BehaviorContext* context, BehaviorBranchContext bra return; } - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent) { destroyableComponent->SetStatusImmunity( eStateChangeType::POP, @@ -79,7 +79,7 @@ void ImmunityBehavior::Timer(BehaviorContext* context, BehaviorBranchContext bra ); } - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (controllablePhysicsComponent) { controllablePhysicsComponent->SetStunImmunity( eStateChangeType::POP, diff --git a/dGame/dBehaviors/InterruptBehavior.cpp b/dGame/dBehaviors/InterruptBehavior.cpp index ab711b10..9035c092 100644 --- a/dGame/dBehaviors/InterruptBehavior.cpp +++ b/dGame/dBehaviors/InterruptBehavior.cpp @@ -46,7 +46,7 @@ void InterruptBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitS if (target == nullptr) return; - auto skillComponent = target->GetComponent(); + auto* skillComponent = target->GetComponent(); if (skillComponent == nullptr) return; @@ -71,7 +71,7 @@ void InterruptBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* b if (target == nullptr) return; - auto skillComponent = target->GetComponent(); + auto* skillComponent = target->GetComponent(); if (skillComponent == nullptr) return; diff --git a/dGame/dBehaviors/KnockbackBehavior.cpp b/dGame/dBehaviors/KnockbackBehavior.cpp index 5c820e59..1b878ed0 100644 --- a/dGame/dBehaviors/KnockbackBehavior.cpp +++ b/dGame/dBehaviors/KnockbackBehavior.cpp @@ -24,7 +24,7 @@ void KnockbackBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* b auto* target = EntityManager::Instance()->GetEntity(branch.target); if (target != nullptr) { - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent != nullptr) { blocked = destroyableComponent->IsKnockbackImmune(); diff --git a/dGame/dBehaviors/LootBuffBehavior.cpp b/dGame/dBehaviors/LootBuffBehavior.cpp index 6e5634fc..d5ae88cd 100644 --- a/dGame/dBehaviors/LootBuffBehavior.cpp +++ b/dGame/dBehaviors/LootBuffBehavior.cpp @@ -4,7 +4,7 @@ void LootBuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitSt auto target = EntityManager::Instance()->GetEntity(context->caster); if (!target) return; - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->AddPickupRadiusScale(m_Scale); @@ -22,7 +22,7 @@ void LootBuffBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext br auto target = EntityManager::Instance()->GetEntity(context->caster); if (!target) return; - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->RemovePickupRadiusScale(m_Scale); diff --git a/dGame/dBehaviors/OverTimeBehavior.cpp b/dGame/dBehaviors/OverTimeBehavior.cpp index df597c00..5afbbd26 100644 --- a/dGame/dBehaviors/OverTimeBehavior.cpp +++ b/dGame/dBehaviors/OverTimeBehavior.cpp @@ -24,7 +24,7 @@ void OverTimeBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitSt if (entity == nullptr) return; - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); if (skillComponent == nullptr) return; diff --git a/dGame/dBehaviors/ProjectileAttackBehavior.cpp b/dGame/dBehaviors/ProjectileAttackBehavior.cpp index 6fc724e1..f65421cb 100644 --- a/dGame/dBehaviors/ProjectileAttackBehavior.cpp +++ b/dGame/dBehaviors/ProjectileAttackBehavior.cpp @@ -24,7 +24,7 @@ void ProjectileAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStrea return; } - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); if (skillComponent == nullptr) { Game::logger->Log("ProjectileAttackBehavior", "Failed to find skill component for (%llu)!", -context->originator); @@ -69,7 +69,7 @@ void ProjectileAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitSt return; } - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); if (skillComponent == nullptr) { Game::logger->Log("ProjectileAttackBehavior", "Failed to find skill component for (%llu)!", context->originator); diff --git a/dGame/dBehaviors/PullToPointBehavior.cpp b/dGame/dBehaviors/PullToPointBehavior.cpp index e553d3a9..7427ccc4 100644 --- a/dGame/dBehaviors/PullToPointBehavior.cpp +++ b/dGame/dBehaviors/PullToPointBehavior.cpp @@ -14,7 +14,7 @@ void PullToPointBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bi return; } - auto movement = target->GetComponent(); + auto* movement = target->GetComponent(); if (movement == nullptr) { return; diff --git a/dGame/dBehaviors/RemoveBuffBehavior.cpp b/dGame/dBehaviors/RemoveBuffBehavior.cpp index fb9f49ec..be3066ac 100644 --- a/dGame/dBehaviors/RemoveBuffBehavior.cpp +++ b/dGame/dBehaviors/RemoveBuffBehavior.cpp @@ -9,7 +9,7 @@ void RemoveBuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit auto* entity = EntityManager::Instance()->GetEntity(context->caster); if (!entity) return; - auto buffComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); if (!buffComponent) return; buffComponent->RemoveBuff(m_BuffId, false, m_RemoveImmunity); diff --git a/dGame/dBehaviors/RepairBehavior.cpp b/dGame/dBehaviors/RepairBehavior.cpp index 836923a4..2467d2a0 100644 --- a/dGame/dBehaviors/RepairBehavior.cpp +++ b/dGame/dBehaviors/RepairBehavior.cpp @@ -16,7 +16,7 @@ void RepairBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bit_str return; } - auto destroyable = entity->GetComponent(); + auto* destroyable = entity->GetComponent(); if (destroyable == nullptr) { Game::logger->Log("RepairBehavior", "Failed to find destroyable component for %(llu)!", branch.target); diff --git a/dGame/dBehaviors/SpawnBehavior.cpp b/dGame/dBehaviors/SpawnBehavior.cpp index a79ad4c0..ca3cb18a 100644 --- a/dGame/dBehaviors/SpawnBehavior.cpp +++ b/dGame/dBehaviors/SpawnBehavior.cpp @@ -53,7 +53,7 @@ void SpawnBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStrea entity->SetOwnerOverride(context->originator); // Unset the flag to reposition the player, this makes it harder to glitch out of the map - auto rebuildComponent = entity->GetComponent(); + auto* rebuildComponent = entity->GetComponent(); if (rebuildComponent != nullptr) { rebuildComponent->SetRepositionPlayer(false); @@ -87,7 +87,7 @@ void SpawnBehavior::Timer(BehaviorContext* context, const BehaviorBranchContext return; } - auto destroyable = entity->GetComponent(); + auto* destroyable = entity->GetComponent(); if (!destroyable) { entity->Smash(context->originator); diff --git a/dGame/dBehaviors/SpeedBehavior.cpp b/dGame/dBehaviors/SpeedBehavior.cpp index b780d215..d326aa45 100644 --- a/dGame/dBehaviors/SpeedBehavior.cpp +++ b/dGame/dBehaviors/SpeedBehavior.cpp @@ -12,7 +12,7 @@ void SpeedBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStrea auto* target = EntityManager::Instance()->GetEntity(branch.target); if (!target) return; - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->AddSpeedboost(m_RunSpeed); @@ -41,7 +41,7 @@ void SpeedBehavior::End(BehaviorContext* context, BehaviorBranchContext branch, auto* target = EntityManager::Instance()->GetEntity(branch.target); if (!target) return; - auto controllablePhysicsComponent = target->GetComponent(); + auto* controllablePhysicsComponent = target->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->RemoveSpeedboost(m_RunSpeed); diff --git a/dGame/dBehaviors/StunBehavior.cpp b/dGame/dBehaviors/StunBehavior.cpp index 9b91d61e..bbe17533 100644 --- a/dGame/dBehaviors/StunBehavior.cpp +++ b/dGame/dBehaviors/StunBehavior.cpp @@ -33,7 +33,7 @@ void StunBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream * If our target is an enemy we can go ahead and stun it. */ - auto combatAiComponent = target->GetComponent(); + auto* combatAiComponent = target->GetComponent(); if (combatAiComponent == nullptr) { return; @@ -56,7 +56,7 @@ void StunBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStr * See if we can stun ourselves */ - auto combatAiComponent = self->GetComponent(); + auto* combatAiComponent = self->GetComponent(); if (combatAiComponent == nullptr) { return; @@ -72,7 +72,7 @@ void StunBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStr auto* target = EntityManager::Instance()->GetEntity(branch.target); if (target != nullptr) { - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent != nullptr) { blocked = destroyableComponent->IsKnockbackImmune(); @@ -91,7 +91,7 @@ void StunBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitStr * If our target is an enemy we can go ahead and stun it. */ - auto combatAiComponent = target->GetComponent(); + auto* combatAiComponent = target->GetComponent(); if (combatAiComponent == nullptr) { return; diff --git a/dGame/dBehaviors/SwitchBehavior.cpp b/dGame/dBehaviors/SwitchBehavior.cpp index 5395e32f..bd261906 100644 --- a/dGame/dBehaviors/SwitchBehavior.cpp +++ b/dGame/dBehaviors/SwitchBehavior.cpp @@ -22,7 +22,7 @@ void SwitchBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStre return; } - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (destroyableComponent == nullptr) { return; @@ -46,7 +46,7 @@ void SwitchBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitS state = entity != nullptr; if (state && m_targetHasBuff != 0) { - auto buffComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); if (buffComponent != nullptr && !buffComponent->HasBuff(m_targetHasBuff)) { state = false; diff --git a/dGame/dBehaviors/TacArcBehavior.cpp b/dGame/dBehaviors/TacArcBehavior.cpp index 4583bd29..91df3879 100644 --- a/dGame/dBehaviors/TacArcBehavior.cpp +++ b/dGame/dBehaviors/TacArcBehavior.cpp @@ -82,7 +82,7 @@ void TacArcBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitS return; } - const auto destroyableComponent = self->GetComponent(); + const auto* destroyableComponent = self->GetComponent(); if ((this->m_usePickedTarget || context->clientInitalized) && branch.target > 0) { const auto* target = EntityManager::Instance()->GetEntity(branch.target); @@ -101,7 +101,7 @@ void TacArcBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitS return; } - auto combatAi = self->GetComponent(); + auto* combatAi = self->GetComponent(); const auto casterPosition = self->GetPosition(); diff --git a/dGame/dBehaviors/TauntBehavior.cpp b/dGame/dBehaviors/TauntBehavior.cpp index 878da4fd..7ed3b897 100644 --- a/dGame/dBehaviors/TauntBehavior.cpp +++ b/dGame/dBehaviors/TauntBehavior.cpp @@ -15,7 +15,7 @@ void TauntBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStrea return; } - auto combatComponent = target->GetComponent(); + auto* combatComponent = target->GetComponent(); if (combatComponent != nullptr) { combatComponent->Taunt(context->originator, m_threatToAdd); @@ -31,7 +31,7 @@ void TauntBehavior::Calculate(BehaviorContext* context, RakNet::BitStream* bitSt return; } - auto combatComponent = target->GetComponent(); + auto* combatComponent = target->GetComponent(); if (combatComponent != nullptr) { combatComponent->Taunt(context->originator, m_threatToAdd); diff --git a/dGame/dBehaviors/VentureVisionBehavior.cpp b/dGame/dBehaviors/VentureVisionBehavior.cpp index 93feb8e9..1fdf3ff3 100644 --- a/dGame/dBehaviors/VentureVisionBehavior.cpp +++ b/dGame/dBehaviors/VentureVisionBehavior.cpp @@ -8,7 +8,7 @@ void VentureVisionBehavior::Handle(BehaviorContext* context, RakNet::BitStream* const auto targetEntity = EntityManager::Instance()->GetEntity(branch.target); if (targetEntity) { - auto characterComponent = targetEntity->GetComponent(); + auto* characterComponent = targetEntity->GetComponent(); if (characterComponent) { if (m_show_collectibles) characterComponent->AddVentureVisionEffect(m_ShowCollectibles); @@ -24,7 +24,7 @@ void VentureVisionBehavior::UnCast(BehaviorContext* context, BehaviorBranchConte const auto targetEntity = EntityManager::Instance()->GetEntity(branch.target); if (targetEntity) { - auto characterComponent = targetEntity->GetComponent(); + auto* characterComponent = targetEntity->GetComponent(); if (characterComponent) { if (m_show_collectibles) characterComponent->RemoveVentureVisionEffect(m_ShowCollectibles); diff --git a/dGame/dComponents/BaseCombatAIComponent.cpp b/dGame/dComponents/BaseCombatAIComponent.cpp index f95cab1c..9b134968 100644 --- a/dGame/dComponents/BaseCombatAIComponent.cpp +++ b/dGame/dComponents/BaseCombatAIComponent.cpp @@ -244,7 +244,7 @@ void BaseCombatAIComponent::CalculateCombat(const float deltaTime) { bool hadRemainingDowntime = m_SkillTime > 0.0f; if (m_SkillTime > 0.0f) m_SkillTime -= deltaTime; - auto rebuild = m_OwningEntity->GetComponent(); + auto* rebuild = m_OwningEntity->GetComponent(); if (rebuild != nullptr) { const auto state = rebuild->GetState(); @@ -254,7 +254,7 @@ void BaseCombatAIComponent::CalculateCombat(const float deltaTime) { } } - auto skillComponent = m_OwningEntity->GetComponent(); + auto* skillComponent = m_OwningEntity->GetComponent(); if (skillComponent == nullptr) { return; @@ -288,7 +288,7 @@ void BaseCombatAIComponent::CalculateCombat(const float deltaTime) { } if (!m_TetherEffectActive && m_OutOfCombat && (m_OutOfCombatTime -= deltaTime) <= 0) { - auto destroyableComponent = m_OwningEntity->GetComponent(); + auto* destroyableComponent = m_OwningEntity->GetComponent(); if (destroyableComponent != nullptr && destroyableComponent->HasFaction(4)) { auto serilizationRequired = false; @@ -548,13 +548,13 @@ bool BaseCombatAIComponent::IsEnemy(LWOOBJID target) const { return false; } - auto destroyable = entity->GetComponent(); + auto* destroyable = entity->GetComponent(); if (destroyable == nullptr) { return false; } - auto referenceDestroyable = m_OwningEntity->GetComponent(); + auto* referenceDestroyable = m_OwningEntity->GetComponent(); if (referenceDestroyable == nullptr) { Game::logger->Log("BaseCombatAIComponent", "Invalid reference destroyable component on (%llu)!", m_OwningEntity->GetObjectID()); @@ -562,7 +562,7 @@ bool BaseCombatAIComponent::IsEnemy(LWOOBJID target) const { return false; } - auto quickbuild = entity->GetComponent(); + auto* quickbuild = entity->GetComponent(); if (quickbuild != nullptr) { const auto state = quickbuild->GetState(); diff --git a/dGame/dComponents/BouncerComponent.cpp b/dGame/dComponents/BouncerComponent.cpp index 0013021f..e26e23a8 100644 --- a/dGame/dComponents/BouncerComponent.cpp +++ b/dGame/dComponents/BouncerComponent.cpp @@ -71,7 +71,7 @@ void BouncerComponent::LookupPetSwitch() { const auto& entities = EntityManager::Instance()->GetEntitiesInGroup(group); for (auto* entity : entities) { - auto switchComponent = entity->GetComponent(); + auto* switchComponent = entity->GetComponent(); if (switchComponent != nullptr) { switchComponent->SetPetBouncer(this); diff --git a/dGame/dComponents/BuffComponent.cpp b/dGame/dComponents/BuffComponent.cpp index b49bb0a5..e121eb55 100644 --- a/dGame/dComponents/BuffComponent.cpp +++ b/dGame/dComponents/BuffComponent.cpp @@ -149,7 +149,7 @@ void BuffComponent::ApplyBuffEffect(int32_t id) { if (parameter.name == "max_health") { const auto maxHealth = parameter.value; - auto destroyable = this->GetOwningEntity()->GetComponent(); + auto* destroyable = this->GetOwningEntity()->GetComponent(); if (destroyable == nullptr) return; @@ -157,7 +157,7 @@ void BuffComponent::ApplyBuffEffect(int32_t id) { } else if (parameter.name == "max_armor") { const auto maxArmor = parameter.value; - auto destroyable = this->GetOwningEntity()->GetComponent(); + auto* destroyable = this->GetOwningEntity()->GetComponent(); if (destroyable == nullptr) return; @@ -165,13 +165,13 @@ void BuffComponent::ApplyBuffEffect(int32_t id) { } else if (parameter.name == "max_imagination") { const auto maxImagination = parameter.value; - auto destroyable = this->GetOwningEntity()->GetComponent(); + auto* destroyable = this->GetOwningEntity()->GetComponent(); if (destroyable == nullptr) return; destroyable->SetMaxImagination(destroyable->GetMaxImagination() + maxImagination); } else if (parameter.name == "speed") { - auto controllablePhysicsComponent = this->GetOwningEntity()->GetComponent(); + auto* controllablePhysicsComponent = this->GetOwningEntity()->GetComponent(); if (!controllablePhysicsComponent) return; const auto speed = parameter.value; controllablePhysicsComponent->AddSpeedboost(speed); @@ -185,7 +185,7 @@ void BuffComponent::RemoveBuffEffect(int32_t id) { if (parameter.name == "max_health") { const auto maxHealth = parameter.value; - auto destroyable = this->GetOwningEntity()->GetComponent(); + auto* destroyable = this->GetOwningEntity()->GetComponent(); if (destroyable == nullptr) return; @@ -193,7 +193,7 @@ void BuffComponent::RemoveBuffEffect(int32_t id) { } else if (parameter.name == "max_armor") { const auto maxArmor = parameter.value; - auto destroyable = this->GetOwningEntity()->GetComponent(); + auto* destroyable = this->GetOwningEntity()->GetComponent(); if (destroyable == nullptr) return; @@ -201,13 +201,13 @@ void BuffComponent::RemoveBuffEffect(int32_t id) { } else if (parameter.name == "max_imagination") { const auto maxImagination = parameter.value; - auto destroyable = this->GetOwningEntity()->GetComponent(); + auto* destroyable = this->GetOwningEntity()->GetComponent(); if (destroyable == nullptr) return; destroyable->SetMaxImagination(destroyable->GetMaxImagination() - maxImagination); } else if (parameter.name == "speed") { - auto controllablePhysicsComponent = this->GetOwningEntity()->GetComponent(); + auto* controllablePhysicsComponent = this->GetOwningEntity()->GetComponent(); if (!controllablePhysicsComponent) return; const auto speed = parameter.value; controllablePhysicsComponent->RemoveSpeedboost(speed); diff --git a/dGame/dComponents/BuildBorderComponent.cpp b/dGame/dComponents/BuildBorderComponent.cpp index c33ae8d5..124b917c 100644 --- a/dGame/dComponents/BuildBorderComponent.cpp +++ b/dGame/dComponents/BuildBorderComponent.cpp @@ -27,7 +27,7 @@ void BuildBorderComponent::OnUse(Entity* originator) { Game::logger->Log("BuildBorderComponent", "Using PropertyPlaque"); } - auto inventoryComponent = originator->GetComponent(); + auto* inventoryComponent = originator->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -63,7 +63,7 @@ void BuildBorderComponent::OnUse(Entity* originator) { GameMessages::SendStartArrangingWithItem(originator, originator->GetSystemAddress(), true, buildArea, originator->GetPosition()); } - auto inv = m_OwningEntity->GetComponent(); + auto* inv = m_OwningEntity->GetComponent(); if (!inv) return; inv->PushEquippedItems(); // technically this is supposed to happen automatically... but it doesnt? so just keep this here } diff --git a/dGame/dComponents/CharacterComponent.cpp b/dGame/dComponents/CharacterComponent.cpp index 94006e83..b0efd142 100644 --- a/dGame/dComponents/CharacterComponent.cpp +++ b/dGame/dComponents/CharacterComponent.cpp @@ -366,7 +366,7 @@ void CharacterComponent::SetLastRocketConfig(std::u16string config) { Item* CharacterComponent::GetRocket(Entity* player) { Item* rocket = nullptr; - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (!inventoryComponent) return rocket; diff --git a/dGame/dComponents/ControllablePhysicsComponent.cpp b/dGame/dComponents/ControllablePhysicsComponent.cpp index 2e8d0e40..04f627e7 100644 --- a/dGame/dComponents/ControllablePhysicsComponent.cpp +++ b/dGame/dComponents/ControllablePhysicsComponent.cpp @@ -321,7 +321,7 @@ void ControllablePhysicsComponent::RemoveSpeedboost(float value) { // Recalculate speedboost since we removed one m_SpeedBoost = 0.0f; if (m_ActiveSpeedBoosts.empty()) { // no active speed boosts left, so return to base speed - auto levelProgressionComponent = m_OwningEntity->GetComponent(); + auto* levelProgressionComponent = m_OwningEntity->GetComponent(); if (levelProgressionComponent) m_SpeedBoost = levelProgressionComponent->GetSpeedBase(); } else { // Used the last applied speedboost m_SpeedBoost = m_ActiveSpeedBoosts.back(); diff --git a/dGame/dComponents/DestroyableComponent.cpp b/dGame/dComponents/DestroyableComponent.cpp index 3de0ff4b..1cc38e0b 100644 --- a/dGame/dComponents/DestroyableComponent.cpp +++ b/dGame/dComponents/DestroyableComponent.cpp @@ -185,7 +185,7 @@ void DestroyableComponent::LoadFromXml(tinyxml2::XMLDocument* doc) { return; } - auto buffComponent = m_OwningEntity->GetComponent(); + auto* buffComponent = m_OwningEntity->GetComponent(); if (buffComponent != nullptr) { buffComponent->LoadFromXml(doc); @@ -207,7 +207,7 @@ void DestroyableComponent::UpdateXml(tinyxml2::XMLDocument* doc) { return; } - auto buffComponent = m_OwningEntity->GetComponent(); + auto* buffComponent = m_OwningEntity->GetComponent(); if (buffComponent != nullptr) { buffComponent->UpdateXml(doc); @@ -224,7 +224,7 @@ void DestroyableComponent::UpdateXml(tinyxml2::XMLDocument* doc) { void DestroyableComponent::SetHealth(int32_t value) { m_DirtyHealth = true; - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (characterComponent != nullptr) { characterComponent->TrackHealthDelta(value - m_iHealth); } @@ -262,14 +262,14 @@ void DestroyableComponent::SetArmor(int32_t value) { // If Destroyable Component already has zero armor do not trigger the passive ability again. bool hadArmor = m_iArmor > 0; - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (characterComponent != nullptr) { characterComponent->TrackArmorDelta(value - m_iArmor); } m_iArmor = value; - auto inventroyComponent = m_OwningEntity->GetComponent(); + auto* inventroyComponent = m_OwningEntity->GetComponent(); if (m_iArmor == 0 && inventroyComponent != nullptr && hadArmor) { inventroyComponent->TriggerPassiveAbility(PassiveAbilityTrigger::SentinelArmor); } @@ -300,14 +300,14 @@ void DestroyableComponent::SetMaxArmor(float value, bool playAnim) { void DestroyableComponent::SetImagination(int32_t value) { m_DirtyHealth = true; - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (characterComponent != nullptr) { characterComponent->TrackImaginationDelta(value - m_iImagination); } m_iImagination = value; - auto inventroyComponent = m_OwningEntity->GetComponent(); + auto* inventroyComponent = m_OwningEntity->GetComponent(); if (m_iImagination == 0 && inventroyComponent != nullptr) { inventroyComponent->TriggerPassiveAbility(PassiveAbilityTrigger::AssemblyImagination); } @@ -407,7 +407,7 @@ void DestroyableComponent::AddFaction(const int32_t factionID, const bool ignore } bool DestroyableComponent::IsEnemy(const Entity* other) const { - const auto otherDestroyableComponent = other->GetComponent(); + const auto* otherDestroyableComponent = other->GetComponent(); if (otherDestroyableComponent != nullptr) { for (const auto enemyFaction : m_EnemyFactionIDs) { for (const auto otherFaction : otherDestroyableComponent->GetFactionIDs()) { @@ -421,7 +421,7 @@ bool DestroyableComponent::IsEnemy(const Entity* other) const { } bool DestroyableComponent::IsFriend(const Entity* other) const { - const auto otherDestroyableComponent = other->GetComponent(); + const auto* otherDestroyableComponent = other->GetComponent(); if (otherDestroyableComponent != nullptr) { for (const auto enemyFaction : m_EnemyFactionIDs) { for (const auto otherFaction : otherDestroyableComponent->GetFactionIDs()) { @@ -455,8 +455,8 @@ bool DestroyableComponent::IsImmune() const { } bool DestroyableComponent::IsKnockbackImmune() const { - auto characterComponent = m_OwningEntity->GetComponent(); - auto inventoryComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); + auto* inventoryComponent = m_OwningEntity->GetComponent(); if (characterComponent != nullptr && inventoryComponent != nullptr && characterComponent->GetCurrentActivity() == eGameActivity::QUICKBUILDING) { const auto hasPassive = inventoryComponent->HasAnyPassive({ @@ -493,13 +493,13 @@ bool DestroyableComponent::CheckValidity(const LWOOBJID target, const bool ignor return false; } - auto targetDestroyable = targetEntity->GetComponent(); + auto* targetDestroyable = targetEntity->GetComponent(); if (targetDestroyable == nullptr) { return false; } - auto targetQuickbuild = targetEntity->GetComponent(); + auto* targetQuickbuild = targetEntity->GetComponent(); if (targetQuickbuild != nullptr) { const auto state = targetQuickbuild->GetState(); @@ -616,13 +616,13 @@ void DestroyableComponent::Damage(uint32_t damage, const LWOOBJID source, uint32 SetIsShielded(absorb > 0); // Dismount on the possessable hit - auto possessable = m_OwningEntity->GetComponent(); + auto* possessable = m_OwningEntity->GetComponent(); if (possessable && possessable->GetDepossessOnHit()) { possessable->Dismount(); } // Dismount on the possessor hit - auto possessor = m_OwningEntity->GetComponent(); + auto* possessor = m_OwningEntity->GetComponent(); if (possessor) { auto possessableId = possessor->GetPossessable(); if (possessableId != LWOOBJID_EMPTY) { @@ -651,7 +651,7 @@ void DestroyableComponent::Damage(uint32_t damage, const LWOOBJID source, uint32 } if (health != 0) { - auto combatComponent = m_OwningEntity->GetComponent(); + auto* combatComponent = m_OwningEntity->GetComponent(); if (combatComponent != nullptr) { combatComponent->Taunt(source, sourceDamage * 10); // * 10 is arbatrary @@ -710,13 +710,13 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType const auto isEnemy = m_OwningEntity->GetComponent() != nullptr; - auto inventoryComponent = owner->GetComponent(); + auto* inventoryComponent = owner->GetComponent(); if (inventoryComponent != nullptr && isEnemy) { inventoryComponent->TriggerPassiveAbility(PassiveAbilityTrigger::EnemySmashed, m_OwningEntity); } - auto missions = owner->GetComponent(); + auto* missions = owner->GetComponent(); if (missions != nullptr) { if (team != nullptr) { @@ -725,7 +725,7 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType if (member == nullptr) continue; - auto memberMissions = member->GetComponent(); + auto* memberMissions = member->GetComponent(); if (memberMissions == nullptr) continue; @@ -750,7 +750,7 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType if (team != nullptr && m_OwningEntity->GetComponent() != nullptr) { LWOOBJID specificOwner = LWOOBJID_EMPTY; - auto scriptedActivityComponent = m_OwningEntity->GetComponent(); + auto* scriptedActivityComponent = m_OwningEntity->GetComponent(); uint32_t teamSize = team->members.size(); uint32_t lootMatrixId = GetLootMatrixID(); @@ -877,11 +877,11 @@ void DestroyableComponent::FixStats() { if (entity == nullptr) return; // Reset skill component and buff component - auto skillComponent = entity->GetComponent(); - auto buffComponent = entity->GetComponent(); - auto missionComponent = entity->GetComponent(); - auto inventoryComponent = entity->GetComponent(); - auto destroyableComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); // If any of the components are nullptr, return if (skillComponent == nullptr || buffComponent == nullptr || missionComponent == nullptr || inventoryComponent == nullptr || destroyableComponent == nullptr) { @@ -976,7 +976,7 @@ void DestroyableComponent::DoHardcoreModeDrops(const LWOOBJID source){ //check if this is a player: if (m_OwningEntity->IsPlayer()) { //remove hardcore_lose_uscore_on_death_percent from the player's uscore: - auto character = m_OwningEntity->GetComponent(); + auto* character = m_OwningEntity->GetComponent(); auto uscore = character->GetUScore(); auto uscoreToLose = uscore * (EntityManager::Instance()->GetHardcoreLoseUscoreOnDeathPercent() / 100); @@ -986,7 +986,7 @@ void DestroyableComponent::DoHardcoreModeDrops(const LWOOBJID source){ if (EntityManager::Instance()->GetHardcoreDropinventoryOnDeath()) { //drop all items from inventory: - auto inventory = m_OwningEntity->GetComponent(); + auto* inventory = m_OwningEntity->GetComponent(); if (inventory) { //get the items inventory: auto items = inventory->GetInventory(eInventoryType::ITEMS); @@ -1029,7 +1029,7 @@ void DestroyableComponent::DoHardcoreModeDrops(const LWOOBJID source){ //award the player some u-score: auto* player = EntityManager::Instance()->GetEntity(source); if (player && player->IsPlayer()) { - auto playerStats = player->GetComponent(); + auto* playerStats = player->GetComponent(); if (playerStats) { //get the maximum health from this enemy: auto maxHealth = GetMaxHealth(); diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index 24fb50e6..bf72d14d 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -189,7 +189,7 @@ void InventoryComponent::AddItem( inventoryType = Inventory::FindInventoryTypeForLot(lot); } - auto missions = m_OwningEntity->GetComponent(); + auto* missions = m_OwningEntity->GetComponent(); auto* inventory = GetInventory(inventoryType); @@ -378,7 +378,7 @@ void InventoryComponent::MoveItemToInventory(Item* item, const eInventoryType in item->SetCount(item->GetCount() - delta, false, false); } - auto missionComponent = m_OwningEntity->GetComponent(); + auto* missionComponent = m_OwningEntity->GetComponent(); if (missionComponent != nullptr) { if (IsTransferInventory(inventory)) { @@ -833,7 +833,7 @@ void InventoryComponent::EquipItem(Item* item, const bool skipChecks) { for (auto* lauchPad : rocketLauchPads) { if (Vector3::DistanceSquared(lauchPad->GetPosition(), position) > 13 * 13) continue; - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (characterComponent != nullptr) characterComponent->SetLastRocketItemID(item->GetId()); @@ -950,10 +950,10 @@ void InventoryComponent::UnequipScripts(Item* unequippedItem) { } void InventoryComponent::HandlePossession(Item* item) { - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (!characterComponent) return; - auto possessorComponent = m_OwningEntity->GetComponent(); + auto* possessorComponent = m_OwningEntity->GetComponent(); if (!possessorComponent) return; // Don't do anything if we are busy dismounting @@ -986,7 +986,7 @@ void InventoryComponent::HandlePossession(Item* item) { auto* mount = EntityManager::Instance()->CreateEntity(info, nullptr, m_OwningEntity); // Check to see if the mount is a vehicle, if so, flip it - auto havokVehiclePhysicsComponent = mount->GetComponent(); + auto* havokVehiclePhysicsComponent = mount->GetComponent(); if (havokVehiclePhysicsComponent) { auto angles = startRotation.GetEulerAngles(); // Make it right side up @@ -1000,14 +1000,14 @@ void InventoryComponent::HandlePossession(Item* item) { } // Setup the destroyable stats - auto destroyableComponent = mount->GetComponent(); + auto* destroyableComponent = mount->GetComponent(); if (destroyableComponent) { destroyableComponent->SetIsSmashable(false); destroyableComponent->SetIsImmune(true); } // Mount it - auto possessableComponent = mount->GetComponent(); + auto* possessableComponent = mount->GetComponent(); if (possessableComponent) { possessableComponent->SetIsItemSpawned(true); possessableComponent->SetPossessor(m_OwningEntity->GetObjectID()); @@ -1076,7 +1076,7 @@ void InventoryComponent::PopEquippedItems() { m_Pushed.clear(); - auto destroyableComponent = m_OwningEntity->GetComponent(); + auto* destroyableComponent = m_OwningEntity->GetComponent(); // Reset stats to full if (destroyableComponent) { @@ -1246,7 +1246,7 @@ void InventoryComponent::SpawnPet(Item* item) { } // First check if we can summon the pet. You need 1 imagination to do so. - auto destroyableComponent = m_OwningEntity->GetComponent(); + auto* destroyableComponent = m_OwningEntity->GetComponent(); if (Game::config->GetValue("pets_take_imagination") == "1" && destroyableComponent && destroyableComponent->GetImagination() <= 0) { GameMessages::SendUseItemRequirementsResponse(m_OwningEntity->GetObjectID(), m_OwningEntity->GetSystemAddress(), eUseItemResponse::NoImaginationForPet); @@ -1261,7 +1261,7 @@ void InventoryComponent::SpawnPet(Item* item) { auto* pet = EntityManager::Instance()->CreateEntity(info); - auto petComponent = pet->GetComponent(); + auto* petComponent = pet->GetComponent(); if (petComponent != nullptr) { petComponent->Activate(item); @@ -1339,7 +1339,7 @@ std::vector InventoryComponent::FindBuffs(Item* item, bool castOnEquip return entry.objectTemplate == static_cast(item->GetLot()); }); - auto missions = m_OwningEntity->GetComponent(); + auto* missions = m_OwningEntity->GetComponent(); for (const auto& result : results) { if (result.castOnType == 1) { diff --git a/dGame/dComponents/LevelProgressionComponent.cpp b/dGame/dComponents/LevelProgressionComponent.cpp index dfcbebf6..682b9ac3 100644 --- a/dGame/dComponents/LevelProgressionComponent.cpp +++ b/dGame/dComponents/LevelProgressionComponent.cpp @@ -49,8 +49,8 @@ void LevelProgressionComponent::HandleLevelUp() { const auto& rewards = rewardsTable->GetByLevelID(m_Level); bool rewardingItem = rewards.size() > 0; - auto inventoryComponent = m_OwningEntity->GetComponent(); - auto controllablePhysicsComponent = m_OwningEntity->GetComponent(); + auto* inventoryComponent = m_OwningEntity->GetComponent(); + auto* controllablePhysicsComponent = m_OwningEntity->GetComponent(); if (!inventoryComponent || !controllablePhysicsComponent) return; // Tell the client we beginning to send level rewards. @@ -84,6 +84,6 @@ void LevelProgressionComponent::HandleLevelUp() { void LevelProgressionComponent::SetRetroactiveBaseSpeed(){ if (m_Level >= 20) m_SpeedBase = 525.0f; - auto controllablePhysicsComponent = m_OwningEntity->GetComponent(); + auto* controllablePhysicsComponent = m_OwningEntity->GetComponent(); if (controllablePhysicsComponent) controllablePhysicsComponent->SetSpeedMultiplier(m_SpeedBase / 500.0f); } diff --git a/dGame/dComponents/MissionOfferComponent.cpp b/dGame/dComponents/MissionOfferComponent.cpp index 4a4b3c93..42d5df13 100644 --- a/dGame/dComponents/MissionOfferComponent.cpp +++ b/dGame/dComponents/MissionOfferComponent.cpp @@ -79,7 +79,7 @@ void MissionOfferComponent::OnUse(Entity* originator) { void MissionOfferComponent::OfferMissions(Entity* entity, const uint32_t specifiedMissionId) { // First, get the entity's MissionComponent. If there is not one, then we cannot offer missions to this entity. - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (!missionComponent) { Game::logger->Log("MissionOfferComponent", "Unable to get mission component for Entity %llu", entity->GetObjectID()); diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index d4629942..67ae72d8 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -322,7 +322,7 @@ foundComponent: } void MovementAIComponent::SetPosition(const NiPoint3& value) { - auto controllablePhysicsComponent = m_OwningEntity->GetComponent(); + auto* controllablePhysicsComponent = m_OwningEntity->GetComponent(); if (controllablePhysicsComponent != nullptr) { controllablePhysicsComponent->SetPosition(value); @@ -330,7 +330,7 @@ void MovementAIComponent::SetPosition(const NiPoint3& value) { return; } - auto simplePhysicsComponent = m_OwningEntity->GetComponent(); + auto* simplePhysicsComponent = m_OwningEntity->GetComponent(); if (simplePhysicsComponent != nullptr) { simplePhysicsComponent->SetPosition(value); @@ -342,7 +342,7 @@ void MovementAIComponent::SetRotation(const NiQuaternion& value) { return; } - auto controllablePhysicsComponent = m_OwningEntity->GetComponent(); + auto* controllablePhysicsComponent = m_OwningEntity->GetComponent(); if (controllablePhysicsComponent != nullptr) { controllablePhysicsComponent->SetRotation(value); @@ -350,7 +350,7 @@ void MovementAIComponent::SetRotation(const NiQuaternion& value) { return; } - auto simplePhysicsComponent = m_OwningEntity->GetComponent(); + auto* simplePhysicsComponent = m_OwningEntity->GetComponent(); if (simplePhysicsComponent != nullptr) { simplePhysicsComponent->SetRotation(value); @@ -358,7 +358,7 @@ void MovementAIComponent::SetRotation(const NiQuaternion& value) { } void MovementAIComponent::SetVelocity(const NiPoint3& value) { - auto controllablePhysicsComponent = m_OwningEntity->GetComponent(); + auto* controllablePhysicsComponent = m_OwningEntity->GetComponent(); if (controllablePhysicsComponent != nullptr) { controllablePhysicsComponent->SetVelocity(value); @@ -366,7 +366,7 @@ void MovementAIComponent::SetVelocity(const NiPoint3& value) { return; } - auto simplePhysicsComponent = m_OwningEntity->GetComponent(); + auto* simplePhysicsComponent = m_OwningEntity->GetComponent(); if (simplePhysicsComponent != nullptr) { simplePhysicsComponent->SetVelocity(value); diff --git a/dGame/dComponents/MultiZoneEntranceComponent.cpp b/dGame/dComponents/MultiZoneEntranceComponent.cpp index 012d5b3b..4e7dea8e 100644 --- a/dGame/dComponents/MultiZoneEntranceComponent.cpp +++ b/dGame/dComponents/MultiZoneEntranceComponent.cpp @@ -17,7 +17,7 @@ MultiZoneEntranceComponent::MultiZoneEntranceComponent(Entity* parent) : Compone MultiZoneEntranceComponent::~MultiZoneEntranceComponent() {} void MultiZoneEntranceComponent::OnUse(Entity* originator) { - auto rocket = originator->GetComponent()->RocketEquip(originator); + auto* rocket = originator->GetComponent()->RocketEquip(originator); if (!rocket) return; // the LUP world menu is just the property menu, the client knows how to handle it @@ -25,7 +25,7 @@ void MultiZoneEntranceComponent::OnUse(Entity* originator) { } void MultiZoneEntranceComponent::OnSelectWorld(Entity* originator, uint32_t index) { - auto rocketLaunchpadControlComponent = m_OwningEntity->GetComponent(); + auto* rocketLaunchpadControlComponent = m_OwningEntity->GetComponent(); if (!rocketLaunchpadControlComponent) return; rocketLaunchpadControlComponent->Launch(originator, m_LUPWorlds[index], 0); diff --git a/dGame/dComponents/PetComponent.cpp b/dGame/dComponents/PetComponent.cpp index ba29a604..fa0e6046 100644 --- a/dGame/dComponents/PetComponent.cpp +++ b/dGame/dComponents/PetComponent.cpp @@ -163,7 +163,7 @@ void PetComponent::OnUse(Entity* originator) { m_Tamer = LWOOBJID_EMPTY; } - auto inventoryComponent = originator->GetComponent(); + auto* inventoryComponent = originator->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -173,7 +173,7 @@ void PetComponent::OnUse(Entity* originator) { return; } - auto movementAIComponent = m_OwningEntity->GetComponent(); + auto* movementAIComponent = m_OwningEntity->GetComponent(); if (movementAIComponent != nullptr) { movementAIComponent->Stop(); @@ -224,7 +224,7 @@ void PetComponent::OnUse(Entity* originator) { imaginationCost = cached->second.imaginationCost; } - auto destroyableComponent = originator->GetComponent(); + auto* destroyableComponent = originator->GetComponent(); if (destroyableComponent == nullptr) { return; @@ -487,7 +487,7 @@ void PetComponent::TryBuild(uint32_t numBricks, bool clientFailed) { if (cached == buildCache.end()) return; - auto destroyableComponent = tamer->GetComponent(); + auto* destroyableComponent = tamer->GetComponent(); if (destroyableComponent == nullptr) return; @@ -548,7 +548,7 @@ void PetComponent::NotifyTamingBuildSuccess(NiPoint3 position) { GameMessages::SendPetResponse(m_Tamer, m_OwningEntity->GetObjectID(), 0, 10, 0, tamer->GetSystemAddress()); - auto inventoryComponent = tamer->GetComponent(); + auto* inventoryComponent = tamer->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -606,7 +606,7 @@ void PetComponent::NotifyTamingBuildSuccess(NiPoint3 position) { tamer->GetCharacter()->SetPlayerFlag(petFlags.at(m_OwningEntity->GetLOT()), true); } - auto missionComponent = tamer->GetComponent(); + auto* missionComponent = tamer->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::PET_TAMING, m_OwningEntity->GetLOT()); @@ -614,7 +614,7 @@ void PetComponent::NotifyTamingBuildSuccess(NiPoint3 position) { SetStatus(1); - auto characterComponent = tamer->GetComponent(); + auto* characterComponent = tamer->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic(PetsTamed); } @@ -648,7 +648,7 @@ void PetComponent::RequestSetPetName(std::u16string name) { Game::logger->Log("PetComponent", "Got set pet name (%s)", GeneralUtils::UTF16ToWTF8(name).c_str()); - auto inventoryComponent = tamer->GetComponent(); + auto* inventoryComponent = tamer->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -913,7 +913,7 @@ void PetComponent::AddDrainImaginationTimer(Item* item, bool fromTaming) { auto playerEntity = playerInventoryComponent->GetOwningEntity(); if (!playerEntity) return; - auto playerDestroyableComponent = playerEntity->GetComponent(); + auto* playerDestroyableComponent = playerEntity->GetComponent(); if (!playerDestroyableComponent) return; // Drain by 1 when you summon pet or when this method is called, but not when we have just tamed this pet. @@ -962,7 +962,7 @@ void PetComponent::Deactivate() { } void PetComponent::Release() { - auto inventoryComponent = GetOwner()->GetComponent(); + auto* inventoryComponent = GetOwner()->GetComponent(); if (inventoryComponent == nullptr) { return; diff --git a/dGame/dComponents/PossessableComponent.cpp b/dGame/dComponents/PossessableComponent.cpp index 6172f3e6..1b137bb1 100644 --- a/dGame/dComponents/PossessableComponent.cpp +++ b/dGame/dComponents/PossessableComponent.cpp @@ -48,7 +48,7 @@ void PossessableComponent::Dismount() { } void PossessableComponent::OnUse(Entity* originator) { - auto possessor = originator->GetComponent(); + auto* possessor = originator->GetComponent(); if (possessor) { possessor->Mount(m_OwningEntity); } diff --git a/dGame/dComponents/PossessorComponent.cpp b/dGame/dComponents/PossessorComponent.cpp index 347822ac..26cb70ce 100644 --- a/dGame/dComponents/PossessorComponent.cpp +++ b/dGame/dComponents/PossessorComponent.cpp @@ -15,7 +15,7 @@ PossessorComponent::~PossessorComponent() { if (m_Possessable != LWOOBJID_EMPTY) { auto* mount = EntityManager::Instance()->GetEntity(m_Possessable); if (mount) { - auto possessable = mount->GetComponent(); + auto* possessable = mount->GetComponent(); if (possessable) { if (possessable->GetIsItemSpawned()) { GameMessages::SendMarkInventoryItemAsActive(m_OwningEntity->GetObjectID(), false, eUnequippableActiveType::MOUNT, GetMountItemID(), m_OwningEntity->GetSystemAddress()); @@ -43,14 +43,14 @@ void PossessorComponent::Mount(Entity* mount) { if (GetIsDismounting() || !mount) return; GameMessages::SendSetMountInventoryID(m_OwningEntity, mount->GetObjectID(), UNASSIGNED_SYSTEM_ADDRESS); - auto possessableComponent = mount->GetComponent(); + auto* possessableComponent = mount->GetComponent(); if (possessableComponent) { possessableComponent->SetPossessor(m_OwningEntity->GetObjectID()); SetPossessable(mount->GetObjectID()); SetPossessableType(possessableComponent->GetPossessionType()); } - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (characterComponent) characterComponent->SetIsRacing(true); // GM's to send @@ -68,7 +68,7 @@ void PossessorComponent::Dismount(Entity* mount, bool forceDismount) { SetIsDismounting(true); if (mount) { - auto possessableComponent = mount->GetComponent(); + auto* possessableComponent = mount->GetComponent(); if (possessableComponent) { possessableComponent->SetPossessor(LWOOBJID_EMPTY); if (forceDismount) possessableComponent->ForceDepossess(); @@ -76,7 +76,7 @@ void PossessorComponent::Dismount(Entity* mount, bool forceDismount) { EntityManager::Instance()->SerializeEntity(m_OwningEntity); EntityManager::Instance()->SerializeEntity(mount); - auto characterComponent = m_OwningEntity->GetComponent(); + auto* characterComponent = m_OwningEntity->GetComponent(); if (characterComponent) characterComponent->SetIsRacing(false); } // Make sure we don't have wacky controls diff --git a/dGame/dComponents/PropertyEntranceComponent.cpp b/dGame/dComponents/PropertyEntranceComponent.cpp index 0fc2cc0c..6fab366b 100644 --- a/dGame/dComponents/PropertyEntranceComponent.cpp +++ b/dGame/dComponents/PropertyEntranceComponent.cpp @@ -26,10 +26,10 @@ PropertyEntranceComponent::PropertyEntranceComponent(uint32_t componentID, Entit } void PropertyEntranceComponent::OnUse(Entity* entity) { - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (!characterComponent) return; - auto rocket = entity->GetComponent()->RocketEquip(entity); + auto* rocket = entity->GetComponent()->RocketEquip(entity); if (!rocket) return; GameMessages::SendPropertyEntranceBegin(m_OwningEntity->GetObjectID(), entity->GetSystemAddress()); @@ -63,7 +63,7 @@ void PropertyEntranceComponent::OnEnterProperty(Entity* entity, uint32_t index, cloneId = query[index].CloneId; } - auto launcher = m_OwningEntity->GetComponent(); + auto* launcher = m_OwningEntity->GetComponent(); if (launcher == nullptr) { return; diff --git a/dGame/dComponents/PropertyManagementComponent.cpp b/dGame/dComponents/PropertyManagementComponent.cpp index 105382a6..6169be92 100644 --- a/dGame/dComponents/PropertyManagementComponent.cpp +++ b/dGame/dComponents/PropertyManagementComponent.cpp @@ -263,7 +263,7 @@ void PropertyManagementComponent::OnStartBuilding() { SetPrivacyOption(PropertyPrivacyOption::Private); // Cant visit player which is building if (!entrance.empty()) { - auto rocketPad = entrance[0]->GetComponent(); + auto* rocketPad = entrance[0]->GetComponent(); if (rocketPad != nullptr) { zoneId = rocketPad->GetDefaultZone(); @@ -275,7 +275,7 @@ void PropertyManagementComponent::OnStartBuilding() { player->SendToZone(zoneId); } - auto inventoryComponent = ownerEntity->GetComponent(); + auto* inventoryComponent = ownerEntity->GetComponent(); // Push equipped items if (inventoryComponent) inventoryComponent->PushEquippedItems(); @@ -302,7 +302,7 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N return; } - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -404,7 +404,7 @@ void PropertyManagementComponent::UpdateModelPosition(const LWOOBJID id, const N EntityManager::Instance()->GetZoneControlEntity()->OnZonePropertyModelPlaced(entity); }); // Progress place model missions - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (missionComponent != nullptr) missionComponent->Progress(eMissionTaskType::PLACE_MODEL, 0); } @@ -417,7 +417,7 @@ void PropertyManagementComponent::DeleteModel(const LWOOBJID id, const int delet return; } - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent == nullptr) { return; diff --git a/dGame/dComponents/RacingControlComponent.cpp b/dGame/dComponents/RacingControlComponent.cpp index 1e945505..94b83408 100644 --- a/dGame/dComponents/RacingControlComponent.cpp +++ b/dGame/dComponents/RacingControlComponent.cpp @@ -86,7 +86,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player, return; } - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -140,7 +140,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player, // Make the vehicle a child of the racing controller. m_OwningEntity->AddChild(carEntity); - auto destroyableComponent = carEntity->GetComponent(); + auto* destroyableComponent = carEntity->GetComponent(); // Setup the vehicle stats. if (destroyableComponent != nullptr) { @@ -149,14 +149,14 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player, } // Setup the vehicle as being possessed by the player. - auto possessableComponent = carEntity->GetComponent(); + auto* possessableComponent = carEntity->GetComponent(); if (possessableComponent != nullptr) { possessableComponent->SetPossessor(player->GetObjectID()); } // Load the vehicle's assemblyPartLOTs for display. - auto moduleAssemblyComponent = carEntity->GetComponent(); + auto* moduleAssemblyComponent = carEntity->GetComponent(); if (moduleAssemblyComponent) { moduleAssemblyComponent->SetSubKey(item->GetSubKey()); @@ -171,7 +171,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player, } // Setup the player as possessing the vehicle. - auto possessorComponent = player->GetComponent(); + auto* possessorComponent = player->GetComponent(); if (possessorComponent != nullptr) { possessorComponent->SetPossessable(carEntity->GetObjectID()); @@ -179,7 +179,7 @@ void RacingControlComponent::LoadPlayerVehicle(Entity* player, } // Set the player's current activity as racing. - auto characterComponent = player->GetComponent(); + auto* characterComponent = player->GetComponent(); if (characterComponent != nullptr) { characterComponent->SetIsRacing(true); @@ -289,7 +289,7 @@ void RacingControlComponent::OnRequestDie(Entity* player) { GameMessages::SendDie(vehicle, vehicle->GetObjectID(), LWOOBJID_EMPTY, true, eKillType::VIOLENT, u"", 0, 0, 90.0f, false, true, 0); - auto destroyableComponent = vehicle->GetComponent(); + auto* destroyableComponent = vehicle->GetComponent(); uint32_t respawnImagination = 0; // Reset imagination to half its current value, rounded up to the nearest value divisible by 10, as it was done in live. // Do not actually change the value yet. Do that on respawn. @@ -314,13 +314,13 @@ void RacingControlComponent::OnRequestDie(Entity* player) { UNASSIGNED_SYSTEM_ADDRESS); GameMessages::SendResurrect(vehicle); - auto destroyableComponent = vehicle->GetComponent(); + auto* destroyableComponent = vehicle->GetComponent(); // Reset imagination to half its current value, rounded up to the nearest value divisible by 10, as it was done in live. if (destroyableComponent) destroyableComponent->SetImagination(respawnImagination); EntityManager::Instance()->SerializeEntity(vehicle); }); - auto characterComponent = player->GetComponent(); + auto* characterComponent = player->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic(RacingTimesWrecked); } @@ -382,7 +382,7 @@ void RacingControlComponent::HandleMessageBoxResponse(Entity* player, int32_t bu m_OwningEntity->GetObjectID(), 2, 0, LWOOBJID_EMPTY, u"", player->GetObjectID(), UNASSIGNED_SYSTEM_ADDRESS); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) return; @@ -635,7 +635,7 @@ void RacingControlComponent::Update(float deltaTime) { vehicle->SetPosition(player.respawnPosition); vehicle->SetRotation(player.respawnRotation); - auto destroyableComponent = vehicle->GetComponent(); + auto* destroyableComponent = vehicle->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetImagination(0); @@ -812,7 +812,7 @@ void RacingControlComponent::Update(float deltaTime) { "Best lap time (%llu)", lapTime); } - auto missionComponent = playerEntity->GetComponent(); + auto* missionComponent = playerEntity->GetComponent(); if (missionComponent != nullptr) { @@ -835,7 +835,7 @@ void RacingControlComponent::Update(float deltaTime) { // Entire race time missionComponent->Progress(eMissionTaskType::RACING, (raceTime) * 1000, (LWOOBJID)eRacingTaskParam::TOTAL_TRACK_TIME); - auto characterComponent = playerEntity->GetComponent(); + auto* characterComponent = playerEntity->GetComponent(); if (characterComponent != nullptr) { characterComponent->TrackRaceCompleted(m_Finished == 1); } diff --git a/dGame/dComponents/RailActivatorComponent.cpp b/dGame/dComponents/RailActivatorComponent.cpp index 25bdf9b8..db1504da 100644 --- a/dGame/dComponents/RailActivatorComponent.cpp +++ b/dGame/dComponents/RailActivatorComponent.cpp @@ -43,7 +43,7 @@ RailActivatorComponent::RailActivatorComponent(Entity* parent, int32_t component RailActivatorComponent::~RailActivatorComponent() = default; void RailActivatorComponent::OnUse(Entity* originator) { - auto rebuildComponent = m_OwningEntity->GetComponent(); + auto* rebuildComponent = m_OwningEntity->GetComponent(); if (rebuildComponent != nullptr && rebuildComponent->GetState() != eRebuildState::COMPLETED) return; @@ -116,7 +116,7 @@ void RailActivatorComponent::OnCancelRailMovement(Entity* originator) { true, true, true, true, true, true, true ); - auto rebuildComponent = m_OwningEntity->GetComponent(); + auto* rebuildComponent = m_OwningEntity->GetComponent(); if (rebuildComponent != nullptr) { // Set back reset time diff --git a/dGame/dComponents/RebuildComponent.cpp b/dGame/dComponents/RebuildComponent.cpp index ef4baf4b..401abcc9 100644 --- a/dGame/dComponents/RebuildComponent.cpp +++ b/dGame/dComponents/RebuildComponent.cpp @@ -194,7 +194,7 @@ void RebuildComponent::Update(float deltaTime) { if (m_TimeBeforeDrain <= 0.0f) { m_TimeBeforeDrain = m_CompleteTime / static_cast(m_TakeImagination); - auto destComp = builder->GetComponent(); + auto* destComp = builder->GetComponent(); if (!destComp) break; int newImagination = destComp->GetImagination(); @@ -400,7 +400,7 @@ void RebuildComponent::StartRebuild(Entity* user) { if (m_State == eRebuildState::OPEN || m_State == eRebuildState::COMPLETED || m_State == eRebuildState::INCOMPLETE) { m_Builder = user->GetObjectID(); - auto character = user->GetComponent(); + auto* character = user->GetComponent(); character->SetCurrentActivity(eGameActivity::QUICKBUILDING); EntityManager::Instance()->SerializeEntity(user); @@ -412,7 +412,7 @@ void RebuildComponent::StartRebuild(Entity* user) { m_StateDirty = true; EntityManager::Instance()->SerializeEntity(m_OwningEntity); - auto movingPlatform = m_OwningEntity->GetComponent(); + auto* movingPlatform = m_OwningEntity->GetComponent(); if (movingPlatform != nullptr) { movingPlatform->OnRebuildInitilized(); } @@ -434,7 +434,7 @@ void RebuildComponent::CompleteRebuild(Entity* user) { return; } - auto characterComponent = user->GetComponent(); + auto* characterComponent = user->GetComponent(); if (characterComponent != nullptr) { characterComponent->SetCurrentActivity(eGameActivity::NONE); characterComponent->TrackRebuildComplete(); @@ -478,12 +478,12 @@ void RebuildComponent::CompleteRebuild(Entity* user) { for (const auto memberId : team->members) { // progress missions for all team members auto* member = EntityManager::Instance()->GetEntity(memberId); if (member) { - auto missionComponent = member->GetComponent(); + auto* missionComponent = member->GetComponent(); if (missionComponent) missionComponent->Progress(eMissionTaskType::ACTIVITY, m_ActivityId); } } } else{ - auto missionComponent = builder->GetComponent(); + auto* missionComponent = builder->GetComponent(); if (missionComponent) missionComponent->Progress(eMissionTaskType::ACTIVITY, m_ActivityId); } LootGenerator::Instance().DropActivityLoot(builder, m_OwningEntity, m_ActivityId, 1); @@ -503,7 +503,7 @@ void RebuildComponent::CompleteRebuild(Entity* user) { m_OwningEntity->TriggerEvent(eTriggerEventType::REBUILD_COMPLETE, user); - auto movingPlatform = m_OwningEntity->GetComponent(); + auto* movingPlatform = m_OwningEntity->GetComponent(); if (movingPlatform != nullptr) { movingPlatform->OnCompleteRebuild(); } @@ -588,7 +588,7 @@ void RebuildComponent::CancelRebuild(Entity* entity, eQuickBuildFailReason failR return; } - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (characterComponent) { characterComponent->SetCurrentActivity(eGameActivity::NONE); EntityManager::Instance()->SerializeEntity(entity); diff --git a/dGame/dComponents/RenderComponent.cpp b/dGame/dComponents/RenderComponent.cpp index feedfd85..f59e116d 100644 --- a/dGame/dComponents/RenderComponent.cpp +++ b/dGame/dComponents/RenderComponent.cpp @@ -214,7 +214,7 @@ float RenderComponent::GetAnimationTime(Entity* self, const std::string& animati float RenderComponent::DoAnimation(Entity* self, const std::string& animation, bool sendAnimation, float priority, float scale) { float returnlength = 0.0f; if (!self) return returnlength; - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (!renderComponent) return returnlength; auto* animationsTable = CDClientManager::Instance().GetTable(); diff --git a/dGame/dComponents/RocketLaunchpadControlComponent.cpp b/dGame/dComponents/RocketLaunchpadControlComponent.cpp index 718a8f11..e1d849d9 100644 --- a/dGame/dComponents/RocketLaunchpadControlComponent.cpp +++ b/dGame/dComponents/RocketLaunchpadControlComponent.cpp @@ -50,7 +50,7 @@ void RocketLaunchpadControlComponent::Launch(Entity* originator, LWOMAPID mapId, } // This also gets triggered by a proximity monitor + item equip, I will set that up when havok is ready - auto characterComponent = originator->GetComponent(); + auto* characterComponent = originator->GetComponent(); auto* character = originator->GetCharacter(); if (!characterComponent || !character) return; @@ -89,18 +89,18 @@ void RocketLaunchpadControlComponent::OnUse(Entity* originator) { // instead we let their OnUse handlers do their things // which components of an Object have their OnUse called when using them // so we don't need to call it here - auto propertyEntrance = m_OwningEntity->GetComponent(); + auto* propertyEntrance = m_OwningEntity->GetComponent(); if (propertyEntrance) { return; } - auto multiZoneEntranceComponent = m_OwningEntity->GetComponent(); + auto* multiZoneEntranceComponent = m_OwningEntity->GetComponent(); if (multiZoneEntranceComponent) { return; } // No rocket no launch - auto rocket = originator->GetComponent()->RocketEquip(originator); + auto* rocket = originator->GetComponent()->RocketEquip(originator); if (!rocket) { return; } diff --git a/dGame/dComponents/ScriptedActivityComponent.cpp b/dGame/dComponents/ScriptedActivityComponent.cpp index c74c77c7..88cc726c 100644 --- a/dGame/dComponents/ScriptedActivityComponent.cpp +++ b/dGame/dComponents/ScriptedActivityComponent.cpp @@ -53,7 +53,7 @@ ScriptedActivityComponent::ScriptedActivityComponent(Entity* parent, int activit } } - auto destroyableComponent = m_OwningEntity->GetComponent(); + auto* destroyableComponent = m_OwningEntity->GetComponent(); if (destroyableComponent) { // check for LMIs and set the loot LMIs @@ -305,7 +305,7 @@ bool ScriptedActivityComponent::IsValidActivity(Entity* player) { // Makes it so that scripted activities with an unimplemented map cannot be joined /*if (player->GetGMLevel() < eGameMasterLevel::DEVELOPER && (m_ActivityInfo.instanceMapID == 1302 || m_ActivityInfo.instanceMapID == 1301)) { if (m_OwningEntity->GetLOT() == 4860) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); missionComponent->CompleteMission(229); } @@ -354,7 +354,7 @@ bool ScriptedActivityComponent::TakeCost(Entity* player) const { if (m_ActivityInfo.optionalCostLOT <= 0 || m_ActivityInfo.optionalCostCount <= 0) return true; - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (inventoryComponent == nullptr) return false; @@ -555,7 +555,7 @@ void ActivityInstance::StartZone() { } void ActivityInstance::RewardParticipant(Entity* participant) { - auto missionComponent = participant->GetComponent(); + auto* missionComponent = participant->GetComponent(); if (missionComponent) { missionComponent->Progress(eMissionTaskType::ACTIVITY, m_ActivityInfo.ActivityID); } diff --git a/dGame/dComponents/SkillComponent.cpp b/dGame/dComponents/SkillComponent.cpp index 7834674e..95cbe3cd 100644 --- a/dGame/dComponents/SkillComponent.cpp +++ b/dGame/dComponents/SkillComponent.cpp @@ -193,7 +193,7 @@ void SkillComponent::Reset() { void SkillComponent::Interrupt() { // TODO: need to check immunities on the destroyable component, but they aren't implemented - auto combat = m_OwningEntity->GetComponent(); + auto* combat = m_OwningEntity->GetComponent(); if (combat != nullptr && combat->GetStunImmune()) return; for (const auto& behavior : this->m_managedBehaviors) { diff --git a/dGame/dComponents/TriggerComponent.cpp b/dGame/dComponents/TriggerComponent.cpp index ca995c24..bdf67c6a 100644 --- a/dGame/dComponents/TriggerComponent.cpp +++ b/dGame/dComponents/TriggerComponent.cpp @@ -196,7 +196,7 @@ void TriggerComponent::HandleDestroyObject(Entity* targetEntity, std::string arg } void TriggerComponent::HandleToggleTrigger(Entity* targetEntity, std::string args){ - auto triggerComponent = targetEntity->GetComponent(); + auto* triggerComponent = targetEntity->GetComponent(); if (!triggerComponent) { Game::logger->LogDebug("TriggerComponent::HandleToggleTrigger", "Trigger component not found!"); return; @@ -205,7 +205,7 @@ void TriggerComponent::HandleToggleTrigger(Entity* targetEntity, std::string arg } void TriggerComponent::HandleResetRebuild(Entity* targetEntity, std::string args){ - auto rebuildComponent = targetEntity->GetComponent(); + auto* rebuildComponent = targetEntity->GetComponent(); if (!rebuildComponent) { Game::logger->LogDebug("TriggerComponent::HandleResetRebuild", "Rebuild component not found!"); return; @@ -237,7 +237,7 @@ void TriggerComponent::HandleRotateObject(Entity* targetEntity, std::vector argArray){ if (argArray.size() < 3) return; - auto phantomPhysicsComponent = m_OwningEntity->GetComponent(); + auto* phantomPhysicsComponent = m_OwningEntity->GetComponent(); if (!phantomPhysicsComponent) { Game::logger->LogDebug("TriggerComponent::HandlePushObject", "Phantom Physics component not found!"); return; @@ -254,7 +254,7 @@ void TriggerComponent::HandlePushObject(Entity* targetEntity, std::vectorGetComponent(); + auto* phantomPhysicsComponent = m_OwningEntity->GetComponent(); if (!phantomPhysicsComponent) { Game::logger->LogDebug("TriggerComponent::HandleRepelObject", "Phantom Physics component not found!"); return; @@ -334,7 +334,7 @@ void TriggerComponent::HandleUpdateMission(Entity* targetEntity, std::vectorGetComponent(); + auto* missionComponent = targetEntity->GetComponent(); if (!missionComponent){ Game::logger->LogDebug("TriggerComponent::HandleUpdateMission", "Mission component not found!"); return; @@ -353,7 +353,7 @@ void TriggerComponent::HandlePlayEffect(Entity* targetEntity, std::vectorGetComponent(); + auto* skillComponent = targetEntity->GetComponent(); if (!skillComponent) { Game::logger->LogDebug("TriggerComponent::HandleCastSkill", "Skill component not found!"); return; @@ -364,7 +364,7 @@ void TriggerComponent::HandleCastSkill(Entity* targetEntity, std::string args){ } void TriggerComponent::HandleSetPhysicsVolumeEffect(Entity* targetEntity, std::vector argArray) { - auto phantomPhysicsComponent = targetEntity->GetComponent(); + auto* phantomPhysicsComponent = targetEntity->GetComponent(); if (!phantomPhysicsComponent) { Game::logger->LogDebug("TriggerComponent::HandleSetPhysicsVolumeEffect", "Phantom Physics component not found!"); return; @@ -399,7 +399,7 @@ void TriggerComponent::HandleSetPhysicsVolumeEffect(Entity* targetEntity, std::v } void TriggerComponent::HandleSetPhysicsVolumeStatus(Entity* targetEntity, std::string args) { - auto phantomPhysicsComponent = targetEntity->GetComponent(); + auto* phantomPhysicsComponent = targetEntity->GetComponent(); if (!phantomPhysicsComponent) { Game::logger->LogDebug("TriggerComponent::HandleSetPhysicsVolumeEffect", "Phantom Physics component not found!"); return; diff --git a/dGame/dGameMessages/GameMessageHandler.cpp b/dGame/dGameMessages/GameMessageHandler.cpp index 3b10b350..32630325 100644 --- a/dGame/dGameMessages/GameMessageHandler.cpp +++ b/dGame/dGameMessages/GameMessageHandler.cpp @@ -110,7 +110,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System player->ConstructLimboEntities(); } - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (inv) { auto items = inv->GetEquippedItems(); for (auto pair : items) { @@ -120,13 +120,13 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System } } - auto destroyable = entity->GetComponent(); + auto* destroyable = entity->GetComponent(); destroyable->SetImagination(destroyable->GetImagination()); EntityManager::Instance()->SerializeEntity(entity); std::vector racingControllers = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::RACING_CONTROL); for (Entity* racingController : racingControllers) { - auto racingComponent = racingController->GetComponent(); + auto* racingComponent = racingController->GetComponent(); if (racingComponent != nullptr) { racingComponent->OnPlayerLoaded(entity); } @@ -256,7 +256,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System message.Deserialize(inStream); - auto skill_component = entity->GetComponent(); + auto* skill_component = entity->GetComponent(); if (skill_component != nullptr) { auto* bs = new RakNet::BitStream((unsigned char*)message.sBitStream.c_str(), message.sBitStream.size(), false); @@ -275,7 +275,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System if (startSkill.skillID == 1561 || startSkill.skillID == 1562 || startSkill.skillID == 1541) return; - auto comp = entity->GetComponent(); + auto* comp = entity->GetComponent(); if (comp) { comp->Progress(eMissionTaskType::USE_SKILL, startSkill.skillID); } @@ -288,12 +288,12 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System if (behaviorId > 0) { RakNet::BitStream* bs = new RakNet::BitStream((unsigned char*)startSkill.sBitStream.c_str(), startSkill.sBitStream.size(), false); - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); success = skillComponent->CastPlayerSkill(behaviorId, startSkill.uiSkillHandle, bs, startSkill.optionalTargetID, startSkill.skillID); if (success && entity->GetCharacter()) { - auto destComp = entity->GetComponent(); + auto* destComp = entity->GetComponent(); destComp->SetImagination(destComp->GetImagination() - skillTable->GetSkillByID(startSkill.skillID).imaginationcost); } @@ -350,7 +350,7 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System if (usr != nullptr) { RakNet::BitStream* bs = new RakNet::BitStream((unsigned char*)sync.sBitStream.c_str(), sync.sBitStream.size(), false); - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); skillComponent->SyncPlayerSkill(sync.uiSkillHandle, sync.uiBehaviorHandle, bs); diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index e48fa27b..9403c5b3 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -934,10 +934,10 @@ void GameMessages::SendResurrect(Entity* entity) { // and just make sure the client has time to be ready. constexpr float respawnTime = 3.66700005531311f + 0.5f; entity->AddCallbackTimer(respawnTime, [=]() { - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (destroyableComponent != nullptr && entity->GetLOT() == 1) { - auto levelComponent = entity->GetComponent(); + auto* levelComponent = entity->GetComponent(); if (levelComponent) { int32_t healthToRestore = levelComponent->GetLevel() >= 45 ? 8 : 4; if (healthToRestore > destroyableComponent->GetMaxHealth()) healthToRestore = destroyableComponent->GetMaxHealth(); @@ -951,7 +951,7 @@ void GameMessages::SendResurrect(Entity* entity) { }); - auto cont = entity->GetComponent(); + auto* cont = entity->GetComponent(); if (cont && entity->GetLOT() == 1) { cont->SetPosition(entity->GetRespawnPosition()); cont->SetRotation(entity->GetRespawnRotation()); @@ -1148,7 +1148,7 @@ void GameMessages::SendPlayerReachedRespawnCheckpoint(Entity* entity, const NiPo bitStream.Write(position.y); bitStream.Write(position.z); - auto con = entity->GetComponent(); + auto* con = entity->GetComponent(); if (con) { auto rot = con->GetRotation(); bitStream.Write(rot.x); @@ -1283,7 +1283,7 @@ void GameMessages::SendVendorStatusUpdate(Entity* entity, const SystemAddress& s CBITSTREAM; CMSGHEADER; - auto vendor = entity->GetComponent(); + auto* vendor = entity->GetComponent(); if (!vendor) return; std::map vendorItems = vendor->GetInventory(); @@ -1405,7 +1405,7 @@ void GameMessages::SendMoveInventoryBatch(Entity* entity, uint32_t stackCount, i CBITSTREAM; CMSGHEADER; - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; Item* itemStack = inv->FindItemById(iObjID); @@ -2181,7 +2181,7 @@ void GameMessages::HandleUnUseModel(RakNet::BitStream* inStream, Entity* entity, LWOOBJID objIdToAddToInventory{}; inStream->Read(unknown); inStream->Read(objIdToAddToInventory); - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent) { auto* inventory = inventoryComponent->GetInventory(eInventoryType::MODELS_IN_BBB); auto* item = inventory->FindItemById(objIdToAddToInventory); @@ -2243,7 +2243,7 @@ void GameMessages::HandleQueryPropertyData(RakNet::BitStream* inStream, Entity* entity = entites[0]; */ - auto propertyVendorComponent = entity->GetComponent(); + auto* propertyVendorComponent = entity->GetComponent(); if (propertyVendorComponent != nullptr) { propertyVendorComponent->OnQueryPropertyData(entity, sysAddr); @@ -2255,7 +2255,7 @@ void GameMessages::HandleQueryPropertyData(RakNet::BitStream* inStream, Entity* entity = entites[0]; */ - auto propertyManagerComponent = entity->GetComponent(); + auto* propertyManagerComponent = entity->GetComponent(); if (propertyManagerComponent != nullptr) { propertyManagerComponent->OnQueryPropertyData(entity, sysAddr); @@ -2421,7 +2421,7 @@ void GameMessages::HandleBBBLoadItemRequest(RakNet::BitStream* inStream, Entity* Game::logger->Log("BBB", "Load item request for: %lld", previousItemID); LWOOBJID newId = previousItemID; - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent) { auto* inventory = inventoryComponent->GetInventory(eInventoryType::MODELS); auto* itemToMove = inventory->FindItemById(previousItemID); @@ -2775,7 +2775,7 @@ void GameMessages::HandlePropertyEntranceSync(RakNet::BitStream* inStream, Entit auto* player = Player::GetPlayer(sysAddr); - auto entranceComponent = entity->GetComponent(); + auto* entranceComponent = entity->GetComponent(); if (entranceComponent == nullptr) return; @@ -2802,13 +2802,13 @@ void GameMessages::HandleEnterProperty(RakNet::BitStream* inStream, Entity* enti auto* player = Player::GetPlayer(sysAddr); - auto entranceComponent = entity->GetComponent(); + auto* entranceComponent = entity->GetComponent(); if (entranceComponent != nullptr) { entranceComponent->OnEnterProperty(player, index, returnToZone, sysAddr); return; } - auto multiZoneEntranceComponent = entity->GetComponent(); + auto* multiZoneEntranceComponent = entity->GetComponent(); if (multiZoneEntranceComponent != nullptr) { multiZoneEntranceComponent->OnSelectWorld(player, index); } @@ -2819,7 +2819,7 @@ void GameMessages::HandleSetConsumableItem(RakNet::BitStream* inStream, Entity* inStream->Read(lot); - auto inventory = entity->GetComponent(); + auto* inventory = entity->GetComponent(); if (inventory == nullptr) return; @@ -3817,7 +3817,7 @@ void GameMessages::HandleCommandPet(RakNet::BitStream* inStream, Entity* entity, inStream->Read(iTypeID); overrideObey = inStream->ReadBit(); - auto petComponent = entity->GetComponent(); + auto* petComponent = entity->GetComponent(); if (petComponent == nullptr) { return; @@ -3883,13 +3883,13 @@ void GameMessages::HandleMessageBoxResponse(RakNet::BitStream* inStream, Entity* entity->OnMessageBoxResponse(userEntity, iButton, identifier, userData); - auto scriptedActivityComponent = entity->GetComponent(); + auto* scriptedActivityComponent = entity->GetComponent(); if (scriptedActivityComponent != nullptr) { scriptedActivityComponent->HandleMessageBoxResponse(userEntity, GeneralUtils::UTF16ToWTF8(identifier)); } - auto racingControlComponent = entity->GetComponent(); + auto* racingControlComponent = entity->GetComponent(); if (racingControlComponent != nullptr) { racingControlComponent->HandleMessageBoxResponse(userEntity, iButton, GeneralUtils::UTF16ToWTF8(identifier)); @@ -4055,7 +4055,7 @@ void GameMessages::HandleDismountComplete(RakNet::BitStream* inStream, Entity* e // If we aren't possessing somethings, the don't do anything if (objectId != LWOOBJID_EMPTY) { - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); auto* mount = EntityManager::Instance()->GetEntity(objectId); // make sure we have the things we need and they aren't null if (possessorComponent && mount) { @@ -4065,7 +4065,7 @@ void GameMessages::HandleDismountComplete(RakNet::BitStream* inStream, Entity* e possessorComponent->SetPossessableType(ePossessionType::NO_POSSESSION); // character related things - auto character = entity->GetComponent(); + auto* character = entity->GetComponent(); if (character) { // If we had an active item turn it off if (possessorComponent->GetMountItemID() != LWOOBJID_EMPTY) GameMessages::SendMarkInventoryItemAsActive(entity->GetObjectID(), false, eUnequippableActiveType::MOUNT, possessorComponent->GetMountItemID(), entity->GetSystemAddress()); @@ -4073,11 +4073,11 @@ void GameMessages::HandleDismountComplete(RakNet::BitStream* inStream, Entity* e } // Set that the controllabel phsyics comp is teleporting - auto controllablePhysicsComponent = entity->GetComponent(); + auto* controllablePhysicsComponent = entity->GetComponent(); if (controllablePhysicsComponent) controllablePhysicsComponent->SetIsTeleporting(true); // Call dismoint on the possessable comp to let it handle killing the possessable - auto possessableComponent = mount->GetComponent(); + auto* possessableComponent = mount->GetComponent(); if (possessableComponent) possessableComponent->Dismount(); // Update the entity that was possessing @@ -4101,7 +4101,7 @@ void GameMessages::HandleAcknowledgePossession(RakNet::BitStream* inStream, Enti //Racing void GameMessages::HandleModuleAssemblyQueryData(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) { - auto moduleAssemblyComponent = entity->GetComponent(); + auto* moduleAssemblyComponent = entity->GetComponent(); Game::logger->Log("HandleModuleAssemblyQueryData", "Got Query from %i", entity->GetLOT()); @@ -4137,7 +4137,7 @@ void GameMessages::HandleRacingClientReady(RakNet::BitStream* inStream, Entity* return; } - auto racingControlComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent(); + auto* racingControlComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent(); if (racingControlComponent == nullptr) { return; @@ -4187,12 +4187,12 @@ void GameMessages::HandleRequestDie(RakNet::BitStream* inStream, Entity* entity, auto* zoneController = dZoneManager::Instance()->GetZoneControlObject(); - auto racingControlComponent = zoneController->GetComponent(); + auto* racingControlComponent = zoneController->GetComponent(); Game::logger->Log("HandleRequestDie", "Got die request: %i", entity->GetLOT()); if (racingControlComponent != nullptr) { - auto possessableComponent = entity->GetComponent(); + auto* possessableComponent = entity->GetComponent(); if (possessableComponent != nullptr) { entity = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor()); @@ -4230,7 +4230,7 @@ void GameMessages::HandleRacingPlayerInfoResetFinished(RakNet::BitStream* inStre auto* zoneController = dZoneManager::Instance()->GetZoneControlObject(); - auto racingControlComponent = zoneController->GetComponent(); + auto* racingControlComponent = zoneController->GetComponent(); Game::logger->Log("HandleRacingPlayerInfoResetFinished", "Got finished: %i", entity->GetLOT()); @@ -4292,7 +4292,7 @@ void GameMessages::HandleVehicleNotifyHitImaginationServer(RakNet::BitStream* in return; } - auto possessableComponent = entity->GetComponent(); + auto* possessableComponent = entity->GetComponent(); if (possessableComponent != nullptr) { entity = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor()); @@ -4302,7 +4302,7 @@ void GameMessages::HandleVehicleNotifyHitImaginationServer(RakNet::BitStream* in } } - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic(RacingImaginationPowerUpsCollected); } @@ -4629,7 +4629,7 @@ void GameMessages::HandleRequestMoveItemBetweenInventoryTypes(RakNet::BitStream* return; } - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent != nullptr) { if (itemID != LWOOBJID_EMPTY) { @@ -4722,7 +4722,7 @@ void GameMessages::HandleBuyFromVendor(RakNet::BitStream* inStream, Entity* enti Entity* player = EntityManager::Instance()->GetEntity(user->GetLoggedInChar()); if (!player) return; - auto propertyVendorComponent = entity->GetComponent(); + auto* propertyVendorComponent = entity->GetComponent(); if (propertyVendorComponent != nullptr) { propertyVendorComponent->OnBuyFromVendor(player, bConfirmed, item, count); @@ -4732,10 +4732,10 @@ void GameMessages::HandleBuyFromVendor(RakNet::BitStream* inStream, Entity* enti const auto isCommendationVendor = entity->GetLOT() == 13806; - auto vend = entity->GetComponent(); + auto* vend = entity->GetComponent(); if (!vend && !isCommendationVendor) return; - auto inv = player->GetComponent(); + auto* inv = player->GetComponent(); if (!inv) return; if (!isCommendationVendor && !vend->SellsItem(item)) { @@ -4763,7 +4763,7 @@ void GameMessages::HandleBuyFromVendor(RakNet::BitStream* inStream, Entity* enti return; } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) { return; @@ -4826,10 +4826,10 @@ void GameMessages::HandleSellToVendor(RakNet::BitStream* inStream, Entity* entit if (!player) return; Character* character = player->GetCharacter(); if (!character) return; - auto inv = player->GetComponent(); + auto* inv = player->GetComponent(); if (!inv) return; - auto vend = entity->GetComponent(); + auto* vend = entity->GetComponent(); if (!vend) return; Item* item = inv->FindItemById(iObjID); @@ -4876,10 +4876,10 @@ void GameMessages::HandleBuybackFromVendor(RakNet::BitStream* inStream, Entity* if (!player) return; Character* character = player->GetCharacter(); if (!character) return; - auto inv = player->GetComponent(); + auto* inv = player->GetComponent(); if (!inv) return; - auto vend = entity->GetComponent(); + auto* vend = entity->GetComponent(); if (!vend) return; Item* item = inv->FindItemById(iObjID); @@ -4973,7 +4973,7 @@ void GameMessages::HandleFireEventServerSide(RakNet::BitStream* inStream, Entity LWOCLONEID cloneId = 0; LWOMAPID mapId = 0; - auto rocketPad = entity->GetComponent(); + auto* rocketPad = entity->GetComponent(); if (rocketPad == nullptr) return; @@ -5030,7 +5030,7 @@ void GameMessages::HandleRebuildCancel(RakNet::BitStream* inStream, Entity* enti inStream->Read(bEarlyRelease); inStream->Read(userID); - auto rebComp = entity->GetComponent(); + auto* rebComp = entity->GetComponent(); if (!rebComp) return; rebComp->CancelRebuild(EntityManager::Instance()->GetEntity(userID), eQuickBuildFailReason::CANCELED_EARLY); @@ -5063,7 +5063,7 @@ void GameMessages::HandleRequestUse(RakNet::BitStream* inStream, Entity* entity, if (bIsMultiInteractUse) { if (multiInteractType == 0) { - auto missionOfferComponent = interactedObject->GetComponent(); + auto* missionOfferComponent = interactedObject->GetComponent(); if (missionOfferComponent != nullptr) { missionOfferComponent->OfferMissions(entity, multiInteractID); @@ -5076,7 +5076,7 @@ void GameMessages::HandleRequestUse(RakNet::BitStream* inStream, Entity* entity, } //Perform use task if possible: - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (missionComponent == nullptr) return; @@ -5098,7 +5098,7 @@ void GameMessages::HandlePlayEmote(RakNet::BitStream* inStream, Entity* entity) if (emoteID == 0) return; std::string sAnimationName = "deaded"; //Default name in case we fail to get the emote - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (!missionComponent) return; if (targetID != LWOOBJID_EMPTY) { @@ -5142,7 +5142,7 @@ void GameMessages::HandleModularBuildConvertModel(RakNet::BitStream* inStream, E if (!user) return; Entity* character = EntityManager::Instance()->GetEntity(user->GetLoggedInChar()); if (!character) return; - auto inv = character->GetComponent(); + auto* inv = character->GetComponent(); if (!inv) return; auto* item = inv->FindItemById(modelID); @@ -5185,7 +5185,7 @@ void GameMessages::HandleRespondToMission(RakNet::BitStream* inStream, Entity* e inStream->Read(isDefaultReward); if (isDefaultReward) inStream->Read(reward); - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (!missionComponent) { Game::logger->Log("GameMessages", "Unable to get mission component for entity %llu to handle RespondToMission", playerID); return; @@ -5228,7 +5228,7 @@ void GameMessages::HandleMissionDialogOK(RakNet::BitStream* inStream, Entity* en } // Get the player's mission component - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (!missionComponent) { Game::logger->Log("GameMessages", "Unable to get mission component for entity %llu to handle MissionDialogueOK", player->GetObjectID()); return; @@ -5252,7 +5252,7 @@ void GameMessages::HandleRequestLinkedMission(RakNet::BitStream* inStream, Entit auto* player = EntityManager::Instance()->GetEntity(playerId); - auto missionOfferComponent = entity->GetComponent(); + auto* missionOfferComponent = entity->GetComponent(); if (missionOfferComponent != nullptr) { missionOfferComponent->OfferMissions(player, 0); @@ -5266,16 +5266,16 @@ void GameMessages::HandleHasBeenCollected(RakNet::BitStream* inStream, Entity* e Entity* player = EntityManager::Instance()->GetEntity(playerID); if (!player || !entity || entity->GetCollectibleID() == 0) return; - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent) { missionComponent->Progress(eMissionTaskType::COLLECTION, entity->GetLOT(), entity->GetObjectID()); } } void GameMessages::HandleNotifyServerLevelProcessingComplete(RakNet::BitStream* inStream, Entity* entity) { - auto levelComp = entity->GetComponent(); + auto* levelComp = entity->GetComponent(); if (!levelComp) return; - auto character = entity->GetComponent(); + auto* character = entity->GetComponent(); if (!character) return; //Update our character's level in memory: @@ -5283,7 +5283,7 @@ void GameMessages::HandleNotifyServerLevelProcessingComplete(RakNet::BitStream* levelComp->HandleLevelUp(); - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent != nullptr) { auto* inventory = inventoryComponent->GetInventory(ITEMS); @@ -5369,7 +5369,7 @@ void GameMessages::HandleEquipItem(RakNet::BitStream* inStream, Entity* entity) inStream->Read(immediate); //twice? inStream->Read(objectID); - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; Item* item = inv->FindItemById(objectID); @@ -5388,7 +5388,7 @@ void GameMessages::HandleUnequipItem(RakNet::BitStream* inStream, Entity* entity inStream->Read(immediate); inStream->Read(objectID); - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; auto* item = inv->FindItemById(objectID); @@ -5463,7 +5463,7 @@ void GameMessages::HandleRemoveItemFromInventory(RakNet::BitStream* inStream, En inStream->Read(iTradeIDIsDefault); if (iTradeIDIsDefault) inStream->Read(iTradeID); - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; auto* item = inv->FindItemById(iObjID); @@ -5484,7 +5484,7 @@ void GameMessages::HandleRemoveItemFromInventory(RakNet::BitStream* inStream, En item->SetCount(item->GetCount() - iStackCount, true); EntityManager::Instance()->SerializeEntity(entity); - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::GATHER, item->GetLot(), LWOOBJID_EMPTY, "", -iStackCount); @@ -5506,7 +5506,7 @@ void GameMessages::HandleMoveItemInInventory(RakNet::BitStream* inStream, Entity inStream->Read(responseCode); inStream->Read(slot); - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; auto* item = inv->FindItemById(iObjID); @@ -5538,7 +5538,7 @@ void GameMessages::HandleMoveItemBetweenInventoryTypes(RakNet::BitStream* inStre inStream->Read(templateIDIsDefault); if (templateIDIsDefault) inStream->Read(templateID); - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; auto* item = inv->FindItemById(objectID); @@ -5583,7 +5583,7 @@ void GameMessages::HandleModularBuildFinish(RakNet::BitStream* inStream, Entity* if (!user) return; Entity* character = EntityManager::Instance()->GetEntity(user->GetLoggedInChar()); if (!character) return; - auto inv = character->GetComponent(); + auto* inv = character->GetComponent(); if (!inv) return; Game::logger->Log("GameMessages", "Build finished"); @@ -5638,7 +5638,7 @@ void GameMessages::HandleModularBuildFinish(RakNet::BitStream* inStream, Entity* inv->AddItem(8092, 1, eLootSourceType::QUICKBUILD, eInventoryType::MODELS, config); } - auto missionComponent = character->GetComponent(); + auto* missionComponent = character->GetComponent(); if (entity->GetLOT() != 9980 || Game::server->GetZoneID() != 1200) { if (missionComponent != nullptr) { @@ -5648,7 +5648,7 @@ void GameMessages::HandleModularBuildFinish(RakNet::BitStream* inStream, Entity* } } - auto script = entity->GetComponent(); + auto* script = entity->GetComponent(); for (CppScripts::Script* script : CppScripts::GetEntityScripts(entity)) { script->OnModularBuildExit(entity, character, count >= 3, modList); @@ -5671,7 +5671,7 @@ void GameMessages::HandleDoneArrangingWithItem(RakNet::BitStream* inStream, Enti if (!user) return; Entity* character = EntityManager::Instance()->GetEntity(user->GetLoggedInChar()); if (!character) return; - auto inv = character->GetComponent(); + auto* inv = character->GetComponent(); if (!inv) return; /** @@ -5789,7 +5789,7 @@ void GameMessages::HandleModularBuildMoveAndEquip(RakNet::BitStream* inStream, E inStream->Read(templateID); - auto inv = character->GetComponent(); + auto* inv = character->GetComponent(); if (!inv) return; auto* item = inv->FindItemByLot(templateID, TEMP_MODELS); @@ -5841,13 +5841,13 @@ void GameMessages::HandleResurrect(RakNet::BitStream* inStream, Entity* entity) } void GameMessages::HandlePushEquippedItemsState(RakNet::BitStream* inStream, Entity* entity) { - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; inv->PushEquippedItems(); } void GameMessages::HandlePopEquippedItemsState(RakNet::BitStream* inStream, Entity* entity) { - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; inv->PopEquippedItems(); EntityManager::Instance()->SerializeEntity(entity); // so it updates on client side @@ -5859,7 +5859,7 @@ void GameMessages::HandleClientItemConsumed(RakNet::BitStream* inStream, Entity* inStream->Read(itemConsumed); - auto inventory = entity->GetComponent(); + auto* inventory = entity->GetComponent(); if (inventory == nullptr) { return; @@ -5873,7 +5873,7 @@ void GameMessages::HandleClientItemConsumed(RakNet::BitStream* inStream, Entity* item->Consume(); - auto missions = entity->GetComponent(); + auto* missions = entity->GetComponent(); if (missions != nullptr) { missions->Progress(eMissionTaskType::USE_ITEM, itemLot); } @@ -5885,7 +5885,7 @@ void GameMessages::HandleUseNonEquipmentItem(RakNet::BitStream* inStream, Entity inStream->Read(itemConsumed); - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); if (!inv) return; @@ -5920,7 +5920,7 @@ void GameMessages::HandleMatchRequest(RakNet::BitStream* inStream, Entity* entit if (type == 0) { // join if (value != 0) { for (Entity* scriptedAct : scriptedActs) { - auto comp = scriptedAct->GetComponent(); + auto* comp = scriptedAct->GetComponent(); if (!comp) continue; if (comp->GetActivityID() == value) { comp->PlayerJoin(entity); @@ -5931,7 +5931,7 @@ void GameMessages::HandleMatchRequest(RakNet::BitStream* inStream, Entity* entit } } else if (type == 1) { // ready/unready for (Entity* scriptedAct : scriptedActs) { - auto comp = scriptedAct->GetComponent(); + auto* comp = scriptedAct->GetComponent(); if (!comp) continue; if (comp->PlayerIsInQueue(entity)) { comp->PlayerReady(entity, value); @@ -6051,7 +6051,7 @@ void GameMessages::HandleClientRailMovementReady(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) { const auto possibleRails = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::RAIL_ACTIVATOR); for (const auto* possibleRail : possibleRails) { - const auto rail = possibleRail->GetComponent(); + const auto* rail = possibleRail->GetComponent(); if (rail != nullptr) { rail->OnRailMovementReady(entity); } @@ -6063,7 +6063,7 @@ void GameMessages::HandleCancelRailMovement(RakNet::BitStream* inStream, Entity* const auto possibleRails = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::RAIL_ACTIVATOR); for (const auto* possibleRail : possibleRails) { - auto rail = possibleRail->GetComponent(); + auto* rail = possibleRail->GetComponent(); if (rail != nullptr) { rail->OnCancelRailMovement(entity); } @@ -6112,7 +6112,7 @@ void GameMessages::HandleModifyPlayerZoneStatistic(RakNet::BitStream* inStream, } // Notify the character component that something's changed - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (characterComponent != nullptr) { characterComponent->HandleZoneStatisticsUpdate(zone, statisticsName, value); } @@ -6129,14 +6129,14 @@ void GameMessages::HandleUpdatePlayerStatistic(RakNet::BitStream* inStream, Enti updateValue = 1; } - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic((StatisticID)updateID, (uint64_t)std::max(updateValue, int64_t(0))); } } void GameMessages::HandleDeactivateBubbleBuff(RakNet::BitStream* inStream, Entity* entity) { - auto controllablePhysicsComponent = entity->GetComponent(); + auto* controllablePhysicsComponent = entity->GetComponent(); if (controllablePhysicsComponent) controllablePhysicsComponent->DeactivateBubbleBuff(); } @@ -6149,7 +6149,7 @@ void GameMessages::HandleActivateBubbleBuff(RakNet::BitStream* inStream, Entity* if (type == u"skunk") bubbleType = eBubbleType::SKUNK; else if (type == u"energy") bubbleType = eBubbleType::ENERGY; - auto controllablePhysicsComponent = entity->GetComponent(); + auto* controllablePhysicsComponent = entity->GetComponent(); if (controllablePhysicsComponent) controllablePhysicsComponent->ActivateBubbleBuff(bubbleType, specialAnimations); } diff --git a/dGame/dInventory/ItemSet.cpp b/dGame/dInventory/ItemSet.cpp index 055a96a8..d29aba8e 100644 --- a/dGame/dInventory/ItemSet.cpp +++ b/dGame/dInventory/ItemSet.cpp @@ -125,8 +125,8 @@ void ItemSet::OnEquip(const LOT lot) { return; } - auto skillComponent = m_InventoryComponent->GetOwningEntity()->GetComponent(); - auto missionComponent = m_InventoryComponent->GetOwningEntity()->GetComponent(); + auto* skillComponent = m_InventoryComponent->GetOwningEntity()->GetComponent(); + auto* missionComponent = m_InventoryComponent->GetOwningEntity()->GetComponent(); for (const auto skill : skillSet) { auto* skillTable = CDClientManager::Instance().GetTable(); @@ -158,7 +158,7 @@ void ItemSet::OnUnEquip(const LOT lot) { return; } - const auto& skillComponent = m_InventoryComponent->GetOwningEntity()->GetComponent(); + const auto* skillComponent = m_InventoryComponent->GetOwningEntity()->GetComponent(); for (const auto skill : skillSet) { auto* skillTable = CDClientManager::Instance().GetTable(); diff --git a/dGame/dInventory/ItemSetPassiveAbility.cpp b/dGame/dInventory/ItemSetPassiveAbility.cpp index 91f7c916..bf7c19cb 100644 --- a/dGame/dInventory/ItemSetPassiveAbility.cpp +++ b/dGame/dInventory/ItemSetPassiveAbility.cpp @@ -37,8 +37,8 @@ void ItemSetPassiveAbility::Activate(Entity* target) { return; } - auto destroyableComponent = m_Parent->GetComponent(); - auto skillComponent = m_Parent->GetComponent(); + auto* destroyableComponent = m_Parent->GetComponent(); + auto* skillComponent = m_Parent->GetComponent(); if (destroyableComponent == nullptr || skillComponent == nullptr) { return; @@ -196,8 +196,8 @@ std::vector ItemSetPassiveAbility::FindAbilities(uint32_t } void ItemSetPassiveAbility::OnEnemySmshed(Entity* target) { - auto destroyableComponent = m_Parent->GetComponent(); - auto skillComponent = m_Parent->GetComponent(); + auto* destroyableComponent = m_Parent->GetComponent(); + auto* skillComponent = m_Parent->GetComponent(); if (destroyableComponent == nullptr || skillComponent == nullptr) { return; diff --git a/dGame/dMission/Mission.cpp b/dGame/dMission/Mission.cpp index 9f77ad5e..07cbd629 100644 --- a/dGame/dMission/Mission.cpp +++ b/dGame/dMission/Mission.cpp @@ -319,12 +319,12 @@ void Mission::Complete(const bool yieldRewards) { return; } - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (characterComponent != nullptr) { characterComponent->TrackMissionCompletion(!info->isMission); } - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); missionComponent->Progress(eMissionTaskType::META, info->id); @@ -372,7 +372,7 @@ void Mission::CheckCompletion() { void Mission::Catchup() { auto* entity = GetAssociate(); - auto inventory = entity->GetComponent(); + auto* inventory = entity->GetComponent(); for (auto* task : m_Tasks) { const auto type = task->GetType(); @@ -414,11 +414,11 @@ void Mission::YieldRewards() { auto* character = GetUser()->GetLastUsedChar(); - auto inventoryComponent = entity->GetComponent(); - auto levelComponent = entity->GetComponent(); - auto characterComponent = entity->GetComponent(); - auto destroyableComponent = entity->GetComponent(); - auto missionComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); + auto* levelComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); // Remove mission items for (auto* task : m_Tasks) { @@ -532,7 +532,7 @@ void Mission::YieldRewards() { if (info->reward_reputation > 0) { missionComponent->Progress(eMissionTaskType::EARN_REPUTATION, 0, 0L, "", info->reward_reputation); - auto character = entity->GetComponent(); + auto* character = entity->GetComponent(); if (character) { character->SetReputation(character->GetReputation() + info->reward_reputation); GameMessages::SendUpdateReputation(entity->GetObjectID(), character->GetReputation(), entity->GetSystemAddress()); diff --git a/dGame/dMission/MissionTask.cpp b/dGame/dMission/MissionTask.cpp index 77e6fc6e..2a1042ae 100644 --- a/dGame/dMission/MissionTask.cpp +++ b/dGame/dMission/MissionTask.cpp @@ -194,7 +194,7 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string& return; } - auto inventoryComponent = mission->GetAssociate()->GetComponent(); + auto* inventoryComponent = mission->GetAssociate()->GetComponent(); if (inventoryComponent != nullptr) { int32_t itemCount = inventoryComponent->GetLotCountNonTransfer(value); @@ -308,7 +308,7 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string& int32_t gameID = minigameManager->GetLOT(); - auto sac = minigameManager->GetComponent(); + auto* sac = minigameManager->GetComponent(); if (sac != nullptr) { gameID = sac->GetActivityID(); } @@ -368,7 +368,7 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string& if (entity == nullptr) break; - auto missionComponent = entity->GetComponent(); + auto* missionComponent = entity->GetComponent(); if (missionComponent == nullptr) break; diff --git a/dGame/dPropertyBehaviors/ControlBehaviors.cpp b/dGame/dPropertyBehaviors/ControlBehaviors.cpp index 67f51a43..7e4be3e9 100644 --- a/dGame/dPropertyBehaviors/ControlBehaviors.cpp +++ b/dGame/dPropertyBehaviors/ControlBehaviors.cpp @@ -57,7 +57,7 @@ void ControlBehaviors::RequestUpdatedID(int32_t behaviorID, ModelBehaviorCompone } void ControlBehaviors::SendBehaviorListToClient(Entity* modelEntity, const SystemAddress& sysAddr, Entity* modelOwner) { - auto modelComponent = modelEntity->GetComponent(); + auto* modelComponent = modelEntity->GetComponent(); if (!modelComponent) return; @@ -281,7 +281,7 @@ void ControlBehaviors::MoveToInventory(ModelBehaviorComponent* modelComponent, c void ControlBehaviors::ProcessCommand(Entity* modelEntity, const SystemAddress& sysAddr, AMFArrayValue* arguments, std::string command, Entity* modelOwner) { if (!isInitialized || !modelEntity || !modelOwner || !arguments) return; - auto modelComponent = modelEntity->GetComponent(); + auto* modelComponent = modelEntity->GetComponent(); if (!modelComponent) return; diff --git a/dGame/dUtilities/Loot.cpp b/dGame/dUtilities/Loot.cpp index 217a614c..c788c016 100644 --- a/dGame/dUtilities/Loot.cpp +++ b/dGame/dUtilities/Loot.cpp @@ -137,7 +137,7 @@ LootGenerator::LootGenerator() { } std::unordered_map LootGenerator::RollLootMatrix(Entity* player, uint32_t matrixIndex) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); std::unordered_map drops; @@ -283,7 +283,7 @@ void LootGenerator::GiveLoot(Entity* player, uint32_t matrixIndex, eLootSourceTy void LootGenerator::GiveLoot(Entity* player, std::unordered_map& result, eLootSourceType lootSourceType) { player = player->GetOwner(); // if the owner is overwritten, we collect that here - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (!inventoryComponent) return; @@ -330,7 +330,7 @@ void LootGenerator::GiveActivityLoot(Entity* player, Entity* source, uint32_t ac void LootGenerator::DropLoot(Entity* player, Entity* killedObject, uint32_t matrixIndex, uint32_t minCoins, uint32_t maxCoins) { player = player->GetOwner(); // if the owner is overwritten, we collect that here - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (!inventoryComponent) return; @@ -343,7 +343,7 @@ void LootGenerator::DropLoot(Entity* player, Entity* killedObject, uint32_t matr void LootGenerator::DropLoot(Entity* player, Entity* killedObject, std::unordered_map& result, uint32_t minCoins, uint32_t maxCoins) { player = player->GetOwner(); // if the owner is overwritten, we collect that here - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (!inventoryComponent) return; diff --git a/dGame/dUtilities/Mail.cpp b/dGame/dUtilities/Mail.cpp index e538a47a..15a93d2b 100644 --- a/dGame/dUtilities/Mail.cpp +++ b/dGame/dUtilities/Mail.cpp @@ -197,7 +197,7 @@ void Mail::HandleSendMail(RakNet::BitStream* packet, const SystemAddress& sysAdd //Inventory::InventoryType itemType; int mailCost = dZoneManager::Instance()->GetWorldConfig()->mailBaseFee; int stackSize = 0; - auto inv = entity->GetComponent(); + auto* inv = entity->GetComponent(); Item* item = nullptr; if (itemID > 0 && attachmentCount > 0 && inv) { @@ -267,7 +267,7 @@ void Mail::HandleSendMail(RakNet::BitStream* packet, const SystemAddress& sysAdd Game::logger->Log("Mail", "Trying to remove item with ID/count/LOT: %i %i %i", itemID, attachmentCount, itemLOT); inv->RemoveItem(itemLOT, attachmentCount, INVALID, true); - auto missionCompoent = entity->GetComponent(); + auto* missionCompoent = entity->GetComponent(); if (missionCompoent != nullptr) { missionCompoent->Progress(eMissionTaskType::GATHER, itemLOT, LWOOBJID_EMPTY, "", -attachmentCount); @@ -356,7 +356,7 @@ void Mail::HandleAttachmentCollect(RakNet::BitStream* packet, const SystemAddres attachmentCount = res->getInt(2); } - auto inv = player->GetComponent(); + auto* inv = player->GetComponent(); if (!inv) return; inv->AddItem(attachmentLOT, attachmentCount, eLootSourceType::MAIL); diff --git a/dGame/dUtilities/Preconditions.cpp b/dGame/dUtilities/Preconditions.cpp index 48a95ee2..8602586c 100644 --- a/dGame/dUtilities/Preconditions.cpp +++ b/dGame/dUtilities/Preconditions.cpp @@ -115,10 +115,10 @@ bool Precondition::Check(Entity* player, bool evaluateCosts) const { bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluateCosts) const { - auto missionComponent = player->GetComponent(); - auto inventoryComponent = player->GetComponent(); - auto destroyableComponent = player->GetComponent(); - auto levelComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); + auto* levelComponent = player->GetComponent(); auto* character = player->GetCharacter(); Mission* mission; diff --git a/dGame/dUtilities/SlashCommandHandler.cpp b/dGame/dUtilities/SlashCommandHandler.cpp index 3ca983e5..b762002b 100644 --- a/dGame/dUtilities/SlashCommandHandler.cpp +++ b/dGame/dUtilities/SlashCommandHandler.cpp @@ -176,7 +176,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! if (chatCommand == "pvp") { - auto character = entity->GetComponent(); + auto* character = entity->GetComponent(); if (character == nullptr) { Game::logger->Log("SlashCommandHandler", "Failed to find character component!"); @@ -227,9 +227,9 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit if (chatCommand == "fix-stats") { // Reset skill component and buff component - auto skillComponent = entity->GetComponent(); - auto buffComponent = entity->GetComponent(); - auto destroyableComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); // If any of the components are nullptr, return if (skillComponent == nullptr || buffComponent == nullptr || destroyableComponent == nullptr) { @@ -336,7 +336,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "resurrect") { - auto scriptedActivityComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent(); + auto* scriptedActivityComponent = dZoneManager::Instance()->GetZoneControlObject()->GetComponent(); if (scriptedActivityComponent) { // check if user is in activity world and if so, they can't resurrect ChatPackets::SendSystemMessage(sysAddr, u"You cannot resurrect in an activity world."); @@ -373,7 +373,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } EntityManager::Instance()->DestructEntity(entity, sysAddr); - auto charComp = entity->GetComponent(); + auto* charComp = entity->GetComponent(); std::string lowerName = args[0]; if (lowerName.empty()) return; std::transform(lowerName.begin(), lowerName.end(), lowerName.begin(), ::tolower); @@ -413,7 +413,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit if ((chatCommand == "playanimation" || chatCommand == "playanim") && args.size() == 1 && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { std::u16string anim = GeneralUtils::ASCIIToUTF16(args[0], args[0].size()); RenderComponent::PlayAnimation(entity, anim); - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); if (possessorComponent) { auto* possessedComponent = EntityManager::Instance()->GetEntity(possessorComponent->GetPossessable()); if (possessedComponent) RenderComponent::PlayAnimation(possessedComponent, anim); @@ -468,19 +468,19 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto controllablePhysicsComponent = entity->GetComponent(); + auto* controllablePhysicsComponent = entity->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->SetSpeedMultiplier(boost); // speedboost possesables - auto possessor = entity->GetComponent(); + auto* possessor = entity->GetComponent(); if (possessor) { auto possessedID = possessor->GetPossessable(); if (possessedID != LWOOBJID_EMPTY) { auto possessable = EntityManager::Instance()->GetEntity(possessedID); if (possessable) { - auto possessControllablePhysicsComponent = possessable->GetComponent(); + auto* possessControllablePhysicsComponent = possessable->GetComponent(); if (possessControllablePhysicsComponent) { possessControllablePhysicsComponent->SetSpeedMultiplier(boost); } @@ -579,7 +579,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit GeneralUtils::to_u16string(size)); } else ChatPackets::SendSystemMessage(sysAddr, u"Setting inventory ITEMS to size " + GeneralUtils::to_u16string(size)); - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent) { auto* inventory = inventoryComponent->GetInventory(selectedInventory); @@ -629,7 +629,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto comp = entity->GetComponent(); + auto* comp = entity->GetComponent(); if (comp) comp->AcceptMission(missionID, true); return; } @@ -644,7 +644,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto comp = entity->GetComponent(); + auto* comp = entity->GetComponent(); if (comp) comp->CompleteMission(missionID, true); return; } @@ -694,7 +694,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto comp = entity->GetComponent(); + auto* comp = entity->GetComponent(); if (comp == nullptr) { return; @@ -771,7 +771,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "getnavmeshheight" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto control = entity->GetComponent(); + auto* control = entity->GetComponent(); if (!control) return; float y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(control->GetPosition()); @@ -788,7 +788,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto inventory = entity->GetComponent(); + auto* inventory = entity->GetComponent(); inventory->AddItem(itemLOT, 1, eLootSourceType::MODERATION); } else if (args.size() == 2) { @@ -806,7 +806,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto inventory = entity->GetComponent(); + auto* inventory = entity->GetComponent(); inventory->AddItem(itemLOT, count, eLootSourceType::MODERATION); } else { @@ -935,12 +935,12 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); if (possessorComponent) { auto* possassableEntity = EntityManager::Instance()->GetEntity(possessorComponent->GetPossessable()); if (possassableEntity != nullptr) { - auto havokVehiclePhysicsComponent = possassableEntity->GetComponent(); + auto* havokVehiclePhysicsComponent = possassableEntity->GetComponent(); if (havokVehiclePhysicsComponent) { havokVehiclePhysicsComponent->SetPosition(pos); EntityManager::Instance()->SerializeEntity(possassableEntity); @@ -962,7 +962,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "dismount" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); if (possessorComponent) { auto possessableId = possessorComponent->GetPossessable(); if (possessableId != LWOOBJID_EMPTY) { @@ -1171,7 +1171,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit //------------------------------------------------- if (chatCommand == "buffme" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto dest = entity->GetComponent(); + auto* dest = entity->GetComponent(); if (dest) { dest->SetHealth(999); dest->SetMaxHealth(999.0f); @@ -1195,7 +1195,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "buffmed" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto dest = entity->GetComponent(); + auto* dest = entity->GetComponent(); if (dest) { dest->SetHealth(9); dest->SetMaxHealth(9.0f); @@ -1209,7 +1209,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit if (chatCommand == "refillstats" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto dest = entity->GetComponent(); + auto* dest = entity->GetComponent(); if (dest) { dest->SetHealth((int)dest->GetMaxHealth()); dest->SetArmor((int)dest->GetMaxArmor()); @@ -1242,7 +1242,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "spawn" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER && args.size() >= 1) { - auto comp = entity->GetComponent(); + auto* comp = entity->GetComponent(); if (!comp) return; uint32_t lot; @@ -1267,7 +1267,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto havokVehiclePhysicsComponent = newEntity->GetComponent(); + auto* havokVehiclePhysicsComponent = newEntity->GetComponent(); if (havokVehiclePhysicsComponent) { auto newRot = newEntity->GetRotation(); auto angles = newRot.GetEulerAngles(); @@ -1283,7 +1283,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "spawngroup" && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER && args.size() >= 3) { - auto controllablePhysicsComponent = entity->GetComponent(); + auto* controllablePhysicsComponent = entity->GetComponent(); if (!controllablePhysicsComponent) return; LOT lot{}; @@ -1341,7 +1341,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto character = entity->GetComponent(); + auto* character = entity->GetComponent(); if (character) character->SetUScore(character->GetUScore() + uscore); // MODERATION should work but it doesn't. Relog to see uscore changes @@ -1385,9 +1385,9 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } // query to set our uscore to the correct value for this level - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (!characterComponent) return; - auto levelComponent = entity->GetComponent(); + auto* levelComponent = entity->GetComponent(); auto query = CDClientDatabase::CreatePreppedStmt("SELECT requiredUScore from LevelProgressionLookup WHERE id = ?;"); query.bind(1, (int)requestedLevel); auto result = query.execQuery(); @@ -1486,7 +1486,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "gmimmune" && args.size() >= 1 && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); int32_t state = false; @@ -1503,7 +1503,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if (chatCommand == "buff" && args.size() >= 2 && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto buffComponent = entity->GetComponent(); + auto* buffComponent = entity->GetComponent(); int32_t id = 0; int32_t duration = 0; @@ -1615,7 +1615,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if ((chatCommand == "boost") && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); if (possessorComponent == nullptr) { return; @@ -1647,7 +1647,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit } if ((chatCommand == "unboost") && entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER) { - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); if (possessorComponent == nullptr) return; auto* vehicle = EntityManager::Instance()->GetEntity(possessorComponent->GetPossessable()); @@ -1674,7 +1674,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit //Go tell physics to spawn all the vertices: auto entities = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::PHANTOM_PHYSICS); for (auto en : entities) { - auto phys = en->GetComponent(); + auto* phys = en->GetComponent(); if (phys) phys->SpawnVertices(); } @@ -1683,7 +1683,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit if (chatCommand == "reportproxphys" && entity->GetGMLevel() >= eGameMasterLevel::JUNIOR_DEVELOPER) { auto entities = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::PROXIMITY_MONITOR); for (auto en : entities) { - auto phys = en->GetComponent(); + auto* phys = en->GetComponent(); if (phys) { for (auto prox : phys->GetProximitiesData()) { if (!prox.second) continue; @@ -1717,7 +1717,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit if (!GeneralUtils::TryParse(args[0], baseItem)) return; if (!GeneralUtils::TryParse(args[1], reforgedItem)) return; - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent == nullptr) return; @@ -1779,7 +1779,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit dpWorld::Instance().Reload(); auto entities = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::SCRIPTED_ACTIVITY); for (auto entity : entities) { - auto scriptedActivityComponent = entity->GetComponent(); + auto* scriptedActivityComponent = entity->GetComponent(); if (!scriptedActivityComponent) continue; scriptedActivityComponent->ReloadConfig(); @@ -1842,7 +1842,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit return; } - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (!inventoryComponent) return; auto* inventoryToDelete = inventoryComponent->GetInventory(inventoryType); @@ -1930,7 +1930,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit if (args.size() >= 2) { if (args[1] == "-m" && args.size() >= 3) { - auto movingPlatformComponent = closest->GetComponent(); + auto* movingPlatformComponent = closest->GetComponent(); int32_t value = 0; @@ -1964,7 +1964,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit GeneralUtils::ASCIIToUTF16("< " + std::to_string(postion.x) + ", " + std::to_string(postion.y) + ", " + std::to_string(postion.z) + " >") ); } else if (args[1] == "-f") { - auto destuctable = closest->GetComponent(); + auto* destuctable = closest->GetComponent(); if (destuctable == nullptr) { ChatPackets::SendSystemMessage(sysAddr, u"No destroyable component on this entity!"); @@ -1993,7 +1993,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit destuctable->AddFaction(faction, true); } } else if (args[1] == "-t") { - auto phantomPhysicsComponent = closest->GetComponent(); + auto* phantomPhysicsComponent = closest->GetComponent(); if (phantomPhysicsComponent != nullptr) { ChatPackets::SendSystemMessage(sysAddr, u"Type: " + (GeneralUtils::to_u16string(static_cast(phantomPhysicsComponent->GetEffectType())))); @@ -2003,7 +2003,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit ChatPackets::SendSystemMessage(sysAddr, u"Active: " + (GeneralUtils::to_u16string(phantomPhysicsComponent->GetPhysicsEffectActive()))); } - auto triggerComponent = closest->GetComponent(); + auto* triggerComponent = closest->GetComponent(); if (triggerComponent) { auto trigger = triggerComponent->GetTrigger(); if (trigger) { diff --git a/dGame/dUtilities/VanityUtilities.cpp b/dGame/dUtilities/VanityUtilities.cpp index 0bb8dfa8..7fabfbce 100644 --- a/dGame/dUtilities/VanityUtilities.cpp +++ b/dGame/dUtilities/VanityUtilities.cpp @@ -117,7 +117,7 @@ void VanityUtilities::SpawnVanity() { npcEntity->SetVar>(u"chats", npc.m_Phrases); - auto scriptComponent = npcEntity->GetComponent(); + auto* scriptComponent = npcEntity->GetComponent(); if (scriptComponent != nullptr) { scriptComponent->SetScript(npc.m_Script); @@ -161,13 +161,13 @@ Entity* VanityUtilities::SpawnNPC(LOT lot, const std::string& name, const NiPoin auto* entity = EntityManager::Instance()->CreateEntity(info); entity->SetVar(u"npcName", name); - auto inventoryComponent = entity->GetComponent(); + auto* inventoryComponent = entity->GetComponent(); if (inventoryComponent != nullptr) { inventoryComponent->SetNPCItems(inventory); } - auto destroyableComponent = entity->GetComponent(); + auto* destroyableComponent = entity->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetIsGMImmune(true); @@ -519,7 +519,7 @@ void VanityUtilities::SetupNPCTalk(Entity* npc) { } void VanityUtilities::NPCTalk(Entity* npc) { - auto proximityMonitorComponent = npc->GetComponent(); + auto* proximityMonitorComponent = npc->GetComponent(); if (!proximityMonitorComponent->GetProximityObjects("talk").empty()) { const auto& chats = npc->GetVar>(u"chats"); diff --git a/dNet/ClientPackets.cpp b/dNet/ClientPackets.cpp index 9bb0795f..051a6d7c 100644 --- a/dNet/ClientPackets.cpp +++ b/dNet/ClientPackets.cpp @@ -85,7 +85,7 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac Entity* entity = EntityManager::Instance()->GetEntity(user->GetLastUsedChar()->GetObjectID()); if (!entity) return; - auto comp = entity->GetComponent(); + auto* comp = entity->GetComponent(); if (!comp) return; /* @@ -100,7 +100,7 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac } */ - auto possessorComponent = entity->GetComponent(); + auto* possessorComponent = entity->GetComponent(); NiPoint3 position; inStream.Read(position.x); @@ -142,13 +142,13 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac auto* possassableEntity = EntityManager::Instance()->GetEntity(possessorComponent->GetPossessable()); if (possassableEntity != nullptr) { - auto possessableComponent = possassableEntity->GetComponent(); + auto* possessableComponent = possassableEntity->GetComponent(); if (possessableComponent) { // While possessing something, only update char if we are attached to the thing we are possessing if (possessableComponent->GetPossessionType() != ePossessionType::ATTACHED_VISIBLE) updateChar = false; } - auto havokVehiclePhysicsComponent = possassableEntity->GetComponent(); + auto* havokVehiclePhysicsComponent = possassableEntity->GetComponent(); if (havokVehiclePhysicsComponent != nullptr) { // This is flipped for whatever reason rotation = NiQuaternion(rotation.z, rotation.y, rotation.x, rotation.w); @@ -163,7 +163,7 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac havokVehiclePhysicsComponent->SetDirtyAngularVelocity(angVelocityFlag); } else { // Need to get the mount's controllable physics - auto controllablePhysicsComponent = possassableEntity->GetComponent(); + auto* controllablePhysicsComponent = possassableEntity->GetComponent(); if (!controllablePhysicsComponent) return; controllablePhysicsComponent->SetPosition(position); controllablePhysicsComponent->SetRotation(rotation); @@ -186,7 +186,7 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac // Handle statistics - auto characterComponent = entity->GetComponent(); + auto* characterComponent = entity->GetComponent(); if (characterComponent != nullptr) { characterComponent->TrackPositionUpdate(position); } diff --git a/dNet/WorldPackets.cpp b/dNet/WorldPackets.cpp index 5fce14d3..1a9a1a2e 100644 --- a/dNet/WorldPackets.cpp +++ b/dNet/WorldPackets.cpp @@ -134,7 +134,7 @@ void WorldPackets::SendCreateCharacter(const SystemAddress& sysAddr, Entity* ent RakNet::BitStream data; data.Write(7); //LDF key count - auto character = entity->GetComponent(); + auto* character = entity->GetComponent(); if (!character) { Game::logger->Log("WorldPackets", "Entity is not a character?? what??"); return; diff --git a/dScripts/02_server/Enemy/AG/BossSpiderQueenEnemyServer.cpp b/dScripts/02_server/Enemy/AG/BossSpiderQueenEnemyServer.cpp index 33caa474..18cdadaf 100644 --- a/dScripts/02_server/Enemy/AG/BossSpiderQueenEnemyServer.cpp +++ b/dScripts/02_server/Enemy/AG/BossSpiderQueenEnemyServer.cpp @@ -29,9 +29,9 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) { //self:SetStatusImmunity{ StateChangeType = "PUSH", bImmuneToPullToPoint = true, bImmuneToKnockback = true, bImmuneToInterrupt = true } //Get our components: - auto destroyable = self->GetComponent(); - auto controllable = self->GetComponent(); - auto combat = self->GetComponent(); + auto* destroyable = self->GetComponent(); + auto* controllable = self->GetComponent(); + auto* combat = self->GetComponent(); if (!destroyable || !controllable) return; @@ -53,7 +53,7 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) { void BossSpiderQueenEnemyServer::OnDie(Entity* self, Entity* killer) { if (dZoneManager::Instance()->GetZoneID().GetMapID() == instanceZoneID) { - auto missionComponent = killer->GetComponent(); + auto* missionComponent = killer->GetComponent(); if (missionComponent == nullptr) return; @@ -99,7 +99,7 @@ void BossSpiderQueenEnemyServer::WithdrawSpider(Entity* self, const bool withdra EntityManager::Instance()->SerializeEntity(self); - auto baseCombatAi = self->GetComponent(); + auto* baseCombatAi = self->GetComponent(); baseCombatAi->SetDisabled(true); @@ -123,7 +123,7 @@ void BossSpiderQueenEnemyServer::WithdrawSpider(Entity* self, const bool withdra //Cancel all remaining timers for say idle anims: self->CancelAllTimers(); - auto baseCombatAi = self->GetComponent(); + auto* baseCombatAi = self->GetComponent(); baseCombatAi->SetDisabled(false); @@ -314,7 +314,7 @@ void BossSpiderQueenEnemyServer::RainOfFireManager(Entity* self) { return; } - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); if (skillComponent == nullptr) { Game::logger->Log("BossSpiderQueenEnemyServer", "Failed to find impact skill component!"); @@ -347,7 +347,7 @@ void BossSpiderQueenEnemyServer::RapidFireShooterManager(Entity* self) { const auto target = attackTargetTable[0]; - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); skillComponent->CalculateBehavior(1394, 32612, target, true); @@ -381,7 +381,7 @@ void BossSpiderQueenEnemyServer::RunRapidFireShooter(Entity* self) { attackTargetTable.push_back(attackFocus); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); skillComponent->CalculateBehavior(1480, 36652, attackFocus, true); @@ -493,14 +493,14 @@ void BossSpiderQueenEnemyServer::OnTimerDone(Entity* self, const std::string tim auto landingTarget = self->GetI64(u"LandingTarget"); auto landingEntity = EntityManager::Instance()->GetEntity(landingTarget); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(bossLandingSkill, 37739, LWOOBJID_EMPTY); } if (landingEntity) { - auto landingSkill = landingEntity->GetComponent(); + auto* landingSkill = landingEntity->GetComponent(); if (landingSkill != nullptr) { landingSkill->CalculateBehavior(bossLandingSkill, 37739, LWOOBJID_EMPTY, true); diff --git a/dScripts/02_server/Enemy/AM/AmDarklingDragon.cpp b/dScripts/02_server/Enemy/AM/AmDarklingDragon.cpp index 19dfc4f1..ff30f8e8 100644 --- a/dScripts/02_server/Enemy/AM/AmDarklingDragon.cpp +++ b/dScripts/02_server/Enemy/AM/AmDarklingDragon.cpp @@ -12,7 +12,7 @@ void AmDarklingDragon::OnStartup(Entity* self) { self->SetVar(u"weakspot", 0); - auto baseCombatAIComponent = self->GetComponent(); + auto* baseCombatAIComponent = self->GetComponent(); if (baseCombatAIComponent != nullptr) { baseCombatAIComponent->SetStunImmune(true); @@ -46,7 +46,7 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t } } - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { if (destroyableComponent->GetArmor() > 0) return; @@ -56,8 +56,8 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t if (weakpoint == 0) { self->AddTimer("ReviveTimer", 12); - auto baseCombatAIComponent = self->GetComponent(); - auto skillComponent = self->GetComponent(); + auto* baseCombatAIComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (baseCombatAIComponent != nullptr) { baseCombatAIComponent->SetDisabled(true); @@ -127,8 +127,8 @@ void AmDarklingDragon::OnTimerDone(Entity* self, std::string timerName) { RenderComponent::PlayAnimation(self, u"stunend", 2.0f); self->AddTimer("backToAttack", 1); } else if (timerName == "backToAttack") { - auto baseCombatAIComponent = self->GetComponent(); - auto skillComponent = self->GetComponent(); + auto* baseCombatAIComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (baseCombatAIComponent != nullptr) { baseCombatAIComponent->SetDisabled(false); baseCombatAIComponent->SetStunned(false); diff --git a/dScripts/02_server/Enemy/AM/AmSkeletonEngineer.cpp b/dScripts/02_server/Enemy/AM/AmSkeletonEngineer.cpp index af1fc481..a4972729 100644 --- a/dScripts/02_server/Enemy/AM/AmSkeletonEngineer.cpp +++ b/dScripts/02_server/Enemy/AM/AmSkeletonEngineer.cpp @@ -3,8 +3,8 @@ #include "SkillComponent.h" void AmSkeletonEngineer::OnHit(Entity* self, Entity* attacker) { - auto destroyableComponent = self->GetComponent(); - auto skillComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (destroyableComponent == nullptr || skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Enemy/FV/FvMaelstromDragon.cpp b/dScripts/02_server/Enemy/FV/FvMaelstromDragon.cpp index 5be38ace..664d8b67 100644 --- a/dScripts/02_server/Enemy/FV/FvMaelstromDragon.cpp +++ b/dScripts/02_server/Enemy/FV/FvMaelstromDragon.cpp @@ -10,7 +10,7 @@ void FvMaelstromDragon::OnStartup(Entity* self) { self->SetVar(u"weakspot", 0); - auto baseCombatAIComponent = self->GetComponent(); + auto* baseCombatAIComponent = self->GetComponent(); if (baseCombatAIComponent != nullptr) { baseCombatAIComponent->SetStunImmune(true); @@ -59,7 +59,7 @@ void FvMaelstromDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_ } } - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { if (destroyableComponent->GetArmor() > 0) return; @@ -71,8 +71,8 @@ void FvMaelstromDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_ self->AddTimer("ReviveTimer", 12); - auto baseCombatAIComponent = self->GetComponent(); - auto skillComponent = self->GetComponent(); + auto* baseCombatAIComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (baseCombatAIComponent != nullptr) { baseCombatAIComponent->SetDisabled(true); @@ -143,8 +143,8 @@ void FvMaelstromDragon::OnTimerDone(Entity* self, std::string timerName) { RenderComponent::PlayAnimation(self, u"stunend", 2.0f); self->AddTimer("backToAttack", 1.0f); } else if (timerName == "backToAttack") { - auto baseCombatAIComponent = self->GetComponent(); - auto skillComponent = self->GetComponent(); + auto* baseCombatAIComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (baseCombatAIComponent != nullptr) { baseCombatAIComponent->SetDisabled(false); diff --git a/dScripts/02_server/Enemy/General/BaseEnemyApe.cpp b/dScripts/02_server/Enemy/General/BaseEnemyApe.cpp index 029cf633..19a6490a 100644 --- a/dScripts/02_server/Enemy/General/BaseEnemyApe.cpp +++ b/dScripts/02_server/Enemy/General/BaseEnemyApe.cpp @@ -31,11 +31,11 @@ void BaseEnemyApe::OnSkillCast(Entity* self, uint32_t skillID) { } void BaseEnemyApe::OnHit(Entity* self, Entity* attacker) { - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr && destroyableComponent->GetArmor() < 1 && !self->GetBoolean(u"knockedOut")) { StunApe(self, true); self->CancelTimer("spawnQBTime"); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent) { skillComponent->Reset(); } @@ -52,7 +52,7 @@ void BaseEnemyApe::OnTimerDone(Entity* self, std::string timerName) { // Revives the ape, giving it back some armor const auto timesStunned = self->GetVar(u"timesStunned"); - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetArmor(destroyableComponent->GetMaxArmor() / timesStunned); } @@ -104,7 +104,7 @@ void BaseEnemyApe::OnTimerDone(Entity* self, std::string timerName) { return; } - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(1273, 29446, self->GetObjectID(), true, false, player->GetObjectID()); } @@ -123,12 +123,12 @@ void BaseEnemyApe::OnFireEventServerSide(Entity* self, Entity* sender, std::stri } void BaseEnemyApe::StunApe(Entity* self, bool stunState) { - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(stunState); combatAIComponent->SetStunned(stunState); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->Interrupt(); } diff --git a/dScripts/02_server/Enemy/General/BaseEnemyMech.cpp b/dScripts/02_server/Enemy/General/BaseEnemyMech.cpp index 5ab92a46..84646854 100644 --- a/dScripts/02_server/Enemy/General/BaseEnemyMech.cpp +++ b/dScripts/02_server/Enemy/General/BaseEnemyMech.cpp @@ -9,14 +9,14 @@ #include "eReplicaComponentType.h" void BaseEnemyMech::OnStartup(Entity* self) { - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetFaction(4); } } void BaseEnemyMech::OnDie(Entity* self, Entity* killer) { - auto controlPhys = self->GetComponent(); + auto* controlPhys = self->GetComponent(); if (!controlPhys) return; NiPoint3 newLoc = { controlPhys->GetPosition().x, dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(controlPhys->GetPosition()), controlPhys->GetPosition().z }; diff --git a/dScripts/02_server/Enemy/General/EnemyNjBuff.cpp b/dScripts/02_server/Enemy/General/EnemyNjBuff.cpp index 949f3eaf..07b2d899 100644 --- a/dScripts/02_server/Enemy/General/EnemyNjBuff.cpp +++ b/dScripts/02_server/Enemy/General/EnemyNjBuff.cpp @@ -2,7 +2,7 @@ #include "SkillComponent.h" void EnemyNjBuff::OnStartup(Entity* self) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Enemy/General/TreasureChestDragonServer.cpp b/dScripts/02_server/Enemy/General/TreasureChestDragonServer.cpp index de42cfc9..19788677 100644 --- a/dScripts/02_server/Enemy/General/TreasureChestDragonServer.cpp +++ b/dScripts/02_server/Enemy/General/TreasureChestDragonServer.cpp @@ -15,7 +15,7 @@ void TreasureChestDragonServer::OnUse(Entity* self, Entity* user) { self->SetVar(u"bUsed", true); - auto scriptedActivityComponent = self->GetComponent(); + auto* scriptedActivityComponent = self->GetComponent(); if (scriptedActivityComponent == nullptr) { return; diff --git a/dScripts/02_server/Enemy/Survival/AgSurvivalMech.cpp b/dScripts/02_server/Enemy/Survival/AgSurvivalMech.cpp index d1df92f4..99f40b8b 100644 --- a/dScripts/02_server/Enemy/Survival/AgSurvivalMech.cpp +++ b/dScripts/02_server/Enemy/Survival/AgSurvivalMech.cpp @@ -4,7 +4,7 @@ void AgSurvivalMech::OnStartup(Entity* self) { BaseWavesGenericEnemy::OnStartup(self); - auto destroyable = self->GetComponent(); + auto* destroyable = self->GetComponent(); if (destroyable != nullptr) { destroyable->SetFaction(4); } diff --git a/dScripts/02_server/Enemy/Survival/AgSurvivalSpiderling.cpp b/dScripts/02_server/Enemy/Survival/AgSurvivalSpiderling.cpp index 82bee2b5..8e2c173c 100644 --- a/dScripts/02_server/Enemy/Survival/AgSurvivalSpiderling.cpp +++ b/dScripts/02_server/Enemy/Survival/AgSurvivalSpiderling.cpp @@ -4,7 +4,7 @@ void AgSurvivalSpiderling::OnStartup(Entity* self) { BaseWavesGenericEnemy::OnStartup(self); - auto combatAI = self->GetComponent(); + auto* combatAI = self->GetComponent(); if (combatAI != nullptr) { combatAI->SetStunImmune(true); } diff --git a/dScripts/02_server/Enemy/Waves/WaveBossApe.cpp b/dScripts/02_server/Enemy/Waves/WaveBossApe.cpp index 5c768c9e..b4e5a078 100644 --- a/dScripts/02_server/Enemy/Waves/WaveBossApe.cpp +++ b/dScripts/02_server/Enemy/Waves/WaveBossApe.cpp @@ -11,7 +11,7 @@ void WaveBossApe::OnStartup(Entity* self) { self->SetVar(u"AnchorDamageDelayTime", 0.5f); self->SetVar(u"spawnQBTime", 5.0f); - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(true); combatAIComponent->SetStunImmune(true); @@ -30,7 +30,7 @@ void WaveBossApe::OnDie(Entity* self, Entity* killer) { void WaveBossApe::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "startAI") { - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(false); combatAIComponent->SetStunImmune(false); diff --git a/dScripts/02_server/Enemy/Waves/WaveBossHammerling.cpp b/dScripts/02_server/Enemy/Waves/WaveBossHammerling.cpp index ee8ec166..640b026e 100644 --- a/dScripts/02_server/Enemy/Waves/WaveBossHammerling.cpp +++ b/dScripts/02_server/Enemy/Waves/WaveBossHammerling.cpp @@ -5,7 +5,7 @@ void WaveBossHammerling::OnStartup(Entity* self) { BaseWavesGenericEnemy::OnStartup(self); - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(true); combatAIComponent->SetStunImmune(true); @@ -17,7 +17,7 @@ void WaveBossHammerling::OnStartup(Entity* self) { void WaveBossHammerling::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "startAI") { - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(false); } diff --git a/dScripts/02_server/Enemy/Waves/WaveBossHorsemen.cpp b/dScripts/02_server/Enemy/Waves/WaveBossHorsemen.cpp index 19a29002..ee5a946b 100644 --- a/dScripts/02_server/Enemy/Waves/WaveBossHorsemen.cpp +++ b/dScripts/02_server/Enemy/Waves/WaveBossHorsemen.cpp @@ -5,7 +5,7 @@ void WaveBossHorsemen::OnStartup(Entity* self) { BaseWavesGenericEnemy::OnStartup(self); - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(true); combatAIComponent->SetStunImmune(true); @@ -18,7 +18,7 @@ void WaveBossHorsemen::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "startAI") { - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(false); } diff --git a/dScripts/02_server/Enemy/Waves/WaveBossSpiderling.cpp b/dScripts/02_server/Enemy/Waves/WaveBossSpiderling.cpp index 22f61f2c..2c03ac1e 100644 --- a/dScripts/02_server/Enemy/Waves/WaveBossSpiderling.cpp +++ b/dScripts/02_server/Enemy/Waves/WaveBossSpiderling.cpp @@ -5,7 +5,7 @@ void WaveBossSpiderling::OnStartup(Entity* self) { BaseWavesGenericEnemy::OnStartup(self); - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(true); combatAIComponent->SetStunImmune(true); @@ -17,7 +17,7 @@ void WaveBossSpiderling::OnStartup(Entity* self) { void WaveBossSpiderling::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "startAI") { - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(false); combatAIComponent->SetStunImmune(false); diff --git a/dScripts/02_server/Equipment/BootyDigServer.cpp b/dScripts/02_server/Equipment/BootyDigServer.cpp index d1355781..190c232b 100644 --- a/dScripts/02_server/Equipment/BootyDigServer.cpp +++ b/dScripts/02_server/Equipment/BootyDigServer.cpp @@ -35,13 +35,13 @@ BootyDigServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string // Make sure players only dig up one booty per instance player->SetVar(u"bootyDug", true); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { auto* mission = missionComponent->GetMission(1881); if (mission != nullptr && (mission->GetMissionState() == eMissionState::ACTIVE || mission->GetMissionState() == eMissionState::COMPLETE_ACTIVE)) { mission->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) renderComponent->PlayEffect(7730, u"cast", "bootyshine"); diff --git a/dScripts/02_server/Equipment/MaestromExtracticatorServer.cpp b/dScripts/02_server/Equipment/MaestromExtracticatorServer.cpp index 4de8a998..ae039305 100644 --- a/dScripts/02_server/Equipment/MaestromExtracticatorServer.cpp +++ b/dScripts/02_server/Equipment/MaestromExtracticatorServer.cpp @@ -21,7 +21,7 @@ void MaestromExtracticatorServer::OnFireEventServerSide(Entity* self, Entity* se Entity* player = EntityManager::Instance()->GetEntity(self->GetSpawnerID()); if (!player) return; - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) return; missionComponent->Progress(eMissionTaskType::SMASH, 14718); diff --git a/dScripts/02_server/Map/AG/AgBugsprayer.cpp b/dScripts/02_server/Map/AG/AgBugsprayer.cpp index c3da2638..d4ab7aa3 100644 --- a/dScripts/02_server/Map/AG/AgBugsprayer.cpp +++ b/dScripts/02_server/Map/AG/AgBugsprayer.cpp @@ -8,7 +8,7 @@ void AgBugsprayer::OnRebuildComplete(Entity* self, Entity* target) { void AgBugsprayer::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "castSkill") { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) return; diff --git a/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp b/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp index b732a7f4..e5e483c6 100644 --- a/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp +++ b/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp @@ -21,7 +21,7 @@ void AgCagedBricksServer::OnUse(Entity* self, Entity* user) { character->SetPlayerFlag(ePlayerFlag::CAGED_SPIDER, true); //Remove the maelstrom cube: - auto inv = user->GetComponent(); + auto* inv = user->GetComponent(); if (inv) { inv->RemoveItem(14553, 1); diff --git a/dScripts/02_server/Map/AG/AgLaserSensorServer.cpp b/dScripts/02_server/Map/AG/AgLaserSensorServer.cpp index effc523b..7fcea9fa 100644 --- a/dScripts/02_server/Map/AG/AgLaserSensorServer.cpp +++ b/dScripts/02_server/Map/AG/AgLaserSensorServer.cpp @@ -8,7 +8,7 @@ void AgLaserSensorServer::OnStartup(Entity* self) { self->SetBoolean(u"active", true); auto repelForce = self->GetVarAs(u"repelForce"); if (!repelForce) repelForce = m_RepelForce; - auto phantomPhysicsComponent = self->GetComponent(); + auto* phantomPhysicsComponent = self->GetComponent(); if (!phantomPhysicsComponent) return; phantomPhysicsComponent->SetPhysicsEffectActive(true); phantomPhysicsComponent->SetEffectType(ePhysicsEffectType::REPULSE); @@ -22,7 +22,7 @@ void AgLaserSensorServer::OnCollisionPhantom(Entity* self, Entity* target) { if (!active) return; auto skillCastID = self->GetVarAs(u"skillCastID"); if (skillCastID == 0) skillCastID = m_SkillCastID; - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (!skillComponent) return; skillComponent->CastSkill(m_SkillCastID, target->GetObjectID()); } diff --git a/dScripts/02_server/Map/AG/NpcAgCourseStarter.cpp b/dScripts/02_server/Map/AG/NpcAgCourseStarter.cpp index 7f8f97ec..d2cc647e 100644 --- a/dScripts/02_server/Map/AG/NpcAgCourseStarter.cpp +++ b/dScripts/02_server/Map/AG/NpcAgCourseStarter.cpp @@ -13,7 +13,7 @@ void NpcAgCourseStarter::OnStartup(Entity* self) { } void NpcAgCourseStarter::OnUse(Entity* self, Entity* user) { - auto scriptedActivityComponent = self->GetComponent(); + auto* scriptedActivityComponent = self->GetComponent(); if (scriptedActivityComponent == nullptr) { return; @@ -27,7 +27,7 @@ void NpcAgCourseStarter::OnUse(Entity* self, Entity* user) { } void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) { - auto scriptedActivityComponent = self->GetComponent(); + auto* scriptedActivityComponent = self->GetComponent(); if (scriptedActivityComponent == nullptr) { return; @@ -70,7 +70,7 @@ void NpcAgCourseStarter::OnMessageBoxResponse(Entity* self, Entity* sender, int3 void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { - auto scriptedActivityComponent = self->GetComponent(); + auto* scriptedActivityComponent = self->GetComponent(); if (scriptedActivityComponent == nullptr) return; @@ -88,7 +88,7 @@ void NpcAgCourseStarter::OnFireEventServerSide(Entity* self, Entity* sender, std data->values[2] = *(float*)&finish; - auto missionComponent = sender->GetComponent(); + auto* missionComponent = sender->GetComponent(); if (missionComponent != nullptr) { missionComponent->ForceProgressTaskType(1884, 1, 1, false); missionComponent->Progress(eMissionTaskType::PERFORM_ACTIVITY, -finish, self->GetObjectID(), diff --git a/dScripts/02_server/Map/AG/NpcCowboyServer.cpp b/dScripts/02_server/Map/AG/NpcCowboyServer.cpp index ee42ffd3..6dd212a4 100644 --- a/dScripts/02_server/Map/AG/NpcCowboyServer.cpp +++ b/dScripts/02_server/Map/AG/NpcCowboyServer.cpp @@ -7,7 +7,7 @@ void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss return; } - auto inventoryComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); if (inventoryComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AG/NpcNjAssistantServer.cpp b/dScripts/02_server/Map/AG/NpcNjAssistantServer.cpp index a606c581..1a9fa8a6 100644 --- a/dScripts/02_server/Map/AG/NpcNjAssistantServer.cpp +++ b/dScripts/02_server/Map/AG/NpcNjAssistantServer.cpp @@ -12,7 +12,7 @@ void NpcNjAssistantServer::OnMissionDialogueOK(Entity* self, Entity* target, int if (missionState == eMissionState::COMPLETE || missionState == eMissionState::READY_TO_COMPLETE) { GameMessages::SendNotifyClientObject(self->GetObjectID(), u"switch", 0, 0, LWOOBJID_EMPTY, "", target->GetSystemAddress()); - auto inv = target->GetComponent(); + auto* inv = target->GetComponent(); // If we are ready to complete our missions, we take the kit from you: if (inv && missionState == eMissionState::READY_TO_COMPLETE) { @@ -23,7 +23,7 @@ void NpcNjAssistantServer::OnMissionDialogueOK(Entity* self, Entity* target, int } } } else if (missionState == eMissionState::AVAILABLE) { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); missionComponent->CompleteMission(mailAchievement, true); } } diff --git a/dScripts/02_server/Map/AG/NpcPirateServer.cpp b/dScripts/02_server/Map/AG/NpcPirateServer.cpp index 2bda80a2..cad0d64c 100644 --- a/dScripts/02_server/Map/AG/NpcPirateServer.cpp +++ b/dScripts/02_server/Map/AG/NpcPirateServer.cpp @@ -3,7 +3,7 @@ #include "InventoryComponent.h" void NpcPirateServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { - auto inventory = target->GetComponent(); + auto* inventory = target->GetComponent(); if (inventory != nullptr && missionID == 1881) { auto* luckyShovel = inventory->FindItemByLot(14591); diff --git a/dScripts/02_server/Map/AG/NpcWispServer.cpp b/dScripts/02_server/Map/AG/NpcWispServer.cpp index 2ab6f7a0..84196c8c 100644 --- a/dScripts/02_server/Map/AG/NpcWispServer.cpp +++ b/dScripts/02_server/Map/AG/NpcWispServer.cpp @@ -9,7 +9,7 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio if (missionID != 1849 && missionID != 1883) return; - auto inventory = target->GetComponent(); + auto* inventory = target->GetComponent(); if (inventory == nullptr) return; diff --git a/dScripts/02_server/Map/AG/RemoveRentalGear.cpp b/dScripts/02_server/Map/AG/RemoveRentalGear.cpp index 1ee305ec..86ae5f13 100644 --- a/dScripts/02_server/Map/AG/RemoveRentalGear.cpp +++ b/dScripts/02_server/Map/AG/RemoveRentalGear.cpp @@ -23,7 +23,7 @@ void RemoveRentalGear::OnMissionDialogueOK(Entity* self, Entity* target, int mis if (missionID != defaultMission && missionID != 313) return; if (missionState == eMissionState::COMPLETE || missionState == eMissionState::READY_TO_COMPLETE) { - auto inv = target->GetComponent(); + auto* inv = target->GetComponent(); if (!inv) return; //remove the inventory items diff --git a/dScripts/02_server/Map/AG_Spider_Queen/ZoneAgSpiderQueen.cpp b/dScripts/02_server/Map/AG_Spider_Queen/ZoneAgSpiderQueen.cpp index 29e068a7..2711b179 100644 --- a/dScripts/02_server/Map/AG_Spider_Queen/ZoneAgSpiderQueen.cpp +++ b/dScripts/02_server/Map/AG_Spider_Queen/ZoneAgSpiderQueen.cpp @@ -28,7 +28,7 @@ void ZoneAgSpiderQueen::BasePlayerLoaded(Entity* self, Entity* player) { ActivityManager::TakeActivityCost(self, player->GetObjectID()); // Make sure the player has full stats when they join - auto playerDestroyableComponent = player->GetComponent(); + auto* playerDestroyableComponent = player->GetComponent(); if (playerDestroyableComponent != nullptr) { playerDestroyableComponent->SetImagination(playerDestroyableComponent->GetMaxImagination()); playerDestroyableComponent->SetArmor(playerDestroyableComponent->GetMaxArmor()); diff --git a/dScripts/02_server/Map/AM/AmBlueX.cpp b/dScripts/02_server/Map/AM/AmBlueX.cpp index 4e9426ee..8e32694c 100644 --- a/dScripts/02_server/Map/AM/AmBlueX.cpp +++ b/dScripts/02_server/Map/AM/AmBlueX.cpp @@ -5,7 +5,7 @@ #include "Character.h" void AmBlueX::OnUse(Entity* self, Entity* user) { - auto skillComponent = user->GetComponent(); + auto* skillComponent = user->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(m_SwordSkill, m_SwordBehavior, self->GetObjectID()); } @@ -37,7 +37,7 @@ void AmBlueX::OnSkillEventFired(Entity* self, Entity* caster, const std::string& self->AddCallbackTimer(m_BombTime, [this, self, fxObjectID, playerID]() { auto* fxObject = EntityManager::Instance()->GetEntity(fxObjectID); auto* player = EntityManager::Instance()->GetEntity(playerID); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) return; diff --git a/dScripts/02_server/Map/AM/AmDrawBridge.cpp b/dScripts/02_server/Map/AM/AmDrawBridge.cpp index a1831562..3c4dcce6 100644 --- a/dScripts/02_server/Map/AM/AmDrawBridge.cpp +++ b/dScripts/02_server/Map/AM/AmDrawBridge.cpp @@ -60,7 +60,7 @@ void AmDrawBridge::OnTimerDone(Entity* self, std::string timerName) { self->SetNetworkVar(u"BridgeLeaving", false); - auto simplePhysicsComponent = bridge->GetComponent(); + auto* simplePhysicsComponent = bridge->GetComponent(); if (simplePhysicsComponent == nullptr) { return; @@ -87,7 +87,7 @@ void AmDrawBridge::OnNotifyObject(Entity* self, Entity* sender, const std::strin } void AmDrawBridge::MoveBridgeDown(Entity* self, Entity* bridge, bool down) { - auto simplePhysicsComponent = bridge->GetComponent(); + auto* simplePhysicsComponent = bridge->GetComponent(); if (simplePhysicsComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AM/AmDropshipComputer.cpp b/dScripts/02_server/Map/AM/AmDropshipComputer.cpp index d5c28eac..f23fa93f 100644 --- a/dScripts/02_server/Map/AM/AmDropshipComputer.cpp +++ b/dScripts/02_server/Map/AM/AmDropshipComputer.cpp @@ -10,14 +10,14 @@ void AmDropshipComputer::OnStartup(Entity* self) { } void AmDropshipComputer::OnUse(Entity* self, Entity* user) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent == nullptr || rebuildComponent->GetState() != eRebuildState::COMPLETED) { return; } - auto missionComponent = user->GetComponent(); - auto inventoryComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); + auto* inventoryComponent = user->GetComponent(); if (missionComponent == nullptr || inventoryComponent == nullptr) { return; @@ -70,7 +70,7 @@ void AmDropshipComputer::OnDie(Entity* self, Entity* killer) { } void AmDropshipComputer::OnTimerDone(Entity* self, std::string timerName) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AM/AmScrollReaderServer.cpp b/dScripts/02_server/Map/AM/AmScrollReaderServer.cpp index cb7aabd1..cb8a7dba 100644 --- a/dScripts/02_server/Map/AM/AmScrollReaderServer.cpp +++ b/dScripts/02_server/Map/AM/AmScrollReaderServer.cpp @@ -3,7 +3,7 @@ void AmScrollReaderServer::OnMessageBoxResponse(Entity* self, Entity* sender, int32_t button, const std::u16string& identifier, const std::u16string& userData) { if (identifier == u"story_end") { - auto missionComponent = sender->GetComponent(); + auto* missionComponent = sender->GetComponent(); if (missionComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AM/AmShieldGenerator.cpp b/dScripts/02_server/Map/AM/AmShieldGenerator.cpp index 97715954..5d1b7d08 100644 --- a/dScripts/02_server/Map/AM/AmShieldGenerator.cpp +++ b/dScripts/02_server/Map/AM/AmShieldGenerator.cpp @@ -15,7 +15,7 @@ void AmShieldGenerator::OnStartup(Entity* self) { } void AmShieldGenerator::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - auto destroyableComponent = entering->GetComponent(); + auto* destroyableComponent = entering->GetComponent(); if (status == "ENTER" && name == "shield") { if (destroyableComponent->HasFaction(4)) { @@ -102,7 +102,7 @@ void AmShieldGenerator::StartShield(Entity* self) { } void AmShieldGenerator::BuffPlayers(Entity* self) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) { return; @@ -122,8 +122,8 @@ void AmShieldGenerator::BuffPlayers(Entity* self) { } void AmShieldGenerator::EnemyEnteredShield(Entity* self, Entity* intruder) { - auto baseCombatAIComponent = intruder->GetComponent(); - auto movementAIComponent = intruder->GetComponent(); + auto* baseCombatAIComponent = intruder->GetComponent(); + auto* movementAIComponent = intruder->GetComponent(); if (baseCombatAIComponent == nullptr || movementAIComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AM/AmShieldGeneratorQuickbuild.cpp b/dScripts/02_server/Map/AM/AmShieldGeneratorQuickbuild.cpp index 09c5e18e..381c13bc 100644 --- a/dScripts/02_server/Map/AM/AmShieldGeneratorQuickbuild.cpp +++ b/dScripts/02_server/Map/AM/AmShieldGeneratorQuickbuild.cpp @@ -15,7 +15,7 @@ void AmShieldGeneratorQuickbuild::OnStartup(Entity* self) { } void AmShieldGeneratorQuickbuild::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - auto destroyableComponent = entering->GetComponent(); + auto* destroyableComponent = entering->GetComponent(); if (name == "shield") { if (!destroyableComponent->HasFaction(4) || entering->IsPlayer()) { @@ -122,7 +122,7 @@ void AmShieldGeneratorQuickbuild::OnRebuildComplete(Entity* self, Entity* target continue; } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) { return; @@ -154,7 +154,7 @@ void AmShieldGeneratorQuickbuild::StartShield(Entity* self) { } void AmShieldGeneratorQuickbuild::BuffPlayers(Entity* self) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) { return; @@ -174,14 +174,14 @@ void AmShieldGeneratorQuickbuild::BuffPlayers(Entity* self) { } void AmShieldGeneratorQuickbuild::EnemyEnteredShield(Entity* self, Entity* intruder) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent == nullptr || rebuildComponent->GetState() != eRebuildState::COMPLETED) { return; } - auto baseCombatAIComponent = intruder->GetComponent(); - auto movementAIComponent = intruder->GetComponent(); + auto* baseCombatAIComponent = intruder->GetComponent(); + auto* movementAIComponent = intruder->GetComponent(); if (baseCombatAIComponent == nullptr || movementAIComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AM/AmSkullkinDrill.cpp b/dScripts/02_server/Map/AM/AmSkullkinDrill.cpp index 7ad75862..e35c700d 100644 --- a/dScripts/02_server/Map/AM/AmSkullkinDrill.cpp +++ b/dScripts/02_server/Map/AM/AmSkullkinDrill.cpp @@ -14,7 +14,7 @@ void AmSkullkinDrill::OnStartup(Entity* self) { GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"spin", "active"); - auto movingPlatformComponent = self->GetComponent(); + auto* movingPlatformComponent = self->GetComponent(); if (movingPlatformComponent == nullptr) { return; @@ -58,7 +58,7 @@ void AmSkullkinDrill::OnSkillEventFired(Entity* self, Entity* caster, const std: return; } - auto proximityMonitorComponent = self->GetComponent(); + auto* proximityMonitorComponent = self->GetComponent(); if (proximityMonitorComponent == nullptr || !proximityMonitorComponent->IsInProximity("spin_distance", caster->GetObjectID())) { return; @@ -82,7 +82,7 @@ void AmSkullkinDrill::TriggerDrill(Entity* self) { standObj->SetVar(u"bActive", false); } - auto movingPlatformComponent = self->GetComponent(); + auto* movingPlatformComponent = self->GetComponent(); if (movingPlatformComponent == nullptr) { return; @@ -223,7 +223,7 @@ void AmSkullkinDrill::PlayAnim(Entity* self, Entity* player, const std::string& } void AmSkullkinDrill::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t damage) { - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent == nullptr || !attacker->IsPlayer()) { return; @@ -239,7 +239,7 @@ void AmSkullkinDrill::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t // TODO: Missions if (activator != nullptr) { - auto missionComponent = activator->GetComponent(); + auto* missionComponent = activator->GetComponent(); if (missionComponent != nullptr) { for (const auto missionID : m_MissionsToUpdate) { @@ -279,7 +279,7 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) { standObj->SetVar(u"bActive", true); } - auto movingPlatformComponent = self->GetComponent(); + auto* movingPlatformComponent = self->GetComponent(); if (movingPlatformComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/AM/AmSkullkinTower.cpp b/dScripts/02_server/Map/AM/AmSkullkinTower.cpp index da76c10b..f7825f8f 100644 --- a/dScripts/02_server/Map/AM/AmSkullkinTower.cpp +++ b/dScripts/02_server/Map/AM/AmSkullkinTower.cpp @@ -12,7 +12,7 @@ void AmSkullkinTower::OnStartup(Entity* self) { // onPhysicsComponentReady - auto movingPlatformComponent = self->GetComponent(); + auto* movingPlatformComponent = self->GetComponent(); if (movingPlatformComponent != nullptr) { movingPlatformComponent->StopPathing(); @@ -82,7 +82,7 @@ void AmSkullkinTower::OnChildLoaded(Entity* self, Entity* child) { child->AddDieCallback([this, selfID, child]() { auto* self = EntityManager::Instance()->GetEntity(selfID); - auto destroyableComponent = child->GetComponent(); + auto* destroyableComponent = child->GetComponent(); if (destroyableComponent == nullptr || self == nullptr) { return; @@ -163,7 +163,7 @@ void AmSkullkinTower::OnChildRemoved(Entity* self, Entity* child) { continue; } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) { continue; diff --git a/dScripts/02_server/Map/AM/AmTeapotServer.cpp b/dScripts/02_server/Map/AM/AmTeapotServer.cpp index 68c7fda3..93f05326 100644 --- a/dScripts/02_server/Map/AM/AmTeapotServer.cpp +++ b/dScripts/02_server/Map/AM/AmTeapotServer.cpp @@ -5,7 +5,7 @@ #include "eTerminateType.h" void AmTeapotServer::OnUse(Entity* self, Entity* user) { - auto inventoryComponent = user->GetComponent(); + auto* inventoryComponent = user->GetComponent(); if (!inventoryComponent) return; auto* blueFlowerItem = inventoryComponent->FindItemByLot(BLUE_FLOWER_LEAVES, eInventoryType::ITEMS); diff --git a/dScripts/02_server/Map/AM/AmTemplateSkillVolume.cpp b/dScripts/02_server/Map/AM/AmTemplateSkillVolume.cpp index 38046407..3acc9063 100644 --- a/dScripts/02_server/Map/AM/AmTemplateSkillVolume.cpp +++ b/dScripts/02_server/Map/AM/AmTemplateSkillVolume.cpp @@ -6,7 +6,7 @@ void AmTemplateSkillVolume::OnSkillEventFired(Entity* self, Entity* caster, cons return; } - auto missionComponent = caster->GetComponent(); + auto* missionComponent = caster->GetComponent(); const auto missionIDsVariable = GeneralUtils::UTF16ToWTF8(self->GetVar(u"missions")); const auto missionIDs = GeneralUtils::SplitString(missionIDsVariable, '_'); diff --git a/dScripts/02_server/Map/FV/EnemyRoninSpawner.cpp b/dScripts/02_server/Map/FV/EnemyRoninSpawner.cpp index e33fa417..cfc58fa0 100644 --- a/dScripts/02_server/Map/FV/EnemyRoninSpawner.cpp +++ b/dScripts/02_server/Map/FV/EnemyRoninSpawner.cpp @@ -10,7 +10,7 @@ void EnemyRoninSpawner::OnStartup(Entity* self) { void EnemyRoninSpawner::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "hatchTime") { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->PlayEffect(644, u"create", "BurstFX1"); @@ -42,7 +42,7 @@ void EnemyRoninSpawner::OnProximityUpdate(Entity* self, Entity* entering, std::s if (entering->IsPlayer() && name == "ronin" && status == "ENTER" && !self->GetVar(u"hatching")) { StartHatching(self); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(305, 3568, LWOOBJID_EMPTY); @@ -59,7 +59,7 @@ void EnemyRoninSpawner::OnHit(Entity* self, Entity* attacker) { void EnemyRoninSpawner::StartHatching(Entity* self) { self->SetVar(u"hatching", true); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->PlayEffect(2260, u"rebuild_medium", "WakeUpFX1"); diff --git a/dScripts/02_server/Map/FV/FvCandle.cpp b/dScripts/02_server/Map/FV/FvCandle.cpp index 30365fce..a75b7f7d 100644 --- a/dScripts/02_server/Map/FV/FvCandle.cpp +++ b/dScripts/02_server/Map/FV/FvCandle.cpp @@ -6,7 +6,7 @@ std::vector FvCandle::m_Missions = { 850, 1431, 1529, 1566, 1603 }; void FvCandle::OnStartup(Entity* self) { - auto render = self->GetComponent(); + auto* render = self->GetComponent(); if (render == nullptr) return; @@ -23,11 +23,11 @@ void FvCandle::BlowOutCandle(Entity* self, Entity* blower) { if (self->GetBoolean(u"AmHit")) return; - auto render = self->GetComponent(); + auto* render = self->GetComponent(); if (render == nullptr) return; - auto missionComponent = blower->GetComponent(); + auto* missionComponent = blower->GetComponent(); if (missionComponent != nullptr) { for (const auto mission : m_Missions) { @@ -47,7 +47,7 @@ void FvCandle::BlowOutCandle(Entity* self, Entity* blower) { void FvCandle::OnTimerDone(Entity* self, std::string timerName) { self->SetBoolean(u"AmHit", false); - auto render = self->GetComponent(); + auto* render = self->GetComponent(); if (render == nullptr) return; diff --git a/dScripts/02_server/Map/FV/FvHorsemenTrigger.cpp b/dScripts/02_server/Map/FV/FvHorsemenTrigger.cpp index cb86d92b..e87d9629 100644 --- a/dScripts/02_server/Map/FV/FvHorsemenTrigger.cpp +++ b/dScripts/02_server/Map/FV/FvHorsemenTrigger.cpp @@ -39,7 +39,7 @@ FvHorsemenTrigger::OnFireEventServerSide(Entity* self, Entity* sender, std::stri continue; } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) { continue; diff --git a/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp b/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp index d23ac6ce..7d86cc73 100644 --- a/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp +++ b/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp @@ -19,7 +19,7 @@ void ImgBrickConsoleQB::OnStartup(Entity* self) { } void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent->GetState() == eRebuildState::COMPLETED) { if (!self->GetNetworkVar(u"used")) { @@ -28,7 +28,7 @@ void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) { auto bothBuilt = false; for (auto* console : consoles) { - auto consoleRebuildComponent = console->GetComponent(); + auto* consoleRebuildComponent = console->GetComponent(); if (consoleRebuildComponent->GetState() != eRebuildState::COMPLETED) { continue; @@ -69,8 +69,8 @@ void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) { auto* player = user; - auto missionComponent = player->GetComponent(); - auto inventoryComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (missionComponent != nullptr && inventoryComponent != nullptr) { if (missionComponent->GetMissionState(1302) == eMissionState::ACTIVE) { @@ -145,7 +145,7 @@ void ImgBrickConsoleQB::OnRebuildComplete(Entity* self, Entity* target) { const auto consoles = EntityManager::Instance()->GetEntitiesInGroup("Console"); for (auto* console : consoles) { - auto consoleRebuildComponent = console->GetComponent(); + auto* consoleRebuildComponent = console->GetComponent(); if (consoleRebuildComponent->GetState() != eRebuildState::COMPLETED) { continue; @@ -166,7 +166,7 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) { self->SetVar(u"Died", true); - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent->GetState() == eRebuildState::COMPLETED) { auto offFX = 0; @@ -227,7 +227,7 @@ void ImgBrickConsoleQB::OnDie(Entity* self, Entity* killer) { void ImgBrickConsoleQB::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "reset") { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent->GetState() == eRebuildState::OPEN) { self->Smash(self->GetObjectID(), eKillType::SILENT); diff --git a/dScripts/02_server/Map/FV/Racing/RaceMaelstromGeiser.cpp b/dScripts/02_server/Map/FV/Racing/RaceMaelstromGeiser.cpp index 6ec3d0b9..155be92b 100644 --- a/dScripts/02_server/Map/FV/Racing/RaceMaelstromGeiser.cpp +++ b/dScripts/02_server/Map/FV/Racing/RaceMaelstromGeiser.cpp @@ -23,7 +23,7 @@ void RaceMaelstromGeiser::OnProximityUpdate(Entity* self, Entity* entering, std: return; } - auto possessableComponent = entering->GetComponent(); + auto* possessableComponent = entering->GetComponent(); Entity* vehicle; Entity* player; @@ -37,7 +37,7 @@ void RaceMaelstromGeiser::OnProximityUpdate(Entity* self, Entity* entering, std: vehicle = entering; } else if (entering->IsPlayer()) { - auto possessorComponent = entering->GetComponent(); + auto* possessorComponent = entering->GetComponent(); if (possessorComponent == nullptr) { return; @@ -59,7 +59,7 @@ void RaceMaelstromGeiser::OnProximityUpdate(Entity* self, Entity* entering, std: auto* zoneController = dZoneManager::Instance()->GetZoneControlObject(); - auto racingControlComponent = zoneController->GetComponent(); + auto* racingControlComponent = zoneController->GetComponent(); if (racingControlComponent != nullptr) { racingControlComponent->OnRequestDie(player); diff --git a/dScripts/02_server/Map/GF/GfCaptainsCannon.cpp b/dScripts/02_server/Map/GF/GfCaptainsCannon.cpp index 2a0a49d5..c366d0fb 100644 --- a/dScripts/02_server/Map/GF/GfCaptainsCannon.cpp +++ b/dScripts/02_server/Map/GF/GfCaptainsCannon.cpp @@ -75,7 +75,7 @@ void GfCaptainsCannon::OnTimerDone(Entity* self, std::string timerName) { GameMessages::SendStopFXEffect(player, true, "hook"); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->ForceProgress(601, 910, 1); diff --git a/dScripts/02_server/Map/GF/GfTikiTorch.cpp b/dScripts/02_server/Map/GF/GfTikiTorch.cpp index bfeec36b..fbf5f3b4 100644 --- a/dScripts/02_server/Map/GF/GfTikiTorch.cpp +++ b/dScripts/02_server/Map/GF/GfTikiTorch.cpp @@ -45,7 +45,7 @@ void GfTikiTorch::OnTimerDone(Entity* self, std::string timerName) { } void GfTikiTorch::LightTorch(Entity* self) { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent == nullptr) return; @@ -59,14 +59,14 @@ void GfTikiTorch::OnSkillEventFired(Entity* self, Entity* caster, const std::str if (self->GetBoolean(u"isBurning") && message == "waterspray") { RenderComponent::PlayAnimation(self, u"water"); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("tikitorch"); renderComponent->PlayEffect(611, u"water", "water"); renderComponent->PlayEffect(611, u"steam", "steam"); } - auto casterMissionComponent = caster->GetComponent(); + auto* casterMissionComponent = caster->GetComponent(); if (casterMissionComponent != nullptr) { for (const auto missionID : m_missions) { casterMissionComponent->ForceProgressTaskType(missionID, static_cast(eMissionTaskType::SCRIPT), 1); diff --git a/dScripts/02_server/Map/GF/MastTeleport.cpp b/dScripts/02_server/Map/GF/MastTeleport.cpp index b2929c14..311da34a 100644 --- a/dScripts/02_server/Map/GF/MastTeleport.cpp +++ b/dScripts/02_server/Map/GF/MastTeleport.cpp @@ -23,7 +23,7 @@ void MastTeleport::OnRebuildComplete(Entity* self, Entity* target) { GameMessages::SendSetStunned(target->GetObjectID(), eStateChangeType::PUSH, target->GetSystemAddress(), LWOOBJID_EMPTY, true, true, true, true, true, true, true ); - auto destroyableComponent = target->GetComponent(); + auto* destroyableComponent = target->GetComponent(); if (destroyableComponent) destroyableComponent->SetStatusImmunity(eStateChangeType::PUSH, true, true, true, true, true, false, false, true, true); self->AddTimer("Start", 3); @@ -94,7 +94,7 @@ void MastTeleport::OnTimerDone(Entity* self, std::string timerName) { GameMessages::SendSetStunned(playerId, eStateChangeType::POP, player->GetSystemAddress(), LWOOBJID_EMPTY, true, true, true, true, true, true, true ); - auto destroyableComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); if (destroyableComponent) destroyableComponent->SetStatusImmunity(eStateChangeType::POP, true, true, true, true, true, false, false, true, true); EntityManager::Instance()->SerializeEntity(player); } diff --git a/dScripts/02_server/Map/General/ExplodingAsset.cpp b/dScripts/02_server/Map/General/ExplodingAsset.cpp index f0f35eed..ee8f8e68 100644 --- a/dScripts/02_server/Map/General/ExplodingAsset.cpp +++ b/dScripts/02_server/Map/General/ExplodingAsset.cpp @@ -24,7 +24,7 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) { if (en->GetObjectID() == attacker->GetObjectID()) { if (Vector3::DistanceSquared(en->GetPosition(), self->GetPosition()) > 10 * 10) continue; - auto destroyable = en->GetComponent(); + auto* destroyable = en->GetComponent(); if (destroyable == nullptr) { continue; } @@ -40,7 +40,7 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) { GameMessages::SendPlayEmbeddedEffectOnAllClientsNearObject(self, u"camshake", self->GetObjectID(), 16); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(147, 4721, LWOOBJID_EMPTY, true); } @@ -49,7 +49,7 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) { auto achievementIDs = self->GetVar(u"achieveID"); // Progress all scripted missions related to this asset - auto missionComponent = attacker->GetComponent(); + auto* missionComponent = attacker->GetComponent(); if (missionComponent != nullptr) { if (missionID != 0) { missionComponent->ForceProgressValue(missionID, @@ -70,7 +70,7 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) { } void ExplodingAsset::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - auto destuctableComponent = entering->GetComponent(); + auto* destuctableComponent = entering->GetComponent(); if (destuctableComponent == nullptr) return; diff --git a/dScripts/02_server/Map/General/ForceVolumeServer.cpp b/dScripts/02_server/Map/General/ForceVolumeServer.cpp index 693e0cdc..ed9024c1 100644 --- a/dScripts/02_server/Map/General/ForceVolumeServer.cpp +++ b/dScripts/02_server/Map/General/ForceVolumeServer.cpp @@ -4,7 +4,7 @@ #include "ePhysicsEffectType.h" void ForceVolumeServer::OnStartup(Entity* self) { - auto phantomPhysicsComponent = self->GetComponent(); + auto* phantomPhysicsComponent = self->GetComponent(); if (phantomPhysicsComponent == nullptr) return; diff --git a/dScripts/02_server/Map/General/GrowingFlower.cpp b/dScripts/02_server/Map/General/GrowingFlower.cpp index 53da85ff..ad88528f 100644 --- a/dScripts/02_server/Map/General/GrowingFlower.cpp +++ b/dScripts/02_server/Map/General/GrowingFlower.cpp @@ -15,7 +15,7 @@ void GrowingFlower::OnSkillEventFired(Entity* self, Entity* target, const std::s LootGenerator::Instance().DropActivityLoot(target, self, self->GetLOT(), 0); - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent != nullptr) { for (const auto mission : achievementIDs) missionComponent->ForceProgressTaskType(mission, static_cast(eMissionTaskType::SCRIPT), 1); diff --git a/dScripts/02_server/Map/General/ImaginationBackpackHealServer.cpp b/dScripts/02_server/Map/General/ImaginationBackpackHealServer.cpp index fc3a885e..8b3da9fa 100644 --- a/dScripts/02_server/Map/General/ImaginationBackpackHealServer.cpp +++ b/dScripts/02_server/Map/General/ImaginationBackpackHealServer.cpp @@ -12,7 +12,7 @@ void ImaginationBackpackHealServer::OnSkillEventFired(Entity* self, Entity* cast if (healMission == 0) return; - auto missionComponent = caster->GetComponent(); + auto* missionComponent = caster->GetComponent(); if (missionComponent != nullptr && missionComponent->GetMissionState(healMission) == eMissionState::ACTIVE) { missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); GameMessages::SendNotifyClientObject(self->GetObjectID(), u"ClearMaelstrom", 0, 0, diff --git a/dScripts/02_server/Map/General/Ninjago/NjRailActivatorsServer.cpp b/dScripts/02_server/Map/General/Ninjago/NjRailActivatorsServer.cpp index a38f15ac..5ca726af 100644 --- a/dScripts/02_server/Map/General/Ninjago/NjRailActivatorsServer.cpp +++ b/dScripts/02_server/Map/General/Ninjago/NjRailActivatorsServer.cpp @@ -4,7 +4,7 @@ void NjRailActivatorsServer::OnUse(Entity* self, Entity* user) { const auto flag = self->GetVar(u"RailFlagNum"); - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); // Only allow use if this is not a quick build or the quick build is built if (rebuildComponent == nullptr || rebuildComponent->GetState() == eRebuildState::COMPLETED) { diff --git a/dScripts/02_server/Map/General/Ninjago/NjRailPostServer.cpp b/dScripts/02_server/Map/General/Ninjago/NjRailPostServer.cpp index 85d7b3f0..2c435705 100644 --- a/dScripts/02_server/Map/General/Ninjago/NjRailPostServer.cpp +++ b/dScripts/02_server/Map/General/Ninjago/NjRailPostServer.cpp @@ -3,7 +3,7 @@ #include "EntityManager.h" void NjRailPostServer::OnStartup(Entity* self) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent != nullptr) { self->SetNetworkVar(NetworkNotActiveVariable, true); } diff --git a/dScripts/02_server/Map/General/PetDigServer.cpp b/dScripts/02_server/Map/General/PetDigServer.cpp index 6d55f373..8c819a8d 100644 --- a/dScripts/02_server/Map/General/PetDigServer.cpp +++ b/dScripts/02_server/Map/General/PetDigServer.cpp @@ -125,7 +125,7 @@ void PetDigServer::HandleXBuildDig(const Entity* self, Entity* owner, Entity* pe // If the player doesn't have the flag yet if (playerFlag != 0 && !player->GetPlayerFlag(playerFlag)) { - auto petComponent = pet->GetComponent(); + auto* petComponent = pet->GetComponent(); if (petComponent != nullptr) { // TODO: Pet state = 9 ?? } @@ -159,7 +159,7 @@ void PetDigServer::HandleBouncerDig(const Entity* self, const Entity* owner) { * \param owner the owner that just made a pet dig something up */ void PetDigServer::ProgressPetDigMissions(const Entity* owner, const Entity* chest) { - auto missionComponent = owner->GetComponent(); + auto* missionComponent = owner->GetComponent(); if (missionComponent != nullptr) { // Can You Dig It progress @@ -193,7 +193,7 @@ void PetDigServer::ProgressPetDigMissions(const Entity* owner, const Entity* che void PetDigServer::SpawnPet(Entity* self, const Entity* owner, const DigInfo digInfo) { // Some treasures require a mission to be active if (digInfo.requiredMission >= 0) { - auto missionComponent = owner->GetComponent(); + auto* missionComponent = owner->GetComponent(); if (missionComponent != nullptr && missionComponent->GetMissionState(digInfo.requiredMission) < eMissionState::ACTIVE) { return; } diff --git a/dScripts/02_server/Map/General/PropertyDevice.cpp b/dScripts/02_server/Map/General/PropertyDevice.cpp index b0bd3fc2..0ad9f5c9 100644 --- a/dScripts/02_server/Map/General/PropertyDevice.cpp +++ b/dScripts/02_server/Map/General/PropertyDevice.cpp @@ -16,7 +16,7 @@ void PropertyDevice::OnRebuildComplete(Entity* self, Entity* target) { if (propertyOwnerID == std::to_string(LWOOBJID_EMPTY)) return; - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent != nullptr) { if (missionComponent->GetMissionState(m_PropertyMissionID) == eMissionState::ACTIVE) { GameMessages::SendPlayFXEffect(self->GetObjectID(), 641, u"create", "callhome"); diff --git a/dScripts/02_server/Map/General/PropertyPlatform.cpp b/dScripts/02_server/Map/General/PropertyPlatform.cpp index a26d7473..7016db94 100644 --- a/dScripts/02_server/Map/General/PropertyPlatform.cpp +++ b/dScripts/02_server/Map/General/PropertyPlatform.cpp @@ -4,7 +4,7 @@ #include "MovingPlatformComponent.h" void PropertyPlatform::OnRebuildComplete(Entity* self, Entity* target) { - // auto movingPlatform = self->GetComponent(); + // auto* movingPlatform = self->GetComponent(); // if (movingPlatform != nullptr) { // movingPlatform->StopPathing(); // movingPlatform->SetNoAutoStart(true); @@ -14,9 +14,9 @@ void PropertyPlatform::OnRebuildComplete(Entity* self, Entity* target) { } void PropertyPlatform::OnUse(Entity* self, Entity* user) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent != nullptr && rebuildComponent->GetState() == eRebuildState::COMPLETED) { - // auto movingPlatform = self->GetComponent(); + // auto* movingPlatform = self->GetComponent(); // if (movingPlatform != nullptr) { // movingPlatform->GotoWaypoint(1); // } diff --git a/dScripts/02_server/Map/General/QbEnemyStunner.cpp b/dScripts/02_server/Map/General/QbEnemyStunner.cpp index dc7742f3..a835ebc2 100644 --- a/dScripts/02_server/Map/General/QbEnemyStunner.cpp +++ b/dScripts/02_server/Map/General/QbEnemyStunner.cpp @@ -7,13 +7,13 @@ #include "CDSkillBehaviorTable.h" void QbEnemyStunner::OnRebuildComplete(Entity* self, Entity* target) { - auto destroyable = self->GetComponent(); + auto* destroyable = self->GetComponent(); if (destroyable != nullptr) { destroyable->SetFaction(115); } - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (!skillComponent) return; // Get the skill IDs of this object. @@ -51,7 +51,7 @@ void QbEnemyStunner::OnTimerDone(Entity* self, std::string timerName) { self->AddTimer("DieTime", 5.0f); } else if (timerName == "TickTime") { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { auto skillBehaviorMap = self->GetVar>(u"skillBehaviorMap"); diff --git a/dScripts/02_server/Map/General/QbSpawner.cpp b/dScripts/02_server/Map/General/QbSpawner.cpp index 7825e310..d5c9d001 100644 --- a/dScripts/02_server/Map/General/QbSpawner.cpp +++ b/dScripts/02_server/Map/General/QbSpawner.cpp @@ -115,14 +115,14 @@ void QbSpawner::OnChildRemoved(Entity* self, Entity* child) { } void QbSpawner::AggroTargetObject(Entity* self, Entity* enemy) { - auto baseCombatAIComponent = enemy->GetComponent(); + auto* baseCombatAIComponent = enemy->GetComponent(); if (!baseCombatAIComponent) return; auto gateObjID = self->GetVar(u"gateObj"); if (gateObjID) { auto* gate = EntityManager::Instance()->GetEntity(gateObjID); if (gate) { - auto movementAIComponent = enemy->GetComponent(); + auto* movementAIComponent = enemy->GetComponent(); if (movementAIComponent) movementAIComponent->SetDestination(gate->GetPosition()); baseCombatAIComponent->Taunt(gateObjID, 1000); } diff --git a/dScripts/02_server/Map/General/TokenConsoleServer.cpp b/dScripts/02_server/Map/General/TokenConsoleServer.cpp index 3ccd6899..df4f3e07 100644 --- a/dScripts/02_server/Map/General/TokenConsoleServer.cpp +++ b/dScripts/02_server/Map/General/TokenConsoleServer.cpp @@ -9,7 +9,7 @@ //2021-05-03 - max - added script, omitted some parts related to inheritance in lua which we don't need void TokenConsoleServer::OnUse(Entity* self, Entity* user) { - auto inv = user->GetComponent(); + auto* inv = user->GetComponent(); //make sure the user has the required amount of infected bricks if (inv && inv->GetLotCount(6194) >= bricksToTake) { diff --git a/dScripts/02_server/Map/General/TouchMissionUpdateServer.cpp b/dScripts/02_server/Map/General/TouchMissionUpdateServer.cpp index 0e6780b9..043ca1a7 100644 --- a/dScripts/02_server/Map/General/TouchMissionUpdateServer.cpp +++ b/dScripts/02_server/Map/General/TouchMissionUpdateServer.cpp @@ -17,7 +17,7 @@ void TouchMissionUpdateServer::OnCollisionPhantom(Entity* self, Entity* target) return; } - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/General/WishingWellServer.cpp b/dScripts/02_server/Map/General/WishingWellServer.cpp index 7704a3f3..58ce1c72 100644 --- a/dScripts/02_server/Map/General/WishingWellServer.cpp +++ b/dScripts/02_server/Map/General/WishingWellServer.cpp @@ -9,7 +9,7 @@ void WishingWellServer::OnStartup(Entity* self) { } void WishingWellServer::OnUse(Entity* self, Entity* user) { - auto scriptedActivity = self->GetComponent(); + auto* scriptedActivity = self->GetComponent(); if (!scriptedActivity->TakeCost(user)) { return; diff --git a/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp b/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp index 269e9d6a..326842d2 100644 --- a/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp +++ b/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp @@ -12,7 +12,7 @@ void NsTokenConsoleServer::OnStartup(Entity* self) { } void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent == nullptr) { return; @@ -22,8 +22,8 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) { return; } - auto inventoryComponent = user->GetComponent(); - auto missionComponent = user->GetComponent(); + auto* inventoryComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); auto* character = user->GetCharacter(); if (inventoryComponent == nullptr || missionComponent == nullptr || character == nullptr) { diff --git a/dScripts/02_server/Map/NT/NtAssemblyTubeServer.cpp b/dScripts/02_server/Map/NT/NtAssemblyTubeServer.cpp index 9b7e1248..99bc0de5 100644 --- a/dScripts/02_server/Map/NT/NtAssemblyTubeServer.cpp +++ b/dScripts/02_server/Map/NT/NtAssemblyTubeServer.cpp @@ -24,7 +24,7 @@ void NtAssemblyTubeServer::OnProximityUpdate(Entity* self, Entity* entering, std RunAssemblyTube(self, player); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); diff --git a/dScripts/02_server/Map/NT/NtCombatChallengeExplodingDummy.cpp b/dScripts/02_server/Map/NT/NtCombatChallengeExplodingDummy.cpp index c117c63a..83c24510 100644 --- a/dScripts/02_server/Map/NT/NtCombatChallengeExplodingDummy.cpp +++ b/dScripts/02_server/Map/NT/NtCombatChallengeExplodingDummy.cpp @@ -24,7 +24,7 @@ void NtCombatChallengeExplodingDummy::OnHitOrHealResult(Entity* self, Entity* at script->OnHitOrHealResult(challengeObject, attacker, damage); } } - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(1338, 30875, attacker->GetObjectID()); } diff --git a/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp b/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp index 74df89b7..ff98d741 100644 --- a/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp +++ b/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp @@ -48,7 +48,7 @@ void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender, self->SetVar(u"playerID", sender->GetObjectID()); - auto inventoryComponent = sender->GetComponent(); + auto* inventoryComponent = sender->GetComponent(); if (inventoryComponent != nullptr) { inventoryComponent->RemoveItem(3039, 1); @@ -133,7 +133,7 @@ void NtCombatChallengeServer::ResetGame(Entity* self) { auto* player = EntityManager::Instance()->GetEntity(playerID); if (player != nullptr) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { for (const auto& mission : tMissions) { diff --git a/dScripts/02_server/Map/NT/NtDarkitectRevealServer.cpp b/dScripts/02_server/Map/NT/NtDarkitectRevealServer.cpp index b207ae56..80ceb91e 100644 --- a/dScripts/02_server/Map/NT/NtDarkitectRevealServer.cpp +++ b/dScripts/02_server/Map/NT/NtDarkitectRevealServer.cpp @@ -6,7 +6,7 @@ void NtDarkitectRevealServer::OnUse(Entity* self, Entity* user) { Darkitect Baron; Baron.Reveal(self, user); - auto missionComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); if (missionComponent != nullptr) { missionComponent->ForceProgressTaskType(1344, 1, 14293); diff --git a/dScripts/02_server/Map/NT/NtDirtCloudServer.cpp b/dScripts/02_server/Map/NT/NtDirtCloudServer.cpp index 80935943..92175dea 100644 --- a/dScripts/02_server/Map/NT/NtDirtCloudServer.cpp +++ b/dScripts/02_server/Map/NT/NtDirtCloudServer.cpp @@ -30,7 +30,7 @@ void NtDirtCloudServer::OnSkillEventFired(Entity* self, Entity* caster, const st const auto& myMis = m_Missions[mySpawner]; - auto missionComponent = caster->GetComponent(); + auto* missionComponent = caster->GetComponent(); if (missionComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/NT/NtDukeServer.cpp b/dScripts/02_server/Map/NT/NtDukeServer.cpp index 352fe4e1..07d17e96 100644 --- a/dScripts/02_server/Map/NT/NtDukeServer.cpp +++ b/dScripts/02_server/Map/NT/NtDukeServer.cpp @@ -24,8 +24,8 @@ void NtDukeServer::SetVariables(Entity* self) { void NtDukeServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { // Handles adding and removing the sword for the Crux Prime Sword mission - auto missionComponent = target->GetComponent(); - auto inventoryComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); if (missionComponent != nullptr && inventoryComponent != nullptr) { auto state = missionComponent->GetMissionState(m_SwordMissionID); diff --git a/dScripts/02_server/Map/NT/NtImagBeamBuffer.cpp b/dScripts/02_server/Map/NT/NtImagBeamBuffer.cpp index 7ed610d5..d98a7403 100644 --- a/dScripts/02_server/Map/NT/NtImagBeamBuffer.cpp +++ b/dScripts/02_server/Map/NT/NtImagBeamBuffer.cpp @@ -33,7 +33,7 @@ void NtImagBeamBuffer::OnTimerDone(Entity* self, std::string timerName) { return; } - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/NT/NtParadoxPanelServer.cpp b/dScripts/02_server/Map/NT/NtParadoxPanelServer.cpp index 03126947..dcae84d2 100644 --- a/dScripts/02_server/Map/NT/NtParadoxPanelServer.cpp +++ b/dScripts/02_server/Map/NT/NtParadoxPanelServer.cpp @@ -15,7 +15,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) { self->SetVar(u"bActive", true); - auto missionComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); const auto playerID = user->GetObjectID(); diff --git a/dScripts/02_server/Map/NT/NtParadoxTeleServer.cpp b/dScripts/02_server/Map/NT/NtParadoxTeleServer.cpp index 3c07091c..687a3477 100644 --- a/dScripts/02_server/Map/NT/NtParadoxTeleServer.cpp +++ b/dScripts/02_server/Map/NT/NtParadoxTeleServer.cpp @@ -43,7 +43,7 @@ void NtParadoxTeleServer::OnProximityUpdate(Entity* self, Entity* entering, std: }); } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); diff --git a/dScripts/02_server/Map/NT/NtSentinelWalkwayServer.cpp b/dScripts/02_server/Map/NT/NtSentinelWalkwayServer.cpp index ce3249bd..257bf6da 100644 --- a/dScripts/02_server/Map/NT/NtSentinelWalkwayServer.cpp +++ b/dScripts/02_server/Map/NT/NtSentinelWalkwayServer.cpp @@ -6,7 +6,7 @@ #include "ePhysicsEffectType.h" void NtSentinelWalkwayServer::OnStartup(Entity* self) { - auto phantomPhysicsComponent = self->GetComponent(); + auto* phantomPhysicsComponent = self->GetComponent(); if (phantomPhysicsComponent == nullptr) { return; @@ -37,7 +37,7 @@ void NtSentinelWalkwayServer::OnProximityUpdate(Entity* self, Entity* entering, auto* player = entering; - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); diff --git a/dScripts/02_server/Map/NT/NtSleepingGuard.cpp b/dScripts/02_server/Map/NT/NtSleepingGuard.cpp index b05903fc..92a80582 100644 --- a/dScripts/02_server/Map/NT/NtSleepingGuard.cpp +++ b/dScripts/02_server/Map/NT/NtSleepingGuard.cpp @@ -20,7 +20,7 @@ void NtSleepingGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* RenderComponent::PlayAnimation(self, u"greet"); - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent != nullptr) { missionComponent->CompleteMission(1346); diff --git a/dScripts/02_server/Map/NT/NtVandaServer.cpp b/dScripts/02_server/Map/NT/NtVandaServer.cpp index bd49e47a..7750d566 100644 --- a/dScripts/02_server/Map/NT/NtVandaServer.cpp +++ b/dScripts/02_server/Map/NT/NtVandaServer.cpp @@ -6,7 +6,7 @@ void NtVandaServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio // Removes the alien parts after completing the mission if (missionID == m_AlienPartMissionID && missionState == eMissionState::READY_TO_COMPLETE) { - auto inventoryComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); for (const auto& alienPartLot : m_AlienPartLots) { inventoryComponent->RemoveItem(alienPartLot, 1); } diff --git a/dScripts/02_server/Map/NT/NtVentureSpeedPadServer.cpp b/dScripts/02_server/Map/NT/NtVentureSpeedPadServer.cpp index 375d525f..07d33555 100644 --- a/dScripts/02_server/Map/NT/NtVentureSpeedPadServer.cpp +++ b/dScripts/02_server/Map/NT/NtVentureSpeedPadServer.cpp @@ -15,13 +15,13 @@ void NtVentureSpeedPadServer::OnProximityUpdate(Entity* self, Entity* entering, auto* player = entering; - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); } - auto skillComponent = player->GetComponent(); + auto* skillComponent = player->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(927, 18913, player->GetObjectID(), true); diff --git a/dScripts/02_server/Map/NT/NtXRayServer.cpp b/dScripts/02_server/Map/NT/NtXRayServer.cpp index adef550d..3b281b79 100644 --- a/dScripts/02_server/Map/NT/NtXRayServer.cpp +++ b/dScripts/02_server/Map/NT/NtXRayServer.cpp @@ -2,7 +2,7 @@ #include "SkillComponent.h" void NtXRayServer::OnCollisionPhantom(Entity* self, Entity* target) { - auto skillComponent = target->GetComponent(); + auto* skillComponent = target->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp b/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp index 755c6a68..cf635fe4 100644 --- a/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp +++ b/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp @@ -14,8 +14,8 @@ void SpawnGryphonServer::SetVariables(Entity* self) { } void SpawnGryphonServer::OnUse(Entity* self, Entity* user) { - auto missionComponent = user->GetComponent(); - auto inventoryComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); + auto* inventoryComponent = user->GetComponent(); // Little extra for handling the case of the egg being placed the first time if (missionComponent != nullptr && inventoryComponent != nullptr diff --git a/dScripts/02_server/Map/Property/AG_Small/EnemySpiderSpawner.cpp b/dScripts/02_server/Map/Property/AG_Small/EnemySpiderSpawner.cpp index 2b96cf45..1adc6066 100644 --- a/dScripts/02_server/Map/Property/AG_Small/EnemySpiderSpawner.cpp +++ b/dScripts/02_server/Map/Property/AG_Small/EnemySpiderSpawner.cpp @@ -15,7 +15,7 @@ void EnemySpiderSpawner::OnFireEventServerSide(Entity* self, Entity* sender, std GameMessages::SendPlayFXEffect(self->GetObjectID(), 2856, u"maelstrom", "test", LWOOBJID_EMPTY, 1.0f, 1.0f, true); // Make indestructible - auto dest = self->GetComponent(); + auto* dest = self->GetComponent(); if (dest) { dest->SetFaction(-1); } @@ -54,7 +54,7 @@ void EnemySpiderSpawner::OnTimerDone(Entity* self, std::string timerName) { newEntity->AddToGroups("BabySpider"); /* - auto movementAi = newEntity->GetComponent(); + auto* movementAi = newEntity->GetComponent(); movementAi->SetDestination(newEntity->GetPosition()); */ diff --git a/dScripts/02_server/Map/Property/AG_Small/ZoneAgProperty.cpp b/dScripts/02_server/Map/Property/AG_Small/ZoneAgProperty.cpp index 22600430..6bf91768 100644 --- a/dScripts/02_server/Map/Property/AG_Small/ZoneAgProperty.cpp +++ b/dScripts/02_server/Map/Property/AG_Small/ZoneAgProperty.cpp @@ -75,7 +75,7 @@ void ZoneAgProperty::OnPlayerLoaded(Entity* self, Entity* player) { } void ZoneAgProperty::PropGuardCheck(Entity* self, Entity* player) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) return; @@ -211,7 +211,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) { KillGuard(self); } else if (timerName == "tornadoOff") { for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(FXManagerGroup))) { - auto renderComponent = entity->GetComponent(); + auto* renderComponent = entity->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("TornadoDebris", false); renderComponent->StopEffect("TornadoVortex", false); @@ -223,7 +223,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) { self->AddTimer("ShowClearEffects", 2); } else if (timerName == "ShowClearEffects") { for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(FXManagerGroup))) { - auto renderComponent = entity->GetComponent(); + auto* renderComponent = entity->GetComponent(); if (renderComponent != nullptr) { renderComponent->PlayEffect(-1, u"beamOn", "beam"); } @@ -275,7 +275,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) { StartTornadoFx(self); } else if (timerName == "killFXObject") { for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(FXManagerGroup))) { - auto renderComponent = entity->GetComponent(); + auto* renderComponent = entity->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("beam"); } @@ -301,7 +301,7 @@ void ZoneAgProperty::OnZonePropertyRented(Entity* self, Entity* player) { void ZoneAgProperty::OnZonePropertyModelPlaced(Entity* self, Entity* player) { auto* character = player->GetCharacter(); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (!character->GetPlayerFlag(101)) { BaseZonePropertyModelPlaced(self, player); @@ -329,7 +329,7 @@ void ZoneAgProperty::OnZonePropertyModelPlaced(Entity* self, Entity* player) { void ZoneAgProperty::OnZonePropertyModelPickedUp(Entity* self, Entity* player) { auto* character = player->GetCharacter(); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (!character->GetPlayerFlag(109)) { character->SetPlayerFlag(109, true); @@ -350,7 +350,7 @@ void ZoneAgProperty::OnZonePropertyModelRemovedWhileEquipped(Entity* self, Entit void ZoneAgProperty::OnZonePropertyModelRotated(Entity* self, Entity* player) { auto* character = player->GetCharacter(); - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (!character->GetPlayerFlag(110)) { character->SetPlayerFlag(110, true); diff --git a/dScripts/02_server/Map/SS/SsModularBuildServer.cpp b/dScripts/02_server/Map/SS/SsModularBuildServer.cpp index 2c395f9b..16c6bb2f 100644 --- a/dScripts/02_server/Map/SS/SsModularBuildServer.cpp +++ b/dScripts/02_server/Map/SS/SsModularBuildServer.cpp @@ -7,7 +7,7 @@ void SsModularBuildServer::OnModularBuildExit(Entity* self, Entity* player, bool int missionNum = 1732; if (bCompleted) { - auto mission = self->GetComponent(); + auto* mission = self->GetComponent(); Mission* rocketMission = mission->GetMission(missionNum); if (rocketMission->GetMissionState() == eMissionState::ACTIVE) { diff --git a/dScripts/02_server/Map/VE/VeBricksampleServer.cpp b/dScripts/02_server/Map/VE/VeBricksampleServer.cpp index e0f3441e..0ead6a87 100644 --- a/dScripts/02_server/Map/VE/VeBricksampleServer.cpp +++ b/dScripts/02_server/Map/VE/VeBricksampleServer.cpp @@ -6,10 +6,10 @@ #include "eMissionState.h" void VeBricksampleServer::OnUse(Entity* self, Entity* user) { - auto missionComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); if (missionComponent != nullptr && missionComponent->GetMissionState(1183) == eMissionState::ACTIVE) { const auto loot = self->GetVar(m_LootVariable); - auto inventoryComponent = user->GetComponent(); + auto* inventoryComponent = user->GetComponent(); if (loot && inventoryComponent != nullptr && inventoryComponent->GetLotCount(loot) == 0) { inventoryComponent->AddItem(loot, 1, eLootSourceType::ACTIVITY); diff --git a/dScripts/02_server/Map/VE/VeMissionConsole.cpp b/dScripts/02_server/Map/VE/VeMissionConsole.cpp index b1694912..35061bdf 100644 --- a/dScripts/02_server/Map/VE/VeMissionConsole.cpp +++ b/dScripts/02_server/Map/VE/VeMissionConsole.cpp @@ -8,7 +8,7 @@ void VeMissionConsole::OnUse(Entity* self, Entity* user) { LootGenerator::Instance().DropActivityLoot(user, self, 12551); - auto inventoryComponent = user->GetComponent(); + auto* inventoryComponent = user->GetComponent(); if (inventoryComponent != nullptr) { inventoryComponent->AddItem(12547, 1, eLootSourceType::ACTIVITY); // Add the panel required for pickup } diff --git a/dScripts/02_server/Map/njhub/BurningTile.cpp b/dScripts/02_server/Map/njhub/BurningTile.cpp index acda9784..8ac3dc5d 100644 --- a/dScripts/02_server/Map/njhub/BurningTile.cpp +++ b/dScripts/02_server/Map/njhub/BurningTile.cpp @@ -3,7 +3,7 @@ void BurningTile::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "PlayerEntered") { - auto skillComponent = sender->GetComponent(); + auto* skillComponent = sender->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/CavePrisonCage.cpp b/dScripts/02_server/Map/njhub/CavePrisonCage.cpp index 7c7a2e03..d04fc03d 100644 --- a/dScripts/02_server/Map/njhub/CavePrisonCage.cpp +++ b/dScripts/02_server/Map/njhub/CavePrisonCage.cpp @@ -68,7 +68,7 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) { self->SetVar(u"Counterweight", counterweight->GetObjectID()); - auto rebuildComponent = counterweight->GetComponent(); + auto* rebuildComponent = counterweight->GetComponent(); if (rebuildComponent != nullptr) { rebuildComponent->AddRebuildStateCallback([this, self](eRebuildState state) { diff --git a/dScripts/02_server/Map/njhub/EnemySkeletonSpawner.cpp b/dScripts/02_server/Map/njhub/EnemySkeletonSpawner.cpp index e01132fd..0e2e4005 100644 --- a/dScripts/02_server/Map/njhub/EnemySkeletonSpawner.cpp +++ b/dScripts/02_server/Map/njhub/EnemySkeletonSpawner.cpp @@ -7,7 +7,7 @@ void EnemySkeletonSpawner::OnStartup(Entity* self) { self->SetProximityRadius(15, "ronin"); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(1127, 24812, LWOOBJID_EMPTY, true); @@ -16,7 +16,7 @@ void EnemySkeletonSpawner::OnStartup(Entity* self) { void EnemySkeletonSpawner::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "hatchTime") { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->PlayEffect(644, u"create", "BurstFX1"); @@ -48,7 +48,7 @@ void EnemySkeletonSpawner::OnProximityUpdate(Entity* self, Entity* entering, std if (entering->IsPlayer() && name == "ronin" && status == "ENTER" && !self->GetVar(u"hatching")) { StartHatching(self); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(305, 3568, LWOOBJID_EMPTY); @@ -65,7 +65,7 @@ void EnemySkeletonSpawner::OnHit(Entity* self, Entity* attacker) { void EnemySkeletonSpawner::StartHatching(Entity* self) { self->SetVar(u"hatching", true); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->PlayEffect(9017, u"cast", "WakeUpFX1"); diff --git a/dScripts/02_server/Map/njhub/FallingTile.cpp b/dScripts/02_server/Map/njhub/FallingTile.cpp index 3dda9030..7804c8bc 100644 --- a/dScripts/02_server/Map/njhub/FallingTile.cpp +++ b/dScripts/02_server/Map/njhub/FallingTile.cpp @@ -3,7 +3,7 @@ #include "GameMessages.h" void FallingTile::OnStartup(Entity* self) { - auto movingPlatfromComponent = self->GetComponent(); + auto* movingPlatfromComponent = self->GetComponent(); if (movingPlatfromComponent == nullptr) { return; @@ -31,7 +31,7 @@ void FallingTile::OnWaypointReached(Entity* self, uint32_t waypointIndex) { } void FallingTile::OnTimerDone(Entity* self, std::string timerName) { - auto movingPlatfromComponent = self->GetComponent(); + auto* movingPlatfromComponent = self->GetComponent(); if (movingPlatfromComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/FlameJetServer.cpp b/dScripts/02_server/Map/njhub/FlameJetServer.cpp index 32e2a0ea..771dd841 100644 --- a/dScripts/02_server/Map/njhub/FlameJetServer.cpp +++ b/dScripts/02_server/Map/njhub/FlameJetServer.cpp @@ -19,7 +19,7 @@ void FlameJetServer::OnCollisionPhantom(Entity* self, Entity* target) { return; } - auto skillComponent = target->GetComponent(); + auto* skillComponent = target->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/ImaginationShrineServer.cpp b/dScripts/02_server/Map/njhub/ImaginationShrineServer.cpp index 79022586..1fbfad98 100644 --- a/dScripts/02_server/Map/njhub/ImaginationShrineServer.cpp +++ b/dScripts/02_server/Map/njhub/ImaginationShrineServer.cpp @@ -3,7 +3,7 @@ void ImaginationShrineServer::OnUse(Entity* self, Entity* user) { // If the rebuild component is complete, use the shrine - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/Lieutenant.cpp b/dScripts/02_server/Map/njhub/Lieutenant.cpp index 26b5f85d..d3b0fc1f 100644 --- a/dScripts/02_server/Map/njhub/Lieutenant.cpp +++ b/dScripts/02_server/Map/njhub/Lieutenant.cpp @@ -3,7 +3,7 @@ #include "dZoneManager.h" void Lieutenant::OnStartup(Entity* self) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/NjColeNPC.cpp b/dScripts/02_server/Map/njhub/NjColeNPC.cpp index dc33595b..b989f3ee 100644 --- a/dScripts/02_server/Map/njhub/NjColeNPC.cpp +++ b/dScripts/02_server/Map/njhub/NjColeNPC.cpp @@ -8,7 +8,7 @@ void NjColeNPC::OnEmoteReceived(Entity* self, int32_t emote, Entity* target) { return; } - auto inventoryComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); if (inventoryComponent == nullptr) { return; @@ -18,7 +18,7 @@ void NjColeNPC::OnEmoteReceived(Entity* self, int32_t emote, Entity* target) { return; } - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent == nullptr) { return; @@ -31,8 +31,8 @@ void NjColeNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, NjNPCMissionSpinjitzuServer::OnMissionDialogueOK(self, target, missionID, missionState); if (missionID == 1818 && missionState >= eMissionState::READY_TO_COMPLETE) { - auto missionComponent = target->GetComponent(); - auto inventoryComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); if (missionComponent == nullptr || inventoryComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/NjDragonEmblemChestServer.cpp b/dScripts/02_server/Map/njhub/NjDragonEmblemChestServer.cpp index cb2bd9be..931cfe56 100644 --- a/dScripts/02_server/Map/njhub/NjDragonEmblemChestServer.cpp +++ b/dScripts/02_server/Map/njhub/NjDragonEmblemChestServer.cpp @@ -12,7 +12,7 @@ void NjDragonEmblemChestServer::OnUse(Entity* self, Entity* user) { character->SetPlayerFlag(ePlayerFlag::NJ_WU_SHOW_DAILY_CHEST, false); } - auto destroyable = self->GetComponent(); + auto* destroyable = self->GetComponent(); if (destroyable != nullptr) { LootGenerator::Instance().DropLoot(user, self, destroyable->GetLootMatrixID(), 0, 0); } diff --git a/dScripts/02_server/Map/njhub/NjEarthPetServer.cpp b/dScripts/02_server/Map/njhub/NjEarthPetServer.cpp index b8bdaf69..36655c63 100644 --- a/dScripts/02_server/Map/njhub/NjEarthPetServer.cpp +++ b/dScripts/02_server/Map/njhub/NjEarthPetServer.cpp @@ -2,7 +2,7 @@ #include "PetComponent.h" void NjEarthPetServer::OnStartup(Entity* self) { - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr || petComponent->GetOwnerId() != LWOOBJID_EMPTY) return; diff --git a/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp b/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp index 9432161d..7156b368 100644 --- a/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp +++ b/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp @@ -5,7 +5,7 @@ void NjScrollChestServer::OnUse(Entity* self, Entity* user) { const auto keyLOT = self->GetVar(u"KeyNum"); const auto rewardItemLOT = self->GetVar(u"openItemID"); - auto playerInventory = user->GetComponent(); + auto* playerInventory = user->GetComponent(); if (playerInventory != nullptr && playerInventory->GetLotCount(keyLOT) == 1) { // Check for the key and remove diff --git a/dScripts/02_server/Map/njhub/NjWuNPC.cpp b/dScripts/02_server/Map/njhub/NjWuNPC.cpp index cc1fcad8..f4969074 100644 --- a/dScripts/02_server/Map/njhub/NjWuNPC.cpp +++ b/dScripts/02_server/Map/njhub/NjWuNPC.cpp @@ -11,7 +11,7 @@ void NjWuNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, e // The Dragon statue daily mission if (missionID == m_MainDragonMissionID) { auto* character = target->GetCharacter(); - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (character == nullptr || missionComponent == nullptr) return; diff --git a/dScripts/02_server/Map/njhub/RainOfArrows.cpp b/dScripts/02_server/Map/njhub/RainOfArrows.cpp index 10f5c4a4..b7c4c074 100644 --- a/dScripts/02_server/Map/njhub/RainOfArrows.cpp +++ b/dScripts/02_server/Map/njhub/RainOfArrows.cpp @@ -43,7 +43,7 @@ void RainOfArrows::OnTimerDone(Entity* self, std::string timerName) { return; } - auto skillComponent = child->GetComponent(); + auto* skillComponent = child->GetComponent(); if (skillComponent == nullptr) { return; diff --git a/dScripts/02_server/Map/njhub/boss_instance/NjMonastryBossInstance.cpp b/dScripts/02_server/Map/njhub/boss_instance/NjMonastryBossInstance.cpp index 8e676167..9f129ce3 100644 --- a/dScripts/02_server/Map/njhub/boss_instance/NjMonastryBossInstance.cpp +++ b/dScripts/02_server/Map/njhub/boss_instance/NjMonastryBossInstance.cpp @@ -51,7 +51,7 @@ void NjMonastryBossInstance::OnPlayerLoaded(Entity* self, Entity* player) { UpdatePlayer(self, player->GetObjectID()); // Buff the player - auto destroyableComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetHealth((int32_t)destroyableComponent->GetMaxHealth()); destroyableComponent->SetArmor((int32_t)destroyableComponent->GetMaxArmor()); @@ -147,7 +147,7 @@ void NjMonastryBossInstance::OnActivityTimerDone(Entity* self, const std::string } else if (timerName + TimerSplitChar == UnstunTimer) { auto* entity = EntityManager::Instance()->GetEntity(objectID); if (entity != nullptr) { - auto combatAI = entity->GetComponent(); + auto* combatAI = entity->GetComponent(); if (combatAI != nullptr) { combatAI->SetDisabled(false); } @@ -221,7 +221,7 @@ void NjMonastryBossInstance::HandleLedgedFrakjawSpawned(Entity* self, Entity* le } void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* counterWeight) { - auto rebuildComponent = counterWeight->GetComponent(); + auto* rebuildComponent = counterWeight->GetComponent(); if (rebuildComponent != nullptr) { rebuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) { @@ -257,7 +257,7 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co return; } - auto skillComponent = frakjaw->GetComponent(); + auto* skillComponent = frakjaw->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(1635, 39097, frakjaw->GetObjectID(), true, false); } @@ -285,12 +285,12 @@ void NjMonastryBossInstance::HandleLowerFrakjawSpawned(Entity* self, Entity* low RenderComponent::PlayAnimation(lowerFrakjaw, TeleportInAnimation); self->SetVar(LowerFrakjawVariable, lowerFrakjaw->GetObjectID()); - auto combatAI = lowerFrakjaw->GetComponent(); + auto* combatAI = lowerFrakjaw->GetComponent(); if (combatAI != nullptr) { combatAI->SetDisabled(true); } - auto destroyableComponent = lowerFrakjaw->GetComponent(); + auto* destroyableComponent = lowerFrakjaw->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->AddOnHitCallback([this, self, lowerFrakjaw](Entity* attacker) { NjMonastryBossInstance::HandleLowerFrakjawHit(self, lowerFrakjaw, attacker); @@ -323,7 +323,7 @@ void NjMonastryBossInstance::HandleLowerFrakjawSpawned(Entity* self, Entity* low } void NjMonastryBossInstance::HandleLowerFrakjawHit(Entity* self, Entity* lowerFrakjaw, Entity* attacker) { - auto destroyableComponent = lowerFrakjaw->GetComponent(); + auto* destroyableComponent = lowerFrakjaw->GetComponent(); if (destroyableComponent == nullptr) return; @@ -332,7 +332,7 @@ void NjMonastryBossInstance::HandleLowerFrakjawHit(Entity* self, Entity* lowerFr self->SetVar(OnLastWaveVarbiale, true); // Stun frakjaw during the cinematic - auto combatAI = lowerFrakjaw->GetComponent(); + auto* combatAI = lowerFrakjaw->GetComponent(); if (combatAI != nullptr) { combatAI->SetDisabled(true); } @@ -347,7 +347,7 @@ void NjMonastryBossInstance::HandleLowerFrakjawHit(Entity* self, Entity* lowerFr newTrashMobs.push_back(trashMobID); // Stun all the enemies until the cinematic is over - auto trashMobCombatAI = trashMob->GetComponent(); + auto* trashMobCombatAI = trashMob->GetComponent(); if (trashMobCombatAI != nullptr) { trashMobCombatAI->SetDisabled(true); } @@ -375,7 +375,7 @@ void NjMonastryBossInstance::HandleWaveEnemySpawned(Entity* self, Entity* waveEn waveEnemies.push_back(waveEnemy->GetObjectID()); self->SetVar>(TrashMobsAliveVariable, waveEnemies); - auto combatAI = waveEnemy->GetComponent(); + auto* combatAI = waveEnemy->GetComponent(); if (combatAI != nullptr) { combatAI->SetDisabled(true); ActivityTimerStart(self, UnstunTimer + std::to_string(waveEnemy->GetObjectID()), 3.0f, 3.0f); @@ -436,7 +436,7 @@ void NjMonastryBossInstance::RemovePoison(Entity* self) { auto* player = EntityManager::Instance()->GetEntity(playerID); if (player != nullptr) { - auto buffComponent = player->GetComponent(); + auto* buffComponent = player->GetComponent(); if (buffComponent != nullptr) { buffComponent->RemoveBuff(PoisonBuff); } diff --git a/dScripts/02_server/Minigame/General/MinigameTreasureChestServer.cpp b/dScripts/02_server/Minigame/General/MinigameTreasureChestServer.cpp index f944b343..7df8fc12 100644 --- a/dScripts/02_server/Minigame/General/MinigameTreasureChestServer.cpp +++ b/dScripts/02_server/Minigame/General/MinigameTreasureChestServer.cpp @@ -6,7 +6,7 @@ #include "Loot.h" void MinigameTreasureChestServer::OnUse(Entity* self, Entity* user) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) return; @@ -57,7 +57,7 @@ void MinigameTreasureChestServer::OnStartup(Entity* self) { // BONS treasure chest thinks it's on FV, causing it to start a lobby if (dZoneManager::Instance()->GetZoneID().GetMapID() == 1204) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac != nullptr) { sac->SetInstanceMapID(1204); } diff --git a/dScripts/02_server/Objects/AgSurvivalBuffStation.cpp b/dScripts/02_server/Objects/AgSurvivalBuffStation.cpp index 4d3482c4..158d9072 100644 --- a/dScripts/02_server/Objects/AgSurvivalBuffStation.cpp +++ b/dScripts/02_server/Objects/AgSurvivalBuffStation.cpp @@ -6,11 +6,11 @@ #include "TeamManager.h" void AgSurvivalBuffStation::OnRebuildComplete(Entity* self, Entity* target) { - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); // We set the faction to 1 so that the buff station sees players as friendly targets to buff if (destroyableComponent != nullptr) destroyableComponent->SetFaction(1); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) skillComponent->CalculateBehavior(skillIdForBuffStation, behaviorIdForBuffStation, self->GetObjectID()); diff --git a/dScripts/02_server/Pets/DamagingPets.cpp b/dScripts/02_server/Pets/DamagingPets.cpp index 5d4bf0ea..6fd8c560 100644 --- a/dScripts/02_server/Pets/DamagingPets.cpp +++ b/dScripts/02_server/Pets/DamagingPets.cpp @@ -8,7 +8,7 @@ void DamagingPets::OnStartup(Entity* self) { // Make the pet hostile or non-hostile based on whether or not it is tamed - const auto petComponent = self->GetComponent(); + const auto* petComponent = self->GetComponent(); if (petComponent != nullptr && petComponent->GetOwner() == nullptr) { self->AddTimer("GoEvil", 0.5f); } @@ -19,9 +19,9 @@ void DamagingPets::OnPlayerLoaded(Entity* self, Entity* player) { // Makes it so that new players also see the effect self->AddCallbackTimer(2.5f, [self]() { if (self != nullptr) { - const auto petComponent = self->GetComponent(); + const auto* petComponent = self->GetComponent(); if (petComponent != nullptr && petComponent->GetOwner() == nullptr && self->GetVar(u"IsEvil")) { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { auto counter = 1; for (const auto petEffect : GetPetInfo(self).effect) { @@ -58,7 +58,7 @@ void DamagingPets::OnSkillEventFired(Entity* self, Entity* caster, const std::st if (infoForPet.skill == message) { // Only make pets tamable that aren't tamed yet - const auto petComponent = self->GetComponent(); + const auto* petComponent = self->GetComponent(); if (petComponent != nullptr && petComponent->GetOwner() == nullptr && self->GetVar(u"IsEvil")) { ClearEffects(self); self->AddTimer("GoEvil", 30.0f); @@ -74,7 +74,7 @@ void DamagingPets::OnTimerDone(Entity* self, std::string message) { } void DamagingPets::MakeUntamable(Entity* self) { - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); // If the pet is currently not being tamed, make it hostile if (petComponent != nullptr && petComponent->GetStatus() != 5) { @@ -82,19 +82,19 @@ void DamagingPets::MakeUntamable(Entity* self) { self->SetVar(u"IsEvil", true); petComponent->SetStatus(1); - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(false); } // Special faction that can attack the player but the player can't attack - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetFaction(114); destroyableComponent->SetHealth(5); } - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { auto counter = 1; for (const auto petEffect : GetPetInfo(self).effect) { @@ -108,22 +108,22 @@ void DamagingPets::MakeUntamable(Entity* self) { void DamagingPets::ClearEffects(Entity* self) { self->SetVar(u"IsEvil", false); - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent != nullptr) { petComponent->SetStatus(67108866); } - auto combatAIComponent = self->GetComponent(); + auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(true); } - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetFaction(99); } - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { auto counter = 1; for (const auto petEffect : GetPetInfo(self).effect) { diff --git a/dScripts/02_server/Pets/PetFromDigServer.cpp b/dScripts/02_server/Pets/PetFromDigServer.cpp index 6ffb6192..525f3e94 100644 --- a/dScripts/02_server/Pets/PetFromDigServer.cpp +++ b/dScripts/02_server/Pets/PetFromDigServer.cpp @@ -3,7 +3,7 @@ #include "ePetTamingNotifyType.h" void PetFromDigServer::OnStartup(Entity* self) { - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr || petComponent->GetOwner() != nullptr) return; @@ -21,7 +21,7 @@ void PetFromDigServer::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "killself") { // Don't accidentally kill a pet that is already owned - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr || petComponent->GetOwner() != nullptr) return; @@ -35,7 +35,7 @@ void PetFromDigServer::OnNotifyPetTamingMinigame(Entity* self, Entity* tamer, eP } else if (type == ePetTamingNotifyType::QUIT || type == ePetTamingNotifyType::FAILED) { self->Smash(self->GetObjectID(), eKillType::SILENT); } else if (type == ePetTamingNotifyType::SUCCESS) { - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr) return; // TODO: Remove custom group? diff --git a/dScripts/02_server/Pets/PetFromObjectServer.cpp b/dScripts/02_server/Pets/PetFromObjectServer.cpp index e362c3f7..0a78d7ec 100644 --- a/dScripts/02_server/Pets/PetFromObjectServer.cpp +++ b/dScripts/02_server/Pets/PetFromObjectServer.cpp @@ -9,7 +9,7 @@ void PetFromObjectServer::OnStartup(Entity* self) { void PetFromObjectServer::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "killSelf") { - const auto petComponent = self->GetComponent(); + const auto* petComponent = self->GetComponent(); if (petComponent == nullptr || petComponent->GetOwner() != nullptr) return; self->Smash(self->GetObjectID(), eKillType::SILENT); diff --git a/dScripts/ActivityManager.cpp b/dScripts/ActivityManager.cpp index 46653a94..078a7a02 100644 --- a/dScripts/ActivityManager.cpp +++ b/dScripts/ActivityManager.cpp @@ -8,12 +8,12 @@ #include "Loot.h" bool ActivityManager::IsPlayerInActivity(Entity* self, LWOOBJID playerID) { - const auto sac = self->GetComponent(); + const auto* sac = self->GetComponent(); return sac != nullptr && sac->IsPlayedBy(playerID); } void ActivityManager::UpdatePlayer(Entity* self, LWOOBJID playerID, const bool remove) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) return; @@ -34,7 +34,7 @@ void ActivityManager::SetActivityScore(Entity* self, LWOOBJID playerID, uint32_t void ActivityManager::SetActivityValue(Entity* self, const LWOOBJID playerID, const uint32_t valueIndex, const float_t value) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) return; @@ -42,7 +42,7 @@ void ActivityManager::SetActivityValue(Entity* self, const LWOOBJID playerID, co } float_t ActivityManager::GetActivityValue(Entity* self, const LWOOBJID playerID, const uint32_t valueIndex) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) return -1.0f; @@ -53,7 +53,7 @@ void ActivityManager::StopActivity(Entity* self, const LWOOBJID playerID, const const uint32_t value1, const uint32_t value2, bool quit) { int32_t gameID = 0; - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) { gameID = self->GetLOT(); } else { @@ -92,7 +92,7 @@ void ActivityManager::StopActivity(Entity* self, const LWOOBJID playerID, const } bool ActivityManager::TakeActivityCost(const Entity* self, const LWOOBJID playerID) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) return false; @@ -104,7 +104,7 @@ bool ActivityManager::TakeActivityCost(const Entity* self, const LWOOBJID player } uint32_t ActivityManager::CalculateActivityRating(Entity* self, const LWOOBJID playerID) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) return 0; @@ -112,7 +112,7 @@ uint32_t ActivityManager::CalculateActivityRating(Entity* self, const LWOOBJID p } uint32_t ActivityManager::GetActivityID(const Entity* self) { - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); return sac != nullptr ? sac->GetActivityID() : 0; } @@ -147,7 +147,7 @@ float_t ActivityManager::ActivityTimerGetCurrentTime(Entity* self, const std::st int32_t ActivityManager::GetGameID(Entity* self) const { int32_t gameID = 0; - auto sac = self->GetComponent(); + auto* sac = self->GetComponent(); if (sac == nullptr) { gameID = self->GetLOT(); } else { diff --git a/dScripts/BasePropertyServer.cpp b/dScripts/BasePropertyServer.cpp index 618e6fd4..d48874bc 100644 --- a/dScripts/BasePropertyServer.cpp +++ b/dScripts/BasePropertyServer.cpp @@ -95,7 +95,7 @@ void BasePropertyServer::BasePlayerLoaded(Entity* self, Entity* player) { const auto& mapID = dZoneManager::Instance()->GetZone()->GetZoneID(); if (propertyOwner > 0) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress( @@ -149,7 +149,7 @@ void BasePropertyServer::BasePlayerLoaded(Entity* self, Entity* player) { } void BasePropertyServer::PropGuardCheck(Entity* self, Entity* player) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr && missionComponent->GetMissionState(self->GetVar(guardMissionFlag)) != eMissionState::COMPLETE) { @@ -171,7 +171,7 @@ void BasePropertyServer::BaseZonePropertyRented(Entity* self, Entity* player) co auto brickLinkMissionID = self->GetVar(brickLinkMissionIDFlag); if (brickLinkMissionID != 0) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent) missionComponent->CompleteMission(brickLinkMissionID, true); } @@ -241,7 +241,7 @@ void BasePropertyServer::StartTornadoFx(Entity* self) const { } for (auto* entity : entities) { - auto renderComponent = entity->GetComponent(); + auto* renderComponent = entity->GetComponent(); if (renderComponent != nullptr) { renderComponent->PlayEffect(-1, u"debrisOn", "TornadoDebris"); renderComponent->PlayEffect(-1, u"VortexOn", "TornadoVortex"); @@ -270,7 +270,7 @@ void BasePropertyServer::KillGuard(Entity* self) { } void BasePropertyServer::RequestDie(Entity* self, Entity* other) { - auto destroyable = other->GetComponent(); + auto* destroyable = other->GetComponent(); if (destroyable == nullptr) return; @@ -344,7 +344,7 @@ void BasePropertyServer::BaseTimerDone(Entity* self, const std::string& timerNam auto fxManagers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(FXManagerGroup)); for (auto* fxManager : fxManagers) { - auto renderComponent = fxManager->GetComponent(); + auto* renderComponent = fxManager->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("TornadoDebris", false); renderComponent->StopEffect("TornadoVortex", false); @@ -357,7 +357,7 @@ void BasePropertyServer::BaseTimerDone(Entity* self, const std::string& timerNam auto fxManagers = EntityManager::Instance()->GetEntitiesInGroup(self->GetVar(FXManagerGroup)); for (auto* fxManager : fxManagers) { - auto renderComponent = fxManager->GetComponent(); + auto* renderComponent = fxManager->GetComponent(); if (renderComponent != nullptr) renderComponent->PlayEffect(-1, u"beamOn", "beam"); } @@ -423,7 +423,7 @@ void BasePropertyServer::BaseTimerDone(Entity* self, const std::string& timerNam } for (auto* fxManager : fxManagers) { - auto renderComponent = fxManager->GetComponent(); + auto* renderComponent = fxManager->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("beam"); } diff --git a/dScripts/BaseSurvivalServer.cpp b/dScripts/BaseSurvivalServer.cpp index fb9f3484..3d72628d 100644 --- a/dScripts/BaseSurvivalServer.cpp +++ b/dScripts/BaseSurvivalServer.cpp @@ -225,7 +225,7 @@ void BaseSurvivalServer::ResetStats(LWOOBJID playerID) { if (player != nullptr) { // Boost all the player stats when loading in - auto destroyableComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetHealth(destroyableComponent->GetMaxHealth()); destroyableComponent->SetArmor(destroyableComponent->GetMaxArmor()); @@ -360,7 +360,7 @@ void BaseSurvivalServer::GameOver(Entity* self) { player->Resurrect(); // Update all mission progression - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::PERFORM_ACTIVITY, time, self->GetObjectID(), self->GetVar(MissionTypeVariable)); diff --git a/dScripts/BaseWavesServer.cpp b/dScripts/BaseWavesServer.cpp index c3114cd0..00340bd0 100644 --- a/dScripts/BaseWavesServer.cpp +++ b/dScripts/BaseWavesServer.cpp @@ -228,7 +228,7 @@ void BaseWavesServer::ResetStats(LWOOBJID playerID) { if (player != nullptr) { // Boost all the player stats when loading in - auto destroyableComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetHealth(destroyableComponent->GetMaxHealth()); destroyableComponent->SetArmor(destroyableComponent->GetMaxArmor()); @@ -372,7 +372,7 @@ void BaseWavesServer::GameOver(Entity* self, bool won) { } // Update all mission progression - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::PERFORM_ACTIVITY, time, self->GetObjectID(), self->GetVar(MissionTypeVariable)); } @@ -505,7 +505,7 @@ bool BaseWavesServer::UpdateSpawnedEnemies(Entity* self, LWOOBJID enemyID, uint3 SetActivityValue(self, playerID, 2, state.waveNumber); // Update player missions - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { for (const auto& missionID : waveMission) { // Get the mission state @@ -560,7 +560,7 @@ void BaseWavesServer::UpdateMissionForAllPlayers(Entity* self, uint32_t missionI for (const auto& playerID : state.players) { auto* player = EntityManager::Instance()->GetEntity(playerID); if (player != nullptr) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) return; // Get the mission state auto missionState = missionComponent->GetMissionState(missionID); diff --git a/dScripts/Darkitect.cpp b/dScripts/Darkitect.cpp index 0ad0b549..b4364332 100644 --- a/dScripts/Darkitect.cpp +++ b/dScripts/Darkitect.cpp @@ -16,8 +16,8 @@ void Darkitect::Reveal(Entity* self, Entity* player) { if (!player) return; - auto destroyableComponent = player->GetComponent(); - auto missionComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); auto* character = player->GetCharacter(); if (destroyableComponent != nullptr && missionComponent != nullptr && character != nullptr) { diff --git a/dScripts/EquipmentScripts/BuccaneerValiantShip.cpp b/dScripts/EquipmentScripts/BuccaneerValiantShip.cpp index cd68ae1c..3db214b5 100644 --- a/dScripts/EquipmentScripts/BuccaneerValiantShip.cpp +++ b/dScripts/EquipmentScripts/BuccaneerValiantShip.cpp @@ -3,7 +3,7 @@ void BuccaneerValiantShip::OnStartup(Entity* self) { self->AddCallbackTimer(1.0F, [self]() { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); auto* owner = self->GetOwner(); if (skillComponent != nullptr && owner != nullptr) { diff --git a/dScripts/EquipmentScripts/FireFirstSkillonStartup.cpp b/dScripts/EquipmentScripts/FireFirstSkillonStartup.cpp index 389f3621..2c34d558 100644 --- a/dScripts/EquipmentScripts/FireFirstSkillonStartup.cpp +++ b/dScripts/EquipmentScripts/FireFirstSkillonStartup.cpp @@ -7,7 +7,7 @@ #include "CDClientManager.h" void FireFirstSkillonStartup::OnStartup(Entity* self) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (!skillComponent) return; // Get the skill IDs of this object. diff --git a/dScripts/EquipmentScripts/PersonalFortress.cpp b/dScripts/EquipmentScripts/PersonalFortress.cpp index 2001f579..f1fe73ee 100644 --- a/dScripts/EquipmentScripts/PersonalFortress.cpp +++ b/dScripts/EquipmentScripts/PersonalFortress.cpp @@ -10,13 +10,13 @@ void PersonalFortress::OnStartup(Entity* self) { auto* owner = self->GetOwner(); self->AddTimer("FireSkill", 1.5); - auto destroyableComponent = owner->GetComponent(); + auto* destroyableComponent = owner->GetComponent(); if (destroyableComponent) destroyableComponent->SetStatusImmunity( eStateChangeType::PUSH, true, true, true, true, true, false, true, false, false ); - auto controllablePhysicsComponent = owner->GetComponent(); + auto* controllablePhysicsComponent = owner->GetComponent(); if (controllablePhysicsComponent) controllablePhysicsComponent->SetStunImmunity( eStateChangeType::PUSH, LWOOBJID_EMPTY, true, true, true, true, true, true @@ -31,13 +31,13 @@ void PersonalFortress::OnStartup(Entity* self) { void PersonalFortress::OnDie(Entity* self, Entity* killer) { auto* owner = self->GetOwner(); - auto destroyableComponent = owner->GetComponent(); + auto* destroyableComponent = owner->GetComponent(); if (destroyableComponent) destroyableComponent->SetStatusImmunity( eStateChangeType::POP, true, true, true, true, true, false, true, false, false ); - auto controllablePhysicsComponent = owner->GetComponent(); + auto* controllablePhysicsComponent = owner->GetComponent(); if (controllablePhysicsComponent) controllablePhysicsComponent->SetStunImmunity( eStateChangeType::POP, LWOOBJID_EMPTY, true, true, true, true, true, true @@ -52,7 +52,7 @@ void PersonalFortress::OnDie(Entity* self, Entity* killer) { void PersonalFortress::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "FireSkill") { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent) skillComponent->CalculateBehavior(650, 13364, LWOOBJID_EMPTY, true, false); } } diff --git a/dScripts/EquipmentScripts/StunImmunity.cpp b/dScripts/EquipmentScripts/StunImmunity.cpp index bbb8420e..0ec956f0 100644 --- a/dScripts/EquipmentScripts/StunImmunity.cpp +++ b/dScripts/EquipmentScripts/StunImmunity.cpp @@ -4,14 +4,14 @@ #include "eStateChangeType.h" void StunImmunity::OnStartup(Entity* self) { - auto destroyableComponent = self->GetComponent(); + auto* destroyableComponent = self->GetComponent(); if (destroyableComponent) { destroyableComponent->SetStatusImmunity( eStateChangeType::PUSH, false, false, true, true, false, false, false, false, true ); } - auto controllablePhysicsComponent = self->GetComponent(); + auto* controllablePhysicsComponent = self->GetComponent(); if (controllablePhysicsComponent) { controllablePhysicsComponent->SetStunImmunity( eStateChangeType::PUSH, self->GetObjectID(), true diff --git a/dScripts/EquipmentTriggers/CoilBackpackBase.cpp b/dScripts/EquipmentTriggers/CoilBackpackBase.cpp index decf2282..4e323a08 100644 --- a/dScripts/EquipmentTriggers/CoilBackpackBase.cpp +++ b/dScripts/EquipmentTriggers/CoilBackpackBase.cpp @@ -12,7 +12,7 @@ void CoilBackpackBase::NotifyHitOrHealResult(Entity* self, Entity* attacker, int if (damage > 0) { self->SetVar(u"coilCount", self->GetVar(u"coilCount") + 1); if (self->GetVar(u"coilCount") > 4) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (!skillComponent) return; skillComponent->CastSkill(m_SkillId); self->SetVar(u"coilCount", 0); diff --git a/dScripts/NPCAddRemoveItem.cpp b/dScripts/NPCAddRemoveItem.cpp index 6a9c7c13..13677072 100644 --- a/dScripts/NPCAddRemoveItem.cpp +++ b/dScripts/NPCAddRemoveItem.cpp @@ -3,7 +3,7 @@ #include "eMissionState.h" void NPCAddRemoveItem::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { - auto inventory = target->GetComponent(); + auto* inventory = target->GetComponent(); if (inventory == nullptr) return; diff --git a/dScripts/NtFactionSpyServer.cpp b/dScripts/NtFactionSpyServer.cpp index b3cb8e2b..5c3d689b 100644 --- a/dScripts/NtFactionSpyServer.cpp +++ b/dScripts/NtFactionSpyServer.cpp @@ -47,8 +47,8 @@ bool NtFactionSpyServer::IsSpy(Entity* self, Entity* possibleSpy) { if (!spyData.missionID || !spyData.flagID || !spyData.itemID) return false; - auto missionComponent = possibleSpy->GetComponent(); - auto inventoryComponent = possibleSpy->GetComponent(); + auto* missionComponent = possibleSpy->GetComponent(); + auto* inventoryComponent = possibleSpy->GetComponent(); auto* character = possibleSpy->GetCharacter(); // A player is a spy if they have the spy mission, have the spy equipment equipped and don't have the spy flag set yet diff --git a/dScripts/ScriptedPowerupSpawner.cpp b/dScripts/ScriptedPowerupSpawner.cpp index c1ceb338..3c1d1cca 100644 --- a/dScripts/ScriptedPowerupSpawner.cpp +++ b/dScripts/ScriptedPowerupSpawner.cpp @@ -23,7 +23,7 @@ void ScriptedPowerupSpawner::OnTimerDone(Entity* self, std::string message) { // Spawn the required number of powerups auto* owner = EntityManager::Instance()->GetEntity(self->GetSpawnerID()); if (owner != nullptr) { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); for (auto i = 0; i < self->GetVar(u"numberOfPowerups"); i++) { if (renderComponent != nullptr) { renderComponent->PlayEffect(0, u"cast", "N_cast"); diff --git a/dScripts/SpawnPetBaseServer.cpp b/dScripts/SpawnPetBaseServer.cpp index 94859d3a..75b46382 100644 --- a/dScripts/SpawnPetBaseServer.cpp +++ b/dScripts/SpawnPetBaseServer.cpp @@ -61,7 +61,7 @@ bool SpawnPetBaseServer::CheckNumberOfPets(Entity* self, Entity* user) { if (spawnedPet == nullptr) continue; - const auto petComponent = spawnedPet->GetComponent(); + const auto* petComponent = spawnedPet->GetComponent(); if (petComponent == nullptr || petComponent->GetOwner() != nullptr) continue; diff --git a/dScripts/ai/ACT/ActMine.cpp b/dScripts/ai/ACT/ActMine.cpp index d7c6abbd..8c724270 100644 --- a/dScripts/ai/ACT/ActMine.cpp +++ b/dScripts/ai/ACT/ActMine.cpp @@ -10,7 +10,7 @@ void ActMine::OnStartup(Entity* self) { void ActMine::OnRebuildNotifyState(Entity* self, eRebuildState state) { if (state == eRebuildState::COMPLETED) { - auto rebuild = self->GetComponent(); + auto* rebuild = self->GetComponent(); if (rebuild) { auto* builder = rebuild->GetBuilder(); self->SetVar(u"Builder", builder->GetObjectID()); @@ -24,7 +24,7 @@ void ActMine::OnRebuildNotifyState(Entity* self, eRebuildState state) { } void ActMine::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - auto detroyable = self->GetComponent(); + auto* detroyable = self->GetComponent(); if (!detroyable) return; if (status == "ENTER" && self->GetVar(u"RebuildComplete") == true && detroyable->IsEnemy(entering)) { GameMessages::SendPlayFXEffect(self->GetObjectID(), 242, u"orange", "sirenlight_B"); @@ -35,7 +35,7 @@ void ActMine::OnProximityUpdate(Entity* self, Entity* entering, std::string name void ActMine::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "Tick") { if (self->GetVar(u"NumWarnings") >= MAX_WARNINGS) { - auto skill = self->GetComponent(); + auto* skill = self->GetComponent(); if (!skill) return; skill->CalculateBehavior(SKILL_ID, BEHAVIOR_ID, LWOOBJID_EMPTY); self->AddTimer("BlowedUp", BLOWED_UP_TIME); diff --git a/dScripts/ai/ACT/ActVehicleDeathTrigger.cpp b/dScripts/ai/ACT/ActVehicleDeathTrigger.cpp index c841a39f..76c0289e 100644 --- a/dScripts/ai/ACT/ActVehicleDeathTrigger.cpp +++ b/dScripts/ai/ACT/ActVehicleDeathTrigger.cpp @@ -8,7 +8,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) { - auto possessableComponent = target->GetComponent(); + auto* possessableComponent = target->GetComponent(); Entity* vehicle; Entity* player; @@ -22,7 +22,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) { return; } else if (target->IsPlayer()) { - auto possessorComponent = target->GetComponent(); + auto* possessorComponent = target->GetComponent(); if (possessorComponent == nullptr) { return; @@ -44,7 +44,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) { auto* zoneController = dZoneManager::Instance()->GetZoneControlObject(); - auto racingControlComponent = zoneController->GetComponent(); + auto* racingControlComponent = zoneController->GetComponent(); if (racingControlComponent != nullptr) { racingControlComponent->OnRequestDie(player); diff --git a/dScripts/ai/AG/ActSharkPlayerDeathTrigger.cpp b/dScripts/ai/AG/ActSharkPlayerDeathTrigger.cpp index 49fb6b87..af3d39cb 100644 --- a/dScripts/ai/AG/ActSharkPlayerDeathTrigger.cpp +++ b/dScripts/ai/AG/ActSharkPlayerDeathTrigger.cpp @@ -6,7 +6,7 @@ void ActSharkPlayerDeathTrigger::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "achieve") { - auto missionComponent = sender->GetComponent(); + auto* missionComponent = sender->GetComponent(); if (!missionComponent) return; missionComponent->Progress(eMissionTaskType::SCRIPT, 8419); diff --git a/dScripts/ai/AG/AgBusDoor.cpp b/dScripts/ai/AG/AgBusDoor.cpp index 691e5b94..4910d0c5 100644 --- a/dScripts/ai/AG/AgBusDoor.cpp +++ b/dScripts/ai/AG/AgBusDoor.cpp @@ -16,7 +16,7 @@ void AgBusDoor::OnProximityUpdate(Entity* self, Entity* entering, std::string na // Make sure only humans are taken into account if (!entering->GetCharacter()) return; - auto proximityMonitorComponent = self->GetComponent(); + auto* proximityMonitorComponent = self->GetComponent(); if (proximityMonitorComponent == nullptr) return; diff --git a/dScripts/ai/AG/AgDarkSpiderling.cpp b/dScripts/ai/AG/AgDarkSpiderling.cpp index 5ffc5ec7..5dbd350a 100644 --- a/dScripts/ai/AG/AgDarkSpiderling.cpp +++ b/dScripts/ai/AG/AgDarkSpiderling.cpp @@ -2,7 +2,7 @@ #include "BaseCombatAIComponent.h" void AgDarkSpiderling::OnStartup(Entity* self) { - auto combatAI = self->GetComponent(); + auto* combatAI = self->GetComponent(); if (combatAI != nullptr) { combatAI->SetStunImmune(true); } diff --git a/dScripts/ai/AG/AgFans.cpp b/dScripts/ai/AG/AgFans.cpp index 1639bb53..f50094ba 100644 --- a/dScripts/ai/AG/AgFans.cpp +++ b/dScripts/ai/AG/AgFans.cpp @@ -14,7 +14,7 @@ void AgFans::OnStartup(Entity* self) { ToggleFX(self, false); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent == nullptr) { return; @@ -27,7 +27,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) { std::string fanGroup = self->GetGroups()[0]; std::vector fanVolumes = EntityManager::Instance()->GetEntitiesInGroup(fanGroup); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent == nullptr) { return; @@ -42,7 +42,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) { self->SetVar(u"on", false); for (Entity* volume : fanVolumes) { - auto volumePhys = volume->GetComponent(); + auto* volumePhys = volume->GetComponent(); if (!volumePhys) continue; volumePhys->SetPhysicsEffectActive(false); EntityManager::Instance()->SerializeEntity(volume); @@ -58,7 +58,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) { self->SetVar(u"on", true); for (Entity* volume : fanVolumes) { - auto volumePhys = volume->GetComponent(); + auto* volumePhys = volume->GetComponent(); if (!volumePhys) continue; volumePhys->SetPhysicsEffectActive(true); EntityManager::Instance()->SerializeEntity(volume); diff --git a/dScripts/ai/AG/AgImagSmashable.cpp b/dScripts/ai/AG/AgImagSmashable.cpp index 6cd201d9..6d42197e 100644 --- a/dScripts/ai/AG/AgImagSmashable.cpp +++ b/dScripts/ai/AG/AgImagSmashable.cpp @@ -10,7 +10,7 @@ void AgImagSmashable::OnDie(Entity* self, Entity* killer) { bool maxImagGreaterThanZero = false; if (killer) { - auto dest = killer->GetComponent(); + auto* dest = killer->GetComponent(); if (dest) { maxImagGreaterThanZero = dest->GetMaxImagination() > 0; } diff --git a/dScripts/ai/AG/AgJetEffectServer.cpp b/dScripts/ai/AG/AgJetEffectServer.cpp index d8cb2cdd..0a26069e 100644 --- a/dScripts/ai/AG/AgJetEffectServer.cpp +++ b/dScripts/ai/AG/AgJetEffectServer.cpp @@ -49,7 +49,7 @@ void AgJetEffectServer::OnTimerDone(Entity* self, std::string timerName) { // so we give proper credit to the builder for the kills from this skill mortar->SetOwnerOverride(builder); - auto skillComponent = mortar->GetComponent(); + auto* skillComponent = mortar->GetComponent(); if (skillComponent) skillComponent->CastSkill(318); } else if (timerName == "CineDone") { GameMessages::SendNotifyClientObject( diff --git a/dScripts/ai/AG/AgStagePlatforms.cpp b/dScripts/ai/AG/AgStagePlatforms.cpp index 03ed41e8..9ba4c4b7 100644 --- a/dScripts/ai/AG/AgStagePlatforms.cpp +++ b/dScripts/ai/AG/AgStagePlatforms.cpp @@ -2,7 +2,7 @@ #include "MovingPlatformComponent.h" void AgStagePlatforms::OnStartup(Entity* self) { - auto component = self->GetComponent(); + auto* component = self->GetComponent(); if (component) { component->SetNoAutoStart(true); component->StopPathing(); @@ -10,7 +10,7 @@ void AgStagePlatforms::OnStartup(Entity* self) { } void AgStagePlatforms::OnWaypointReached(Entity* self, uint32_t waypointIndex) { - auto component = self->GetComponent(); + auto* component = self->GetComponent(); if (waypointIndex == 0 && component) component->StopPathing(); } diff --git a/dScripts/ai/FV/ActParadoxPipeFix.cpp b/dScripts/ai/FV/ActParadoxPipeFix.cpp index 99d0a43d..10a1e652 100644 --- a/dScripts/ai/FV/ActParadoxPipeFix.cpp +++ b/dScripts/ai/FV/ActParadoxPipeFix.cpp @@ -19,7 +19,7 @@ void ActParadoxPipeFix::OnRebuildComplete(Entity* self, Entity* target) { continue; } - auto rebuildComponent = object->GetComponent(); + auto* rebuildComponent = object->GetComponent(); if (rebuildComponent->GetState() == eRebuildState::COMPLETED) { indexCount++; @@ -37,7 +37,7 @@ void ActParadoxPipeFix::OnRebuildComplete(Entity* self, Entity* target) { auto* player = EntityManager::Instance()->GetEntity(object->GetVar(u"PlayerID")); if (player != nullptr) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->ForceProgressTaskType(769, 1, 1, false); diff --git a/dScripts/ai/FV/FvBounceOverWall.cpp b/dScripts/ai/FV/FvBounceOverWall.cpp index 294c11f0..efb60f7a 100644 --- a/dScripts/ai/FV/FvBounceOverWall.cpp +++ b/dScripts/ai/FV/FvBounceOverWall.cpp @@ -2,7 +2,7 @@ #include "MissionComponent.h" void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent == nullptr) return; // We force progress here to the Gate Crasher mission due to an overlap in LOTs with the 'Shark Bite' missions. diff --git a/dScripts/ai/FV/FvBrickPuzzleServer.cpp b/dScripts/ai/FV/FvBrickPuzzleServer.cpp index a3673bd8..887b9a4d 100644 --- a/dScripts/ai/FV/FvBrickPuzzleServer.cpp +++ b/dScripts/ai/FV/FvBrickPuzzleServer.cpp @@ -59,7 +59,7 @@ void FvBrickPuzzleServer::OnDie(Entity* self, Entity* killer) { void FvBrickPuzzleServer::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "reset") { - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent != nullptr && rebuildComponent->GetState() == eRebuildState::OPEN) { self->Smash(self->GetObjectID(), eKillType::SILENT); diff --git a/dScripts/ai/FV/FvFlyingCreviceDragon.cpp b/dScripts/ai/FV/FvFlyingCreviceDragon.cpp index c6dbc488..cb0fe3d0 100644 --- a/dScripts/ai/FV/FvFlyingCreviceDragon.cpp +++ b/dScripts/ai/FV/FvFlyingCreviceDragon.cpp @@ -40,7 +40,7 @@ void FvFlyingCreviceDragon::OnTimerDone(Entity* self, std::string timerName) { return; } - auto skillComponent = group[0]->GetComponent(); + auto* skillComponent = group[0]->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(762, 12506, LWOOBJID_EMPTY, true); @@ -79,7 +79,7 @@ void FvFlyingCreviceDragon::OnArrived(Entity* self) { return; } - auto skillComponent = group2[0]->GetComponent(); + auto* skillComponent = group2[0]->GetComponent(); if (skillComponent != nullptr) { skillComponent->CalculateBehavior(762, 12506, LWOOBJID_EMPTY); diff --git a/dScripts/ai/FV/FvFreeGfNinjas.cpp b/dScripts/ai/FV/FvFreeGfNinjas.cpp index c8c2c0af..d690a6f7 100644 --- a/dScripts/ai/FV/FvFreeGfNinjas.cpp +++ b/dScripts/ai/FV/FvFreeGfNinjas.cpp @@ -5,7 +5,7 @@ void FvFreeGfNinjas::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { if (missionID == 705 && missionState == eMissionState::AVAILABLE) { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent == nullptr) return; @@ -26,7 +26,7 @@ void FvFreeGfNinjas::OnMissionDialogueOK(Entity* self, Entity* target, int missi void FvFreeGfNinjas::OnUse(Entity* self, Entity* user) { // To allow player who already have the mission to progress. - auto missionComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); if (missionComponent == nullptr) return; diff --git a/dScripts/ai/FV/FvMaelstromGeyser.cpp b/dScripts/ai/FV/FvMaelstromGeyser.cpp index 736de10e..66aa43dc 100644 --- a/dScripts/ai/FV/FvMaelstromGeyser.cpp +++ b/dScripts/ai/FV/FvMaelstromGeyser.cpp @@ -8,7 +8,7 @@ void FvMaelstromGeyser::OnStartup(Entity* self) { void FvMaelstromGeyser::OnTimerDone(Entity* self, std::string timerName) { if (timerName == m_StartSkillTimerName) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); skillComponent->CalculateBehavior(m_SkillID, m_BehaviorID, LWOOBJID_EMPTY, true); } if (timerName == m_KillSelfTimerName) { diff --git a/dScripts/ai/FV/FvPandaServer.cpp b/dScripts/ai/FV/FvPandaServer.cpp index 0d661d53..f29f7f2e 100644 --- a/dScripts/ai/FV/FvPandaServer.cpp +++ b/dScripts/ai/FV/FvPandaServer.cpp @@ -4,7 +4,7 @@ #include "ePetTamingNotifyType.h" void FvPandaServer::OnStartup(Entity* self) { - const auto petComponent = self->GetComponent(); + const auto* petComponent = self->GetComponent(); if (petComponent != nullptr && petComponent->GetOwner() == nullptr) { self->SetNetworkVar(u"pandatamer", std::to_string(self->GetVar(u"tamer"))); self->AddTimer("killSelf", 45); @@ -28,7 +28,7 @@ void FvPandaServer::OnNotifyPetTamingMinigame(Entity* self, Entity* tamer, ePetT void FvPandaServer::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "killSelf") { - const auto petComponent = self->GetComponent(); + const auto* petComponent = self->GetComponent(); if (petComponent != nullptr && petComponent->GetOwner() == nullptr) { self->Smash(self->GetObjectID(), eKillType::SILENT); } diff --git a/dScripts/ai/FV/FvPandaSpawnerServer.cpp b/dScripts/ai/FV/FvPandaSpawnerServer.cpp index 3acea410..d7dcabcd 100644 --- a/dScripts/ai/FV/FvPandaSpawnerServer.cpp +++ b/dScripts/ai/FV/FvPandaSpawnerServer.cpp @@ -14,7 +14,7 @@ void FvPandaSpawnerServer::OnCollisionPhantom(Entity* self, Entity* target) { return; // Check if the player is currently in a footrace - auto scriptedActivityComponent = raceObjects.at(0)->GetComponent(); + auto* scriptedActivityComponent = raceObjects.at(0)->GetComponent(); if (scriptedActivityComponent == nullptr || !scriptedActivityComponent->IsPlayedBy(target)) return; diff --git a/dScripts/ai/FV/FvPassThroughWall.cpp b/dScripts/ai/FV/FvPassThroughWall.cpp index 08de5a77..9154d41c 100644 --- a/dScripts/ai/FV/FvPassThroughWall.cpp +++ b/dScripts/ai/FV/FvPassThroughWall.cpp @@ -3,11 +3,11 @@ #include "MissionComponent.h" void FvPassThroughWall::OnCollisionPhantom(Entity* self, Entity* target) { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent == nullptr) return; //Because at the moment we do not have an ItemComponent component, we check to make sure a Maelstrom-Infused hood is equipped. There are only three in the game right now. - auto inventoryComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); // If no inventory component is found then abort. if (inventoryComponent == nullptr) return; // If no Maelstrom hoods are equipped then abort. diff --git a/dScripts/ai/FV/TriggerGas.cpp b/dScripts/ai/FV/TriggerGas.cpp index fa70b0ae..8ff1ccbe 100644 --- a/dScripts/ai/FV/TriggerGas.cpp +++ b/dScripts/ai/FV/TriggerGas.cpp @@ -33,10 +33,10 @@ void TriggerGas::OnTimerDone(Entity* self, std::string timerName) { if (position != players.end()) players.erase(position); continue; } - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); if (inventoryComponent) { if (!inventoryComponent->IsEquipped(this->m_MaelstromHelmet)) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (skillComponent) { skillComponent->CastSkill(this->m_FogDamageSkill, player->GetObjectID()); } diff --git a/dScripts/ai/GENERAL/LegoDieRoll.cpp b/dScripts/ai/GENERAL/LegoDieRoll.cpp index d790e0f9..763a4704 100644 --- a/dScripts/ai/GENERAL/LegoDieRoll.cpp +++ b/dScripts/ai/GENERAL/LegoDieRoll.cpp @@ -37,7 +37,7 @@ void LegoDieRoll::OnTimerDone(Entity* self, std::string timerName) { RenderComponent::PlayAnimation(self, u"roll-die-6"); // tracking the It's Truly Random Achievement auto* owner = self->GetOwner(); - auto missionComponent = owner->GetComponent(); + auto* missionComponent = owner->GetComponent(); if (missionComponent != nullptr) { const auto rollMissionState = missionComponent->GetMissionState(756); diff --git a/dScripts/ai/GF/GfArchway.cpp b/dScripts/ai/GF/GfArchway.cpp index 0154c3b5..429f62ae 100644 --- a/dScripts/ai/GF/GfArchway.cpp +++ b/dScripts/ai/GF/GfArchway.cpp @@ -3,6 +3,6 @@ #include "SkillComponent.h" void GfArchway::OnRebuildComplete(Entity* self, Entity* target) { - auto skillComponent = target->GetComponent(); + auto* skillComponent = target->GetComponent(); if (skillComponent) skillComponent->CalculateBehavior(SHIELDING_SKILL, SHIELDING_BEHAVIOR, target->GetObjectID(), true); } diff --git a/dScripts/ai/GF/GfBanana.cpp b/dScripts/ai/GF/GfBanana.cpp index 0c233e86..95a831cd 100644 --- a/dScripts/ai/GF/GfBanana.cpp +++ b/dScripts/ai/GF/GfBanana.cpp @@ -38,7 +38,7 @@ void GfBanana::OnStartup(Entity* self) { } void GfBanana::OnHit(Entity* self, Entity* attacker) { - auto destroyable = self->GetComponent(); + auto* destroyable = self->GetComponent(); destroyable->SetHealth(9999); @@ -58,7 +58,7 @@ void GfBanana::OnHit(Entity* self, Entity* attacker) { bananaEntity->SetPosition(bananaEntity->GetPosition() - NiPoint3::UNIT_Y * 8); - auto bananaDestroyable = bananaEntity->GetComponent(); + auto* bananaDestroyable = bananaEntity->GetComponent(); bananaDestroyable->SetHealth(0); diff --git a/dScripts/ai/GF/GfCampfire.cpp b/dScripts/ai/GF/GfCampfire.cpp index 8e7e28a1..6b914a7b 100644 --- a/dScripts/ai/GF/GfCampfire.cpp +++ b/dScripts/ai/GF/GfCampfire.cpp @@ -11,7 +11,7 @@ void GfCampfire::OnStartup(Entity* self) { self->SetProximityRadius(2.0f, "placeholder"); self->SetBoolean(u"isBurning", true); - auto render = self->GetComponent(); + auto* render = self->GetComponent(); if (render == nullptr) return; @@ -21,14 +21,14 @@ void GfCampfire::OnStartup(Entity* self) { void GfCampfire::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (args == "physicsReady") { - auto render = self->GetComponent(); + auto* render = self->GetComponent(); render->PlayEffect(295, u"running", "Burn"); } } void GfCampfire::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) { - auto skill = self->GetComponent(); + auto* skill = self->GetComponent(); if (self->GetBoolean(u"isBurning")) { if (status == "ENTER") { @@ -43,7 +43,7 @@ void GfCampfire::OnProximityUpdate(Entity* self, Entity* entering, std::string n //self->SetVar("target", entering->GetObjectID()); - auto missionComponet = entering->GetComponent(); + auto* missionComponet = entering->GetComponent(); if (missionComponet != nullptr) { missionComponet->ForceProgress(440, 658, 1); @@ -65,7 +65,7 @@ void GfCampfire::OnProximityUpdate(Entity* self, Entity* entering, std::string n void GfCampfire::OnSkillEventFired(Entity* self, Entity* caster, const std::string& message) { if (message == "waterspray" && self->GetVar(u"isBurning")) { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("Burn"); renderComponent->PlayEffect(295, u"idle", "Off"); @@ -91,7 +91,7 @@ void GfCampfire::OnTimerDone(Entity* self, std::string timerName) { } */ } else if (timerName == "FireRestart" && !self->GetVar(u"isBurning")) { - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent != nullptr) { renderComponent->StopEffect("Off"); renderComponent->PlayEffect(295, u"running", "Burn"); diff --git a/dScripts/ai/GF/GfJailkeepMission.cpp b/dScripts/ai/GF/GfJailkeepMission.cpp index 767d7503..b8d4cd30 100644 --- a/dScripts/ai/GF/GfJailkeepMission.cpp +++ b/dScripts/ai/GF/GfJailkeepMission.cpp @@ -4,7 +4,7 @@ #include "eMissionState.h" void GfJailkeepMission::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent == nullptr) return; @@ -25,7 +25,7 @@ void GfJailkeepMission::OnMissionDialogueOK(Entity* self, Entity* target, int mi } void GfJailkeepMission::OnUse(Entity* self, Entity* user) { - auto missionComponent = user->GetComponent(); + auto* missionComponent = user->GetComponent(); if (missionComponent == nullptr) return; diff --git a/dScripts/ai/GF/GfMaelstromGeyser.cpp b/dScripts/ai/GF/GfMaelstromGeyser.cpp index 4761c450..825307a7 100644 --- a/dScripts/ai/GF/GfMaelstromGeyser.cpp +++ b/dScripts/ai/GF/GfMaelstromGeyser.cpp @@ -8,7 +8,7 @@ void GfMaelstromGeyser::OnStartup(Entity* self) { void GfMaelstromGeyser::OnTimerDone(Entity* self, std::string timerName) { if (timerName == m_StartSkillTimerName) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); skillComponent->CalculateBehavior(m_SkillID, m_BehaviorID, LWOOBJID_EMPTY, true); } if (timerName == m_KillSelfTimerName) { diff --git a/dScripts/ai/GF/GfParrotCrash.cpp b/dScripts/ai/GF/GfParrotCrash.cpp index f8e53e68..6b76a51d 100644 --- a/dScripts/ai/GF/GfParrotCrash.cpp +++ b/dScripts/ai/GF/GfParrotCrash.cpp @@ -4,7 +4,7 @@ #include "dLogger.h" void GfParrotCrash::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (args == "Slow") { skillComponent->CalculateBehavior(m_SlowSkillID, m_SlowBehaviorID, sender->GetObjectID()); } else if (args == "Unslow") { diff --git a/dScripts/ai/GF/PetDigBuild.cpp b/dScripts/ai/GF/PetDigBuild.cpp index 431bcde5..504a1199 100644 --- a/dScripts/ai/GF/PetDigBuild.cpp +++ b/dScripts/ai/GF/PetDigBuild.cpp @@ -22,7 +22,7 @@ void PetDigBuild::OnRebuildComplete(Entity* self, Entity* target) { info.lot = 7410; // Normal GF treasure info.settings.push_back(new LDFData(u"groupID", u"Flag" + flagNumber)); } else { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent != nullptr && missionComponent->GetMissionState(746) == eMissionState::ACTIVE) { info.lot = 9307; // Special Captain Jack treasure that drops a mission item } else { diff --git a/dScripts/ai/MINIGAME/SG_GF/SERVER/SGCannon.cpp b/dScripts/ai/MINIGAME/SG_GF/SERVER/SGCannon.cpp index a4786a78..af2f4050 100644 --- a/dScripts/ai/MINIGAME/SG_GF/SERVER/SGCannon.cpp +++ b/dScripts/ai/MINIGAME/SG_GF/SERVER/SGCannon.cpp @@ -30,7 +30,7 @@ void SGCannon::OnStartup(Entity* self) { self->SetVar(InitialVelocityVariable, {}); self->SetVar(ImpactSkillVariale, constants.impactSkillID); - auto shootingGalleryComponent = self->GetComponent(); + auto* shootingGalleryComponent = self->GetComponent(); if (shootingGalleryComponent != nullptr) { shootingGalleryComponent->SetStaticParams({ Vector3 { -327.8609924316406, 256.8999938964844, 1.6482199430465698 }, @@ -57,7 +57,7 @@ void SGCannon::OnStartup(Entity* self) { self->SetVar(MatrixVariable, 1); self->SetVar(InitVariable, true); - auto simplePhysicsComponent = self->GetComponent(); + auto* simplePhysicsComponent = self->GetComponent(); if (simplePhysicsComponent != nullptr) { simplePhysicsComponent->SetPhysicsMotionState(5); @@ -88,7 +88,7 @@ void SGCannon::OnActivityStateChangeRequest(Entity* self, LWOOBJID senderID, int GameMessages::SendActivityEnter(self->GetObjectID(), player->GetSystemAddress()); - auto shootingGalleryComponent = self->GetComponent(); + auto* shootingGalleryComponent = self->GetComponent(); if (shootingGalleryComponent != nullptr) { shootingGalleryComponent->SetCurrentPlayerID(player->GetObjectID()); @@ -100,12 +100,12 @@ void SGCannon::OnActivityStateChangeRequest(Entity* self, LWOOBJID senderID, int Game::logger->Log("SGCannon", "Shooting gallery component is null"); } - auto characterComponent = player->GetComponent(); + auto* characterComponent = player->GetComponent(); if (characterComponent != nullptr) { characterComponent->SetIsRacing(true); characterComponent->SetCurrentActivity(eGameActivity::SHOOTING_GALLERY); - auto possessor = player->GetComponent(); + auto* possessor = player->GetComponent(); if (possessor) { possessor->SetPossessable(self->GetObjectID()); possessor->SetPossessableType(ePossessionType::NO_POSSESSION); @@ -552,7 +552,7 @@ void SGCannon::StopGame(Entity* self, bool cancel) { percentage = misses / fired; } - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent != nullptr) { missionComponent->Progress(eMissionTaskType::PERFORM_ACTIVITY, self->GetVar(TotalScoreVariable), self->GetObjectID(), "performact_score"); @@ -566,7 +566,7 @@ void SGCannon::StopGame(Entity* self, bool cancel) { self->SetNetworkVar(AudioFinalWaveDoneVariable, true); // Give the player the model rewards they earned - auto inventory = player->GetComponent(); + auto* inventory = player->GetComponent(); if (inventory != nullptr) { for (const auto rewardLot : self->GetVar>(RewardsVariable)) { inventory->AddItem(rewardLot, 1, eLootSourceType::ACTIVITY, eInventoryType::MODELS); @@ -664,7 +664,7 @@ void SGCannon::RegisterHit(Entity* self, Entity* target, const std::string& time auto* player = EntityManager::Instance()->GetEntity(self->GetVar(PlayerIDVariable)); if (player == nullptr) return; - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent == nullptr) return; missionComponent->Progress(eMissionTaskType::SMASH, spawnInfo.lot, self->GetObjectID()); @@ -718,7 +718,7 @@ void SGCannon::ToggleSuperCharge(Entity* self, bool enable) { return; } - auto inventoryComponent = player->GetComponent(); + auto* inventoryComponent = player->GetComponent(); auto equippedItems = inventoryComponent->GetEquippedItems(); @@ -727,7 +727,7 @@ void SGCannon::ToggleSuperCharge(Entity* self, bool enable) { auto skillID = constants.cannonSkill; auto cooldown = constants.cannonRefireRate; - auto selfInventoryComponent = self->GetComponent(); + auto* selfInventoryComponent = self->GetComponent(); if (inventoryComponent == nullptr) { Game::logger->Log("SGCannon", "Inventory component not found"); @@ -770,7 +770,7 @@ void SGCannon::ToggleSuperCharge(Entity* self, bool enable) { const auto& constants = GetConstants(); - auto shootingGalleryComponent = self->GetComponent(); + auto* shootingGalleryComponent = self->GetComponent(); if (shootingGalleryComponent == nullptr) { return; diff --git a/dScripts/ai/NP/NpcNpSpacemanBob.cpp b/dScripts/ai/NP/NpcNpSpacemanBob.cpp index 9fe71e33..0e898f7c 100644 --- a/dScripts/ai/NP/NpcNpSpacemanBob.cpp +++ b/dScripts/ai/NP/NpcNpSpacemanBob.cpp @@ -6,9 +6,9 @@ void NpcNpSpacemanBob::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { if (missionState == eMissionState::READY_TO_COMPLETE && missionID == 173) { - auto destroyable = target->GetComponent(); + auto* destroyable = target->GetComponent(); destroyable->SetImagination(6); - auto mission = target->GetComponent(); + auto* mission = target->GetComponent(); mission->CompleteMission(664); } diff --git a/dScripts/ai/NS/NsConcertInstrument.cpp b/dScripts/ai/NS/NsConcertInstrument.cpp index 39a45205..ba99d4d1 100644 --- a/dScripts/ai/NS/NsConcertInstrument.cpp +++ b/dScripts/ai/NS/NsConcertInstrument.cpp @@ -72,7 +72,7 @@ void NsConcertInstrument::OnTimerDone(Entity* self, std::string name) { if (activePlayer != nullptr && name == "checkPlayer" && self->GetVar(u"beingPlayed")) { GameMessages::SendNotifyClientObject(self->GetObjectID(), u"checkMovement", 0, 0, activePlayer->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS); - auto stats = activePlayer->GetComponent(); + auto* stats = activePlayer->GetComponent(); if (stats) { if (stats->GetImagination() > 0) { self->AddTimer("checkPlayer", updateFrequency); @@ -81,7 +81,7 @@ void NsConcertInstrument::OnTimerDone(Entity* self, std::string name) { } } } else if (activePlayer != nullptr && name == "deductImagination" && self->GetVar(u"beingPlayed")) { - auto stats = activePlayer->GetComponent(); + auto* stats = activePlayer->GetComponent(); if (stats) stats->SetImagination(stats->GetImagination() - instrumentImaginationCost); @@ -93,20 +93,20 @@ void NsConcertInstrument::OnTimerDone(Entity* self, std::string name) { activePlayer->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS); } - auto rebuildComponent = self->GetComponent(); + auto* rebuildComponent = self->GetComponent(); if (rebuildComponent != nullptr) rebuildComponent->ResetRebuild(false); self->Smash(self->GetObjectID(), eKillType::VIOLENT); self->SetVar(u"activePlayer", LWOOBJID_EMPTY); } else if (activePlayer != nullptr && name == "achievement") { - auto missionComponent = activePlayer->GetComponent(); + auto* missionComponent = activePlayer->GetComponent(); if (missionComponent != nullptr) { missionComponent->ForceProgress(302, 462, self->GetLOT()); } self->AddTimer("achievement2", 10.0f); } else if (activePlayer != nullptr && name == "achievement2") { - auto missionComponent = activePlayer->GetComponent(); + auto* missionComponent = activePlayer->GetComponent(); if (missionComponent != nullptr) { missionComponent->ForceProgress(602, achievementTaskID.at(GetInstrumentLot(self)), self->GetLOT()); } @@ -127,7 +127,7 @@ void NsConcertInstrument::StartPlayingInstrument(Entity* self, Entity* player) { }); for (auto* soundBox : EntityManager::Instance()->GetEntitiesInGroup("Audio-Concert")) { - auto soundTrigger = soundBox->GetComponent(); + auto* soundTrigger = soundBox->GetComponent(); if (soundTrigger != nullptr) { soundTrigger->ActivateMusicCue(music.at(instrumentLot)); } @@ -148,7 +148,7 @@ void NsConcertInstrument::StopPlayingInstrument(Entity* self, Entity* player) { // Player might be null if they left if (player != nullptr) { - auto missions = player->GetComponent(); + auto* missions = player->GetComponent(); if (missions != nullptr && missions->GetMissionState(176) == eMissionState::ACTIVE) { missions->Progress(eMissionTaskType::SCRIPT, self->GetLOT()); } @@ -162,7 +162,7 @@ void NsConcertInstrument::StopPlayingInstrument(Entity* self, Entity* player) { self->SetVar(u"beingPlayed", false); for (auto* soundBox : EntityManager::Instance()->GetEntitiesInGroup("Audio-Concert")) { - auto soundTrigger = soundBox->GetComponent(); + auto* soundTrigger = soundBox->GetComponent(); if (soundTrigger != nullptr) { soundTrigger->DeactivateMusicCue(music.at(instrumentLot)); } @@ -173,7 +173,7 @@ void NsConcertInstrument::StopPlayingInstrument(Entity* self, Entity* player) { } void NsConcertInstrument::EquipInstruments(Entity* self, Entity* player) { - auto inventory = player->GetComponent(); + auto* inventory = player->GetComponent(); if (inventory != nullptr) { auto equippedItems = inventory->GetEquippedItems(); @@ -216,7 +216,7 @@ void NsConcertInstrument::EquipInstruments(Entity* self, Entity* player) { } void NsConcertInstrument::UnEquipInstruments(Entity* self, Entity* player) { - auto inventory = player->GetComponent(); + auto* inventory = player->GetComponent(); if (inventory != nullptr) { auto equippedItems = inventory->GetEquippedItems(); diff --git a/dScripts/ai/NS/NsConcertQuickBuild.cpp b/dScripts/ai/NS/NsConcertQuickBuild.cpp index c27f1b9a..1e771625 100644 --- a/dScripts/ai/NS/NsConcertQuickBuild.cpp +++ b/dScripts/ai/NS/NsConcertQuickBuild.cpp @@ -103,7 +103,7 @@ void NsConcertQuickBuild::OnRebuildComplete(Entity* self, Entity* target) { // Move all the platforms so the user can collect the imagination brick const auto movingPlatforms = EntityManager::Instance()->GetEntitiesInGroup("ConcertPlatforms"); for (auto* movingPlatform : movingPlatforms) { - auto component = movingPlatform->GetComponent(); + auto* component = movingPlatform->GetComponent(); if (component) { component->WarpToWaypoint(component->GetLastWaypointIndex()); @@ -132,7 +132,7 @@ void NsConcertQuickBuild::OnRebuildComplete(Entity* self, Entity* target) { quickBuild->Smash(); }); - auto destroyableComponent = quickBuild->GetComponent(); + auto* destroyableComponent = quickBuild->GetComponent(); if (destroyableComponent) destroyableComponent->SetFaction(-1); } @@ -157,7 +157,7 @@ void NsConcertQuickBuild::OnRebuildComplete(Entity* self, Entity* target) { } void NsConcertQuickBuild::ProgressStageCraft(Entity* self, Entity* player) { - auto missionComponent = player->GetComponent(); + auto* missionComponent = player->GetComponent(); if (missionComponent) { // Has to be forced as to not accidentally trigger the licensed technician achievement @@ -186,7 +186,7 @@ void NsConcertQuickBuild::ProgressLicensedTechnician(Entity* self) { if (playerID != LWOOBJID_EMPTY) { const auto player = EntityManager::Instance()->GetEntity(playerID); if (player) { - auto playerMissionComponent = player->GetComponent(); + auto* playerMissionComponent = player->GetComponent(); if (playerMissionComponent) playerMissionComponent->ForceProgress(598, 903, self->GetLOT()); } diff --git a/dScripts/ai/NS/NsGetFactionMissionServer.cpp b/dScripts/ai/NS/NsGetFactionMissionServer.cpp index 1c42c1f7..1b2fcf9a 100644 --- a/dScripts/ai/NS/NsGetFactionMissionServer.cpp +++ b/dScripts/ai/NS/NsGetFactionMissionServer.cpp @@ -46,7 +46,7 @@ void NsGetFactionMissionServer::OnRespondToMission(Entity* self, int missionID, player->GetCharacter()->SetPlayerFlag(flagID, true); } - auto mis = player->GetComponent(); + auto* mis = player->GetComponent(); for (int mission : factionMissions) { mis->AcceptMission(mission); diff --git a/dScripts/ai/NS/NsJohnnyMissionServer.cpp b/dScripts/ai/NS/NsJohnnyMissionServer.cpp index 9052482f..107d3c44 100644 --- a/dScripts/ai/NS/NsJohnnyMissionServer.cpp +++ b/dScripts/ai/NS/NsJohnnyMissionServer.cpp @@ -4,7 +4,7 @@ void NsJohnnyMissionServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { if (missionID == 773 && missionState <= eMissionState::ACTIVE) { - auto missionComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); if (missionComponent != nullptr) { missionComponent->AcceptMission(774); missionComponent->AcceptMission(775); diff --git a/dScripts/ai/NS/NsModularBuild.cpp b/dScripts/ai/NS/NsModularBuild.cpp index ed90fbb7..75bcbee5 100644 --- a/dScripts/ai/NS/NsModularBuild.cpp +++ b/dScripts/ai/NS/NsModularBuild.cpp @@ -5,7 +5,7 @@ void NsModularBuild::OnModularBuildExit(Entity* self, Entity* player, bool bCompleted, std::vector modules) { if (bCompleted) { - auto mission = self->GetComponent(); + auto* mission = self->GetComponent(); if (mission->GetMissionState(m_MissionNum) == eMissionState::ACTIVE) { for (LOT mod : modules) { diff --git a/dScripts/ai/NS/WhFans.cpp b/dScripts/ai/NS/WhFans.cpp index d5f8bb65..d97a2158 100644 --- a/dScripts/ai/NS/WhFans.cpp +++ b/dScripts/ai/NS/WhFans.cpp @@ -25,7 +25,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) { std::vector fanVolumes = EntityManager::Instance()->GetEntitiesInGroup(fanGroup); - auto renderComponent = self->GetComponent(); + auto* renderComponent = self->GetComponent(); if (renderComponent == nullptr) return; @@ -38,7 +38,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) { self->SetVar(u"on", false); for (Entity* volume : fanVolumes) { - auto volumePhys = volume->GetComponent(); + auto* volumePhys = volume->GetComponent(); if (!volumePhys) continue; volumePhys->SetPhysicsEffectActive(false); EntityManager::Instance()->SerializeEntity(volume); @@ -49,7 +49,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) { self->SetVar(u"on", true); for (Entity* volume : fanVolumes) { - auto volumePhys = volume->GetComponent(); + auto* volumePhys = volume->GetComponent(); if (!volumePhys) continue; volumePhys->SetPhysicsEffectActive(true); EntityManager::Instance()->SerializeEntity(volume); diff --git a/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp b/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp index fd6d5113..853da92d 100644 --- a/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp +++ b/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp @@ -9,8 +9,8 @@ void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) { auto* character = target->GetCharacter(); - auto missionComponent = target->GetComponent(); - auto inventoryComponent = target->GetComponent(); + auto* missionComponent = target->GetComponent(); + auto* inventoryComponent = target->GetComponent(); const auto state = missionComponent->GetMissionState(320); if (missionID == 768 && missionState == eMissionState::AVAILABLE) { diff --git a/dScripts/ai/PROPERTY/PropertyFXDamage.cpp b/dScripts/ai/PROPERTY/PropertyFXDamage.cpp index 6071da10..56079384 100644 --- a/dScripts/ai/PROPERTY/PropertyFXDamage.cpp +++ b/dScripts/ai/PROPERTY/PropertyFXDamage.cpp @@ -6,8 +6,8 @@ void PropertyFXDamage::OnCollisionPhantom(Entity* self, Entity* target) { if (target == nullptr) return; - auto skills = self->GetComponent(); - auto targetStats = target->GetComponent(); + auto* skills = self->GetComponent(); + auto* targetStats = target->GetComponent(); if (skills != nullptr && targetStats != nullptr) { auto targetFactions = targetStats->GetFactionIDs(); diff --git a/dScripts/ai/RACING/OBJECTS/FvRaceSmashEggImagineServer.cpp b/dScripts/ai/RACING/OBJECTS/FvRaceSmashEggImagineServer.cpp index 6e8c38e5..f69a3eb6 100644 --- a/dScripts/ai/RACING/OBJECTS/FvRaceSmashEggImagineServer.cpp +++ b/dScripts/ai/RACING/OBJECTS/FvRaceSmashEggImagineServer.cpp @@ -9,21 +9,21 @@ void FvRaceSmashEggImagineServer::OnDie(Entity* self, Entity* killer) { if (killer != nullptr) { - auto destroyableComponent = killer->GetComponent(); + auto* destroyableComponent = killer->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetImagination(destroyableComponent->GetImagination() + 10); EntityManager::Instance()->SerializeEntity(killer); } // get possessor to progress statistics and tasks. - auto possessableComponent = killer->GetComponent(); + auto* possessableComponent = killer->GetComponent(); if (possessableComponent != nullptr) { auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor()); if (possessor != nullptr) { - auto missionComponent = possessor->GetComponent(); - auto characterComponent = possessor->GetComponent(); + auto* missionComponent = possessor->GetComponent(); + auto* characterComponent = possessor->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic(ImaginationPowerUpsCollected); characterComponent->UpdatePlayerStatistic(RacingSmashablesSmashed); diff --git a/dScripts/ai/RACING/OBJECTS/RaceImagineCrateServer.cpp b/dScripts/ai/RACING/OBJECTS/RaceImagineCrateServer.cpp index 2b03b8e5..6a29f9a8 100644 --- a/dScripts/ai/RACING/OBJECTS/RaceImagineCrateServer.cpp +++ b/dScripts/ai/RACING/OBJECTS/RaceImagineCrateServer.cpp @@ -19,13 +19,13 @@ void RaceImagineCrateServer::OnDie(Entity* self, Entity* killer) { return; } - auto skillComponent = killer->GetComponent(); + auto* skillComponent = killer->GetComponent(); if (skillComponent == nullptr) { return; } - auto destroyableComponent = killer->GetComponent(); + auto* destroyableComponent = killer->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->SetImagination(60); @@ -34,14 +34,14 @@ void RaceImagineCrateServer::OnDie(Entity* self, Entity* killer) { } // Find possessor of race car to progress missions and update stats. - auto possessableComponent = killer->GetComponent(); + auto* possessableComponent = killer->GetComponent(); if (possessableComponent != nullptr) { auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor()); if (possessor != nullptr) { - auto missionComponent = possessor->GetComponent(); - auto characterComponent = possessor->GetComponent(); + auto* missionComponent = possessor->GetComponent(); + auto* characterComponent = possessor->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic(RacingImaginationCratesSmashed); diff --git a/dScripts/ai/RACING/OBJECTS/RaceImaginePowerup.cpp b/dScripts/ai/RACING/OBJECTS/RaceImaginePowerup.cpp index fe0a1595..92a50873 100644 --- a/dScripts/ai/RACING/OBJECTS/RaceImaginePowerup.cpp +++ b/dScripts/ai/RACING/OBJECTS/RaceImaginePowerup.cpp @@ -9,7 +9,7 @@ void RaceImaginePowerup::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { if (sender->IsPlayer() && args == "powerup") { - auto possessorComponent = sender->GetComponent(); + auto* possessorComponent = sender->GetComponent(); if (possessorComponent == nullptr) { return; @@ -21,7 +21,7 @@ void RaceImaginePowerup::OnFireEventServerSide(Entity* self, Entity* sender, std return; } - auto destroyableComponent = vehicle->GetComponent(); + auto* destroyableComponent = vehicle->GetComponent(); if (destroyableComponent == nullptr) { return; @@ -29,7 +29,7 @@ void RaceImaginePowerup::OnFireEventServerSide(Entity* self, Entity* sender, std destroyableComponent->Imagine(10); - auto missionComponent = sender->GetComponent(); + auto* missionComponent = sender->GetComponent(); if (missionComponent == nullptr) return; missionComponent->Progress(eMissionTaskType::RACING, self->GetLOT(), (LWOOBJID)eRacingTaskParam::COLLECT_IMAGINATION); diff --git a/dScripts/ai/RACING/OBJECTS/RaceSmashServer.cpp b/dScripts/ai/RACING/OBJECTS/RaceSmashServer.cpp index 298bc1eb..295f38ee 100644 --- a/dScripts/ai/RACING/OBJECTS/RaceSmashServer.cpp +++ b/dScripts/ai/RACING/OBJECTS/RaceSmashServer.cpp @@ -8,14 +8,14 @@ void RaceSmashServer::OnDie(Entity* self, Entity* killer) { // Crate is smashed by the car - auto possessableComponent = killer->GetComponent(); + auto* possessableComponent = killer->GetComponent(); if (possessableComponent != nullptr) { auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor()); if (possessor != nullptr) { - auto missionComponent = possessor->GetComponent(); - auto characterComponent = possessor->GetComponent(); + auto* missionComponent = possessor->GetComponent(); + auto* characterComponent = possessor->GetComponent(); if (characterComponent != nullptr) { characterComponent->UpdatePlayerStatistic(RacingSmashablesSmashed); diff --git a/dScripts/ai/SPEC/SpecialPowerupSpawner.cpp b/dScripts/ai/SPEC/SpecialPowerupSpawner.cpp index 72565923..812d600e 100644 --- a/dScripts/ai/SPEC/SpecialPowerupSpawner.cpp +++ b/dScripts/ai/SPEC/SpecialPowerupSpawner.cpp @@ -17,7 +17,7 @@ void SpecialPowerupSpawner::OnProximityUpdate(Entity* self, Entity* entering, co GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true); - auto skillComponent = self->GetComponent(); + auto* skillComponent = self->GetComponent(); if (!skillComponent) return; skillComponent->CastSkill(this->m_SkillId, entering->GetObjectID()); diff --git a/dScripts/ai/SPEC/SpecialSpeedBuffSpawner.cpp b/dScripts/ai/SPEC/SpecialSpeedBuffSpawner.cpp index d3109806..33756b4b 100644 --- a/dScripts/ai/SPEC/SpecialSpeedBuffSpawner.cpp +++ b/dScripts/ai/SPEC/SpecialSpeedBuffSpawner.cpp @@ -17,7 +17,7 @@ void SpecialSpeedBuffSpawner::OnProximityUpdate(Entity* self, Entity* entering, GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true); - auto skillComponent = entering->GetComponent(); + auto* skillComponent = entering->GetComponent(); if (!skillComponent) return; skillComponent->CastSkill(this->m_SkillId, entering->GetObjectID()); diff --git a/dScripts/client/ai/PR/CrabServer.cpp b/dScripts/client/ai/PR/CrabServer.cpp index 6212f33c..f30142ba 100644 --- a/dScripts/client/ai/PR/CrabServer.cpp +++ b/dScripts/client/ai/PR/CrabServer.cpp @@ -3,7 +3,7 @@ #include "ePetTamingNotifyType.h" void CrabServer::OnStartup(Entity* self) { - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr || petComponent->GetOwner() != nullptr) return; @@ -20,7 +20,7 @@ void CrabServer::OnTimerDone(Entity* self, std::string timerName) { if (timerName == "killself") { // Don't accidentally kill a pet that is already owned - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr || petComponent->GetOwner() != nullptr) return; @@ -34,7 +34,7 @@ void CrabServer::OnNotifyPetTamingMinigame(Entity* self, Entity* tamer, ePetTami } else if (type == ePetTamingNotifyType::QUIT || type == ePetTamingNotifyType::FAILED) { self->Smash(self->GetObjectID(), eKillType::SILENT); } else if (type == ePetTamingNotifyType::SUCCESS) { - auto petComponent = self->GetComponent(); + auto* petComponent = self->GetComponent(); if (petComponent == nullptr) return; // TODO: Remove custom group? diff --git a/dWorldServer/WorldServer.cpp b/dWorldServer/WorldServer.cpp index 0fa658ad..18625960 100644 --- a/dWorldServer/WorldServer.cpp +++ b/dWorldServer/WorldServer.cpp @@ -685,7 +685,7 @@ void HandlePacket(Packet* packet) { } if (entity) { - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); if (skillComponent != nullptr) { skillComponent->Reset(); @@ -1020,13 +1020,13 @@ void HandlePacket(Packet* packet) { EntityManager::Instance()->ConstructAllEntities(packet->systemAddress); - auto characterComponent = player->GetComponent(); + auto* characterComponent = player->GetComponent(); if (characterComponent) { player->GetComponent()->RocketUnEquip(player); } // Do charxml fixes here - auto levelComponent = player->GetComponent(); + auto* levelComponent = player->GetComponent(); if (!levelComponent) return; auto version = levelComponent->GetCharacterVersion(); @@ -1052,7 +1052,7 @@ void HandlePacket(Packet* packet) { player->GetCharacter()->SetTargetScene(""); // Fix the destroyable component - auto destroyableComponent = player->GetComponent(); + auto* destroyableComponent = player->GetComponent(); if (destroyableComponent != nullptr) { destroyableComponent->FixStats(); @@ -1281,7 +1281,7 @@ void WorldShutdownProcess(uint32_t zoneId) { auto* entity = Player::GetPlayer(player); Game::logger->Log("WorldServer", "Saving data!"); if (entity != nullptr && entity->GetCharacter() != nullptr) { - auto skillComponent = entity->GetComponent(); + auto* skillComponent = entity->GetComponent(); if (skillComponent != nullptr) { skillComponent->Reset();