-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
base: master
Are you sure you want to change the base?
Conversation
- escort, tribunal, bjonnir code completion Closes issue azerothcore#13079
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, ''); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 :)
bool Validate(SpellInfo const* /*spellInfo*/) override | ||
{ | ||
return ValidateSpellInfo({ SPELL_DARK_MATTER_H, SPELL_DARK_MATTER }); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks for checking. I rewrote. |
GameObject* pK = instance->GetGameObject(goKaddrakGUID); | ||
GameObject* pM = instance->GetGameObject(goMarnakGUID); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
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:
Changes Proposed:
This PR proposes changes to:
Issues Addressed:
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
How to Test the Changes:
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.