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:
David Markowitz
2023-03-20 06:10:52 -07:00
parent 7671cc6865
commit b432a3f5da
84 changed files with 631 additions and 607 deletions

View File

@@ -1,6 +1,8 @@
#include "FvDragonSmashingGolemQb.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "RenderComponent.h"
#include "Entity.h"
void FvDragonSmashingGolemQb::OnStartup(Entity* self) {
self->AddTimer("GolemBreakTimer", 10.5f);
@@ -14,7 +16,7 @@ void FvDragonSmashingGolemQb::OnTimerDone(Entity* self, std::string timerName) {
void FvDragonSmashingGolemQb::OnRebuildNotifyState(Entity* self, eRebuildState state) {
if (state == eRebuildState::REBUILD_COMPLETED) {
GameMessages::SendPlayAnimation(self, u"dragonsmash");
RenderComponent::PlayAnimation(self, u"dragonsmash");
const auto dragonId = self->GetVar<LWOOBJID>(u"Dragon");

View File

@@ -3,6 +3,7 @@
#include "EntityManager.h"
#include "SkillComponent.h"
#include "GeneralUtils.h"
#include "RenderComponent.h"
void FvFlyingCreviceDragon::OnStartup(Entity* self) {
self->AddTimer("waypoint", 5);
@@ -67,10 +68,10 @@ void FvFlyingCreviceDragon::OnArrived(Entity* self) {
auto point = self->GetVar<int32_t>(u"waypoint");
if (point == 4) {
GameMessages::SendPlayAnimation(self, u"attack1", 2);
RenderComponent::PlayAnimation(self, u"attack1", 2.0f);
self->AddTimer("platform1attack", 1.75f);
} else if (point == 12) {
GameMessages::SendPlayAnimation(self, u"attack2", 2);
RenderComponent::PlayAnimation(self, u"attack2", 2.0f);
const auto& group2 = EntityManager::Instance()->GetEntitiesInGroup("dragonFireballs2");
@@ -101,7 +102,7 @@ void FvFlyingCreviceDragon::OnArrived(Entity* self) {
}
}
} else if (point == 16) {
GameMessages::SendPlayAnimation(self, u"attack3", 2);
RenderComponent::PlayAnimation(self, u"attack3", 2.0f);
self->AddTimer("platform3attack", 0.5f);
}
}

View File

@@ -1,6 +1,8 @@
#include "FvNinjaGuard.h"
#include "GameMessages.h"
#include "MissionComponent.h"
#include "RenderComponent.h"
#include "EntityManager.h"
void FvNinjaGuard::OnStartup(Entity* self) {
if (self->GetLOT() == 7412) {
@@ -12,24 +14,24 @@ void FvNinjaGuard::OnStartup(Entity* self) {
void FvNinjaGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target) {
if (emote != 392) {
GameMessages::SendPlayAnimation(self, u"no");
RenderComponent::PlayAnimation(self, u"no");
return;
}
GameMessages::SendPlayAnimation(self, u"scared");
RenderComponent::PlayAnimation(self, u"scared");
if (self->GetLOT() == 7412) {
auto* rightGuard = EntityManager::Instance()->GetEntity(m_RightGuard);
if (rightGuard != nullptr) {
GameMessages::SendPlayAnimation(rightGuard, u"laugh_rt");
RenderComponent::PlayAnimation(rightGuard, u"laugh_rt");
}
} else if (self->GetLOT() == 11128) {
auto* leftGuard = EntityManager::Instance()->GetEntity(m_LeftGuard);
if (leftGuard != nullptr) {
GameMessages::SendPlayAnimation(leftGuard, u"laugh_lt");
RenderComponent::PlayAnimation(leftGuard, u"laugh_lt");
}
}
}