Wormhole needs gossips in DB
The wormhole hardcoded gossips are supposed to be in DB.
https://github.com/TrinityCore/TrinityCore/blob/master/src/server/scripts/World/npcs_special.cpp#L2240
Data from retail.
DELETE FROM `gossip_menu_option` WHERE `menu_id`=10668;
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `box_coded`, `box_money`, `box_text`) VALUES
(10668, 0, 0, 'Toundra Boréenne', 0, 0, ''), -- Wormhole
(10668, 1, 0, 'Fjord Hurlant', 0, 0, ''), -- Wormhole
(10668, 2, 0, 'Bassin de Sholazar', 0, 0, ''), -- Wormhole
(10668, 3, 0, 'Couronne de glace', 0, 0, ''), -- Wormhole
(10668, 4, 0, 'Pics Foudroyés', 0, 0, ''); -- Wormhole
PS : I know it's in French and I don't have the last gossip, because there's like 1/100 chance to get them.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
http://wow.zamimg.com/uploads/screenshots/normal/148334.jpg
P.S You should write code blocks in github comments with ...code...
SET @MenuId := 10668;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=10668;
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `box_coded`, `box_money`, `box_text`) VALUES
(@MenuId,0,0, 'Borean Tundra', 0, 0, ''),
(@MenuId,1,0, 'Howling Fjord', 0, 0, ''),
(@MenuId,2,0, 'Sholazar Basin', 0, 0, ''),
(@MenuId,3,0, 'Icecrown', 0, 0, ''),
(@MenuId,4,0, 'Storm Peaks', 0, 0, '');
-- (@MenuId,5,0, 'Underground...', 0, 0, '');
NOTE: randomly adding Underground is NOT POSSIBLE via db (apparently) , SAI wont work with CPP active
DELETE FROM `smart_scripts` WHERE `entryorguid`=35646 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
(35646,0,0,0,62,0,100,0,@MenuId,0,0,0,85,67834,2,0,0,0,0,0,1,0,0,0,0,0,0, 'Wormhole - cast Borean Tundra on player'),
(35646,0,1,0,62,0,100,0,@MenuId,1,0,0,85,67835,2,0,0,0,0,0,1,0,0,0,0,0,0, 'Wormhole - cast Howling Fjord on player'),
(35646,0,2,0,62,0,100,0,@MenuId,2,0,0,85,67836,2,0,0,0,0,0,1,0,0,0,0,0,0, 'Wormhole - cast Sholozar Basin on player'),
(35646,0,3,0,62,0,100,0,@MenuId,3,0,0,85,67837,2,0,0,0,0,0,1,0,0,0,0,0,0, 'Wormhole - cast Icecrown on player'),
(35646,0,4,0,62,0,100,0,@MenuId,4,0,0,85,67838,2,0,0,0,0,0,1,0,0,0,0,0,0, 'Wormhole - cast Storm Peaks on player');
-- (35646,0,5,0,62,0,100,0,@MenuId,5,0,0,85,68081,2,0,0,0,0,0,1,0,0,0,0,0,0, 'Wormhole - cast Underground on player');
Can't the randomness be implemented in the CPP part then?
this randmgossip: #define GOSSIP_ENGINEERING6 "Underground..."
should also be handeled in db then?
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/scripts/World/npcs_special.cpp#L1558 Don't know if it's possible to replace the script as there's condition to make the wormhole used only by the summoner, also the random Underground cannot be scripted on DB. Anyway Gossip options can be moved to the DB.
SET @MenuId := 10668;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=10668;
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `box_coded`, `box_money`, `box_text`, `OptionBroadcastTextID`, `option_id`, npc_option_npcflag) VALUES
(@MenuId,0,0, 'Borean Tundra', 0, 0, '', 35939, 1, 1),
(@MenuId,1,0, 'Howling Fjord', 0, 0, '', 35943, 1, 1),
(@MenuId,2,0, 'Sholazar Basin', 0, 0, '', 35940, 1, 1),
(@MenuId,3,0, 'Icecrown', 0, 0, '', 35941, 1, 1),
(@MenuId,4,0, 'Storm Peaks', 0, 0, '', 35942, 1, 1),
(@MenuId,5,0, 'Underground...', 0, 0, '', 36022, 1, 1);
UPDATE `creature_template` SET `gossip_menu_id`=10668, `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=35646;
DELETE FROM `smart_scripts` WHERE `entryorguid`=35646 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
(35646,0,0,0,62,0,100,0,@MenuId,0,0,0,11,67834,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wormhole - cast Borean Tundra on player'),
(35646,0,4,0,62,0,100,0,@MenuId,1,0,0,11,67838,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wormhole - cast Howling Fjord on player'),
(35646,0,1,0,62,0,100,0,@MenuId,2,0,0,11,67835,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wormhole - cast Sholozar Basin on player'),
(35646,0,2,0,62,0,100,0,@MenuId,3,0,0,11,67836,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wormhole - cast Icecrown on player'),
(35646,0,3,0,62,0,100,0,@MenuId,4,0,0,11,67837,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wormhole - cast Storm Peaks on player'),
(35646,0,5,0,62,0,100,0,@MenuId,5,0,0,11,68081,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Wormhole - cast Underground on player');