mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 09:28:06 +00:00
Replace all auto with auto*
For components
This commit is contained in:
@@ -19,7 +19,7 @@ void ActParadoxPipeFix::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto rebuildComponent = object->GetComponent<RebuildComponent>();
|
||||
auto* rebuildComponent = object->GetComponent<RebuildComponent>();
|
||||
|
||||
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
|
||||
indexCount++;
|
||||
@@ -37,7 +37,7 @@ void ActParadoxPipeFix::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
auto* player = EntityManager::Instance()->GetEntity(object->GetVar<LWOOBJID>(u"PlayerID"));
|
||||
|
||||
if (player != nullptr) {
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->ForceProgressTaskType(769, 1, 1, false);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void FvBounceOverWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
if (missionComponent == nullptr) return;
|
||||
|
||||
// We force progress here to the Gate Crasher mission due to an overlap in LOTs with the 'Shark Bite' missions.
|
||||
|
@@ -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<RebuildComponent>();
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
|
||||
if (rebuildComponent != nullptr && rebuildComponent->GetState() == eRebuildState::OPEN) {
|
||||
self->Smash(self->GetObjectID(), eKillType::SILENT);
|
||||
|
@@ -40,7 +40,7 @@ void FvFlyingCreviceDragon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto skillComponent = group[0]->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = group[0]->GetComponent<SkillComponent>();
|
||||
|
||||
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<SkillComponent>();
|
||||
auto* skillComponent = group2[0]->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent != nullptr) {
|
||||
skillComponent->CalculateBehavior(762, 12506, LWOOBJID_EMPTY);
|
||||
|
@@ -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<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
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<MissionComponent>();
|
||||
auto* missionComponent = user->GetComponent<MissionComponent>();
|
||||
if (missionComponent == nullptr)
|
||||
return;
|
||||
|
||||
|
@@ -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<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
skillComponent->CalculateBehavior(m_SkillID, m_BehaviorID, LWOOBJID_EMPTY, true);
|
||||
}
|
||||
if (timerName == m_KillSelfTimerName) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include "ePetTamingNotifyType.h"
|
||||
|
||||
void FvPandaServer::OnStartup(Entity* self) {
|
||||
const auto petComponent = self->GetComponent<PetComponent>();
|
||||
const auto* petComponent = self->GetComponent<PetComponent>();
|
||||
if (petComponent != nullptr && petComponent->GetOwner() == nullptr) {
|
||||
self->SetNetworkVar<std::string>(u"pandatamer", std::to_string(self->GetVar<LWOOBJID>(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<PetComponent>();
|
||||
const auto* petComponent = self->GetComponent<PetComponent>();
|
||||
if (petComponent != nullptr && petComponent->GetOwner() == nullptr) {
|
||||
self->Smash(self->GetObjectID(), eKillType::SILENT);
|
||||
}
|
||||
|
@@ -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<ScriptedActivityComponent>();
|
||||
auto* scriptedActivityComponent = raceObjects.at(0)->GetComponent<ScriptedActivityComponent>();
|
||||
if (scriptedActivityComponent == nullptr || !scriptedActivityComponent->IsPlayedBy(target))
|
||||
return;
|
||||
|
||||
|
@@ -3,11 +3,11 @@
|
||||
#include "MissionComponent.h"
|
||||
|
||||
void FvPassThroughWall::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
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<InventoryComponent>();
|
||||
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
// If no inventory component is found then abort.
|
||||
if (inventoryComponent == nullptr) return;
|
||||
// If no Maelstrom hoods are equipped then abort.
|
||||
|
@@ -33,10 +33,10 @@ void TriggerGas::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (position != players.end()) players.erase(position);
|
||||
continue;
|
||||
}
|
||||
auto inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||
auto* inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||
if (inventoryComponent) {
|
||||
if (!inventoryComponent->IsEquipped(this->m_MaelstromHelmet)) {
|
||||
auto skillComponent = self->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (skillComponent) {
|
||||
skillComponent->CastSkill(this->m_FogDamageSkill, player->GetObjectID());
|
||||
}
|
||||
|
Reference in New Issue
Block a user