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(Scripts/Spells): Hardcoded text moved to database to support loca… #18757

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

Conversation

xaenerys0
Copy link

@xaenerys0 xaenerys0 commented Apr 15, 2024

…lization

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 is how I tested the changes:

  1. Login with an alliance member in one client
  2. Login with a horde member in another client
  3. Teleport them to the same spot where PvP is enabled (make sure PvP is enabled for both characters), I used Outland
  4. Give the flag of ownership to the killer, then kill the member of the other faction
  5. Cast the Flag of Ownership and observe the text

image

  • 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:

  • Potentially adjust how I am calling the placeholder variables. I could not get it working without the two %s placeholders. I am new to C++ so I could be missing something obvious, but a possible refactor.
  • [ ]

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 DB related to the SQL database CORE Related to the core Script file-cpp Used to trigger the matrix build labels Apr 15, 2024
@fangshun2004
Copy link
Contributor

The data in the broadcast_text and broadcast_text_locale is sniffed and cannot be modified under normal circumstances

@xaenerys0
Copy link
Author

I saw that in the code style after commit. I'll take another look at this today, thanks.

@github-actions github-actions bot removed the DB related to the SQL database label Apr 15, 2024
@xaenerys0
Copy link
Author

The data in the broadcast_text and broadcast_text_locale is sniffed and cannot be modified under normal circumstances

So the issue I am facing now is that using the broadcast_text unmodified duplicates the player/caster name: %s plants the Flag of Ownership in the corpse of $n.

%s is the player name, and outside of the broadcast text it is also printed, so the result is: PlayerName PlayerName plants the Flag of Ownership in the corpse of TargetName. This is what initially led me to my original solution of modifying that text before I knew about the limitations of updating that table.

@heyitsbench
Copy link
Contributor

So the issue I am facing now is that using the broadcast_text unmodified duplicates the player/caster name: %s plants the Flag of Ownership in the corpse of $n.

Perhaps something other than TextEmote can be used? Maybe someone more familiar can chime in and throw a suggestion to resolve the issue.

@xaenerys0
Copy link
Author

So the issue I am facing now is that using the broadcast_text unmodified duplicates the player/caster name: %s plants the Flag of Ownership in the corpse of $n.

Perhaps something other than TextEmote can be used? Maybe someone more familiar can chime in and throw a suggestion to resolve the issue.

I have a working solution local that does the same thing I did with the $n placeholder. However, I am not sure if this is the best approach. I can commit and have this ready for review unless someone else has any suggestions for alternatives to TextEmote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE Related to the core file-cpp Used to trigger the matrix build Script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Scripts/Spells): Taunt Flag Targeting script uses hardcoded string.
3 participants