mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 17:38:08 +00:00
Replace all auto with auto*
For components
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user