diff --git a/dScripts/BaseEnemyApe.cpp b/dScripts/BaseEnemyApe.cpp index 88c846f6..3419b2c4 100644 --- a/dScripts/BaseEnemyApe.cpp +++ b/dScripts/BaseEnemyApe.cpp @@ -8,11 +8,6 @@ void BaseEnemyApe::OnStartup(Entity *self) { self->SetVar(u"timesStunned", 2); self->SetVar(u"knockedOut", false); - - auto* combatAIComponent = self->GetComponent(); - if (combatAIComponent != nullptr) { - combatAIComponent->SetStunImmune(true); - } } void BaseEnemyApe::OnDie(Entity *self, Entity *killer) { @@ -23,10 +18,8 @@ void BaseEnemyApe::OnDie(Entity *self, Entity *killer) { } void BaseEnemyApe::OnSkillCast(Entity *self, uint32_t skillID) { - const auto groundPoundSkill = self->GetVar(u"GroundPoundSkill") != 0 - ? self->GetVar(u"GroundPoundSkill") : 725; - const auto spawnQuickBuildTime = self->GetVar(u"spawnQBTime") != 0.0f - ? self->GetVar(u"spawnQBTime") : 5.0f; + const auto groundPoundSkill = self->GetVar(u"GroundPoundSkill") != 0 ? self->GetVar(u"GroundPoundSkill") : 725; + const auto spawnQuickBuildTime = self->GetVar(u"spawnQBTime") != 0.0f ? self->GetVar(u"spawnQBTime") : 5.0f; if (skillID == groundPoundSkill && self->GetVar(u"QB") == LWOOBJID_EMPTY) { self->AddTimer("spawnQBTime", spawnQuickBuildTime); @@ -61,9 +54,7 @@ void BaseEnemyApe::OnTimerDone(Entity *self, std::string timerName) { StunApe(self, false); } else if (timerName == "spawnQBTime" && self->GetVar(u"QB") == LWOOBJID_EMPTY) { - - // Spawns the QB, which can insta kill the ape - // Quick mafs to spawn the QB in the correct spot + // Spawn QB in front of ape. const auto position = self->GetPosition(); const auto rotation = self->GetRotation(); @@ -107,8 +98,6 @@ void BaseEnemyApe::OnTimerDone(Entity *self, std::string timerName) { auto* skillComponent = self->GetComponent(); if (skillComponent != nullptr) { - // We use a different behavior than the script here, the original one contains a TargetCaster behavior - // but as of writing we can't pass an optional originated to give the loot to the player skillComponent->CalculateBehavior(1273, 29446, self->GetObjectID(), true, false, player->GetObjectID()); } @@ -120,8 +109,7 @@ void BaseEnemyApe::OnFireEventServerSide(Entity *self, Entity *sender, std::stri int32_t param3) { if (args == "rebuildDone" && sender != nullptr) { self->SetVar(u"smasher", sender->GetObjectID()); - const auto anchorDamageDelayTime = self->GetVar(u"AnchorDamageDelayTime") != 0.0f - ? self->GetVar(u"AnchorDamageDelayTime") : 0.5f; + const auto anchorDamageDelayTime = self->GetVar(u"AnchorDamageDelayTime") != 0.0f ? self->GetVar(u"AnchorDamageDelayTime") : 0.5f; self->AddTimer("anchorDamageTimer", anchorDamageDelayTime); } } diff --git a/dScripts/WaveBossApe.cpp b/dScripts/WaveBossApe.cpp index e1860048..c7fdccf2 100644 --- a/dScripts/WaveBossApe.cpp +++ b/dScripts/WaveBossApe.cpp @@ -32,6 +32,7 @@ void WaveBossApe::OnFireEventServerSide(Entity *self, Entity *sender, std::strin auto* combatAIComponent = self->GetComponent(); if (combatAIComponent != nullptr) { combatAIComponent->SetDisabled(false); + combatAIComponent->SetStunImmune(false); } } else { BaseEnemyApe::OnFireEventServerSide(self, sender, args, param1, param2, param3);