Core/Commands: Fix .cheat god command letting you die
Fix .cheat god command still letting you die with Area Aura like Slime near Thaddius, broken since 777b287dff
# Conflicts:
# src/server/game/Entities/Unit/Unit.cpp
This commit is contained in:
1 parent
0020ea9f92
commit
a730e17a37
1 file changed
+2
-2
@@ -768,10 +768,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
|
||||
// Hook for OnDamage Event
|
||||
sScriptMgr->OnDamage(this, victim, damage);
|
||||
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && this != victim)
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// Signal to pets that their owner was attacked - except when DOT.
|
||||
if (damagetype != DOT)
|
||||
if (attacker != victim && damagetype != DOT)
|
||||
{
|
||||
for (Unit* controlled : victim->m_Controlled)
|
||||
if (Creature* cControlled = controlled->ToCreature())
|
||||
|
||||
Reference in new issue
Block a user