mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Rules] Add Spells:BuffsFadeOnDeath. (#2200)
- Allows you to disable buffs fading on death.
This commit is contained in:
parent
123bc5f19a
commit
7072b5721b
@ -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()
|
||||
|
||||
|
||||
@ -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
|
||||
BuffFadeNonPersistDeath();
|
||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||
BuffFadeNonPersistDeath();
|
||||
}
|
||||
|
||||
if (RuleB(Character, UnmemSpellsOnDeath)) {
|
||||
if ((ClientVersionBit() & EQ::versions::maskSoFAndLater) && RuleB(Character, RespawnFromHover))
|
||||
UnmemSpellAll(true);
|
||||
|
||||
@ -398,7 +398,10 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
|
||||
current_hp = max_hp;
|
||||
|
||||
if(current_hp <= 0) {
|
||||
BuffFadeNonPersistDeath();
|
||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||
BuffFadeNonPersistDeath();
|
||||
}
|
||||
|
||||
if (RuleB(Bots, ResurrectionSickness)) {
|
||||
int resurrection_sickness_spell_id = (
|
||||
RuleB(Bots, OldRaceRezEffects) &&
|
||||
|
||||
@ -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);
|
||||
|
||||
BuffFadeNonPersistDeath();
|
||||
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) {
|
||||
|
||||
@ -5330,11 +5330,14 @@ bool Mob::TrySpellOnDeath()
|
||||
if(spellbonuses.SpellOnDeath[i] && IsValidSpell(spellbonuses.SpellOnDeath[i])) {
|
||||
if(zone->random.Roll(static_cast<int>(spellbonuses.SpellOnDeath[i + 1]))) {
|
||||
SpellFinished(spellbonuses.SpellOnDeath[i], this, EQ::spells::CastingSlot::Item, 0, -1, spells[spellbonuses.SpellOnDeath[i]].resist_difficulty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||
BuffFadeNonPersistDeath();
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user