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:
@@ -5,6 +5,7 @@
|
||||
#include "ProximityMonitorComponent.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void AmSkullkinDrill::OnStartup(Entity* self) {
|
||||
self->SetNetworkVar(u"bIsInUse", false);
|
||||
@@ -70,7 +71,7 @@ void AmSkullkinDrill::OnSkillEventFired(Entity* self, Entity* caster, const std:
|
||||
}
|
||||
|
||||
void AmSkullkinDrill::TriggerDrill(Entity* self) {
|
||||
GameMessages::SendPlayAnimation(self, u"slowdown");
|
||||
RenderComponent::PlayAnimation(self, u"slowdown");
|
||||
|
||||
self->AddTimer("killDrill", 10.0f);
|
||||
|
||||
@@ -170,7 +171,7 @@ void AmSkullkinDrill::OnArrived(Entity* self, uint32_t waypointIndex) {
|
||||
auto* standObj = GetStandObj(self);
|
||||
|
||||
if (waypointIndex == 1) {
|
||||
GameMessages::SendPlayAnimation(self, u"no-spin");
|
||||
RenderComponent::PlayAnimation(self, u"no-spin");
|
||||
GameMessages::SendStopFXEffect(self, true, "active");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"indicator", "indicator");
|
||||
|
||||
@@ -190,7 +191,7 @@ void AmSkullkinDrill::OnArrived(Entity* self, uint32_t waypointIndex) {
|
||||
|
||||
return;
|
||||
} else {
|
||||
GameMessages::SendPlayAnimation(self, u"idle");
|
||||
RenderComponent::PlayAnimation(self, u"idle");
|
||||
GameMessages::SendPlayFXEffect(self->GetObjectID(), -1, u"spin", "active");
|
||||
GameMessages::SendStopFXEffect(self, true, "indicator");
|
||||
}
|
||||
@@ -215,7 +216,7 @@ void AmSkullkinDrill::PlayCinematic(Entity* self) {
|
||||
void AmSkullkinDrill::PlayAnim(Entity* self, Entity* player, const std::string& animName) {
|
||||
const auto animTime = animName == "spinjitzu-staff-end" ? 0.5f : 1.0f;
|
||||
|
||||
GameMessages::SendPlayAnimation(player, GeneralUtils::ASCIIToUTF16(animName));
|
||||
RenderComponent::PlayAnimation(player, animName);
|
||||
|
||||
self->AddTimer("AnimDone_" + animName, animTime);
|
||||
}
|
||||
@@ -308,7 +309,7 @@ void AmSkullkinDrill::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (animName == "spinjitzu-staff-windup") {
|
||||
TriggerDrill(self);
|
||||
|
||||
GameMessages::SendPlayAnimation(player, u"spinjitzu-staff-loop");
|
||||
RenderComponent::PlayAnimation(player, u"spinjitzu-staff-loop");
|
||||
} else if (animName == "spinjitzu-staff-end") {
|
||||
FreezePlayer(self, player, false);
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#include "AmSkullkinDrillStand.h"
|
||||
#include "GameMessages.h"
|
||||
#include "dpEntity.h"
|
||||
#include "Entity.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void AmSkullkinDrillStand::OnStartup(Entity* self) {
|
||||
self->SetVar(u"bActive", true);
|
||||
@@ -31,5 +33,5 @@ void AmSkullkinDrillStand::OnProximityUpdate(Entity* self, Entity* entering, std
|
||||
|
||||
GameMessages::SendPlayFXEffect(entering->GetObjectID(), 1378, u"create", "pushBack");
|
||||
|
||||
GameMessages::SendPlayAnimation(entering, u"knockback-recovery");
|
||||
RenderComponent::PlayAnimation(entering, u"knockback-recovery");
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include "EntityInfo.h"
|
||||
#include "GameMessages.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void AmSkullkinTower::OnStartup(Entity* self) {
|
||||
self->SetProximityRadius(20, "Tower");
|
||||
@@ -117,13 +118,13 @@ void AmSkullkinTower::OnChildRemoved(Entity* self, Entity* child) {
|
||||
self->SetVar(u"legTable", legTable);
|
||||
|
||||
if (legTable.size() == 2) {
|
||||
GameMessages::SendPlayAnimation(self, u"wobble-1");
|
||||
RenderComponent::PlayAnimation(self, u"wobble-1");
|
||||
} else if (legTable.size() == 1) {
|
||||
GameMessages::SendPlayAnimation(self, u"wobble-2");
|
||||
RenderComponent::PlayAnimation(self, u"wobble-2");
|
||||
} else if (legTable.empty()) {
|
||||
const auto animTime = 2.5f;
|
||||
|
||||
GameMessages::SendPlayAnimation(self, u"fall");
|
||||
RenderComponent::PlayAnimation(self, u"fall");
|
||||
|
||||
self->AddTimer("spawnGuys", animTime - 0.2f);
|
||||
|
||||
|
Reference in New Issue
Block a user