mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[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:
parent
56510e6383
commit
16ee25224d
@ -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",
|
||||
|
||||
@ -210,7 +210,8 @@ enum {
|
||||
IMMUNE_AGGRO_NPC = 50,
|
||||
MODIFY_AVOID_DAMAGE = 51, //Modify by percent the NPCs chance to riposte, block, parry or dodge individually, or for all skills
|
||||
IMMUNE_FADING_MEMORIES = 52,
|
||||
MAX_SPECIAL_ATTACK = 53
|
||||
IMMUNE_OPEN = 53,
|
||||
MAX_SPECIAL_ATTACK
|
||||
};
|
||||
|
||||
typedef enum { //fear states
|
||||
|
||||
@ -2952,7 +2952,8 @@ luabind::scope lua_register_special_abilities() {
|
||||
luabind::value("immune_damage_npc", static_cast<int>(IMMUNE_DAMAGE_NPC)),
|
||||
luabind::value("immune_aggro_client", static_cast<int>(IMMUNE_AGGRO_CLIENT)),
|
||||
luabind::value("immune_aggro_npc", static_cast<int>(IMMUNE_AGGRO_NPC)),
|
||||
luabind::value("modify_avoid_damage", static_cast<int>(MODIFY_AVOID_DAMAGE))
|
||||
luabind::value("modify_avoid_damage", static_cast<int>(MODIFY_AVOID_DAMAGE)),
|
||||
luabind::value("immune_open", static_cast<int>(IMMUNE_OPEN))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user