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

chore(Command/unstuck) use command with offline players #18855

Closed
wants to merge 51 commits into from

Conversation

pangolp
Copy link
Contributor

@pangolp pangolp commented May 2, 2024

Changes Proposed:

This PR proposes changes to:

  • Command

Issues Addressed:

Tests Performed:

This PR has been:

  • Tested in-game by the author.

How to Test the Changes:

  1. Use the .unstuck command with the name of the character you want to unlock. If it is offline, it will be sent to where the player has the hearthstone established.
  2. ex. .unstuck barbz
2024-05-02.04-54-07.mp4
2024-05-02.04-56-16.mp4

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 CORE Related to the core Script file-cpp Used to trigger the matrix build labels May 2, 2024
Copy link
Contributor

@walkline walkline left a comment

Choose a reason for hiding this comment

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

Good job, but we should address several issues before merging it.

src/server/scripts/Commands/cs_misc.cpp Outdated Show resolved Hide resolved
src/server/scripts/Commands/cs_misc.cpp Outdated Show resolved Hide resolved
src/server/scripts/Commands/cs_misc.cpp Outdated Show resolved Hide resolved
@pangolp
Copy link
Contributor Author

pangolp commented May 2, 2024

@walkline Thanks for the suggestions, I will review all the ones you mentioned. I'll let you know when I make changes, so you can review them. Thank you.

@pangolp
Copy link
Contributor Author

pangolp commented May 2, 2024

Do you know how to solve this? Because I had removed the if, and that warning did not appear. Anyway, I tested the code, and it works with the changes, I'll upload them now, but I would need to review that part.

image

@pangolp pangolp requested a review from walkline May 2, 2024 09:28
@pangolp pangolp requested a review from Nyeriah May 2, 2024 12:52
if (handler->HasLowerSecurity(nullptr, target->GetGUID()))
return false;

ObjectGuid::LowType guid = sCharacterCache->GetCharacterGuidByName(target->GetName()).GetCounter();
Copy link
Member

@Nyeriah Nyeriah May 4, 2024

Choose a reason for hiding this comment

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

You don't need to access the cache at all here, you already got the guid info

                CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_HOMEBIND);
                stmt->SetData(0, target->GetGUID().GetCounter());
                PreparedQueryResult resultDB = CharacterDatabase.Query(stmt);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. I'll check it out. Thank you.

@pangolp pangolp closed this May 5, 2024
@pangolp pangolp deleted the unstuck branch May 5, 2024 12:53
@pangolp pangolp restored the unstuck branch May 6, 2024 21:25
@pangolp pangolp reopened this May 6, 2024
jasonmokk and others added 12 commits May 9, 2024 13:19
…zerothcore#18872)

- Fix typo when loading reference loot templates
- Closes azerothcore#18870

Co-authored-by: Jason Mok <jasonmok@Jasons-MacBook-Air-4.local>
* Init.

Co-Authored-By: AnonXS <19734826+anonxs@users.noreply.github.com>

* Adjust variable spacing.

---------

Co-authored-by: AnonXS <19734826+anonxs@users.noreply.github.com>
…upon opening (azerothcore#18877)

* remove locked status from scarab coffer upon opening

* add Scarab Coffer
…7951) (azerothcore#18850)

* Fix some problems

* Change the name of the spell
…18843)

* WIP maexxna web wrap

* add custom summon web wrap

* progress

* save

* something that works

* update sql

* cleanup script

* clean sql

* remove orientation from position

* fix: cast web wrap on multiple targets

* fix: web wraps should not attack

* adjust vertical speed to reduce speed if close, avoid ceiling yeet

* rename candIt to itr

* remove unused wraps2

* style

* use event instead of update(diff)

* update spell_dbc sql

* include player header to fix error: invalid use of incomplete type

* include SpellAuraEffects header

* fix Effects start at 1 in DBC

* fix web wraps attacking

* calc distance with hypotf, define vspeed ranges, remove trig webwrap enum

* fixup! calc distance with hypotf, define vspeed ranges, remove trig webwrap enum

* fix: call target selection with pos 0, use IsPlayer()

* add validate

* fixup! fix: call target selection with pos 0, use IsPlayer()

* remove not needed header

* remove empty lines

* use registry macro

* Revert "remove not needed header"

This reverts commit 254717d.
github-actions bot and others added 22 commits May 12, 2024 21:53
… summon Skeletons at that location (azerothcore#18892)

* replace skeletonspawn scheduler with spellscript

* Revert "replace skeletonspawn scheduler with spellscript"

This reverts commit 974bcb8.

* random target and remember position

* target position instead of player

* make pets valid targets for rain of bones

* change 100 to 100.0f
…nd small mounds (azerothcore#18879)

* Delete Flower and Small Dirt Mound
Added flower and small mounds to the event

* fix error

* Update data/sql/updates/pending_db_world/rev_1715349752817459800.sql

Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com>

* Update data/sql/updates/pending_db_world/rev_1715349752817459800.sql

Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com>

* Update rev_1715349752817459800.sql

---------

Co-authored-by: Dan <83884799+elthehablo@users.noreply.github.com>
…zerothcore#18796)

* Create rev_1713905765626834000.sql

* unique loot

* remove garbage

* Update rev_1713905765626834000.sql
…g sniffed data (azerothcore#18898)

* Create rev_1715713909070959500.sql

* extra leftovers
…azerothcore#18764)

* fix(Scripts/PVP): correctly spawn generic gameobjects in Alterac Valley

I've been "collecting" these in the DB for a while, now it's time to move
these spawns to the AV script and actually spawn them.

* add 2 additional generic gameobjects
* fix(CI/PCH): revert ubuntu-22.04 to gcc12, add ubuntu-24.04 with gcc14

* also update nopch workflow

* Update core-build-nopch.yml

* Update core-build-pch.yml
Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
@pangolp
Copy link
Contributor Author

pangolp commented May 18, 2024

I don't delete a branch anymore, in the end, when restoring it, obviously, I do something wrong, I will have to do more research on the subject.

@pangolp pangolp requested a review from Nyeriah May 18, 2024 10:53
@github-actions github-actions bot added Workflow Workflow related DB related to the SQL database labels May 18, 2024
@pangolp
Copy link
Contributor Author

pangolp commented May 18, 2024

This is a disaster, nothing is understood, I better close this and create it again.

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 Script Workflow Workflow related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command ".unstuck" does not work when stuck player is offline -__-