diff options
| author | treeston <treeston.mmoc@gmail.com> | 2016-08-05 11:04:26 +0200 |
|---|---|---|
| committer | treeston <treeston.mmoc@gmail.com> | 2016-09-02 23:11:13 +0200 |
| commit | 96f90381e3ed696861354ea4ddf4ac0c495031c5 (patch) | |
| tree | d6bbee7ca3b92671caaacbed8850fd8f5a1f135a /sql | |
| parent | 5f43e7b964d48d57ec7fabdbf36a832aee53dca4 (diff) | |
Scripts/SmartScripts: Fix charmed behavior for SmartAI. For real this time.
- Core AI logic will no longer issue attack/movement commands while under player control.
- Add new SMART_EVENT_FLAG_WHILE_CHARMED (0x200). Any event without this flag won't run while charmed.
- Add SMART_EVENT_FLAG_WHILE_CHARMED to existing actions, except a select subset (movement, talking, and nontriggered casts, pretty much).
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql b/sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql new file mode 100644 index 00000000000..435919c5071 --- /dev/null +++ b/sql/updates/world/3.3.5/9999_99_99_99_SMART_CHARMAI.sql @@ -0,0 +1,27 @@ +-- set "execute event while charmed" flag on all events except: +-- -) movement actions +-- -) nontriggered cast actions +-- -) talk/emote/sound actions +-- -) ally summon actions +ALTER TABLE `smart_scripts` MODIFY COLUMN `event_flags` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0'; +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=0 AND + (`action_type` not in (1,4,5,10,11,12,17,25,27,38,39,40,49,62,69,84,85,86,89,92,97,103,107,114) OR + (`action_type` in (11,86) AND (`action_param2`&2)=2)); + + +-- assorted quest fixes (no claim to completeness) +-- Seeds of Chaos (13172) +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=0 AND `entryorguid`=31157; +UPDATE `smart_scripts` SET `event_type`=29, `comment`="Skeletal Assault Gryphon - On Charmed - Start Waypoint" WHERE `source_type`=0 AND `entryorguid`=31157 AND `id`=0; +-- Generosity Abounds (13146) +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=0 AND `entryorguid`=30894; +-- Battling the Elements (12967) +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=0 AND `entryorguid`=30124; +-- Krolmir, Hammer of Storms (13010) +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=0 AND `entryorguid`=30331; +UPDATE `smart_scripts` SET `event_type`=29 WHERE `source_type`=0 AND `entryorguid`=30331 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=23 WHERE `source_type`=0 AND `entryorguid`=30331 AND `id`=1; +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=9 AND `entryorguid`=3033100; +-- Spy Hunter (12994) +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=0 AND `entryorguid`=30219; +UPDATE `smart_scripts` SET `event_flags`=(`event_flags`|0x200) WHERE `source_type`=9 AND `entryorguid` IN (3021900,3021901,3021902); |
