Core/Commands: Fix .cheat kill and add instakill immunity to it

Closes #7586
This commit is contained in:
Myran2 authored and Nay committed 2012-09-01 00:36:26 +01:00
1 parent 107bd5f5a3
commit 4bc983d7b7
2 files changed
+8

No files matched your search

+4
View File
@@ -541,6 +541,10 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
if (IsAIEnabled)
GetAI()->DamageDealt(victim, damage, damagetype);
if (victim->GetTypeId() == TYPEID_PLAYER)
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
return 0;
// Signal to pets that their owner was attacked
if (victim->GetTypeId() == TYPEID_PLAYER)
{