mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-02 22:03:52 +00:00
[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:
parent
2ed4effbe3
commit
41d9a15c74
@ -202,6 +202,8 @@
|
||||
#define SPELL_GUIDE_LEVITATION 39852
|
||||
#define SPELL_GUIDE_SPELL_HASTE 39853
|
||||
#define SPELL_GUIDE_HASTE 39854
|
||||
#define SPELL_VAMPIRIC_EMBRACE 821
|
||||
#define SPELL_VAMPIRIC_EMBRACE_OF_SHADOW 822
|
||||
|
||||
//spellgroup ids
|
||||
#define SPELLGROUP_FRENZIED_BURNOUT 2754
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user