Caryatis
07-06-2010, 08:58 PM
Spell Effect 340, incorrectly labeled LifeshardChance from when lucy reported all the effects that way is actually very similiar to TriggerOnCast however they don't rely on a buff.
Mana Reiterate(upgraded flare line) has a 100% chance to proc Mana Reiterate Strike on cast, and then Mana Reiterate Strike has a 10% chance to proc Mana Re-Reiterate strike which in turn has 10% chance to proc Mana Re-Re-Reiterate Strike, etc. (incidently KLS this is why I believe the TriggerOnCast code should be 100, not 1000, as Mana Flares always proc, they have a proc limit but they proc every time... ie Pyromancy (http://lucy.allakhazam.com/spellraw.html?id=8406&source=Live) vs Mana Flare (http://lucy.allakhazam.com/spellraw.html?id=8032&source=Live) ... Pyromancy is 5% chance to proc(base1) vs 100 for mana flare.)
Anyway, the code...
edit.. changed the mob.cpp function to align with these 2 spells... Bark at the Moon (http://lucy.allakhazam.com/spell.html?id=11869&source=Test) which has a 95% chance to proc 1 pet however if that fails then you get the 5% proc of 4 pets. Previous code didnt allow that, you could miss both checks. However a spell like Annihilate the Unnatural (http://lucy.allakhazam.com/spell.html?id=10735&source=Live) has 2 chances to proc but you arent guaranteed the second proc if the first fails. New code should address this.
spdat.h - line 478 - alter this
#define SE_LifeshardChance 340 //chance to create lifeshard
to
#define SE_SpellTrigger 340 //chance to trigger spell
spell_effects.cpp - Line 2814 - add this
case SE_SpellTrigger:
spells.cpp - line 3048 - add this
TrySpellTrigger(spelltar, spell_id);
mob.h - line 781 - add this
void TrySpellTrigger(Mob *target, uint32 spell_id);
mob.cpp - line 3041 - add this
void Mob::TrySpellTrigger(Mob *target, uint32 spell_id)
{
if(target == NULL || !IsValidSpell(spell_id))
{
return;
}
int spell_trig = 100;
for(int i = 0; i < EFFECT_COUNT; i++)
{
if (spells[spell_id].effectid[i] == SE_SpellTrigger)
{
if (spells[spell_id].base[i] + spell_trig == 100)
{
spell_trig = 1;
}
else {
spell_trig = 100;
}
if(MakeRandomInt(0, spell_trig) <= spells[spell_id].base[i])
{
SpellOnTarget(spells[spell_id].base2[i], target);
}
else {
spell_trig = spells[spell_id].base[i];
}
}
}
}
Mana Reiterate(upgraded flare line) has a 100% chance to proc Mana Reiterate Strike on cast, and then Mana Reiterate Strike has a 10% chance to proc Mana Re-Reiterate strike which in turn has 10% chance to proc Mana Re-Re-Reiterate Strike, etc. (incidently KLS this is why I believe the TriggerOnCast code should be 100, not 1000, as Mana Flares always proc, they have a proc limit but they proc every time... ie Pyromancy (http://lucy.allakhazam.com/spellraw.html?id=8406&source=Live) vs Mana Flare (http://lucy.allakhazam.com/spellraw.html?id=8032&source=Live) ... Pyromancy is 5% chance to proc(base1) vs 100 for mana flare.)
Anyway, the code...
edit.. changed the mob.cpp function to align with these 2 spells... Bark at the Moon (http://lucy.allakhazam.com/spell.html?id=11869&source=Test) which has a 95% chance to proc 1 pet however if that fails then you get the 5% proc of 4 pets. Previous code didnt allow that, you could miss both checks. However a spell like Annihilate the Unnatural (http://lucy.allakhazam.com/spell.html?id=10735&source=Live) has 2 chances to proc but you arent guaranteed the second proc if the first fails. New code should address this.
spdat.h - line 478 - alter this
#define SE_LifeshardChance 340 //chance to create lifeshard
to
#define SE_SpellTrigger 340 //chance to trigger spell
spell_effects.cpp - Line 2814 - add this
case SE_SpellTrigger:
spells.cpp - line 3048 - add this
TrySpellTrigger(spelltar, spell_id);
mob.h - line 781 - add this
void TrySpellTrigger(Mob *target, uint32 spell_id);
mob.cpp - line 3041 - add this
void Mob::TrySpellTrigger(Mob *target, uint32 spell_id)
{
if(target == NULL || !IsValidSpell(spell_id))
{
return;
}
int spell_trig = 100;
for(int i = 0; i < EFFECT_COUNT; i++)
{
if (spells[spell_id].effectid[i] == SE_SpellTrigger)
{
if (spells[spell_id].base[i] + spell_trig == 100)
{
spell_trig = 1;
}
else {
spell_trig = 100;
}
if(MakeRandomInt(0, spell_trig) <= spells[spell_id].base[i])
{
SpellOnTarget(spells[spell_id].base2[i], target);
}
else {
spell_trig = spells[spell_id].base[i];
}
}
}
}