[9803] Fix typo in taken damage/healing bonus calculations and fix damage of 64085

This commit is contained in:
Laise 2010-04-29 13:14:22 +03:00
parent dbf19ba5e3
commit a69018efec
6 changed files with 16 additions and 11 deletions

View file

@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0',
`required_9794_02_mangos_command` bit(1) default NULL
`required_9803_01_mangos_spell_bonus_data` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@ -14252,7 +14252,7 @@ INSERT INTO `spell_bonus_data` VALUES
(34433, 0.65, 0, 0, 'Priest - Shadowfiend'),
(585, 0.714, 0, 0, 'Priest - Smite'),
(34914, 0, 0.4, 0, 'Priest - Vampiric Touch'),
(64085, 0, 0, 0, 'Priest - Vampiric Touch Dispel'),
(64085, 1.2, 0, 0, 'Priest - Vampiric Touch Dispel'),
/* Shaman */
(974, 0.4762, 0, 0, 'Shaman - Earth Shield'),
(379, 0, 0, 0, 'Shaman - Earth Shield Triggered'),

View file

@ -0,0 +1,4 @@
ALTER TABLE db_version CHANGE COLUMN required_9794_02_mangos_command required_9803_01_mangos_spell_bonus_data bit;
delete from `spell_bonus_data` where `entry` = 64085;
insert into `spell_bonus_data` values (64085, 1.2, 0, 0, 'Priest - Vampiric Touch Dispel');

View file

@ -134,6 +134,7 @@ pkgdata_DATA = \
9768_01_mangos_command.sql \
9794_01_mangos_mangos_string.sql \
9794_02_mangos_command.sql \
9803_01_mangos_spell_bonus_data.sql \
README
## Additional files to include when running 'make dist'
@ -248,4 +249,5 @@ EXTRA_DIST = \
9768_01_mangos_command.sql \
9794_01_mangos_mangos_string.sql \
9794_02_mangos_command.sql \
9803_01_mangos_spell_bonus_data.sql \
README

View file

@ -4246,10 +4246,9 @@ void Unit::RemoveSingleAuraDueToSpellByDispel(uint32 spellId, uint64 casterGUID,
{
if(Unit* caster = dot->GetCaster())
{
int32 bp0 = dot->GetModifier()->m_amount;
uint32 bonusDamage = caster->SpellDamageBonusDone(this, spellEntry, bp0, DOT);
bonusDamage = SpellDamageBonusTaken(caster, spellEntry, bonusDamage, DOT);
bp0 = 8 * bonusDamage;
// use clean value for initial damage
int32 bp0 = dot->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
bp0 *= 8;
// Remove spell auras from stack
RemoveSingleSpellAurasByCasterSpell(spellId, casterGUID, AURA_REMOVE_BY_DISPEL);
@ -9286,7 +9285,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
// Taken fixed damage bonus auras
int32 TakenAdvertisedBenefit = SpellBaseDamageBonusTaken(GetSpellSchoolMask(spellProto));
float LvlPenalty = CalculateLevelPenalty(spellProto);
float LvlPenalty = pCaster->CalculateLevelPenalty(spellProto);
// Check for table values
if (SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id))
@ -9818,7 +9817,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto,
// Taken fixed damage bonus auras
int32 TakenAdvertisedBenefit = SpellBaseHealingBonusTaken(GetSpellSchoolMask(spellProto));
float LvlPenalty = CalculateLevelPenalty(spellProto);
float LvlPenalty = pCaster->CalculateLevelPenalty(spellProto);
// Check for table values
SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id);
@ -10365,7 +10364,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp
// scaling of non weapon based spells
if (!isWeaponDamageBasedSpell)
{
float LvlPenalty = CalculateLevelPenalty(spellProto);
float LvlPenalty = pCaster->CalculateLevelPenalty(spellProto);
// Check for table values
if (SpellBonusEntry const* bonus = sSpellMgr.GetSpellBonusData(spellProto->Id))

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9802"
#define REVISION_NR "9803"
#endif // __REVISION_NR_H__

View file

@ -1,6 +1,6 @@
#ifndef __REVISION_SQL_H__
#define __REVISION_SQL_H__
#define REVISION_DB_CHARACTERS "required_9767_03_characters_characters"
#define REVISION_DB_MANGOS "required_9794_02_mangos_command"
#define REVISION_DB_MANGOS "required_9803_01_mangos_spell_bonus_data"
#define REVISION_DB_REALMD "required_9748_01_realmd_realmlist"
#endif // __REVISION_SQL_H__