From aceec683253c62293d1b94e365ffe2a2e8721e3c Mon Sep 17 00:00:00 2001 From: Dr-J Date: Fri, 12 Sep 2014 21:59:56 +0100 Subject: DB/Quest: The Demoniac Scryer Closes # 2610 Script for http://www.wowhead.com/quest=10838/the-demoniac-scryer --- sql/updates/world/2014_09_12_04_world_sai.sql | 98 +++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sql/updates/world/2014_09_12_04_world_sai.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_09_12_04_world_sai.sql b/sql/updates/world/2014_09_12_04_world_sai.sql new file mode 100644 index 00000000000..4021ea41d01 --- /dev/null +++ b/sql/updates/world/2014_09_12_04_world_sai.sql @@ -0,0 +1,98 @@ +DELETE FROM `gossip_menu_option` WHERE menu_id IN(8510,8524); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `OptionBroadcastTextID`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`, `BoxBroadcastTextID`) VALUES +(8510, 0, 0, 'Yes Scryer, You may possess me', 20008, 1, 1, 0, 0, 0, 0, NULL, 0); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (22258,22259,22273,22267,22366); + +UPDATE `spell_dbc` SET `Effect1`=28,`EffectMiscValueB1`=64 WHERE `Id`IN(38674,38675,38676,38677,38678,38679,38709,38681); + + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22258,22259,22273,22267,22366,2225800); + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(22258, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 80, 2225800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - On Spawn - Run Script'), +(22258, 0, 1, 2 ,62,0, 100, 0, 8510,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Demoniac Scryer - On Gossip Select - Close Gossip'), +(22258, 0, 2, 0, 61,0, 100, 0,0,0,0,0,85,38708,1,0,0,0,0,7,0,0,0,0,0,0,0,'Demoniac Scryer - On Gossip Select - Cast Demoniac Visitation'), +(22258, 0, 3, 7, 11,0, 100, 0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Demoniac Scryer - On Spawn - Set NPC Flags'), +(22258, 0, 4, 5, 7,0, 100, 0,0,0,0,0,11,38672,0,0,0,0,0,1,0,0,0,0,0,0,0,'Demoniac Scryer - On Evade - Cast Magic Sucker Device timer'), +(22258, 0, 5, 0, 61,0, 100, 0,0,0,0,0,11,38690,0,0,0,0,0,1,0,0,0,0,0,0,0,'Demoniac Scryer - On Evade - Cast Magic Sucker Device Bunny Appearance'), +(22258, 0, 6 ,0, 6, 0, 100, 0, 0, 0, 0, 0, 11, 38691, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - On Death - Cast Magic Sucker Device Despawner, Mob AE'), +(22258, 0, 7 ,8, 61, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - On Spawn - Disable Auto Attack'), +(22258, 0, 8 ,9, 61, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - On Death - Disable Combatmovement'), +(22258, 0, 9 ,0, 61, 0, 100, 0, 0, 0, 0, 0, 18, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - On Death - Disable Combatmovement'), +(22258, 0, 10 ,0, 64, 0, 100, 0, 0, 0, 0, 0, 98, 8510, 10643, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - On Death - Disable Combatmovement'), +(22366, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Visitation - On Just Summoned - Say'), +(22259, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 38683, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Wardling - On Just Summoned - Cast Magic Sucker Device Despawner, Mob'), +(22259, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Wardling - On Just Summoned - Say'), +(22259, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 7741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Wardling - On Just Summoned - Cast Summoned Demon'), +(22259, 0, 3, 4, 6, 0, 100, 0, 0, 0, 0, 0, 11, 38891, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Wardling - On Death - Cast Magic Sucker Device (Despawn Visual)'), +(22259, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Wardling - On Death - Despawn'), +(22259, 0, 5, 0, 8, 0, 100, 0, 38691, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hellfire Wardling - On Spellhit (Magic Sucker Device Despawner, Mob AE) - Despawn'), +(22273, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 38683, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fel Warden - On Just Summoned - Cast Magic Sucker Device Despawner, Mob'), +(22273, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fel Warden - On Just Summoned - Say'), +(22273, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 7741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fel Warden - On Just Summoned - Cast Summoned Demon'), +(22273, 0, 3, 0, 8, 0, 100, 0, 38691, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Fel Warden - On Spellhit (Magic Sucker Device Despawner, Mob AE) - Despawn'), +(22267, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 38719, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - On Just Summoned - Cast Magic Sucker Device Buttress Appearance'), +(22267, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 22258, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - On Just Summoned - Set Orientation'), +(22267, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 11, 30259, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - On Just Summoned - Cast Statue (dnd)'), +(22267, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 38721, 0, 0, 0, 0, 0, 19, 22258, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - On Just Summoned - Cast Magic Sucker Device Channel(dnd)'), +(22267, 0, 4, 0, 8, 0, 100, 0, 38691, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - On Spellhit (Magic Sucker Device Despawner, Mob AE) - Despawn'), +(22267, 0, 5, 3, 1, 0, 100, 0, 0, 0, 3000, 3000, 11, 38719, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - IC - Cast Magic Sucker Device Buttress Appearance'), +(22267, 0, 6, 3, 0, 0, 100, 0, 0, 0, 3000, 3000, 11, 38919, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Magic Sucker Device Buttress - OOC - Cast Magic Sucker Device Buttress Appearance'), + +(2225800, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38672, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Magic Sucker Device timer'), -- 15:36:21 +(2225800, 9, 1 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38690, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Magic Sucker Device Bunny Appearance'), -- 15:36:21 +(2225800, 9, 2 ,0, 0, 0, 100, 0, 8000, 8000, 0, 0, 11, 38681, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Spawner, Device'), -- 15:36:29 +(2225800, 9, 3 ,0, 0, 0, 100, 0, 7000, 7000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:36:36 * +(2225800, 9, 4 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:36:51 * +(2225800, 9, 5 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:37:06 * +(2225800, 9, 6 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38675, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Create Magic Sucker Device Buttress (N)'), -- 15:37:06 * +(2225800, 9, 7 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:37:21 * +(2225800, 9, 8 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:37:36 * +(2225800, 9, 9 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:37:51 * +(2225800, 9, 10 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38676, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Create Magic Sucker Device Buttress (S)'), -- 15:37:51 * +(2225800, 9, 11 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:38:06 * +(2225800, 9, 12 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:38:21 * +(2225800, 9, 13 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:38:36 * +(2225800, 9, 14 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38709, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Boss'), -- 15:38:36 * +(2225800, 9, 15 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:38:51 * +(2225800, 9, 16 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38677, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Create Magic Sucker Device Buttress (E)'), -- 15:38:51 * +(2225800, 9, 17 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:39:06 * +(2225800, 9, 18 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:39:21 * +(2225800, 9, 19 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 11, 38678, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Create Magic Sucker Device Buttress (W)'), -- 15:39:21 * +(2225800, 9, 20 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:39:36 * +(2225800, 9, 21 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38679, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Spawn Magic Sucker Device Mob'), -- 15:39:51 * +(2225800, 9, 22 ,0, 0, 0, 100, 0, 15000, 15000, 0, 0, 11, 38691, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Magic Sucker Device Despawner, Mob AE'), -- 15:40:06 * +(2225800, 9, 23 ,0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 38727, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Magic Sucker Device (Success Visual timer)'), -- 15:40:07 * +(2225800, 9, 24 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Set Unit Flags'), +(2225800, 9, 25 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 38672, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Remove Aura Magic Sucker Device timer'), +(2225800, 9, 26 ,0, 0, 0, 100, 0, 3000, 3000, 0, 0, 11, 38727, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Magic Sucker Device (Success Visual timer)'), -- 15:40:07 * +(2225800, 9, 27 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 38672, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Remove Aura Magic Sucker Device timer'), +(2225800, 9, 28 ,0, 0, 0, 100, 0, 3000, 3000, 0, 0, 11, 38727, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Cast Magic Sucker Device (Success Visual timer)'), -- 15:40:07 * +(2225800, 9, 29 ,0, 0, 0, 100, 0, 0, 0, 0, 0, 28, 38672, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Remove Aura Magic Sucker Device timer'), +(2225800, 9, 30 ,0, 0, 0, 100, 0, 84000, 84000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Demoniac Scryer - Script - Remove Aura Magic Sucker Device timer'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=22258; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 11, 22258, 0, 0, 9, 0, 10838, 0, 0, 0, 0, 0, '', 'Demoniac Scryer - Only run SAI if player has the Demoniac Scryer Taken'), +(22, 11, 22258, 0, 0, 2, 0, 31607, 1, 0, 1, 0, 0, '', 'Demoniac Scryer - Only run SAI if player does not have Demoniac Scryer Reading'), +(22, 11, 22258, 0, 0, 1, 0, 38708, 0, 0, 1, 0, 0, '', 'Demoniac Scryer - Only run SAI if player does not have Aura Demonaic Visitation'), +(22, 11, 22258, 0, 0, 1, 1, 38672, 0, 0, 1, 0, 0, '', 'Demoniac Scryer - Only run SAI if Demoniac Scryer does not have Aura Magic Sucker Device timer'); + +DELETE FROM `creature_text` WHERE `entry` IN (22259,22273,22366); + +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(22273, 0, 0, 'Die, interloper! Your puny device cannot pierce the dark magics of Hellfire Citadel!', 12, 0, 100, 397, 0, 0, 'Fel Warden',20020), +(22259, 0, 0, 'Your end has come!', 12, 0, 100, 0, 0, 0, 'Hellfire Wardling',53515), +(22259, 0, 1, 'An intruder! Begone!', 12, 0, 100, 0, 0, 0, 'Hellfire Wardling',20027), +(22259, 0, 2, 'An intruder! Begone!', 12, 0, 100, 0, 0, 8152, 'Hellfire Wardling',20027), +(22259, 0, 3, 'You will burn!', 12, 0, 100, 0, 0, 0, 'Hellfire Wardling',53513), +(22259, 0, 4, 'Die!', 12, 0, 100, 0, 0, 0, 'Hellfire Wardling',53514), +(22259, 0, 5, 'Your end has come!', 12, 0, 100, 0, 0, 8152, 'Hellfire Wardling',53515), +(22259, 0, 6, 'Die!', 12, 0, 100, 0, 0, 8152, 'Hellfire Wardling',53514), +(22366, 0, 0, 'Thank you for allowing me to visit, $n. You have a very colorful soul, but it''s a little brighter than I prefer... or I might have stayed longer!', 15, 0, 100, 0, 0, 0, 'Demoniac Visitation',20154); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`IN(-38708); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(-38708, 38991, 0,'Upon Demoniac Visitation expiring cast Summon Demonaic Visitation'); -- cgit v1.2.3 From 27479cf571cf65c9e1657e9c465974449173dc3f Mon Sep 17 00:00:00 2001 From: DDuarte Date: Sat, 13 Sep 2014 02:45:51 +0100 Subject: Core/Scripts: Nuke db_script_string table and make SCRIPT_COMMAND_TALK with broadcast_text instead Original code by @Ascathor with modifications Closes #13092 --- sql/updates/world/2014_09_12_04_world_texts.sql | 185 ++++++++++++++++++++++++ src/server/game/Entities/Object/Object.cpp | 22 ++- src/server/game/Globals/ObjectMgr.cpp | 50 ------- src/server/game/Globals/ObjectMgr.h | 4 - src/server/game/Miscellaneous/Language.h | 1 - src/server/game/Scripting/MapScripts.cpp | 3 +- src/server/game/World/World.cpp | 3 - src/server/scripts/Commands/cs_npc.cpp | 21 ++- src/server/scripts/Commands/cs_reload.cpp | 10 -- 9 files changed, 225 insertions(+), 74 deletions(-) create mode 100644 sql/updates/world/2014_09_12_04_world_texts.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_09_12_04_world_texts.sql b/sql/updates/world/2014_09_12_04_world_texts.sql new file mode 100644 index 00000000000..7fe155bc6b7 --- /dev/null +++ b/sql/updates/world/2014_09_12_04_world_texts.sql @@ -0,0 +1,185 @@ +DROP TABLE `db_script_string`; -- RIP + +UPDATE `waypoint_scripts` SET `dataint` = 5960 WHERE `dataint` = 2000005018; +UPDATE `waypoint_scripts` SET `dataint` = 22392 WHERE `dataint` = 2000005019; +UPDATE `waypoint_scripts` SET `dataint` = 22050 WHERE `dataint` = 2000005020; +UPDATE `waypoint_scripts` SET `dataint` = 22051 WHERE `dataint` = 2000005021; +UPDATE `waypoint_scripts` SET `dataint` = 22052 WHERE `dataint` = 2000005022; +UPDATE `waypoint_scripts` SET `dataint` = 10141 WHERE `dataint` = 2000005023; +UPDATE `waypoint_scripts` SET `dataint` = 10146 WHERE `dataint` = 2000005024; +UPDATE `waypoint_scripts` SET `dataint` = 10152 WHERE `dataint` = 2000005025; +UPDATE `waypoint_scripts` SET `dataint` = 10126 WHERE `dataint` = 2000005026; +UPDATE `waypoint_scripts` SET `dataint` = 7194 WHERE `dataint` = 2000005027; +UPDATE `waypoint_scripts` SET `dataint` = 7193 WHERE `dataint` = 2000005028; +UPDATE `waypoint_scripts` SET `dataint` = 7191 WHERE `dataint` = 2000005029; +UPDATE `waypoint_scripts` SET `dataint` = 10139 WHERE `dataint` = 2000005030; -- 4.x text +UPDATE `waypoint_scripts` SET `dataint` = 6406 WHERE `dataint` = 2000005031; +UPDATE `waypoint_scripts` SET `dataint` = 6405 WHERE `dataint` = 2000005032; +UPDATE `waypoint_scripts` SET `dataint` = 10158 WHERE `dataint` = 2000005033; +UPDATE `waypoint_scripts` SET `dataint` = 22544 WHERE `dataint` = 2000005034; +UPDATE `waypoint_scripts` SET `dataint` = 10146 WHERE `dataint` = 2000005035; +UPDATE `waypoint_scripts` SET `dataint` = 12835 WHERE `dataint` = 2000005036; +UPDATE `waypoint_scripts` SET `dataint` = 12832 WHERE `dataint` = 2000005037; +UPDATE `waypoint_scripts` SET `dataint` = 12833 WHERE `dataint` = 2000005038; +UPDATE `waypoint_scripts` SET `dataint` = 14565 WHERE `dataint` = 2000005039; +UPDATE `waypoint_scripts` SET `dataint` = 14567 WHERE `dataint` = 2000005040; +UPDATE `waypoint_scripts` SET `dataint` = 15144 WHERE `dataint` = 2000005041; +UPDATE `waypoint_scripts` SET `dataint` = 15373 WHERE `dataint` = 2000005042; +UPDATE `waypoint_scripts` SET `dataint` = 17569 WHERE `dataint` = 2000005043; -- doesn't exist anywhere, picked a random text from the same npc +UPDATE `waypoint_scripts` SET `dataint` = 17563 WHERE `dataint` = 2000005044; -- doesn't exist anywhere, picked a random text from the same npc +UPDATE `waypoint_scripts` SET `dataint` = 16059 WHERE `dataint` = 2000005045; +UPDATE `waypoint_scripts` SET `dataint` = 10119 WHERE `dataint` = 2000005048; +UPDATE `waypoint_scripts` SET `dataint` = 17035 WHERE `dataint` = 2000005049; +UPDATE `waypoint_scripts` SET `dataint` = 17045 WHERE `dataint` = 2000005050; +UPDATE `waypoint_scripts` SET `dataint` = 17056 WHERE `dataint` = 2000005051; +UPDATE `waypoint_scripts` SET `dataint` = 17486 WHERE `dataint` = 2000005052; +UPDATE `waypoint_scripts` SET `dataint` = 17485 WHERE `dataint` = 2000005053; +UPDATE `waypoint_scripts` SET `dataint` = 17485 WHERE `dataint` = 2000005054; +UPDATE `waypoint_scripts` SET `dataint` = 17485 WHERE `dataint` = 2000005055; +UPDATE `waypoint_scripts` SET `dataint` = 18816 WHERE `dataint` = 2000005056; +UPDATE `waypoint_scripts` SET `dataint` = 709 WHERE `dataint` = 2000005057; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005058; +UPDATE `waypoint_scripts` SET `dataint` = 705 WHERE `dataint` = 2000005059; +UPDATE `waypoint_scripts` SET `dataint` = 693 WHERE `dataint` = 2000005060; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005061; +UPDATE `waypoint_scripts` SET `dataint` = 706 WHERE `dataint` = 2000005062; +UPDATE `waypoint_scripts` SET `dataint` = 709 WHERE `dataint` = 2000005063; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005064; +UPDATE `waypoint_scripts` SET `dataint` = 705 WHERE `dataint` = 2000005065; +UPDATE `waypoint_scripts` SET `dataint` = 693 WHERE `dataint` = 2000005066; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005067; +UPDATE `waypoint_scripts` SET `dataint` = 706 WHERE `dataint` = 2000005068; +UPDATE `waypoint_scripts` SET `dataint` = 709 WHERE `dataint` = 2000005069; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005070; +UPDATE `waypoint_scripts` SET `dataint` = 705 WHERE `dataint` = 2000005071; +UPDATE `waypoint_scripts` SET `dataint` = 693 WHERE `dataint` = 2000005072; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005073; +UPDATE `waypoint_scripts` SET `dataint` = 706 WHERE `dataint` = 2000005074; +UPDATE `waypoint_scripts` SET `dataint` = 709 WHERE `dataint` = 2000005075; +UPDATE `waypoint_scripts` SET `dataint` = 710 WHERE `dataint` = 2000005076; +UPDATE `waypoint_scripts` SET `dataint` = 705 WHERE `dataint` = 2000005077; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005078; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005079; +UPDATE `waypoint_scripts` SET `dataint` = 696 WHERE `dataint` = 2000005080; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005081; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005082; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005083; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005084; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005085; +UPDATE `waypoint_scripts` SET `dataint` = 696 WHERE `dataint` = 2000005086; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005087; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005088; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005089; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005090; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005091; +UPDATE `waypoint_scripts` SET `dataint` = 696 WHERE `dataint` = 2000005092; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005093; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005094; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005095; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005096; +UPDATE `waypoint_scripts` SET `dataint` = 694 WHERE `dataint` = 2000005097; +UPDATE `waypoint_scripts` SET `dataint` = 696 WHERE `dataint` = 2000005098; +UPDATE `waypoint_scripts` SET `dataint` = 1101 WHERE `dataint` = 2000005099; +UPDATE `waypoint_scripts` SET `dataint` = 1103 WHERE `dataint` = 2000005100; +UPDATE `waypoint_scripts` SET `dataint` = 4013 WHERE `dataint` = 2000005101; +UPDATE `waypoint_scripts` SET `dataint` = 1104 WHERE `dataint` = 2000005102; +UPDATE `waypoint_scripts` SET `dataint` = 1110 WHERE `dataint` = 2000005103; +UPDATE `waypoint_scripts` SET `dataint` = 1105 WHERE `dataint` = 2000005104; +UPDATE `waypoint_scripts` SET `dataint` = 1108 WHERE `dataint` = 2000005105; +UPDATE `waypoint_scripts` SET `dataint` = 1106 WHERE `dataint` = 2000005106; +UPDATE `waypoint_scripts` SET `dataint` = 1107 WHERE `dataint` = 2000005107; +UPDATE `waypoint_scripts` SET `dataint` = 1112 WHERE `dataint` = 2000005108; +UPDATE `waypoint_scripts` SET `dataint` = 151 WHERE `dataint` = 2000005109; +UPDATE `waypoint_scripts` SET `dataint` = 151 WHERE `dataint` = 2000005110; +UPDATE `waypoint_scripts` SET `dataint` = 155 WHERE `dataint` = 2000005111; +UPDATE `waypoint_scripts` SET `dataint` = 154 WHERE `dataint` = 2000005112; +UPDATE `waypoint_scripts` SET `dataint` = 152 WHERE `dataint` = 2000005113; +UPDATE `waypoint_scripts` SET `dataint` = 177 WHERE `dataint` = 2000005114; +UPDATE `waypoint_scripts` SET `dataint` = 149 WHERE `dataint` = 2000005115; +UPDATE `waypoint_scripts` SET `dataint` = 173 WHERE `dataint` = 2000005116; +UPDATE `waypoint_scripts` SET `dataint` = 174 WHERE `dataint` = 2000005117; +UPDATE `waypoint_scripts` SET `dataint` = 172 WHERE `dataint` = 2000005118; +UPDATE `waypoint_scripts` SET `dataint` = 173 WHERE `dataint` = 2000005119; +UPDATE `waypoint_scripts` SET `dataint` = 172 WHERE `dataint` = 2000005120; +UPDATE `waypoint_scripts` SET `dataint` = 176 WHERE `dataint` = 2000005121; +UPDATE `waypoint_scripts` SET `dataint` = 178 WHERE `dataint` = 2000005122; +UPDATE `waypoint_scripts` SET `dataint` = 169 WHERE `dataint` = 2000005123; +UPDATE `waypoint_scripts` SET `dataint` = 147 WHERE `dataint` = 2000005124; +UPDATE `waypoint_scripts` SET `dataint` = 157 WHERE `dataint` = 2000005125; +UPDATE `waypoint_scripts` SET `dataint` = 168 WHERE `dataint` = 2000005126; +UPDATE `waypoint_scripts` SET `dataint` = 147 WHERE `dataint` = 2000005127; +UPDATE `waypoint_scripts` SET `dataint` = 157 WHERE `dataint` = 2000005128; +UPDATE `waypoint_scripts` SET `dataint` = 167 WHERE `dataint` = 2000005129; +UPDATE `waypoint_scripts` SET `dataint` = 157 WHERE `dataint` = 2000005130; +UPDATE `waypoint_scripts` SET `dataint` = 147 WHERE `dataint` = 2000005131; +UPDATE `waypoint_scripts` SET `dataint` = 2874 WHERE `dataint` = 2000005132; +UPDATE `waypoint_scripts` SET `dataint` = 10119 WHERE `dataint` = 2000005133; +UPDATE `waypoint_scripts` SET `dataint` = 1129 WHERE `dataint` = 2000005134; +UPDATE `waypoint_scripts` SET `dataint` = 1154 WHERE `dataint` = 2000005135; +UPDATE `waypoint_scripts` SET `dataint` = 1155 WHERE `dataint` = 2000005136; +UPDATE `waypoint_scripts` SET `dataint` = 1140 WHERE `dataint` = 2000005137; +UPDATE `waypoint_scripts` SET `dataint` = 1161 WHERE `dataint` = 2000005138; +UPDATE `waypoint_scripts` SET `dataint` = 1162 WHERE `dataint` = 2000005139; +UPDATE `waypoint_scripts` SET `dataint` = 1163 WHERE `dataint` = 2000005140; +UPDATE `waypoint_scripts` SET `dataint` = 1165 WHERE `dataint` = 2000005141; +UPDATE `waypoint_scripts` SET `dataint` = 1166 WHERE `dataint` = 2000005142; +UPDATE `waypoint_scripts` SET `dataint` = 13580 WHERE `dataint` = 2000005144; +UPDATE `waypoint_scripts` SET `dataint` = 13576 WHERE `dataint` = 2000005145; +UPDATE `waypoint_scripts` SET `dataint` = 15119 WHERE `dataint` = 2000005147; +UPDATE `waypoint_scripts` SET `dataint` = 209 WHERE `dataint` = 2000005148; +UPDATE `waypoint_scripts` SET `dataint` = 224 WHERE `dataint` = 2000005149; +UPDATE `waypoint_scripts` SET `dataint` = 225 WHERE `dataint` = 2000005150; +UPDATE `waypoint_scripts` SET `dataint` = 213 WHERE `dataint` = 2000005151; +UPDATE `waypoint_scripts` SET `dataint` = 225 WHERE `dataint` = 2000005152; +UPDATE `waypoint_scripts` SET `dataint` = 225 WHERE `dataint` = 2000005153; +UPDATE `waypoint_scripts` SET `dataint` = 224 WHERE `dataint` = 2000005154; +UPDATE `waypoint_scripts` SET `dataint` = 214 WHERE `dataint` = 2000005155; +UPDATE `waypoint_scripts` SET `dataint` = 217 WHERE `dataint` = 2000005156; +UPDATE `waypoint_scripts` SET `dataint` = 210 WHERE `dataint` = 2000005157; +UPDATE `waypoint_scripts` SET `dataint` = 205 WHERE `dataint` = 2000005158; +UPDATE `waypoint_scripts` SET `dataint` = 216 WHERE `dataint` = 2000005159; +UPDATE `waypoint_scripts` SET `dataint` = 212 WHERE `dataint` = 2000005160; +UPDATE `waypoint_scripts` SET `dataint` = 208 WHERE `dataint` = 2000005161; +UPDATE `waypoint_scripts` SET `dataint` = 214 WHERE `dataint` = 2000005162; +UPDATE `waypoint_scripts` SET `dataint` = 215 WHERE `dataint` = 2000005163; +UPDATE `waypoint_scripts` SET `dataint` = 206 WHERE `dataint` = 2000005164; +UPDATE `waypoint_scripts` SET `dataint` = 212 WHERE `dataint` = 2000005165; +UPDATE `waypoint_scripts` SET `dataint` = 214 WHERE `dataint` = 2000005166; +UPDATE `waypoint_scripts` SET `dataint` = 1153 WHERE `dataint` = 2000005167; +UPDATE `waypoint_scripts` SET `dataint` = 1130 WHERE `dataint` = 2000005168; +UPDATE `waypoint_scripts` SET `dataint` = 201 WHERE `dataint` = 2000005169; +UPDATE `waypoint_scripts` SET `dataint` = 218 WHERE `dataint` = 2000005170; +UPDATE `waypoint_scripts` SET `dataint` = 222 WHERE `dataint` = 2000005171; +UPDATE `waypoint_scripts` SET `dataint` = 221 WHERE `dataint` = 2000005172; +UPDATE `waypoint_scripts` SET `dataint` = 204 WHERE `dataint` = 2000005173; +UPDATE `waypoint_scripts` SET `dataint` = 222 WHERE `dataint` = 2000005174; +UPDATE `waypoint_scripts` SET `dataint` = 219 WHERE `dataint` = 2000005175; +UPDATE `waypoint_scripts` SET `dataint` = 218 WHERE `dataint` = 2000005176; +UPDATE `waypoint_scripts` SET `dataint` = 221 WHERE `dataint` = 2000005177; +UPDATE `waypoint_scripts` SET `dataint` = 219 WHERE `dataint` = 2000005178; +UPDATE `waypoint_scripts` SET `dataint` = 222 WHERE `dataint` = 2000005179; +UPDATE `waypoint_scripts` SET `dataint` = 587 WHERE `dataint` = 2000005180; +UPDATE `waypoint_scripts` SET `dataint` = 589 WHERE `dataint` = 2000005181; +UPDATE `waypoint_scripts` SET `dataint` = 590 WHERE `dataint` = 2000005182; +UPDATE `waypoint_scripts` SET `dataint` = 588 WHERE `dataint` = 2000005183; +UPDATE `waypoint_scripts` SET `dataint` = 1091 WHERE `dataint` = 2000005184; +UPDATE `waypoint_scripts` SET `dataint` = 24425 WHERE `dataint` = 2000005200; +UPDATE `waypoint_scripts` SET `dataint` = 24425 WHERE `dataint` = 2000005201; +UPDATE `waypoint_scripts` SET `dataint` = 22216 WHERE `dataint` = 2000005202; +UPDATE `waypoint_scripts` SET `dataint` = 22211 WHERE `dataint` = 2000005203; +UPDATE `waypoint_scripts` SET `dataint` = 22206 WHERE `dataint` = 2000005204; +UPDATE `waypoint_scripts` SET `dataint` = 25086 WHERE `dataint` = 2000005205; +UPDATE `waypoint_scripts` SET `dataint` = 25073 WHERE `dataint` = 2000005206; +UPDATE `waypoint_scripts` SET `dataint` = 25074 WHERE `dataint` = 2000005207; +UPDATE `waypoint_scripts` SET `dataint` = 25075 WHERE `dataint` = 2000005208; +UPDATE `waypoint_scripts` SET `dataint` = 25076 WHERE `dataint` = 2000005209; +UPDATE `waypoint_scripts` SET `dataint` = 23842 WHERE `dataint` = 2000005210; +UPDATE `waypoint_scripts` SET `dataint` = 328 WHERE `dataint` = 2000005400; +UPDATE `waypoint_scripts` SET `dataint` = 327 WHERE `dataint` = 2000005401; +UPDATE `waypoint_scripts` SET `dataint` = 5956 WHERE `dataint` = 2000005402; +UPDATE `waypoint_scripts` SET `dataint` = 5957 WHERE `dataint` = 2000005403; +UPDATE `waypoint_scripts` SET `dataint` = 5960 WHERE `dataint` = 2000005404; +UPDATE `waypoint_scripts` SET `dataint` = 5959 WHERE `dataint` = 2000005405; +UPDATE `waypoint_scripts` SET `dataint` = 24439 WHERE `dataint` = 2000005406; +UPDATE `waypoint_scripts` SET `dataint` = 24443 WHERE `dataint` = 2000005407; +UPDATE `waypoint_scripts` SET `dataint` = 36 WHERE `dataint` = 2000005408; diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 45450a0c129..1f3c9a2e8c7 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1908,8 +1908,17 @@ namespace Trinity : i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(Language(language)), i_target(target) { } void operator()(WorldPacket& data, LocaleConstant loc_idx) { - char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx); - ChatHandler::BuildChatPacket(data, i_msgtype, i_language, i_object, i_target, text, 0, "", loc_idx); + if (BroadcastText const* broadcastText = sObjectMgr->GetBroadcastText(i_textId)) + { + uint8 gender = GENDER_MALE; + if (Unit const* unit = i_object->ToUnit()) + gender = unit->getGender(); + + std::string text = broadcastText->GetText(loc_idx, gender); + ChatHandler::BuildChatPacket(data, i_msgtype, i_language, i_object, i_target, text, 0, "", loc_idx); + } + else + TC_LOG_ERROR("entities.unit", "MonsterChatBuilder: `broadcast_text` id %i missing", i_textId); } private: @@ -2034,10 +2043,15 @@ void WorldObject::MonsterWhisper(int32 textId, Player const* target, bool IsBoss if (!target) return; + uint8 gender = GENDER_MALE; + if (Unit const* unit = ToUnit()) + gender = unit->getGender(); + LocaleConstant loc_idx = target->GetSession()->GetSessionDbLocaleIndex(); - char const* text = sObjectMgr->GetTrinityString(textId, loc_idx); + BroadcastText const* broadcastText = sObjectMgr->GetBroadcastText(textId); + std::string text = broadcastText->GetText(loc_idx, gender); WorldPacket data; - ChatHandler::BuildChatPacket(data, IsBossWhisper ? CHAT_MSG_RAID_BOSS_WHISPER : CHAT_MSG_MONSTER_WHISPER, LANG_UNIVERSAL, this, target, text, 0, "", loc_idx); + ChatHandler::BuildChatPacket(data, IsBossWhisper ? CHAT_MSG_RAID_BOSS_WHISPER : CHAT_MSG_MONSTER_WHISPER, LANG_UNIVERSAL, this, target, text.c_str(), 0, "", loc_idx); target->GetSession()->SendPacket(&data); } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 7ab843943f8..48f544cba2b 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -4608,12 +4608,6 @@ void ObjectMgr::LoadScripts(ScriptsType type) tableName.c_str(), tmp.Talk.TextID, tmp.id); continue; } - if (tmp.Talk.TextID < MIN_DB_SCRIPT_STRING_ID || tmp.Talk.TextID >= MAX_DB_SCRIPT_STRING_ID) - { - TC_LOG_ERROR("sql.sql", "Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u", - tableName.c_str(), tmp.Talk.TextID, MIN_DB_SCRIPT_STRING_ID, MAX_DB_SCRIPT_STRING_ID, tmp.id); - continue; - } break; } @@ -8635,33 +8629,6 @@ uint32 ObjectMgr::GetScriptId(const char *name) return uint32(itr - _scriptNamesStore.begin()); } -void ObjectMgr::CheckScripts(ScriptsType type, std::set& ids) -{ - ScriptMapMap* scripts = GetScriptsMapByType(type); - if (!scripts) - return; - - for (ScriptMapMap::const_iterator itrMM = scripts->begin(); itrMM != scripts->end(); ++itrMM) - { - for (ScriptMap::const_iterator itrM = itrMM->second.begin(); itrM != itrMM->second.end(); ++itrM) - { - switch (itrM->second.command) - { - case SCRIPT_COMMAND_TALK: - { - if (!GetTrinityStringLocale (itrM->second.Talk.TextID)) - TC_LOG_ERROR("sql.sql", "Table `%s` references invalid text id %u from `db_script_string`, script id: %u.", GetScriptsTableNameByType(type).c_str(), itrM->second.Talk.TextID, itrMM->first); - - if (ids.find(itrM->second.Talk.TextID) != ids.end()) - ids.erase(itrM->second.Talk.TextID); - } - default: - break; - } - } - } -} - void ObjectMgr::LoadBroadcastTexts() { uint32 oldMSTime = getMSTime(); @@ -8797,23 +8764,6 @@ void ObjectMgr::LoadBroadcastTextLocales() TC_LOG_INFO("server.loading", ">> Loaded %u broadcast text locales in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); } -void ObjectMgr::LoadDbScriptStrings() -{ - LoadTrinityStrings("db_script_string", MIN_DB_SCRIPT_STRING_ID, MAX_DB_SCRIPT_STRING_ID); - - std::set ids; - - for (int32 i = MIN_DB_SCRIPT_STRING_ID; i < MAX_DB_SCRIPT_STRING_ID; ++i) - if (GetTrinityStringLocale(i)) - ids.insert(i); - - for (int type = SCRIPTS_FIRST; type < SCRIPTS_LAST; ++type) - CheckScripts(ScriptsType(type), ids); - - for (std::set::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) - TC_LOG_ERROR("sql.sql", "Table `db_script_string` has unused string id %u", *itr); -} - CreatureBaseStats const* ObjectMgr::GetCreatureBaseStats(uint8 level, uint8 unitClass) { CreatureBaseStatsContainer::const_iterator it = _creatureBaseStatsStore.find(MAKE_PAIR16(level, unitClass)); diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index dc9196dd0df..d15ca257d67 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -466,8 +466,6 @@ typedef std::unordered_map& ids); void LoadQuestRelationsHelper(QuestRelations& map, QuestRelationsReverse* reverseMap, std::string const& table, bool starter, bool go); void PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint32 itemId, int32 count); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index c1de3aae7cb..814deba78db 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1194,7 +1194,6 @@ enum TrinityStrings LANG_NPCINFO_FLAGS_EXTRA = 11009 // NOT RESERVED IDS 12000-1999999999 - // `db_script_string` table index 2000000000-2000009999 (MIN_DB_SCRIPT_STRING_ID-MAX_DB_SCRIPT_STRING_ID) // For other tables maybe 2000010000-2147483647 (max index) }; #endif diff --git a/src/server/game/Scripting/MapScripts.cpp b/src/server/game/Scripting/MapScripts.cpp index 3ccc876e1a2..b32fa288185 100644 --- a/src/server/game/Scripting/MapScripts.cpp +++ b/src/server/game/Scripting/MapScripts.cpp @@ -383,7 +383,8 @@ void Map::ScriptsProcess() if (Player* player = _GetScriptPlayerSourceOrTarget(source, target, step.script)) { LocaleConstant loc_idx = player->GetSession()->GetSessionDbLocaleIndex(); - std::string text(sObjectMgr->GetTrinityString(step.script->Talk.TextID, loc_idx)); + BroadcastText const* broadcastText = sObjectMgr->GetBroadcastText(step.script->Talk.TextID); + std::string text = broadcastText->GetText(loc_idx, player->getGender()); switch (step.script->Talk.ChatType) { diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 58e3cffa8de..35ad588c0aa 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1702,9 +1702,6 @@ void World::SetInitialWorldSettings() sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data) sObjectMgr->LoadWaypointScripts(); - TC_LOG_INFO("server.loading", "Loading Scripts text locales..."); // must be after Load*Scripts calls - sObjectMgr->LoadDbScriptStrings(); - TC_LOG_INFO("server.loading", "Loading spell script names..."); sObjectMgr->LoadSpellScriptNames(); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 66988b499d2..9737b1dd5b9 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1297,14 +1297,29 @@ public: static bool HandleNpcWhisperCommand(ChatHandler* handler, char const* args) { if (!*args) + { + handler->SendSysMessage(LANG_CMD_SYNTAX); + handler->SetSentErrorMessage(true); return false; + } char* receiver_str = strtok((char*)args, " "); char* text = strtok(NULL, ""); + if (!receiver_str || !text) + { + handler->SendSysMessage(LANG_CMD_SYNTAX); + handler->SetSentErrorMessage(true); + return false; + } + Creature* creature = handler->getSelectedCreature(); - if (!creature || !receiver_str || !text) + if (!creature) + { + handler->SendSysMessage(LANG_SELECT_CREATURE); + handler->SetSentErrorMessage(true); return false; + } uint64 receiver_guid = atol(receiver_str); @@ -1320,7 +1335,11 @@ public: static bool HandleNpcYellCommand(ChatHandler* handler, char const* args) { if (!*args) + { + handler->SendSysMessage(LANG_CMD_SYNTAX); + handler->SetSentErrorMessage(true); return false; + } Creature* creature = handler->getSelectedCreature(); if (!creature) diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 70aacbfc227..5f061fab595 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -88,7 +88,6 @@ public: { "creature_queststarter", rbac::RBAC_PERM_COMMAND_RELOAD_CREATURE_QUESTSTARTER, true, &HandleReloadCreatureQuestStarterCommand, "", NULL }, { "creature_summon_groups", rbac::RBAC_PERM_COMMAND_RELOAD_CREATURE_SUMMON_GROUPS, true, &HandleReloadCreatureSummonGroupsCommand, "", NULL }, { "creature_template", rbac::RBAC_PERM_COMMAND_RELOAD_CREATURE_TEMPLATE, true, &HandleReloadCreatureTemplateCommand, "", NULL }, - //{ "db_script_string", rbac::RBAC_PERM_COMMAND_RELOAD_, true, &HandleReloadDbScriptStringCommand, "", NULL }, { "disables", rbac::RBAC_PERM_COMMAND_RELOAD_DISABLES, true, &HandleReloadDisablesCommand, "", NULL }, { "disenchant_loot_template", rbac::RBAC_PERM_COMMAND_RELOAD_DISENCHANT_LOOT_TEMPLATE, true, &HandleReloadLootTemplatesDisenchantCommand, "", NULL }, { "event_scripts", rbac::RBAC_PERM_COMMAND_RELOAD_EVENT_SCRIPTS, true, &HandleReloadEventScriptsCommand, "", NULL }, @@ -266,7 +265,6 @@ public: HandleReloadEventScriptsCommand(handler, "a"); HandleReloadSpellScriptsCommand(handler, "a"); handler->SendGlobalGMSysMessage("DB tables `*_scripts` reloaded."); - HandleReloadDbScriptStringCommand(handler, "a"); HandleReloadWpScriptsCommand(handler, "a"); HandleReloadWpCommand(handler, "a"); return true; @@ -960,14 +958,6 @@ public: return true; } - static bool HandleReloadDbScriptStringCommand(ChatHandler* handler, const char* /*args*/) - { - TC_LOG_INFO("misc", "Re-Loading Script strings from `db_script_string`..."); - sObjectMgr->LoadDbScriptStrings(); - handler->SendGlobalGMSysMessage("DB table `db_script_string` reloaded."); - return true; - } - static bool HandleReloadGameGraveyardZoneCommand(ChatHandler* handler, const char* /*args*/) { TC_LOG_INFO("misc", "Re-Loading Graveyard-zone links..."); -- cgit v1.2.3 From 8bb086ef231532b4422fb4393129086895a75d5e Mon Sep 17 00:00:00 2001 From: Dr-J Date: Sat, 13 Sep 2014 03:32:10 +0100 Subject: DB/Misc: Fix visual appearance for some quest flight paths Fix appearance of player when taking flight for As the Crow Flies and Spiritual Insight Link the spells which give transform (Stormcrow Shape for As the Crow Flies and Spiritual Insight for Spiritual Insight Script to remove this at end of path, the zangarmarsh one lasts about 5 seconds longer than flight path, but the dragonblight one has 1 min left at end so needed to remove that, Also dont know if anyone can think of a way of how to this but during as the crow flies the player is meant to receive a few whispers from ysiel during the flight path, If you search spell_dbc for as the crow flies you will find there are a number of auras with name as the crow flies whisper aura with different effect msic values and different durations ranging from 3 to 467 I have a feeling these are meant to trigger the whispers when the auras expire think the values in effectvaluemisc2 maybe event ids. --- sql/updates/world/2014_09_13_00_world_misc.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sql/updates/world/2014_09_13_00_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2014_09_13_00_world_misc.sql b/sql/updates/world/2014_09_13_00_world_misc.sql new file mode 100644 index 00000000000..e2c04ef287d --- /dev/null +++ b/sql/updates/world/2014_09_13_00_world_misc.sql @@ -0,0 +1,19 @@ +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`IN(31606,47190); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(31606, 31746, 0, 'Stormcrow Amulet triggers Stormcrow Shape'), +(47190, 47189, 1, 'Toaluus Spiritual Incense triggers Spiritual Insight'); + +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry` IN(26595,17841); + +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(26595,17841) AND `source_type`=0; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26595, 0, 0, 0, 10, 0, 100, 0, 1, 30, 10, 10, 28, 47189, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Toaluu the Mystic - Out of Combat - Remove Aura Spiritual Insight'), +(17841, 0, 0, 0, 10, 0, 100, 0, 1, 30, 10, 10, 28, 31746, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ysiel Windsinger - Out of Combat - Remove Aura Stormcrow Shape'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry` IN(26595,17841); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 26595, 0, 0, 28, 0, 12028, 0, 0, 0, 0, 0, '', 'Only run SAI if Player Has Spiritual Insight Complete in Log'), +(22, 1, 26595, 0, 0, 1, 0, 47189, 0, 0, 0, 0, 0, '', 'Only run SAI if Player Has Aura Spiritual Insight'), +(22, 1, 17841, 0, 0, 28, 0, 9718, 0, 0, 0, 0, 0, '', 'Only run SAI if Player Has As The Crow Flies Complete in Log'), +(22, 1, 17841, 0, 0, 1, 0, 31746, 0, 0, 0, 0, 0, '', 'Only run SAI if Player Has Aura Stormcrow Shape'); -- cgit v1.2.3 From c7639ca6a18385348d4033f763768673708504d9 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sat, 13 Sep 2014 11:52:03 +0200 Subject: SQL: Fix travis build --- sql/updates/world/2014_09_12_04_world_texts.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/updates') diff --git a/sql/updates/world/2014_09_12_04_world_texts.sql b/sql/updates/world/2014_09_12_04_world_texts.sql index 7fe155bc6b7..5f7177eb765 100644 --- a/sql/updates/world/2014_09_12_04_world_texts.sql +++ b/sql/updates/world/2014_09_12_04_world_texts.sql @@ -1,4 +1,4 @@ -DROP TABLE `db_script_string`; -- RIP +DROP TABLE IF EXISTS `db_script_string`; -- RIP UPDATE `waypoint_scripts` SET `dataint` = 5960 WHERE `dataint` = 2000005018; UPDATE `waypoint_scripts` SET `dataint` = 22392 WHERE `dataint` = 2000005019; -- cgit v1.2.3