fix(Scripts/ICC): make the Mutated Abomination auto-attack and hit for retail damage (#27236)
This commit is contained in:
parent
23baad639b
commit
6ca8f94e08
2 changed files with 46 additions and 0 deletions
|
|
@ -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
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue