Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Core/WorldState): implement Battle for Sun's Reach Event #21219

Merged
merged 37 commits into from
Jan 31, 2025

Conversation

sogladev
Copy link
Member

@sogladev sogladev commented Jan 20, 2025

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

Adds handling for 4 phases and 3 subphases to capture the Isle of Quel'Danas through what is known as the Battle for Sun's Reach Event featuring new admin commands, new spawns, gossip, and conditions.

Adds handling of the 3 gates of the Sunwell Plateau.

By default, the phases are fully progressed, meaning the Isle of Quel'danas is in its final stage with all subphases completed. Similarly, all Sunwell Plateau gates are open. This state is stored in acore_character.world_state and can be removed to allow blizzlike progression.

Issues Addressed:

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

The Battle for Sun's Reach was a series of four major stages and three sub-stages involved in capturing the Isle of Quel'Danas. Completing daily quests for the Shattered Sun Offensive leads to the completion of the stages. As stages are completed, more NPCs appear and more quests are available.

https://wowpedia.fandom.com/wiki/Battle_for_Sun%27s_Reach

day 1 footage, Phase 0, https://www.youtube.com/watch?v=O9VacGvrCmw

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.

tele to the island
.tele isleofquel
Nasuun Shattrath
.go c 96655

.worldstate sunsreach
image

Event.Announce = 1 useful to announce game events
.event activelist lists active events

Sun's Reach Reclamation

Setting phases can either be set through commands:

  1. Phase can be freely set with phase to progress/deprogress phases.
  2. Subphase can be set with subphase. These use a mask. They cannot be unset without a restart. Only activate subphases when their respective phase is active. For example: only activate anvil only once the armory is taken.

Or through reaching a quest count:
.worldstate sunsreach status gives an overview of the phase, subphases and progression status.
image

Each counter is only incremented and checked on quest turn ins.

A worldconfig option Sunsreach.CounterMax sets the amount of quests that need to be completed to reach. It's calculated as counter1 + counter2 >= countermax if there are multiple counters for an objective. For testing, set this to a low amount like 1-3.

Note that setting a counter through commands will not trigger a phase/subphase. You can set the counter higher than the CounterMax config.

Test list

  • Switching phases is possible through quests
  • Switching phases is possible through commands
  • Flight Path to the island is available for Horde and Alliance
.quest add 11550
Alliance
.go c 2008
Horde
.go c 56866

For each phase:

  • Check with Nasuun for gossip progress status after Sanctum is taken.

  • Correct gossip texts of quest givers. Their gossip should indicate which phase is active.

  • Correct dailies per phase. The quest text should indicate which phase is active.

  • Some quest givers should show progress status to the next phase. Check if the percentage is correct

  • enemy/friendly spawns are where they should be. No Dawnblade spawns in Shattered Sun territory. Or demons near the armory when armory has been taken.

  • no duplicate mob spawns. Indicated if NPCs blend together

  • Marksman/Warriors upgrade their gear depending on anvil/harbor status. armory/no anvil, armory/anvil, harbor/no anvil, harbor/anvil. This gear is set on spawn.

  • (requires Sanctum) Portal subphase: Portals should be unavailable until Portal dailies from Nasuun (Shattrath) are complete. Once complete, portals spawn in Shattrath and the Island. In Shattrath, there should be NPCs pathing to and entering the portal.

  • (requires Armory) Anvil subphase: vendors on the island (Smith) and Shattrath (near portal) should be unavailable until Anvil subphase is complete. Once complete, the anvil spawns.

  • (requires Harbor) Alch subphase: vendors on the island (JC+Alch) and Shattrath (near portal) should be unavailable until Alch subphase is complete. Once complete, an alchemy lab spawns on the table.

  • (requires All subphases) See if the buff "K'iru's Song of Victory" is only active in Sunwell/MGT/Island

Sunwell Gate Phases

.instance unbind all

Blizzlike gates are opened after a server restart, to simulate make sure to exit SWP and .instance unbind all when updating gate phases.

Test list

  • Switching gates is possible through commands

.worldstate sunsreach gate 0
closed
.go ga 50441

.worldstate sunsreach gate 1
open
.go ga 50441
closed
.go ga 50439
enter SWP, gate should be closed

.worldstate sunsreach gate 2
open
.go ga 50441
open
.go ga 50439
closed
.go ga 50440

.worldstate sunsreach gate 3
open
.go ga 50441
open
.go ga 50439
open
.go ga 50440

.worldstate sunsreach phase [0-4]

all subphases,
.worldstate sunsreach subphase 15
spawns, weather, music
.worldstate sunsreach phase [0-4]

  • Switching gates is possible through quests
    quests 11551, 11552, 11553
    These should lower the percentage of gates.

Known Issues and TODO List:

  • sunwell gates: only 1 gate is closed at a time, expect all gates to be closed and unlocked 1 by 1

  • sunwell gates: updating gate phase will open the existing gate but not close the next gate

The Blizzlike implementation is to set the gate progress on server reset. This means no instances are active/in progress. This issue only occurs when trying to do gate progression while an instance id is active.

  • Portal subphase: island portal does not spawn NPCs
  • sunwell gates: gossip menus/dialog of gate progression are incorrect
  • smith: without an anvil spawned she still does her smithing animation

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

@sogladev sogladev added run-build Used to trigger the windows/mac/docker and matrix builds CORE Related to the core DB related to the SQL database file-cpp Used to trigger the matrix build Script and removed run-build Used to trigger the windows/mac/docker and matrix builds labels Jan 20, 2025
@sogladev sogladev changed the title feat(Core/World): implement Sun's Reach Reclamation Event and Phasing feat(Core/WorldState): implement Battle for Sun's Reach Event Jan 22, 2025
sogladev and others added 23 commits January 24, 2025 19:03
Subject: [PATCH] Implement Suns Reach Reclamation event and phasing
cmangos/mangos-wotlk@73aa549

Co-authored-by: killerwife <killerwife@gmail.com>
suns-reach-reclamation.sql https://gist.github.com/heyitsbench/64e9741fdc5e06f48592b583a4712b4f

Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
> [PATCH] WorldState: Add code to handle Sunwell Plateau gate opening
> All gates will start open by default. This is a special feature for progressive servers to control the release of SWP similar to how Blizzard did in TBC.

> This feature never made it to the live game - it was only seen on the 2.4 PTR. Instead, Blizzard ended up manually opening the gates on certain dates for each region.
cmangos/mangos-tbc@adb352b

Co-authored-by: MantisLord <sabinprosper@gmail.com>
Co-authored-by: killerwife <killerwife@gmail.com>
cmangos uses waypoint scripts to handle Fel Consumption RP. Handled with
smartAI
todo: auras are removed on evade
issue: settings worldstate gate while in an instance will clear the
current gate, but not spawn the next gate
issue: Only 1 gate is closed at a single time
@sogladev sogladev force-pushed the feat(Core/World)SunsReach branch from 97be941 to b6f692e Compare January 24, 2025 21:12
@sogladev sogladev marked this pull request as ready for review January 24, 2025 21:12
@sogladev sogladev added the run-build Used to trigger the windows/mac/docker and matrix builds label Jan 24, 2025
@Rorschach91
Copy link
Member

I just tested the PR. At a first glance (portal issues apart) seems to work well but I would like another test by another staff member.

@TheSCREWEDSoftware
Copy link
Contributor

TheSCREWEDSoftware commented Jan 29, 2025

The implemention seems to be working. I don't know if we would like another pair of eyes in the case if we missed something. What do you think @Rorschach91 ?

I'm not sure if it's an intentional or not as I dont expect anyone below 60 or 70 to be able to go to the isles.

Both factions can take their Flight path to the isle, the issue is that you can do that at any level. which i assume is not intentional.

Edit: There was also with this 2 objects not showing up to me sometimes i assume is part of the known issues? 50439 and 50440

@TheSCREWEDSoftware TheSCREWEDSoftware added Tested This PR has been tested and is working. and removed Testing in Progress labels Jan 29, 2025
@Rorschach91
Copy link
Member

The implemention seems to be working. I don't know if we would like another pair of eyes in the case if we missed something. What do you think @Rorschach91 ?

Maybe you are right, but we must consider this is a very big implementation, so some issues could escape from our view.
I'm thinking we can let the players to find potential bugs in the future, and fix them when reported.
The last stage seems to work well and this is the most important thing for a wotlk server.
Regarding the previous stages, the most important thing is to be sure that the counters work well and the dailies are correct for every stage.

I'm not sure if it's an intentional or not as I dont expect anyone below 60 or 70 to be able to go to the isles.

I don't remember there is some type of level limitation. Normally (instances apart) you are able to go anywhere.

Edit: There was also with this 2 objects not showing up to me sometimes i assume is part of the known issues? 50439 and 50440

No idea, @sogladev?

@sogladev
Copy link
Member Author

sogladev commented Jan 31, 2025

I'm not sure if it's an intentional or not as I dont expect anyone below 60 or 70 to be able to go to the isles.

automatically learned at lvl65 is what I find online with quests and instances unlocked at 70

old source https://alt.games.warcraft.narkive.com/7dx0yCIr/flying-to-quel-danas

Flight Path Shattered Sun Staging Area learned at 68 in core.

SetTaximaskNode(213); //Shattered Sun Staging Area

Edit: There was also with this 2 objects not showing up to me sometimes i assume is part of the known issues? 50439 and 50440

I think you are describing first 2 known issues regarding Sunwell Gate gameobjects. 50439 and 50440 are the 2nd and 3rd gate. Each gate is tied to 1 game event so only 1 gate can be active at a time, which is wrong but the effect is the same; player shouldn't be able to pass the first gate they encounter, so it's only minor that the 2nd and 3rd aren't there.

You have to make sure you exit to instance and reset all instances, otherwise they may not spawn. Setting gate progress should be done only at server start. Which is the Blizzlike approach. I updated the 2nd known issue to clarify more.

@heyitsbench
Copy link
Contributor

I think you are describing first 2 known issues regarding Sunwell Gate gameobjects.

Should be easily fixed with game_event_gameobject, no?

@sogladev
Copy link
Member Author

I think you are describing first 2 known issues regarding Sunwell Gate gameobjects.

Should be easily fixed with game_event_gameobject, no?

That was the first thing I tried, but I probably encountered the second issue and forgot about it. 😆 Ty bench

@Rorschach91
Copy link
Member

I tested the last commit. Everything seems to be in line with what is written in the Known Issues and TODO List.
Failed checks seem not to be caused by PR itself.
I think we can merge it (known and unkown issues can be fixed in the future).

@Rorschach91 Rorschach91 merged commit 00b8a3f into azerothcore:master Jan 31, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE Related to the core DB related to the SQL database file-cpp Used to trigger the matrix build Ready to be Reviewed run-build Used to trigger the windows/mac/docker and matrix builds Script Tested This PR has been tested and is working.
Projects
None yet
4 participants