diff --git a/sql/mangos.sql b/sql/mangos.sql index 4328a0c69..fda689e5d 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -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'), diff --git a/sql/updates/9803_01_mangos_spell_bonus_data.sql b/sql/updates/9803_01_mangos_spell_bonus_data.sql new file mode 100644 index 000000000..b3ff81dab --- /dev/null +++ b/sql/updates/9803_01_mangos_spell_bonus_data.sql @@ -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'); \ No newline at end of file diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index ca07d9c0a..03dd800fa 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -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 diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 78704053a..65285d6a5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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)) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 64500e238..b3850a345 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9802" + #define REVISION_NR "9803" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 682b95996..8e2793994 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -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__