PDA

View Full Version : Is this correct


Thuz989
12-24-2012, 11:04 AM
I was looking at bot code and this seems backwards to me unless im reading this wrong shouldnt the first archtype_Melee and second be caster???

switch(tar->GetArchetype())
{
case ARCHETYPE_CASTER:
//TODO: probably more caster specific spell effects in here
if(IsEffectInSpell(selectedBotSpell.SpellId, SE_AttackSpeed) || IsEffectInSpell(selectedBotSpell.SpellId, SE_ATK) ||
IsEffectInSpell(selectedBotSpell.SpellId, SE_STR) || IsEffectInSpell(selectedBotSpell.SpellId, SE_ReverseDS))
{
continue;
}
break;
case ARCHETYPE_MELEE:
if(IsEffectInSpell(selectedBotSpell.SpellId, SE_IncreaseSpellHaste) || IsEffectInSpell(selectedBotSpell.SpellId, SE_ManaPool) ||
IsEffectInSpell(selectedBotSpell.SpellId, SE_CastingLevel) || IsEffectInSpell(selectedBotSpell.SpellId, SE_ManaRegen_v2) ||
IsEffectInSpell(selectedBotSpell.SpellId, SE_CurrentMana))
{
continue;
}
break;
case ARCHETYPE_HYBRID:
//Hybrids get all buffs
default:
break;
}

c0ncrete
12-24-2012, 11:35 AM
it's correct because it filters out (does not cast) spells with the effects found in each case.

Thuz989
12-24-2012, 11:51 AM
Thank you for the explanation.