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:
@@ -7,6 +7,7 @@
|
||||
#include "BaseCombatAIComponent.h"
|
||||
#include "EntityInfo.h"
|
||||
#include "eAninmationFlags.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void AmDarklingDragon::OnStartup(Entity* self) {
|
||||
self->SetVar<int32_t>(u"weakspot", 0);
|
||||
@@ -70,9 +71,9 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
|
||||
|
||||
self->SetVar<int32_t>(u"weakpoint", 2);
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_NONE, eAnimationFlags::IDLE_COMBAT, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
GameMessages::SendPlayAnimation(self, u"stunstart", 1.7f);
|
||||
float animationTime = RenderComponent::PlayAnimation(self, u"stunstart", 1.7f);
|
||||
|
||||
self->AddTimer("timeToStunLoop", 1);
|
||||
self->AddTimer("timeToStunLoop", animationTime);
|
||||
|
||||
auto position = self->GetPosition();
|
||||
auto forward = self->GetRotation().GetForwardVector();
|
||||
@@ -121,9 +122,9 @@ void AmDarklingDragon::OnTimerDone(Entity* self, std::string timerName) {
|
||||
} else if (timerName == "ExposeWeakSpotTimer") {
|
||||
self->SetVar<int32_t>(u"weakspot", 1);
|
||||
} else if (timerName == "timeToStunLoop") {
|
||||
GameMessages::SendPlayAnimation(self, u"stunloop", 1.8f);
|
||||
RenderComponent::PlayAnimation(self, u"stunloop", 1.8f);
|
||||
} else if (timerName == "ReviveTimer") {
|
||||
GameMessages::SendPlayAnimation(self, u"stunend", 2.0f);
|
||||
RenderComponent::PlayAnimation(self, u"stunend", 2.0f);
|
||||
self->AddTimer("backToAttack", 1);
|
||||
} else if (timerName == "backToAttack") {
|
||||
auto* baseCombatAIComponent = self->GetComponent<BaseCombatAIComponent>();
|
||||
@@ -153,5 +154,5 @@ void AmDarklingDragon::OnFireEventServerSide(Entity* self, Entity* sender, std::
|
||||
|
||||
self->SetVar<LWOOBJID>(u"Golem", sender->GetObjectID());
|
||||
|
||||
GameMessages::SendPlayAnimation(self, u"quickbuildhold", 1.9f);
|
||||
RenderComponent::PlayAnimation(self, u"quickbuildhold", 1.9f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user