PDA

View Full Version : SpellVulnerability Cap?


Hateborne
06-18-2012, 01:54 PM
I cannot seem to find a cap anywhere, but it seems to stop at around 10%. A value of 10/25/50% all seem to do only 10%.

Can lerxst2112 or some other spell guru point out the obscure line/batch of code that handles this cap (or is there some way around it)?

-Hate

lerxst2112
06-18-2012, 02:22 PM
Looks like there's no cap. Possibly there's interference from other focus effects or limits on the spell. *shrug*


sint32 Mob::GetVulnerability(sint32 damage, Mob *caster, uint32 spell_id, int32 ticsremaining)
{
// If we increased the datatype on GetBuffSlotFromType, this wouldnt be needed
uint32 buff_count = GetMaxTotalSlots();
for(int i = 0; i < buff_count; i++)
{
if(IsEffectInSpell(buffs[i].spellid, SE_SpellVulnerability))
{
// For Clients, Pets and Bots that are casting the spell, see if the vulnerability affects their spell.
if(!caster->IsNPC())
{
sint32 focus = caster->CalcFocusEffect(focusSpellVulnerability, buffs[i].spellid, spell_id);
if(focus == 1)
{
damage += damage * spells[buffs[i].spellid].base[0] / 100;
break;
}
}

Hateborne
06-18-2012, 03:19 PM
Interesting. I found the same rabbit hole.

I will produce a few spells with strictly SpellVulnerability at varying levels to experiment. Thank you as always lerxst2112. Saving my foolish self, one post at a time.

-Hate