[8635] Rewrote bonus damage claculation

* calculation depends on the damageClass now
  ->SPELL_DAMAGE_CLASS_RANGED & SPELL_DAMAGE_CLASS_MELEE use MeleeDamageBonus()
  ->SPELL_DAMAGE_CLASS_MAGIC & SPELL_DAMAGE_CLASS_RANGED use SpellDamageBonus()
* changes/improvements in MeleeDamageBonus:
  -> improved criterions to apply bonuses
  -> implemented scaling of FLAT damage Bonus for non weapon damage based spells
  -> support of DOT's
  -> added pet's bonus damage for non weapon based spells
* general cleanup in CalculateSpellDamage() and MeleeDamageBonus()
* implemented global helper functions GetWeaponAttackType() and GetAuraTicks() in SpellMgr

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
pasdVn 2009-10-14 00:27:40 +02:00 committed by ApoC
parent 29fde5f671
commit c47cf7bd61
9 changed files with 414 additions and 290 deletions

View file

@ -1004,6 +1004,15 @@ enum SpellImmunity
#define MAX_SPELL_IMMUNITY 6
enum WeaponAttackType
{
BASE_ATTACK = 0,
OFF_ATTACK = 1,
RANGED_ATTACK = 2
};
#define MAX_ATTACK 3
enum Targets
{
TARGET_SELF = 1,