mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 00:23:48 +00:00
fix(Core/Spells): Only check GO state for doors when using SPELL_EFFECT_OPEN_LOCK (#9778)
buttons and other object types may expect other states in order to operate correctly
This commit is contained in:
@@ -5870,9 +5870,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
// We must also ensure the gameobject we are opening is still closed by the time the spell finishes.
|
||||
if (GameObject* go = m_targets.GetGOTarget())
|
||||
{
|
||||
if (go->GetGoState() != GO_STATE_READY)
|
||||
if (go->GetGoType() == GAMEOBJECT_TYPE_DOOR && go->GetGoState() != GO_STATE_READY)
|
||||
{
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
return SPELL_FAILED_ALREADY_OPEN;
|
||||
}
|
||||
}
|
||||
if (m_spellInfo->Id != 1842 || (m_targets.GetGOTarget() &&
|
||||
|
||||
Reference in New Issue
Block a user