aboutsummaryrefslogtreecommitdiff
path: root/sql/updates
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-28 18:29:59 -0500
committermegamage <none@none>2009-05-28 18:29:59 -0500
commit451471d438e234698a91f15d63b17df3ec3327f4 (patch)
tree15b987eab348e2adef11e9a729b84405f58df5da /sql/updates
parentcfa2e223c03b2b6fbc7bce39ba942ebbecd95c5a (diff)
[7904] Change creature damage calculation formula. Author: Seizerkiller
* Add new creature_template field `dmg_multiplier` * Make attackpower include in creature damage not dependent from attack speed. NOTE: included in sql update recalculation for creature damage related fields only make temporary possible usable values. Real values need revisited by DB devs for correctness. --HG-- branch : trunk
Diffstat (limited to 'sql/updates')
-rw-r--r--sql/updates/7904_01_mangos_creature_template.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/updates/7904_01_mangos_creature_template.sql b/sql/updates/7904_01_mangos_creature_template.sql
new file mode 100644
index 00000000000..0f984b74e78
--- /dev/null
+++ b/sql/updates/7904_01_mangos_creature_template.sql
@@ -0,0 +1,9 @@
+ALTER TABLE db_version CHANGE COLUMN required_7902_02_mangos_pool_gameobject required_7904_01_mangos_creature_template bit;
+
+ALTER TABLE creature_template
+ ADD COLUMN dmg_multiplier float NOT NULL default '1' AFTER attackpower;
+
+UPDATE creature_template SET mindmg = round(mindmg + attackpower / 14);
+UPDATE creature_template SET maxdmg = round(maxdmg + attackpower / 14);
+UPDATE creature_template SET attackpower = round((maxdmg + mindmg) * 0.3);
+UPDATE creature_template SET mindmg = round(mindmg * 0.7), maxdmg = round(maxdmg * 0.7);