View Single Post
  #5  
Old 03-07-2009, 04:06 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Just a recommendation, but it would be better to use IsEffectInSpell(spellid, effect) than hard coding the spell ID, in case it changes or there is a newer, similar spell down the line (or if someone wants to create a custom spell). You might even want to add a new function to both check if it's the skill attack (SE_SkillAttack) & return what skill is being used.

On a side note, it's awesome that you've been putting all of this work into adding & fixing AAs. I started working on making AAs more like spells as far as how they're calculated (every time we run CalcBonuses()), but ran into a roadblock because we would have to run ~1600 queries to the database every time we calculate bonuses (see Client::CalcAABonuses()). The alternative is to load AAs into shared memory, but I haven't had a chance to jump into that within the past several months. If we can do that, then we just have to modify the StatBonuses struct to incorporate the new effects. Then, when we run the checks in the code, it would look something like this:
Code:
int bonus = itembonuses.AC + spellbonuses.AC + aabonuses.AC
Then, once we have all of the AA & spell effects in (the ones that aren't currently), new AAs are just a matter of adding to the database.

In the long run, I think it would be better if we can get this happening, since we're going to have to go back & make changes to all of the AAs we're putting in now once we do this (but going forward, it will be a lot easier).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote