Scripts/World: improve Training Dummy script
Port From (https://github.com/TrinityCore/TrinityCore/commit/20c8698bc467d493463c5afbced910d11d3b71b3)
This commit is contained in:
@@ -1315,11 +1315,16 @@ namespace Scripts.World.NpcSpecial
|
|||||||
|
|
||||||
public npc_training_dummy(Creature creature) : base(creature) { }
|
public npc_training_dummy(Creature creature) : base(creature) { }
|
||||||
|
|
||||||
|
public override void JustEnteredCombat(Unit who)
|
||||||
|
{
|
||||||
|
_combatTimer[who.GetGUID()] = TimeSpan.FromSeconds(5);
|
||||||
|
}
|
||||||
|
|
||||||
public override void DamageTaken(Unit attacker, ref uint damage, DamageEffectType damageType, SpellInfo spellInfo = null)
|
public override void DamageTaken(Unit attacker, ref uint damage, DamageEffectType damageType, SpellInfo spellInfo = null)
|
||||||
{
|
{
|
||||||
damage = 0;
|
damage = 0;
|
||||||
|
|
||||||
if (!attacker)
|
if (!attacker || damageType == DamageEffectType.DOT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_combatTimer[attacker.GetGUID()] = TimeSpan.FromSeconds(5);
|
_combatTimer[attacker.GetGUID()] = TimeSpan.FromSeconds(5);
|
||||||
|
|||||||
Reference in New Issue
Block a user