[Bug Fix] Vampiric Embrace Fixes (#3873)

* [Bug Fix] Vampiric Embrace Fixes

Fixed the difference of procs for Vampiric Embrace between Necros and Shadow Knights.

* Space

* Cleanup

* Update spdat.h

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
Fryguy
2024-01-07 12:12:15 -05:00
committed by GitHub
parent 2ed4effbe3
commit 41d9a15c74
3 changed files with 33 additions and 9 deletions
+17 -6
View File
@@ -1877,11 +1877,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
case SE_AddMeleeProc:
case SE_WeaponProc:
{
uint16 procid = GetProcID(spell_id, i);
uint16 proc_id = GetProcID(spell_id, i);
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Weapon Proc: %s (id %d)", spells[effect_value].name, procid);
#endif
AddProcToWeapon(procid, false, 100 + spells[spell_id].limit_value[i], spell_id, caster_level, GetSpellProcLimitTimer(spell_id, ProcType::MELEE_PROC));
// Special case for Vampiric Embrace. If this is a Shadow Knight, the proc is different.
if (proc_id == SPELL_VAMPIRIC_EMBRACE && GetClass() == Class::ShadowKnight) {
proc_id = SPELL_VAMPIRIC_EMBRACE_OF_SHADOW;
}
AddProcToWeapon(proc_id, false, 100 + spells[spell_id].limit_value[i], spell_id, caster_level, GetSpellProcLimitTimer(spell_id, ProcType::MELEE_PROC));
break;
}
@@ -3721,7 +3726,7 @@ snare has both of them negative, yet their range should work the same:
case 144: // Level 40+ Harm Touch
result = ubase + (caster_level * 10) + (caster_level - 40) * 20;
break;
//these are used in stacking effects... formula unknown
case 201:
case 203:
@@ -4246,8 +4251,14 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
case SE_AddMeleeProc:
case SE_WeaponProc:
{
uint16 procid = GetProcID(buffs[slot].spellid, i);
RemoveProcFromWeapon(procid, false);
uint16 proc_id = GetProcID(buffs[slot].spellid, i);
// Special case for Vampiric Embrace. If this is a Shadow Knight, the proc is different.
if (proc_id == SPELL_VAMPIRIC_EMBRACE && GetClass() == Class::ShadowKnight) {
proc_id = SPELL_VAMPIRIC_EMBRACE_OF_SHADOW;
}
RemoveProcFromWeapon(proc_id, false);
break;
}
@@ -7099,7 +7110,7 @@ bool Mob::TryDeathSave() {
} else {
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
}
SendHPUpdate();
BuffFadeBySlot(buffSlot);
return true;