From 5b59d2f5839986c4113d70c86de375c4fd4a2b93 Mon Sep 17 00:00:00 2001 From: ratkosrb <35845488+ratkosrb@users.noreply.github.com> Date: Wed, 15 Jan 2020 22:32:54 +0200 Subject: [PATCH] Implement premade character templates. (#346) * Implement premade character templates. * Separate gear and spec templates. * Auto unequip previous gear. * Add healer specs and gear. * Add tank specs and gear. * Add custom npc scripts. --- .../repack/Custom-ADD_GM_ISLAND_VENDORS.sql | 84 +- .../Custom-REMOVE_GM_ISLAND_VENDORS.sql | 12 +- sql/migrations/20200111182648_world.sql | 1385 +++++++++++++++++ src/game/Chat/Chat.cpp | 8 + src/game/Chat/Chat.h | 2 + src/game/Commands/CharacterCommands.cpp | 98 ++ src/game/ObjectMgr.cpp | 321 ++++ src/game/ObjectMgr.h | 35 + src/game/Objects/Item.cpp | 24 +- src/game/Objects/Item.h | 3 - src/game/Objects/ItemPrototype.h | 3 + src/game/Objects/Object.cpp | 2 +- src/game/Objects/Player.cpp | 28 +- src/game/Objects/Player.h | 2 +- src/game/World.cpp | 2 + src/scripts/custom/custom_creatures.cpp | 68 +- 16 files changed, 2007 insertions(+), 70 deletions(-) create mode 100644 sql/migrations/20200111182648_world.sql diff --git a/sql/custom/repack/Custom-ADD_GM_ISLAND_VENDORS.sql b/sql/custom/repack/Custom-ADD_GM_ISLAND_VENDORS.sql index 3bcb94b45..8f5d7e496 100644 --- a/sql/custom/repack/Custom-ADD_GM_ISLAND_VENDORS.sql +++ b/sql/custom/repack/Custom-ADD_GM_ISLAND_VENDORS.sql @@ -1,37 +1,39 @@ -- GM Island Vendors for VMaNGOS by brotalnia. -- CREATURE_TEMPLATE INSERT INTO `creature_template` (`entry`, `patch`, `display_id1`, `display_id2`, `display_id3`, `display_id4`, `name`, `subname`, `gossip_menu_id`, `level_min`, `level_max`, `health_min`, `health_max`, `mana_min`, `mana_max`, `armor`, `faction`, `npc_flags`, `speed_walk`, `speed_run`, `scale`, `detection_range`, `call_for_help_range`, `leash_range`, `rank`, `xp_multiplier`, `dmg_min`, `dmg_max`, `dmg_school`, `attack_power`, `dmg_multiplier`, `base_attack_time`, `ranged_attack_time`, `unit_class`, `unit_flags`, `dynamic_flags`, `beast_family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `ranged_dmg_min`, `ranged_dmg_max`, `ranged_attack_power`, `type`, `type_flags`, `loot_id`, `pickpocket_loot_id`, `skinning_loot_id`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `spell_id1`, `spell_id2`, `spell_id3`, `spell_id4`, `spell_list_id`, `pet_spell_list_id`, `gold_min`, `gold_max`, `ai_name`, `movement_type`, `inhabit_type`, `civilian`, `racial_leader`, `regeneration`, `equipment_id`, `trainer_id`, `vendor_id`, `mechanic_immune_mask`, `school_immune_mask`, `flags_extra`, `script_name`) VALUES -(20008, 0, 15251, 15251, 0, 0, 'Teleportman', 'Player Test Realm', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 3, 0, 0, 1.5, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_teleport_npc'), -(90000, 0, 7249, 0, 0, 0, 'Druid Sets', 'Druid Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 11, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90001, 0, 15976, 0, 0, 0, 'Shaman Sets', 'Shaman Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 7, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90002, 0, 15834, 0, 0, 0, 'Mage Sets', 'Mage Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 8, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90003, 0, 11325, 0, 0, 0, 'Warlock Sets', 'Warlock Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 9, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90004, 0, 15725, 0, 0, 0, 'Priest Sets', 'Priest Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 5, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90005, 0, 16027, 0, 0, 0, 'Hunter Sets', 'Hunter Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 3, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90006, 0, 4617, 0, 0, 0, 'Rogue Sets', 'Rogue Trainer', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 4, 2, 0, 0, 0, 0, 4, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90007, 0, 15843, 0, 0, 0, 'Paladin Sets', 'Paladin Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 2, 2, 0, 0, 0, 0, 2, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90008, 0, 16012, 0, 0, 0, 'Warrior Sets', 'Warrior Trainer', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 21, 1.26, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 1, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90009, 0, 911, 0, 0, 0, 'Impy', 'Demon Trainer', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 4, 0.97, 1.14286, 0, 20, 5, 0, 0, 1, 12, 14, 0, 64, 1, 2000, 2000, 8, 2, 0, 0, 3, 0, 3, 0, 18.392, 25.289, 100, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(20008, 0, 15251, 15251, 0, 0, 'Teleportman', 'Player Test Realm', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 1, 1, 1.14286, 1.5, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_teleport_npc'), +(90000, 0, 7249, 0, 0, 0, 'Druid Sets', 'Druid Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 11, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90001, 0, 15976, 0, 0, 0, 'Shaman Sets', 'Shaman Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 7, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90002, 0, 15834, 0, 0, 0, 'Mage Sets', 'Mage Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 8, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90003, 0, 11325, 0, 0, 0, 'Warlock Sets', 'Warlock Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 9, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90004, 0, 15725, 0, 0, 0, 'Priest Sets', 'Priest Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 5, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90005, 0, 16027, 0, 0, 0, 'Hunter Sets', 'Hunter Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 8, 2, 0, 0, 0, 0, 3, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90006, 0, 4617, 0, 0, 0, 'Rogue Sets', 'Rogue Trainer', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 4, 2, 0, 0, 0, 0, 4, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90007, 0, 15843, 0, 0, 0, 'Paladin Sets', 'Paladin Trainer', 0, 60, 60, 1337, 1337, 420, 420, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 2, 2, 0, 0, 0, 0, 2, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90008, 0, 16012, 0, 0, 0, 'Warrior Sets', 'Warrior Trainer', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 1, 1, 110, 142, 0, 272, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 1, 0, 74.448, 102.366, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90009, 0, 911, 0, 0, 0, 'Impy', 'Demon Trainer', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 4, 1, 1.14286, 0, 20, 5, 0, 0, 1, 12, 14, 0, 64, 1, 2000, 2000, 8, 2, 0, 0, 3, 0, 3, 0, 18.392, 25.289, 100, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), (90010, 0, 2041, 0, 0, 0, 'Weapon Skills', 'Weapon Master', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 17, 1, 1.14286, 0, 20, 5, 0, 0, 1, 292, 333, 0, 226, 1, 1500, 2000, 1, 2, 0, 0, 2, 0, 0, 0, 55.36, 76.12, 100, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90011, 0, 7211, 0, 0, 0, 'Melee Weapons', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90012, 0, 7213, 0, 0, 0, 'Ranged Weapons', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90013, 0, 15998, 0, 0, 0, 'Caster Weapons', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90014, 0, 7171, 0, 0, 0, 'Offhands', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90015, 0, 7206, 0, 0, 0, 'Offsets', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90016, 0, 7176, 0, 0, 0, 'Jewelry', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90017, 0, 7209, 0, 0, 0, 'Miscellaneous', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90018, 0, 7138, 0, 0, 0, 'Poisons', '', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 4, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90019, 0, 7993, 0, 0, 0, 'Trump', 'Auctioneer', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 4096, 1.1, 1.14286, 0, 20, 5, 0, 0, 1, 77, 92, 0, 226, 1, 2000, 2000, 1, 36864, 0, 0, 0, 0, 0, 0, 61.9, 83.6, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90020, 0, 7337, 0, 0, 0, 'Scrooge', 'Banker', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 256, 1.1, 1.14286, 0, 20, 5, 0, 0, 1, 96, 125, 0, 248, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 70.664, 97.163, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90021, 0, 9284, 0, 0, 0, 'Harambe', 'Stable Master', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 8192, 1.08, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90022, 0, 16075, 0, 0, 0, 'Mounts', 'Riding Trainer', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 21, 0.96, 1.14286, 0, 20, 5, 0, 0, 1, 9, 13, 0, 62, 1, 2000, 2000, 1, 2, 0, 0, 1, 0, 0, 0, 16.808, 23.111, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90023, 0, 3019, 0, 0, 0, 'Expert Training Dummy', '', 0, 60, 60, 1000000, 1000000, 0, 0, 3000, 914, 0, 0.91, 1.14286, 0, 20, 5, 0, 0, 1, 1, 2, 0, 0, 1, 2000, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 17, 0, 64, 'custom_npc_training_dummy'), -(90024, 0, 3019, 0, 0, 0, 'Heroic Training Dummy', '', 0, 63, 63, 1000000, 1000000, 0, 0, 5000, 914, 0, 0.91, 1.14286, 0, 20, 5, 0, 3, 1, 1, 2, 0, 0, 1, 2000, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 17, 0, 64, 'custom_npc_training_dummy'), -(90025, 0, 3019, 0, 0, 0, 'Apprentice Training Dummy', '', 0, 1, 1, 1000000, 1000000, 0, 0, 100, 914, 0, 0.91, 1.14286, 0, 20, 5, 0, 0, 1, 1, 2, 0, 0, 1, 2000, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 17, 0, 64, 'custom_npc_training_dummy'), -(90026, 0, 7209, 0, 0, 0, 'Frost Resistance', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 1, 20, 5, 0, 1, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90027, 0, 7209, 0, 0, 0, 'Enchants 1', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1.08, 1.14286, 1, 20, 5, 0, 1, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), -(90028, 0, 7209, 0, 0, 0, 'Enchants 2', '', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 3, 0, 0, 1, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_enchant_npc'), -(90029, 0, 7209, 0, 0, 0, 'Professions', '', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 3, 0, 0, 1, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_professions_npc'); +(90011, 0, 7211, 0, 0, 0, 'Melee Weapons', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90012, 0, 7213, 0, 0, 0, 'Ranged Weapons', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90013, 0, 15998, 0, 0, 0, 'Caster Weapons', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90014, 0, 7171, 0, 0, 0, 'Offhands', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90015, 0, 7206, 0, 0, 0, 'Offsets', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90016, 0, 7176, 0, 0, 0, 'Jewelry', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90017, 0, 7209, 0, 0, 0, 'Miscellaneous', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90018, 0, 7138, 0, 0, 0, 'Poisons', '', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 4, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90019, 0, 7993, 0, 0, 0, 'Trump', 'Auctioneer', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 4096, 1, 1.14286, 0, 20, 5, 0, 0, 1, 77, 92, 0, 226, 1, 2000, 2000, 1, 36864, 0, 0, 0, 0, 0, 0, 61.9, 83.6, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90020, 0, 7337, 0, 0, 0, 'Scrooge', 'Banker', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 256, 1, 1.14286, 0, 20, 5, 0, 0, 1, 96, 125, 0, 248, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 70.664, 97.163, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90021, 0, 9284, 0, 0, 0, 'Harambe', 'Stable Master', 0, 60, 60, 420, 420, 0, 0, 3252, 35, 8192, 1, 1.14286, 0, 20, 5, 0, 0, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90022, 0, 16075, 0, 0, 0, 'Mounts', 'Riding Trainer', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 21, 1, 1.14286, 0, 20, 5, 0, 0, 1, 9, 13, 0, 62, 1, 2000, 2000, 1, 2, 0, 0, 1, 0, 0, 0, 16.808, 23.111, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90023, 0, 3019, 0, 0, 0, 'Expert Training Dummy', '', 0, 60, 60, 1000000, 1000000, 0, 0, 3000, 914, 0, 1, 1.14286, 0, 20, 5, 0, 0, 1, 1, 2, 0, 0, 1, 2000, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 17, 0, 64, 'custom_npc_training_dummy'), +(90024, 0, 3019, 0, 0, 0, 'Heroic Training Dummy', '', 0, 63, 63, 1000000, 1000000, 0, 0, 5000, 914, 0, 1, 1.14286, 0, 20, 5, 0, 3, 1, 1, 2, 0, 0, 1, 2000, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 17, 0, 64, 'custom_npc_training_dummy'), +(90025, 0, 3019, 0, 0, 0, 'Apprentice Training Dummy', '', 0, 1, 1, 1000000, 1000000, 0, 0, 100, 914, 0, 1, 1.14286, 0, 20, 5, 0, 0, 1, 1, 2, 0, 0, 1, 2000, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 17, 0, 64, 'custom_npc_training_dummy'), +(90026, 0, 7209, 0, 0, 0, 'Frost Resistance', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 1, 20, 5, 0, 1, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90027, 0, 7209, 0, 0, 0, 'Enchants 1', '', 0, 60, 60, 1337, 1337, 0, 0, 3252, 35, 16388, 1, 1.14286, 1, 20, 5, 0, 1, 1, 42, 53, 0, 122, 1, 2000, 2000, 1, 2, 0, 0, 0, 0, 0, 0, 45.144, 62.073, 100, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 64, ''), +(90028, 0, 7209, 0, 0, 0, 'Enchants 2', '', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 1, 1, 1.14286, 1, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_enchant_npc'), +(90029, 0, 7209, 0, 0, 0, 'Professions', '', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 1, 1, 1.14286, 1, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_professions_npc'), +(90030, 0, 7217, 0, 0, 0, 'Premade Gear', '', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 1, 1, 1.14286, 1, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_premade_gear_npc'), +(90031, 0, 7217, 0, 0, 0, 'Premade Specs', '', 0, 50, 50, 4000, 5000, 200, 300, 200, 35, 1, 1, 1.14286, 1, 20, 5, 0, 1, 1, 687, 967, 0, 226, 1, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 0, 0, 3, 0, 0, 0, 0, 0, 2, 'custom_premade_spec_npc'); -- NPC_TRAINER INSERT INTO `npc_trainer` (`entry`, `spell`, `spellcost`, `reqskill`, `reqskillvalue`, `reqlevel`) VALUES (90000, 499, 0, 0, 0, 20); INSERT INTO `npc_trainer` (`entry`, `spell`, `spellcost`, `reqskill`, `reqskillvalue`, `reqlevel`) VALUES (90000, 1151, 0, 0, 0, 26); @@ -2279,13 +2281,23 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `modelid`, `equipment_id`, `positio (2000024, 90024, 1, 0, 0, 16250.8, 16345.2, 13.9847, 4.68961, 120, 120, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10), (2000025, 90025, 1, 0, 0, 16197.8, 16288.6, 11.4417, 0.378564, 120, 120, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10), (2000026, 20008, 1, 0, 0, 16218.9, 16283.9, 13.1778, 6.19358, 120, 120, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10), -(2000027, 90026, 1, 0, 0, 16260.8, 16283.9, 14.8696, 5.26714, 25, 25, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10), -(2000028, 90027, 1, 0, 0, 16262.7, 16285.6, 14.4146, 5.55223, 25, 25, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10), -(2000029, 90028, 1, 0, 0, 16264.3, 16287.8, 14.1814, 5.77999, 25, 25, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10), -(2000030, 90029, 1, 0, 0, 16265.5, 16289.7, 14.3128, 5.94021, 25, 25, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10); +(2000027, 90026, 1, 0, 0, 16260.8, 16283.9, 14.8696, 5.26714, 120, 120, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10), +(2000028, 90027, 1, 0, 0, 16262.7, 16285.6, 14.4146, 5.55223, 120, 120, 0, 0, 100, 0, 0, 0, 0, 0, 0, 10), +(2000029, 90028, 1, 0, 0, 16264.3, 16287.8, 14.1814, 5.77999, 120, 120, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10), +(2000030, 90029, 1, 0, 0, 16265.5, 16289.7, 14.3128, 5.94021, 120, 120, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10), +(2000031, 90030, 1, 0, 0, 16281.7, 16296.9, 12.8599, 2.36683, 120, 120, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10), +(2000032, 90031, 1, 0, 0, 16283.5, 16297.3, 12.7021, 1.94665, 120, 120, 0, 0, 100, 100, 0, 0, 0, 0, 0, 10); -- NPC_TEXT INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (90000, 99990, 1); INSERT INTO `broadcast_text` (`ID`, `MaleText`, `FemaleText`) VALUES (99990, 'Greetings $N. Enjoying the vendors?\r\n\r\nVisit my channel for more fun stuff:\r\nwww.youtube.com/brotalnia', 'Greetings $N. Enjoying the vendors?\r\n\r\nVisit my channel for more fun stuff:\r\nwww.youtube.com/brotalnia'); +INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (90001, 99991, 1); +INSERT INTO `broadcast_text` (`ID`, `MaleText`, `FemaleText`) VALUES (99991, 'What would you like to enchant?', 'What would you like to enchant?'); +INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (90002, 99992, 1); +INSERT INTO `broadcast_text` (`ID`, `MaleText`, `FemaleText`) VALUES (99992, 'Select a profession to learn all recipes.', 'Select a profession to learn all recipes.'); +INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (90003, 99993, 1); +INSERT INTO `broadcast_text` (`ID`, `MaleText`, `FemaleText`) VALUES (99993, 'Select the premade gear template you want to equip.', 'Select premade gear template you want to equip.'); +INSERT INTO `npc_text` (`ID`, `BroadcastTextID0`, `Probability0`) VALUES (90004, 99994, 1); +INSERT INTO `broadcast_text` (`ID`, `MaleText`, `FemaleText`) VALUES (99994, 'Select the premade spec template you want to apply.', 'Select premade spec template you want to apply.'); -- NPC_GOSSIP INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000000, 90000); INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000001, 90000); @@ -2298,3 +2310,7 @@ INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000007, 90000); INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000008, 90000); INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000010, 90000); INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000022, 90000); +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000029, 90001); +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000030, 90002); +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000031, 90003); +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (2000032, 90004); diff --git a/sql/custom/repack/Custom-REMOVE_GM_ISLAND_VENDORS.sql b/sql/custom/repack/Custom-REMOVE_GM_ISLAND_VENDORS.sql index 7dcd39eee..1f41daf3d 100644 --- a/sql/custom/repack/Custom-REMOVE_GM_ISLAND_VENDORS.sql +++ b/sql/custom/repack/Custom-REMOVE_GM_ISLAND_VENDORS.sql @@ -1,8 +1,8 @@ -DELETE FROM `creature_template` WHERE `entry` BETWEEN 90000 AND 90030; +DELETE FROM `creature_template` WHERE `entry` BETWEEN 90000 AND 90031; DELETE FROM `creature_template` WHERE `entry`=20008; DELETE FROM `npc_trainer` WHERE `entry` BETWEEN 90000 AND 90022; -DELETE FROM `npc_vendor` WHERE `entry` BETWEEN 90000 AND 90030; -DELETE FROM `creature` WHERE (`id` BETWEEN 90000 AND 90030) || (`id`=20008); -DELETE FROM `npc_text` WHERE `ID`=90000; -DELETE FROM `npc_gossip` WHERE `textid`=90000; -DELETE FROM `broadcast_text` WHERE `ID`=99990; \ No newline at end of file +DELETE FROM `npc_vendor` WHERE `entry` BETWEEN 90000 AND 90031; +DELETE FROM `creature` WHERE (`id` BETWEEN 90000 AND 90031) || (`id`=20008); +DELETE FROM `npc_text` WHERE `ID` IN (90000, 90001, 90002, 90003, 90004); +DELETE FROM `npc_gossip` WHERE `textid` IN (90000, 90001, 90002, 90003, 90004); +DELETE FROM `broadcast_text` WHERE `ID` IN (99990, 99991, 99992, 99993, 99994); \ No newline at end of file diff --git a/sql/migrations/20200111182648_world.sql b/sql/migrations/20200111182648_world.sql new file mode 100644 index 000000000..411720621 --- /dev/null +++ b/sql/migrations/20200111182648_world.sql @@ -0,0 +1,1385 @@ +DROP PROCEDURE IF EXISTS add_migration; +delimiter ?? +CREATE PROCEDURE `add_migration`() +BEGIN +DECLARE v INT DEFAULT 1; +SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20200111182648'); +IF v=0 THEN +INSERT INTO `migrations` VALUES ('20200111182648'); +-- Add your query below. + + +CREATE TABLE IF NOT EXISTS `player_premade_item_template` ( + `entry` int(10) unsigned NOT NULL, + `class` tinyint(3) unsigned NOT NULL DEFAULT '0', + `level` tinyint(3) unsigned NOT NULL DEFAULT '60', + `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT '', + PRIMARY KEY (`entry`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +INSERT INTO `player_premade_item_template` (`entry`, `class`, `level`, `name`) VALUES +(1, 1, 60, 'dps-preraid-bis'), +(2, 2, 60, 'dps-preraid-bis'), +(3, 3, 60, 'dps-preraid-bis'), +(4, 4, 60, 'dps-preraid-bis'), +(5, 5, 60, 'dps-preraid-bis'), +(6, 7, 60, 'caster-dps-preraid-bis'), +(7, 8, 60, 'dps-preraid-bis'), +(8, 9, 60, 'dps-preraid-bis'), +(9, 11, 60, 'caster-dps-preraid-bis'), +(10, 2, 60, 'heal-preraid-bis'), +(11, 5, 60, 'heal-preraid-bis'), +(12, 7, 60, 'heal-preraid-bis'), +(13, 11, 60, 'heal-preraid-bis'), +(14, 1, 60, 'tank-preraid-bis'), +(15, 2, 60, 'tank-preraid-bis'), +(16, 11, 60, 'tank-preraid-bis'); + +CREATE TABLE IF NOT EXISTS `player_premade_spell_template` ( + `entry` int(10) unsigned NOT NULL, + `class` tinyint(3) unsigned NOT NULL DEFAULT '0', + `level` tinyint(3) unsigned NOT NULL DEFAULT '60', + `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT '', + PRIMARY KEY (`entry`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +INSERT INTO `player_premade_spell_template` (`entry`, `class`, `level`, `name`) VALUES +(1, 1, 60, 'fury-dw-pve'), +(2, 2, 60, 'retribution-pve'), +(3, 3, 60, 'mm-sv-pve'), +(4, 4, 60, 'combat-swords-pve'), +(5, 5, 60, 'shadow-pve'), +(6, 7, 60, 'elemental-pve'), +(7, 8, 60, 'arcane-power-frost-pve'), +(8, 9, 60, 'ds-ruin-pve'), +(9, 11, 60, 'balance-pve'), +(10, 2, 60, 'holy-pve'), +(11, 5, 60, 'holy-pve'), +(12, 7, 60, 'resto-pve'), +(13, 11, 60, 'resto-swiftmend-pve'), +(14, 1, 60, 'protection-pve'), +(15, 2, 60, 'protection-pve'), +(16, 11, 60, 'feral-bear-pve'); + +CREATE TABLE IF NOT EXISTS `player_premade_item` ( + `entry` int(10) unsigned NOT NULL, + `item` int(10) unsigned NOT NULL, + `enchant` int(10) unsigned NOT NULL DEFAULT '0', + `team` int(10) unsigned NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +CREATE TABLE IF NOT EXISTS `player_premade_spell` ( + `entry` int(10) unsigned NOT NULL, + `spell` int(10) unsigned NOT NULL, + PRIMARY KEY (`entry`,`spell`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- Fury Warrior Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(1, 12640, 1506, 0), -- Lionheart Helm +(1, 15411, 0, 0), -- Mark of Fordring +(1, 12927, 2488, 0), -- Truestrike Shoulders +(1, 13340, 849, 0), -- Cape of the Black Baron +(1, 11726, 1891, 0), -- Savage Gladiator Chain +(1, 12936, 1885, 0), -- Battleborn Armbraces +(1, 15063, 927, 0), -- Devilsaur Gauntlets +(1, 13142, 0, 0), -- Brigam Girdle +(1, 15062, 1506, 0), -- Devilsaur Leggings +(1, 12555, 911, 0), -- Battlechaser's Greaves +(1, 17713, 0, 0), -- Blackstone Ring +(1, 18500, 0, 0), -- Tarnished Elven Ring +(1, 11815, 0, 0), -- Hand of Justice +(1, 13965, 0, 0), -- Blackhand's Breadth +(1, 11684, 1900, 0), -- Ironfoe +(1, 15806, 1900, 0), -- Mirah's Song +(1, 12651, 664, 0); -- Blackcrow + +-- Dual Wield Fury Warrior PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(1, 71), +(1, 355), +(1, 676), +(1, 871), +(1, 1161), +(1, 1672), +(1, 1680), +(1, 1719), +(1, 2458), +(1, 2565), +(1, 2687), +(1, 3127), +(1, 5246), +(1, 6554), +(1, 7373), +(1, 11556), +(1, 11574), +(1, 11578), +(1, 11581), +(1, 11585), +(1, 11597), +(1, 11605), +(1, 12290), +(1, 12296), +(1, 12328), +(1, 12659), +(1, 12663), +(1, 12679), +(1, 12856), +(1, 12861), +(1, 12867), +(1, 12974), +(1, 13002), +(1, 13048), +(1, 16494), +(1, 18499), +(1, 20230), +(1, 20503), +(1, 20560), +(1, 20569), +(1, 20617), +(1, 20662), +(1, 23588), +(1, 23894), +(1, 25286), +(1, 25288), +(1, 25289); + +-- Retribution Paladin Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(2, 12640, 1506, 0), -- Lionheart Helm +(2, 15411, 0, 0), -- Mark of Fordring +(2, 12927, 2488, 0), -- Truestrike Shoulders +(2, 13340, 849, 0), -- Cape of the Black Baron +(2, 11726, 1891, 0), -- Savage Gladiator Chain +(2, 12936, 1885, 0), -- Battleborn Armbraces +(2, 13957, 927, 0), -- Gargoyle Slashers +(2, 13959, 0, 0), -- Omokk's Girth Restrainer +(2, 14554, 1506, 0), -- Cloudkeeper Legplates +(2, 14616, 1887, 0), -- Bloodmail Boots +(2, 13098, 0, 0), -- Painweaver Band +(2, 12548, 469, 0), -- Magni's Will +(2, 17713, 67, 0), -- Blackstone Ring +(2, 11815, 0, 0), -- Hand of Justice +(2, 13965, 0, 0), -- Blackhand's Breadth +(2, 12784, 1900, 0); -- Arcanite Reaper + +-- Retribution Paladin PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(2, 1020), +(2, 1038), +(2, 1044), +(2, 1152), +(2, 3127), +(2, 4987), +(2, 5573), +(2, 10278), +(2, 10293), +(2, 10301), +(2, 10308), +(2, 10310), +(2, 10314), +(2, 10318), +(2, 10326), +(2, 13819), +(2, 19746), +(2, 19752), +(2, 19896), +(2, 19898), +(2, 19900), +(2, 19943), +(2, 19979), +(2, 20048), +(2, 20059), +(2, 20066), +(2, 20104), +(2, 20113), +(2, 20121), +(2, 20142), +(2, 20164), +(2, 20193), +(2, 20208), +(2, 20218), +(2, 20266), +(2, 20271), +(2, 20293), +(2, 20308), +(2, 20337), +(2, 20349), +(2, 20357), +(2, 20729), +(2, 20773), +(2, 20920), +(2, 20924), +(2, 23214), +(2, 24239), +(2, 25290), +(2, 25291), +(2, 25292), +(2, 25780), +(2, 25890), +(2, 25895), +(2, 25916), +(2, 25918), +(2, 25957), +(2, 26023), +(2, 33391); + +-- Hunter Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(3, 13404, 1508, 0), -- Mask of the Unforgiven +(3, 15411, 0, 0), -- Mark of Fordring +(3, 12927, 2488, 0), -- Truestrike Shoulders +(3, 13340, 849, 0), -- Cape of the Black Baron +(3, 11726, 1891, 0), -- Savage Gladiator Chain +(3, 13211, 247, 0), -- Slashclaw Bracers +(3, 15062, 1508, 0), -- Devilsaur Leggings +(3, 15063, 1887, 0), -- Devilsaur Gauntlets +(3, 12634, 0, 0), -- Chiselbrand Girdle +(3, 16675, 1887, 0), -- Beaststalker's Boots +(3, 17713, 0, 0), -- Blackstone Ring +(3, 13098, 0, 0), -- Painweaver Band +(3, 13965, 0, 0), -- Blackhand's Breadth +(3, 11815, 0, 0), -- Hand of Justice +(3, 12940, 1897, 0), -- Dal'Rend's Sacred Charge +(3, 12939, 1897, 0), -- Dal'Rend's Tribal Guardian +(3, 2099, 664, 0); -- Dwarven Hand Cannon + +-- Marksmanship / Survival PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(3, 883), +(3, 982), +(3, 1002), +(3, 1462), +(3, 1494), +(3, 1515), +(3, 1543), +(3, 2641), +(3, 3045), +(3, 3127), +(3, 4195), +(3, 4196), +(3, 4197), +(3, 4198), +(3, 4199), +(3, 4200), +(3, 4201), +(3, 4202), +(3, 5048), +(3, 5049), +(3, 5116), +(3, 5118), +(3, 5149), +(3, 5384), +(3, 6197), +(3, 6991), +(3, 13159), +(3, 13161), +(3, 13163), +(3, 13544), +(3, 13809), +(3, 14266), +(3, 14268), +(3, 14271), +(3, 14273), +(3, 14277), +(3, 14280), +(3, 14287), +(3, 14295), +(3, 14305), +(3, 14311), +(3, 14317), +(3, 14325), +(3, 14327), +(3, 14923), +(3, 14924), +(3, 14925), +(3, 14926), +(3, 14927), +(3, 15632), +(3, 19153), +(3, 19160), +(3, 19258), +(3, 19263), +(3, 19297), +(3, 19420), +(3, 19422), +(3, 19431), +(3, 19490), +(3, 19500), +(3, 19503), +(3, 19511), +(3, 19553), +(3, 19878), +(3, 19879), +(3, 19880), +(3, 19882), +(3, 19883), +(3, 19884), +(3, 19885), +(3, 20190), +(3, 20904), +(3, 20906), +(3, 24283), +(3, 24295), +(3, 24440), +(3, 24441), +(3, 24463), +(3, 24464), +(3, 24475), +(3, 24476), +(3, 24477), +(3, 24478), +(3, 24490), +(3, 24494), +(3, 24495), +(3, 24508), +(3, 24509), +(3, 24510), +(3, 24511), +(3, 24512), +(3, 24513), +(3, 24514), +(3, 24515), +(3, 24516), +(3, 24547), +(3, 24556), +(3, 24557), +(3, 24558), +(3, 24559), +(3, 24560), +(3, 24561), +(3, 24562), +(3, 24631), +(3, 24632), +(3, 24691), +(3, 25294), +(3, 25295), +(3, 25296); + +-- Rogue Sword Spec Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(4, 13404, 1508, 0), -- Mask of the Unforgiven +(4, 15411, 0, 0), -- Mark of Fordring +(4, 12927, 2488, 0), -- Truestrike Shoulders +(4, 13340, 849, 0), -- Cape of the Black Baron +(4, 14637, 1891, 0), -- Cadaverous Armor +(4, 13120, 1885, 0), -- Deepfury Bracers +(4, 15062, 1508, 0), -- Devilsaur Leggings +(4, 15063, 1887, 0), -- Devilsaur Gauntlets +(4, 13252, 0, 0), -- Cloudrunner Girdle +(4, 12553, 1887, 0), -- Swiftwalker Boots +(4, 17713, 0, 0), -- Blackstone Ring +(4, 13098, 0, 0), -- Painweaver Band +(4, 11815, 0, 0), -- Hand of Justice +(4, 13965, 0, 0), -- Blackhand's Breadth +(4, 12940, 1897, 0), -- Dal'Rend's Sacred Charge +(4, 12939, 1900, 0), -- Dal'Rend's Tribal Guardian +(4, 12651, 664, 0); -- Blackcrow + +-- Combat Swords Rogue PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(4, 921), +(4, 1725), +(4, 1769), +(4, 1787), +(4, 1804), +(4, 1833), +(4, 1842), +(4, 1857), +(4, 1860), +(4, 2094), +(4, 2836), +(4, 2842), +(4, 3127), +(4, 3421), +(4, 5277), +(4, 6510), +(4, 6774), +(4, 8643), +(4, 11198), +(4, 11269), +(4, 11275), +(4, 11286), +(4, 11290), +(4, 11294), +(4, 11297), +(4, 11300), +(4, 11305), +(4, 11343), +(4, 11400), +(4, 13230), +(4, 13712), +(4, 13750), +(4, 13792), +(4, 13845), +(4, 13852), +(4, 13863), +(4, 13872), +(4, 13875), +(4, 13877), +(4, 13964), +(4, 14137), +(4, 14142), +(4, 14159), +(4, 14161), +(4, 14167), +(4, 14179), +(4, 18429), +(4, 25300), +(4, 25302), +(4, 25347), +(4, 30920); + +-- Shadow Priest Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(5, 14111, 1509, 0), -- Felcloth Hood +(5, 12103, 0, 0), -- Star of Mystaria +(5, 14112, 2488, 0), -- Felcloth Shoulders +(5, 15421, 1888, 0), -- Shroud of the Exile +(5, 14136, 1891, 0), -- Robe of Winter Night +(5, 11766, 1883, 0), -- Flameweave Cuffs of Shadow Wrath +(5, 13170, 1509, 0), -- Skyshroud Leggings +(5, 13253, 930, 0), -- Hands of Power +(5, 11662, 0, 0), -- Ban'thok Sash +(5, 11822, 911, 0), -- Omnicast Boots +(5, 12543, 0, 469), -- Songstone of Ironforge +(5, 12545, 0, 67), -- Eye of Orgrimmar +(5, 13001, 0, 0), -- Maiden's Circle +(5, 12930, 0, 0), -- Briarwood Reed +(5, 11832, 0, 0), -- Burst of Knowledge +(5, 13349, 2504, 0), -- Scepter of the Unholy +(5, 11904, 0, 0), -- Spirit of Aquementas +(5, 13396, 0, 0); -- Skul's Ghastly Touch + +-- Shadow Priest PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(5, 528), +(5, 552), +(5, 988), +(5, 1706), +(5, 2053), +(5, 6064), +(5, 9485), +(5, 10876), +(5, 10890), +(5, 10894), +(5, 10901), +(5, 10909), +(5, 10912), +(5, 10917), +(5, 10934), +(5, 10938), +(5, 10942), +(5, 10947), +(5, 10952), +(5, 10953), +(5, 10958), +(5, 14523), +(5, 14528), +(5, 14751), +(5, 14767), +(5, 14769), +(5, 14777), +(5, 14783), +(5, 15261), +(5, 15286), +(5, 15310), +(5, 15317), +(5, 15320), +(5, 15330), +(5, 15334), +(5, 15338), +(5, 15473), +(5, 17325), +(5, 18807), +(5, 20770), +(5, 21564), +(5, 25314), +(5, 25315), +(5, 25316), +(5, 27683); + +-- Elemental Shaman Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(6, 12752, 2544, 0), -- Cap of the Scarlet Savant +(6, 12103, 0, 0), -- Star of Mystaria +(6, 13133, 2488, 0), -- Drakesfire Epaulets +(6, 11623, 1888, 0), -- Spritecaster Cape +(6, 12624, 1891, 0), -- Wildthorn Mail +(6, 11765, 1883, 0), -- Pyremail Wristguards of Nature's Wrath +(6, 13170, 2544, 0), -- Skyshroud Leggings +(6, 13253, 930, 0), -- Hands of Power +(6, 11662, 0, 0), -- Ban'thok Sash +(6, 13954, 911, 0), -- Verdant Footpads +(6, 13001, 0, 0), -- Maiden's Circle +(6, 12545, 0, 67), -- Eye of Orgrimmar +(6, 11824, 0, 469), -- Cyclopean Band +(6, 12930, 0, 0), -- Briarwood Reed +(6, 13968, 0, 0), -- Eye of the Beast +(6, 13161, 2504, 0); -- Trindlehaven Staff + +-- Elemental Shaman PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(6, 131), +(6, 526), +(6, 546), +(6, 556), +(6, 2484), +(6, 2645), +(6, 2870), +(6, 6196), +(6, 6495), +(6, 8012), +(6, 8143), +(6, 8166), +(6, 8170), +(6, 8177), +(6, 10408), +(6, 10414), +(6, 10428), +(6, 10432), +(6, 10438), +(6, 10463), +(6, 10468), +(6, 10473), +(6, 10479), +(6, 10497), +(6, 10538), +(6, 10587), +(6, 10601), +(6, 10605), +(6, 10614), +(6, 10623), +(6, 11315), +(6, 15112), +(6, 15208), +(6, 16089), +(6, 16108), +(6, 16112), +(6, 16120), +(6, 16161), +(6, 16164), +(6, 16166), +(6, 16189), +(6, 16198), +(6, 16209), +(6, 16217), +(6, 16221), +(6, 16224), +(6, 16316), +(6, 16342), +(6, 16356), +(6, 16362), +(6, 16387), +(6, 16582), +(6, 20608), +(6, 20777), +(6, 25357), +(6, 25359), +(6, 25361), +(6, 25908), +(6, 28998), +(6, 29000), +(6, 29228); + +-- Frost Mage Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(7, 14332, 1509, 0), -- Eternal Crown +(7, 12103, 0, 0), -- Star of Mystaria +(7, 11782, 2488, 0), -- Boreal Mantle +(7, 13386, 1888, 0), -- Archivist Cape +(7, 14152, 1891, 0), -- Robe of the Archmage +(7, 11766, 1883, 0), -- Flameweave Cuffs +(7, 13170, 1509, 0), -- Skyshroud Leggings +(7, 13253, 930, 0), -- Hands of Power +(7, 11662, 0, 0), -- Ban'thok Sash +(7, 11822, 911, 0), -- Omnicast Boots +(7, 942, 0, 0), -- Freezing Band +(7, 942, 0, 0), -- Freezing Band +(7, 12930, 0, 0), -- Briarwood Reed +(7, 13968, 0, 0), -- Eye of the Beast +(7, 13964, 2443, 0), -- Witchblade +(7, 10796, 0, 0), -- Drakestone +(7, 13938, 0, 0); -- Bonecreeper Stylus + +-- Arcane Power / Frost Mage PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(7, 130), +(7, 475), +(7, 759), +(7, 1953), +(7, 2139), +(7, 2855), +(7, 3552), +(7, 3561), +(7, 3562), +(7, 3565), +(7, 7301), +(7, 10053), +(7, 10054), +(7, 10059), +(7, 10139), +(7, 10157), +(7, 10161), +(7, 10170), +(7, 10174), +(7, 10187), +(7, 10193), +(7, 10199), +(7, 10202), +(7, 10207), +(7, 10216), +(7, 10220), +(7, 10225), +(7, 10230), +(7, 11416), +(7, 11419), +(7, 12042), +(7, 12043), +(7, 12051), +(7, 12469), +(7, 12503), +(7, 12519), +(7, 12577), +(7, 12592), +(7, 12826), +(7, 12840), +(7, 12953), +(7, 15053), +(7, 15060), +(7, 16757), +(7, 16766), +(7, 18464), +(7, 22783), +(7, 23028), +(7, 25304), +(7, 25306), +(7, 25345), +(7, 28272), +(7, 28574), +(7, 28609), +(7, 28612), +(7, 29440), +(7, 29446); + +-- Warlock Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(8, 12752, 1509, 0), -- Cap of the Scarlet Savant +(8, 12103, 0, 0), -- Star of Mystaria +(8, 14112, 2488, 0), -- Felcloth Shoulders +(8, 10249, 1888, 0), -- Master's Cloak +(8, 14153, 1891, 0), -- Robe of the Void +(8, 10248, 1883, 0), -- Master's Bracers +(8, 13170, 1509, 0), -- Skyshroud Leggings +(8, 14146, 930, 0), -- Gloves of Spell Mastery +(8, 11662, 0, 0), -- Ban'thok Sash +(8, 11822, 911, 0), -- Omnicast Boots +(8, 12543, 0, 469), -- Songstone of Ironforge +(8, 12545, 0, 67), -- Eye of Orgrimmar +(8, 13001, 0, 0), -- Maiden's Circle +(8, 13968, 0, 0), -- Eye of the Beast +(8, 12930, 0, 0), -- Briarwood Reed +(8, 17719, 0, 0), -- Inventor's Focal Sword +(8, 10796, 0, 0), -- Drakestone +(8, 13396, 0, 0); -- Skul's Ghastly Touch + +-- Demonic Sacrifice / Ruin Warlock PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(8, 126), +(8, 132), +(8, 603), +(8, 688), +(8, 691), +(8, 696), +(8, 697), +(8, 698), +(8, 712), +(8, 2970), +(8, 5500), +(8, 5697), +(8, 5784), +(8, 6215), +(8, 11675), +(8, 11678), +(8, 11684), +(8, 11689), +(8, 11695), +(8, 11700), +(8, 11703), +(8, 11708), +(8, 11713), +(8, 11717), +(8, 11719), +(8, 11722), +(8, 11726), +(8, 11730), +(8, 11735), +(8, 11743), +(8, 17728), +(8, 17779), +(8, 17792), +(8, 17803), +(8, 17814), +(8, 17862), +(8, 17918), +(8, 17923), +(8, 17924), +(8, 17926), +(8, 17928), +(8, 17953), +(8, 17959), +(8, 18134), +(8, 18175), +(8, 18183), +(8, 18647), +(8, 18693), +(8, 18701), +(8, 18707), +(8, 18708), +(8, 18710), +(8, 18751), +(8, 18771), +(8, 18788), +(8, 18871), +(8, 20757), +(8, 23161), +(8, 25307), +(8, 25309), +(8, 25311), +(8, 28610), +(8, 33391); + +-- Balance Druid Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(9, 10504, 1509, 0), -- Green Lens +(9, 12103, 0, 0), -- Star of Mystaria +(9, 13013, 2488, 0), -- Elder Wizard's Mantle +(9, 11623, 1888, 0), -- Spritecaster Cape +(9, 11924, 1891, 0), -- Robes of the Royal Crown +(9, 11766, 1883, 0), -- Flameweave Cuffs +(9, 13170, 1509, 0), -- Skyshroud Leggings +(9, 13253, 930, 0), -- Hands of Power +(9, 11662, 0, 0), -- Ban'thok Sash +(9, 11822, 911, 0), -- Omnicast Boots +(9, 12543, 0, 469), -- Songstone of Ironforge +(9, 12545, 0, 67), -- Eye of Orgrimmar +(9, 13001, 0, 0), -- Maiden's Circle +(9, 12930, 0, 0), -- Briarwood Reed +(9, 13968, 0, 0), -- Eye of the Beast +(9, 13964, 0, 0), -- Witchblade +(9, 10796, 0, 0); -- Drakestone + +-- Balance Druid PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(9, 768), +(9, 783), +(9, 1066), +(9, 2782), +(9, 2893), +(9, 5209), +(9, 5225), +(9, 5229), +(9, 6795), +(9, 8983), +(9, 9634), +(9, 9821), +(9, 9827), +(9, 9830), +(9, 9835), +(9, 9846), +(9, 9850), +(9, 9853), +(9, 9858), +(9, 9863), +(9, 9867), +(9, 9881), +(9, 9885), +(9, 9892), +(9, 9896), +(9, 9898), +(9, 9901), +(9, 9904), +(9, 9907), +(9, 9908), +(9, 9910), +(9, 9912), +(9, 9913), +(9, 16820), +(9, 16825), +(9, 16835), +(9, 16847), +(9, 16880), +(9, 16901), +(9, 16913), +(9, 16919), +(9, 16926), +(9, 17055), +(9, 17068), +(9, 17108), +(9, 17249), +(9, 17329), +(9, 17402), +(9, 18658), +(9, 20719), +(9, 20748), +(9, 21850), +(9, 22812), +(9, 22829), +(9, 22896), +(9, 24858), +(9, 24977), +(9, 25297), +(9, 25298), +(9, 25299), +(9, 29166); + +-- Holy Paladin Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(10, 12633, 1509, 0), -- Whitesoul Helm +(10, 13141, 0, 0), -- Tooth of Gnarr +(10, 12625, 2488, 0), -- Dawnbringer Shoulders +(10, 11623, 1888, 0), -- Spritecaster Cape +(10, 13346, 1891, 0), -- Robes of the Exalted +(10, 13969, 1883, 0), -- Loomguard Armbraces +(10, 13170, 1509, 0), -- Skyshroud Leggings +(10, 12554, 930, 0), -- Hands of the Exalted Herald +(10, 14553, 0, 0), -- Sash of Mercy +(10, 13954, 911, 0), -- Verdant Footpads +(10, 16058, 0, 0), -- Fordring's Seal +(10, 13178, 0, 0), -- Rosewine Circle +(10, 11819, 0, 0), -- Second Wind +(10, 12930, 0, 0), -- Briarwood Reed +(10, 11923, 2505, 0), -- The Hammer of Grace +(10, 11928, 0, 0); -- Thaurissan's Royal Scepter +-- Holy Paladin PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(10, 1020), +(10, 1038), +(10, 1044), +(10, 1152), +(10, 3127), +(10, 4987), +(10, 5573), +(10, 10278), +(10, 10293), +(10, 10301), +(10, 10308), +(10, 10310), +(10, 10314), +(10, 10318), +(10, 10326), +(10, 13819), +(10, 19746), +(10, 19752), +(10, 19896), +(10, 19898), +(10, 19900), +(10, 19943), +(10, 19979), +(10, 20048), +(10, 20142), +(10, 20164), +(10, 20175), +(10, 20193), +(10, 20208), +(10, 20215), +(10, 20216), +(10, 20217), +(10, 20235), +(10, 20239), +(10, 20245), +(10, 20261), +(10, 20271), +(10, 20293), +(10, 20308), +(10, 20349), +(10, 20357), +(10, 20361), +(10, 20729), +(10, 20773), +(10, 20924), +(10, 20930), +(10, 23214), +(10, 24239), +(10, 25290), +(10, 25291), +(10, 25292), +(10, 25780), +(10, 25829), +(10, 25836), +(10, 25890), +(10, 25895), +(10, 25898), +(10, 25916), +(10, 25918), +(10, 33391); + +-- Priest Healing Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(11, 13102, 1509, 0), -- Cassandra's Grace +(11, 13141, 0, 0), -- Tooth of Gnarr +(11, 13013, 2488, 0), -- Elder Wizard's Mantle +(11, 13386, 1888, 0), -- Archivist Cape +(11, 14154, 1891, 0), -- Truefaith Vestments +(11, 13107, 1884, 0), -- Magiskull Cuffs +(11, 13170, 1509, 0), -- Skyshroud Leggings +(11, 12554, 930, 0), -- Hands of the Exalted Herald +(11, 12589, 0, 0), -- Dustfeather Sash +(11, 11822, 911, 0), -- Omnicast Boots +(11, 16058, 0, 0), -- Fordring's Seal +(11, 13001, 0, 0), -- Maiden's Circle +(11, 11819, 0, 0), -- Second Wind +(11, 12930, 0, 0), -- Briarwood Reed +(11, 11923, 2505, 0), -- The Hammer of Grace +(11, 11928, 0, 0), -- Thaurissan's Royal Scepter +(11, 13938, 0, 0); -- Bonecreeper Stylus +-- Holy Priest PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(11, 528), +(11, 552), +(11, 988), +(11, 1706), +(11, 2053), +(11, 6064), +(11, 9485), +(11, 10876), +(11, 10890), +(11, 10894), +(11, 10901), +(11, 10909), +(11, 10912), +(11, 10917), +(11, 10934), +(11, 10938), +(11, 10942), +(11, 10947), +(11, 10952), +(11, 10953), +(11, 10958), +(11, 14523), +(11, 14751), +(11, 14767), +(11, 14769), +(11, 14777), +(11, 14783), +(11, 14791), +(11, 15011), +(11, 15014), +(11, 15020), +(11, 15031), +(11, 15261), +(11, 15356), +(11, 15363), +(11, 18535), +(11, 20770), +(11, 21564), +(11, 25314), +(11, 25315), +(11, 25316), +(11, 27681), +(11, 27683), +(11, 27789), +(11, 27801), +(11, 27841); + +-- Restoration Shaman Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(12, 13216, 1509, 0), -- Crown of the Penitent +(12, 13141, 0, 0), -- Tooth of Gnarr +(12, 14548, 2488, 0), -- Royal Cap Spaulders +(12, 13386, 1888, 0), -- Archivist Cape +(12, 13346, 1891, 0), -- Robes of the Exalted +(12, 13969, 1883, 0), -- Loomguard Armbraces +(12, 11841, 1509, 0), -- Senior Designer's Pantaloons +(12, 12554, 930, 0), -- Hands of the Exalted Herald +(12, 14553, 0, 0), -- Sash of Mercy +(12, 11822, 911, 0), -- Omnicast Boots +(12, 16058, 0, 0), -- Fordring's Seal +(12, 13178, 0, 0), -- Rosewine Circle +(12, 12930, 0, 0), -- Briarwood Reed +(12, 11819, 0, 0), -- Second Wind +(12, 11923, 2505, 0), -- The Hammer of Grace +(12, 17718, 929, 0); -- Gizlock's Hypertech Buckler +-- Restoration Shaman PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(12, 131), +(12, 526), +(12, 546), +(12, 556), +(12, 2484), +(12, 2645), +(12, 2870), +(12, 6196), +(12, 6495), +(12, 8012), +(12, 8143), +(12, 8166), +(12, 8170), +(12, 8177), +(12, 10408), +(12, 10414), +(12, 10428), +(12, 10432), +(12, 10438), +(12, 10463), +(12, 10468), +(12, 10473), +(12, 10479), +(12, 10497), +(12, 10538), +(12, 10587), +(12, 10601), +(12, 10605), +(12, 10614), +(12, 10623), +(12, 11315), +(12, 15112), +(12, 15208), +(12, 16188), +(12, 16189), +(12, 16190), +(12, 16208), +(12, 16209), +(12, 16213), +(12, 16217), +(12, 16221), +(12, 16225), +(12, 16229), +(12, 16234), +(12, 16240), +(12, 16316), +(12, 16342), +(12, 16356), +(12, 16362), +(12, 16387), +(12, 17489), +(12, 20608), +(12, 20777), +(12, 25357), +(12, 25359), +(12, 25361), +(12, 25908), +(12, 29202), +(12, 29228); + +-- Restoration Druid Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(13, 13102, 1483, 0), -- Cassandra's Grace +(13, 13141, 0, 0), -- Tooth of Gnarr +(13, 15061, 2488, 0), -- Living Shoulders +(13, 13386, 1888, 0), -- Archivist Cape +(13, 13346, 1891, 0), -- Robes of the Exalted +(13, 13208, 1884, 0), -- Bleak Howler Armguards +(13, 12554, 930, 0), -- Hands of the Exalted Herald +(13, 14553, 0, 0), -- Sash of Mercy +(13, 11841, 1483, 0), -- Senior Designer's Pantaloons +(13, 13954, 911, 0), -- Verdant Footpads +(13, 13143, 0, 0), -- Mark of the Dragon Lord +(13, 13178, 0, 0), -- Rosewine Circle +(13, 12930, 0, 0), -- Briarwood Reed +(13, 11819, 0, 0), -- Second Wind +(13, 11923, 2505, 0), -- The Hammer of Grace +(13, 11928, 0, 0); -- Thaurissan's Royal Scepter +-- Swiftmend Restoration Druid PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(13, 768), +(13, 783), +(13, 1066), +(13, 2782), +(13, 2893), +(13, 5209), +(13, 5225), +(13, 5229), +(13, 6795), +(13, 8983), +(13, 9634), +(13, 9821), +(13, 9827), +(13, 9830), +(13, 9835), +(13, 9846), +(13, 9850), +(13, 9853), +(13, 9858), +(13, 9863), +(13, 9867), +(13, 9881), +(13, 9885), +(13, 9892), +(13, 9896), +(13, 9898), +(13, 9901), +(13, 9904), +(13, 9907), +(13, 9908), +(13, 9910), +(13, 9912), +(13, 9913), +(13, 16818), +(13, 16820), +(13, 16840), +(13, 17055), +(13, 17065), +(13, 17073), +(13, 17078), +(13, 17108), +(13, 17113), +(13, 17116), +(13, 17249), +(13, 17329), +(13, 17402), +(13, 18562), +(13, 18658), +(13, 20719), +(13, 20748), +(13, 21850), +(13, 22812), +(13, 22829), +(13, 22896), +(13, 24946), +(13, 24972), +(13, 24977), +(13, 25297), +(13, 25298), +(13, 25299), +(13, 29166); + +-- Protection Warrior Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(14, 12640, 1503, 0), -- Lionheart Helm +(14, 13091, 0, 0), -- Medallion of Grand Marshal Morris +(14, 16733, 2488, 0), -- Spaulders of Valor +(14, 13397, 1889, 0), -- Stoneskin Gargoyle Cape +(14, 11726, 1891, 0), -- Savage Gladiator Chain +(14, 16735, 1886, 0), -- Bracers of Valor +(14, 13072, 1887, 0), -- Stonegrip Gauntlets +(14, 13142, 0, 0), -- Brigam Girdle +(14, 14554, 1503, 0), -- Cloudkeeper Legplates +(14, 13259, 911, 0), -- Ribsteel Footguards +(14, 2246, 0, 0), -- Myrmidon's Signet +(14, 17713, 0, 0), -- Blackstone Ring +(14, 11815, 0, 0), -- Hand of Justice +(14, 17774, 0, 0), -- Mark of the Chosen +(14, 13015, 1900, 67), -- Serathil +(14, 15806, 1900, 469), -- Mirah's Song +(14, 12602, 929, 0), -- Draconian Deflector +(14, 12651, 664, 0); -- Blackcrow +-- Deep Protection Warrior PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(14, 71), +(14, 355), +(14, 676), +(14, 871), +(14, 1161), +(14, 1672), +(14, 1680), +(14, 1719), +(14, 2458), +(14, 2565), +(14, 2687), +(14, 3127), +(14, 5246), +(14, 6554), +(14, 7373), +(14, 11556), +(14, 11574), +(14, 11578), +(14, 11581), +(14, 11585), +(14, 11597), +(14, 11605), +(14, 12296), +(14, 12312), +(14, 12679), +(14, 12727), +(14, 12764), +(14, 12765), +(14, 12792), +(14, 12800), +(14, 12809), +(14, 12811), +(14, 12818), +(14, 12856), +(14, 12945), +(14, 12975), +(14, 16466), +(14, 16542), +(14, 18499), +(14, 20230), +(14, 20560), +(14, 20569), +(14, 20617), +(14, 20662), +(14, 23925), +(14, 25286), +(14, 25288), +(14, 25289); + +-- Protection Paladin Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(15, 871, 1900, 0), -- Flurry Axe +(15, 1168, 863, 0), -- Skullflame Shield +(15, 11746, 1503, 0), -- Golem Skull Helm +(15, 14623, 1503, 0), -- Deathbone Legguards +(15, 15413, 1891, 0), -- Ornate Adamantium Breastplate +(15, 14552, 2488, 0), -- Stockade Pauldrons +(15, 14622, 1887, 0), -- Deathbone Gauntlets +(15, 13951, 923, 0), -- Vigorsteel Vambraces +(15, 11930, 1889, 0), -- The Emperor's New Cape +(15, 13091, 0, 0), -- Medallion of Grand Marshal Morris +(15, 14621, 911, 0), -- Deathbone Sabatons +(15, 14620, 0, 0), -- Deathbone Girdle +(15, 11669, 0, 0), -- Naglering +(15, 15855, 0, 0), -- Ring of Protection +(15, 11810, 0, 0), -- Force of Will +(15, 17774, 0, 0); -- Mark of the Chosen +-- Mitigation Protection Paladin PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(15, 1020), +(15, 1038), +(15, 1044), +(15, 1152), +(15, 3127), +(15, 4987), +(15, 5573), +(15, 10278), +(15, 10293), +(15, 10301), +(15, 10308), +(15, 10310), +(15, 10314), +(15, 10318), +(15, 10326), +(15, 13819), +(15, 19746), +(15, 19752), +(15, 19896), +(15, 19898), +(15, 19900), +(15, 19943), +(15, 19979), +(15, 20063), +(15, 20100), +(15, 20105), +(15, 20137), +(15, 20142), +(15, 20147), +(15, 20150), +(15, 20164), +(15, 20193), +(15, 20261), +(15, 20271), +(15, 20293), +(15, 20308), +(15, 20332), +(15, 20349), +(15, 20357), +(15, 20470), +(15, 20729), +(15, 20773), +(15, 20914), +(15, 20924), +(15, 20928), +(15, 23214), +(15, 24239), +(15, 25290), +(15, 25291), +(15, 25292), +(15, 25780), +(15, 25890), +(15, 25895), +(15, 25899), +(15, 25916), +(15, 25918), +(15, 33391); + +-- Druid Tanking Pre Raid Bis +INSERT INTO `player_premade_item` (`entry`, `item`, `enchant`, `team`) VALUES +(16, 13404, 1508, 0), -- Mask of the Unforgiven +(16, 11755, 0, 0), -- Verek's Collar +(16, 12927, 2488, 0), -- Truestrike Shoulders +(16, 12551, 849, 0), -- Stoneshield Cloak +(16, 12757, 1891, 0), -- Breastplate of Bloodthirst +(16, 12966, 1886, 0), -- Blackmist Armguards +(16, 15063, 1887, 0), -- Devilsaur Gauntlets +(16, 14502, 0, 0), -- Frostbite Girdle +(16, 15062, 1508, 0), -- Devilsaur Leggings +(16, 14641, 1887, 0), -- Cadaverous Walkers +(16, 15855, 0, 0), -- Ring of Protection +(16, 12544, 0, 67), -- Thrall's Resolve +(16, 11669, 0, 469), -- Naglering +(16, 11811, 0, 0), -- Smoking Heart of the Mountain +(16, 13966, 0, 0), -- Mark of Tyranny +(16, 943, 2646, 0); -- Warden Staff +-- Feral Druid Bear Tank PvE +INSERT INTO `player_premade_spell` (`entry`, `spell`) VALUES +(16, 768), +(16, 783), +(16, 1066), +(16, 2782), +(16, 2893), +(16, 5209), +(16, 5225), +(16, 5229), +(16, 6795), +(16, 8983), +(16, 9634), +(16, 9821), +(16, 9827), +(16, 9830), +(16, 9835), +(16, 9846), +(16, 9850), +(16, 9853), +(16, 9858), +(16, 9863), +(16, 9867), +(16, 9881), +(16, 9885), +(16, 9892), +(16, 9896), +(16, 9898), +(16, 9901), +(16, 9904), +(16, 9907), +(16, 9908), +(16, 9910), +(16, 9912), +(16, 9913), +(16, 16864), +(16, 16906), +(16, 16933), +(16, 16938), +(16, 16944), +(16, 16951), +(16, 16961), +(16, 16975), +(16, 16979), +(16, 16999), +(16, 17007), +(16, 17061), +(16, 17082), +(16, 17249), +(16, 17329), +(16, 17392), +(16, 17402), +(16, 18658), +(16, 20719), +(16, 20748), +(16, 21850), +(16, 22812), +(16, 22829), +(16, 22896), +(16, 24894), +(16, 25297), +(16, 25298), +(16, 25299), +(16, 29166); + + +-- End of migration. +END IF; +END?? +delimiter ; +CALL add_migration(); +DROP PROCEDURE IF EXISTS add_migration; diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index d14c2d594..aa9372314 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -179,6 +179,13 @@ ChatCommand * ChatHandler::getCommandTable() { nullptr, 0, false, nullptr, "", nullptr } }; + static ChatCommand characterPremadeCommandTable[] = + { + { "gear", SEC_BASIC_ADMIN, false, &ChatHandler::HandleCharacterPremadeGearCommand, "", nullptr }, + { "spec", SEC_BASIC_ADMIN, false, &ChatHandler::HandleCharacterPremadeSpecCommand, "", nullptr }, + { nullptr, 0, false, nullptr, "", nullptr } + }; + static ChatCommand characterCommandTable[] = { { "deleted", SEC_GAMEMASTER, true, nullptr, "", characterDeletedCommandTable}, @@ -190,6 +197,7 @@ ChatCommand * ChatHandler::getCommandTable() { "race", SEC_BASIC_ADMIN, true, &ChatHandler::HandleCharacterChangeRaceCommand, "", nullptr }, { "skin", SEC_BASIC_ADMIN, true, &ChatHandler::HandleCharacterCopySkinCommand, "", nullptr }, { "fillflys", SEC_GAMEMASTER, true, &ChatHandler::HandleCharacterFillFlysCommand, "", nullptr }, + { "premade", SEC_BASIC_ADMIN, false, nullptr, "", characterPremadeCommandTable }, { "clean", SEC_ADMINISTRATOR, true, nullptr, "", characterCleanCommandTable }, { nullptr, 0, false, nullptr, "", nullptr } }; diff --git a/src/game/Chat/Chat.h b/src/game/Chat/Chat.h index 125ff0e4f..4517ccddd 100644 --- a/src/game/Chat/Chat.h +++ b/src/game/Chat/Chat.h @@ -321,6 +321,8 @@ class MANGOS_DLL_SPEC ChatHandler bool HandleCharacterChangeRaceCommand(char *args); bool HandleCharacterCopySkinCommand(char *args); bool HandleCharacterFillFlysCommand(char *args); + bool HandleCharacterPremadeGearCommand(char *args); + bool HandleCharacterPremadeSpecCommand(char *args); bool HandleFactionChangeItemsCommand(char *args); // bg bool HandleBGStatusCommand(char *args); diff --git a/src/game/Commands/CharacterCommands.cpp b/src/game/Commands/CharacterCommands.cpp index c3378dc85..9b844891b 100644 --- a/src/game/Commands/CharacterCommands.cpp +++ b/src/game/Commands/CharacterCommands.cpp @@ -1818,6 +1818,104 @@ bool ChatHandler::HandleCharacterHasItemCommand(char* args) return true; } +bool ChatHandler::HandleCharacterPremadeGearCommand(char* args) +{ + Player* pPlayer = GetSelectedPlayer(); + if (!pPlayer) + { + SendSysMessage(LANG_NO_CHAR_SELECTED); + return false; + } + + if (!*args) + { + PSendSysMessage("Listing available premade templates for %s:", pPlayer->GetName()); + for (auto itr : sObjectMgr.GetPlayerPremadeGearTemplates()) + { + if (itr.second.requiredClass == pPlayer->GetClass()) + { + PSendSysMessage("%u - %s", itr.first, itr.second.name.c_str()); + } + } + return true; + } + + uint32 entry = atoi(args); + + if (!entry) + { + std::string name = args; + for (auto itr : sObjectMgr.GetPlayerPremadeGearTemplates()) + { + if (itr.second.name == name && itr.second.requiredClass == pPlayer->GetClass()) + { + entry = itr.first; + break; + } + } + } + + if (!entry) + { + SendSysMessage("No matching premade player template found."); + return false; + } + + sObjectMgr.ApplyPremadeGearTemplateToPlayer(entry, pPlayer); + + PSendSysMessage("Premade template %u applied to player %s.", entry, pPlayer->GetName()); + return true; +} + +bool ChatHandler::HandleCharacterPremadeSpecCommand(char* args) +{ + Player* pPlayer = GetSelectedPlayer(); + if (!pPlayer) + { + SendSysMessage(LANG_NO_CHAR_SELECTED); + return false; + } + + if (!*args) + { + PSendSysMessage("Listing available premade templates for %s:", pPlayer->GetName()); + for (auto itr : sObjectMgr.GetPlayerPremadeSpecTemplates()) + { + if (itr.second.requiredClass == pPlayer->GetClass()) + { + PSendSysMessage("%u - %s", itr.first, itr.second.name.c_str()); + } + } + return true; + } + + uint32 entry = atoi(args); + + if (!entry) + { + std::string name = args; + for (auto itr : sObjectMgr.GetPlayerPremadeSpecTemplates()) + { + if (itr.second.name == name && itr.second.requiredClass == pPlayer->GetClass()) + { + entry = itr.first; + break; + } + } + } + + if (!entry) + { + SendSysMessage("No matching premade player template found."); + return false; + } + + sObjectMgr.ApplyPremadeSpecTemplateToPlayer(entry, pPlayer); + + PSendSysMessage("Premade template %u applied to player %s.", entry, pPlayer->GetName()); + return true; +} + bool ChatHandler::HandleCharacterChangeRaceCommand(char* args) { if (Player* pPlayer = GetSelectedPlayer()) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 73fe75125..f93b2aa4e 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -10870,3 +10870,324 @@ void ObjectMgr::GetAreaLocaleString(uint32 entry, int32 loc_idx, std::string* na *namePtr = al->Name[loc_idx]; } } + +void ObjectMgr::LoadPlayerPremadeTemplates() +{ + { + sLog.outString("Loading player premade gear templates ..."); + m_playerPremadeGearMap.clear(); + + // 0 1 2 3 + std::unique_ptr result(WorldDatabase.Query("SELECT `entry`, `class`, `level`, `name` FROM `player_premade_item_template`")); + + if (!result) + { + BarGoLink bar(1); + bar.step(); + + sLog.outString(">> Loaded 0 premade player templates. DB table `player_premade_template` is empty."); + return; + } + + BarGoLink bar(result->GetRowCount()); + + do + { + bar.step(); + auto fields = result->Fetch(); + + uint32 entry = fields[0].GetUInt32(); + uint8 requiredClass = fields[1].GetUInt8(); + uint8 level = fields[2].GetUInt8(); + std::string name = fields[3].GetCppString(); + + switch (requiredClass) + { + case CLASS_WARRIOR: + case CLASS_PALADIN: + case CLASS_HUNTER: + case CLASS_ROGUE: + case CLASS_PRIEST: + case CLASS_SHAMAN: + case CLASS_MAGE: + case CLASS_WARLOCK: + case CLASS_DRUID: + break; + default: + sLog.outErrorDb("Wrong class %hhu for entry %u in table `player_premade_template`", requiredClass, entry); + continue;; + } + + if (!(level >= 1 && level <= PLAYER_MAX_LEVEL)) + { + sLog.outErrorDb("Wrong level %hhu for entry %u in table `player_premade_template`", level, entry); + continue; + } + + PlayerPremadeGearTemplate& data = m_playerPremadeGearMap[entry]; + data.entry = entry; + data.requiredClass = requiredClass; + data.level = level; + data.name = name; + + } while (result->NextRow()); + + sLog.outString(">> Loaded " SIZEFMTD " premade player gear templates", m_playerPremadeGearMap.size()); + sLog.outString(); + } + + { + sLog.outString("Loading player premade items ..."); + // 0 1 2 3 + std::unique_ptr result(WorldDatabase.Query("SELECT `entry`, `item`, `enchant`, `team` FROM `player_premade_item`")); + + if (!result) + { + BarGoLink bar(1); + bar.step(); + + sLog.outString(">> Loaded 0 premade player items. DB table `player_premade_item` is empty."); + return; + } + + BarGoLink bar(result->GetRowCount()); + uint32 count = 0; + + do + { + bar.step(); + auto fields = result->Fetch(); + + uint32 entry = fields[0].GetUInt32(); + uint32 item = fields[1].GetUInt32(); + uint32 enchant = fields[2].GetUInt32(); + uint32 team = fields[3].GetUInt32(); + + auto itr = m_playerPremadeGearMap.find(entry); + if (itr == m_playerPremadeGearMap.end()) + { + sLog.outErrorDb("Wrong entry %u in table `player_premade_item`", entry); + continue; + } + + if (!GetItemPrototype(item)) + continue; + if (enchant && !sSpellItemEnchantmentStore.LookupEntry(enchant)) + continue; + + switch (team) + { + case TEAM_NONE: + case HORDE: + case ALLIANCE: + break; + default: + sLog.outErrorDb("Wrong team %u for entry %u in table `player_premade_item`", team, entry); + continue; + } + + count++; + itr->second.items.emplace_back(item, enchant, team); + } while (result->NextRow()); + + sLog.outString(">> Loaded %u premade player items", count); + sLog.outString(); + } + + { + sLog.outString("Loading player premade spec templates ..."); + m_playerPremadeSpecMap.clear(); + + // 0 1 2 3 + std::unique_ptr result(WorldDatabase.Query("SELECT `entry`, `class`, `level`, `name` FROM `player_premade_spell_template`")); + + if (!result) + { + BarGoLink bar(1); + bar.step(); + + sLog.outString(">> Loaded 0 premade player spec templates. DB table `player_premade_spell_template` is empty."); + return; + } + + BarGoLink bar(result->GetRowCount()); + + do + { + bar.step(); + auto fields = result->Fetch(); + + uint32 entry = fields[0].GetUInt32(); + uint8 requiredClass = fields[1].GetUInt8(); + uint8 level = fields[2].GetUInt8(); + std::string name = fields[3].GetCppString(); + + switch (requiredClass) + { + case CLASS_WARRIOR: + case CLASS_PALADIN: + case CLASS_HUNTER: + case CLASS_ROGUE: + case CLASS_PRIEST: + case CLASS_SHAMAN: + case CLASS_MAGE: + case CLASS_WARLOCK: + case CLASS_DRUID: + break; + default: + sLog.outErrorDb("Wrong class %hhu for entry %u in table `player_premade_template`", requiredClass, entry); + continue;; + } + + if (!(level >= 1 && level <= PLAYER_MAX_LEVEL)) + { + sLog.outErrorDb("Wrong level %hhu for entry %u in table `player_premade_template`", level, entry); + continue; + } + + PlayerPremadeSpecTemplate& data = m_playerPremadeSpecMap[entry]; + data.entry = entry; + data.requiredClass = requiredClass; + data.level = level; + data.name = name; + + } while (result->NextRow()); + + sLog.outString(">> Loaded " SIZEFMTD " premade player spec templates", m_playerPremadeSpecMap.size()); + sLog.outString(); + } + + { + sLog.outString("Loading player premade spells ..."); + // 0 1 + std::unique_ptr result(WorldDatabase.Query("SELECT `entry`, `spell` FROM `player_premade_spell`")); + + if (!result) + { + BarGoLink bar(1); + bar.step(); + + sLog.outString(">> Loaded 0 premade player spells. DB table `player_premade_spell` is empty."); + return; + } + + BarGoLink bar(result->GetRowCount()); + uint32 count = 0; + + do + { + bar.step(); + auto fields = result->Fetch(); + + uint32 entry = fields[0].GetUInt32(); + uint32 spell = fields[1].GetUInt32(); + + auto itr = m_playerPremadeSpecMap.find(entry); + if (itr == m_playerPremadeSpecMap.end()) + { + sLog.outErrorDb("Wrong entry %u in table `player_premade_spell`", entry); + continue; + } + + if (!sSpellMgr.GetSpellEntry(spell)) + continue; + + count++; + itr->second.spells.push_back(spell); + } while (result->NextRow()); + + sLog.outString(">> Loaded %u premade player spells", count); + sLog.outString(); + } +} + +void ObjectMgr::ApplyPremadeGearTemplateToPlayer(uint32 entry, Player* pPlayer) const +{ + auto itr = m_playerPremadeGearMap.find(entry); + if (itr == m_playerPremadeGearMap.end()) + { + sLog.outError("Attempt to apply non-existent premade template to player (%u)", entry); + return; + } + + if (pPlayer->GetClass() != itr->second.requiredClass) + { + sLog.outError("Attempt to apply premade template (%u) to a player with wrong class", entry); + return; + } + + if (pPlayer->GetLevel() != itr->second.level) + { + pPlayer->GiveLevel(itr->second.level); + pPlayer->InitTalentForLevel(); + pPlayer->SetUInt32Value(PLAYER_XP, 0); + } + + // Unequip current gear + for (int i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i) + pPlayer->AutoUnequipItemFromSlot(i); + + // Learn Dual Wield Specialization + if (pPlayer->GetClass() == CLASS_WARRIOR || pPlayer->GetClass() == CLASS_ROGUE) + if (!pPlayer->HasSpell(674)) + pPlayer->LearnSpell(674, false, false); + + for (auto item : itr->second.items) + { + if (!item.requiredTeam || (pPlayer->GetTeam() == item.requiredTeam)) + { + ItemPrototype const* pItem = GetItemPrototype(item.itemId); + + // Learn required profession + if (pItem->RequiredSkill && !pPlayer->HasSkill(pItem->RequiredSkill)) + pPlayer->SetSkill(pItem->RequiredSkill, pItem->RequiredSkillRank, 300); + + // Learn required proficiency + if (uint32 proficiencySpellId = pItem->GetProficiencySpell()) + if (!pPlayer->HasSpell(proficiencySpellId)) + pPlayer->LearnSpell(proficiencySpellId, false, false); + + pPlayer->StoreNewItemInBestSlots(item.itemId, 1, item.enchantId); + } + } +} + +void ObjectMgr::ApplyPremadeSpecTemplateToPlayer(uint32 entry, Player* pPlayer) const +{ + auto itr = m_playerPremadeSpecMap.find(entry); + if (itr == m_playerPremadeSpecMap.end()) + { + sLog.outError("Attempt to apply non-existent premade template to player (%u)", entry); + return; + } + + if (pPlayer->GetClass() != itr->second.requiredClass) + { + sLog.outError("Attempt to apply premade template (%u) to a player with wrong class", entry); + return; + } + + if (pPlayer->GetLevel() != itr->second.level) + { + pPlayer->GiveLevel(itr->second.level); + pPlayer->InitTalentForLevel(); + pPlayer->SetUInt32Value(PLAYER_XP, 0); + } + + // Learn Dual Wield Specialization + if (pPlayer->GetClass() == CLASS_WARRIOR || pPlayer->GetClass() == CLASS_ROGUE) + if (!pPlayer->HasSpell(674)) + pPlayer->LearnSpell(674, false, false); + + if (!itr->second.spells.empty()) + { + pPlayer->ResetTalents(true); + for (auto spellId : itr->second.spells) + { + uint32 const firstRankId = sSpellMgr.GetFirstSpellInChain(spellId); + if (firstRankId && firstRankId != spellId && GetTalentSpellPos(firstRankId)) + pPlayer->LearnSpell(firstRankId, false, true); + pPlayer->LearnSpell(spellId, false, (firstRankId == spellId && GetTalentSpellPos(firstRankId))); + } + } +} \ No newline at end of file diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 9ccd05c6e..1b62050e5 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -555,6 +555,32 @@ public: class PvPMaintenanceMaker; +struct PlayerPremadeItem +{ + PlayerPremadeItem(uint32 item, uint32 enchant, uint32 team) : itemId(item), enchantId(enchant), requiredTeam(team) {}; + uint32 itemId = 0; + uint32 enchantId = 0; + uint32 requiredTeam = 0; +}; +struct PlayerPremadeGearTemplate +{ + uint32 entry = 0; + uint8 level = 0; + uint8 requiredClass = 0; + std::string name; + std::vector items; +}; +struct PlayerPremadeSpecTemplate +{ + uint32 entry = 0; + uint8 level = 0; + uint8 requiredClass = 0; + std::string name; + std::vector spells; +}; +typedef std::unordered_map PlayerPremadeGearMap; +typedef std::unordered_map PlayerPremadeSpecMap; + class ObjectMgr { friend class PlayerDumpReader; @@ -1351,6 +1377,12 @@ class ObjectMgr void ResetOldMailCounter() { m_OldMailCounter = 0; } void IncrementOldMailCounter(uint32 count) { m_OldMailCounter += count; } + void LoadPlayerPremadeTemplates(); + void ApplyPremadeGearTemplateToPlayer(uint32 entry, Player* pPlayer) const; + void ApplyPremadeSpecTemplateToPlayer(uint32 entry, Player* pPlayer) const; + PlayerPremadeGearMap const& GetPlayerPremadeGearTemplates() const { return m_playerPremadeGearMap; } + PlayerPremadeSpecMap const& GetPlayerPremadeSpecTemplates() const { return m_playerPremadeSpecMap; } + protected: // first free id for selected id type @@ -1509,6 +1541,9 @@ class ObjectMgr CacheVendorItemMap m_CacheVendorItemMap; CacheTrainerSpellMap m_CacheTrainerTemplateSpellMap; CacheTrainerSpellMap m_CacheTrainerSpellMap; + + PlayerPremadeGearMap m_playerPremadeGearMap; + PlayerPremadeSpecMap m_playerPremadeSpecMap; }; #define sObjectMgr MaNGOS::Singleton::Instance() diff --git a/src/game/Objects/Item.cpp b/src/game/Objects/Item.cpp index 077f3ad42..ab2c0f3ad 100644 --- a/src/game/Objects/Item.cpp +++ b/src/game/Objects/Item.cpp @@ -594,7 +594,7 @@ Player* Item::GetOwner()const return sObjectMgr.GetPlayer(GetOwnerGuid()); } -uint32 Item::GetSkill() +uint32 ItemPrototype::GetProficiencySkill() const { static uint32 const item_weapon_skills[MAX_ITEM_SUBCLASS_WEAPON] = { @@ -610,35 +610,31 @@ uint32 Item::GetSkill() 0, SKILL_CLOTH, SKILL_LEATHER, SKILL_MAIL, SKILL_PLATE_MAIL, 0, SKILL_SHIELD, 0, 0, 0 }; - ItemPrototype const* proto = GetProto(); - - switch (proto->Class) + switch (Class) { case ITEM_CLASS_WEAPON: - if (proto->SubClass >= MAX_ITEM_SUBCLASS_WEAPON) + if (SubClass >= MAX_ITEM_SUBCLASS_WEAPON) return 0; else - return item_weapon_skills[proto->SubClass]; + return item_weapon_skills[SubClass]; case ITEM_CLASS_ARMOR: - if (proto->SubClass >= MAX_ITEM_SUBCLASS_ARMOR) + if (SubClass >= MAX_ITEM_SUBCLASS_ARMOR) return 0; else - return item_armor_skills[proto->SubClass]; + return item_armor_skills[SubClass]; default: return 0; } } -uint32 Item::GetSpell() +uint32 ItemPrototype::GetProficiencySpell() const { - ItemPrototype const* proto = GetProto(); - - switch (proto->Class) + switch (Class) { case ITEM_CLASS_WEAPON: - switch (proto->SubClass) + switch (SubClass) { case ITEM_SUBCLASS_WEAPON_AXE: return 196; @@ -673,7 +669,7 @@ uint32 Item::GetSpell() } return 0; case ITEM_CLASS_ARMOR: - switch (proto->SubClass) + switch (SubClass) { case ITEM_SUBCLASS_ARMOR_CLOTH: return 9078; diff --git a/src/game/Objects/Item.h b/src/game/Objects/Item.h index e042b2c64..9be7b93b8 100644 --- a/src/game/Objects/Item.h +++ b/src/game/Objects/Item.h @@ -298,9 +298,6 @@ class MANGOS_DLL_SPEC Item : public Object bool IsInBag() const { return m_container != nullptr; } bool IsEquipped() const; - uint32 GetSkill(); - uint32 GetSpell(); - // RandomPropertyId (signed but stored as unsigned) int32 GetItemRandomPropertyId() const { return GetInt32Value(ITEM_FIELD_RANDOM_PROPERTIES_ID); } uint32 GetItemSuffixFactor() const { return GetUInt32Value(ITEM_FIELD_PROPERTY_SEED); } diff --git a/src/game/Objects/ItemPrototype.h b/src/game/Objects/ItemPrototype.h index d9ce16020..1bb664c97 100644 --- a/src/game/Objects/ItemPrototype.h +++ b/src/game/Objects/ItemPrototype.h @@ -534,6 +534,9 @@ struct ItemPrototype bool IsWeapon() const { return Class == ITEM_CLASS_WEAPON; } bool IsRangedWeapon() const { return IsWeapon() && (InventoryType == INVTYPE_RANGED || InventoryType == INVTYPE_THROWN || InventoryType == INVTYPE_RANGEDRIGHT); } bool HasSignature() const { return GetMaxStackSize() == 1 && Class != ITEM_CLASS_CONSUMABLE && Class != ITEM_CLASS_QUEST && (Flags & ITEM_FLAG_NO_CREATOR) == 0 && ItemId != 6948; /*Hearthstone*/ } + + uint32 GetProficiencySkill() const; + uint32 GetProficiencySpell() const; }; // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform diff --git a/src/game/Objects/Object.cpp b/src/game/Objects/Object.cpp index fbbcfb8fc..d7241d9c7 100644 --- a/src/game/Objects/Object.cpp +++ b/src/game/Objects/Object.cpp @@ -3317,7 +3317,7 @@ uint32 WorldObject::GetWeaponSkillValue(WeaponAttackType attType, WorldObject co return GetSkillMaxForLevel(); // always maximized SKILL_FERAL_COMBAT in fact // weapon skill or (unarmed for base attack) - uint32 skill = item ? item->GetSkill() : SKILL_UNARMED; + uint32 skill = item ? item->GetProto()->GetProficiencySkill() : SKILL_UNARMED; // Daemon: pas en preBC ! // // in PvP use full skill instead current skill value diff --git a/src/game/Objects/Player.cpp b/src/game/Objects/Player.cpp index 9158b6b08..7d6377e65 100644 --- a/src/game/Objects/Player.cpp +++ b/src/game/Objects/Player.cpp @@ -798,7 +798,7 @@ bool Player::Create(uint32 guidlow, std::string const& name, uint8 race, uint8 c return true; } -bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) +bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount, uint32 enchantId) { DEBUG_LOG("STORAGE: Creating initial item, itemId = %u, count = %u", titem_id, titem_amount); @@ -810,7 +810,14 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) if (msg != EQUIP_ERR_OK) break; - EquipNewItem(eDest, titem_id, true); + if (Item* pItem = EquipNewItem(eDest, titem_id, true)) + { + if (enchantId) + { + pItem->ClearEnchantment(PERM_ENCHANTMENT_SLOT); + pItem->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchantId, 0, 0); + } + } AutoUnequipOffhandIfNeed(); --titem_amount; } @@ -824,7 +831,14 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) uint8 msg = CanStoreNewItem(INVENTORY_SLOT_BAG_0, NULL_SLOT, sDest, titem_id, titem_amount); if (msg == EQUIP_ERR_OK) { - StoreNewItem(sDest, titem_id, true, Item::GenerateItemRandomPropertyId(titem_id)); + if (Item* pItem = StoreNewItem(sDest, titem_id, true, Item::GenerateItemRandomPropertyId(titem_id))) + { + if (enchantId) + { + pItem->ClearEnchantment(PERM_ENCHANTMENT_SLOT); + pItem->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchantId, 0, 0); + } + } return true; // stored } @@ -5464,7 +5478,7 @@ void Player::UpdateWeaponSkill(WeaponAttackType attType) if (!tmpitem) UpdateSkill(SKILL_UNARMED, weapon_skill_gain); else if (tmpitem->GetProto()->SubClass != ITEM_SUBCLASS_WEAPON_FISHING_POLE) - UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain); + UpdateSkill(tmpitem->GetProto()->GetProficiencySkill(), weapon_skill_gain); break; } case OFF_ATTACK: @@ -5472,7 +5486,7 @@ void Player::UpdateWeaponSkill(WeaponAttackType attType) { Item* tmpitem = GetWeaponForAttack(attType, true, true); if (tmpitem) - UpdateSkill(tmpitem->GetSkill(), weapon_skill_gain); + UpdateSkill(tmpitem->GetProto()->GetProficiencySkill(), weapon_skill_gain); break; } } @@ -10061,7 +10075,7 @@ InventoryResult Player::CanUseItem(Item* pItem, bool not_loading) const if (msg != EQUIP_ERR_OK) return msg; - if (uint32 skill = pItem->GetSkill()) + if (uint32 skill = pProto->GetProficiencySkill()) { // Fist weapons use unarmed skill calculations, but we must query fist weapon skill presence to use this item if (pProto->SubClass == ITEM_SUBCLASS_WEAPON_FIST) @@ -19438,7 +19452,7 @@ uint32 Player::GetBaseWeaponSkillValue(WeaponAttackType attType) const return 0; // weapon skill or (unarmed for base attack) - uint32 skill = item ? item->GetSkill() : uint32(SKILL_UNARMED); + uint32 skill = item ? item->GetProto()->GetProficiencySkill() : uint32(SKILL_UNARMED); return GetSkillValuePure(skill); } diff --git a/src/game/Objects/Player.h b/src/game/Objects/Player.h index 346a19b91..348825671 100644 --- a/src/game/Objects/Player.h +++ b/src/game/Objects/Player.h @@ -1035,7 +1035,7 @@ class MANGOS_DLL_SPEC Player final: public Unit void AutoUnequipWeaponsIfNeed(); void AutoUnequipOffhandIfNeed(); void AutoUnequipItemFromSlot(uint32 slot); - bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count); + bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count, uint32 enchantId = 0); Item* StoreNewItemInInventorySlot(uint32 itemEntry, uint32 amount); void AutoStoreLoot(Loot& loot, bool broadcast = false, uint8 bag = NULL_BAG, uint8 slot = NULL_SLOT); void SetAmmo(uint32 item); diff --git a/src/game/World.cpp b/src/game/World.cpp index 9e0cc7853..81111ed51 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1737,6 +1737,8 @@ void World::SetInitialWorldSettings() sLog.outString("Loading spell group stack rules ..."); sSpellMgr.LoadSpellGroupStackRules(); + sObjectMgr.LoadPlayerPremadeTemplates(); + if (getConfig(CONFIG_BOOL_RESTORE_DELETED_ITEMS)) { sLog.outString("Restoring deleted items to players ..."); diff --git a/src/scripts/custom/custom_creatures.cpp b/src/scripts/custom/custom_creatures.cpp index b8f71a26d..876fcf656 100644 --- a/src/scripts/custom/custom_creatures.cpp +++ b/src/scripts/custom/custom_creatures.cpp @@ -610,7 +610,7 @@ bool GossipHello_EnchantNPC(Player* player, Creature* creature) player->ADD_GOSSIP_ITEM(5, "Mainhand", GOSSIP_SENDER_MAIN, EQUIPMENT_SLOT_MAINHAND); player->ADD_GOSSIP_ITEM(5, "Offhand", GOSSIP_SENDER_MAIN, EQUIPMENT_SLOT_OFFHAND); - player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); return true; } bool GossipSelect_EnchantNPC(Player* player, Creature* creature, uint32 sender, uint32 action) @@ -873,9 +873,7 @@ bool GossipHello_ProfessionNPC(Player* player, Creature* creature) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "Fishing", GOSSIP_SENDER_MAIN, 13); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, "Cooking", GOSSIP_SENDER_MAIN, 14); - player->PlayerTalkClass->SendGossipMenu(1, creature->GetGUID()); - - player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); return true; } void CompleteLearnProfession(Player *pPlayer, Creature *pCreature, SkillType skill) @@ -951,6 +949,56 @@ bool GossipSelect_ProfessionNPC(Player* player, Creature* creature, uint32 sende return true; } +/* +* Custom premade gear and spec scripts +*/ + +#define SPELL_LIGHTNING_VISUAL 24240 + +bool GossipHello_PremadeGearNPC(Player* player, Creature* creature) +{ + for (auto itr : sObjectMgr.GetPlayerPremadeGearTemplates()) + { + if (itr.second.requiredClass == player->GetClass()) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, itr.second.name.c_str(), GOSSIP_SENDER_MAIN, itr.first); + } + } + + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); + return true; +} + +bool GossipSelect_PremadeGearNPC(Player* player, Creature* creature, uint32 sender, uint32 action) +{ + player->SendSpellGo(player, SPELL_LIGHTNING_VISUAL); + sObjectMgr.ApplyPremadeGearTemplateToPlayer(action, player); + player->CLOSE_GOSSIP_MENU(); + return true; +} + +bool GossipHello_PremadeSpecNPC(Player* player, Creature* creature) +{ + for (auto itr : sObjectMgr.GetPlayerPremadeSpecTemplates()) + { + if (itr.second.requiredClass == player->GetClass()) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_INTERACT_2, itr.second.name.c_str(), GOSSIP_SENDER_MAIN, itr.first); + } + } + + player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); + return true; +} + +bool GossipSelect_PremadeSpecNPC(Player* player, Creature* creature, uint32 sender, uint32 action) +{ + player->SendSpellGo(player, SPELL_LIGHTNING_VISUAL); + sObjectMgr.ApplyPremadeSpecTemplateToPlayer(action, player); + player->CLOSE_GOSSIP_MENU(); + return true; +} + /* * Custom training dummy script */ @@ -1116,6 +1164,18 @@ void AddSC_custom_creatures() newscript->pGossipSelect = &GossipSelect_ProfessionNPC; newscript->RegisterSelf(false); + newscript = new Script; + newscript->Name = "custom_premade_gear_npc"; + newscript->pGossipHello = &GossipHello_PremadeGearNPC; + newscript->pGossipSelect = &GossipSelect_PremadeGearNPC; + newscript->RegisterSelf(false); + + newscript = new Script; + newscript->Name = "custom_premade_spec_npc"; + newscript->pGossipHello = &GossipHello_PremadeSpecNPC; + newscript->pGossipSelect = &GossipSelect_PremadeSpecNPC; + newscript->RegisterSelf(false); + newscript = new Script; newscript->Name = "custom_npc_training_dummy"; newscript->GetAI = &GetAI_npc_training_dummy;