Advertisement
Guest User

Untitled

a guest
Dec 9th, 2012
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.62 KB | None | 0 0
  1. Error occured at:2012-12-09 16:51:59
  2. Line no.:5303
  3. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  4.  
  5. Query:
  6. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_npc_trainer`(IN npc_entry INT(10), IN spell_id INT(10))
  7. BEGIN
  8. IF spell_id IS NOT NULL OR npc_entry IS NOT NULL THEN
  9. DELETE FROM `npc_trainer` WHERE `entry`=IFNULL(npc_entry,`entry`) AND `spell`=IFNULL(spell_id,`spell`);
  10. ELSE
  11. CALL MUST_PROVIDE_ENTRY_OR_SPELL;
  12. END IF;
  13. END */
  14.  
  15. Error occured at:2012-12-09 16:51:59
  16. Line no.:5321
  17. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  18.  
  19. Query:
  20. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_npc_vendor` */
  21.  
  22. Error occured at:2012-12-09 16:51:59
  23. Line no.:5327
  24. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  25.  
  26. Query:
  27. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_npc_vendor`(IN npc_entry INT(10), IN item_entry INT(10))
  28. BEGIN
  29. IF item_entry IS NOT NULL OR npc_entry IS NOT NULL THEN
  30. DELETE FROM `npc_vendor` WHERE `entry`=IFNULL(npc_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  31. ELSE
  32. CALL MUST_PROVIDE_ENTRY_OR_ITEM;
  33. END IF;
  34. END */
  35.  
  36. Error occured at:2012-12-09 16:51:59
  37. Line no.:5345
  38. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  39.  
  40. Query:
  41. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_questgiver` */
  42.  
  43. Error occured at:2012-12-09 16:51:59
  44. Line no.:5351
  45. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  46.  
  47. Query:
  48. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_questgiver`(IN qg_type VARCHAR(10),IN qg_entry INT(10), IN quest_entry INT(10))
  49. BEGIN
  50. IF qg_entry IS NOT NULL OR quest_entry IS NOT NULL THEN
  51. CASE UCASE(qg_type)
  52. WHEN 'NPC' THEN BEGIN
  53. DELETE FROM `creature_questrelation` WHERE `id`=IFNULL(qg_entry,`id`) AND `quest`=IFNULL(quest_entry,`quest`);
  54. END;
  55. WHEN 'GO' THEN BEGIN
  56. DELETE FROM `gameobject_questrelation` WHERE `id`=IFNULL(qg_entry,`id`) AND `quest`=IFNULL(quest_entry,`quest`);
  57. END;
  58. ELSE CALL INVALID_ENTRY_TYPE;
  59. END CASE;
  60. ELSE CALL MUST_PROVIDE_ENTRY_OR_QUEST;
  61. END IF;
  62. END */
  63.  
  64. Error occured at:2012-12-09 16:51:59
  65. Line no.:5376
  66. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  67.  
  68. Query:
  69. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_questtaker` */
  70.  
  71. Error occured at:2012-12-09 16:51:59
  72. Line no.:5382
  73. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  74.  
  75. Query:
  76. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_questtaker`(IN qt_type VARCHAR(10),IN qt_entry INT(10), IN quest_entry INT(10))
  77. BEGIN
  78. IF qt_entry IS NOT NULL OR quest_entry IS NOT NULL THEN
  79. CASE UCASE(qt_type)
  80. WHEN 'NPC' THEN BEGIN
  81. DELETE FROM `creature_involvedrelation` WHERE `id`=IFNULL(qt_entry,`id`) AND `quest`=IFNULL(quest_entry,`quest`);
  82. END;
  83. WHEN 'GO' THEN BEGIN
  84. DELETE FROM `gameobject_involvedrelation` WHERE `id`=IFNULL(qt_entry,`id`) AND `quest`=IFNULL(quest_entry,`quest`);
  85. END;
  86. ELSE CALL INVALID_ENTRY_TYPE;
  87. END CASE;
  88. ELSE CALL MUST_PROVIDE_ENTRY_OR_QUEST;
  89. END IF;
  90. END */
  91.  
  92. Error occured at:2012-12-09 16:51:59
  93. Line no.:5407
  94. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  95.  
  96. Query:
  97. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_loot` */
  98.  
  99. Error occured at:2012-12-09 16:51:59
  100. Line no.:5413
  101. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  102.  
  103. Query:
  104. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_loot`(IN loot_type VARCHAR(10),IN loot_entry INT(10),IN item_entry INT(10))
  105. BEGIN
  106. IF loot_entry IS NOT NULL OR item_entry IS NOT NULL THEN
  107. CASE UCASE(loot_type)
  108. WHEN 'FISH' THEN BEGIN
  109. DELETE FROM `fishing_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  110. END;
  111. WHEN 'NPC' THEN BEGIN
  112. DELETE FROM `creature_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  113. END;
  114. WHEN 'GO' THEN BEGIN
  115. DELETE FROM `gameobject_loot_template` WHERE `entry`=IFNUofcLL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  116. END;
  117. WHEN 'ITEM' THEN BEGIN
  118. DELETE FROM `item_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  119. END;
  120. WHEN 'DISENCH' THEN BEGIN
  121. DELETE FROM `disenchant_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  122. END;
  123. WHEN 'PROSPECT' THEN BEGIN
  124. DELETE FROM `propspecting_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  125. END;
  126. WHEN 'MILL' THEN BEGIN
  127. DELETE FROM `millling_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  128. END;
  129. WHEN 'PICKPOCKET' THEN BEGIN
  130. DELETE FROM `pickpocketing_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  131. END;
  132. WHEN 'SKIN' THEN BEGIN
  133. DELETE FROM `skinning_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  134. END;
  135. WHEN 'QUEST' THEN BEGIN
  136. DELETE FROM `quest_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  137. END;
  138. WHEN 'REF' THEN BEGIN
  139. IF loot_entry IS NOT NULL THEN
  140. DELETE FROM `creature_loot_template` WHERE `mincountOrRef`=-loot_entry;
  141. DELETE FROM `disenchant_loot_template` WHERE `mincountOrRef`=-loot_entry;
  142. DELETE FROM `fishing_loot_template` WHERE `mincountOrRef`=-loot_entry;
  143. DELETE FROM `gameobject_loot_template` WHERE `mincountOrRef`=-loot_entry;
  144. DELETE FROM `item_loot_template` WHERE `mincountOrRef`=-loot_entry;
  145. DELETE FROM `mail_loot_template` WHERE `mincountOrRef`=-loot_entry;
  146. DELETE FROM `milling_loot_template` WHERE `mincountOrRef`=-loot_entry;
  147. DELETE FROM `pickpocketing_loot_template` WHERE `mincountOrRef`=-loot_entry;
  148. DELETE FROM `prospecting_loot_template` WHERE `mincountOrRef`=-loot_entry;
  149. DELETE FROM `skinning_loot_template` WHERE `mincountOrRef`=-loot_entry;
  150. DELETE FROM `spell_loot_template` WHERE `mincountOrRef`=-loot_entry;
  151. END IF;
  152.  
  153. DELETE FROM `reference_loot_template` WHERE `entry`=IFNULL(loot_entry,`entry`) AND `item`=IFNULL(item_entry,`item`);
  154. END;
  155. ELSE CALL INVALID_LOOT_TYPE;
  156. END CASE;
  157. ELSE
  158. CALL MUST_PROVIDE_ENTRY_OR_ITEM;
  159. END IF;
  160. END */
  161.  
  162. Error occured at:2012-12-09 16:51:59
  163. Line no.:5480
  164. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  165.  
  166. Query:
  167. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_script` */
  168.  
  169. Error occured at:2012-12-09 16:51:59
  170. Line no.:5486
  171. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  172.  
  173. Query:
  174. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_script`(IN script_type VARCHAR(10), IN script_id INT(10))
  175. BEGIN
  176. CASE UCASE(script_type)
  177. WHEN 'EAI' THEN BEGIN
  178. DELETE FROM `creature_ai_scripts` WHERE `id`=script_id;
  179. END;
  180. WHEN 'GO' THEN BEGIN
  181. DELETE FROM `gameobject_scripts` WHERE `id`=script_id;
  182. END;
  183. WHEN 'GOSSIP' THEN BEGIN
  184. DELETE FROM `gossip_scripts` WHERE `id`=script_id;
  185. END;
  186. WHEN 'Q_START' THEN BEGIN
  187. DELETE FROM `quest_start_scripts` WHERE `id`=script_id;
  188. END;
  189. WHEN 'Q_END' THEN BEGIN
  190. DELETE FROM `quest_end_scripts` WHERE `id`=script_id;
  191. END;
  192. WHEN 'SPELL' THEN BEGIN
  193. DELETE FROM `spell_scripts` WHERE `id`=script_id;
  194. END;
  195. WHEN 'WP' THEN BEGIN
  196. DELETE FROM `waypoint_scripts` WHERE `id`=script_id;
  197. END;
  198. ELSE CALL INVALID_SCRIPT_TYPE;
  199. END CASE;
  200. END */
  201.  
  202. Error occured at:2012-12-09 16:51:59
  203. Line no.:5523
  204. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  205.  
  206. Query:
  207. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_script_bylist` */
  208.  
  209. Error occured at:2012-12-09 16:51:59
  210. Line no.:5529
  211. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  212.  
  213. Query:
  214. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_script_bylist`(IN script_type VARCHAR(10), IN script_id_list LONGTEXT)
  215. BEGIN
  216. CALL `sp_set_entry_list` (script_id_list,null);
  217. CASE UCASE(script_type)
  218. WHEN 'EAI' THEN BEGIN
  219. DELETE FROM `creature_ai_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  220. END;
  221. WHEN 'GO' THEN BEGIN
  222. DELETE FROM `gameobject_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  223. END;
  224. WHEN 'GOSSIP' THEN BEGIN
  225. DELETE FROM `gossip_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  226. END;
  227. WHEN 'Q_START' THEN BEGIN
  228. DELETE FROM `quest_start_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  229. END;
  230. WHEN 'Q_END' THEN BEGIN
  231. DELETE FROM `quest_end_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  232. END;
  233. WHEN 'SPELL' THEN BEGIN
  234. DELETE FROM `spell_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  235. END;
  236. WHEN 'WP' THEN BEGIN
  237. DELETE FROM `waypoint_scripts` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  238. END;
  239. ELSE CALL INVALID_SCRIPT_TYPE;
  240. END CASE;
  241. DROP TABLE `tdb_entry_list`;
  242. END */
  243.  
  244. Error occured at:2012-12-09 16:51:59
  245. Line no.:5570
  246. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  247.  
  248. Query:
  249. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_spell_area` */
  250.  
  251. Error occured at:2012-12-09 16:51:59
  252. Line no.:5576
  253. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  254.  
  255. Query:
  256. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_spell_area`(IN spell_id INT(10), IN area_id INT(10))
  257. BEGIN
  258.  
  259. IF spell_id IS NOT NULL OR area_id IS NOT NULL THEN
  260. DELETE FROM `spell_area` WHERE `spell`=IFNULL(spell_id,`spell`) AND `area`=IFNULL(area_id,`area`);
  261. ELSE
  262. CALL MUST_PROVIDE_SPELL_OR_AREA;
  263. END IF;
  264. END */
  265.  
  266. Error occured at:2012-12-09 16:51:59
  267. Line no.:5594
  268. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  269.  
  270. Query:
  271. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_spell_position` */
  272.  
  273. Error occured at:2012-12-09 16:51:59
  274. Line no.:5600
  275. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  276.  
  277. Query:
  278. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_spell_position`(IN spell_id INT(10))
  279. BEGIN
  280. DELETE FROM `spell_target_position` WHERE `id`=spell_id;
  281. END */
  282.  
  283. Error occured at:2012-12-09 16:51:59
  284. Line no.:5614
  285. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  286.  
  287. Query:
  288. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_spell_position_bylist` */
  289.  
  290. Error occured at:2012-12-09 16:51:59
  291. Line no.:5620
  292. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  293.  
  294. Query:
  295. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_spell_position_bylist`(IN spell_list LONGTEXT)
  296. BEGIN
  297. CALL `sp_set_entry_list` (spell_list,null);
  298. DELETE FROM `spell_target_position` WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  299. DROP TABLE `tdb_entry_list`;
  300. END */
  301.  
  302. Error occured at:2012-12-09 16:51:59
  303. Line no.:5638
  304. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  305.  
  306. Query:
  307. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_spell_target` */
  308.  
  309. Error occured at:2012-12-09 16:51:59
  310. Line no.:5644
  311. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  312.  
  313. Query:
  314. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_spell_target`(IN spell_id INT(10),IN target_entry INT(10))
  315. BEGIN
  316. IF spell_id IS NOT NULL OR target_entry IS NOT NULL THEN
  317. DELETE FROM `spell_script_target` WHERE `entry`=IFNULL(spell_id,`entry`) AND `targetEntry`=IFNULL(target_entry,`targetEntry`);
  318. ELSE
  319. CALL MUST_PROVIDE_SPELL_OR_TARGET;
  320. END IF;
  321. END */
  322.  
  323. Error occured at:2012-12-09 16:51:59
  324. Line no.:5662
  325. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  326.  
  327. Query:
  328. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_select_id` */
  329.  
  330. Error occured at:2012-12-09 16:51:59
  331. Line no.:5668
  332. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  333.  
  334. Query:
  335. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_select_id`(IN npc_entry INT(10), OUT event_id INT(10))
  336. BEGIN
  337. CALL `sp_error_entry`('NPC',npc_entry);
  338. SET event_id = (SELECT MAX(id)+1 FROM `creature_ai_scripts` WHERE `creature_id`=npc_entry);
  339. DELETE FROM `creature_ai_scripts` WHERE `creature_id`=npc_entry AND `comment` LIKE "Stored procedures eAI%";
  340. END */
  341.  
  342. Error occured at:2012-12-09 16:51:59
  343. Line no.:5684
  344. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  345.  
  346. Query:
  347. /*!50003 DROP PROCEDURE IF EXISTS `sp_delete_spawn` */
  348.  
  349. Error occured at:2012-12-09 16:51:59
  350. Line no.:5690
  351. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  352.  
  353. Query:
  354. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_delete_spawn`(IN spawn_type VARCHAR(10),IN spawn_guid INT(10), IN spawn_entry INT(10))
  355. BEGIN
  356. IF spawn_guid IS NOT NULL OR spawn_entry IS NOT NULL THEN
  357. CASE UCASE(spawn_type)
  358. WHEN 'NPC' THEN BEGIN
  359. DELETE FROM `creature` WHERE `guid`=IFNULL(spawn_guid,`guid`) AND `id`=IFNULL(spawn_entry,`id`);
  360. DELETE FROM `game_event_creature` WHERE `guid`=IFNULL(spawn_guid,-1);
  361. END;
  362. WHEN 'GO' THEN BEGIN
  363. DELETE FROM `gameobject` WHERE `guid`=IFNULL(spawn_guid,`guid`) AND `id`=IFNULL(spawn_entry,`id`);
  364. DELETE FROM `game_event_gameobject` WHERE `guid`=IFNULL(spawn_guid,-1);
  365. END;
  366. ELSE CALL INVALID_SPAWN_TYPE;
  367. END CASE;
  368. ELSE
  369. CALL MUST_PROVIDE_GUID_OR_ENTRY;
  370. END IF;
  371. END */
  372.  
  373. Error occured at:2012-12-09 16:51:59
  374. Line no.:5718
  375. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  376.  
  377. Query:
  378. /*!50003 DROP PROCEDURE IF EXISTS `sp_dev_cleanup_loot` */
  379.  
  380. Error occured at:2012-12-09 16:51:59
  381. Line no.:5724
  382. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  383.  
  384. Query:
  385. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_dev_cleanup_loot`()
  386. BEGIN
  387. CREATE TABLE `Loot_temp` (
  388. `lootid` INT(8) UNSIGNED NOT NULL PRIMARY KEY DEFAULT '0'
  389. );
  390. INSERT IGNORE INTO `Loot_temp` SELECT `entry` FROM `item_template`;
  391. DELETE FROM `prospecting_loot_template` WHERE `entry` NOT IN (SELECT `lootid` FROM `Loot_temp`);
  392. DELETE FROM `Loot_temp`;
  393. INSERT IGNORE INTO `Loot_temp` SELECT `skinloot` FROM `creature_template` WHERE skinloot>0;
  394. DELETE FROM `skinning_loot_template` WHERE `entry` NOT IN (SELECT `lootid` FROM `Loot_temp`);
  395. DELETE FROM `Loot_temp`;
  396. INSERT IGNORE INTO `Loot_temp` SELECT `lootid` FROM `creature_template` WHERE lootid>0;
  397. DELETE FROM `creature_loot_template` WHERE `entry` NOT IN (SELECT `lootid` FROM `Loot_temp`);
  398. DELETE FROM `Loot_temp`;
  399. DROP TABLE `Loot_temp`;
  400. DELETE FROM `disenchant_loot_template` WHERE `item` NOT IN (SELECT `entry` FROM `item_template`);
  401. DELETE FROM `disenchant_loot_template` WHERE `entry` NOT IN (SELECT `disenchantid` FROM `item_template`);
  402. DELETE FROM `pickpocketing_loot_template` WHERE `item` NOT IN (SELECT `entry` FROM `item_template`);
  403. DELETE FROM `prospecting_loot_template` WHERE `entry` NOT IN (SELECT `entry` FROM `item_template`);
  404. DELETE FROM `prospecting_loot_template` WHERE `item` NOT IN (SELECT `entry` FROM `item_template`);
  405. DELETE FROM `mail_loot_template` WHERE `item` NOT IN (SELECT `entry` FROM `item_template`);
  406. END */
  407.  
  408. Error occured at:2012-12-09 16:51:59
  409. Line no.:5758
  410. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  411.  
  412. Query:
  413. /*!50003 DROP PROCEDURE IF EXISTS `sp_dev_cleanup_reference_loot` */
  414.  
  415. Error occured at:2012-12-09 16:51:59
  416. Line no.:5764
  417. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  418.  
  419. Query:
  420. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_dev_cleanup_reference_loot`()
  421. BEGIN
  422. CREATE TABLE `RL_temp` (
  423. `ref_id` INT(8) UNSIGNED NOT NULL PRIMARY KEY DEFAULT '0'
  424. );
  425. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `gameobject_loot_template` WHERE `mincountOrRef` <0;
  426. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `item_loot_template` WHERE `mincountOrRef` <0;
  427. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `creature_loot_template` WHERE `mincountOrRef` <0;
  428. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `spell_loot_template` WHERE `mincountOrRef` <0;
  429. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `prospecting_loot_template` WHERE `mincountOrRef` <0;
  430. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `milling_loot_template` WHERE `mincountOrRef` <0;
  431. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `mail_loot_template` WHERE `mincountOrRef` <0;
  432. INSERT IGNORE INTO `RL_temp` SELECT DISTINCT(`mincountOrRef`)*-1 FROM `reference_loot_template` WHERE `mincountOrRef`<0;
  433. DELETE FROM `reference_loot_template` WHERE `entry` NOT IN (SELECT `ref_id` FROM `RL_temp`);
  434. DROP TABLE `RL_temp`;
  435. END */
  436.  
  437. Error occured at:2012-12-09 16:51:59
  438. Line no.:5792
  439. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  440.  
  441. Query:
  442. /*!50003 DROP PROCEDURE IF EXISTS `sp_dev_reguid_alter_tables` */
  443.  
  444. Error occured at:2012-12-09 16:51:59
  445. Line no.:5798
  446. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  447.  
  448. Query:
  449. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_dev_reguid_alter_tables`()
  450. BEGIN
  451. CREATE TABLE `creature_temp` (
  452. `guid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier',
  453. `id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Creature Identifier',
  454. `map` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
  455. `spawnMask` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
  456. `phaseMask` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '1',
  457. `modelid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
  458. `equipment_id` MEDIUMINT(9) NOT NULL DEFAULT '0',
  459. `position_x` FLOAT NOT NULL DEFAULT '0',
  460. `position_y` FLOAT NOT NULL DEFAULT '0',
  461. `position_z` FLOAT NOT NULL DEFAULT '0',
  462. `orientation` FLOAT NOT NULL DEFAULT '0',
  463. `spawntimesecs` INT(10) UNSIGNED NOT NULL DEFAULT '120',
  464. `spawndist` FLOAT NOT NULL DEFAULT '5',
  465. `currentwaypoint` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
  466. `curhealth` INT(10) UNSIGNED NOT NULL DEFAULT '1',
  467. `curmana` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  468. `DeathState` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
  469. `MovementType` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
  470. `old_guid` INT(10) UNSIGNED NOT NULL,
  471. PRIMARY KEY (`guid`),
  472. KEY `idx_map` (`map`),
  473. KEY `idx_id` (`id`)
  474. ) ENGINE=MYISAM AUTO_INCREMENT=250001 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature System';
  475. ALTER TABLE `creature_addon` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  476. ALTER TABLE `creature_formations` ADD COLUMN `new_guid_leader` INT(10) UNSIGNED NOT NULL;
  477. ALTER TABLE `creature_formations` ADD COLUMN `new_guid_member` INT(10) UNSIGNED NOT NULL;
  478. ALTER TABLE `creature_linked_respawn` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  479. ALTER TABLE `creature_linked_respawn` ADD COLUMN `new_linked_guid` INT(10) UNSIGNED NOT NULL;
  480. ALTER TABLE `game_event_creature` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  481. ALTER TABLE `pool_creature` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  482. ALTER TABLE `game_event_model_equip` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  483. ALTER TABLE `game_event_npc_gossip` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  484. ALTER TABLE `game_event_npc_vendor` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  485. ALTER TABLE `game_event_npcflag` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  486. ALTER TABLE `npc_gossip` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
  487. END */
  488.  
  489. Error occured at:2012-12-09 16:51:59
  490. Line no.:5847
  491. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  492.  
  493. Query:
  494. /*!50003 DROP PROCEDURE IF EXISTS `sp_error_guid` */
  495.  
  496. Error occured at:2012-12-09 16:51:59
  497. Line no.:5853
  498. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  499.  
  500. Query:
  501. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_error_guid`(IN guid_type VARCHAR(10),IN npc_or_go_guid INT(10))
  502. BEGIN
  503. DECLARE check_guid INT;
  504. CASE UPPER(guid_type)
  505. WHEN 'NPC' THEN
  506. SET check_guid = (SELECT COUNT(`guid`) FROM `creature` WHERE `guid`=npc_or_go_guid);
  507. WHEN 'GO' THEN
  508. SET check_guid = (SELECT COUNT(`guid`) FROM `gameobject` WHERE `entry`=npc_or_go_entry);
  509. ELSE
  510. CALL INCORRECT_GUID_TYPE;
  511. END CASE;
  512.  
  513. IF check_guid=0 THEN
  514. CALL INCORRECT_CREATURE_OR_GO_GUID;
  515. END IF;
  516. END */
  517.  
  518. Error occured at:2012-12-09 16:51:59
  519. Line no.:5880
  520. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  521.  
  522. Query:
  523. /*!50003 DROP PROCEDURE IF EXISTS `sp_get_go_lootid` */
  524.  
  525. Error occured at:2012-12-09 16:51:59
  526. Line no.:5886
  527. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  528.  
  529. Query:
  530. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_get_go_lootid`(IN gobjID MEDIUMINT(6),OUT gobjLootID INT(10))
  531. BEGIN
  532. CALL `sp_error_entry`('GO',gobjID);
  533. SELECT `data1` FROM `gameobject_template` WHERE `entry`=gobjID AND `type`=3 INTO gobjLootID;
  534. END */
  535.  
  536. Error occured at:2012-12-09 16:51:59
  537. Line no.:5900
  538. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  539.  
  540. Query:
  541. /*!50003 DROP PROCEDURE IF EXISTS `sp_dev_cleanup_world` */
  542.  
  543. Error occured at:2012-12-09 16:51:59
  544. Line no.:5906
  545. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  546.  
  547. Query:
  548. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_dev_cleanup_world`()
  549. BEGIN
  550. DELETE FROM `gameobject` WHERE `id` NOT IN (SELECT `entry` FROM `gameobject_template`);
  551. DELETE FROM `creature` WHERE `id` NOT IN (SELECT `entry` FROM `creature_template`);
  552. DELETE FROM areatrigger_involvedrelation WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  553. DELETE FROM `battlemaster_entry` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_template`);
  554. DELETE FROM `battlemaster_entry` WHERE `bg_template` NOT IN (SELECT `id` FROM `battleground_template`);
  555. UPDATE `creature` SET `equipment_id`=0 WHERE `equipment_id` NOT IN (SELECT `entry` FROM `creature_equip_template`) AND `equipment_id`!=0;
  556. DELETE FROM `creature_addon` WHERE `guid` NOT IN (SELECT `guid` FROM `creature`);
  557. DELETE FROM `creature_ai_scripts` WHERE `creature_id` NOT IN (SELECT `entry` FROM `creature_template`);
  558. DELETE FROM `creature_formations` WHERE leaderGUID NOT IN (SELECT `guid` FROM `creature`);
  559. DELETE FROM `creature_formations` WHERE memberGUID NOT IN (SELECT `guid` FROM `creature`);
  560. DELETE FROM `creature_involvedrelation` WHERE `id` NOT IN (SELECT `entry` FROM `creature_template`);
  561. DELETE FROM `creature_involvedrelation` WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  562. DELETE FROM `creature_linked_respawn` WHERE `guid` NOT IN (SELECT `guid` FROM `creature`);
  563. DELETE FROM `creature_linked_respawn` WHERE `linkedGuid` NOT IN (SELECT `guid` FROM `creature`);
  564. DELETE FROM `creature_onkill_reputation` WHERE `creature_id` NOT IN (SELECT `entry` FROM `creature_template`);
  565. DELETE FROM `creature_questrelation` WHERE `id` NOT IN (SELECT `entry` FROM `creature_template`);
  566. DELETE FROM `creature_questrelation` WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  567. DELETE FROM `creature_template_addon` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_template`);
  568. DELETE FROM `game_event_creature_quest` WHERE `id` NOT IN (SELECT `entry` FROM `creature_template`);
  569. DELETE FROM `game_event_creature_quest` WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  570. DELETE FROM `game_event_creature_quest` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  571. DELETE FROM `game_event_gameobject_quest` WHERE `id` NOT IN (SELECT `entry` FROM `gameobject_template`);
  572. DELETE FROM `game_event_gameobject_quest` WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  573. DELETE FROM `game_event_gameobject_quest` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  574. DELETE FROM `game_event_npc_gossip` WHERE `event_id` NOT IN (SELECT `entry` FROM `game_event`);
  575. DELETE FROM `game_event_model_equip` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  576. DELETE FROM `game_event_battleground_holiday` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  577. DELETE FROM `game_event_condition` WHERE `event_id` NOT IN (SELECT `entry` FROM `game_event`);
  578. DELETE FROM `game_event_creature` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  579. DELETE FROM `game_event_gameobject` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  580. DELETE FROM `game_event_npc_vendor` WHERE `item` NOT IN (SELECT `entry` FROM `item_template`);
  581. DELETE FROM `game_event_npc_vendor` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  582. DELETE FROM `game_event_npcflag` WHERE `event_id` NOT IN (SELECT `entry` FROM `game_event`);
  583. DELETE FROM `game_event_pool` WHERE `event` NOT IN (SELECT `entry` FROM `game_event`);
  584. DELETE FROM `game_event_prerequisite` WHERE `event_id` NOT IN (SELECT `entry` FROM `game_event`);
  585. DELETE FROM `game_event_prerequisite` WHERE `prerequisite_event` NOT IN (SELECT `entry` FROM `game_event`);
  586. DELETE FROM `game_event_quest_condition` WHERE `event_id` NOT IN (SELECT `entry` FROM `game_event`);
  587. DELETE FROM `game_event_quest_condition` WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  588. DELETE FROM `gameobject_involvedrelation` WHERE `id` NOT IN (SELECT `entry` FROM `gameobject_template`);
  589. DELETE FROM `gameobject_involvedrelation` WHERE `quest` NOT IN (SELECT `entry` FROM `quest_template`);
  590. DELETE FROM `item_required_target` WHERE `targetEntry` NOT IN (SELECT `entry` FROM `creature_template`) AND `type` IN (1,2);
  591. DELETE FROM `mail_level_reward` WHERE `senderEntry` NOT IN (SELECT `entry` FROM `creature_template`);
  592. DELETE FROM `npc_gossip` WHERE `npc_guid` NOT IN (SELECT `guid` FROM `creature`);
  593. DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` NOT IN (SELECT `entry` FROM `creature_template`);
  594. DELETE FROM `npc_spellclick_spells` WHERE `quest_start` NOT IN (SELECT `entry` FROM `quest_template`) AND `quest_start`<>0;
  595. DELETE FROM `npc_spellclick_spells` WHERE `quest_end` NOT IN (SELECT `entry` FROM `quest_template`) AND `quest_end`<>0;
  596. DELETE FROM `npc_trainer` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_template`);
  597. DELETE FROM `npc_vendor` WHERE `entry` NOT IN (SELECT `entry` FROM `creature_template`);
  598. DELETE FROM `npc_vendor` WHERE `item` NOT IN (SELECT `entry` FROM `item_template`);
  599. DELETE FROM `pet_levelstats` WHERE `creature_entry` NOT IN (SELECT `entry` FROM `creature_template`);
  600. DELETE FROM `quest_end_scripts` WHERE `id` NOT IN (SELECT `CompleteScript` FROM `quest_template`);
  601. DELETE FROM `quest_start_scripts` WHERE `id` NOT IN (SELECT `StartScript` FROM `quest_template`);
  602. DELETE FROM `spell_script_target` WHERE `targetEntry` NOT IN (SELECT `entry` FROM `creature_template`) AND `type` IN (1,2,3) AND `targetEntry`!=0;
  603. DELETE FROM `spell_script_target` WHERE `targetEntry` NOT IN (SELECT `entry` FROM `gameobject_template`) AND `type`=0 AND `targetEntry`!=0;
  604. END */
  605.  
  606. Error occured at:2012-12-09 16:51:59
  607. Line no.:5973
  608. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  609.  
  610. Query:
  611. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_item_money` */
  612.  
  613. Error occured at:2012-12-09 16:51:59
  614. Line no.:5979
  615. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  616.  
  617. Query:
  618. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_item_money`(IN item_entry INT, IN min_money INT, IN max_money INT)
  619. BEGIN
  620. CALL sp_error_entry('ITEM',item_entry);
  621. UPDATE item_template SET minMoneyLoot=min_money, maxMoneyLoot=max_money WHERE entry = item_entry;
  622. END */
  623.  
  624. Error occured at:2012-12-09 16:51:59
  625. Line no.:5994
  626. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  627.  
  628. Query:
  629. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_aggro` */
  630.  
  631. Error occured at:2012-12-09 16:51:59
  632. Line no.:6000
  633. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  634.  
  635. Query:
  636. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_aggro`(IN creature_entry INT(10),IN on_off BOOLEAN)
  637. BEGIN
  638. CALL `sp_error_entry`('NPC',creature_entry);
  639. IF on_off = 1 THEN
  640. UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2 WHERE `entry`= creature_entry;
  641. ELSE
  642. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE `entry`= creature_entry;
  643. END IF;
  644. END */
  645.  
  646. Error occured at:2012-12-09 16:51:59
  647. Line no.:6019
  648. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  649.  
  650. Query:
  651. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_aggro_bylist` */
  652.  
  653. Error occured at:2012-12-09 16:51:59
  654. Line no.:6025
  655. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  656.  
  657. Query:
  658. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_aggro_bylist`(IN entry_list LONGTEXT,IN on_off BOOLEAN)
  659. BEGIN
  660. CALL `sp_set_entry_list` (entry_list,null);
  661. IF on_off = 1 THEN
  662. UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2 WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  663. ELSE
  664. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  665. END IF;
  666. DROP TABLE `tdb_entry_list`;
  667. END */
  668.  
  669. Error occured at:2012-12-09 16:51:59
  670. Line no.:6047
  671. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  672.  
  673. Query:
  674. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_attackable` */
  675.  
  676. Error occured at:2012-12-09 16:51:59
  677. Line no.:6053
  678. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  679.  
  680. Query:
  681. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_attackable`(IN npc_entry INT, IN on_off BOOLEAN)
  682. BEGIN
  683. CALL sp_error_entry('NPC',npc_entry);
  684. IF on_off = 1 THEN
  685. UPDATE `creature_template` SET `unit_flags`=`unit_flags`|256 WHERE `entry`= npc_entry;
  686. END IF;
  687. IF on_off = 0 THEN
  688. UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry`= npc_entry;
  689. END IF;
  690. END */
  691.  
  692. Error occured at:2012-12-09 16:51:59
  693. Line no.:6073
  694. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  695.  
  696. Query:
  697. /*!50003 DROP PROCEDURE IF EXISTS `sp_dev_re_guid` */
  698.  
  699. Error occured at:2012-12-09 16:51:59
  700. Line no.:6079
  701. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  702.  
  703. Query:
  704. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_dev_re_guid`(IN new_base_guid INT(10))
  705. BEGIN
  706. CALL `sp_dev_reguid_alter_tables`();
  707. SET @s = CONCAT("ALTER TABLE `creature_temp` AUTO_INCREMENT=",new_base_guid,";");
  708. PREPARE STM FROM @s;
  709. EXECUTE STM;
  710. INSERT INTO `creature_temp` (id,map,spawnMask,phaseMask,modelid,equipment_id,position_x,position_y,position_z,orientation,spawndist,currentwaypoint,curhealth,curmana,DeathState,MovementType,old_guid)
  711. SELECT id,map,spawnMask,phaseMask,modelid,equipment_id,position_x,position_y,position_z,orientation,spawndist,currentwaypoint,curhealth,curmana,DeathState,MovementType,guid FROM `creature` ORDER BY `id` ASC;
  712. UPDATE `creature_temp` SET guid = old_guid WHERE `old_guid`>250000;
  713. UPDATE game_event_npc_gossip p
  714. INNER JOIN creature_temp pp
  715. ON p.guid = pp.old_guid
  716. SET p.new_guid = pp.guid;
  717. UPDATE game_event_npc_vendor p
  718. INNER JOIN creature_temp pp
  719. ON p.guid = pp.old_guid
  720. SET p.new_guid = pp.guid;
  721. UPDATE game_event_npcflag p
  722. INNER JOIN creature_temp pp
  723. ON p.guid = pp.old_guid
  724. SET p.new_guid = pp.guid;
  725. UPDATE npc_gossip p
  726. INNER JOIN creature_temp pp
  727. ON p.npc_guid = pp.old_guid
  728. SET p.new_guid = pp.guid;
  729. UPDATE game_event_model_equip p
  730. INNER JOIN creature_temp pp
  731. ON p.guid = pp.old_guid
  732. SET p.new_guid = pp.guid;
  733. UPDATE creature_addon p
  734. INNER JOIN creature_temp pp
  735. ON p.guid = pp.old_guid
  736. SET p.new_guid = pp.guid;
  737. UPDATE creature_formations p
  738. INNER JOIN creature_temp pp
  739. ON p.leaderGUID = pp.old_guid
  740. SET p.new_guid_leader = pp.guid;
  741. UPDATE creature_formations p
  742. INNER JOIN creature_temp pp
  743. ON p.memberGUID = pp.old_guid
  744. SET p.new_guid_member = pp.guid;
  745. UPDATE creature_linked_respawn p
  746. INNER JOIN creature_temp pp
  747. ON p.guid = pp.old_guid
  748. SET p.new_guid = pp.guid;
  749. UPDATE creature_linked_respawn p
  750. INNER JOIN creature_temp pp
  751. ON p.guid = pp.old_guid
  752. SET p.new_linked_guid = pp.guid;
  753. UPDATE game_event_creature p
  754. INNER JOIN creature_temp pp
  755. ON p.guid = pp.old_guid
  756. SET p.new_guid = pp.guid;
  757. UPDATE pool_creature p
  758. INNER JOIN creature_temp pp
  759. ON p.guid = pp.old_guid
  760. SET p.new_guid = pp.guid;
  761. ALTER TABLE `creature_temp` DROP COLUMN `old_guid`;
  762. DROP TABLE `creature`;
  763. RENAME TABLE `creature_temp` TO `creature`;
  764. ALTER TABLE game_event_npc_gossip DISABLE KEYS;
  765. UPDATE `game_event_npc_gossip` SET `guid`=`new_guid`;
  766. ALTER TABLE `game_event_npc_gossip` DROP COLUMN `new_guid`;
  767. ALTER TABLE game_event_npc_gossip ENABLE KEYS;
  768. ALTER TABLE game_event_npc_vendor DISABLE KEYS;
  769. UPDATE `game_event_npc_vendor` SET `guid`=`new_guid`;
  770. ALTER TABLE `game_event_npc_vendor` DROP COLUMN `new_guid`;
  771. ALTER TABLE game_event_npc_vendor ENABLE KEYS;
  772. ALTER TABLE game_event_npcflag DISABLE KEYS;
  773. UPDATE `game_event_npcflag` SET `guid`=`new_guid`;
  774. ALTER TABLE `game_event_npcflag` DROP COLUMN `new_guid`;
  775. ALTER TABLE game_event_npcflag ENABLE KEYS;
  776. ALTER TABLE `npc_gossip` DROP PRIMARY KEY;
  777. UPDATE `npc_gossip` SET `npc_guid`=`new_guid`;
  778. SELECT npc_guid,new_guid FROM npc_gossip;
  779. ALTER TABLE `npc_gossip` DROP COLUMN `new_guid`;
  780. ALTER TABLE `npc_gossip` ADD PRIMARY KEY(`npc_guid`);
  781. ALTER TABLE game_event_model_equip DISABLE KEYS;
  782. UPDATE `game_event_model_equip` SET `guid`=`new_guid`;
  783. ALTER TABLE `game_event_model_equip` DROP COLUMN `new_guid`;
  784. ALTER TABLE game_event_model_equip ENABLE KEYS;
  785. ALTER TABLE `creature_addon` DROP PRIMARY KEY;
  786. UPDATE `creature_addon` SET `guid`=`new_guid`;
  787. ALTER TABLE `creature_addon` DROP COLUMN `new_guid`;
  788. ALTER TABLE `creature_addon` ADD PRIMARY KEY(`guid`);
  789. ALTER TABLE creature_formations DISABLE KEYS;
  790. UPDATE `creature_formations` SET leaderGUID = new_guid_leader;
  791. ALTER TABLE `creature_formations` DROP COLUMN `new_guid_leader`;
  792. UPDATE `creature_formations` SET memberGUID = new_guid_member;
  793. ALTER TABLE `creature_formations` DROP COLUMN `new_guid_member`;
  794. ALTER TABLE creature_formations ENABLE KEYS;
  795. ALTER TABLE `creature_linked_respawn` DROP PRIMARY KEY;
  796. UPDATE `creature_linked_respawn` SET guid = new_guid;
  797. ALTER TABLE `creature_linked_respawn` DROP COLUMN `new_guid`;
  798. UPDATE `creature_linked_respawn` SET linkedGuid = new_linked_guid;
  799. ALTER TABLE `creature_linked_respawn` DROP COLUMN `new_linked_guid`;
  800. ALTER TABLE `creature_linked_respawn` ADD PRIMARY KEY(`guid`);
  801. ALTER TABLE `game_event_creature` DROP PRIMARY KEY;
  802. UPDATE `game_event_creature` SET guid = new_guid;
  803. ALTER TABLE `game_event_creature` DROP COLUMN `new_guid`;
  804. ALTER TABLE `game_event_creature` ADD PRIMARY KEY(`guid`);
  805. ALTER TABLE pool_creature DISABLE KEYS;
  806. UPDATE `pool_creature` SET guid = new_guid;
  807. ALTER TABLE `pool_creature` DROP COLUMN `new_guid`;
  808. ALTER TABLE pool_creature ENABLE KEYS;
  809. END */
  810.  
  811. Error occured at:2012-12-09 16:51:59
  812. Line no.:6196
  813. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  814.  
  815. Query:
  816. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_civilian` */
  817.  
  818. Error occured at:2012-12-09 16:51:59
  819. Line no.:6202
  820. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  821.  
  822. Query:
  823. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_civilian`(IN npc_entry INT(10), IN on_off BOOLEAN)
  824. BEGIN
  825. CALL sp_error_entry('NPC',npc_entry);
  826. IF on_off = 1 THEN
  827. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE `entry`= npc_entry;
  828. ELSEIF on_off = 0 THEN
  829. UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2 WHERE `entry`= npc_entry;
  830. END IF;
  831. END */
  832.  
  833. Error occured at:2012-12-09 16:51:59
  834. Line no.:6221
  835. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  836.  
  837. Query:
  838. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_faction` */
  839.  
  840. Error occured at:2012-12-09 16:51:59
  841. Line no.:6227
  842. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  843.  
  844. Query:
  845. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_faction`(IN npc_entry INT(10), factionA INT(10), factionH INT(10))
  846. BEGIN
  847. CALL `sp_error_entry`('NPC',npc_entry);
  848. UPDATE `creature_template` SET `faction_A`=IFNULL(factionA,`faction_A`),`faction_H`=IFNULL(factionH,`faction_A`) WHERE `entry`=npc_entry;
  849. END */
  850.  
  851. Error occured at:2012-12-09 16:51:59
  852. Line no.:6242
  853. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  854.  
  855. Query:
  856. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_faction_bylist` */
  857.  
  858. Error occured at:2012-12-09 16:51:59
  859. Line no.:6248
  860. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  861.  
  862. Query:
  863. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_faction_bylist`(IN entry_list LONGTEXT, factionA INT(10), factionH INT(10))
  864. BEGIN
  865. CALL `sp_set_entry_list` (entry_list,null);
  866. UPDATE `creature_template` SET `faction_A`=IFNULL(factionA,`faction_A`),`faction_H`=IFNULL(factionH,`faction_A`) WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  867. DROP TABLE `tdb_entry_list`;
  868. END */
  869.  
  870. Error occured at:2012-12-09 16:51:59
  871. Line no.:6266
  872. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  873.  
  874. Query:
  875. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_cast_onspawn` */
  876.  
  877. Error occured at:2012-12-09 16:51:59
  878. Line no.:6272
  879. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  880.  
  881. Query:
  882. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_cast_onspawn`(IN npc_entry INT(10), spell_id MEDIUMINT(6))
  883. BEGIN
  884. CALL `sp_error_entry`('NPC',npc_entry);
  885. UPDATE `creature_template` SET `AIName`= 'EventAI' WHERE `entry`=npc_entry;
  886.  
  887. CALL `sp_eai_select_id`(npc_entry,@event_id);
  888.  
  889. INSERT INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
  890. (@event_id,npc_entry,11,0,100,0,0,0,0,0,11,spell_id,0,0,0,0,0,0,0,0,0,0, 'Stored procedures eAI: NPC cast spell on self');
  891. END */
  892.  
  893. Error occured at:2012-12-09 16:51:59
  894. Line no.:6293
  895. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  896.  
  897. Query:
  898. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_inverse_phase_mask` */
  899.  
  900. Error occured at:2012-12-09 16:51:59
  901. Line no.:6299
  902. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  903.  
  904. Query:
  905. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_inverse_phase_mask`(IN max_phase INT, IN phase_list VARCHAR(255))
  906. BEGIN
  907. DECLARE max_phase_mask INT;
  908. DECLARE phase_yes INT;
  909. DECLARE inverse_phase_mask INT;
  910. CALL `sp_eai_table_phase_mask`();
  911. CALL `sp_set_entry_list`(phase_list);
  912. SET max_phase_mask = (SELECT SUM(phase_mask) FROM phase_mask WHERE phaseID <= max_phase);
  913. SET phase_yes = (SELECT SUM(phase_mask) FROM phase_mask WHERE phaseID IN (SELECT `value` FROM tdb_entry_list));
  914. SET inverse_phase_mask = (max_phase_mask - phase_yes);
  915. DROP TABLE `tdb_entry_list`;
  916. DROP TABLE `phase_mask`;
  917. IF inverse_phase_mask < 0 THEN
  918. SELECT "PhaseID is bigger then maximum phase entered" AS `inverse_phase_mask`;
  919. ELSE IF phase_list="0" THEN
  920. SELECT 0 AS `inverse_phase_mask`;
  921. ELSE
  922. SELECT inverse_phase_mask;
  923. END IF;
  924. END IF;
  925. END */
  926.  
  927. Error occured at:2012-12-09 16:51:59
  928. Line no.:6330
  929. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  930.  
  931. Query:
  932. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_kill_ondeath` */
  933.  
  934. Error occured at:2012-12-09 16:51:59
  935. Line no.:6336
  936. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  937.  
  938. Query:
  939. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_kill_ondeath`(IN npc_entry INT(10), trigger_id INT(10))
  940. BEGIN
  941. CALL `sp_error_entry`('NPC',npc_entry);
  942. UPDATE `creature_template` SET `AIName`= 'EventAI' WHERE `entry`=npc_entry;
  943.  
  944. CALL `sp_eai_select_id`(npc_entry, @event_id);
  945. INSERT INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
  946. (@event_id,npc_entry,6,0,100,0,0,0,0,0,33,trigger_id,6,0,23,1,0,0,0,0,0,0, 'Stored procedures eAI: quest - kill trigger on NPC death');
  947. END */
  948.  
  949. Error occured at:2012-12-09 16:51:59
  950. Line no.:6356
  951. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  952.  
  953. Query:
  954. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_quest_credit_on_spellhit` */
  955.  
  956. Error occured at:2012-12-09 16:51:59
  957. Line no.:6362
  958. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  959.  
  960. Query:
  961. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_quest_credit_on_spellhit`(IN npc_entry INT(10), spell_id MEDIUMINT(6), trigger_id INT(10), despawn_time INT(10))
  962. BEGIN
  963. CALL `sp_error_entry`('NPC',npc_entry);
  964. CALL `sp_error_trigger` (trigger_id);
  965. UPDATE `creature_template` SET `AIName`= 'EventAI' WHERE `entry`=npc_entry;
  966.  
  967. CALL `sp_eai_select_id` (npc_entry, @event_id);
  968. INSERT INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
  969. (@event_id,npc_entry,8,0,100,1,spell_ID,-1,0,0,33,trigger_ID,6,0,23,1,0,0,0,0,0,0, 'Stored procedures eAI: quest - kill trigger on spellcast');
  970. INSERT INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
  971. (@event_id+1,npc_entry,1,1,100,0,despawn_time,despawn_time,despawn_time,despawn_time,41,0,0,0,0,0,0,0,0,0,0,0, 'Stored procedures eAI: despawn after defined time');
  972. END */
  973.  
  974. Error occured at:2012-12-09 16:51:59
  975. Line no.:6384
  976. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  977.  
  978. Query:
  979. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_spawn_spellhit` */
  980.  
  981. Error occured at:2012-12-09 16:51:59
  982. Line no.:6390
  983. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  984.  
  985. Query:
  986. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_spawn_spellhit`(IN npc_entry INT(10),IN spell_id MEDIUMINT(6),IN spawn_id INT(10),IN despawn_time INT(10))
  987. BEGIN
  988. CALL `sp_error_entry`('NPC',npc_entry);
  989. CALL `sp_error_entry`('NPC',spawn_id);
  990. UPDATE `creature_template` SET `AIName`= 'EventAI' WHERE `entry`=npc_entry;
  991. CALL `sp_eai_select_id`(npc_entry,@event_id);
  992. INSERT INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
  993. (@event_id,npc_entry,8,0,100,1,spell_id,-1,0,0,32,spawn_id,6,0,41,0,0,0,0,0,0,0, 'Stored procedures eAI: quest - summon mob on spellcast');
  994. INSERT INTO `creature_ai_scripts` (`id`,`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
  995. (@event_id+1,spawn_id,1,1,100,0,despawn_time,despawn_time,despawn_time,despawn_time,41,0,0,0,0,0,0,0,0,0,0,0, 'Stored procedures eAI: despawn after defined time');
  996. END */
  997.  
  998. Error occured at:2012-12-09 16:51:59
  999. Line no.:6413
  1000. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1001.  
  1002. Query:
  1003. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_lootable` */
  1004.  
  1005. Error occured at:2012-12-09 16:51:59
  1006. Line no.:6419
  1007. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1008.  
  1009. Query:
  1010. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_lootable`(IN npc_entry INT(10), IN on_off BOOLEAN)
  1011. BEGIN
  1012. CALL sp_error_entry('NPC',npc_entry);
  1013. IF on_off = 1 THEN
  1014. UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`&~1 WHERE `entry`= npc_entry;
  1015. ELSEIF on_off = 0 THEN
  1016. UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`|1 WHERE `entry`= npc_entry;
  1017. END IF;
  1018. END */
  1019.  
  1020. Error occured at:2012-12-09 16:51:59
  1021. Line no.:6439
  1022. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1023.  
  1024. Query:
  1025. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_lootid` */
  1026.  
  1027. Error occured at:2012-12-09 16:51:59
  1028. Line no.:6445
  1029. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1030.  
  1031. Query:
  1032. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_lootid`(IN npcEntry MEDIUMINT(5),IN lootID MEDIUMINT(5))
  1033. BEGIN
  1034. CALL `sp_error_entry`('NPC',npcEntry);
  1035. UPDATE `creature_template` SET `lootid`=IFNULL(lootID,npcEntry) WHERE `entry`=npcEntry;
  1036. END */
  1037.  
  1038. Error occured at:2012-12-09 16:51:59
  1039. Line no.:6460
  1040. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1041.  
  1042. Query:
  1043. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_lootid_bylist` */
  1044.  
  1045. Error occured at:2012-12-09 16:51:59
  1046. Line no.:6466
  1047. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1048.  
  1049. Query:
  1050. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_lootid_bylist`(IN entryList LONGTEXT,IN lootID MEDIUMINT(5))
  1051. BEGIN
  1052. CALL `sp_set_entry_list` (entryList,null);
  1053. UPDATE `creature_template` SET `lootid`=IFNULL(lootID,`entry`) WHERE `entry` IN (SELECT DISTINCT * FROM `tdb_entry_list`);
  1054.  
  1055. DROP TABLE `tdb_entry_list`;
  1056. END */
  1057.  
  1058. Error occured at:2012-12-09 16:51:59
  1059. Line no.:6483
  1060. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1061.  
  1062. Query:
  1063. /*!50003 DROP PROCEDURE IF EXISTS `sp_eai_table_phase_mask` */
  1064.  
  1065. Error occured at:2012-12-09 16:51:59
  1066. Line no.:6489
  1067. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1068.  
  1069. Query:
  1070. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_eai_table_phase_mask`()
  1071. BEGIN
  1072.  
  1073. CREATE TABLE `phase_mask`(
  1074. `phaseID` INT(2) NOT NULL DEFAULT '0' ,
  1075. `phase_mask` INT(11) UNSIGNED NOT NULL DEFAULT '0' ,
  1076. PRIMARY KEY (`phaseID`));
  1077. INSERT INTO phase_mask VALUES
  1078. (0,1),
  1079. (1,2),
  1080. (2,4),
  1081. (3,8),
  1082. (4,16),
  1083. (5,32),
  1084. (6,64),
  1085. (7,128),
  1086. (8,256),
  1087. (9,512),
  1088. (10,1024),
  1089. (11,2048),
  1090. (12,4096),
  1091. (13,8192),
  1092. (14,16384),
  1093. (15,32768),
  1094. (16,65536),
  1095. (17,131072),
  1096. (18,262144),
  1097. (19,524288),
  1098. (20,1048576),
  1099. (21,2097152),
  1100. (22,4194304),
  1101. (23,8388608),
  1102. (24,16777216),
  1103. (25,33554432),
  1104. (26,67108864),
  1105. (27,134217728),
  1106. (28,268435456),
  1107. (29,536870912),
  1108. (30,1073741824),
  1109. (31,2147483648);
  1110. END */
  1111.  
  1112. Error occured at:2012-12-09 16:51:59
  1113. Line no.:6539
  1114. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1115.  
  1116. Query:
  1117. /*!50003 DROP PROCEDURE IF EXISTS `sp_error_entry` */
  1118.  
  1119. Error occured at:2012-12-09 16:51:59
  1120. Line no.:6545
  1121. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1122.  
  1123. Query:
  1124. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_error_entry`(IN entry_type VARCHAR(10), IN e_entry INT(10))
  1125. BEGIN
  1126. DECLARE check_entry INT;
  1127. CASE UPPER(entry_type)
  1128. WHEN 'NPC' THEN
  1129. SET check_entry = (SELECT COUNT(`entry`) FROM `creature_template` WHERE `entry`=e_entry);
  1130. WHEN 'GO' THEN
  1131. SET check_entry = (SELECT COUNT(`entry`) FROM `gameobject_template` WHERE `entry`=e_entry);
  1132. WHEN 'ITEM' THEN
  1133. SET check_entry = (SELECT COUNT(`entry`) FROM `item_template` WHERE `entry`=e_entry);
  1134. WHEN 'QUEST' THEN
  1135. SET check_entry = (SELECT COUNT(`entry`) FROM `quest_template` WHERE `entry`=e_entry);
  1136. ELSE
  1137. CALL INCORRECT_ENTRY_TYPE;
  1138. END CASE;
  1139.  
  1140. IF check_entry=0 THEN
  1141. CALL INCORRECT_ENTRY;
  1142. END IF;
  1143. END */
  1144.  
  1145. Error occured at:2012-12-09 16:51:59
  1146. Line no.:6576
  1147. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1148.  
  1149. Query:
  1150. /*!50003 DROP PROCEDURE IF EXISTS `sp_error_trigger` */
  1151.  
  1152. Error occured at:2012-12-09 16:51:59
  1153. Line no.:6582
  1154. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1155.  
  1156. Query:
  1157. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_error_trigger`(IN trigger_entry INT)
  1158. BEGIN
  1159. DECLARE Check_trigger INT;
  1160. SET Check_trigger = (SELECT COUNT(ReqCreatureOrGOId1) FROM `quest_template` WHERE `ReqCreatureOrGOId1`= trigger_entry)
  1161. + (SELECT COUNT(ReqCreatureOrGOId2) FROM `quest_template` WHERE `ReqCreatureOrGOId2`= trigger_entry)
  1162. + (SELECT COUNT(ReqCreatureOrGOId3) FROM `quest_template` WHERE `ReqCreatureOrGOId3`= trigger_entry)
  1163. + (SELECT COUNT(ReqCreatureOrGOId4) FROM `quest_template` WHERE `ReqCreatureOrGOId4`= trigger_entry);
  1164. IF Check_trigger = 0 THEN
  1165. CALL NO_QUEST_WITH_REQUIREMENT();
  1166. END IF;
  1167. END */
  1168.  
  1169. Error occured at:2012-12-09 16:51:59
  1170. Line no.:6603
  1171. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1172.  
  1173. Query:
  1174. /*!50003 DROP PROCEDURE IF EXISTS `sp_get_npc_diffentry` */
  1175.  
  1176. Error occured at:2012-12-09 16:51:59
  1177. Line no.:6609
  1178. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1179.  
  1180. Query:
  1181. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_get_npc_diffentry`(IN normalEntry MEDIUMINT(5),IN difficulty TINYINT(1),OUT output MEDIUMINT(8))
  1182. BEGIN
  1183. CALL `sp_error_entry`('NPC',normalEntry);
  1184. CASE difficulty
  1185. WHEN 1 THEN BEGIN
  1186. SELECT `difficulty_entry_1` FROM `creature_template` WHERE `entry`=normalEntry INTO output;
  1187. END;
  1188. WHEN 2 THEN BEGIN
  1189. SELECT `difficulty_entry_2` FROM `creature_template` WHERE `entry`=normalEntry INTO output;
  1190. END;
  1191. WHEN 3 THEN BEGIN
  1192. SELECT `difficulty_entry_3` FROM `creature_template` WHERE `entry`=normalEntry INTO output;
  1193. END;
  1194. ELSE CALL INVALID_DIFFICULTY();
  1195. END CASE;
  1196. END */
  1197.  
  1198. Error occured at:2012-12-09 16:51:59
  1199. Line no.:6636
  1200. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1201.  
  1202. Query:
  1203. /*!50003 DROP PROCEDURE IF EXISTS `sp_get_ref_id` */
  1204.  
  1205. Error occured at:2012-12-09 16:51:59
  1206. Line no.:6642
  1207. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1208.  
  1209. Query:
  1210. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_get_ref_id`(IN refType VARCHAR(10),OUT reference MEDIUMINT(5))
  1211. BEGIN
  1212. CASE UCASE(refType)
  1213. WHEN 'SKIN' THEN BEGIN
  1214. SET @Low :=00000;
  1215. SET @High :=1000;
  1216. END;
  1217. WHEN 'ITEM' THEN BEGIN
  1218. SET @Low :=10000;
  1219. SET @High :=10999;
  1220. END;
  1221. WHEN 'FISH' THEN BEGIN
  1222. SET @Low :=11000;
  1223. SET @High :=11799;
  1224. END;
  1225. WHEN 'MILL' THEN BEGIN
  1226. SET @Low :=11800;
  1227. SET @High :=11999;
  1228. END;
  1229. WHEN 'RAID_GOBJ' THEN BEGIN
  1230. SET @Low :=12000;
  1231. SET @High :=12899;
  1232. END;
  1233. WHEN 'MINE' THEN BEGIN
  1234. SET @Low :=12900;
  1235. SET @High :=12999;
  1236. END;
  1237. WHEN 'PROSPECT' THEN BEGIN
  1238. SET @Low :=13000;
  1239. SET @High :=13999;
  1240. END;
  1241. WHEN 'WORLD' THEN BEGIN
  1242. SET @Low :=14000;
  1243. SET @High :=29000;
  1244. END;
  1245. WHEN 'RAID_CRE' THEN BEGIN
  1246. SET @Low :=34000;
  1247. SET @High :=34999;
  1248. END;
  1249. WHEN 'DUNGEON' THEN BEGIN
  1250. SET @Low :=35000;
  1251. SET @High :=35999;
  1252. END;
  1253. ELSE CALL INVALID_REFERENCE_TYPE;
  1254. END CASE;
  1255. SET reference :=1+(SELECT `entry` FROM `reference_loot_template` WHERE `entry` BETWEEN @Low AND @High ORDER BY `entry` DESC LIMIT 1);
  1256. END */
  1257.  
  1258. Error occured at:2012-12-09 16:51:59
  1259. Line no.:6699
  1260. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1261.  
  1262. Query:
  1263. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_lootid_bytable` */
  1264.  
  1265. Error occured at:2012-12-09 16:51:59
  1266. Line no.:6705
  1267. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1268.  
  1269. Query:
  1270. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_lootid_bytable`(IN lootID MEDIUMINT(5))
  1271. BEGIN
  1272. UPDATE `creature_template` SET `lootid`=IFNULL(lootID,`entry`) WHERE `entry` IN (SELECT DISTINCT * FROM `tdb_entry_list`);
  1273. END */
  1274.  
  1275. Error occured at:2012-12-09 16:51:59
  1276. Line no.:6719
  1277. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1278.  
  1279. Query:
  1280. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_path` */
  1281.  
  1282. Error occured at:2012-12-09 16:51:59
  1283. Line no.:6725
  1284. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1285.  
  1286. Query:
  1287. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_path`(IN npc_guid INT(10),OUT path INT(10))
  1288. BEGIN
  1289. CALL `sp_error_guid`('NPC',npc_guid);
  1290.  
  1291. SELECT npc_guid*10 INTO path;
  1292. UPDATE `creature` SET `MovementType`=2,`spawndist`=0 WHERE `guid`=npc_guid;
  1293. IF (SELECT COUNT(*) FROM `creature_addon` WHERE `guid`=npc_guid) > 0 THEN
  1294. UPDATE `creature_addon` SET `path_id`=path WHERE `guid`=npc_guid;
  1295. ELSE
  1296. INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (npc_guid,path);
  1297. END IF;
  1298.  
  1299. DELETE FROM `waypoint_data` WHERE `id`=path;
  1300. END */
  1301.  
  1302. Error occured at:2012-12-09 16:51:59
  1303. Line no.:6751
  1304. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1305.  
  1306. Query:
  1307. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_selectable` */
  1308.  
  1309. Error occured at:2012-12-09 16:51:59
  1310. Line no.:6757
  1311. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1312.  
  1313. Query:
  1314. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_selectable`(IN npc_entry INT(10),IN on_off BOOLEAN)
  1315. BEGIN
  1316. CALL `sp_error_entry`('NPC',npc_entry);
  1317. IF on_off=1 THEN
  1318. UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~33554432 WHERE `entry`=npc_entry;
  1319. ELSE
  1320. UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432 WHERE `entry`=npc_entry;
  1321. END IF;
  1322. END */
  1323.  
  1324. Error occured at:2012-12-09 16:51:59
  1325. Line no.:6776
  1326. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1327.  
  1328. Query:
  1329. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_selectable_bylist` */
  1330.  
  1331. Error occured at:2012-12-09 16:51:59
  1332. Line no.:6782
  1333. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1334.  
  1335. Query:
  1336. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_selectable_bylist`(IN entry_list LONGTEXT,IN on_off BOOLEAN)
  1337. BEGIN
  1338. CALL `sp_set_entry_list` (entry_list,null);
  1339. IF on_off=1 THEN
  1340. UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~33554432 WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  1341. ELSE
  1342. UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432 WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  1343. END IF;
  1344. DROP TABLE `tdb_entry_list`;
  1345. END */
  1346.  
  1347. Error occured at:2012-12-09 16:51:59
  1348. Line no.:6804
  1349. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1350.  
  1351. Query:
  1352. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_targetable` */
  1353.  
  1354. Error occured at:2012-12-09 16:51:59
  1355. Line no.:6810
  1356. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1357.  
  1358. Query:
  1359. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_targetable`(IN npc_entry INT(10), IN on_off BOOLEAN)
  1360. BEGIN
  1361. CALL sp_error_entry('NPC',npc_entry);
  1362. IF on_off = 1 THEN
  1363. UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~33554432 WHERE `entry`= npc_entry;
  1364. ELSEIF on_off = 0 THEN
  1365. UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432 WHERE `entry`= npc_entry;
  1366. END IF;
  1367. END */
  1368.  
  1369. Error occured at:2012-12-09 16:51:59
  1370. Line no.:6830
  1371. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1372.  
  1373. Query:
  1374. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_entry_list` */
  1375.  
  1376. Error occured at:2012-12-09 16:51:59
  1377. Line no.:6836
  1378. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1379.  
  1380. Query:
  1381. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_entry_list`(IN input LONGTEXT,IN appendExisting BIT)
  1382. BEGIN
  1383. DECLARE cur_position INT DEFAULT 1;
  1384. DECLARE remainder TEXT;
  1385. DECLARE cur_string VARCHAR(10);
  1386. DECLARE entry_count MEDIUMINT;
  1387. IF appendExisting IS NULL OR appendExisting IS FALSE THEN
  1388. CREATE TABLE `tdb_entry_list` (`value` INT NOT NULL PRIMARY KEY) ENGINE=MYISAM;
  1389. END IF;
  1390. SET remainder = input;
  1391. WHILE CHAR_LENGTH(remainder) > 0 AND cur_position > 0 DO
  1392. SET cur_position = INSTR(remainder, ',');
  1393. IF cur_position = 0 THEN
  1394. SET cur_string = remainder;
  1395. ELSE
  1396. SET cur_string = LEFT(remainder, cur_position-1);
  1397. END IF;
  1398. IF TRIM(cur_string) != '' AND(SELECT COUNT(*) FROM `tdb_entry_list` WHERE `value`=cur_string)=0 THEN
  1399. INSERT INTO `tdb_entry_list` VALUES (cur_string);
  1400. END IF;
  1401. SET remainder = SUBSTRING(remainder, cur_position+1);
  1402. END WHILE;
  1403. END */
  1404.  
  1405. Error occured at:2012-12-09 16:51:59
  1406. Line no.:6873
  1407. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1408.  
  1409. Query:
  1410. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_item_money_bylist` */
  1411.  
  1412. Error occured at:2012-12-09 16:51:59
  1413. Line no.:6879
  1414. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1415.  
  1416. Query:
  1417. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_item_money_bylist`(IN item_entry TEXT, IN min_money INT, IN max_money INT)
  1418. BEGIN
  1419. DECLARE remaining INT;
  1420. DECLARE min_entry INT;
  1421. CALL sp_set_entry_list(npc_entry);
  1422. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1423. WHILE remaining > 0 DO
  1424. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1425. CALL sp_error_entry('ITEM',min_entry);
  1426. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1427. SET remaining = remaining -1;
  1428. END WHILE;
  1429. CALL sp_set_entry_list(npc_entry);
  1430. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1431. CALL sp_set_entry_list(npc_entry);
  1432. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1433. WHILE remaining > 0 DO
  1434. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1435. UPDATE item_template SET minMoneyLoot=min_money, maxMoneyLoot=max_money WHERE entry = item_entry;
  1436. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1437. SET remaining = remaining -1;
  1438. END WHILE;
  1439. END */
  1440.  
  1441. Error occured at:2012-12-09 16:51:59
  1442. Line no.:6918
  1443. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1444.  
  1445. Query:
  1446. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_attackable_bylist` */
  1447.  
  1448. Error occured at:2012-12-09 16:51:59
  1449. Line no.:6924
  1450. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1451.  
  1452. Query:
  1453. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_attackable_bylist`(IN npc_entry TEXT, IN on_off BOOLEAN)
  1454. BEGIN
  1455. DECLARE remaining INT;
  1456. DECLARE min_entry INT;
  1457. CALL sp_set_entry_list(npc_entry);
  1458. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1459. WHILE remaining > 0 DO
  1460. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1461. CALL sp_error_entry('NPC',min_entry);
  1462. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1463. SET remaining = remaining -1;
  1464. END WHILE;
  1465. CALL sp_set_entry_list(npc_entry);
  1466. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1467. IF on_off = 1 THEN
  1468. WHILE remaining > 0 DO
  1469. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1470. UPDATE `creature_template` SET `unit_flags`=`unit_flags`|256 WHERE `entry`= min_entry;
  1471. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1472. SET remaining = remaining -1;
  1473. END WHILE;
  1474. END IF;
  1475. IF on_off = 0 THEN
  1476. WHILE remaining > 0 DO
  1477. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1478. UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry`= min_entry;
  1479. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1480. SET remaining = remaining -1;
  1481. END WHILE;
  1482. END IF;
  1483. END */
  1484.  
  1485. Error occured at:2012-12-09 16:51:59
  1486. Line no.:6966
  1487. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1488.  
  1489. Query:
  1490. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_civilian_bylist` */
  1491.  
  1492. Error occured at:2012-12-09 16:51:59
  1493. Line no.:6972
  1494. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1495.  
  1496. Query:
  1497. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_civilian_bylist`(IN npc_entry TEXT, IN on_off BOOLEAN)
  1498. BEGIN
  1499.  
  1500. DECLARE remaining INT;
  1501. DECLARE min_entry INT;
  1502. CALL sp_set_entry_list(npc_entry);
  1503. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1504. WHILE remaining > 0 DO
  1505. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1506. CALL sp_error_entry('NPC',min_entry);
  1507. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1508. SET remaining = remaining -1;
  1509. END WHILE;
  1510. CALL sp_set_entry_list(npc_entry);
  1511. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1512. CALL sp_set_entry_list(npc_entry);
  1513. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1514. WHILE remaining > 0 DO
  1515. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1516. CALL sp_error_entry('NPC',min_entry);
  1517. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1518. SET remaining = remaining -1;
  1519. END WHILE;
  1520. CALL sp_set_entry_list(npc_entry);
  1521. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1522. IF on_off = 1 THEN
  1523. WHILE remaining > 0 DO
  1524. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1525. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE `entry`= min_entry;
  1526. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1527. SET remaining = remaining -1;
  1528. END WHILE;
  1529. END IF;
  1530. IF on_off = 0 THEN
  1531. WHILE remaining > 0 DO
  1532. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1533. UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2 WHERE `entry`= min_entry;
  1534. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1535. SET remaining = remaining -1;
  1536. END WHILE;
  1537. END IF;
  1538. END */
  1539.  
  1540. Error occured at:2012-12-09 16:51:59
  1541. Line no.:7031
  1542. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1543.  
  1544. Query:
  1545. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_trigger` */
  1546.  
  1547. Error occured at:2012-12-09 16:51:59
  1548. Line no.:7037
  1549. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1550.  
  1551. Query:
  1552. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_trigger`(IN npc_entry INT(10),IN on_off BOOLEAN)
  1553. BEGIN
  1554. CALL `sp_error_entry`('NPC',npc_entry);
  1555. IF on_off=1 THEN
  1556. UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `id`=npc_entry;
  1557. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2,`unit_flags`=`unit_flags`|33554432 WHERE `entry`=npc_entry;
  1558. ELSE
  1559. UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2,`unit_flags`=`unit_flags`&~33554432 WHERE `entry`=npc_entry;
  1560. END IF;
  1561. END */
  1562.  
  1563. Error occured at:2012-12-09 16:51:59
  1564. Line no.:7058
  1565. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1566.  
  1567. Query:
  1568. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_quest_level` */
  1569.  
  1570. Error occured at:2012-12-09 16:51:59
  1571. Line no.:7064
  1572. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1573.  
  1574. Query:
  1575. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_quest_level`(IN quest_entry INT(10), IN quest_level INT(10))
  1576. BEGIN
  1577. CALL `sp_error_entry`('QUEST',quest_entry);
  1578. UPDATE `quest_template` SET `MinLevel`= quest_level WHERE `entry`= quest_entry;
  1579. END */
  1580.  
  1581. Error occured at:2012-12-09 16:51:59
  1582. Line no.:7079
  1583. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1584.  
  1585. Query:
  1586. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_quest_next` */
  1587.  
  1588. Error occured at:2012-12-09 16:51:59
  1589. Line no.:7085
  1590. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1591.  
  1592. Query:
  1593. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_quest_next`(IN quest_entry INT(10), IN next_quest INT(10))
  1594. BEGIN
  1595. CALL `sp_error_entry`('QUEST',quest_entry);
  1596. UPDATE `quest_template` SET `NextQuestId`= next_quest WHERE `entry`= quest_entry;
  1597. END */
  1598.  
  1599. Error occured at:2012-12-09 16:51:59
  1600. Line no.:7100
  1601. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1602.  
  1603. Query:
  1604. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_quest_previous` */
  1605.  
  1606. Error occured at:2012-12-09 16:51:59
  1607. Line no.:7106
  1608. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1609.  
  1610. Query:
  1611. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_quest_previous`(IN quest_entry INT(10), IN prev_quest INT(10))
  1612. BEGIN
  1613. CALL `sp_error_entry`('QUEST',quest_entry);
  1614. UPDATE `quest_template` SET `PrevQuestId`= prev_quest WHERE `entry`= quest_entry;
  1615. END */
  1616.  
  1617. Error occured at:2012-12-09 16:51:59
  1618. Line no.:7121
  1619. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1620.  
  1621. Query:
  1622. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_deadquest` */
  1623.  
  1624. Error occured at:2012-12-09 16:51:59
  1625. Line no.:7127
  1626. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1627.  
  1628. Query:
  1629. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_deadquest`(IN npc_entry INT(10))
  1630. BEGIN
  1631. DECLARE check_addon_exists INT;
  1632. CALL `sp_error_entry`('NPC',npc_entry);
  1633. UPDATE `creature` SET `MovementType`=0,`spawndist`=0,`Deathstate`=0 WHERE `id`=npc_entry;
  1634. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2 WHERE `entry`=npc_entry;
  1635.  
  1636.  
  1637. SET check_addon_exists = (SELECT COUNT(`entry`) FROM `creature_template_addon` WHERE `entry`=npc_entry);
  1638. IF check_addon_exists > 0 THEN
  1639. UPDATE `creature_template_addon` SET `bytes1`=7 WHERE `entry`=npc_entry;
  1640. ELSE
  1641. INSERT INTO `creature_template_addon` VALUES (npc_entry,0,0,7,0,0, '');
  1642. END IF;
  1643. END */
  1644.  
  1645. Error occured at:2012-12-09 16:51:59
  1646. Line no.:7153
  1647. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1648.  
  1649. Query:
  1650. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_lootable_bylist` */
  1651.  
  1652. Error occured at:2012-12-09 16:51:59
  1653. Line no.:7159
  1654. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1655.  
  1656. Query:
  1657. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_lootable_bylist`(IN npc_entry TEXT, IN on_off BOOLEAN)
  1658. BEGIN
  1659.  
  1660. DECLARE remaining INT;
  1661. DECLARE min_entry INT;
  1662. CALL sp_set_entry_list(npc_entry);
  1663. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1664. WHILE remaining > 0 DO
  1665. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1666. CALL sp_error_entry('NPC',min_entry);
  1667. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1668. SET remaining = remaining -1;
  1669. END WHILE;
  1670. CALL sp_set_entry_list(npc_entry);
  1671. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1672. CALL sp_set_entry_list(npc_entry);
  1673. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1674. WHILE remaining > 0 DO
  1675. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1676. CALL sp_error_entry('NPC',min_entry);
  1677. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1678. SET remaining = remaining -1;
  1679. END WHILE;
  1680. CALL sp_set_entry_list(npc_entry);
  1681. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1682. IF on_off = 1 THEN
  1683. WHILE remaining > 0 DO
  1684. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1685. UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`&~1 WHERE `entry`= min_entry;
  1686. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1687. SET remaining = remaining -1;
  1688. END WHILE;
  1689. END IF;
  1690. IF on_off = 0 THEN
  1691. WHILE remaining > 0 DO
  1692. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1693. UPDATE `creature_template` SET `dynamicflags`=`dynamicflags`|1 WHERE `entry`= min_entry;
  1694. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1695. SET remaining = remaining -1;
  1696. END WHILE;
  1697. END IF;
  1698. END */
  1699.  
  1700. Error occured at:2012-12-09 16:51:59
  1701. Line no.:7217
  1702. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1703.  
  1704. Query:
  1705. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_targetable_bylist` */
  1706.  
  1707. Error occured at:2012-12-09 16:51:59
  1708. Line no.:7223
  1709. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1710.  
  1711. Query:
  1712. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_targetable_bylist`(IN npc_entry TEXT, IN on_off BOOLEAN)
  1713. BEGIN
  1714.  
  1715. DECLARE remaining INT;
  1716. DECLARE min_entry INT;
  1717. CALL sp_set_entry_list(npc_entry);
  1718. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1719. WHILE remaining > 0 DO
  1720. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1721. CALL sp_error_entry('NPC',min_entry);
  1722. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1723. SET remaining = remaining -1;
  1724. END WHILE;
  1725. CALL sp_set_entry_list(npc_entry);
  1726. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1727. CALL sp_set_entry_list(npc_entry);
  1728. SET remaining = (SELECT COUNT(`value`) FROM tdb_entry_list);
  1729. IF on_off = 1 THEN
  1730. WHILE remaining > 0 DO
  1731. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1732. UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~33554432 WHERE `entry`= min_entry;
  1733. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1734. SET remaining = remaining -1;
  1735. END WHILE;
  1736. END IF;
  1737. IF on_off = 0 THEN
  1738. WHILE remaining > 0 DO
  1739. SET min_entry = (SELECT MIN(`value`) FROM tdb_entry_list);
  1740. UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432 WHERE `entry`= min_entry;
  1741. DELETE FROM tdb_entry_list WHERE `value`=min_entry;
  1742. SET remaining = remaining -1;
  1743. END WHILE;
  1744. END IF;
  1745. END */
  1746.  
  1747. Error occured at:2012-12-09 16:51:59
  1748. Line no.:7270
  1749. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1750.  
  1751. Query:
  1752. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_npc_trigger_bylist` */
  1753.  
  1754. Error occured at:2012-12-09 16:51:59
  1755. Line no.:7276
  1756. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1757.  
  1758. Query:
  1759. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_npc_trigger_bylist`(IN entry_list LONGTEXT,IN on_off BOOLEAN)
  1760. BEGIN
  1761. CALL `sp_set_entry_list` (entry_list,null);
  1762. IF on_off=1 THEN
  1763. UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `id` IN (SELECT * FROM `tdb_entry_list`);
  1764. UPDATE `creature_template` SET `flags_extra`=`flags_extra`|2,`unit_flags`=`unit_flags`|33554432 WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  1765. ELSE
  1766. UPDATE `creature_template` SET `flags_extra`=`flags_extra`&~2,`unit_flags`=`unit_flags`&~33554432 WHERE `entry` IN (SELECT * FROM `tdb_entry_list`);
  1767. END IF;
  1768. DROP TABLE `tdb_entry_list`;
  1769. END */
  1770.  
  1771. Error occured at:2012-12-09 16:51:59
  1772. Line no.:7299
  1773. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1774.  
  1775. Query:
  1776. /*!50003 DROP PROCEDURE IF EXISTS `sp_set_spell_target` */
  1777.  
  1778. Error occured at:2012-12-09 16:51:59
  1779. Line no.:7305
  1780. Error Code: 1146 - Table 'mysql.proc' doesn't exist
  1781.  
  1782. Query:
  1783. /*!50003 CREATE*/ /*!50003 PROCEDURE `sp_set_spell_target`(IN target_type VARCHAR(10),IN target_entry INT(11),IN spell_id INT(11))
  1784. BEGIN
  1785. CASE UCASE(target_type)
  1786. WHEN 'GO' THEN BEGIN
  1787. IF target_entry > 0 THEN
  1788. CALL `sp_error_entry`('GO',target_entry);
  1789. END IF;
  1790. DELETE FROM `spell_script_target` WHERE `entry`=spell_id;
  1791. INSERT INTO `spell_script_target`(`entry`,`type`,`targetEntry`) VALUES (spell_id,0,target_entry);
  1792. END;
  1793. WHEN 'NPC' THEN BEGIN
  1794. IF target_entry > 0 THEN
  1795. CALL `sp_error_entry`('NPC',target_entry);
  1796. END IF;
  1797. DELETE FROM `spell_script_target` WHERE `entry`=spell_id;
  1798. INSERT INTO `spell_script_target`(`entry`,`type`,`targetEntry`) VALUES (spell_id,1,target_entry);
  1799. END;
  1800. WHEN 'DEAD_NPC' THEN BEGIN
  1801. CALL `sp_error_entry`('NPC',target_entry);
  1802. DELETE FROM `spell_script_target` WHERE `entry`=spell_id;
  1803. INSERT INTO `spell_script_target`(`entry`,`type`,`targetEntry`) VALUES (spell_id,2,target_entry);
  1804. END;
  1805. WHEN 'MINION' THEN BEGIN
  1806. CALL `sp_error_entry`('NPC',target_entry);
  1807. DELETE FROM `spell_script_target` WHERE `entry`=spell_id;
  1808. INSERT INTO `spell_script_target`(`entry`,`type`,`targetEntry`) VALUES (spell_id,3,target_entry);
  1809. END;
  1810. ELSE CALL INCORRECT_TARGET_TYPE;
  1811. END CASE;
  1812. END */
  1813.  
  1814. Error occured at:2012-12-09 16:51:59
  1815. Line no.:7345
  1816. Error Code: 1146 - Table 'mysql.proc' doesn't exist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement