mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +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:
@@ -4,19 +4,15 @@
|
||||
#include "EntityManager.h"
|
||||
#include "MissionComponent.h"
|
||||
#include "eMissionTaskType.h"
|
||||
#include "RenderComponent.h"
|
||||
|
||||
void MaestromExtracticatorServer::OnStartup(Entity* self) {
|
||||
//self:SetNetworkVar("current_anim", failAnim)
|
||||
GameMessages::SendPlayAnimation(self, GeneralUtils::ASCIIToUTF16(failAnim));
|
||||
|
||||
self->AddTimer("PlayFail", defaultTime);
|
||||
self->AddTimer("PlayFail", RenderComponent::PlayAnimation(self, failAnim));
|
||||
self->AddTimer("RemoveSample", destroyAfterNoSampleTime);
|
||||
}
|
||||
|
||||
void MaestromExtracticatorServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1,
|
||||
int32_t param2, int32_t param3) {
|
||||
if (sender == nullptr)
|
||||
return;
|
||||
void MaestromExtracticatorServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||
if (sender == nullptr) return;
|
||||
|
||||
if (args == "attemptCollection") {
|
||||
Entity* player = EntityManager::Instance()->GetEntity(self->GetSpawnerID());
|
||||
@@ -32,20 +28,17 @@ void MaestromExtracticatorServer::OnFireEventServerSide(Entity* self, Entity* se
|
||||
}
|
||||
|
||||
void MaestromExtracticatorServer::CollectSample(Entity* self, LWOOBJID sampleObj) {
|
||||
PlayAnimAndReturnTime(self, collectAnim);
|
||||
self->AddTimer("RemoveSample", defaultTime);
|
||||
self->AddTimer("RemoveSample", PlayAnimAndReturnTime(self, collectAnim));
|
||||
}
|
||||
|
||||
void MaestromExtracticatorServer::PlayAnimAndReturnTime(Entity* self, std::string animID) {
|
||||
GameMessages::SendPlayAnimation(self, GeneralUtils::ASCIIToUTF16(animID));
|
||||
float MaestromExtracticatorServer::PlayAnimAndReturnTime(Entity* self, std::string animID) {
|
||||
return RenderComponent::PlayAnimation(self, animID);
|
||||
}
|
||||
|
||||
void MaestromExtracticatorServer::OnTimerDone(Entity* self, std::string timerName) {
|
||||
if (timerName == "RemoveSample") {
|
||||
self->ScheduleKillAfterUpdate();
|
||||
}
|
||||
|
||||
if (timerName == "PlayFail") {
|
||||
GameMessages::SendPlayAnimation(self, GeneralUtils::ASCIIToUTF16(failAnim));
|
||||
} else if (timerName == "PlayFail") {
|
||||
RenderComponent::PlayAnimation(self, failAnim);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user