mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Spells] IsInvisSpell() Method + InvisRequireGroup Rule (#1453)
* IsInvis() Method + InvisRequireGroup Rule * Fixed issues with invis rule crashes * Fixed issues with invis rule crashes * Invis Require Group nullptr fix * Invis Group Require Fix crash * Fixes Self only Invis Crashes * Formatting, reverse check order to prevent unnecessary processing Co-authored-by: ProducerZekServer <go@away.com> Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -378,6 +378,7 @@ RULE_BOOL(Spells, CazicTouchTargetsPetOwner, true, "If True, causes Cazic Touch
|
||||
RULE_BOOL(Spells, PreventFactionWarOnCharmBreak, false, "Enable spell interupts and dot removal on charm break to prevent faction wars.")
|
||||
RULE_BOOL(Spells, AllowDoubleInvis, false, "Allows you to cast invisibility spells on a player that is already invisible")
|
||||
RULE_BOOL(Spells, AllowSpellMemorizeFromItem, false, "Allows players to memorize spells by right-clicking spell scrolls")
|
||||
RULE_BOOL(Spells, InvisRequiresGroup, false, "Invis requires the the target to be in group.")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Combat)
|
||||
|
||||
@@ -260,6 +260,18 @@ bool IsDetrimentalSpell(uint16 spell_id)
|
||||
return !IsBeneficialSpell(spell_id);
|
||||
}
|
||||
|
||||
bool IsInvisSpell(uint16 spell_id)
|
||||
{
|
||||
if (IsEffectInSpell(spell_id, SE_Invisibility) ||
|
||||
IsEffectInSpell(spell_id, SE_Invisibility2) ||
|
||||
IsEffectInSpell(spell_id, SE_InvisVsUndead) ||
|
||||
IsEffectInSpell(spell_id, SE_InvisVsUndead2) ||
|
||||
IsEffectInSpell(spell_id, SE_InvisVsAnimals)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsInvulnerabilitySpell(uint16 spell_id)
|
||||
{
|
||||
return IsEffectInSpell(spell_id, SE_DivineAura);
|
||||
|
||||
@@ -1083,6 +1083,7 @@ bool IsPercentalHealSpell(uint16 spell_id);
|
||||
bool IsGroupOnlySpell(uint16 spell_id);
|
||||
bool IsBeneficialSpell(uint16 spell_id);
|
||||
bool IsDetrimentalSpell(uint16 spell_id);
|
||||
bool IsInvisSpell(uint16 spell_id);
|
||||
bool IsInvulnerabilitySpell(uint16 spell_id);
|
||||
bool IsCHDurationSpell(uint16 spell_id);
|
||||
bool IsPoisonCounterSpell(uint16 spell_id);
|
||||
|
||||
Reference in New Issue
Block a user