diff --git a/data/sql/updates/pending_db_world/rev_1787146981157184500.sql b/data/sql/updates/pending_db_world/rev_1787146981157184500.sql new file mode 100644 index 000000000..eb2b16948 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1787146981157184500.sql @@ -0,0 +1,9 @@ +-- Only the summoned entries take the script: GetScriptId() resolves through GetEntry(), not the difficulty row. +UPDATE `creature_template` SET `ScriptName` = 'npc_putricide_mutated_abomination' WHERE `entry` IN (37672, 38285); + +-- Stats come from DifficultyEntry, so only these four templates are ever instantiated; the rest stay at 7.5. +-- Values put the average hit near retail: ~5500 (10N), ~7400 (10H), ~9500 (25N), ~13500 (25H). +UPDATE `creature_template` SET `DamageModifier` = 17 WHERE `entry` = 37672; -- 10N +UPDATE `creature_template` SET `DamageModifier` = 23 WHERE `entry` = 38786; -- 10H +UPDATE `creature_template` SET `DamageModifier` = 30 WHERE `entry` = 38788; -- 25N +UPDATE `creature_template` SET `DamageModifier` = 42 WHERE `entry` = 38790; -- 25H diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp index 736bf6c2e..2507e5a54 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "CombatAI.h" #include "CreatureScript.h" #include "GridNotifiers.h" #include "Group.h" @@ -880,6 +881,41 @@ public: } }; +// Right-clicking a target while driving sends the pet attack command, which sets the victim through +// AttackStart. VehicleAI has no melee, so deliver the swings here. +struct npc_putricide_mutated_abomination : public VehicleAI +{ + explicit npc_putricide_mutated_abomination(Creature* creature) : VehicleAI(creature) { } + + void AttackStart(Unit* victim) override + { + // no MoveChase, movement stays with the driver + if (victim) + me->Attack(victim, true); + } + + void UpdateAI(uint32 diff) override + { + VehicleAI::UpdateAI(diff); + + Unit* victim = me->GetVictim(); + if (!victim) + return; + + if (!me->GetCharmer() || !me->IsValidAttackTarget(victim)) + { + me->AttackStop(); + return; + } + + // driven vehicles don't auto-face, so gate swings like player melee does + if (!me->IsWithinBoundaryRadius(victim) && !me->HasInArc(2 * float(M_PI) / 3, victim)) + return; + + DoMeleeAttackIfReady(); + } +}; + class spell_putricide_slime_puddle : public SpellScript { PrepareSpellScript(spell_putricide_slime_puddle); @@ -1559,6 +1595,7 @@ void AddSC_boss_professor_putricide() new boss_professor_putricide(); new npc_volatile_ooze(); new npc_gas_cloud(); + RegisterIcecrownCitadelCreatureAI(npc_putricide_mutated_abomination); RegisterSpellScript(spell_putricide_ooze_tank_protection); RegisterSpellScript(spell_putricide_slime_puddle); RegisterSpellScript(spell_putricide_slime_puddle_spawn);