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/sai) Some contents of the restoration of creature (27210 and 27951) #18850

Merged
merged 3 commits into from
May 11, 2024

Conversation

fangshun2004
Copy link
Contributor

@fangshun2004 fangshun2004 commented Apr 30, 2024

When fighting Miscellaneous Creeps in front of the Cathedral, Creature 27210 will shout randomly (currently 2 Miscellaneous Soldiers are missing on the left and right sides of the platform), and when fighting Mob 27210, she should not speak immediately, but instead speak when her health is below 20% and use the Berserk skill. When the battle is triggered, 27951 will trigger the spell and make it impossible for the player to attack it (the player should exit the combat state after killing 27210) 27951 should walk up to the corpse of the 27210 mob and trigger the event, instead of standing still and moving along a fixed path

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:

  • Closes

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.
  1. .go c 102193
  2. Fight 3 creeps under the platform Creature 27210 on the platform because it should shout(There are 7 miscellaneous soldiers in Blizzard's servers and 4 less in azerocore)
  3. In a fight with Creature 27210 or 27951, 27951 becomes unattackable, and 27210 has less than 20% health, speaks, and uses spell 50921 every 6 seconds
  4. Creature 27210 When dying, the player should not be in a combat state, 27951 should walk up to the 27210 corpse and kneel - talk - stand - move to the door

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.

@github-actions github-actions bot added the DB related to the SQL database label Apr 30, 2024
@fangshun2004 fangshun2004 changed the title 27951 and 27210 fix(db) 27951 and 27210 Apr 30, 2024
@fangshun2004 fangshun2004 changed the title fix(db) 27951 and 27210 fix(db/sai) 27951 and 27210 Apr 30, 2024
@fangshun2004 fangshun2004 changed the title fix(db/sai) 27951 and 27210 fix(db/sai) Some contents of the restoration of creature (27210 and 27951) Apr 30, 2024
@pangolp
Copy link
Contributor

pangolp commented May 4, 2024

When you're done writing the script, and you're not going to make any more changes, let me know, that I'm editing it to decrease the number of queries. But if I edit it now, and you haven't finished it yet, and you're used to working this way, you might find it hard to edit. Also, in the comments, they left you some text to add as well. I'm waiting for your message if you need help with this. @fangshun2004

@pangolp
Copy link
Contributor

pangolp commented May 4, 2024

Ran for several days, tested at least 5 times, no issues.

We'd have to make a few small changes to the SQL. But I don't want to do it, until it's finished. So I asked the author if I'm done and I'm waiting for his answer.

@pangolp
Copy link
Contributor

pangolp commented May 4, 2024

the test results are as expected, everything is ok. BTW, Chinese localization has been added.

INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 0, 0, 'zhCN', '我会让你们见识见识先锋军的真正实力!');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 0, 'zhCN', '想见识见识先锋军的实力吗?');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 1, 'zhCN', '快点干掉闯入者!我可没时间亲自动手。');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 2, 'zhCN', '你们应该在动手之前就考虑到后果,蠢货。');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 3, 'zhCN', '难道要我亲自解决这些入侵者?');

INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 0, 0, 'zhCN', '是时候了!');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 1, 0, 'zhCN', '你这肮脏的杂种,还有什么遗言吗?');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 2, 0, 'zhCN', '呸,我才不在乎你有没有遗言。下地狱去吧,可怜虫!');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 3, 0, 'zhCN', '哈!这种消遣真是永不过时。');

If you do this, you are running 9 queries on the database.
On the other hand, if you do this. I would be making 3 queries.

DELETE FROM `creature_text_locale` WHERE `CreatureID`=27210 AND `GroupID` IN (0, 1) AND `Locale`='zhCN';
DELETE FROM `creature_text_locale` WHERE `CreatureID`=27211 AND `GroupID` IN (0, 1, 2, 3) AND `Locale`='zhCN';
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES
(27210, 0, 0, 'zhCN', '我会让你们见识见识先锋军的真正实力!'),
(27210, 1, 0, 'zhCN', '想见识见识先锋军的实力吗?'),
(27210, 1, 1, 'zhCN', '快点干掉闯入者!我可没时间亲自动手。'),
(27210, 1, 2, 'zhCN', '你们应该在动手之前就考虑到后果,蠢货。'),
(27210, 1, 3, 'zhCN', '难道要我亲自解决这些入侵者?'),
(27211, 0, 0, 'zhCN', '是时候了!'),
(27211, 1, 0, 'zhCN', '你这肮脏的杂种,还有什么遗言吗?'),
(27211, 2, 0, 'zhCN', '呸,我才不在乎你有没有遗言。下地狱去吧,可怜虫!'),
(27211, 3, 0, 'zhCN', '哈!这种消遣真是永不过时。');

Also, don't forget, that every time you do an INSERT, you must execute a DELETE.
Anyway, as far as I remember, we don't use this table for translations, we use the broadcast_text and broadcast_text_locale.
You just have to check if in creature_text the BroadcastTextId has the corresponding value of broadcast_text.

@pangolp
Copy link
Contributor

pangolp commented May 4, 2024

However, the NPCs you are mentioning don't have as many texts.
https://wowgaming.altervista.org/aowow/?npc=27210
https://wowgaming.altervista.org/aowow/?npc=27211
Where do I get the information for these texts? @pvp100com

@pangolp
Copy link
Contributor

pangolp commented May 4, 2024

The conversation is derived from previous sniffing (3.4.x), so we can stick to using broadcast_text_locale as per the specification. Therefore, you can disregard my previous response. Thank you.

No problem.

@fangshun2004
Copy link
Contributor Author

broadcast_text_locale you don't need to add content, the text in the broadcast_text is already using the BroadcastTextId broadcast_text_locale broadcast_text

@fangshun2004
Copy link
Contributor Author

However, the NPCs you are mentioning don't have as many texts. https://wowgaming.altervista.org/aowow/?npc=27210 https://wowgaming.altervista.org/aowow/?npc=27211 Where do I get the information for these texts? @pvp100com

This executioner NPC will periodically trigger the "Forsaken" event that kills the gallows, which I am working on, but it is not perfect for two NPCs, and the NPC follow system is not very well handled

@fangshun2004
Copy link
Contributor Author

The conversation is derived from previous sniffing (3.4.x), so we can stick to using broadcast_text_locale as per the specification. Therefore, you can disregard my previous response. Thank you.

No problem.

the test results are as expected, everything is ok. BTW, Chinese localization has been added.

INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 0, 0, 'zhCN', '我会让你们见识见识先锋军的真正实力!');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 0, 'zhCN', '想见识见识先锋军的实力吗?');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 1, 'zhCN', '快点干掉闯入者!我可没时间亲自动手。');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 2, 'zhCN', '你们应该在动手之前就考虑到后果,蠢货。');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27210, 1, 3, 'zhCN', '难道要我亲自解决这些入侵者?');

INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 0, 0, 'zhCN', '是时候了!');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 1, 0, 'zhCN', '你这肮脏的杂种,还有什么遗言吗?');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 2, 0, 'zhCN', '呸,我才不在乎你有没有遗言。下地狱去吧,可怜虫!');
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES (27211, 3, 0, 'zhCN', '哈!这种消遣真是永不过时。');

If you do this, you are running 9 queries on the database. On the other hand, if you do this. I would be making 3 queries.

DELETE FROM `creature_text_locale` WHERE `CreatureID`=27210 AND `GroupID` IN (0, 1) AND `Locale`='zhCN';
DELETE FROM `creature_text_locale` WHERE `CreatureID`=27211 AND `GroupID` IN (0, 1, 2, 3) AND `Locale`='zhCN';
INSERT INTO `creature_text_locale` (`CreatureID`, `GroupID`, `ID`, `Locale`, `Text`) VALUES
(27210, 0, 0, 'zhCN', '我会让你们见识见识先锋军的真正实力!'),
(27210, 1, 0, 'zhCN', '想见识见识先锋军的实力吗?'),
(27210, 1, 1, 'zhCN', '快点干掉闯入者!我可没时间亲自动手。'),
(27210, 1, 2, 'zhCN', '你们应该在动手之前就考虑到后果,蠢货。'),
(27210, 1, 3, 'zhCN', '难道要我亲自解决这些入侵者?'),
(27211, 0, 0, 'zhCN', '是时候了!'),
(27211, 1, 0, 'zhCN', '你这肮脏的杂种,还有什么遗言吗?'),
(27211, 2, 0, 'zhCN', '呸,我才不在乎你有没有遗言。下地狱去吧,可怜虫!'),
(27211, 3, 0, 'zhCN', '哈!这种消遣真是永不过时。');

Also, don't forget, that every time you do an , you must execute a . Anyway, as far as I remember, we don't use this table for translations, we use the and . You just have to check if in the has the corresponding value of .INSERT``DELETE``broadcast_text``broadcast_text_locale``creature_text``BroadcastTextId``broadcast_text

Do I need to add the corresponding text to the creature_text_locale?

@elthehablo elthehablo merged commit 45ad5ac into azerothcore:master May 11, 2024
16 checks passed
@fangshun2004 fangshun2004 mentioned this pull request May 25, 2024
12 tasks
ikkj pushed a commit to ikkj/AzerothCore-wotlk-with-NPCBots that referenced this pull request Jun 10, 2024
…7951) (azerothcore#18850)

* Fix some problems

* Change the name of the spell
ikkj pushed a commit to ikkj/AzerothCore-wotlk-with-NPCBots that referenced this pull request Jun 13, 2024
…7951) (azerothcore#18850)

* Fix some problems

* Change the name of the spell
ikkj pushed a commit to ikkj/AzerothCore-wotlk-with-NPCBots that referenced this pull request Jun 13, 2024
…7951) (azerothcore#18850)

* Fix some problems

* Change the name of the spell
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants