mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
[Rules] Add rule to allow you to cast invis on already invis'd players (#1361)
This commit is contained in:
parent
7458b5f32f
commit
e8b94a11f1
@ -369,6 +369,7 @@ RULE_BOOL(Spells, OldRainTargets, false, "Use old incorrectly implemented maximu
|
||||
RULE_BOOL(Spells, NPCSpellPush, false, "Enable spell push on NPCs")
|
||||
RULE_BOOL(Spells, July242002PetResists, true, "Enable Pets using PCs resist change from July 24 2002")
|
||||
RULE_INT(Spells, AOEMaxTargets, 0, "Max number of targets a Targeted AOE spell can cast on. Set to 0 for no limit.")
|
||||
RULE_BOOL(Spells, AllowDoubleInvis, false, "Allows you to cast invisibility spells on a player that is already invisible")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Combat)
|
||||
|
||||
@ -3607,33 +3607,36 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
|
||||
// Prevent double invising, which made you uninvised
|
||||
// Not sure if all 3 should be stacking
|
||||
if(IsEffectInSpell(spell_id, SE_Invisibility))
|
||||
{
|
||||
if(spelltar->invisible)
|
||||
{
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(IsEffectInSpell(spell_id, SE_InvisVsUndead))
|
||||
{
|
||||
if(spelltar->invisible_undead)
|
||||
if (!RuleB(Spells, AllowDoubleInvis)) {
|
||||
if (IsEffectInSpell(spell_id, SE_Invisibility))
|
||||
{
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
if (spelltar->invisible)
|
||||
{
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(IsEffectInSpell(spell_id, SE_InvisVsAnimals))
|
||||
{
|
||||
if(spelltar->invisible_animals)
|
||||
if (IsEffectInSpell(spell_id, SE_InvisVsUndead))
|
||||
{
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
if (spelltar->invisible_undead)
|
||||
{
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsEffectInSpell(spell_id, SE_InvisVsAnimals))
|
||||
{
|
||||
if (spelltar->invisible_animals)
|
||||
{
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user