Keep track of base spell id for SpellProcs/PermaProcs

This will fix numhits issue for procs from spells
This commit is contained in:
Michael Cook (mackal)
2014-02-21 04:04:18 -05:00
parent 808977f69a
commit 451d422b8a
5 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -4824,7 +4824,7 @@ bool Mob::FindType(uint16 type, bool bOffensive, uint16 threshold) {
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)
return(false);
@@ -4834,7 +4834,7 @@ bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance) {
if (PermaProcs[i].spellID == SPELL_UNKNOWN) {
PermaProcs[i].spellID = spell_id;
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);
return true;
@@ -4846,7 +4846,7 @@ bool Mob::AddProcToWeapon(uint16 spell_id, bool bPerma, uint16 iChance) {
if (SpellProcs[i].spellID == SPELL_UNKNOWN) {
SpellProcs[i].spellID = spell_id;
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);
return true;
}