mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
test(e2e/Ulduar): drop the flaky Brightleaf sun beam despawn test (#27703)
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ go test -tags=e2e ./local/... -count=1 -v -timeout 30m -parallel 1
|
||||
| guild/charter_bank | charter buy+turn-in | P2 | covered | — |
|
||||
| instances/bind_reset | party tele; ritual summon | P2 | covered; post-reset summon `blocked-harness` (AcceptSummon after reset) | #10708 |
|
||||
| instances/classic/stratholme | Timmy remains hidden while a relevant Square Scarlet lives, then emerges after the area is clear | P2 | covered (`TestAC_26363_TimmyEmergesAfterSquareCleared`) | #26363 |
|
||||
| instances/ulduar | named tele; Freya wave interval; a Laughing Skull's Lunatic Gaze stops at the brain room's geometry instead of draining sanity through it; Elder Brightleaf's Unstable Sun Beams despawn on their own timer instead of outliving him, one lands under the player rather than all on the elder, and a wave stays capped however many players stand in range; Psychosis and Malady of the Mind stop picking a player once they are at 40 Sanity or less; Algalon holds still for 3s once his Big Bang cast lands instead of resuming melee and Quantum Strike on the next tick; a Writhing Lasher stays up past 62947's own 10s summon duration, because the despawn type its AI sets in `IsSummonedBy` is no longer overwritten on the way out of the summon call; a wipe to Thorim's melee with a death-persistent damage shield on the last victim spawns no Cache of Storms while his hard-reset despawn runs, and a lethal hit on the respawned Thorim still yields; an Ancient Water Spirit whose Tidal Wave is kicked casts no damage-and-knockback follow-up | P2 | covered (`TestAC_27095_*`, `TestAC_27602_*`, `TestAC_27590_*`, `TestAC_27539_*`, `TestAC_27455_*`, `TestUlduar_BrightleafSunBeams*`, `TestUlduar_FreyaWardLasherOutlivesSummonDuration`, `TestUlduar_ThorimEvadeDespawnDoesNotYield`); Kologarn Charge `blocked-harness` (bridge Z after Charge) | #26266 #27095 #27455 #27539 #27590 #27602 |
|
||||
| instances/ulduar | named tele; Freya wave interval; a Laughing Skull's Lunatic Gaze stops at the brain room's geometry instead of draining sanity through it; a wave of Elder Brightleaf's Unstable Sun Beams stays capped however many players stand in range; Psychosis and Malady of the Mind stop picking a player once they are at 40 Sanity or less; Algalon holds still for 3s once his Big Bang cast lands instead of resuming melee and Quantum Strike on the next tick; a Writhing Lasher stays up past 62947's own 10s summon duration, because the despawn type its AI sets in `IsSummonedBy` is no longer overwritten on the way out of the summon call; a wipe to Thorim's melee with a death-persistent damage shield on the last victim spawns no Cache of Storms while his hard-reset despawn runs, and a lethal hit on the respawned Thorim still yields; an Ancient Water Spirit whose Tidal Wave is kicked casts no damage-and-knockback follow-up | P2 | covered (`TestAC_27095_*`, `TestAC_27602_*`, `TestAC_27590_*`, `TestAC_27539_*`, `TestAC_27455_*`, `TestUlduar_BrightleafSunBeamsCappedPerWave`, `TestUlduar_FreyaWardLasherOutlivesSummonDuration`, `TestUlduar_ThorimEvadeDespawnDoesNotYield`); Kologarn Charge `blocked-harness` (bridge Z after Charge) | #26266 #27095 #27455 #27539 #27590 #27602 |
|
||||
| world/dalaran | Dalaran's faction guards eject a hostile player from the Silver Enclave and Sunreaver's Sanctuary, and from nowhere else — public mailboxes, the street, the sewers and the neutral inn are left alone. Both directions are asserted: only checking public ground would pass a build where the guards never fire. One case parks a pet inside a quarter with its owner outside, since every other case is a lone player and would not notice the guard reading the owner's position instead of the trespasser's | P2 | covered (`TestAC_4467_*`) | #4467 |
|
||||
| world/gameevents | Call to Arms banners at the Dalaran portals belong to the side they stand on, and the already-correct Warsong set is unchanged. **Wants an exclusive realm**: starting a holiday re-anchors its schedule in the running worldserver until restart; holidays already running are left alone | P2 | covered (`TestAC_24380_*`); Shattrath's 23 positions `gap` | #24380 |
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ package ulduar_test
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"math"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -378,93 +377,6 @@ const (
|
||||
// her banishes every living elder, after which he schedules no beams for the life of the instance.
|
||||
var brightleafSpawn = e2eharness.Position3{X: 2385.09, Y: 131.341, Z: 440.201, Map: e2eharness.MapUlduar}
|
||||
|
||||
// Elder Brightleaf's Unstable Sun Beams must not outlive him, and each wave must land one beam on
|
||||
// the elder plus one under a player in range. Before the fix the beams were hand-summoned with no
|
||||
// duration and the elder's event map was the only thing that removed them, so a kill taken with a
|
||||
// wave up left them standing for the life of the instance.
|
||||
// Issue: https://github.com/chromiecraft/chromiecraft/issues/10163
|
||||
func TestUlduar_BrightleafSunBeamsDespawnAfterDeath(t *testing.T) {
|
||||
meta.Begin(t, meta.TestMeta{
|
||||
Tags: []string{"med", "instances"},
|
||||
Runtime: "med",
|
||||
Category: "instances/northrend/ulduar",
|
||||
})
|
||||
|
||||
const (
|
||||
// Each beam despawns itself after a randomised 18-25s; the oracle allows the worst case
|
||||
// plus slack for the kill and the object-cache round trip. Do not widen it past 30s: that
|
||||
// is 62221's summon duration, the engine backstop that would despawn the player's beam by
|
||||
// itself and hide the regression this guards.
|
||||
beamMaxLifetime = 25 * time.Second
|
||||
// The elder's own beam sits on him, so "landed on the player" is only distinguishable
|
||||
// from "stacked on the elder" while the bot stands clear of him by more than this.
|
||||
beamOnPlayerRange = float32(3)
|
||||
)
|
||||
|
||||
bot := e2eharness.NewSolo(t, e2eharness.ScenarioOpts{
|
||||
Prefix: "Bleaf",
|
||||
Level: 80,
|
||||
})
|
||||
|
||||
// Stay GM through the raid enter.
|
||||
bot.TeleportPad(t, brightleafSpawn)
|
||||
if _, _, _, m := bot.Pos(); m != e2eharness.MapUlduar {
|
||||
e2eharness.Preconditionf(t, "not in Ulduar after Brightleaf tele map=%d", m)
|
||||
}
|
||||
bot.GoCreatureID(t, npcElderBrightleaf)
|
||||
bot.CombatReady(t)
|
||||
|
||||
elder := waitLivingBrightleaf(t, bot)
|
||||
bot.Engage(t, elder, 15*time.Second)
|
||||
|
||||
wave := waitBrightleafWave(t, bot, elder)
|
||||
bx, by, bz, _ := bot.Pos()
|
||||
elderObj := bot.World.GetObject(elder)
|
||||
if elderObj == nil {
|
||||
e2eharness.Preconditionf(t, "Elder Brightleaf 0x%X left the object cache before the wave landed", elder)
|
||||
}
|
||||
ex, ey, ez := elderObj.PosX, elderObj.PosY, elderObj.PosZ
|
||||
if botToElder := e2eharness.Distance3D(bx, by, bz, ex, ey, ez); botToElder <= beamOnPlayerRange {
|
||||
e2eharness.Preconditionf(t, "bot stands %.1fy from the elder, too close for the placement oracle to discriminate (need > %.1fy)",
|
||||
botToElder, beamOnPlayerRange)
|
||||
}
|
||||
nearestToBot := float32(math.MaxFloat32)
|
||||
for _, b := range wave {
|
||||
toBot := e2eharness.Distance3D(bx, by, bz, b.x, b.y, b.z)
|
||||
if toBot < nearestToBot {
|
||||
nearestToBot = toBot
|
||||
}
|
||||
t.Logf("beam 0x%X at (%.1f,%.1f,%.1f) dist bot=%.1f elder=%.1f", b.guid, b.x, b.y, b.z,
|
||||
toBot, e2eharness.Distance3D(ex, ey, ez, b.x, b.y, b.z))
|
||||
}
|
||||
// 62207 summons one beam at the elder and force-casts 62221 on the players its script picks,
|
||||
// each summoning one at their own feet. A forced cast whose target mask takes no unit target
|
||||
// must not inherit the original caster as its destination, or every beam stacks on the elder.
|
||||
if nearestToBot > beamOnPlayerRange {
|
||||
e2eharness.Assertf(t, "no Unstable Sun Beam landed on the player: nearest of %d beams is %.1fy away",
|
||||
len(wave), nearestToBot)
|
||||
}
|
||||
|
||||
// Kill him with the wave still up — that is the state that used to leak.
|
||||
bot.DamageKill(t, []uint64{elder}, 10_000_000, 30*time.Second)
|
||||
killT := time.Now()
|
||||
|
||||
cutoff := killT.Add(beamMaxLifetime + 15*time.Second)
|
||||
for {
|
||||
left := sunBeamsInCache(bot, npcUnstableSunBeam, beamSearchRange)
|
||||
if len(left) == 0 {
|
||||
break
|
||||
}
|
||||
if !time.Now().Before(cutoff) {
|
||||
e2eharness.Assertf(t, "%d Unstable Sun Beam(s) still up %s after Elder Brightleaf died: %v",
|
||||
len(left), time.Since(killT).Round(time.Second), sunBeamGUIDs(left))
|
||||
}
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
}
|
||||
t.Logf("PASS %d sun beams all gone %s after Elder Brightleaf died",
|
||||
len(wave), time.Since(killT).Round(time.Millisecond))
|
||||
}
|
||||
|
||||
type sunBeamSnap struct {
|
||||
guid uint64
|
||||
x, y, z float32
|
||||
|
||||
Reference in New Issue
Block a user