mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 22:51:30 +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],
|
name, (uint16)spells[SpellID].base_value[0],
|
||||||
SpellID, ZoneID, InstanceID);
|
SpellID, ZoneID, InstanceID);
|
||||||
|
|
||||||
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
const bool use_old_resurrection = (
|
||||||
BuffFadeNonPersistDeath();
|
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);
|
int SpellEffectDescNum = GetSpellEffectDescriptionNumber(SpellID);
|
||||||
// Rez spells with Rez effects have this DescNum (first is Titanium, second is 6.2 Client)
|
// Rez spells with Rez effects have this DescNum (first is Titanium, second is 6.2 Client)
|
||||||
if(RuleB(Character, UseResurrectionSickness) && SpellEffectDescNum == 82 || SpellEffectDescNum == 39067) {
|
if(RuleB(Character, UseResurrectionSickness) && SpellEffectDescNum == 82 || SpellEffectDescNum == 39067) {
|
||||||
SetHP(GetMaxHP() / 5);
|
SetHP(GetMaxHP() / 5);
|
||||||
SetMana(0);
|
SetMana(0);
|
||||||
int resurrection_sickness_spell_id = (
|
|
||||||
RuleB(Character, UseOldRaceRezEffects) &&
|
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||||
(
|
BuffFadeNonPersistDeath();
|
||||||
GetRace() == BARBARIAN ||
|
}
|
||||||
GetRace() == DWARF ||
|
|
||||||
GetRace() == TROLL ||
|
|
||||||
GetRace() == OGRE
|
|
||||||
) ?
|
|
||||||
RuleI(Character, OldResurrectionSicknessSpellID) :
|
|
||||||
RuleI(Character, ResurrectionSicknessSpellID)
|
|
||||||
);
|
|
||||||
SpellOnTarget(resurrection_sickness_spell_id, this);
|
SpellOnTarget(resurrection_sickness_spell_id, this);
|
||||||
} else if (SpellID == SPELL_DIVINE_REZ) {
|
} else if (SpellID == SPELL_DIVINE_REZ) {
|
||||||
|
if (RuleB(Spells, BuffsFadeOnDeath)) {
|
||||||
|
BuffFadeNonPersistDeath();
|
||||||
|
}
|
||||||
|
|
||||||
RestoreHealth();
|
RestoreHealth();
|
||||||
RestoreMana();
|
RestoreMana();
|
||||||
RestoreEndurance();
|
RestoreEndurance();
|
||||||
} else {
|
} 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);
|
SetHP(GetMaxHP() / 20);
|
||||||
SetMana(GetMaxMana() / 20);
|
SetMana(GetMaxMana() / 20);
|
||||||
SetEndurance(GetMaxEndurance() / 20);
|
SetEndurance(GetMaxEndurance() / 20);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user