mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
fix(DB/Ulduar): correct Freya's Gift emblem counts (#27718)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- Freya's Gift pays one emblem plus one per Elder left alive to empower her, so the encounter
|
||||
-- pays four either way once the Elders killed early are counted. On top of that the chests kept
|
||||
-- a second, pre-3.3 emblem reference, which paid up to four more: with one Elder alive the
|
||||
-- 25-man chest handed out six emblems, twice what full hard mode pays.
|
||||
DELETE FROM `gameobject_loot_template` WHERE `Entry` IN (26959, 26960, 26961, 26962, 27078, 27079, 27080, 27081) AND `Reference` = 34349;
|
||||
|
||||
-- The remaining rows already scale one to three; only the three-Elder chests are short.
|
||||
-- Chest by Elders left alive: 26961/26959/27080/27078 for 10-man, 26962/26960/27081/27079 for 25-man.
|
||||
UPDATE `gameobject_loot_template` SET `MinCount` = 4, `MaxCount` = 4 WHERE `Entry` IN (27078, 27079) AND `Item` = 47241;
|
||||
+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; 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 |
|
||||
| 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; one Elder left alive spawns the one-Elder Freya's Gift, which is the chest whose emblem count the fix corrects | P2 | covered (`TestAC_27095_*`, `TestAC_27602_*`, `TestAC_27590_*`, `TestAC_27539_*`, `TestAC_27455_*`, `TestUlduar_BrightleafSunBeamsCappedPerWave`, `TestUlduar_FreyaWardLasherOutlivesSummonDuration`, `TestUlduar_ThorimEvadeDespawnDoesNotYield`, `TestUlduar_FreyaGiftMatchesElderCount`); Kologarn Charge `blocked-harness` (bridge Z after Charge); Freya's Gift emblem counts `blocked-harness` (a chest's loot opens only through SPELL_EFFECT_OPEN_LOCK, and CMSG_CAST_SPELL carries no TARGET_FLAG_GAMEOBJECT) | #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 |
|
||||
|
||||
|
||||
@@ -1359,3 +1359,92 @@ func TestUlduar_FreyaWardLasherOutlivesSummonDuration(t *testing.T) {
|
||||
bot.DamageKill(t, adds, 10_000_000, 30*time.Second)
|
||||
bot.AssertWorldAlive(t)
|
||||
}
|
||||
|
||||
// PR: https://github.com/azerothcore/azerothcore-wotlk/pull/27718
|
||||
// Each Elder count has its own Freya's Gift, and the emblems the fix corrects are per chest, so
|
||||
// the chest that spawns has to be the one for the Elders actually left alive. The emblems inside
|
||||
// are out of reach here: a chest opens only through SPELL_EFFECT_OPEN_LOCK (Spell::SendLoot),
|
||||
// CMSG_LOOT drops any guid that is not a creature, and the harness cannot cast at a gameobject
|
||||
// target. Inventoried as blocked-harness in e2e/README.md.
|
||||
func TestUlduar_FreyaGiftMatchesElderCount(t *testing.T) {
|
||||
meta.Begin(t, meta.TestMeta{
|
||||
Tags: []string{"short", "instances"},
|
||||
Runtime: "short",
|
||||
Category: "instances/northrend/ulduar",
|
||||
})
|
||||
|
||||
const (
|
||||
npcFreya = uint32(32906)
|
||||
npcElderIronbranch = uint32(32913)
|
||||
npcElderStonebark = uint32(32914)
|
||||
|
||||
// 10-man spawns 194330 for no Elder alive, 194328 for one, 194326 for two, 194324 for all
|
||||
// three.
|
||||
goGiftNoElder = uint32(194330)
|
||||
goGiftOneElder = uint32(194328)
|
||||
goGiftTwoElders = uint32(194326)
|
||||
goGiftThreeElders = uint32(194324)
|
||||
)
|
||||
|
||||
bot := e2eharness.NewSolo(t, e2eharness.ScenarioOpts{
|
||||
Prefix: "FreyaGf",
|
||||
Level: 80,
|
||||
})
|
||||
|
||||
// Raid interior pad (game_tele BossFreya); stay GM through the raid enter.
|
||||
bot.Teleport(t, 2326.82, -48.131, 424.963, e2eharness.MapUlduar)
|
||||
if _, _, _, m := bot.Pos(); m != e2eharness.MapUlduar {
|
||||
e2eharness.Preconditionf(t, "not in Ulduar after Freya pad tele map=%d", m)
|
||||
}
|
||||
bot.GoCreatureID(t, npcFreya)
|
||||
|
||||
// Ironbranch and Stonebark stand 136y and 144y from Freya, inside visibility. Brightleaf at
|
||||
// 190y is out of the object cache and never touched, so he is the one left to empower her.
|
||||
var toKill []uint64
|
||||
for _, entry := range []uint32{npcElderIronbranch, npcElderStonebark} {
|
||||
elder := bot.WaitUnit(t, entry, 30*time.Second)
|
||||
if hp, _ := bot.UnitHP(elder); hp == 0 {
|
||||
e2eharness.Preconditionf(t, "Elder %d is already a corpse: this instance copy is not fresh", entry)
|
||||
}
|
||||
toKill = append(toKill, elder)
|
||||
}
|
||||
bot.DamageKill(t, toKill, 10_000_000, 20*time.Second)
|
||||
|
||||
bot.CombatReady(t)
|
||||
|
||||
// Evade can leave a 0 HP object in cache, so wait for a living Freya rather than any GUID.
|
||||
var freyaGUID uint64
|
||||
deadline := time.Now().Add(30 * time.Second)
|
||||
for {
|
||||
freyaGUID = bot.WaitUnit(t, npcFreya, 10*time.Second)
|
||||
if hp, maxHP := bot.UnitHP(freyaGUID); maxHP > 0 && hp > 0 && bot.World.GetObject(freyaGUID) != nil {
|
||||
break
|
||||
}
|
||||
if !time.Now().Before(deadline) {
|
||||
e2eharness.Preconditionf(t, "no living Freya in cache after GoCreatureID (last=0x%X)", freyaGUID)
|
||||
}
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
}
|
||||
// The Elders are read on engage, and only the living ones count.
|
||||
bot.Engage(t, freyaGUID, 15*time.Second)
|
||||
|
||||
// Freya's DamageTaken runs the whole defeat: it zeroes the killing blow, summons the chest and
|
||||
// teleports her out. She never reaches 0 HP, so DamageKill would spin until it timed out.
|
||||
bot.Damage(t, freyaGUID, 100_000_000)
|
||||
|
||||
chest := e2eharness.TryNearbyGameObjectByEntry(t, bot.World, goGiftOneElder, 30*time.Second)
|
||||
if chest == 0 {
|
||||
for _, other := range []struct {
|
||||
entry uint32
|
||||
elders int
|
||||
}{{goGiftNoElder, 0}, {goGiftTwoElders, 2}, {goGiftThreeElders, 3}} {
|
||||
if e2eharness.TryNearbyGameObjectByEntry(t, bot.World, other.entry, time.Second) != 0 {
|
||||
e2eharness.Assertf(t, "Freya's Gift %d spawned: the script counted %d Elders alive, want 1",
|
||||
other.entry, other.elders)
|
||||
}
|
||||
}
|
||||
e2eharness.Preconditionf(t, "no Freya's Gift within 30s of Freya's defeat")
|
||||
}
|
||||
t.Logf("PASS Freya's Gift %d spawned with one Elder alive (guid=0x%X)", goGiftOneElder, chest)
|
||||
bot.AssertWorldAlive(t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user