mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-26 07:27:18 +00:00
Fix dragon stuns (#915)
This commit is contained in:
parent
d052ed6a63
commit
dff02773a0
@ -63,10 +63,11 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
|
|||||||
|
|
||||||
if (skillComponent != nullptr) {
|
if (skillComponent != nullptr) {
|
||||||
skillComponent->Interrupt();
|
skillComponent->Interrupt();
|
||||||
|
skillComponent->Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
self->SetVar<int32_t>(u"weakpoint", 2);
|
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);
|
GameMessages::SendPlayAnimation(self, u"stunstart", 1.7f);
|
||||||
|
|
||||||
self->AddTimer("timeToStunLoop", 1);
|
self->AddTimer("timeToStunLoop", 1);
|
||||||
@ -131,7 +132,9 @@ void AmDarklingDragon::OnTimerDone(Entity* self, std::string timerName) {
|
|||||||
}
|
}
|
||||||
if (skillComponent != nullptr) {
|
if (skillComponent != nullptr) {
|
||||||
skillComponent->Interrupt();
|
skillComponent->Interrupt();
|
||||||
|
skillComponent->Reset();
|
||||||
}
|
}
|
||||||
|
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_COMBAT, eAnimationFlags::IDLE_NONE, UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
self->SetVar<int32_t>(u"weakspot", -1);
|
self->SetVar<int32_t>(u"weakspot", -1);
|
||||||
GameMessages::SendNotifyObject(self->GetObjectID(), self->GetObjectID(), u"DragonRevive", UNASSIGNED_SYSTEM_ADDRESS);
|
GameMessages::SendNotifyObject(self->GetObjectID(), self->GetObjectID(), u"DragonRevive", UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,6 @@ void FvMaelstromDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_
|
|||||||
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
|
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
|
||||||
|
|
||||||
if (destroyableComponent != nullptr) {
|
if (destroyableComponent != nullptr) {
|
||||||
Game::logger->Log("FvMaelstromDragon", "Hit %i", destroyableComponent->GetArmor());
|
|
||||||
|
|
||||||
if (destroyableComponent->GetArmor() > 0) return;
|
if (destroyableComponent->GetArmor() > 0) return;
|
||||||
|
|
||||||
auto weakpoint = self->GetVar<int32_t>(u"weakpoint");
|
auto weakpoint = self->GetVar<int32_t>(u"weakpoint");
|
||||||
@ -80,10 +78,12 @@ void FvMaelstromDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_
|
|||||||
|
|
||||||
if (skillComponent != nullptr) {
|
if (skillComponent != nullptr) {
|
||||||
skillComponent->Interrupt();
|
skillComponent->Interrupt();
|
||||||
|
skillComponent->Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
self->SetVar<int32_t>(u"weakpoint", 2);
|
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);
|
GameMessages::SendPlayAnimation(self, u"stunstart", 1.7f);
|
||||||
|
|
||||||
self->AddTimer("timeToStunLoop", 1);
|
self->AddTimer("timeToStunLoop", 1);
|
||||||
@ -150,8 +150,9 @@ void FvMaelstromDragon::OnTimerDone(Entity* self, std::string timerName) {
|
|||||||
|
|
||||||
if (skillComponent != nullptr) {
|
if (skillComponent != nullptr) {
|
||||||
skillComponent->Interrupt();
|
skillComponent->Interrupt();
|
||||||
|
skillComponent->Reset();
|
||||||
}
|
}
|
||||||
|
GameMessages::SendChangeIdleFlags(self->GetObjectID(), eAnimationFlags::IDLE_COMBAT, eAnimationFlags::IDLE_NONE, UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
self->SetVar<int32_t>(u"weakspot", -1);
|
self->SetVar<int32_t>(u"weakspot", -1);
|
||||||
|
|
||||||
GameMessages::SendNotifyObject(self->GetObjectID(), self->GetObjectID(), u"DragonRevive", UNASSIGNED_SYSTEM_ADDRESS);
|
GameMessages::SendNotifyObject(self->GetObjectID(), self->GetObjectID(), u"DragonRevive", UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
|
Loading…
Reference in New Issue
Block a user