mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-01-11 06:12:36 +00:00
Replace all auto with auto*
For components
This commit is contained in:
@@ -10,7 +10,7 @@ void ActMine::OnStartup(Entity* self) {
|
||||
|
||||
void ActMine::OnRebuildNotifyState(Entity* self, eRebuildState state) {
|
||||
if (state == eRebuildState::COMPLETED) {
|
||||
auto rebuild = self->GetComponent<RebuildComponent>();
|
||||
auto* rebuild = self->GetComponent<RebuildComponent>();
|
||||
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<DestroyableComponent>();
|
||||
auto* detroyable = self->GetComponent<DestroyableComponent>();
|
||||
if (!detroyable) return;
|
||||
if (status == "ENTER" && self->GetVar<bool>(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<int>(u"NumWarnings") >= MAX_WARNINGS) {
|
||||
auto skill = self->GetComponent<SkillComponent>();
|
||||
auto* skill = self->GetComponent<SkillComponent>();
|
||||
if (!skill) return;
|
||||
skill->CalculateBehavior(SKILL_ID, BEHAVIOR_ID, LWOOBJID_EMPTY);
|
||||
self->AddTimer("BlowedUp", BLOWED_UP_TIME);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
auto possessableComponent = target->GetComponent<PossessableComponent>();
|
||||
auto* possessableComponent = target->GetComponent<PossessableComponent>();
|
||||
|
||||
Entity* vehicle;
|
||||
Entity* player;
|
||||
@@ -22,7 +22,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
||||
return;
|
||||
} else if (target->IsPlayer()) {
|
||||
auto possessorComponent = target->GetComponent<PossessorComponent>();
|
||||
auto* possessorComponent = target->GetComponent<PossessorComponent>();
|
||||
|
||||
if (possessorComponent == nullptr) {
|
||||
return;
|
||||
@@ -44,7 +44,7 @@ void ActVehicleDeathTrigger::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
||||
auto* zoneController = dZoneManager::Instance()->GetZoneControlObject();
|
||||
|
||||
auto racingControlComponent = zoneController->GetComponent<RacingControlComponent>();
|
||||
auto* racingControlComponent = zoneController->GetComponent<RacingControlComponent>();
|
||||
|
||||
if (racingControlComponent != nullptr) {
|
||||
racingControlComponent->OnRequestDie(player);
|
||||
|
||||
@@ -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<MissionComponent>();
|
||||
auto* missionComponent = sender->GetComponent<MissionComponent>();
|
||||
if (!missionComponent) return;
|
||||
|
||||
missionComponent->Progress(eMissionTaskType::SCRIPT, 8419);
|
||||
|
||||
@@ -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<ProximityMonitorComponent>();
|
||||
auto* proximityMonitorComponent = self->GetComponent<ProximityMonitorComponent>();
|
||||
|
||||
if (proximityMonitorComponent == nullptr) return;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "BaseCombatAIComponent.h"
|
||||
|
||||
void AgDarkSpiderling::OnStartup(Entity* self) {
|
||||
auto combatAI = self->GetComponent<BaseCombatAIComponent>();
|
||||
auto* combatAI = self->GetComponent<BaseCombatAIComponent>();
|
||||
if (combatAI != nullptr) {
|
||||
combatAI->SetStunImmune(true);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ void AgFans::OnStartup(Entity* self) {
|
||||
|
||||
ToggleFX(self, false);
|
||||
|
||||
auto renderComponent = self->GetComponent<RenderComponent>();
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
|
||||
if (renderComponent == nullptr) {
|
||||
return;
|
||||
@@ -27,7 +27,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
std::string fanGroup = self->GetGroups()[0];
|
||||
std::vector<Entity*> fanVolumes = EntityManager::Instance()->GetEntitiesInGroup(fanGroup);
|
||||
|
||||
auto renderComponent = self->GetComponent<RenderComponent>();
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
|
||||
if (renderComponent == nullptr) {
|
||||
return;
|
||||
@@ -42,7 +42,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
self->SetVar<bool>(u"on", false);
|
||||
|
||||
for (Entity* volume : fanVolumes) {
|
||||
auto volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
auto* volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
if (!volumePhys) continue;
|
||||
volumePhys->SetPhysicsEffectActive(false);
|
||||
EntityManager::Instance()->SerializeEntity(volume);
|
||||
@@ -58,7 +58,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
self->SetVar<bool>(u"on", true);
|
||||
|
||||
for (Entity* volume : fanVolumes) {
|
||||
auto volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
auto* volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
if (!volumePhys) continue;
|
||||
volumePhys->SetPhysicsEffectActive(true);
|
||||
EntityManager::Instance()->SerializeEntity(volume);
|
||||
|
||||
@@ -10,7 +10,7 @@ void AgImagSmashable::OnDie(Entity* self, Entity* killer) {
|
||||
bool maxImagGreaterThanZero = false;
|
||||
|
||||
if (killer) {
|
||||
auto dest = killer->GetComponent<DestroyableComponent>();
|
||||
auto* dest = killer->GetComponent<DestroyableComponent>();
|
||||
if (dest) {
|
||||
maxImagGreaterThanZero = dest->GetMaxImagination() > 0;
|
||||
}
|
||||
|
||||
@@ -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<SkillComponent>();
|
||||
auto* skillComponent = mortar->GetComponent<SkillComponent>();
|
||||
if (skillComponent) skillComponent->CastSkill(318);
|
||||
} else if (timerName == "CineDone") {
|
||||
GameMessages::SendNotifyClientObject(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "MovingPlatformComponent.h"
|
||||
|
||||
void AgStagePlatforms::OnStartup(Entity* self) {
|
||||
auto component = self->GetComponent<MovingPlatformComponent>();
|
||||
auto* component = self->GetComponent<MovingPlatformComponent>();
|
||||
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<MovingPlatformComponent>();
|
||||
auto* component = self->GetComponent<MovingPlatformComponent>();
|
||||
if (waypointIndex == 0 && component)
|
||||
component->StopPathing();
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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<MissionComponent>();
|
||||
auto* missionComponent = owner->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent != nullptr) {
|
||||
const auto rollMissionState = missionComponent->GetMissionState(756);
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#include "SkillComponent.h"
|
||||
|
||||
void GfArchway::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
auto skillComponent = target->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = target->GetComponent<SkillComponent>();
|
||||
if (skillComponent) skillComponent->CalculateBehavior(SHIELDING_SKILL, SHIELDING_BEHAVIOR, target->GetObjectID(), true);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ void GfBanana::OnStartup(Entity* self) {
|
||||
}
|
||||
|
||||
void GfBanana::OnHit(Entity* self, Entity* attacker) {
|
||||
auto destroyable = self->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = self->GetComponent<DestroyableComponent>();
|
||||
|
||||
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<DestroyableComponent>();
|
||||
auto* bananaDestroyable = bananaEntity->GetComponent<DestroyableComponent>();
|
||||
|
||||
bananaDestroyable->SetHealth(0);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ void GfCampfire::OnStartup(Entity* self) {
|
||||
self->SetProximityRadius(2.0f, "placeholder");
|
||||
self->SetBoolean(u"isBurning", true);
|
||||
|
||||
auto render = self->GetComponent<RenderComponent>();
|
||||
auto* render = self->GetComponent<RenderComponent>();
|
||||
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<RenderComponent>();
|
||||
auto* render = self->GetComponent<RenderComponent>();
|
||||
|
||||
render->PlayEffect(295, u"running", "Burn");
|
||||
}
|
||||
}
|
||||
|
||||
void GfCampfire::OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) {
|
||||
auto skill = self->GetComponent<SkillComponent>();
|
||||
auto* skill = self->GetComponent<SkillComponent>();
|
||||
|
||||
if (self->GetBoolean(u"isBurning")) {
|
||||
if (status == "ENTER") {
|
||||
@@ -43,7 +43,7 @@ void GfCampfire::OnProximityUpdate(Entity* self, Entity* entering, std::string n
|
||||
|
||||
//self->SetVar<LWOOBJID>("target", entering->GetObjectID());
|
||||
|
||||
auto missionComponet = entering->GetComponent<MissionComponent>();
|
||||
auto* missionComponet = entering->GetComponent<MissionComponent>();
|
||||
|
||||
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<bool>(u"isBurning")) {
|
||||
auto renderComponent = self->GetComponent<RenderComponent>();
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
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<bool>(u"isBurning")) {
|
||||
auto renderComponent = self->GetComponent<RenderComponent>();
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
if (renderComponent != nullptr) {
|
||||
renderComponent->StopEffect("Off");
|
||||
renderComponent->PlayEffect(295, u"running", "Burn");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "eMissionState.h"
|
||||
|
||||
void GfJailkeepMission::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
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<MissionComponent>();
|
||||
auto* missionComponent = user->GetComponent<MissionComponent>();
|
||||
if (missionComponent == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
@@ -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<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
skillComponent->CalculateBehavior(m_SkillID, m_BehaviorID, LWOOBJID_EMPTY, true);
|
||||
}
|
||||
if (timerName == m_KillSelfTimerName) {
|
||||
|
||||
@@ -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<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (args == "Slow") {
|
||||
skillComponent->CalculateBehavior(m_SlowSkillID, m_SlowBehaviorID, sender->GetObjectID());
|
||||
} else if (args == "Unslow") {
|
||||
|
||||
@@ -22,7 +22,7 @@ void PetDigBuild::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
info.lot = 7410; // Normal GF treasure
|
||||
info.settings.push_back(new LDFData<std::u16string>(u"groupID", u"Flag" + flagNumber));
|
||||
} else {
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
if (missionComponent != nullptr && missionComponent->GetMissionState(746) == eMissionState::ACTIVE) {
|
||||
info.lot = 9307; // Special Captain Jack treasure that drops a mission item
|
||||
} else {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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<DestroyableComponent>();
|
||||
auto* destroyable = target->GetComponent<DestroyableComponent>();
|
||||
destroyable->SetImagination(6);
|
||||
auto mission = target->GetComponent<MissionComponent>();
|
||||
auto* mission = target->GetComponent<MissionComponent>();
|
||||
|
||||
mission->CompleteMission(664);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void NsConcertInstrument::OnTimerDone(Entity* self, std::string name) {
|
||||
if (activePlayer != nullptr && name == "checkPlayer" && self->GetVar<bool>(u"beingPlayed")) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"checkMovement", 0, 0,
|
||||
activePlayer->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
|
||||
auto stats = activePlayer->GetComponent<DestroyableComponent>();
|
||||
auto* stats = activePlayer->GetComponent<DestroyableComponent>();
|
||||
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<bool>(u"beingPlayed")) {
|
||||
auto stats = activePlayer->GetComponent<DestroyableComponent>();
|
||||
auto* stats = activePlayer->GetComponent<DestroyableComponent>();
|
||||
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<RebuildComponent>();
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
if (rebuildComponent != nullptr)
|
||||
rebuildComponent->ResetRebuild(false);
|
||||
|
||||
self->Smash(self->GetObjectID(), eKillType::VIOLENT);
|
||||
self->SetVar<LWOOBJID>(u"activePlayer", LWOOBJID_EMPTY);
|
||||
} else if (activePlayer != nullptr && name == "achievement") {
|
||||
auto missionComponent = activePlayer->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = activePlayer->GetComponent<MissionComponent>();
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->ForceProgress(302, 462, self->GetLOT());
|
||||
}
|
||||
self->AddTimer("achievement2", 10.0f);
|
||||
} else if (activePlayer != nullptr && name == "achievement2") {
|
||||
auto missionComponent = activePlayer->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = activePlayer->GetComponent<MissionComponent>();
|
||||
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<SoundTriggerComponent>();
|
||||
auto* soundTrigger = soundBox->GetComponent<SoundTriggerComponent>();
|
||||
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<MissionComponent>();
|
||||
auto* missions = player->GetComponent<MissionComponent>();
|
||||
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<bool>(u"beingPlayed", false);
|
||||
|
||||
for (auto* soundBox : EntityManager::Instance()->GetEntitiesInGroup("Audio-Concert")) {
|
||||
auto soundTrigger = soundBox->GetComponent<SoundTriggerComponent>();
|
||||
auto* soundTrigger = soundBox->GetComponent<SoundTriggerComponent>();
|
||||
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<InventoryComponent>();
|
||||
auto* inventory = player->GetComponent<InventoryComponent>();
|
||||
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<InventoryComponent>();
|
||||
auto* inventory = player->GetComponent<InventoryComponent>();
|
||||
if (inventory != nullptr) {
|
||||
auto equippedItems = inventory->GetEquippedItems();
|
||||
|
||||
|
||||
@@ -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<MovingPlatformComponent>();
|
||||
auto* component = movingPlatform->GetComponent<MovingPlatformComponent>();
|
||||
if (component) {
|
||||
component->WarpToWaypoint(component->GetLastWaypointIndex());
|
||||
|
||||
@@ -132,7 +132,7 @@ void NsConcertQuickBuild::OnRebuildComplete(Entity* self, Entity* target) {
|
||||
quickBuild->Smash();
|
||||
});
|
||||
|
||||
auto destroyableComponent = quickBuild->GetComponent<DestroyableComponent>();
|
||||
auto* destroyableComponent = quickBuild->GetComponent<DestroyableComponent>();
|
||||
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<MissionComponent>();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
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<MissionComponent>();
|
||||
auto* playerMissionComponent = player->GetComponent<MissionComponent>();
|
||||
if (playerMissionComponent)
|
||||
playerMissionComponent->ForceProgress(598, 903, self->GetLOT());
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ void NsGetFactionMissionServer::OnRespondToMission(Entity* self, int missionID,
|
||||
player->GetCharacter()->SetPlayerFlag(flagID, true);
|
||||
}
|
||||
|
||||
auto mis = player->GetComponent<MissionComponent>();
|
||||
auto* mis = player->GetComponent<MissionComponent>();
|
||||
|
||||
for (int mission : factionMissions) {
|
||||
mis->AcceptMission(mission);
|
||||
|
||||
@@ -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<MissionComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
if (missionComponent != nullptr) {
|
||||
missionComponent->AcceptMission(774);
|
||||
missionComponent->AcceptMission(775);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
void NsModularBuild::OnModularBuildExit(Entity* self, Entity* player, bool bCompleted, std::vector<LOT> modules) {
|
||||
if (bCompleted) {
|
||||
auto mission = self->GetComponent<MissionComponent>();
|
||||
auto* mission = self->GetComponent<MissionComponent>();
|
||||
|
||||
if (mission->GetMissionState(m_MissionNum) == eMissionState::ACTIVE) {
|
||||
for (LOT mod : modules) {
|
||||
|
||||
@@ -25,7 +25,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) {
|
||||
|
||||
std::vector<Entity*> fanVolumes = EntityManager::Instance()->GetEntitiesInGroup(fanGroup);
|
||||
|
||||
auto renderComponent = self->GetComponent<RenderComponent>();
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
|
||||
if (renderComponent == nullptr) return;
|
||||
|
||||
@@ -38,7 +38,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) {
|
||||
self->SetVar<bool>(u"on", false);
|
||||
|
||||
for (Entity* volume : fanVolumes) {
|
||||
auto volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
auto* volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
if (!volumePhys) continue;
|
||||
volumePhys->SetPhysicsEffectActive(false);
|
||||
EntityManager::Instance()->SerializeEntity(volume);
|
||||
@@ -49,7 +49,7 @@ void WhFans::ToggleFX(Entity* self, bool hit) {
|
||||
self->SetVar<bool>(u"on", true);
|
||||
|
||||
for (Entity* volume : fanVolumes) {
|
||||
auto volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
auto* volumePhys = volume->GetComponent<PhantomPhysicsComponent>();
|
||||
if (!volumePhys) continue;
|
||||
volumePhys->SetPhysicsEffectActive(true);
|
||||
EntityManager::Instance()->SerializeEntity(volume);
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
||||
auto* character = target->GetCharacter();
|
||||
auto missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
auto* missionComponent = target->GetComponent<MissionComponent>();
|
||||
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
|
||||
const auto state = missionComponent->GetMissionState(320);
|
||||
if (missionID == 768 && missionState == eMissionState::AVAILABLE) {
|
||||
|
||||
@@ -6,8 +6,8 @@ void PropertyFXDamage::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
if (target == nullptr)
|
||||
return;
|
||||
|
||||
auto skills = self->GetComponent<SkillComponent>();
|
||||
auto targetStats = target->GetComponent<DestroyableComponent>();
|
||||
auto* skills = self->GetComponent<SkillComponent>();
|
||||
auto* targetStats = target->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (skills != nullptr && targetStats != nullptr) {
|
||||
auto targetFactions = targetStats->GetFactionIDs();
|
||||
|
||||
@@ -9,21 +9,21 @@
|
||||
|
||||
void FvRaceSmashEggImagineServer::OnDie(Entity* self, Entity* killer) {
|
||||
if (killer != nullptr) {
|
||||
auto destroyableComponent = killer->GetComponent<DestroyableComponent>();
|
||||
auto* destroyableComponent = killer->GetComponent<DestroyableComponent>();
|
||||
if (destroyableComponent != nullptr) {
|
||||
destroyableComponent->SetImagination(destroyableComponent->GetImagination() + 10);
|
||||
EntityManager::Instance()->SerializeEntity(killer);
|
||||
}
|
||||
|
||||
// get possessor to progress statistics and tasks.
|
||||
auto possessableComponent = killer->GetComponent<PossessableComponent>();
|
||||
auto* possessableComponent = killer->GetComponent<PossessableComponent>();
|
||||
if (possessableComponent != nullptr) {
|
||||
|
||||
auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor());
|
||||
if (possessor != nullptr) {
|
||||
|
||||
auto missionComponent = possessor->GetComponent<MissionComponent>();
|
||||
auto characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
auto* missionComponent = possessor->GetComponent<MissionComponent>();
|
||||
auto* characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
if (characterComponent != nullptr) {
|
||||
characterComponent->UpdatePlayerStatistic(ImaginationPowerUpsCollected);
|
||||
characterComponent->UpdatePlayerStatistic(RacingSmashablesSmashed);
|
||||
|
||||
@@ -19,13 +19,13 @@ void RaceImagineCrateServer::OnDie(Entity* self, Entity* killer) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto skillComponent = killer->GetComponent<SkillComponent>();
|
||||
auto* skillComponent = killer->GetComponent<SkillComponent>();
|
||||
|
||||
if (skillComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto destroyableComponent = killer->GetComponent<DestroyableComponent>();
|
||||
auto* destroyableComponent = killer->GetComponent<DestroyableComponent>();
|
||||
|
||||
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<PossessableComponent>();
|
||||
auto* possessableComponent = killer->GetComponent<PossessableComponent>();
|
||||
if (possessableComponent != nullptr) {
|
||||
|
||||
auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor());
|
||||
if (possessor != nullptr) {
|
||||
|
||||
auto missionComponent = possessor->GetComponent<MissionComponent>();
|
||||
auto characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
auto* missionComponent = possessor->GetComponent<MissionComponent>();
|
||||
auto* characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
|
||||
if (characterComponent != nullptr) {
|
||||
characterComponent->UpdatePlayerStatistic(RacingImaginationCratesSmashed);
|
||||
|
||||
@@ -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<PossessorComponent>();
|
||||
auto* possessorComponent = sender->GetComponent<PossessorComponent>();
|
||||
|
||||
if (possessorComponent == nullptr) {
|
||||
return;
|
||||
@@ -21,7 +21,7 @@ void RaceImaginePowerup::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
return;
|
||||
}
|
||||
|
||||
auto destroyableComponent = vehicle->GetComponent<DestroyableComponent>();
|
||||
auto* destroyableComponent = vehicle->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyableComponent == nullptr) {
|
||||
return;
|
||||
@@ -29,7 +29,7 @@ void RaceImaginePowerup::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
|
||||
destroyableComponent->Imagine(10);
|
||||
|
||||
auto missionComponent = sender->GetComponent<MissionComponent>();
|
||||
auto* missionComponent = sender->GetComponent<MissionComponent>();
|
||||
|
||||
if (missionComponent == nullptr) return;
|
||||
missionComponent->Progress(eMissionTaskType::RACING, self->GetLOT(), (LWOOBJID)eRacingTaskParam::COLLECT_IMAGINATION);
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
void RaceSmashServer::OnDie(Entity* self, Entity* killer) {
|
||||
// Crate is smashed by the car
|
||||
auto possessableComponent = killer->GetComponent<PossessableComponent>();
|
||||
auto* possessableComponent = killer->GetComponent<PossessableComponent>();
|
||||
if (possessableComponent != nullptr) {
|
||||
|
||||
auto* possessor = EntityManager::Instance()->GetEntity(possessableComponent->GetPossessor());
|
||||
if (possessor != nullptr) {
|
||||
|
||||
auto missionComponent = possessor->GetComponent<MissionComponent>();
|
||||
auto characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
auto* missionComponent = possessor->GetComponent<MissionComponent>();
|
||||
auto* characterComponent = possessor->GetComponent<CharacterComponent>();
|
||||
|
||||
if (characterComponent != nullptr) {
|
||||
characterComponent->UpdatePlayerStatistic(RacingSmashablesSmashed);
|
||||
|
||||
@@ -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<SkillComponent>();
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (!skillComponent) return;
|
||||
skillComponent->CastSkill(this->m_SkillId, entering->GetObjectID());
|
||||
|
||||
|
||||
@@ -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<SkillComponent>();
|
||||
auto* skillComponent = entering->GetComponent<SkillComponent>();
|
||||
if (!skillComponent) return;
|
||||
skillComponent->CastSkill(this->m_SkillId, entering->GetObjectID());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user