feat(Commands): Added cheat commands (#1412)

This commit is contained in:
Nefertumm
2019-02-24 14:35:08 -03:00
committed by Francesco Borzì
parent e659ca5fe9
commit 40f68ab026
10 changed files with 293 additions and 80 deletions

View File

@@ -696,6 +696,10 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
// Signal to pets that their owner was attacked
Pet* pet = victim->ToPlayer()->GetPet();
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
return 0;
if (pet && pet->IsAlive())
pet->AI()->OwnerAttackedBy(attacker);
}