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
@@ -277,6 +277,10 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
if (!unitTarget || !unitTarget->isAlive())
return;
if (unitTarget->GetTypeId() == TYPEID_PLAYER)
if (unitTarget->ToPlayer()->GetCommandStatus(CHEAT_GOD))
return;
if (m_caster == unitTarget) // prevent interrupt message
finish();