mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
[Rules] Add Spells:IllusionsAlwaysPersist. (#2199)
- Allows illusions to always persist beyond death or zoning.
This commit is contained in:
parent
5bc4cff7a9
commit
0de90dc135
@ -414,6 +414,7 @@ RULE_BOOL(Spells, CompoundLifetapHeals, true, "True: Lifetap heals calculate dam
|
|||||||
RULE_BOOL(Spells, UseFadingMemoriesMaxLevel, false, "Enables to limit field in spell data to set the max level that over which an NPC will ignore fading memories effect and not lose aggro.")
|
RULE_BOOL(Spells, UseFadingMemoriesMaxLevel, false, "Enables to limit field in spell data to set the max level that over which an NPC will ignore fading memories effect and not lose aggro.")
|
||||||
RULE_BOOL(Spells, FixBeaconHeading, false, "Beacon spells use casters heading to fix live bug. False: Live like heading always 0.")
|
RULE_BOOL(Spells, FixBeaconHeading, false, "Beacon spells use casters heading to fix live bug. False: Live like heading always 0.")
|
||||||
RULE_BOOL(Spells, UseSpellImpliedTargeting, false, "Replicates EQ2-style targeting behavior for spells. Spells will 'pass through' inappropriate targets to target's target if it is appropriate.")
|
RULE_BOOL(Spells, UseSpellImpliedTargeting, false, "Replicates EQ2-style targeting behavior for spells. Spells will 'pass through' inappropriate targets to target's target if it is appropriate.")
|
||||||
|
RULE_BOOL(Spells, IllusionsAlwaysPersist, false, "Allows Illusions to persist beyond death and zoning always.")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Combat)
|
RULE_CATEGORY(Combat)
|
||||||
|
|||||||
@ -10214,8 +10214,17 @@ void Mob::ApplySpellEffectIllusion(int32 spell_id, Mob *caster, int buffslot, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (buffslot != -1) {
|
if (buffslot != -1) {
|
||||||
if (caster == this && spell_id != SPELL_MINOR_ILLUSION && spell_id != SPELL_ILLUSION_TREE &&
|
if (
|
||||||
(spellbonuses.IllusionPersistence || aabonuses.IllusionPersistence || itembonuses.IllusionPersistence)) {
|
caster == this &&
|
||||||
|
spell_id != SPELL_MINOR_ILLUSION &&
|
||||||
|
spell_id != SPELL_ILLUSION_TREE &&
|
||||||
|
(
|
||||||
|
spellbonuses.IllusionPersistence ||
|
||||||
|
aabonuses.IllusionPersistence ||
|
||||||
|
itembonuses.IllusionPersistence ||
|
||||||
|
RuleB(Spells, IllusionsAlwaysPersist)
|
||||||
|
)
|
||||||
|
) {
|
||||||
buffs[buffslot].persistant_buff = 1;
|
buffs[buffslot].persistant_buff = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -10225,9 +10234,18 @@ void Mob::ApplySpellEffectIllusion(int32 spell_id, Mob *caster, int buffslot, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Mob::HasPersistDeathIllusion(int32 spell_id) {
|
bool Mob::HasPersistDeathIllusion(int32 spell_id) {
|
||||||
|
if (
|
||||||
if (spellbonuses.IllusionPersistence > 1 || aabonuses.IllusionPersistence > 1 || itembonuses.IllusionPersistence > 1) {
|
spellbonuses.IllusionPersistence > 1 ||
|
||||||
if (spell_id != SPELL_MINOR_ILLUSION && spell_id != SPELL_ILLUSION_TREE && IsEffectInSpell(spell_id, SE_Illusion) && IsBeneficialSpell(spell_id)) {
|
aabonuses.IllusionPersistence > 1 ||
|
||||||
|
itembonuses.IllusionPersistence > 1 ||
|
||||||
|
RuleB(Spells, IllusionsAlwaysPersist)
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
spell_id != SPELL_MINOR_ILLUSION &&
|
||||||
|
spell_id != SPELL_ILLUSION_TREE &&
|
||||||
|
IsEffectInSpell(spell_id, SE_Illusion) &&
|
||||||
|
IsBeneficialSpell(spell_id)
|
||||||
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2800,9 +2800,18 @@ int Mob::CalcBuffDuration(Mob *caster, Mob *target, uint16 spell_id, int32 caste
|
|||||||
castlevel = caster_level_override;
|
castlevel = caster_level_override;
|
||||||
|
|
||||||
int res = CalcBuffDuration_formula(castlevel, formula, duration);
|
int res = CalcBuffDuration_formula(castlevel, formula, duration);
|
||||||
if (caster == target && (target->aabonuses.IllusionPersistence || target->spellbonuses.IllusionPersistence ||
|
if (
|
||||||
target->itembonuses.IllusionPersistence) &&
|
caster == target &&
|
||||||
spell_id != SPELL_MINOR_ILLUSION && spell_id != SPELL_ILLUSION_TREE && IsEffectInSpell(spell_id, SE_Illusion)) {
|
(
|
||||||
|
target->aabonuses.IllusionPersistence ||
|
||||||
|
target->spellbonuses.IllusionPersistence ||
|
||||||
|
target->itembonuses.IllusionPersistence ||
|
||||||
|
RuleB(Spells, IllusionsAlwaysPersist)
|
||||||
|
) &&
|
||||||
|
spell_id != SPELL_MINOR_ILLUSION &&
|
||||||
|
spell_id != SPELL_ILLUSION_TREE &&
|
||||||
|
IsEffectInSpell(spell_id, SE_Illusion)
|
||||||
|
) {
|
||||||
res = 10000; // ~16h override
|
res = 10000; // ~16h override
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user