[Rules] Add Spells:BuffsFadeOnDeath. (#2200)

- Allows you to disable buffs fading on death.
This commit is contained in:
Kinglykrab 2022-05-27 15:00:59 -04:00 committed by GitHub
parent 123bc5f19a
commit 7072b5721b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 5 deletions

View File

@ -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, 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, BuffsFadeOnDeath, true, "Disable to keep buffs from fading on death")
RULE_BOOL(Spells, IllusionsAlwaysPersist, false, "Allows Illusions to persist beyond death and zoning always.")
RULE_CATEGORY_END()

View File

@ -1894,7 +1894,10 @@ bool Client::Death(Mob* killerMob, int64 damage, uint16 spell, EQ::skills::Skill
int32 illusion_spell_id = spellbonuses.Illusion;
//this generates a lot of 'updates' to the client that the client does not need
if (RuleB(Spells, BuffsFadeOnDeath)) {
BuffFadeNonPersistDeath();
}
if (RuleB(Character, UnmemSpellsOnDeath)) {
if ((ClientVersionBit() & EQ::versions::maskSoFAndLater) && RuleB(Character, RespawnFromHover))
UnmemSpellAll(true);

View File

@ -398,7 +398,10 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
current_hp = max_hp;
if(current_hp <= 0) {
if (RuleB(Spells, BuffsFadeOnDeath)) {
BuffFadeNonPersistDeath();
}
if (RuleB(Bots, ResurrectionSickness)) {
int resurrection_sickness_spell_id = (
RuleB(Bots, OldRaceRezEffects) &&

View File

@ -1020,7 +1020,10 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
name, (uint16)spells[SpellID].base_value[0],
SpellID, ZoneID, InstanceID);
if (RuleB(Spells, BuffsFadeOnDeath)) {
BuffFadeNonPersistDeath();
}
int SpellEffectDescNum = GetSpellEffectDescNum(SpellID);
// Rez spells with Rez effects have this DescNum (first is Titanium, second is 6.2 Client)
if(RuleB(Character, UseResurrectionSickness) && SpellEffectDescNum == 82 || SpellEffectDescNum == 39067) {

View File

@ -5334,7 +5334,10 @@ bool Mob::TrySpellOnDeath()
}
}
if (RuleB(Spells, BuffsFadeOnDeath)) {
BuffFadeNonPersistDeath();
}
return false;
//You should not be able to use this effect and survive (ALWAYS return false),
//attempting to place a heal in these effects will still result