Merge branch 'master' of https://github.com/EQEmu/Server into item_link

This commit is contained in:
Uleat 2014-12-26 23:52:25 -05:00
commit 00ac9a05d5
3 changed files with 71 additions and 1 deletions

View File

@ -30,7 +30,7 @@
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
*/
#define CURRENT_BINARY_DATABASE_VERSION 9064
#define CURRENT_BINARY_DATABASE_VERSION 9065
#define COMPILE_DATE __DATE__
#define COMPILE_TIME __TIME__
#ifndef WIN32

View File

@ -318,6 +318,7 @@
9062|2014_12_15_multiple_table_updates.sql|SHOW COLUMNS FROM `items` LIKE 'augslot6type'|empty|
9063|2014_12_24_npc_types_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'd_melee_texture1'|empty|
9064|2014_12_24_npc_types_table_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'herosforgemodel'|empty|
9065|2014_12_26_merc_weaponinfo_table_update.sql|SHOW COLUMNS FROM `vwMercNpcTypes` LIKE 'd_melee_texture1'|empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not

View File

@ -0,0 +1,69 @@
/* Drop the current Merc View */
DROP VIEW vwMercNpcTypes;
/* Rename fields to match the source changes */
ALTER TABLE `merc_weaponinfo` CHANGE `d_meele_texture1` `d_melee_texture1` INT(11) NOT NULL DEFAULT 0;
ALTER TABLE `merc_weaponinfo` CHANGE `d_meele_texture2` `d_melee_texture2` INT(11) NOT NULL DEFAULT 0;
/* Re-Create the Merc View with new field names */
CREATE VIEW vwMercNpcTypes AS
SELECT
ms.merc_npc_type_id,
'' AS name,
ms.clientlevel,
ms.level,
mtyp.race_id,
mstyp.class_id,
ms.hp,
ms.mana,
0 AS gender,
mai.texture,
mai.helmtexture,
ms.attack_speed,
ms.STR,
ms.STA,
ms.DEX,
ms.AGI,
ms._INT,
ms.WIS,
ms.CHA,
ms.MR,
ms.CR,
ms.DR,
ms.FR,
ms.PR,
ms.Corrup,
ms.mindmg,
ms.maxdmg,
ms.attack_count,
ms.special_abilities AS special_abilities,
mwi.d_melee_texture1,
mwi.d_melee_texture2,
mwi.prim_melee_type,
mwi.sec_melee_type,
ms.runspeed,
ms.hp_regen_rate,
ms.mana_regen_rate,
1 AS bodytype,
mai.armortint_id,
mai.armortint_red,
mai.armortint_green,
mai.armortint_blue,
ms.AC,
ms.ATK,
ms.Accuracy,
ms.spellscale,
ms.healscale
FROM merc_stats ms
INNER JOIN merc_armorinfo mai
ON ms.merc_npc_type_id = mai.merc_npc_type_id
AND mai.minlevel <= ms.level AND mai.maxlevel >= ms.level
INNER JOIN merc_weaponinfo mwi
ON ms.merc_npc_type_id = mwi.merc_npc_type_id
AND mwi.minlevel <= ms.level AND mwi.maxlevel >= ms.level
INNER JOIN merc_templates mtem
ON mtem.merc_npc_type_id = ms.merc_npc_type_id
INNER JOIN merc_types mtyp
ON mtem.merc_type_id = mtyp.merc_type_id
INNER JOIN merc_subtypes mstyp
ON mtem.merc_subtype_id = mstyp.merc_subtype_id;