[Feature] Add special ability to block /open (#2506)

This adds the IMMUNE_OPEN (53) special ability to prevent /open on
LDON_TREASURE classes.
This commit is contained in:
hg authored and GitHub committed 2022-10-29 19:48:14 -04:00
1 parent 56510e6383
commit 16ee25224d
3 files changed
+10 -2

No files matched your search

+6
View File
@@ -5028,6 +5028,12 @@ void Client::HandleLDoNOpen(NPC *target)
return;
}
if (target->GetSpecialAbility(IMMUNE_OPEN))
{
LogDebug("[{}] tried to open [{}] but it was immune", GetName(), target->GetName());
return;
}
if(DistanceSquaredNoZ(m_Position, target->GetPosition()) > RuleI(Adventure, LDoNTrapDistanceUse))
{
LogDebug("[{}] tried to open [{}] but [{}] was out of range",