mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-21 23:08:07 +00:00
format codebase
This commit is contained in:
@@ -27,10 +27,9 @@ void GfTikiTorch::OnUse(Entity* self, Entity* killer) {
|
||||
void GfTikiTorch::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "Relight") {
|
||||
LightTorch(self);
|
||||
}
|
||||
else if (timerName == "InteractionCooldown") {
|
||||
} else if (timerName == "InteractionCooldown") {
|
||||
Entity* player = EntityManager::Instance()->GetEntity(self->GetI64(u"userID"));
|
||||
|
||||
|
||||
if (player != nullptr && player->GetCharacter()) {
|
||||
GameMessages::SendTerminateInteraction(player->GetObjectID(), FROM_INTERACTION, self->GetObjectID());
|
||||
}
|
||||
@@ -45,32 +44,32 @@ void GfTikiTorch::LightTorch(Entity* self) {
|
||||
auto* renderComponent = static_cast<RenderComponent*>(self->GetComponent(COMPONENT_TYPE_RENDER));
|
||||
if (renderComponent == nullptr)
|
||||
return;
|
||||
|
||||
|
||||
self->SetBoolean(u"isInUse", false);
|
||||
|
||||
renderComponent->PlayEffect(611, u"fire", "tikitorch");
|
||||
self->SetBoolean(u"isBurning", true);
|
||||
}
|
||||
|
||||
void GfTikiTorch::OnSkillEventFired(Entity *self, Entity *caster, const std::string &message) {
|
||||
if (self->GetBoolean(u"isBurning") && message == "waterspray") {
|
||||
GameMessages::SendPlayAnimation(self, u"water");
|
||||
void GfTikiTorch::OnSkillEventFired(Entity* self, Entity* caster, const std::string& message) {
|
||||
if (self->GetBoolean(u"isBurning") && message == "waterspray") {
|
||||
GameMessages::SendPlayAnimation(self, u"water");
|
||||
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
if (renderComponent != nullptr) {
|
||||
renderComponent->StopEffect("tikitorch");
|
||||
renderComponent->PlayEffect(611, u"water", "water");
|
||||
renderComponent->PlayEffect(611, u"steam", "steam");
|
||||
}
|
||||
auto* renderComponent = self->GetComponent<RenderComponent>();
|
||||
if (renderComponent != nullptr) {
|
||||
renderComponent->StopEffect("tikitorch");
|
||||
renderComponent->PlayEffect(611, u"water", "water");
|
||||
renderComponent->PlayEffect(611, u"steam", "steam");
|
||||
}
|
||||
|
||||
auto* casterMissionComponent = caster->GetComponent<MissionComponent>();
|
||||
if (casterMissionComponent != nullptr) {
|
||||
for (const auto missionID : m_missions) {
|
||||
casterMissionComponent->ForceProgressTaskType(missionID, static_cast<uint32_t>(MissionTaskType::MISSION_TASK_TYPE_SCRIPT), 1);
|
||||
}
|
||||
}
|
||||
auto* casterMissionComponent = caster->GetComponent<MissionComponent>();
|
||||
if (casterMissionComponent != nullptr) {
|
||||
for (const auto missionID : m_missions) {
|
||||
casterMissionComponent->ForceProgressTaskType(missionID, static_cast<uint32_t>(MissionTaskType::MISSION_TASK_TYPE_SCRIPT), 1);
|
||||
}
|
||||
}
|
||||
|
||||
self->AddTimer("Relight", 7.0f);
|
||||
self->SetBoolean(u"isBurning", false);
|
||||
}
|
||||
self->AddTimer("Relight", 7.0f);
|
||||
self->SetBoolean(u"isBurning", false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user