azerothcore-wotlk
azerothcore-wotlk copied to clipboard
feat(Core/SAI): Implement SMART_ACTION_SET_SCALE
Changes Proposed:
- For custom use when spells aren't enough or serverside spells aren't found
- param1 is the integer part, param2 is the decimal part. So param1 = 5, param2 = 25 is like setting the scale to
5.25
Issues Addressed:
- Closes nothing
SOURCE:
Tests Performed:
- Tested ingame. I hoped Gobs would work as well but they don't 😢
How to Test the Changes:
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 448);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(448, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 227, 0, 50, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, ''),
(448, 0, 1, 0, 38, 0, 100, 0, 1, 2, 0, 0, 0, 227, 1, 0, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, ''),
(448, 0, 2, 0, 38, 0, 100, 0, 1, 3, 0, 0, 0, 227, 1, 50, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, ''),
(448, 0, 3, 0, 38, 0, 100, 0, 1, 4, 0, 0, 0, 227, 2, 0, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, ''),
(448, 0, 4, 0, 38, 0, 100, 0, 1, 5, 0, 0, 0, 227, 2, 50, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, ''),
(448, 0, 5, 0, 38, 0, 100, 0, 1, 6, 0, 0, 0, 227, 3, 0, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, ''),
(448, 0, 6, 0, 38, 0, 100, 0, 1, 7, 0, 0, 0, 227, 0, 10, 0, 0, 0, 0, 9, 0, 0, 200, 0, 0, 0, 0, 0, '');
.go c id 448
.npc set data 1 1
.npc set data 1 2
.npc set data 1 3
.npc set data 1 ...
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.
For what kind of things is this for?
For now? Nothing in particular. I guess custom stuff or whenever the spell can't be found OR when it's too bothersome to make a brand new serverside one.
The only other workaronds were scripting in cpp or making a new entry in spell_dbc afaik
I think you have to respawn the gob with a new GUID with the new scale if you want gobs to work for the client. That's how I recall ArcEmu working in the past.
I think you have to respawn the gob with a new GUID with the new scale if you want gobs to work for the client. That's how I recall ArcEmu working in the past.
Yeah that's out of my skillset 😛
I think you have to respawn the gob with a new GUID with the new scale if you want gobs to work for the client. That's how I recall ArcEmu working in the past.
Yeah that's out of my skillset 😛
It looks a bit funky anyway as you are effectively respawning it, so the gob fades out and back in for a second.
param1 is the integer part, param2 is the decimal part
Why not make it a float to use only 1 param?
Edit: Becasue they are integers in the table, true, my bad 😅
Since I already had this PR open I decided to expand it a bit
managed to add distance offset :)