How to prevent two NPCs from damaging each other with their AoE spells in Azerothcore?

Viewed 81

I am running a local server of Azerothcore with rev. 3716ddf3e4e1 2021-05-25 18:05:13 +0200 (master branch). I have created two custom NPCs and added them to my DB with the following code:

INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `DamageModifier`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `spell_school_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES
(1112001, 0, 0, 0, 0, 0, 3456, 0, 0, 0, 'Mob1', '', 0, 43, 43, 0, 63, 0, 1, 1.14286, 3, 3, 0, 30, 2000, 2000, 1, 1, 1, 32832, 2048, 0, 0, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 50000, 60000, 'SmartAI', 1, 3, 1, 100, 1, 1, 0, 0, 1, 0, 0, 256, '', 12340),
(1112003, 0, 0, 0, 0, 0, 21443, 0, 0, 0, 'Mob2', '', 0, 42, 42, 0, 63, 0, 1, 1.14286, 1, 1, 0, 10, 2000, 2000, 1, 1, 1, 0, 2048, 0, 0, 0, 0, 0, 0, 6, 0, 4860, 0, 0, 0, 0, 297, 393, 'SmartAI', 1, 3, 1, 60, 1, 1, 0, 0, 1, 650854271, 0, 0, '', 12340);

Once i let Mob1 cast spell Death and Decay, Mob2 will take damage from it once they walk across it. How can i prevent the mobs from damaging each other, but only do damage to players instead?

1 Answers

Have you tried to set the two NPC to an allied faction that is also an enemy faction for the player ?

Related