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

Fix(DB/Script): Halls of Stone, Brann escort #20312

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Kacsacsont
Copy link
Contributor

I tried to implement Blizzlike functionality based on YouTube recordings.

https://www.youtube.com/watch?v=oiONSxm-nlY&t=25s
https://www.youtube.com/watch?v=v4REOznX2Vo&t

I tested it by starting the YouTube recording and Brann in my game at the same time.
The '.go c 126801' command can be used, but then the exit door will be closed at the end of the Tribunal; it's better to run through.

Changes:

  • During Brann's escort, he attacks and is attacked, and does not heal until the end of the Tribunal
  • Brann approaches the Tribunal zone from the right instead of the left
  • Brann’s gossip and shouts have been fixed
  • Tribunal timers adjusted (tried to match the YouTube recording by starting Brann simultaneously)
  • ABEDNEUM, KADDRAK, and MARNAK attack timers rescheduled
  • MARNAK’s Dark Matter attack now starts with a visual effect instead of from within the texture
  • Summoned creatures now attack from the left and right sides instead of the center, and with a few seconds’ delay between them
  • At the end of the Tribunal, all three heads speak, and the SkyFloor moves up and down with each change
  • At the end, or if spoken to, Brann stealthily walks to the room entrance and then teleports to Sjonnir's door
  • Brann is not attacked near the door
  • Door opening is now timed
  • Brann cannot be spoken to in front of Sjonnir, where he is already waiting for players to attack the boss
  • After Sjonnir’s death, Brann moves away from the console, then steps back after his shout

Changes Proposed:

This PR proposes changes to:

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

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

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.

Known Issues and TODO List:

  • [ ]
  • [ ]

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.

- escort, tribunal, bjonnir code completion

Closes issue azerothcore#13079
@github-actions github-actions bot added DB related to the SQL database Script file-cpp Used to trigger the matrix build labels Oct 26, 2024
@Kacsacsont
Copy link
Contributor Author

I rewrote to use RegisterSpellScript.

(28070, 37, 1282.12, 666.744, 189.607, 0, ''),
(28070, 38, 1307.56, 666.938, 189.607, 0, ''),
(28070, 39, 1306.05, 666.85, 189.607, 0, ''),
(28070, 40, 1307.56, 666.938, 189.607, 0, '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the creature's name in the comment field for all waypoints instead of an empty string, if there's no other relevant comments to be added.

@@ -155,7 +153,7 @@ class boss_sjonnir : public CreatureScript
{
brann->setDeathState(DeathState::JustDied);
brann->Respawn();
brann->AI()->DoAction(5);
brann->AI()->DoAction(7); //ACTION_SJONNIR_WIPE_START
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remote the magic number here, would probably require moving the relevant brann defines into a header file that both script cpps can include.

@@ -183,7 +181,7 @@ class boss_sjonnir : public CreatureScript

if (pInstance->GetData(BOSS_TRIBUNAL_OF_AGES) == DONE)
if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
brann->AI()->DoAction(3);
brann->AI()->DoAction(5); //ACTION_START_SJONNIR_FIGHT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@@ -331,7 +329,7 @@ class boss_sjonnir : public CreatureScript
sd->SetGoState(GO_STATE_ACTIVE);

if (Creature* brann = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_BRANN)))
brann->AI()->DoAction(4);
brann->AI()->DoAction(6); //ACTION_SJONNIR_DEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

@@ -335,56 +393,78 @@ class brann_bronzebeard : public CreatureScript
{
case ACTION_START_EVENT:
Start(false, true, ObjectGuid::Empty, 0, true, false);
me->Yell("Time to get some answers! Let's get this show on the road!", LANG_UNIVERSAL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this text is also available as broadcast ID 30524 and 30561. I'm pretty sure using broadcast / database texts is highly preferred instead of declaring new text strings in the cpp files.

Can you please check if the text lines could be updated to use broadcast text instead? There's a broadcast editor / search tool included in Keira, too.

case ACTION_GO_TO_SJONNIR:
me->Yell("I think it's time to see what's behind the door near the entrance. I'm going to sneak over there, nice and quiet. Meet me at the door and I'll get us in.", LANG_UNIVERSAL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broadcast ID 31660, so probably most are available in DB :)

Comment on lines 871 to 874
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DARK_MATTER_H, SPELL_DARK_MATTER });
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you removing the Validate() function? Any spell that is beeing casted inside a spell script must be validated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember, it might have been accidental.

@Kacsacsont
Copy link
Contributor Author

Thanks for checking. I rewrote.

Comment on lines 224 to 225
GameObject* pK = instance->GetGameObject(goKaddrakGUID);
GameObject* pM = instance->GetGameObject(goMarnakGUID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These never get null checked

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additionally would be nice to give the gobs more descriptive names. I know they are initialized with a GUID here so it's kind of clear, but still couldn't hurt to name the like abedneum, kaddrak, marnak, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrote.

if (type == BOSS_TRIBUNAL_OF_AGES && data == SPECIAL)
{
GameObject* pF = instance->GetGameObject(goSkyRoomFloorGUID);
pF->SetGoState(GO_STATE_READY);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing null check

if (pK->GetGoState() != GO_STATE_ACTIVE)
{
pA->SetGoState(GO_STATE_READY);
if (GameObject* pK = instance->GetGameObject(goKaddrakGUID))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you fetching pK again here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was in a hurry. Because of the Ctrl+C, Ctrl+V solution.

GameObject* pK = instance->GetGameObject(goKaddrakGUID);
GameObject* pM = instance->GetGameObject(goMarnakGUID);

GameObject* pF = instance->GetGameObject(goSkyRoomFloorGUID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also never null checked

pA->SetGoState(GO_STATE_READY);
if (GameObject* pK = instance->GetGameObject(goKaddrakGUID))
pK->SetGoState(GO_STATE_ACTIVE);
if (GameObject* pF = instance->GetGameObject(goSkyRoomFloorGUID))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, fetching pF again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB related to the SQL database file-cpp Used to trigger the matrix build Ready to be Reviewed Script Waiting to be Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

halls of stone dungeons Bran Bronzebeard disappears after the start of the final boss
5 participants