mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
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:
@@ -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