mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
Keep track of base spell id for SpellProcs/PermaProcs
This will fix numhits issue for procs from spells
This commit is contained in:
parent
808977f69a
commit
451d422b8a
@ -9466,7 +9466,7 @@ void Client::CompleteConnect()
|
|||||||
case SE_AddMeleeProc:
|
case SE_AddMeleeProc:
|
||||||
case SE_WeaponProc:
|
case SE_WeaponProc:
|
||||||
{
|
{
|
||||||
AddProcToWeapon(GetProcID(buffs[j1].spellid, x1), false, 100+spells[buffs[j1].spellid].base2[x1]);
|
AddProcToWeapon(GetProcID(buffs[j1].spellid, x1), false, 100+spells[buffs[j1].spellid].base2[x1], buffs[j1].spellid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SE_DefensiveProc:
|
case SE_DefensiveProc:
|
||||||
|
|||||||
@ -500,7 +500,7 @@ public:
|
|||||||
bool AddSkillProc(uint16 spell_id, uint16 iChance = 3, uint16 base_spell_id = SPELL_UNKNOWN);
|
bool AddSkillProc(uint16 spell_id, uint16 iChance = 3, uint16 base_spell_id = SPELL_UNKNOWN);
|
||||||
bool RemoveSkillProc(uint16 spell_id, bool bAll = false);
|
bool RemoveSkillProc(uint16 spell_id, bool bAll = false);
|
||||||
bool HasSkillProcs() const;
|
bool HasSkillProcs() const;
|
||||||
bool AddProcToWeapon(uint16 spell_id, bool bPerma = false, uint16 iChance = 3);
|
bool AddProcToWeapon(uint16 spell_id, bool bPerma = false, uint16 iChance = 3, uint16 base_spell_id = SPELL_UNKNOWN);
|
||||||
bool RemoveProcFromWeapon(uint16 spell_id, bool bAll = false);
|
bool RemoveProcFromWeapon(uint16 spell_id, bool bAll = false);
|
||||||
bool HasProcs() const;
|
bool HasProcs() const;
|
||||||
|
|
||||||
|
|||||||
@ -605,9 +605,9 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
|
|||||||
// We need to reapply buff based procs
|
// We need to reapply buff based procs
|
||||||
// We need to do this here so suspended pets also regain their procs.
|
// We need to do this here so suspended pets also regain their procs.
|
||||||
if (spells[buffs[j1].spellid].base2[x1] == 0) {
|
if (spells[buffs[j1].spellid].base2[x1] == 0) {
|
||||||
AddProcToWeapon(GetProcID(buffs[j1].spellid,x1), false, 100);
|
AddProcToWeapon(GetProcID(buffs[j1].spellid,x1), false, 100, buffs[j1].spellid);
|
||||||
} else {
|
} else {
|
||||||
AddProcToWeapon(GetProcID(buffs[j1].spellid,x1), false, 100+spells[buffs[j1].spellid].base2[x1]);
|
AddProcToWeapon(GetProcID(buffs[j1].spellid,x1), false, 100+spells[buffs[j1].spellid].base2[x1], buffs[j1].spellid);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SE_Charm:
|
case SE_Charm:
|
||||||
|
|||||||
@ -1695,9 +1695,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(spells[spell_id].base2[i] == 0)
|
if(spells[spell_id].base2[i] == 0)
|
||||||
AddProcToWeapon(procid, false, 100);
|
AddProcToWeapon(procid, false, 100, spell_id);
|
||||||
else
|
else
|
||||||
AddProcToWeapon(procid, false, spells[spell_id].base2[i]+100);
|
AddProcToWeapon(procid, false, spells[spell_id].base2[i]+100, spell_id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4824,7 +4824,7 @@ bool Mob::FindType(uint16 type, bool bOffensive, uint16 threshold) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance) {
|
bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance, uint16 base_spell_id) {
|
||||||
if(spell_id == SPELL_UNKNOWN)
|
if(spell_id == SPELL_UNKNOWN)
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
@ -4834,7 +4834,7 @@ bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance) {
|
|||||||
if (PermaProcs[i].spellID == SPELL_UNKNOWN) {
|
if (PermaProcs[i].spellID == SPELL_UNKNOWN) {
|
||||||
PermaProcs[i].spellID = spell_id;
|
PermaProcs[i].spellID = spell_id;
|
||||||
PermaProcs[i].chance = iChance;
|
PermaProcs[i].chance = iChance;
|
||||||
PermaProcs[i].base_spellID = SPELL_UNKNOWN;
|
PermaProcs[i].base_spellID = base_spell_id;
|
||||||
mlog(SPELLS__PROCS, "Added permanent proc spell %d with chance %d to slot %d", spell_id, iChance, i);
|
mlog(SPELLS__PROCS, "Added permanent proc spell %d with chance %d to slot %d", spell_id, iChance, i);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -4846,7 +4846,7 @@ bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance) {
|
|||||||
if (SpellProcs[i].spellID == SPELL_UNKNOWN) {
|
if (SpellProcs[i].spellID == SPELL_UNKNOWN) {
|
||||||
SpellProcs[i].spellID = spell_id;
|
SpellProcs[i].spellID = spell_id;
|
||||||
SpellProcs[i].chance = iChance;
|
SpellProcs[i].chance = iChance;
|
||||||
SpellProcs[i].base_spellID = SPELL_UNKNOWN;;
|
SpellProcs[i].base_spellID = base_spell_id;;
|
||||||
mlog(SPELLS__PROCS, "Added spell-granted proc spell %d with chance %d to slot %d", spell_id, iChance, i);
|
mlog(SPELLS__PROCS, "Added spell-granted proc spell %d with chance %d to slot %d", spell_id, iChance, i);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user