mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
[Bug Fix] Corpse Call removing Resurrection Effects (#4410)
* [Bug Fix] Corpse Call removing Rez Effects When calling a corpse, it should not remove rez effects. * Update client_process.cpp --------- Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
parent
c73a1e8bea
commit
3b0fa015a7
@ -1032,32 +1032,62 @@ 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();
|
||||
}
|
||||
const bool use_old_resurrection = (
|
||||
RuleB(Character, UseOldRaceRezEffects) &&
|
||||
(
|
||||
GetRace() == Race::Barbarian ||
|
||||
GetRace() == Race::Dwarf ||
|
||||
GetRace() == Race::Troll ||
|
||||
GetRace() == Race::Ogre
|
||||
)
|
||||
);
|
||||
|
||||
const uint16 resurrection_sickness_spell_id = (
|
||||
use_old_resurrection ?
|
||||
RuleI(Character, OldResurrectionSicknessSpellID) :
|
||||
RuleI(Character, ResurrectionSicknessSpellID)
|
||||
);
|
||||
|
||||
int SpellEffectDescNum = GetSpellEffectDescriptionNumber(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) {
|
||||
SetHP(GetMaxHP() / 5);
|
||||
SetMana(0);
|
||||
int resurrection_sickness_spell_id = (
|
||||
RuleB(Character, UseOldRaceRezEffects) &&
|
||||
(
|
||||
GetRace() == BARBARIAN ||
|
||||
GetRace() == DWARF ||
|
||||
GetRace() == TROLL ||
|
||||
GetRace() == OGRE
|
||||
) ?
|
||||
RuleI(Character, OldResurrectionSicknessSpellID) :
|
||||
RuleI(Character, ResurrectionSicknessSpellID)
|
||||
);
|
||||
|
||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||
BuffFadeNonPersistDeath();
|
||||
}
|
||||
|
||||
SpellOnTarget(resurrection_sickness_spell_id, this);
|
||||
} else if (SpellID == SPELL_DIVINE_REZ) {
|
||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||
BuffFadeNonPersistDeath();
|
||||
}
|
||||
|
||||
RestoreHealth();
|
||||
RestoreMana();
|
||||
RestoreEndurance();
|
||||
} else {
|
||||
if (RuleB(Character, UseResurrectionSickness)) {
|
||||
bool has_resurrection_sickness = false;
|
||||
|
||||
for (int slot = 0; slot < GetMaxTotalSlots(); slot++) {
|
||||
if (IsValidSpell(buffs[slot].spellid) && IsResurrectionSicknessSpell(buffs[slot].spellid)){
|
||||
has_resurrection_sickness = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Need to wipe buffs after checking if client had rez effects.
|
||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||
BuffFadeNonPersistDeath();
|
||||
}
|
||||
|
||||
if (has_resurrection_sickness) {
|
||||
SpellOnTarget(resurrection_sickness_spell_id, this);
|
||||
}
|
||||
}
|
||||
|
||||
SetHP(GetMaxHP() / 20);
|
||||
SetMana(GetMaxMana() / 20);
|
||||
SetEndurance(GetMaxEndurance() / 20);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user