Replace all auto with auto*

For components
This commit is contained in:
David Markowitz
2023-06-09 01:27:05 -07:00
parent 62aa863997
commit e2dfa1809d
233 changed files with 753 additions and 753 deletions

View File

@@ -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<SkillComponent>();
auto* skillComponent = self->GetComponent<SkillComponent>();
if (skillComponent == nullptr) return;

View File

@@ -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<InventoryComponent>();
auto* inv = user->GetComponent<InventoryComponent>();
if (inv) {
inv->RemoveItem(14553, 1);

View File

@@ -8,7 +8,7 @@ void AgLaserSensorServer::OnStartup(Entity* self) {
self->SetBoolean(u"active", true);
auto repelForce = self->GetVarAs<float>(u"repelForce");
if (!repelForce) repelForce = m_RepelForce;
auto phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
auto* phantomPhysicsComponent = self->GetComponent<PhantomPhysicsComponent>();
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<float>(u"skillCastID");
if (skillCastID == 0) skillCastID = m_SkillCastID;
auto skillComponent = self->GetComponent<SkillComponent>();
auto* skillComponent = self->GetComponent<SkillComponent>();
if (!skillComponent) return;
skillComponent->CastSkill(m_SkillCastID, target->GetObjectID());
}

View File

@@ -13,7 +13,7 @@ void NpcAgCourseStarter::OnStartup(Entity* self) {
}
void NpcAgCourseStarter::OnUse(Entity* self, Entity* user) {
auto scriptedActivityComponent = self->GetComponent<ScriptedActivityComponent>();
auto* scriptedActivityComponent = self->GetComponent<ScriptedActivityComponent>();
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<ScriptedActivityComponent>();
auto* scriptedActivityComponent = self->GetComponent<ScriptedActivityComponent>();
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<ScriptedActivityComponent>();
auto* scriptedActivityComponent = self->GetComponent<ScriptedActivityComponent>();
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<MissionComponent>();
auto* missionComponent = sender->GetComponent<MissionComponent>();
if (missionComponent != nullptr) {
missionComponent->ForceProgressTaskType(1884, 1, 1, false);
missionComponent->Progress(eMissionTaskType::PERFORM_ACTIVITY, -finish, self->GetObjectID(),

View File

@@ -7,7 +7,7 @@ void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss
return;
}
auto inventoryComponent = target->GetComponent<InventoryComponent>();
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
if (inventoryComponent == nullptr) {
return;

View File

@@ -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<InventoryComponent>();
auto* inv = target->GetComponent<InventoryComponent>();
// 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<MissionComponent>();
auto* missionComponent = target->GetComponent<MissionComponent>();
missionComponent->CompleteMission(mailAchievement, true);
}
}

View File

@@ -3,7 +3,7 @@
#include "InventoryComponent.h"
void NpcPirateServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
auto inventory = target->GetComponent<InventoryComponent>();
auto* inventory = target->GetComponent<InventoryComponent>();
if (inventory != nullptr && missionID == 1881) {
auto* luckyShovel = inventory->FindItemByLot(14591);

View File

@@ -9,7 +9,7 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio
if (missionID != 1849 && missionID != 1883)
return;
auto inventory = target->GetComponent<InventoryComponent>();
auto* inventory = target->GetComponent<InventoryComponent>();
if (inventory == nullptr)
return;

View File

@@ -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<InventoryComponent>();
auto* inv = target->GetComponent<InventoryComponent>();
if (!inv) return;
//remove the inventory items