mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Disarm Trap now can be used in BattleGrounds and Arenas.
--HG-- branch : trunk
This commit is contained in:
@@ -5071,10 +5071,10 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
(!m_targets.getItemTarget() || !m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->GetOwner() != m_caster))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
// In BattleGround players can use only flags and banners
|
||||
if (m_caster->ToPlayer()->InBattleGround() &&
|
||||
!m_caster->ToPlayer()->CanUseBattleGroundObject())
|
||||
return SPELL_FAILED_TRY_AGAIN;
|
||||
if (m_spellInfo->Id != 1842 && m_targets.getGOTarget() && m_targets.getGOTarget()->GetGOInfo()->type != GAMEOBJECT_TYPE_TRAP) // disarm trap should not be affected
|
||||
if (m_caster->ToPlayer()->InBattleGround() && // In BattleGround players can use only flags and banners
|
||||
!m_caster->ToPlayer()->CanUseBattleGroundObject())
|
||||
return SPELL_FAILED_TRY_AGAIN;
|
||||
|
||||
// get the lock entry
|
||||
uint32 lockId = 0;
|
||||
|
||||
@@ -3400,7 +3400,8 @@ void Spell::EffectOpenLock(uint32 effIndex)
|
||||
}
|
||||
}else if (gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP && gameObjTarget->GetOwner())
|
||||
{
|
||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
||||
return;
|
||||
}
|
||||
// TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell
|
||||
// handle outdoor pvp object opening, return true if go was registered for handling
|
||||
|
||||
Reference in New Issue
Block a user