[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
+14 -3
View File
@@ -316,7 +316,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
Mob* pMob = nullptr;
int32 orgcasttime;
if(!IsValidSpell(spell_id)) {
if (!IsValidSpell(spell_id)) {
InterruptSpell();
return(false);
}
@@ -6168,8 +6168,14 @@ bool Mob::IsCombatProc(uint16 spell_id) {
}
bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance, uint16 base_spell_id, int level_override, uint32 proc_reuse_time) {
if(!IsValidSpell(spell_id))
return(false);
if(!IsValidSpell(spell_id)) {
return false;
}
// Special case for Vampiric Embrace. If this is a Shadow Knight, the proc is different.
if (spell_id == SPELL_VAMPIRIC_EMBRACE && GetClass() == Class::ShadowKnight) {
spell_id = SPELL_VAMPIRIC_EMBRACE_OF_SHADOW;
}
int i;
if (bPerma) {
@@ -6222,6 +6228,11 @@ bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance, uint16 b
}
bool Mob::RemoveProcFromWeapon(uint16 spell_id, bool bAll) {
// Special case for Vampiric Embrace. If this is a Shadow Knight, the proc is different.
if (spell_id == SPELL_VAMPIRIC_EMBRACE && GetClass() == Class::ShadowKnight) {
spell_id = SPELL_VAMPIRIC_EMBRACE_OF_SHADOW;
}
for (int i = 0; i < m_max_procs; i++) {
if (bAll || SpellProcs[i].spellID == spell_id) {
SpellProcs[i].spellID = SPELL_UNKNOWN;