mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Remove inlines
Clean up macros more tomorrow Cleanup and optimize CDActivities table Remove unused include Further work on CDActivityRewards Update MasterServer.cpp Further animations work Activities still needs work for a better PK. fix type All of these replacements worked Create internal interface for animations Allows for user to just call GetAnimationTIme or PlayAnimation rather than passing in arbitrary true false statements
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include "CatapultBaseServer.h"
|
||||
#include "GameMessages.h"
|
||||
#include "EntityManager.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void CatapultBaseServer::OnNotifyObject(Entity* self, Entity* sender, const std::string& name, int32_t param1, int32_t param2) {
|
||||
if (name == "BouncerBuilt") {
|
||||
@@ -21,7 +23,7 @@ void CatapultBaseServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
|
||||
// tell the arm to the play the platform animation, which is just the arm laying there but with bouncer
|
||||
for (auto* obj : arm) {
|
||||
GameMessages::SendPlayAnimation(obj, u"idle-platform");
|
||||
RenderComponent::PlayAnimation(obj, u"idle-platform");
|
||||
GameMessages::SendPlayNDAudioEmitter(obj, UNASSIGNED_SYSTEM_ADDRESS, "{8cccf912-69e3-4041-a20b-63e4afafc993}");
|
||||
// set the art so we can use it again
|
||||
self->SetVar(u"Arm", obj->GetObjectID());
|
||||
@@ -38,7 +40,7 @@ void CatapultBaseServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
// tell the arm to player the launcher animation
|
||||
auto animTime = 1;
|
||||
self->AddTimer("resetArm", animTime);
|
||||
GameMessages::SendPlayAnimation(arm, u"launch");
|
||||
RenderComponent::PlayAnimation(arm, u"launch");
|
||||
} else if (timerName == "bounce") {
|
||||
auto* bouncer = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"Bouncer"));
|
||||
if (bouncer == nullptr) return;
|
||||
@@ -52,7 +54,7 @@ void CatapultBaseServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (arm == nullptr) return;
|
||||
|
||||
// set the arm back to natural state
|
||||
GameMessages::SendPlayAnimation(arm, u"idle");
|
||||
RenderComponent::PlayAnimation(arm, u"idle");
|
||||
|
||||
auto* bouncer = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"Bouncer"));
|
||||
if (bouncer == nullptr) return;
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include "GameMessages.h"
|
||||
#include "Character.h"
|
||||
#include "dZoneManager.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void CavePrisonCage::OnStartup(Entity* self) {
|
||||
const auto& myNum = self->GetVar<std::u16string>(u"myNumber");
|
||||
@@ -101,7 +102,7 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) {
|
||||
}
|
||||
|
||||
// Play the 'down' animation on the button
|
||||
GameMessages::SendPlayAnimation(button, u"down");
|
||||
RenderComponent::PlayAnimation(button, u"down");
|
||||
|
||||
// Setup a timer named 'buttonGoingDown' to be triggered in 5 seconds
|
||||
self->AddTimer("buttonGoingDown", 5.0f);
|
||||
@@ -136,13 +137,13 @@ void CavePrisonCage::OnTimerDone(Entity* self, std::string timerName) {
|
||||
// the anim of the button down is over
|
||||
if (timerName == "buttonGoingDown") {
|
||||
// Play the 'up' animation
|
||||
GameMessages::SendPlayAnimation(self, u"up");
|
||||
RenderComponent::PlayAnimation(self, u"up");
|
||||
|
||||
// Setup a timer named 'CageOpen' to be triggered in 1 second
|
||||
self->AddTimer("CageOpen", 1.0f);
|
||||
} else if (timerName == "CageOpen") {
|
||||
// play the idle open anim
|
||||
GameMessages::SendPlayAnimation(self, u"idle-up");
|
||||
RenderComponent::PlayAnimation(self, u"idle-up");
|
||||
|
||||
// Get the villeger
|
||||
auto* villager = EntityManager::Instance()->GetEntity(self->GetVar<LWOOBJID>(u"villager"));
|
||||
@@ -199,13 +200,13 @@ void CavePrisonCage::OnTimerDone(Entity* self, std::string timerName) {
|
||||
}
|
||||
|
||||
// Play the 'up' animation on the button
|
||||
GameMessages::SendPlayAnimation(button, u"up");
|
||||
RenderComponent::PlayAnimation(button, u"up");
|
||||
|
||||
// Setup a timer named 'CageClosed' to be triggered in 1 second
|
||||
self->AddTimer("CageClosed", 1.0f);
|
||||
} else if (timerName == "CageClosed") {
|
||||
// play the idle closed anim
|
||||
GameMessages::SendPlayAnimation(self, u"idle");
|
||||
RenderComponent::PlayAnimation(self, u"idle");
|
||||
|
||||
// Setup a timer named 'ResetPrison' to be triggered in 10 seconds
|
||||
self->AddTimer("ResetPrison", 10.0f);
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#include "SkillComponent.h"
|
||||
#include "TeamManager.h"
|
||||
#include <algorithm>
|
||||
#include "RenderComponent.h"
|
||||
|
||||
// // // // // // //
|
||||
// Event handling //
|
||||
@@ -261,7 +262,7 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co
|
||||
skillComponent->CalculateBehavior(1635, 39097, frakjaw->GetObjectID(), true, false);
|
||||
}
|
||||
|
||||
GameMessages::SendPlayAnimation(frakjaw, StunnedAnimation);
|
||||
RenderComponent::PlayAnimation(frakjaw, StunnedAnimation);
|
||||
GameMessages::SendPlayNDAudioEmitter(frakjaw, UNASSIGNED_SYSTEM_ADDRESS, CounterSmashAudio);
|
||||
|
||||
// Before wave 4 we should lower frakjaw from the ledge
|
||||
@@ -281,7 +282,7 @@ void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* co
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::HandleLowerFrakjawSpawned(Entity* self, Entity* lowerFrakjaw) {
|
||||
GameMessages::SendPlayAnimation(lowerFrakjaw, TeleportInAnimation);
|
||||
RenderComponent::PlayAnimation(lowerFrakjaw, TeleportInAnimation);
|
||||
self->SetVar<LWOOBJID>(LowerFrakjawVariable, lowerFrakjaw->GetObjectID());
|
||||
|
||||
auto* combatAI = lowerFrakjaw->GetComponent<BaseCombatAIComponent>();
|
||||
@@ -401,7 +402,7 @@ void NjMonastryBossInstance::TeleportPlayer(Entity* player, uint32_t position) {
|
||||
void NjMonastryBossInstance::SummonWave(Entity* self, Entity* frakjaw) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0, LWOOBJID_EMPTY,
|
||||
LedgeFrakSummon, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::SendPlayAnimation(frakjaw, SummonAnimation);
|
||||
RenderComponent::PlayAnimation(frakjaw, SummonAnimation);
|
||||
|
||||
// Stop the music for the first, fourth and fifth wave
|
||||
const auto wave = self->GetVar<uint32_t>(WaveNumberVariable);
|
||||
@@ -425,7 +426,7 @@ void NjMonastryBossInstance::LowerFrakjawSummon(Entity* self, Entity* frakjaw) {
|
||||
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification, 0, 0,
|
||||
LWOOBJID_EMPTY, BottomFrakSummon, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
ActivityTimerStart(self, SpawnWaveTimer, 2.0f, 2.0f);
|
||||
GameMessages::SendPlayAnimation(frakjaw, SummonAnimation);
|
||||
RenderComponent::PlayAnimation(frakjaw, SummonAnimation);
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::RemovePoison(Entity* self) {
|
||||
@@ -444,7 +445,7 @@ void NjMonastryBossInstance::RemovePoison(Entity* self) {
|
||||
}
|
||||
|
||||
void NjMonastryBossInstance::LowerFrakjaw(Entity* self, Entity* frakjaw) {
|
||||
GameMessages::SendPlayAnimation(frakjaw, TeleportOutAnimation);
|
||||
RenderComponent::PlayAnimation(frakjaw, TeleportOutAnimation);
|
||||
ActivityTimerStart(self, LowerFrakjawCamTimer, 2.0f, 2.0f);
|
||||
|
||||
GameMessages::SendNotifyClientObject(frakjaw->GetObjectID(), StopMusicNotification, 0, 0,
|
||||
|
Reference in New Issue
Block a user