mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 17:54:01 +00:00
Fix baseEnemyApe stuns and fix IdleFlags serialization (#914)
* Fix baseEnemyApe stuns * Correct serialization
This commit is contained in:
@@ -31,9 +31,12 @@ void BaseEnemyApe::OnHit(Entity* self, Entity* attacker) {
|
||||
if (destroyableComponent != nullptr && destroyableComponent->GetArmor() < 1 && !self->GetBoolean(u"knockedOut")) {
|
||||
StunApe(self, true);
|
||||
self->CancelTimer("spawnQBTime");
|
||||
|
||||
auto* skillComponent = self->GetComponent<SkillComponent>();
|
||||
if (skillComponent) {
|
||||
skillComponent->Reset();
|
||||
}
|
||||
GameMessages::SendPlayAnimation(self, u"disable", 1.7f);
|
||||
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_NONE, eAnimationFlags::IDLE_COMBAT, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
const auto reviveTime = self->GetVar<float_t>(u"reviveTime") != 0.0f
|
||||
? self->GetVar<float_t>(u"reviveTime") : 12.0f;
|
||||
self->AddTimer("reviveTime", reviveTime);
|
||||
@@ -50,6 +53,7 @@ void BaseEnemyApe::OnTimerDone(Entity* self, std::string timerName) {
|
||||
destroyableComponent->SetArmor(destroyableComponent->GetMaxArmor() / timesStunned);
|
||||
}
|
||||
EntityManager::Instance()->SerializeEntity(self);
|
||||
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_COMBAT, eAnimationFlags::IDLE_NONE, UNASSIGNED_SYSTEM_ADDRESS);
|
||||
self->SetVar<uint32_t>(u"timesStunned", timesStunned + 1);
|
||||
StunApe(self, false);
|
||||
|
||||
|
Reference in New Issue
Block a user