mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-06 07:18:42 +00:00
Move to shared pointer
This commit is contained in:
@@ -15,7 +15,7 @@ void EnemySpiderSpawner::OnFireEventServerSide(Entity* self, Entity* sender, std
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), 2856, u"maelstrom", "test", LWOOBJID_EMPTY, 1.0f, 1.0f, true);
|
||||
|
||||
// Make indestructible
|
||||
auto dest = static_cast<DestroyableComponent*>(self->GetComponent(eReplicaComponentType::DESTROYABLE));
|
||||
auto dest = self->GetComponent<DestroyableComponent>();
|
||||
if (dest) {
|
||||
dest->SetFaction(-1);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ void EnemySpiderSpawner::OnTimerDone(Entity* self, std::string timerName) {
|
||||
newEntity->GetGroups().push_back("BabySpider");
|
||||
|
||||
/*
|
||||
auto* movementAi = newEntity->GetComponent<MovementAIComponent>();
|
||||
auto movementAi = newEntity->GetComponent<MovementAIComponent>();
|
||||
|
||||
movementAi->SetDestination(newEntity->GetPosition());
|
||||
*/
|
||||
|
@@ -75,7 +75,7 @@ void ZoneAgProperty::OnPlayerLoaded(Entity* self, Entity* player) {
|
||||
}
|
||||
|
||||
void ZoneAgProperty::PropGuardCheck(Entity* self, Entity* player) {
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
if (missionComponent == nullptr)
|
||||
return;
|
||||
|
||||
@@ -211,7 +211,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
KillGuard(self);
|
||||
} else if (timerName == "tornadoOff") {
|
||||
for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(FXManagerGroup))) {
|
||||
auto* renderComponent = entity->GetComponent<RenderComponent>();
|
||||
auto renderComponent = entity->GetComponent<RenderComponent>();
|
||||
if (renderComponent != nullptr) {
|
||||
renderComponent->StopEffect("TornadoDebris", false);
|
||||
renderComponent->StopEffect("TornadoVortex", false);
|
||||
@@ -223,7 +223,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
self->AddTimer("ShowClearEffects", 2);
|
||||
} else if (timerName == "ShowClearEffects") {
|
||||
for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(FXManagerGroup))) {
|
||||
auto* renderComponent = entity->GetComponent<RenderComponent>();
|
||||
auto renderComponent = entity->GetComponent<RenderComponent>();
|
||||
if (renderComponent != nullptr) {
|
||||
renderComponent->PlayEffect(-1, u"beamOn", "beam");
|
||||
}
|
||||
@@ -275,7 +275,7 @@ void ZoneAgProperty::BaseTimerDone(Entity* self, const std::string& timerName) {
|
||||
StartTornadoFx(self);
|
||||
} else if (timerName == "killFXObject") {
|
||||
for (auto* entity : EntityManager::Instance()->GetEntitiesInGroup(self->GetVar<std::string>(FXManagerGroup))) {
|
||||
auto* renderComponent = entity->GetComponent<RenderComponent>();
|
||||
auto renderComponent = entity->GetComponent<RenderComponent>();
|
||||
if (renderComponent != nullptr) {
|
||||
renderComponent->StopEffect("beam");
|
||||
}
|
||||
@@ -301,7 +301,7 @@ void ZoneAgProperty::OnZonePropertyRented(Entity* self, Entity* player) {
|
||||
|
||||
void ZoneAgProperty::OnZonePropertyModelPlaced(Entity* self, Entity* player) {
|
||||
auto* character = player->GetCharacter();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (!character->GetPlayerFlag(101)) {
|
||||
BaseZonePropertyModelPlaced(self, player);
|
||||
@@ -329,7 +329,7 @@ void ZoneAgProperty::OnZonePropertyModelPlaced(Entity* self, Entity* player) {
|
||||
|
||||
void ZoneAgProperty::OnZonePropertyModelPickedUp(Entity* self, Entity* player) {
|
||||
auto* character = player->GetCharacter();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (!character->GetPlayerFlag(109)) {
|
||||
character->SetPlayerFlag(109, true);
|
||||
@@ -350,7 +350,7 @@ void ZoneAgProperty::OnZonePropertyModelRemovedWhileEquipped(Entity* self, Entit
|
||||
|
||||
void ZoneAgProperty::OnZonePropertyModelRotated(Entity* self, Entity* player) {
|
||||
auto* character = player->GetCharacter();
|
||||
auto* missionComponent = player->GetComponent<MissionComponent>();
|
||||
auto missionComponent = player->GetComponent<MissionComponent>();
|
||||
|
||||
if (!character->GetPlayerFlag(110)) {
|
||||
character->SetPlayerFlag(110, true);
|
||||
|
Reference in New Issue
Block a user