Core/Commands: Fix .cheat god command letting you die
Port From (https://github.com/TrinityCore/TrinityCore/commit/519e3c9ab718ce50dbaf66a50d15f5ead2dc9885)
This commit is contained in:
@@ -2366,10 +2366,10 @@ namespace Game.Entities
|
||||
// Hook for OnDamage Event
|
||||
Global.ScriptMgr.OnDamage(attacker, victim, ref damage);
|
||||
|
||||
if (victim.IsTypeId(TypeId.Player) && attacker != victim)
|
||||
if (victim.IsTypeId(TypeId.Player))
|
||||
{
|
||||
// Signal to pets that their owner was attacked - except when DOT.
|
||||
if (damagetype != DamageEffectType.DOT)
|
||||
if (attacker != victim && damagetype != DamageEffectType.DOT)
|
||||
{
|
||||
foreach (Unit controlled in victim.m_Controlled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user