mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Replace all auto with auto*
For components
This commit is contained in:
@@ -24,7 +24,7 @@ void NtAssemblyTubeServer::OnProximityUpdate(Entity* self, Entity* entering, std
|
||||
|
||||
RunAssemblyTube(self, player);
|
||||
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT());
|
||||
|
@@ -24,7 +24,7 @@ void NtCombatChallengeExplodingDummy::OnHitOrHealResult(Entity* self, Entity* at
|
||||
script->OnHitOrHealResult(challengeObject, attacker, damage);
|
||||
}
|
||||
}
|
||||
auto skillComponent = self->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (skillComponent != nullptr) {
|
||||
skillComponent->CalculateBehavior(1338, 30875, attacker->GetObjectID());
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender,
|
||||
|
||||
self->SetVar(u"playerID", sender->GetObjectID());
|
||||
|
||||
auto inventoryComponent = sender->GetComponent<InventoryComponent>();
|
||||
auto* inventoryComponent = sender->GetComponent<InventoryComponent>();
|
||||
|
||||
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<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
for (const auto& mission : tMissions) {
|
||||
|
@@ -6,7 +6,7 @@ void NtDarkitectRevealServer::OnUse(Entity* self, Entity* user) {
|
||||
Darkitect Baron;
|
||||
Baron.Reveal(self, user);
|
||||
|
||||
auto missionComponent = user->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = user->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->ForceProgressTaskType(1344, 1, 14293);
|
||||
|
@@ -30,7 +30,7 @@ void NtDirtCloudServer::OnSkillEventFired(Entity* self, Entity* caster, const st
|
||||
|
||||
const auto& myMis = m_Missions[mySpawner];
|
||||
|
||||
auto missionComponent = caster->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = caster->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent == nullptr) {
|
||||
return;
|
||||
|
@@ -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<MissionComponent>();
|
||||
auto inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
|
||||
if (missionComponent != nullptr && inventoryComponent != nullptr) {
|
||||
auto state = missionComponent->GetMissionState(m_SwordMissionID);
|
||||
|
@@ -33,7 +33,7 @@ void NtImagBeamBuffer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto skillComponent = self->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent == nullptr) {
|
||||
return;
|
||||
|
@@ -15,7 +15,7 @@ void NtParadoxPanelServer::OnUse(Entity* self, Entity* user) {
|
||||
|
||||
self->SetVar(u"bActive", true);
|
||||
|
||||
auto missionComponent = user->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = user->GetComponent<MissionComponent>();
|
||||
|
||||
const auto playerID = user->GetObjectID();
|
||||
|
||||
|
@@ -43,7 +43,7 @@ void NtParadoxTeleServer::OnProximityUpdate(Entity* self, Entity* entering, std:
|
||||
});
|
||||
}
|
||||
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT());
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#include "ePhysicsEffectType.h"
|
||||
|
||||
void NtSentinelWalkwayServer::OnStartup(Entity* self) {
|
||||
auto phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
||||
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
|
||||
|
||||
if (phantomPhysicsComponent == nullptr) {
|
||||
return;
|
||||
@@ -37,7 +37,7 @@ void NtSentinelWalkwayServer::OnProximityUpdate(Entity* self, Entity* entering,
|
||||
|
||||
auto* player = entering;
|
||||
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT());
|
||||
|
@@ -20,7 +20,7 @@ void NtSleepingGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity*
|
||||
|
||||
RenderComponent::PlayAnimation(self, u"greet");
|
||||
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->CompleteMission(1346);
|
||||
|
@@ -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<InventoryComponent>();
|
||||
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
for (const auto& alienPartLot : m_AlienPartLots) {
|
||||
inventoryComponent->RemoveItem(alienPartLot, 1);
|
||||
}
|
||||
|
@@ -15,13 +15,13 @@ void NtVentureSpeedPadServer::OnProximityUpdate(Entity* self, Entity* entering,
|
||||
|
||||
auto* player = entering;
|
||||
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, self->GetLOT());
|
||||
}
|
||||
|
||||
auto skillComponent = player->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = player->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent != nullptr) {
|
||||
skillComponent->CalculateBehavior(927, 18913, player->GetObjectID(), true);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "SkillComponent.h"
|
||||
|
||||
void NtXRayServer::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto skillComponent = target->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = target->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent == nullptr) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user