mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Replace all auto with auto*
For components
This commit is contained in:
@@ -30,7 +30,7 @@ void SGCannon::OnStartup(Entity* self) {
|
||||
self->SetVar<Vector3>(InitialVelocityVariable, {});
|
||||
self->SetVar<uint32_t>(ImpactSkillVariale, constants.impactSkillID);
|
||||
|
||||
auto shootingGalleryComponent = self->GetComponent<ShootingGalleryComponent>();
|
||||
auto* shootingGalleryComponent = self->GetComponent<ShootingGalleryComponent>();
|
||||
if (shootingGalleryComponent != nullptr) {
|
||||
shootingGalleryComponent->SetStaticParams({
|
||||
Vector3 { -327.8609924316406, 256.8999938964844, 1.6482199430465698 },
|
||||
@@ -57,7 +57,7 @@ void SGCannon::OnStartup(Entity* self) {
|
||||
self->SetVar<uint32_t>(MatrixVariable, 1);
|
||||
self->SetVar<bool>(InitVariable, true);
|
||||
|
||||
auto simplePhysicsComponent = self->GetComponent<SimplePhysicsComponent>();
|
||||
auto* simplePhysicsComponent = self->GetComponent<SimplePhysicsComponent>();
|
||||
|
||||
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<ShootingGalleryComponent>();
|
||||
auto* shootingGalleryComponent = self->GetComponent<ShootingGalleryComponent>();
|
||||
|
||||
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<CharacterComponent>();
|
||||
auto* characterComponent = player->GetComponent<CharacterComponent>();
|
||||
|
||||
if (characterComponent != nullptr) {
|
||||
characterComponent->SetIsRacing(true);
|
||||
characterComponent->SetCurrentActivity(eGameActivity::SHOOTING_GALLERY);
|
||||
auto possessor = player->GetComponent<PossessorComponent>();
|
||||
auto* possessor = player->GetComponent<PossessorComponent>();
|
||||
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<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->Progress(eMissionTaskType::PERFORM_ACTIVITY, self->GetVar<uint32_t>(TotalScoreVariable), self->GetObjectID(), "performact_score");
|
||||
@@ -566,7 +566,7 @@ void SGCannon::StopGame(Entity* self, bool cancel) {
|
||||
self->SetNetworkVar<bool>(AudioFinalWaveDoneVariable, true);
|
||||
|
||||
// Give the player the model rewards they earned
|
||||
auto inventory = player->GetComponent<InventoryComponent>();
|
||||
auto* inventory = player->GetComponent<InventoryComponent>();
|
||||
if (inventory != nullptr) {
|
||||
for (const auto rewardLot : self->GetVar<std::vector<LOT>>(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<LWOOBJID>(PlayerIDVariable));
|
||||
if (player == nullptr) return;
|
||||
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
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<InventoryComponent>();
|
||||
auto* inventoryComponent = player->GetComponent<InventoryComponent>();
|
||||
|
||||
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<InventoryComponent>();
|
||||
auto* selfInventoryComponent = self->GetComponent<InventoryComponent>();
|
||||
|
||||
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<ShootingGalleryComponent>();
|
||||
auto* shootingGalleryComponent = self->GetComponent<ShootingGalleryComponent>();
|
||||
|
||||
if (shootingGalleryComponent == nullptr) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user