mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
fix(Core/Commands): .cheat god lowering hp to 1 and .cheat power not refilling power (#3299)
This commit is contained in:
@@ -4892,6 +4892,11 @@ SpellCastResult Spell::CheckRuneCost(uint32 RuneCostID)
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
Player* player = m_caster->ToPlayer();
|
||||
//If we are in .cheat power mode we dont need to check the cost as we are expected to be able to use it anyways (infinite power)
|
||||
if (player->GetCommandStatus(CHEAT_POWER))
|
||||
{
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
if (player->getClass() != CLASS_DEATH_KNIGHT)
|
||||
return SPELL_CAST_OK;
|
||||
@@ -6471,6 +6476,16 @@ SpellCastResult Spell::CheckPower()
|
||||
if (m_CastItem)
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
//While .cheat power is enabled dont check if we need power to cast the spell
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (m_caster->ToPlayer()->GetCommandStatus(CHEAT_POWER))
|
||||
{
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// health as power used - need check health amount
|
||||
if (m_spellInfo->PowerType == POWER_HEALTH)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user