Trinitycore: DB/Creature: Obsidian Eradicator (15262) SAI improvement

Created on 15 Oct 2019  路  13Comments  路  Source: TrinityCore/TrinityCore

Description:

Smart Script of Obsidian Eradicator is wrong.

Current behaviour:

Obsidian Eradicator starts the fight with full mana and instantly blows the raid with Shock Blast.

Expected behaviour:

Obsidian Eradicator has the same mechanic as Obsidian Nullifier. It starts with 0 mana, drains mana from the raid and then does his magic.

Fix

DELETE FROM `smart_scripts` WHERE `entryorguid`=15262 AND `source_type`=0 AND `id`=0 AND `link`=0;
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 (15262, 0, 0, 0, 1, 0, 100, 514, 0, 0, 500, 500, 0, 108, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Obsidian Eradicator - Out of Combat - Set Mana To 0 (No Repeat)');

Branch(es):

3.3.5

Comp-Database

Most helpful comment

Well from my understanding aowow requires to run "php aowow --sync" https://github.com/jackpoz/aowow/blob/master/setup/setup.php#L40 or some other command to copy the TC world database data into the aowow database (and I haven't done that for a long time).
I could actually add that step to the upgrade script I use

All 13 comments

(in case you would be interested in how to format the title of issue tickets old-school style, it could look something like this:)

DB/Creature: Obsidian Eradicator (15262) SAI improvement

Please note that adding a CR/LF (NewLine) right after VALUES
makes your SQL easier to read.

Also, seeing that the line you suggest replacing already exists, I would like to take a closer look to see if it can be updated instead of replaced:
Existing data:

15262, 0, 0, 0, 1, 0, 100, 514, 0, 0, 500, 500, 0, 90, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "Obsidian Eradicator - Out of Combat - Set Flag Standstate Stand Up (Normal Dungeon)"

Then, your suggested values:

(15262, 0, 0, 0, 1, 0, 100, 514, 0, 0, 500, 500, 0, 108, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Obsidian Eradicator - Out of Combat - Set Mana To 0 (No Repeat)');
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

Also worth noting: we should look into the full SAI of creature entry 15262 before making any rash changes:

SELECT * FROM `smart_scripts` WHERE `entryorguid`= 15262;
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
-----------  -----------  ------  ------  ----------  ----------------  ------------  -----------  ------------  ------------  ------------  ------------  ------------  -----------  -------------  -------------  -------------  -------------  -------------  -------------  -----------  -------------  -------------  -------------  -------------  --------  --------  --------  --------  -----------------------------------------------------------------------------------
      15262            0       0       0           1                 0           100          514             0             0           500           500             0           90              0              0              0              0              0              0            1              0              0              0              0         0         0         0         0  Obsidian Eradicator - Out of Combat - Set Flag Standstate Stand Up (Normal Dungeon)
      15262            0       1       0           0                 0           100            2          1000          1000          1000          1000             0           11          25671              0              0              0              0              0            5              0              0              0              0         0         0         0         0  Obsidian Eradicator - In Combat - Cast 'Drain Mana' (Normal Dungeon)
      15262            0       2       0           3                 0           100            2            99           100          1000          1000             0           11          26458              0              0              0              0              0            1              0              0              0              0         0         0         0         0  Obsidian Eradicator - Between 99-100% Mana - Cast 'Shock Blast' (Normal Dungeon)
      15262            0       3       0           0                 0           100            2             0             0         40000         40000             0           11          20223              0              0              0              0              0            1              0              0              0              0         0         0         0         0  Obsidian Eradicator - In Combat - Cast 'Magic Reflection' (Normal Dungeon)

edit: Please note that I only comment to add information, so the decision to make a change will be an informed one.

Thanks for your suggestions but my change is fully correct in terms of what is currently wrong and what should happen. Im only changing the broken SAI from this creature. Im fully aware that this creature has more smart scripts but since @jackpoz wonderful version of aowow lists sai, its pretty easy to check what im pointing to with the links i provided.
If people prefere to use update instead of D/I, that would be good to know for the future. But i remember some situation where i was told to always delete/insert instead of update so i got used to it.

Fair enough, I presume @Killyana or any of the other TC members will know which solution to pick.

That reminds me I should update aowow since it's a few months out of date. Btw do you have a url example that shows the SAI of a creature? I don't really know aowow that well

Isnt your version connected to the official test server database? I assumed that.
Anyway, ofc i have examples since im working on some SAI stuff at the moment :
https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?npc=15262
https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?npc=15312
Thats what i linked in the OP.
In addition, it also shows all related actionlists and phases if aviable like here :
https://tcubuntu.northeurope.cloudapp.azure.com/aowow/?npc=15402

Well from my understanding aowow requires to run "php aowow --sync" https://github.com/jackpoz/aowow/blob/master/setup/setup.php#L40 or some other command to copy the TC world database data into the aowow database (and I haven't done that for a long time).
I could actually add that step to the upgrade script I use

It would be really great if you can update this from time to time - it makes it easy to look things up on the "official" database or to point on what is currently wrong.

I just ran "php aowow --sql" https://github.com/jackpoz/aowow/blob/master/setup/setup.php#L38 . next SAI fix that gets pushed I will compare before and after to see if anything changes

I love how Aowow uses direct DB info to build the additional page info, resulting in direct visual pointers.
Example showing directly what is wrong: Quest 654, Tanaris Field Sampling - compare wowhead & Aowow:

(Yes, I know this bug has been reported before & fix rejected due to Blizzlike bug. Just another Aowow usage example.)

Setting the mana to 0 every 500ms because the npc regen the mana ooc is a hack, we need an action: SMART_ACTION_SET_POWER_REGEN to stop the passive regen and allow it only via script and spell effects.

DELETE FROM `smart_scripts` WHERE `entryorguid` IN (15262,15312) AND `source_type`=0 AND `id` IN (0,4) AND `link`=0;
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
(15262, 0, 0, 0, 25, 0, 100, 2, 0, 0, 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Obsidian Eradicator - On reset - Set Mana To 0'),
(15312, 0, 0, 0, 25, 0, 100, 2, 0, 0, 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Obsidian Nullifier - On reset - Set Mana To 0'),
(15262, 0, 4, 0, 25, 0, 100, 2, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Obsidian Eradicator - On reset - Set Mana Regen Off'),
(15312, 0, 4, 0, 25, 0, 100, 2, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Obsidian Nullifier - On reset - Set Mana Regen Off');

SMART_ACTION_SET_POWER_REGEN =46 (To implement)
action_param1=0/1 (OFF/ON)

what about removing UNIT_FLAG2_REGENERATE_POWER ?

Yes, forget about this flag, it's also not present in sniffs.

Was this page helpful?
0 / 5 - 0 ratings