From d6a6f44148361f4fcde04d59eca421419584ed03 Mon Sep 17 00:00:00 2001 From: Filip Date: Tue, 24 Sep 2013 23:05:26 +0200 Subject: DB/SAI: Non-repeatable flags change & credit circumvention By dr-j fixes #10929 fixes #6444 --- sql/updates/world/2013_09_24_00_world_sai.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2013_09_24_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_24_00_world_sai.sql b/sql/updates/world/2013_09_24_00_world_sai.sql new file mode 100644 index 00000000000..a4f38d208a9 --- /dev/null +++ b/sql/updates/world/2013_09_24_00_world_sai.sql @@ -0,0 +1,6 @@ +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=18110 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=18142 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=18143 AND `source_type`=0 AND `id`=0 AND `link`=1; +UPDATE `smart_scripts` SET `event_flags`=0 WHERE `entryorguid`=18144 AND `source_type`=0 AND `id`=0 AND `link`=1; +-- It's all fun and games +UPDATE `smart_scripts` SET `action_type`=85 WHERE `entryorguid`=29747 AND `source_type`=0 AND `id`=1 AND `link`=0; -- cgit v1.2.3 From 6ea5dfd3505cf8b3044c213cf97beeeaa2673bba Mon Sep 17 00:00:00 2001 From: Filip Date: Thu, 26 Sep 2013 09:58:18 +0200 Subject: DB/Update: Quest credit fix-up Vehicles will not accept quest credit in the form of a spell cast, credit needs to be a monster kill. --- sql/updates/world/2013_09_26_00_world_sai.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2013_09_26_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_26_00_world_sai.sql b/sql/updates/world/2013_09_26_00_world_sai.sql new file mode 100644 index 00000000000..7f634fd2f5a --- /dev/null +++ b/sql/updates/world/2013_09_26_00_world_sai.sql @@ -0,0 +1 @@ +UPDATE `smart_scripts` SET `action_type`=33, `action_param1`=28019 WHERE `entryorguid`=27409 AND `source_type`=0 AND `id`=5 AND `link`=6; -- cgit v1.2.3 From 06c3813e56950db09033718f28dc68524f98a6b4 Mon Sep 17 00:00:00 2001 From: Filip Date: Thu, 26 Sep 2013 16:30:55 +0200 Subject: DB/SAI: Wanton Warlord Fixes #5126 by @dr-j --- sql/updates/world/2013_09_26_01_world_sai.sql | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sql/updates/world/2013_09_26_01_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_26_01_world_sai.sql b/sql/updates/world/2013_09_26_01_world_sai.sql new file mode 100644 index 00000000000..5b264de1dde --- /dev/null +++ b/sql/updates/world/2013_09_26_01_world_sai.sql @@ -0,0 +1,30 @@ +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='',`speed_walk`=1.428571,`speed_run`=1.6, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=12 WHERE `entry` =27002; + +DELETE FROM `creature_text` WHERE `entry`=27002; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(27002,0,0,'I''ll consume your flesh and pick my teeth with your bones!',14,0,100,0,0,0,'Grom''thar the Thunderbringer'), +(27002,1,0,'You''re no magnataur! Where... did you... find... such strength?',14,0,100,0,0,0,'Grom''thar the Thunderbringer'); + +DELETE FROM `event_scripts` WHERE `id`=17767; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(17767,0,10,27002,300000,0,2791.477,381.7451,77.19083,2.6067); + +DELETE FROM `conditions` WHERE `SourceEntry` = 48328; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ScriptName`, `Comment`) VALUES +(17,0,48328,0,0,29,0,27002,100,0,1,'',"Do not summon Grom'thar, if he is already spawned (100 Yards)"), +(17,0,48328,0,0,28,0,12151,0,0,1,'',"Do not summon Grom'thar, if player has quest objective completed, but not yet rewarded."); + +DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 27002; +DELETE FROM `smart_scripts` WHERE `entryorguid` =27002; +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 +(27002,0,0,0,9,0,100,0,5,45,4000,8000,11,52167,0,0,0,0,0,5,0,0,0,0,0,0,0,'Grom''thar the Thunderbringer - On Range - Cast Magnataur Charge'), +(27002,0,1,0,9,0,100,0,0,5,7000,11000,11,52166,0,0,0,0,0,1,0,0,0,0,0,0,0,'Grom''thar the Thunderbringer - In Combat - Cast Thunder'), +(27002,0,2,3,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Grom''thar the Thunderbringer - On Just Summoned - Say'), +(27002,0,3,0,61,0,100,0,0,0,0,0,53,1,27002,0,0,0,2,1,0,0,0,0,0,0,0,'Grom''thar the Thunderbringer - Linked with Previous Event - Start WP'), +(27002,0,4,5,40,0,100,0,1,27002,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Grom''thar the Thunderbringer - On Reached WP1 - Set Home Position'), +(27002,0,5,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,50,0,0,0,0,0,0,'Grom''thar the Thunderbringer - Linked with Previous Event - Attack'), +(27002,0,6,0,6,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Grom''thar the Thunderbringer - On Death - Say'); + +DELETE FROM `waypoints` WHERE `entry`=27002; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(27002, 1, 2746.325195,420.078369,67.982117, 'Grom''thar the Thunderbringer'); -- cgit v1.2.3 From 89085f7d577be8361ddfb879a913f96e87c966aa Mon Sep 17 00:00:00 2001 From: Kirkhammett Date: Fri, 27 Sep 2013 12:50:34 +0200 Subject: DB/Core: The Storm King's Vengeance --- sql/updates/world/2013_09_27_00_world_sai.sql | 455 ++++++++++++++++++++++++++ src/server/scripts/Northrend/zone_zuldrak.cpp | 50 +++ src/server/scripts/Spells/spell_quest.cpp | 82 +++++ 3 files changed, 587 insertions(+) create mode 100644 sql/updates/world/2013_09_27_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_27_00_world_sai.sql b/sql/updates/world/2013_09_27_00_world_sai.sql new file mode 100644 index 00000000000..44157856c49 --- /dev/null +++ b/sql/updates/world/2013_09_27_00_world_sai.sql @@ -0,0 +1,455 @@ +-- The Storm King's Vengeance (12919) +-- http://www.youtube.com/watch?v=hq9lmWNkXGA&feature=related +SET @GYMER := 29884; -- Gymer +SET @CAGED_GYMER := 29647; -- Gymer +SET @ALGAR := 29872; -- Algar the Chosen +SET @NAVARIUS := 29821; -- Prince Navarius +SET @THRYM := 29895; -- Thrym +SET @NAVARIUS_CREDIT := 55660; -- Navarius Kill Credit +SET @ALGAR_CREDIT := 55661; -- Algar Kill Credit +SET @THYRM_CREDIT := 55662; -- Thrym Kill Credit +-- Used in spell script +/* +SET @GRABBED := 55424; +SET @EXPLOSION := 55569; +SET @STORM_COULD := 29939; +SET @HEALING_WINDS := 55549; +*/ + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (55516,55421); +INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES +(55516, 'spell_q12919_gymers_grab'), +(55421, 'spell_q12919_gymers_throw'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE entry IN (@CAGED_GYMER,@GYMER,@ALGAR,@NAVARIUS,@THRYM,29889,29893,29894,29890,29891,29887); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(@CAGED_GYMER*100,@CAGED_GYMER); +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 +(@CAGED_GYMER,0,0,1,62,0,100,0,9852,2,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gymer - On Gossip Option Select - Close Gossip'), +(@CAGED_GYMER,0,1,2,61,0,100,0,0,0,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Link - Say'), +(@CAGED_GYMER,0,2,0,61,0,100,0,0,0,0,0,80,@CAGED_GYMER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Link - Start Timed Script'), +(@CAGED_GYMER*100,9,0,0,0,0,100,0,1500,1500,0,0,12,@GYMER,2,600000,0,0,0,7,0,0,0,0,0,0,0,'Gymer - On Script - Summon Gymer '), +(@CAGED_GYMER*100,9,1,0,0,0,100,0,1500,1500,0,0,85,55430,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gymer - On Script - Cast Gymer''s Buddy Invoker'), +-- +(@CAGED_GYMER,0,4,0,1,0,100,0,10000,20000,30000,40000,1,1,5000,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - OOC - Say Random'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=9852; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 9852, 13639, 0, 0, 14, 0, 12919, 0, 0, 0, 0, 0, '', 'Show text if player doesn''t have quest rewarded'), +(14, 9852, 13640, 0, 0, 9, 0, 12919, 0, 0, 0, 0, 0, '', 'Show text if player has quest rewarded'), +(15, 9852, 0, 0, 0, 9, 0, 12919, 0, 0, 0, 0, 0, '', 'Show gossip option if player is on quest'), +(15, 9852, 1, 0, 0, 9, 0, 12919, 0, 0, 0, 0, 0, '', 'Show gossip option if player is on quest'), +(15, 9852, 2, 0, 0, 9, 0, 12919, 0, 0, 0, 0, 0, '', 'Show gossip option if player is on quest'); + +-- Gymer's Buddy +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`= 29884; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(29884, 55430, 1, 0); + +-- Gymer Summon Pos +DELETE FROM `spell_target_position` WHERE `id` = 55431; +INSERT INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES +(55431, 571, 5799.29, -1597.31, 237.17, 2.14); + +DELETE FROM `gossip_menu` WHERE (`entry`=9852 AND `text_id`=13639) OR (`entry`=9852 AND `text_id`=13640) OR (`entry`=9855 AND `text_id`=13647) OR (`entry`=9860 AND `text_id`=13656); +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(9852, 13639), -- 29647 +(9852, 13640), -- 29647 +(9855, 13647), -- 29647 +(9860, 13656); -- 29647 + +DELETE FROM `gossip_menu_option` WHERE (`menu_id`=9852 AND `id`=0) OR (`menu_id`=9852 AND `id`=1) OR (`menu_id`=9852 AND `id`=2); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES +(9852, 0, 0, 'Gymer, where are Algar, Navarius and Thrym?', 1, 3, 9855, 0, 0, 0, ''), +(9852, 1, 0, 'Gymer, what do I need to know? I''ve never ridden on a giant.', 1, 3, 9860, 0, 0, 0, ''), +(9852, 2, 0, 'I''m ready, Gymer. Let''s go!', 1, 3, 0, 0, 0, 0, ''); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@GYMER,@ALGAR,@NAVARIUS,@THRYM,@THRYM*100,29889,29893,29894,29890,29891,29887) AND `source_type` IN (0,9); +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 +(@GYMER,0,0,1,27,0,100,1,0,0,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Passenger boarded - Say'), +(@GYMER,0,1,0,61,0,100,0,0,0,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Link - Say'), +(@GYMER,0,2,0,28,0,100,1,0,0,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Passenger Removed - Say'), +(@GYMER,0,3,0,54,0,100,1,0,0,0,0,11,55461,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Spawn - Cast Storm Aura'), +(@GYMER,0,4,0,54,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Spawn - Cast Storm Aura'), +(@GYMER,0,5,0,54,0,100,0,0,0,0,0,44,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'Gymer - On Spawn - Set Phase'), +(@GYMER,0,6,0,73,0,100,0,0,0,0,0,11,46598,0,0,0,0,0,7,0,0,0,0,0,0,0,'Gymer - On Link - Cast Summon Gymer Force cast'), +-- Algar the Chosen +(@ALGAR,0,0,0,0,0,100,0,6000,10000,16000,23000,11,42729,0,0,0,0,0,1,0,0,0,0,0,0,0,'Algar the Chosen - IC - Cast Dreadful Roar'), +(@ALGAR,0,1,0,6,0,100,0,0,0,0,0,11,@ALGER_CREDIT,2,0,0,0,0,7,0,0,0,0,0,0,0,'Algar the Chosen - On Death - Cast criteria credit'), +-- Prince Navarius +(@NAVARIUS,0,0,0,11,0,100,1,0,0,0,0,11,55706,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prince Navarius - Cast Sinister Shield- On Spawn'), +(@NAVARIUS,0,1,0,0,0,100,0,7000,16000,15000,19000,11,51009,1,0,0,0,0,2,0,0,0,0,0,0,0,'Prince Navarius - IC - Cast Soul Deflection'), +(@NAVARIUS,0,2,0,0,0,100,0,9000,15000,18000,21000,11,51016,1,0,0,0,0,2,0,0,0,0,0,0,0,'Prince Navarius - IC - Cast Vampiric Bolt'), +(@NAVARIUS,0,3,0,0,0,100,0,16000,28000,26000,34000,11,50992,1,0,0,0,0,2,0,0,0,0,0,0,0,'Prince Navarius - IC -Cast Soul Blast'), +(@NAVARIUS,0,4,5,6,0,100,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prince Navarius - On Death - Say 1'), +(@NAVARIUS,0,5,6,61,0,100,0,0,0,0,0,12,@THRYM,1,120000,0,0,0,8,0,0,0,5611.733, -2302.771, 289.4654, 1.745329,'Prince Navarius - On Link - Spawn Thrym'), +(@NAVARIUS,0,6,0,61,0,100,0,0,0,0,0,11,@NAVARIUS_CREDIT,2,0,0,0,0,7,0,0,0,0,0,0,0,'Prince Navarius - On Link - Cast criteria credit'), +(@NAVARIUS,0,7,0,4,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Prince Navarius - On Aggro - Say 0'), +-- Thrym +(@THRYM,0,0,4,11,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Thrym - On spawn - Yell'), +(@THRYM,0,1,0,0,0,100,0,8000,16000,15000,21000,11,28167,0,0,0,0,0,5,0,0,0,0,0,0,0,'Thrym - IC - Cast Chain Lightning'), +(@THRYM,0,2,0,0,0,100,1,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Thrym - IC - Yell'), +(@THRYM,0,3,0,6,0,100,0,0,0,0,0,11,@THRYM_CREDIT,2,0,0,0,0,7,0,0,0,0,0,0,0,'Thrym - On Death - Cast criteria credit'), +(@THRYM,0,4,0,11,0,100,0,0,0,0,0,97,40,30,0,0,0,0,1,0,0,0,5555.583, -2223.97, 235.967,0,'Thrym - On Script - Jump to pos'), +(@THRYM,0,5,0,61,0,100,1,0,0,0,0,80,@THRYM*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Thrym - On spawn - Yell'), +(@THRYM*100,9,0,0,61,0,100,0,3000,3000,3000,3000,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Thrym - On spawn - Yell'), +-- Vargul Plaguehound +(29889,0,0,0,0,0,100,0,6000,10000,16000,23000,11,50047,0,0,0,0,0,2,0,0,0,0,0,0,0,'Vargul Plaguehound - IC - Cast Broken Bone'), +(29889,0,1,0,0,0,100,0,2000,15000,26000,33000,11,50046,0,0,0,0,0,2,0,0,0,0,0,0,0,'Vargul Plaguehound - IC - Cast Gnaw Bone'), +-- Banshee Soulclaimer +(29893,0,0,0,0,0,100,0,4000,7000,9000,12000,11,28993,0,0,0,0,0,2,0,0,0,0,0,0,0,'Banshee Soulclaimer - IC - Cast Banshee''s Wail'), +-- Vargul Plaguetalon +(29894,0,0,0,0,0,100,0,3000,9000,14000,21000,11,55079,0,0,0,0,0,2,0,0,0,0,0,0,0,'Vargul Plaguetalon - IC - Cast Swoop'), +-- Vargul Deathwaker +(29890,0,0,0,0,0,100,0,3000,13000,19000,26000,11,56038,0,0,0,0,0,2,0,0,0,0,0,0,0,'Vargul Deathwaker - IC - Cast Plaguebolt'), +-- Vargul Runelord +(29891,0,0,0,0,0,100,0,3000,13000,19000,26000,11,56036,0,0,0,0,0,2,0,0,0,0,0,0,0,'Vargul Runelord - IC - Cast Rune of Destruction'), +-- Vargul Doombringer +(29887,0,0,0,0,0,100,0,2000,20000,30000,40000,1,1,5000,0,0,0,0,1,0,0,0,0,0,0,0,'Vargul Doombringer - IC - Say Random'); + + +UPDATE `creature_model_info` SET `bounding_radius`=10,`combat_reach`=12,`gender`=0 WHERE `modelid`=26656; -- Gymer +-- Caged Gymer +UPDATE `creature_template` SET `gossip_menu_id`=9852, `speed_walk`=2, `speed_run`=1.42857146263123, `minlevel`=77, `maxlevel`=77, `unit_flags`=0x8000, `modelid1`=26656, `npcflag`=0x3 WHERE `entry`=29647; +-- Gymer +UPDATE `creature_template` SET `IconName`='vehichleCursor', `speed_walk`=4, `speed_run`=4, `spell1`=55426,`spell2`=55429,`spell3`=55516,`spell4`=55421,`VehicleId`=205, `minlevel`=80, `maxlevel`=80, `faction_A`=1629, `faction_H`=1629, `unit_flags`=0x8, `modelid1`=26656, `unit_class`=4 WHERE `entry`=29884; +-- Vargul Runelord +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.071429, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29891; +-- Vargul Slayer +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.428571, `speed_run`=2, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29892; +-- Vargul Plaguetalon +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=2.285714, `speed_run`=2, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29894; +-- Vargul Deathwaker +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.071429, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29890; +-- Vargul Blighthound +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.428571, `speed_run`=1.6, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29889; +-- Banshee Soulclaimer +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.142857, `speed_run`=1, `InhabitType`=5, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29893; +-- Storm Cloud +UPDATE `creature_template` SET `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0, `ScriptName`='npc_storm_cloud' WHERE `entry`=29939; +-- Reanimated Corpse +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.142857, `speed_run`=0.777776, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29897; +-- Vargul Doombringer +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.071429, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29887; + -- Prince Navarius +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32832, `dynamicflags`=0 WHERE `entry`=29821; + -- Acolyte of Pain +UPDATE `creature_template` SET `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29935; + -- Acolyte of Agony +UPDATE `creature_template` SET `maxlevel`=75, `faction_A`=1885, `faction_H`=1885, `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0 WHERE `entry`=29934; + -- Algar the Chosen +UPDATE `creature_template` SET `faction_A`=2068, `faction_H`=2068, `speed_walk`=1.385714, `speed_run`=4, `rangeattacktime`=2000, `unit_flags`=32832, `dynamicflags`=0 WHERE `entry`=29872; + -- Thrym +UPDATE `creature_template` SET `faction_A`=974, `faction_H`=974, `speed_walk`=3.571429, `speed_run`=4, `rangeattacktime`=2000, `unit_flags`=64, `dynamicflags`=0 WHERE `entry`=29895; + +DELETE FROM `creature_text` WHERE `entry`IN (@THRYM,@GYMER,@CAGED_GYMER,@NAVARIUS,29887); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +-- Thrym +(29895, 0, 0, 'MASTER! NO!', 14, 0, 100, 53, 0, 0, 'Thrym to Gymer'), +(29895, 1, 1, 'THRYM CRUSH!', 14, 0, 100, 25, 0, 0, 'Thrym to Gymer'), +-- Gymer +(29884, 1, 0, 'Taste Gymer''s size 600!', 14, 0, 100, 0, 0, 0, 'Gymer to Reanimated Corpse'), +(29884, 1, 1, 'I will crush you under foot!', 14, 0, 100, 0, 0, 0, 'Gymer to Reanimated Corpse'), +(29884, 1, 2, 'STORMS GRANT ME POWER!', 14, 0, 100, 0, 0, 0, 'Gymer'), +(29884, 1, 3, 'Tiny creatures, I trample you!', 14, 0, 100, 0, 0, 0, 'Gymer to Reanimated Corpse'), +(29884, 1, 4, 'I''ll wipe you off of my boots later!', 14, 0, 100, 0, 0, 0, 'Gymer to Reanimated Corpse'), +(29884, 1, 5, 'AAARRRRRRGGGGGGHHHHHHH!! SUCH POWER!', 14, 0, 100, 0, 0, 0, 'Gymer'), +(29884, 1, 6, 'LIGHTNING GUIDE MY FURY!', 14, 0, 100, 0, 0, 0, 'Gymer'), +(29884, 1, 7, 'THE LIGHTNING COURSES THROUGH ME!', 14, 0, 100, 0, 0, 0, 'Gymer'), +(29884, 8, 8, 'Prince Navarius is on the other side of the Dead Fields to the east.', 42, 0, 100, 0, 0, 0, 'Gymer'), +(29884, 9, 9, 'Algar the Chosen is at the Reliquary of Pain to the northeast.', 42, 0, 100, 0, 0, 0, 'Gymer'), +(29884, 10, 10, 'Farewell, friend. May we meet again under better circumstances. I''ll never forget what you did for me!', 12, 0, 100, 0, 0, 0, 'Gymer'), +-- Caged Gymer random ooc text +(29647, 1, 0, 'My brothers will come for me and then you will see what true power is!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Runelord'), +(29647, 1, 1, 'I will crush you all!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Deathwaker'), +(29647, 1, 2, 'Ugly little monsters, pray I don''t get out!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Slayer'), +(29647, 1, 3, 'Your torture only adds to my rage!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Slayer'), +(29647, 1, 4, 'Ugly little monsters, pray I don''t get out!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Runelord'), +(29647, 1, 5, 'Wretched beasts!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Slayer'), +(29647, 1, 6, 'I will devour you whole!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Runelord'), +(29647, 7, 7, 'FREE!!! Soon you will feel the wrath of the storm king!', 14, 0, 100, 53, 0, 0, 'Gymer'), +(29647, 1, 8, 'Wretched beasts!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Runelord'), +(29647, 1, 9, 'Ugly little monsters, pray I don''t get out!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Deathwaker'), +(29647, 1, 10, 'Your torture only adds to my rage!', 12, 0, 100, 1, 0, 0, 'Gymer to Vargul Runelord'), +-- Prince Navarius +(29821, 0, 0, 'Oh, you freed him, did you? No matter, his death and reconstruction will only be slightly delayed.', 14, 0, 100, 0, 0, 0, 'Prince Navarius to Gymer'), +(29821, 1, 1, 'Thrym... Av... Avenge me...', 14, 0, 100, 0, 0, 0, 'Prince Navarius to Gymer'), +-- Vargul Doombringer +(29887, 1, 0, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 13537, 'Vargul Doombringer to Gymer'), +(29887, 1, 1, 'Sniveling pig!', 12, 0, 100, 0, 0, 13539, 'Vargul Doombringer to Gymer'), +(29887, 1, 2, 'I will feed you to the dogs!', 12, 0, 100, 0, 0, 13534, 'Vargul Doombringer to Gymer'), +(29887, 1, 3, 'Die, maggot!', 12, 0, 100, 0, 0, 13536, 'Vargul Doombringer to Gymer'), +(29887, 1, 4, 'Ugglin oo bjorr!', 12, 0, 100, 0, 0, 13540, 'Vargul Doombringer to Gymer'), +(29887, 1, 5, 'I''ll eat your heart!', 12, 0, 100, 0, 0, 13540, 'Vargul Doombringer to Gymer'), +(29887, 1, 6, 'I spit on you!', 12, 0, 100, 0, 0, 13538, 'Vargul Doombringer to Gymer'), +(29887, 1, 7, 'Your entrails will make a fine necklace.', 12, 0, 100, 0, 0, 13535, 'Vargul Doombringer to Gymer'); + +DELETE FROM `creature_equip_template` WHERE `entry` IN (29891,29892,29890,29887,29872); +INSERT INTO `creature_equip_template` (`entry`, `itemEntry1`, `itemEntry2`, `itemEntry3`) VALUES +(29891, 40605, 0, 0), -- Vargul Runelord +(29892, 40609, 40609, 0), -- Vargul Slayer +(29890, 40606, 0, 0), -- Vargul Deathwaker +(29887, 34818, 0, 0), -- Vargul Doombringer +(29872, 34820, 0, 0); -- Algar the Chosen + +DELETE FROM `creature_template_addon` WHERE `entry` IN (29452,29449,29646,29451,29453,29450,29939,29890,29887,29664,29872,29895,29884); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(29452, 0, 0x0, 0x1, ''), -- Vargul Blighthound +(29449, 0, 0x0, 0x1, ''), -- Vargul Deathwaker +(29646, 0, 0x3000000, 0x1, ''), -- Banshee Soulclaimer +(29451, 0, 0x0, 0x1, '56035'), -- Vargul Slayer - Diminish Soul +(29453, 0, 0x3000000, 0x1, ''), -- Vargul Plaguetalon +(29450, 0, 0x0, 0x1, '54512'), -- Vargul Runelord - Plague Shield +(29939, 0, 0x2000000, 0x1, ''), -- Storm Cloud +(29664, 0, 0x0, 0x1, '54942'), -- Ragemane - Cosmetic Orange Cloud +(29890, 0, 0x0, 0x1, ''), -- Vargul Deathwaker +(29887, 0, 0x0, 0x1, ''), -- Vargul Doombringer +(29872, 26645, 0x3000000, 0x1, ''), -- Algar the Chosen + mount +(29895, 0, 0x0, 0x1, ''), -- Thrym +(29884, 0, 0, 257, ''); -- Gymer + +-- Condition for passenger removal, only needs to execute if passenger is player. +DELETE FROM `conditions` WHERE `SourceEntry`=29884; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 3, 29884, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', 'Execute event only if type is player'); + +-- Conditions for Throw Explosion +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 13 AND `SourceEntry`=55571; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 55571, 0, 1, 31, 0, 3, 29887, 0, 0, 0, 0, '', 'Throw only hits 29887'), +(13, 1, 55571, 0, 2, 31, 0, 3, 29889, 0, 0, 0, 0, '', 'Throw only hits 29989'), +(13, 1, 55571, 0, 3, 31, 0, 3, 29890, 0, 0, 0, 0, '', 'Throw only hits 29890'), +(13, 1, 55571, 0, 4, 31, 0, 3, 29891, 0, 0, 0, 0, '', 'Throw only hits 29891'), +(13, 1, 55571, 0, 5, 31, 0, 3, 29892, 0, 0, 0, 0, '', 'Throw only hits 29892'), +(13, 1, 55571, 0, 6, 31, 0, 3, 29893, 0, 0, 0, 0, '', 'Throw only hits 29893'), +(13, 1, 55571, 0, 7, 31, 0, 3, 29894, 0, 0, 0, 0, '', 'Throw only hits 29894'), +(13, 1, 55571, 0, 8, 31, 0, 3, 29897, 0, 0, 0, 0, '', 'Throw only hits 29897'), +(13, 1, 55571, 0, 9, 31, 0, 3, 29934, 0, 0, 0, 0, '', 'Throw only hits 29934'), +(13, 1, 55571, 0, 10, 31, 0, 3, 29935, 0, 0, 0, 0, '', 'Throw only hits 29935'); + +-- Conditions for Gymer's Grab +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`= 13 AND `SourceEntry`=55516; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 55516, 0, 1, 31, 0, 3, 29887, 0, 0, 0, 0, '', 'Gymer''s Grab only hits29887'), +(13, 1, 55516, 0, 2, 31, 0, 3, 29889, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29989'), +(13, 1, 55516, 0, 3, 31, 0, 3, 29890, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29890'), +(13, 1, 55516, 0, 4, 31, 0, 3, 29891, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29891'), +(13, 1, 55516, 0, 5, 31, 0, 3, 29892, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29892'), +(13, 1, 55516, 0, 6, 31, 0, 3, 29893, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29893'), +(13, 1, 55516, 0, 7, 31, 0, 3, 29894, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29894'), +(13, 1, 55516, 0, 8, 31, 0, 3, 29897, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29897'), +(13, 1, 55516, 0, 9, 31, 0, 3, 29934, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29934'), +(13, 1, 55516, 0, 10, 31, 0, 3, 29939, 0, 0, 0, 0, '', 'Gymer''s Grab only hits 29935'); + +-- 209 Spawns in phase 256; that's the phase the player goes in when Gymer's vehicle spell is cast on him. +DELETE FROM `creature` WHERE phasemask=256 AND id IN (29821,29872,29887,29889,29890,29891,29892,29893,29894,29895,29897,29934,29935,29939); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES +(142488, 29821, 571, 1, 256, 0, 0, 5543.87, -2221.51, 235.402, 0.62832, 600, 0, 0, 88008, 54645, 0, 0, 0, 0), +(142489, 29872, 571, 1, 256, 0, 0, 6234.94, -2034.97, 234.052, 1.44615, 600, 0, 0, 176550, 3809, 1, 0, 0, 0), +(142490, 29887, 571, 1, 256, 0, 0, 6193.72, -1980.32, 231.695, 2.38464, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142491, 29887, 571, 1, 256, 0, 0, 6204.54, -1968.83, 233.226, 2.37286, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142492, 29887, 571, 1, 256, 0, 0, 6133.42, -2001.64, 231.773, 2.49538, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142493, 29887, 571, 1, 256, 0, 0, 6145.06, -1986.18, 231.879, 2.49931, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142494, 29887, 571, 1, 256, 0, 0, 6153.54, -1974.82, 231.927, 2.49931, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142495, 29887, 571, 1, 256, 0, 0, 6161.59, -1964.07, 233.557, 2.49145, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142496, 29887, 571, 1, 256, 0, 0, 6135.05, -1977.74, 232.608, 2.56214, 300, 10, 0, 34137, 0, 1, 0, 0, 0), +(142497, 29889, 571, 1, 256, 0, 0, 5674.37, -1468.56, 234.446, 4.52842, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142498, 29889, 571, 1, 256, 0, 0, 5586.2, -1480.24, 229.789, 3.65192, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142499, 29889, 571, 1, 256, 0, 0, 5820.47, -1406.84, 232.627, 2.12275, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142500, 29889, 571, 1, 256, 0, 0, 5751.21, -1573.51, 229.397, 4.99966, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142501, 29889, 571, 1, 256, 0, 0, 5786.81, -1626.29, 235.068, 1.75989, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142502, 29889, 571, 1, 256, 0, 0, 5722.32, -1609.86, 235.452, 3.01653, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142503, 29889, 571, 1, 256, 0, 0, 5655.16, -1554.06, 229.985, 3.86084, 600, 10, 0, 10282, 0, 1, 0, 0, 0), +(142504, 29890, 571, 1, 256, 0, 0, 5781.15, -1338.38, 231.596, 5.94606, 600, 10, 0, 10635, 3561, 1, 0, 0, 0), +(142505, 29890, 571, 1, 256, 0, 0, 5826.03, -1513.24, 229.113, 5.01536, 600, 10, 0, 10635, 3561, 1, 0, 0, 0), +(142506, 29890, 571, 1, 256, 0, 0, 5636.28, -1549.44, 229.052, 3.26393, 600, 10, 0, 10635, 3561, 1, 0, 0, 0), +(142507, 29890, 571, 1, 256, 0, 0, 5682.03, -1341.61, 231.087, 2.83117, 600, 10, 0, 10635, 3561, 1, 0, 0, 0), +(142508, 29891, 571, 1, 256, 0, 0, 5685.83, -1450.21, 233.333, 4.78681, 600, 10, 0, 8508, 7981, 1, 0, 0, 0), +(142509, 29891, 571, 1, 256, 0, 0, 5732.31, -1566.44, 230.02, 4.73184, 600, 10, 0, 8508, 7981, 1, 0, 0, 0), +(142510, 29891, 571, 1, 256, 0, 0, 5769.41, -1604.24, 234.079, 0.137435, 600, 0, 0, 8508, 7981, 1, 0, 0, 0), +(142511, 29891, 571, 1, 256, 0, 0, 5745.56, -1634.73, 236.355, 5.56829, 600, 10, 0, 8508, 7981, 1, 0, 0, 0), +(142512, 29892, 571, 1, 256, 0, 0, 5738.29, -1312.05, 232.462, 4.10745, 600, 10, 0, 10635, 0, 1, 0, 0, 0), +(142513, 29892, 571, 1, 256, 0, 0, 5565.59, -1317.36, 235.014, 5.94056, 600, 10, 0, 10635, 0, 1, 0, 0, 0), +(142514, 29892, 571, 1, 256, 0, 0, 5606.09, -1331.94, 234.324, 1.26352, 600, 10, 0, 10635, 0, 1, 0, 0, 0), +(142515, 29893, 571, 1, 256, 0, 0, 5853.59, -1697.84, 244.965, 2.67236, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142516, 29893, 571, 1, 256, 0, 0, 5695.74, -2009.43, 244.807, 0.124677, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142517, 29893, 571, 1, 256, 0, 0, 5572.47, -1652.34, 253.619, 4.17072, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142518, 29893, 571, 1, 256, 0, 0, 5696.37, -1678.93, 251.9, 4.39571, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142519, 29893, 571, 1, 256, 0, 0, 5631.35, -1681.11, 250.731, 1.85807, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142520, 29893, 571, 1, 256, 0, 0, 5704.06, -1720.49, 251.043, 2.9409, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142521, 29893, 571, 1, 256, 0, 0, 5778.87, -1719.28, 245.041, 3.77237, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142522, 29893, 571, 1, 256, 0, 0, 5915.15, -1649.44, 240.979, 1.88691, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142523, 29893, 571, 1, 256, 0, 0, 5569.31, -2202.47, 237.294, 4.03964, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142524, 29893, 571, 1, 256, 0, 0, 5897.1, -1919.8, 247.544, 3.42085, 300, 5, 0, 10635, 3561, 0, 1, 0, 0), +(142525, 29893, 571, 1, 256, 0, 0, 5689.67, -2208.27, 247.099, 0.162255, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142526, 29893, 571, 1, 256, 0, 0, 5713.66, -2105.41, 249.516, 5.98828, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142527, 29893, 571, 1, 256, 0, 0, 5702.55, -1917.11, 253.197, 3.79182, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142528, 29893, 571, 1, 256, 0, 0, 5690.33, -2185.8, 242.179, 2.57271, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142529, 29893, 571, 1, 256, 0, 0, 5740.76, -1773.32, 245.511, 2.31348, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142530, 29893, 571, 1, 256, 0, 0, 5614.24, -2037.16, 250.149, 1.40832, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142531, 29893, 571, 1, 256, 0, 0, 5575.29, -2000.67, 248.223, 6.19776, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142532, 29893, 571, 1, 256, 0, 0, 5677.27, -1851.13, 251.113, 3.90297, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142533, 29893, 571, 1, 256, 0, 0, 5577.02, -2066.85, 250.604, 1.07166, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142534, 29893, 571, 1, 256, 0, 0, 5571, -2199.84, 237.131, 2.6764, 300, 0, 5, 10635, 3561, 1, 0, 0, 0), +(142535, 29893, 571, 1, 256, 0, 0, 5720.52, -2249.46, 248.994, 2.89725, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142536, 29893, 571, 1, 256, 0, 0, 5572.56, -2191.33, 237.752, 4.12593, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142537, 29893, 571, 1, 256, 0, 0, 5753.41, -1810.86, 250.933, 5.99866, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142538, 29893, 571, 1, 256, 0, 0, 5618.3, -1752.46, 247.552, 1.09956, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142539, 29893, 571, 1, 256, 0, 0, 5859.25, -1685.61, 245.065, 3.36587, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142540, 29893, 571, 1, 256, 0, 0, 5775.25, -1814.98, 250.933, 5.39307, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142541, 29893, 571, 1, 256, 0, 0, 5743.85, -1852.16, 254.482, 1.90241, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142542, 29893, 571, 1, 256, 0, 0, 5587.08, -2148.03, 245.513, 6.16101, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142543, 29893, 571, 1, 256, 0, 0, 5523.55, -2117.92, 247.714, 1.53589, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142544, 29893, 571, 1, 256, 0, 0, 5565.29, -2073.18, 250.604, 2.82743, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142545, 29893, 571, 1, 256, 0, 0, 5677.37, -2149.39, 246.073, 3.49066, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142546, 29893, 571, 1, 256, 0, 0, 5648.6, -2249.16, 244.455, 4.83456, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142547, 29893, 571, 1, 256, 0, 0, 5567.93, -1993.53, 248.223, 1.74533, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142548, 29893, 571, 1, 256, 0, 0, 5675.13, -2209.69, 247.099, 3.05433, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142549, 29893, 571, 1, 256, 0, 0, 5698.65, -2027.66, 249.799, 5.37561, 300, 5, 0, 10635, 3561, 1, 0, 0, 0), +(142550, 29894, 571, 1, 256, 0, 0, 5665, -1415.25, 246.314, 5.39472, 600, 20, 0, 10282, 0, 1, 0, 0, 0), +(142551, 29894, 571, 1, 256, 0, 0, 5752.15, -1436.29, 258.409, 5.41043, 600, 20, 0, 10282, 0, 1, 0, 0, 0), +(142552, 29894, 571, 1, 256, 0, 0, 5761.66, -1565.35, 253.843, 5.16774, 600, 20, 0, 10282, 0, 1, 0, 0, 0), +(142553, 29894, 571, 1, 256, 0, 0, 5506.99, -2078.6, 240.758, 3.26877, 600, 0, 0, 10282, 0, 1, 0, 0, 0), +(142554, 29897, 571, 1, 256, 0, 0, 5800.41, -1949.86, 237.777, 0.0841148, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142555, 29897, 571, 1, 256, 0, 0, 5809.66, -1961.18, 237.623, 2.90301, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142556, 29897, 571, 1, 256, 0, 0, 5787.87, -1945.98, 237.981, 2.64831, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142557, 29897, 571, 1, 256, 0, 0, 5849.52, -1938.72, 238.759, 2.37365, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142558, 29897, 571, 1, 256, 0, 0, 5851.52, -1936.72, 238.759, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142559, 29897, 571, 1, 256, 0, 0, 5874.93, -1958.73, 237.907, 5.48033, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142560, 29897, 571, 1, 256, 0, 0, 5876.93, -1956.73, 237.907, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142561, 29897, 571, 1, 256, 0, 0, 5784.08, -2089.96, 248.134, 4.30029, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142562, 29897, 571, 1, 256, 0, 0, 5781.4, -2100.23, 248.13, 2.21899, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142563, 29897, 571, 1, 256, 0, 0, 5806.27, -2085.21, 248.853, 1.87123, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142564, 29897, 571, 1, 256, 0, 0, 5681.57, -1835.14, 239.37, 1.60886, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142565, 29897, 571, 1, 256, 0, 0, 5676.56, -1831.26, 238.047, 3.34263, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142566, 29897, 571, 1, 256, 0, 0, 5684.2, -1865.81, 245.472, 6.17889, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142567, 29897, 571, 1, 256, 0, 0, 5757.26, -2150.57, 239.183, 1.30925, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142568, 29897, 571, 1, 256, 0, 0, 5755.93, -2143.23, 239.517, 0.826811, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142569, 29897, 571, 1, 256, 0, 0, 5758.19, -2165.01, 236.708, 0.435639, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142570, 29897, 571, 1, 256, 0, 0, 5740.36, -1981.64, 239.12, 5.9877, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142571, 29897, 571, 1, 256, 0, 0, 5744.67, -1988.91, 237.913, 2.8217, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142572, 29897, 571, 1, 256, 0, 0, 5610.19, -1785.61, 237.507, 3.07515, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142573, 29897, 571, 1, 256, 0, 0, 5618.3, -1764.02, 238.151, 1.66464, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142574, 29897, 571, 1, 256, 0, 0, 5689.57, -1791.99, 242.42, 0.379977, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142575, 29897, 571, 1, 256, 0, 0, 5695.83, -1804.17, 243.797, 5.64564, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142576, 29897, 571, 1, 256, 0, 0, 5700.72, -1802.74, 243.412, 0.951114, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142577, 29897, 571, 1, 256, 0, 0, 5817.31, -1985.64, 235.536, 0.737231, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142578, 29897, 571, 1, 256, 0, 0, 5772.95, -1971.71, 238.367, 5.41063, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142579, 29897, 571, 1, 256, 0, 0, 5781.42, -2002.12, 235.408, 4.67777, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142580, 29897, 571, 1, 256, 0, 0, 5505.86, -1980.04, 245.708, 4.13413, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142581, 29897, 571, 1, 256, 0, 0, 5715.38, -1850.36, 244.283, 5.24594, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142582, 29897, 571, 1, 256, 0, 0, 5720.33, -1854.51, 244.441, 4.60288, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142583, 29897, 571, 1, 256, 0, 0, 5707.95, -1840.12, 243.55, 3.37615, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142584, 29897, 571, 1, 256, 0, 0, 5745.64, -2214.74, 237.548, 0.0771936, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142585, 29897, 571, 1, 256, 0, 0, 5747.11, -2186.19, 235.212, 1.23232, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142586, 29897, 571, 1, 256, 0, 0, 5753.6, -1818.86, 242.801, 5.70552, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142587, 29897, 571, 1, 256, 0, 0, 5708.97, -1818.38, 242.586, 0.27079, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142588, 29897, 571, 1, 256, 0, 0, 5775.08, -1818.34, 241.528, 3.04571, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142589, 29897, 571, 1, 256, 0, 0, 5699.57, -1814.88, 243.044, 2.8075, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142590, 29897, 571, 1, 256, 0, 0, 5722.35, -1809.84, 242.035, 5.9219, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142591, 29897, 571, 1, 256, 0, 0, 5672.66, -1752.98, 242.189, 0.176776, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142592, 29897, 571, 1, 256, 0, 0, 5749.24, -1916.05, 236.765, 1.57848, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142593, 29897, 571, 1, 256, 0, 0, 5770.94, -1947.83, 238.676, 3.24534, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142594, 29897, 571, 1, 256, 0, 0, 5760.04, -1930.67, 236.939, 2.48637, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142595, 29897, 571, 1, 256, 0, 0, 5718.87, -1725.81, 241.258, 2.40457, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142596, 29897, 571, 1, 256, 0, 0, 5704.41, -1761.31, 238.276, 1.08268, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142597, 29897, 571, 1, 256, 0, 0, 5692.77, -1742.78, 241.834, 0.59012, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142598, 29897, 571, 1, 256, 0, 0, 5811.15, -1806.3, 239.144, 3.31613, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142599, 29897, 571, 1, 256, 0, 0, 5812.15, -1805.3, 239.144, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142600, 29897, 571, 1, 256, 0, 0, 5813.15, -1804.3, 239.144, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142601, 29897, 571, 1, 256, 0, 0, 5741.6, -1938.87, 239.001, 5.39812, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142602, 29897, 571, 1, 256, 0, 0, 5771.44, -1953.53, 238.606, 0.393825, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142603, 29897, 571, 1, 256, 0, 0, 5743.02, -1972.59, 238.874, 2.11055, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142604, 29897, 571, 1, 256, 0, 0, 5703.15, -1794.12, 242.065, 3.34446, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142605, 29897, 571, 1, 256, 0, 0, 5746.18, -1782.44, 235.463, 0.797146, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142606, 29897, 571, 1, 256, 0, 0, 5619.11, -1717.61, 238.613, 3.22571, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142607, 29897, 571, 1, 256, 0, 0, 5548.48, -2014.94, 241.625, 6.14212, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142608, 29897, 571, 1, 256, 0, 0, 5574.68, -2047.1, 241.07, 3.84426, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142609, 29897, 571, 1, 256, 0, 0, 5581.1, -2026.65, 240.496, 2.87268, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142610, 29897, 571, 1, 256, 0, 0, 5579.34, -2052.01, 242.07, 6.14826, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142611, 29897, 571, 1, 256, 0, 0, 5636.66, -2065.46, 239.827, 3.88282, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142612, 29897, 571, 1, 256, 0, 0, 5624.29, -2040.4, 242.369, 2.36517, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142613, 29897, 571, 1, 256, 0, 0, 5637.19, -2045.61, 240.353, 2.54655, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142614, 29897, 571, 1, 256, 0, 0, 5616.15, -2050.24, 240.595, 0.793553, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142615, 29897, 571, 1, 256, 0, 0, 5609.08, -2065.27, 240.629, 3.25117, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142616, 29897, 571, 1, 256, 0, 0, 5608.1, -2066.92, 240.892, 6.16573, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142617, 29897, 571, 1, 256, 0, 0, 5678.65, -2105.46, 235.457, 1.91448, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142618, 29897, 571, 1, 256, 0, 0, 5679.89, -2099.35, 235.438, 5.22669, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142619, 29897, 571, 1, 256, 0, 0, 5672.36, -2099.72, 236.885, 1.76984, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142620, 29897, 571, 1, 256, 0, 0, 5735.15, -1916.51, 238.14, 2.53114, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142621, 29897, 571, 1, 256, 0, 0, 5767.14, -1922.78, 236.386, 5.84969, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142622, 29897, 571, 1, 256, 0, 0, 5774.57, -1924.63, 236.931, 2.64557, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142623, 29897, 571, 1, 256, 0, 0, 5817.63, -1736.84, 234.032, 1.06323, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142624, 29897, 571, 1, 256, 0, 0, 5808.32, -1768.02, 237.835, 2.35965, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142625, 29897, 571, 1, 256, 0, 0, 5781.59, -1770.5, 237.636, 1.57177, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142626, 29897, 571, 1, 256, 0, 0, 5776.26, -1770.25, 237.259, 0.302035, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142627, 29897, 571, 1, 256, 0, 0, 5789.37, -1769.62, 237.983, 5.76186, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142628, 29897, 571, 1, 256, 0, 0, 5644.87, -1849.57, 238.036, 6.24801, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142629, 29897, 571, 1, 256, 0, 0, 5698.37, -1935.3, 244.483, 4.06009, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142630, 29897, 571, 1, 256, 0, 0, 5702.1, -1939.35, 245.179, 2.22602, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142631, 29897, 571, 1, 256, 0, 0, 5708.07, -1941.57, 245.273, 5.95941, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142632, 29897, 571, 1, 256, 0, 0, 5617.93, -1927.98, 238.178, 1.42268, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142633, 29897, 571, 1, 256, 0, 0, 5665.75, -1960.17, 246.384, 3.74366, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142634, 29897, 571, 1, 256, 0, 0, 5618.41, -1918.89, 236.543, 5.94885, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142635, 29897, 571, 1, 256, 0, 0, 5640.05, -1896.65, 237.268, 2.27912, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142636, 29897, 571, 1, 256, 0, 0, 5646.57, -2073.42, 239.16, 4.57035, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142637, 29897, 571, 1, 256, 0, 0, 5648.18, -2044.24, 240.082, 2.20481, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142638, 29897, 571, 1, 256, 0, 0, 5651.94, -2049.16, 239.93, 1.42876, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142639, 29897, 571, 1, 256, 0, 0, 5682.93, -1925.03, 240.591, 6.18927, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142640, 29897, 571, 1, 256, 0, 0, 5666.15, -1926.56, 236.313, 3.40826, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142641, 29897, 571, 1, 256, 0, 0, 5680.71, -1919.09, 240.538, 6.25585, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142642, 29897, 571, 1, 256, 0, 0, 5635.86, -1918.02, 236.563, 2.58564, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142643, 29897, 571, 1, 256, 0, 0, 5630.83, -1923.23, 236.676, 5.98849, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142644, 29897, 571, 1, 256, 0, 0, 5622.87, -1988.8, 242.277, 5.95495, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142645, 29897, 571, 1, 256, 0, 0, 5624.85, -1887.39, 238.361, 3.35814, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142646, 29897, 571, 1, 256, 0, 0, 5631.73, -1946.06, 240.503, 2.14675, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142647, 29897, 571, 1, 256, 0, 0, 5641.32, -1940.9, 237.796, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142648, 29897, 571, 1, 256, 0, 0, 5642.32, -1939.9, 237.796, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142649, 29897, 571, 1, 256, 0, 0, 5611.14, -1791.48, 237.011, 1.11064, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142650, 29897, 571, 1, 256, 0, 0, 5620.56, -1791.42, 235.489, 4.90098, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142651, 29897, 571, 1, 256, 0, 0, 5648.79, -1756.16, 238.444, 3.77298, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142652, 29897, 571, 1, 256, 0, 0, 5610.22, -1747.1, 238.102, 4.15958, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142653, 29897, 571, 1, 256, 0, 0, 5612.51, -1738.41, 237.053, 1.85177, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142654, 29897, 571, 1, 256, 0, 0, 5755, -1817.13, 242.671, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142655, 29897, 571, 1, 256, 0, 0, 5756, -1816.13, 242.671, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142656, 29897, 571, 1, 256, 0, 0, 5776.57, -1793.26, 236.417, 1.48353, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142657, 29897, 571, 1, 256, 0, 0, 5777.57, -1792.26, 236.417, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142658, 29897, 571, 1, 256, 0, 0, 5778.57, -1791.26, 236.417, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142659, 29897, 571, 1, 256, 0, 0, 5801.6, -1765.91, 238.43, 2.58309, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142660, 29897, 571, 1, 256, 0, 0, 5802.6, -1764.91, 238.43, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142661, 29897, 571, 1, 256, 0, 0, 5803.6, -1763.91, 238.43, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142662, 29897, 571, 1, 256, 0, 0, 5785.24, -1852.96, 237.379, 6.26573, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142663, 29897, 571, 1, 256, 0, 0, 5787.24, -1850.96, 237.379, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142664, 29897, 571, 1, 256, 0, 0, 5742.22, -1871.72, 244.595, 5.06145, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142665, 29897, 571, 1, 256, 0, 0, 5744.22, -1869.72, 244.595, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142666, 29897, 571, 1, 256, 0, 0, 5697.92, -2029.47, 240.357, 5.14872, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142667, 29897, 571, 1, 256, 0, 0, 5823.94, -1876.77, 235.48, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142668, 29897, 571, 1, 256, 0, 0, 5824.94, -1875.77, 235.48, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142669, 29897, 571, 1, 256, 0, 0, 5682.56, -1792.18, 241.997, 0.0174533, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142670, 29897, 571, 1, 256, 0, 0, 5683.56, -1791.18, 241.997, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142671, 29897, 571, 1, 256, 0, 0, 5684.56, -1790.18, 241.997, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142672, 29897, 571, 1, 256, 0, 0, 5761.16, -1965.01, 237.3, 0.628319, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142673, 29897, 571, 1, 256, 0, 0, 5762.16, -1964.01, 237.3, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142674, 29897, 571, 1, 256, 0, 0, 5763.16, -1963.01, 237.3, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142675, 29897, 571, 1, 256, 0, 0, 5852.36, -1944.45, 239.13, 2.12984, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142676, 29897, 571, 1, 256, 0, 0, 5602.24, -2077.07, 242.888, 5.5676, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142677, 29897, 571, 1, 256, 0, 0, 5603.24, -2076.07, 242.888, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142678, 29897, 571, 1, 256, 0, 0, 5604.24, -2075.07, 242.888, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142679, 29897, 571, 1, 256, 0, 0, 5606.16, -2054.38, 240.52, 0.733038, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142680, 29897, 571, 1, 256, 0, 0, 5608.16, -2052.38, 240.52, 0, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142681, 29897, 571, 1, 256, 0, 0, 5739.8, -1806.04, 240.445, 2.14916, 120, 0, 0, 10635, 3561, 0, 0, 0, 0), +(142682, 29934, 571, 1, 256, 0, 0, 5536.93, -2222.53, 235.536, 0.942478, 300, 0, 0, 106350, 17805, 0, 0, 0, 0), +(142683, 29935, 571, 1, 256, 0, 0, 5545.14, -2227.4, 236.246, 0.907571, 300, 0, 0, 106350, 17805, 0, 0, 0, 0), +(142684, 29939, 571, 1, 256, 0, 0, 5715.978, -1471.326, 233.7377, 5.707227, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142685, 29939, 571, 1, 256, 0, 0, 5546.167, -1869.288, 238.3516, 2.426008, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142686, 29939, 571, 1, 256, 0, 0, 5645.932, -1925.377, 236.6502, 4.118977, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142687, 29939, 571, 1, 256, 0, 0, 5587.249, -1965.734, 242.4379, 4.420742, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142688, 29939, 571, 1, 256, 0, 0, 5505.981, -2078.141, 240.9521, 2.356194, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142689, 29939, 571, 1, 256, 0, 0, 5521.792, -2245.884, 236.2022, 3.036873, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142690, 29939, 571, 1, 256, 0, 0, 5793.679, -2095.737, 249.0007, 5.235988, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142691, 29939, 571, 1, 256, 0, 0, 6175.099, -2017.251, 245.3769, 1.099557, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142692, 29939, 571, 1, 256, 0, 0, 6210.14, -2071.388, 235.3288, 0.4347768, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142693, 29939, 571, 1, 256, 0, 0, 5505.981, -2078.141, 240.9521, 2.356194, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142694, 29939, 571, 1, 256, 0, 0, 5645.932, -1925.377, 236.6502, 4.118977, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142695, 29939, 571, 1, 256, 0, 0, 5521.792, -2245.884, 236.2022, 3.036873, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142696, 29939, 571, 1, 256, 0, 0, 5645.932, -1925.377, 236.6502, 4.118977, 120, 0, 0, 0, 1, 0, 0, 0, 0), +(142697, 29939, 571, 1, 256, 0, 0, 5521.792, -2245.884, 236.2022, 3.036873, 120, 0, 0, 0, 1, 0, 0, 0, 0); \ No newline at end of file diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp index 63ba44f19e8..532ede3f849 100644 --- a/src/server/scripts/Northrend/zone_zuldrak.cpp +++ b/src/server/scripts/Northrend/zone_zuldrak.cpp @@ -24,6 +24,7 @@ #include "SpellScript.h" #include "SpellAuras.h" #include "SpellAuraEffects.h" +#include "Vehicle.h" /*#### ## npc_drakuru_shackles @@ -1814,6 +1815,54 @@ class spell_fetch_ingredient_aura : public SpellScriptLoader } }; +enum StormCloud +{ + STORM_COULD = 29939, + HEALING_WINDS = 55549, + STORM_VISUAL = 55708, + GYMERS_GRAB = 55516, + RIDE_VEHICLE = 43671 +}; + +class npc_storm_cloud : public CreatureScript +{ +public: + npc_storm_cloud() : CreatureScript("npc_storm_cloud") { } + + struct npc_storm_cloudAI : public ScriptedAI + { + npc_storm_cloudAI(Creature* creature) : ScriptedAI(creature) {} + + void Reset() OVERRIDE + { + me->CastSpell(me, STORM_VISUAL, true); + } + + void JustRespawned() OVERRIDE + { + Reset(); + } + + void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE + { + if (spell->Id != GYMERS_GRAB) + return; + + if (Vehicle* veh = caster->GetVehicleKit()) + if (veh->GetAvailableSeatCount() != 0) + { + me->CastSpell(caster, RIDE_VEHICLE, true); + me->CastSpell(caster, HEALING_WINDS, true); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_storm_cloudAI(creature); + } +}; + void AddSC_zuldrak() { new npc_drakuru_shackles(); @@ -1834,4 +1883,5 @@ void AddSC_zuldrak() new spell_random_ingredient(); new spell_pot_check(); new spell_fetch_ingredient_aura(); + new npc_storm_cloud(); } diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 6b56c51d6e1..3d84d9bbca9 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2161,6 +2161,86 @@ class spell_q12619_emblazon_runeblade_effect : public SpellScriptLoader } }; +enum Quest_The_Storm_King +{ + SPELL_RIDE_GYMER = 43671, + SPELL_GRABBED = 55424 +}; + +class spell_q12919_gymers_grab : public SpellScriptLoader +{ + public: + spell_q12919_gymers_grab() : SpellScriptLoader("spell_q12919_gymers_grab") { } + + class spell_q12919_gymers_grab_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12919_gymers_grab_SpellScript); + + bool Validate(SpellInfo const* /*spell*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_RIDE_GYMER)) + return false; + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + int8 seatId = 2; + if (!GetHitCreature()) + return; + GetHitCreature()->CastCustomSpell(SPELL_RIDE_GYMER, SPELLVALUE_BASE_POINT0, seatId, GetCaster(), true); + GetHitCreature()->CastSpell(GetHitCreature(), SPELL_GRABBED, true); + } + + void Register() OVERRIDE + { + OnEffectHitTarget += SpellEffectFn(spell_q12919_gymers_grab_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q12919_gymers_grab_SpellScript(); + } +}; + +enum Quest_The_Storm_King_Throw +{ + SPELL_VARGUL_EXPLOSION = 55569 +}; + +class spell_q12919_gymers_throw : public SpellScriptLoader +{ + public: + spell_q12919_gymers_throw() : SpellScriptLoader("spell_q12919_gymers_throw") { } + + class spell_q12919_gymers_throw_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12919_gymers_throw_SpellScript); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (caster->IsVehicle()) + if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(1)) + { + passenger->ExitVehicle(); + caster->CastSpell(passenger, SPELL_VARGUL_EXPLOSION, true); + } + } + + void Register() OVERRIDE + { + OnEffectHitTarget += SpellEffectFn(spell_q12919_gymers_throw_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q12919_gymers_throw_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2213,4 +2293,6 @@ void AddSC_quest_spell_scripts() new spell_q12641_death_comes_from_on_high(); new spell_q12619_emblazon_runeblade(); new spell_q12619_emblazon_runeblade_effect(); + new spell_q12919_gymers_grab(); + new spell_q12919_gymers_throw(); } -- cgit v1.2.3 From 18bf68ad7e6da7cdad611b1cc78cb15cfd11413e Mon Sep 17 00:00:00 2001 From: Filip Date: Sat, 28 Sep 2013 18:15:16 +0200 Subject: DB/Update: Spawndist for creature with random movement --- sql/updates/world/2013_09_28_00_world_update.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/2013_09_28_00_world_update.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_28_00_world_update.sql b/sql/updates/world/2013_09_28_00_world_update.sql new file mode 100644 index 00000000000..7d58291cd66 --- /dev/null +++ b/sql/updates/world/2013_09_28_00_world_update.sql @@ -0,0 +1,5 @@ +UPDATE `creature` SET `spawndist`=0 WHERE `guid`=142524; +UPDATE `creature` SET `spawndist`=5 WHERE `guid`=142489; +UPDATE `creature` SET `spawndist`=5 WHERE `guid`=142510; +UPDATE `creature` SET `spawndist`=5 WHERE `guid`=142534; +UPDATE `creature` SET `spawndist`=5 WHERE `guid`=142553; -- cgit v1.2.3 From 6711ba0bd85b6908d908ca127274c5c409dbad64 Mon Sep 17 00:00:00 2001 From: Filip Date: Sat, 28 Sep 2013 18:19:33 +0200 Subject: DB/Update: Pet spells --- sql/updates/world/2013_09_28_01_world_update.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2013_09_28_01_world_update.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_28_01_world_update.sql b/sql/updates/world/2013_09_28_01_world_update.sql new file mode 100644 index 00000000000..43720dbab22 --- /dev/null +++ b/sql/updates/world/2013_09_28_01_world_update.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `spell1` = 52497, `spell2` = 52510 WHERE `entry` = 28843; -- cgit v1.2.3 From ea2fe0217d497063d4b7a169ee81287e2b849702 Mon Sep 17 00:00:00 2001 From: Spp Date: Sun, 29 Sep 2013 13:08:46 +0200 Subject: Core/RBAC: Simplify RBAC implementation - Drop groups (roles than can have inherited roles) and roles (set of permissions) - Permissions can now have inherited permissions (those act as roles) RBAC DB structure is now limited to four tables - rbac_permissions: Contains permissions and roles - rbac_linked_permissions: Contains the relation between permissions and linked permissions (those permissions that have linked permissions are called roles) - rbac_default_permissions: Contains the list of permissions to be granted to each security level [Added to maintain compatibility in an easy way] - rbac_account_permissions: Contains the list of permissions granted or denied for a particular account. NOTE: IF YOU ARE USING CUSTOM PERMISSIONS, ROLES OR GROUPS CHECK THE SQL BEFORE APPLYING... --- sql/updates/auth/2013_09_29_00_auth_misc.sql | 99 +++++ sql/updates/world/2013_09_29_00_world_misc.sql | 18 + src/server/game/Accounts/AccountMgr.cpp | 141 ++----- src/server/game/Accounts/AccountMgr.h | 14 +- src/server/game/Accounts/RBAC.cpp | 388 ++++-------------- src/server/game/Accounts/RBAC.h | 319 +++++---------- src/server/game/Miscellaneous/Language.h | 45 +-- src/server/scripts/Commands/cs_rbac.cpp | 449 ++------------------- .../Database/Implementation/LoginDatabase.cpp | 8 - .../shared/Database/Implementation/LoginDatabase.h | 6 - 10 files changed, 384 insertions(+), 1103 deletions(-) create mode 100644 sql/updates/auth/2013_09_29_00_auth_misc.sql create mode 100644 sql/updates/world/2013_09_29_00_world_misc.sql (limited to 'sql') diff --git a/sql/updates/auth/2013_09_29_00_auth_misc.sql b/sql/updates/auth/2013_09_29_00_auth_misc.sql new file mode 100644 index 00000000000..e2d4143c991 --- /dev/null +++ b/sql/updates/auth/2013_09_29_00_auth_misc.sql @@ -0,0 +1,99 @@ +-- Update command permissions with wrong name +UPDATE `rbac_permissions` SET `name` = CONCAT('Command: ', `name`) WHERE `name` NOT LIKE 'Command: %' AND id BETWEEN 230 AND 774; + +-- Reorder some permissions and delete obsolete permissions +SET FOREIGN_KEY_CHECKS = 0; + +DELETE FROM `rbac_account_permissions` WHERE `permissionId` IN (202, 203, 204, 205, 206, 207, 208, 214, 215, 216); +DELETE FROM `rbac_role_permissions` WHERE `permissionId` IN (202, 203, 204, 205, 206, 207, 208, 214, 215, 216); +DELETE FROM `rbac_permissions` WHERE `id` IN (202, 203, 204, 205, 206, 207, 208, 214, 215, 216); + +UPDATE `rbac_account_permissions` SET `permissionId` = `permissionId` - 7 WHERE `permissionId` BETWEEN 209 AND 213; +UPDATE `rbac_role_permissions` SET `permissionId` = `permissionId` - 7 WHERE `permissionId` BETWEEN 209 AND 213; +UPDATE `rbac_permissions` SET `id` = `id` - 7 WHERE `id` BETWEEN 209 AND 213; + +SET FOREIGN_KEY_CHECKS = 1; + +-- Create new table for permissions inherited from other permissions (roles) +DROP TABLE IF EXISTS `rbac_linked_permissions`; +CREATE TABLE `rbac_linked_permissions` ( + `id` int(10) unsigned NOT NULL COMMENT 'Permission id', + `linkedId` int(10) unsigned NOT NULL COMMENT 'Linked Permission id', + PRIMARY KEY (`id`,`linkedId`), + KEY `fk__rbac_linked_permissions__rbac_permissions1` (`id`), + KEY `fk__rbac_linked_permissions__rbac_permissions2` (`linkedId`), + CONSTRAINT `fk__rbac_linked_permissions__rbac_permissions1` FOREIGN KEY (`id`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE, + CONSTRAINT `fk__rbac_linked_permissions__rbac_permissions2` FOREIGN KEY (`linkedId`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Permission - Linked Permission relation'; + +-- Create new table for permissions inherited by security level +DROP TABLE IF EXISTS `rbac_default_permissions`; +CREATE TABLE `rbac_default_permissions` ( + `secId` int(10) unsigned NOT NULL COMMENT 'Security Level id', + `permissionId` int(10) unsigned NOT NULL COMMENT 'permission id', + PRIMARY KEY (`secId`,`permissionId`), + KEY `fk__rbac_default_permissions__rbac_permissions` (`permissionId`), + CONSTRAINT `fk__rbac_default_permissions__rbac_permissions` FOREIGN KEY (`permissionId`) REFERENCES `rbac_permissions` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Default permission to assign to different account security levels'; + +DELETE FROM `rbac_permissions` WHERE `id` BETWEEN 192 AND 199; +INSERT INTO `rbac_permissions` (`id`, `name`) VALUES +(199, 'Role: Player Commands'), +(198, 'Role: Moderator Commands'), +(197, 'Role: Gamemaster Commands'), +(196, 'Role: Administrator Commands'), +(195, 'Role: Sec Level Player'), +(194, 'Role: Sec Level Moderator'), +(193, 'Role: Sec Level Gamemaster'), +(192, 'Role: Sec Level Administrator'); + +INSERT INTO `rbac_default_permissions` (secId, `permissionId`) VALUES +(0, 195), +(1, 194), +(2, 193), +(3, 192); + +-- Delete duplicate role assignment +DELETE FROM `rbac_group_roles` WHERE `roleId` = 39 AND `groupId` > 3; +DELETE FROM `rbac_group_roles` WHERE `roleId` = 40 AND `groupId` > 1; +DELETE FROM `rbac_group_roles` WHERE `roleId` IN (8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 32, 33, 35, 36, 37, 38) AND `groupId` > 2; +DELETE FROM `rbac_role_permissions` WHERE `permissionId` = 263 AND `roleId` > 1; + +-- Add All linked permissions +TRUNCATE `rbac_linked_permissions`; + +INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) VALUES +(192, 193), -- Administrator has granted all permissions from Gamemaster +(192, 196), -- Grant Admin commands to Administrators +(193, 194), -- Gamemaster has granted all permissions from Moderator +(193, 197), -- Grant Gamemaster commands to Gamemasters +(194, 195), -- Moderator has granted all permissions from Player +(194, 198), -- Grant Moderator commands to Moderators +(195, 199); -- Grant Player commands to Players + +-- Add all permissions to the Role "Sec Level XXX" +INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) +SELECT (196 - g.id), p.id +FROM `rbac_groups` g + JOIN `rbac_group_roles` gr ON g.id = gr.groupId + JOIN `rbac_roles` r ON gr.roleId = r.id + JOIN `rbac_role_permissions` rp ON r.id = rp.roleId + JOIN `rbac_permissions` p ON rp.permissionId = p.id +WHERE r.id > 4; + +-- Add all permissions to the Role "XXX Commands" +INSERT INTO `rbac_linked_permissions` (`id`, `linkedId`) +SELECT (200 - r.id), p.id +FROM `rbac_roles` r + JOIN `rbac_role_permissions` rp ON r.id = rp.roleId + JOIN `rbac_permissions` p ON rp.permissionId = p.id +WHERE r.id BETWEEN 1 and 4; + +-- Delete obsolete tables +DROP TABLE IF EXISTS `rbac_account_roles`; +DROP TABLE IF EXISTS `rbac_account_groups`; +DROP TABLE IF EXISTS `rbac_security_level_groups`; +DROP TABLE IF EXISTS `rbac_group_roles`; +DROP TABLE IF EXISTS `rbac_role_permissions`; +DROP TABLE IF EXISTS `rbac_groups`; +DROP TABLE IF EXISTS `rbac_roles`; \ No newline at end of file diff --git a/sql/updates/world/2013_09_29_00_world_misc.sql b/sql/updates/world/2013_09_29_00_world_misc.sql new file mode 100644 index 00000000000..1e318e492fa --- /dev/null +++ b/sql/updates/world/2013_09_29_00_world_misc.sql @@ -0,0 +1,18 @@ +DELETE FROM `trinity_string` WHERE `entry` IN (65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 93, 94); +UPDATE `trinity_string` SET `entry` = 65 WHERE `entry` = 90; +UPDATE `trinity_string` SET `entry` = 66 WHERE `entry` = 91; +UPDATE `trinity_string` SET `entry` = 68 WHERE `entry` = 95; +UPDATE `trinity_string` SET `entry` = `entry` - 10 WHERE `entry` BETWEEN 82 AND 89; + +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES +(67, 'Account %u (%s) inherited permissions by sec level %u:'), +(69, 'Linked permissions:'); + +DELETE FROM `command` WHERE `permission` BETWEEN 200 AND 213; +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('.rbac account list', 202, 'Syntax: rbac account list [$account]\n\nView permissions of selected player or given account\nNote: Only those that affect current realm'), +('.rbac account grant', 203, 'Syntax: rbac account grant [$account] #id [#realmId]\n\nGrant a permission to selected player or given account.\n\n#reamID may be -1 for all realms.'), +('.rbac account deny', 204, 'Syntax: rbac account deny [$account] #id [#realmId]\n\nDeny a permission to selected player or given account.\n\n#reamID may be -1 for all realms.'), +('.rbac account revoke', 205, 'Syntax: rbac account revoke [$account] #id\n\nRemove a permission from an account\n\nNote: Removes the permission from granted or denied permissions'), +('.rbac list', 206, 'Syntax: rbac list [$id]\n\nView list of all permissions. If $id is given will show only info for that permission.'); + diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 7fd27f76247..cd700839934 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -415,102 +415,69 @@ void AccountMgr::LoadRBAC() } while (result->NextRow()); - TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading roles"); - result = LoginDatabase.Query("SELECT id, name FROM rbac_roles"); + TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading linked permissions"); + result = LoginDatabase.Query("SELECT id, linkedId FROM rbac_linked_permissions ORDER BY id ASC"); if (!result) { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 account role definitions. DB table `rbac_roles` is empty."); + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 linked permissions. DB table `rbac_linked_permissions` is empty."); return; } - do - { - Field* field = result->Fetch(); - uint32 id = field[0].GetUInt32(); - _roles[id] = new rbac::RBACRole(id, field[1].GetString()); - ++count2; - } - while (result->NextRow()); - - TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading role permissions"); - result = LoginDatabase.Query("SELECT roleId, permissionId FROM rbac_role_permissions"); - if (!result) - { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 account role-permission definitions. DB table `rbac_role_permissions` is empty."); - return; - } - - do - { - Field* field = result->Fetch(); - uint32 id = field[0].GetUInt32(); - rbac::RBACRole* role = _roles[id]; - role->GrantPermission(field[1].GetUInt32()); - } - while (result->NextRow()); - - TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading groups"); - result = LoginDatabase.Query("SELECT id, name FROM rbac_groups"); - if (!result) - { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 account group definitions. DB table `rbac_groups` is empty."); - return; - } + uint32 permissionId = 0; + rbac::RBACPermission* permission = NULL; do { Field* field = result->Fetch(); - uint32 id = field[0].GetUInt32(); - _groups[id] = new rbac::RBACGroup(id, field[1].GetString()); - ++count3; - } - while (result->NextRow()); - - TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading group roles"); - result = LoginDatabase.Query("SELECT groupId, roleId FROM rbac_group_roles"); - if (!result) - { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 account group-role definitions. DB table `rbac_group_roles` is empty."); - return; - } + uint32 newId = field[0].GetUInt32(); + if (permissionId != newId) + { + permissionId = newId; + permission = _permissions[newId]; + } - do - { - Field* field = result->Fetch(); - uint32 id = field[0].GetUInt32(); - rbac::RBACGroup* group = _groups[id]; - group->GrantRole(field[1].GetUInt32()); + uint32 linkedPermissionId = field[1].GetUInt32(); + if (linkedPermissionId == permissionId) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "RBAC Permission %u has itself as linked permission. Ignored", permissionId); + continue; + } + permission->AddLinkedPermission(linkedPermissionId); + ++count2; } while (result->NextRow()); - TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading security level groups"); - result = LoginDatabase.Query("SELECT secId, groupId FROM rbac_security_level_groups ORDER by secId ASC"); + TC_LOG_DEBUG(LOG_FILTER_RBAC, "AccountMgr::LoadRBAC: Loading default permissions"); + result = LoginDatabase.Query("SELECT secId, permissionId FROM rbac_default_permissions ORDER BY secId ASC"); if (!result) { - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 account default groups for security levels definitions. DB table `rbac_security_level_groups` is empty."); + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 default permission definitions. DB table `rbac_default_permissions` is empty."); return; } - uint8 lastSecId = 255; - rbac::RBACGroupContainer* groups = NULL; + uint8 secId = 255; + rbac::RBACPermissionContainer* permissions; do { Field* field = result->Fetch(); - uint8 secId = field[0].GetUInt8(); - - if (lastSecId != secId) - groups = &_defaultSecGroups[secId]; - - groups->insert(field[1].GetUInt32()); + uint32 newId = field[0].GetUInt32(); + if (secId != newId) + { + secId = newId; + permissions = &_defaultPermissions[secId]; + } + + permissions->insert(field[1].GetUInt32()); + ++count3; } while (result->NextRow()); - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u permission definitions, %u role definitions and %u group definitions in %u ms", count1, count2, count3, GetMSTimeDiffToNow(oldMSTime)); + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u permission definitions, %u linked permissions and %u default permissions in %u ms", count1, count2, count3, GetMSTimeDiffToNow(oldMSTime)); } void AccountMgr::UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uint8 securityLevel, int32 realmId) { - if (rbac) + if (rbac && securityLevel == rbac->GetSecurityLevel()) rbac->SetSecurityLevel(securityLevel); // Delete old security level from DB @@ -539,29 +506,9 @@ void AccountMgr::UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uin } } -rbac::RBACGroup const* AccountMgr::GetRBACGroup(uint32 groupId) const -{ - TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACGroup: groupId: %u", groupId); - rbac::RBACGroupsContainer::const_iterator it = _groups.find(groupId); - if (it != _groups.end()) - return it->second; - - return NULL; -} - -rbac::RBACRole const* AccountMgr::GetRBACRole(uint32 roleId) const -{ - TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACRole: roleId: %u", roleId); - rbac::RBACRolesContainer::const_iterator it = _roles.find(roleId); - if (it != _roles.end()) - return it->second; - - return NULL; -} - rbac::RBACPermission const* AccountMgr::GetRBACPermission(uint32 permissionId) const { - TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACPermission: roleId: %u", permissionId); + TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACPermission: %u", permissionId); rbac::RBACPermissionsContainer::const_iterator it = _permissions.find(permissionId); if (it != _permissions.end()) return it->second; @@ -591,14 +538,12 @@ void AccountMgr::ClearRBAC() for (rbac::RBACPermissionsContainer::iterator itr = _permissions.begin(); itr != _permissions.end(); ++itr) delete itr->second; - for (rbac::RBACRolesContainer::iterator itr = _roles.begin(); itr != _roles.end(); ++itr) - delete itr->second; - - for (rbac::RBACGroupsContainer::iterator itr = _groups.begin(); itr != _groups.end(); ++itr) - delete itr->second; - _permissions.clear(); - _roles.clear(); - _groups.clear(); - _defaultSecGroups.clear(); + _defaultPermissions.clear(); +} + +rbac::RBACPermissionContainer const& AccountMgr::GetRBACDefaultPermissions(uint8 secLevel) +{ + TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACDefaultPermissions: secLevel %u - size: %u", secLevel, _defaultPermissions[secLevel].size()); + return _defaultPermissions[secLevel]; } diff --git a/src/server/game/Accounts/AccountMgr.h b/src/server/game/Accounts/AccountMgr.h index 8b2e77d3e9b..24bea5c15a9 100644 --- a/src/server/game/Accounts/AccountMgr.h +++ b/src/server/game/Accounts/AccountMgr.h @@ -46,9 +46,7 @@ enum PasswordChangeSecurity namespace rbac { typedef std::map RBACPermissionsContainer; -typedef std::map RBACRolesContainer; -typedef std::map RBACGroupsContainer; -typedef std::map RBACDefaultSecurityGroupContainer; +typedef std::map RBACDefaultPermissionsContainer; } class AccountMgr @@ -86,21 +84,15 @@ class AccountMgr void UpdateAccountAccess(rbac::RBACData* rbac, uint32 accountId, uint8 securityLevel, int32 realmId); void LoadRBAC(); - rbac::RBACGroup const* GetRBACGroup(uint32 group) const; - rbac::RBACRole const* GetRBACRole(uint32 role) const; rbac::RBACPermission const* GetRBACPermission(uint32 permission) const; - rbac::RBACGroupsContainer const& GetRBACGroupList() const { return _groups; } - rbac::RBACRolesContainer const& GetRBACRoleList() const { return _roles; } rbac::RBACPermissionsContainer const& GetRBACPermissionList() const { return _permissions; } - rbac::RBACGroupContainer const& GetRBACDefaultGroups(uint8 secLevel) { return _defaultSecGroups[secLevel]; } + rbac::RBACPermissionContainer const& GetRBACDefaultPermissions(uint8 secLevel); private: void ClearRBAC(); rbac::RBACPermissionsContainer _permissions; - rbac::RBACRolesContainer _roles; - rbac::RBACGroupsContainer _groups; - rbac::RBACDefaultSecurityGroupContainer _defaultSecGroups; + rbac::RBACDefaultPermissionsContainer _defaultPermissions; }; #define sAccountMgr ACE_Singleton::instance() diff --git a/src/server/game/Accounts/RBAC.cpp b/src/server/game/Accounts/RBAC.cpp index d8333ce74d8..8cd70721976 100644 --- a/src/server/game/Accounts/RBAC.cpp +++ b/src/server/game/Accounts/RBAC.cpp @@ -23,238 +23,20 @@ namespace rbac { -void RBACRole::GrantPermission(uint32 permissionId) +std::string GetDebugPermissionString(RBACPermissionContainer const& perms) { - if (permissionId < RBAC_PERM_MAX) + std::string str = ""; + if (!perms.empty()) { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACRole::GrantPermission (Role %u, Permission %u). Ok", GetId(), permissionId); - _perms.set(permissionId); - } - else - TC_LOG_ERROR(LOG_FILTER_RBAC, "RBACRole::GrantPermission (Role %u, Permission %u). Permission not lower than %u", - GetId(), permissionId, RBAC_PERM_MAX); -} - -void RBACRole::RevokePermission(uint32 permissionId) -{ - if (permissionId < RBAC_PERM_MAX) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACRole::RevokePermission (Role %u, Permission %u). Ok", GetId(), permissionId); - _perms.reset(permissionId); - } - else - TC_LOG_ERROR(LOG_FILTER_RBAC, "RBACRole::RevokePermission (Role %u, Permission %u). Permission not lower than %u", - GetId(), permissionId, RBAC_PERM_MAX); -} - -void RBACGroup::GrantRole(uint32 roleId) -{ - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACRole::GrantPermission (Role %u, Permission %u). Ok", GetId(), roleId); - _roles.insert(roleId); -} - -void RBACGroup::RevokeRole(uint32 roleId) -{ - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACRole::GrantPermission (Role %u, Permission %u). Ok", GetId(), roleId); - _roles.erase(roleId); -} - -RBACCommandResult RBACData::AddGroup(uint32 groupId, int32 realmId /* = 0 */) -{ - // Check if group Id exists - RBACGroup const* group = sAccountMgr->GetRBACGroup(groupId); - if (!group) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::AddGroup [Id: %u Name: %s] (Group %u, RealmId %d). Group does not exists", - GetId(), GetName().c_str(), groupId, realmId); - return RBAC_ID_DOES_NOT_EXISTS; - } - - // Already added? - std::pair::iterator, bool> ret = _groups.insert(groupId); - if (!ret.second) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::AddGroup [Id: %u Name: %s] (Group %u, RealmId %d). Group Already added", - GetId(), GetName().c_str(), groupId, realmId); - return RBAC_CANT_ADD_ALREADY_ADDED; - } - - // Do not save to db when loading data from DB (realmId = 0) - if (realmId) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::AddGroup [Id: %u Name: %s] (Group %u, RealmId %d). Added and DB updated", - GetId(), GetName().c_str(), groupId, realmId); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_RBAC_ACCOUNT_GROUP); - stmt->setUInt32(0, GetId()); - stmt->setUInt32(1, groupId); - stmt->setInt32(2, realmId); - LoginDatabase.Execute(stmt); - - CalculateNewPermissions(); - } - else - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::AddGroup [Id: %u Name: %s] (Group %u, RealmId %d). Added", - GetId(), GetName().c_str(), groupId, realmId); - - return RBAC_OK; -} - -RBACCommandResult RBACData::RemoveGroup(uint32 groupId, int32 realmId /* = 0 */) -{ - // could remove it? - if (!_groups.erase(groupId)) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RemoveGroup [Id: %u Name: %s] (Group %u, RealmId %d). Group not in list", - GetId(), GetName().c_str(), groupId, realmId); - return RBAC_CANT_REVOKE_NOT_IN_LIST; - } - - // Do not save to db when loading data from DB (realmId = 0) - if (realmId) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RemoveGroup [Id: %u Name: %s] (Group %u, RealmId %d). Removed and DB updated", - GetId(), GetName().c_str(), groupId, realmId); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_RBAC_ACCOUNT_GROUP); - stmt->setUInt32(0, GetId()); - stmt->setUInt32(1, groupId); - stmt->setInt32(2, realmId); - LoginDatabase.Execute(stmt); - - CalculateNewPermissions(); - } - else - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RemoveGroup [Id: %u Name: %s] (Group %u, RealmId %d). Removed", - GetId(), GetName().c_str(), groupId, realmId); - - return RBAC_OK; -} - -RBACCommandResult RBACData::GrantRole(uint32 roleId, int32 realmId /* = 0*/) -{ - // Check if role Id exists - RBACRole const* role = sAccountMgr->GetRBACRole(roleId); - if (!role) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantRole [Id: %u Name: %s] (Role %u, RealmId %d). Role does not exists", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_ID_DOES_NOT_EXISTS; - } - - // Check if already added in denied list - if (_deniedRoles.find(roleId) != _deniedRoles.end()) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantRole [Id: %u Name: %s] (Role %u, RealmId %d). Role in deny list", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_IN_DENIED_LIST; - } - - // Already added? - std::pair::iterator, bool> ret = _grantedRoles.insert(roleId); - if (!ret.second) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantRole [Id: %u Name: %s] (Role %u, RealmId %d). Role already granted", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_CANT_ADD_ALREADY_ADDED; - } - - // Do not save to db when loading data from DB (realmId = 0) - if (realmId) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantRole [Id: %u Name: %s] (Role %u, RealmId %d). Ok and DB updated", - GetId(), GetName().c_str(), roleId, realmId); - SaveRole(roleId, true, realmId); - CalculateNewPermissions(); - } - else - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantRole [Id: %u Name: %s] (Role %u, RealmId %d). Ok", - GetId(), GetName().c_str(), roleId, realmId); - - return RBAC_OK; -} - -RBACCommandResult RBACData::DenyRole(uint32 roleId, int32 realmId /* = 0*/) -{ - // Check if role Id exists - RBACRole const* role = sAccountMgr->GetRBACRole(roleId); - if (!role) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyRole [Id: %u Name: %s] (Role %u, RealmId %d). Role does not exists", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_ID_DOES_NOT_EXISTS; - } - - // Check if already added in granted list - if (_grantedRoles.find(roleId) != _grantedRoles.end()) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyRole [Id: %u Name: %s] (Role %u, RealmId %d). Role in grant list", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_IN_GRANTED_LIST; - } - - // Already added? - std::pair::iterator, bool> ret = _deniedRoles.insert(roleId); - if (!ret.second) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyRole [Id: %u Name: %s] (Role %u, RealmId %d). Role already denied", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_CANT_ADD_ALREADY_ADDED; + std::ostringstream o; + RBACPermissionContainer::const_iterator itr = perms.begin(); + o << (*itr); + for (++itr; itr != perms.end(); ++itr) + o << ", " << uint32(*itr); + str = o.str(); } - // Do not save to db when loading data from DB (realmId = 0) - if (realmId) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyRole [Id: %u Name: %s] (Role %u, RealmId %d). Ok and DB updated", - GetId(), GetName().c_str(), roleId, realmId); - SaveRole(roleId, false, realmId); - CalculateNewPermissions(); - } - else - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyRole [Id: %u Name: %s] (Role %u, RealmId %d). Ok", - GetId(), GetName().c_str(), roleId, realmId); - - return RBAC_OK; -} - -void RBACData::SaveRole(uint32 roleId, bool granted, int32 realmId) -{ - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_RBAC_ACCOUNT_ROLE); - stmt->setUInt32(0, GetId()); - stmt->setUInt32(1, roleId); - stmt->setBool(2, granted); - stmt->setInt32(3, realmId); - LoginDatabase.Execute(stmt); -} - -RBACCommandResult RBACData::RevokeRole(uint32 roleId, int32 realmId /* = 0*/) -{ - uint8 revoked = _grantedRoles.erase(roleId) + _deniedRoles.erase(roleId); - - // could remove it? - if (!revoked) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokeRole [Id: %u Name: %s] (Role %u, RealmId %d). Not granted or revoked", - GetId(), GetName().c_str(), roleId, realmId); - return RBAC_CANT_REVOKE_NOT_IN_LIST; - } - - // Do not save to db when loading data from DB (realmId = 0) - if (realmId) - { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokeRole [Id: %u Name: %s] (Role %u, RealmId %d). Ok and DB updated", - GetId(), GetName().c_str(), roleId, realmId); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_RBAC_ACCOUNT_ROLE); - stmt->setUInt32(0, GetId()); - stmt->setUInt32(1, roleId); - stmt->setInt32(2, realmId); - LoginDatabase.Execute(stmt); - - CalculateNewPermissions(); - } - else - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokeRole [Id: %u Name: %s] (Role %u, RealmId %d). Ok", - GetId(), GetName().c_str(), roleId, realmId); - - return RBAC_OK; + return str; } RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId /* = 0*/) @@ -269,7 +51,7 @@ RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId / } // Check if already added in denied list - if (_deniedPerms.test(permissionId)) + if (HasDeniedPermission(permissionId)) { TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission in deny list", GetId(), GetName().c_str(), permissionId, realmId); @@ -277,14 +59,14 @@ RBACCommandResult RBACData::GrantPermission(uint32 permissionId, int32 realmId / } // Already added? - if (_grantedPerms.test(permissionId)) + if (HasGrantedPermission(permissionId)) { TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::GrantPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission already granted", GetId(), GetName().c_str(), permissionId, realmId); return RBAC_CANT_ADD_ALREADY_ADDED; } - _grantedPerms.set(permissionId); + AddGrantedPermission(permissionId); // Do not save to db when loading data from DB (realmId = 0) if (realmId) @@ -313,7 +95,7 @@ RBACCommandResult RBACData::DenyPermission(uint32 permissionId, int32 realmId /* } // Check if already added in granted list - if (_grantedPerms.test(permissionId)) + if (HasGrantedPermission(permissionId)) { TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission in grant list", GetId(), GetName().c_str(), permissionId, realmId); @@ -321,14 +103,14 @@ RBACCommandResult RBACData::DenyPermission(uint32 permissionId, int32 realmId /* } // Already added? - if (_deniedPerms.test(permissionId)) + if (HasDeniedPermission(permissionId)) { TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::DenyPermission [Id: %u Name: %s] (Permission %u, RealmId %d). Permission already denied", GetId(), GetName().c_str(), permissionId, realmId); return RBAC_CANT_ADD_ALREADY_ADDED; } - _deniedPerms.set(permissionId); + AddDeniedPermission(permissionId); // Do not save to db when loading data from DB (realmId = 0) if (realmId) @@ -358,15 +140,15 @@ void RBACData::SavePermission(uint32 permission, bool granted, int32 realmId) RBACCommandResult RBACData::RevokePermission(uint32 permissionId, int32 realmId /* = 0*/) { // Check if it's present in any list - if (!_grantedPerms.test(permissionId) && !_deniedPerms.test(permissionId)) + if (!HasGrantedPermission(permissionId) && !HasDeniedPermission(permissionId)) { TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::RevokePermission [Id: %u Name: %s] (Permission %u, RealmId %d). Not granted or revoked", GetId(), GetName().c_str(), permissionId, realmId); return RBAC_CANT_REVOKE_NOT_IN_LIST; } - _grantedPerms.reset(permissionId); - _deniedPerms.reset(permissionId); + RemoveGrantedPermission(permissionId); + RemoveDeniedPermission(permissionId); // Do not save to db when loading data from DB (realmId = 0) if (realmId) @@ -392,52 +174,13 @@ void RBACData::LoadFromDB() { ClearData(); - TC_LOG_INFO(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]", GetId(), GetName().c_str()); - TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Loading groups", GetId(), GetName().c_str()); - - // Load account group that affect current realm - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_RBAC_ACCOUNT_GROUPS); - stmt->setUInt32(0, GetId()); - stmt->setInt32(1, GetRealmId()); - PreparedQueryResult result = LoginDatabase.Query(stmt); - - if (result) - { - do - { - Field* fields = result->Fetch(); - AddGroup(fields[0].GetUInt32()); - } - while (result->NextRow()); - } - - TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Loading roles", GetId(), GetName().c_str()); - // Load account roles (granted and denied) that affect current realm - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_RBAC_ACCOUNT_ROLES); - stmt->setUInt32(0, GetId()); - stmt->setInt32(1, GetRealmId()); - result = LoginDatabase.Query(stmt); - - if (result) - { - do - { - Field* fields = result->Fetch(); - if (fields[1].GetBool()) - GrantRole(fields[0].GetUInt32()); - else - DenyRole(fields[0].GetUInt32()); - } - while (result->NextRow()); - } - TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Loading permissions", GetId(), GetName().c_str()); // Load account permissions (granted and denied) that affect current realm - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_RBAC_ACCOUNT_PERMISSIONS); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_RBAC_ACCOUNT_PERMISSIONS); stmt->setUInt32(0, GetId()); stmt->setInt32(1, GetRealmId()); - result = LoginDatabase.Query(stmt); + PreparedQueryResult result = LoginDatabase.Query(stmt); if (result) { do @@ -451,61 +194,72 @@ void RBACData::LoadFromDB() while (result->NextRow()); } - TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Adding default groups", GetId(), GetName().c_str()); - // Add default groups - RBACGroupContainer const& groups = sAccountMgr->GetRBACDefaultGroups(GetSecurityLevel()); - for (RBACGroupContainer::const_iterator itr = groups.begin(); itr != groups.end(); ++itr) - AddGroup(*itr); + // Add default permissions + RBACPermissionContainer const& permissions = sAccountMgr->GetRBACDefaultPermissions(_secLevel); + for (RBACPermissionContainer::const_iterator itr = permissions.begin(); itr != permissions.end(); ++itr) + GrantPermission(*itr); - TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Calculating global permissions", GetId(), GetName().c_str()); - // Force calculation of permissions, it wasn't performed at load time - // while adding groups, roles and permissions + // Force calculation of permissions CalculateNewPermissions(); } void RBACData::CalculateNewPermissions() { - TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::LoadFromDB [Id: %u Name: %s]: Calculating global permissions", GetId(), GetName().c_str()); - // Get the list of directly granted roles - RBACRoleContainer tempGrantedRoles = GetGrantedRoles(); - - // Add those roles inherited from groups - for (RBACGroupContainer::const_iterator itGroup = _groups.begin(); itGroup != _groups.end(); ++itGroup) - { - RBACGroup const* group = sAccountMgr->GetRBACGroup(*itGroup); - if (!group) // Should never happen due to foreign keys in DB - continue; - - RBACRoleContainer const& roles = group->GetRoles(); - for (RBACRoleContainer::const_iterator it = roles.begin(); it != roles.end(); ++it) - tempGrantedRoles.insert(*it); - } + TC_LOG_TRACE(LOG_FILTER_RBAC, "RBACData::CalculateNewPermissions [Id: %u Name: %s]", GetId(), GetName().c_str()); // Get the list of granted permissions _globalPerms = GetGrantedPermissions(); + ExpandPermissions(_globalPerms); + RBACPermissionContainer revoked = GetDeniedPermissions(); + ExpandPermissions(revoked); + RemovePermissions(_globalPerms, revoked); +} - // Add those permissions inherited from roles granted - for (RBACRoleContainer::const_iterator it = tempGrantedRoles.begin(); it != tempGrantedRoles.end(); ++it) - if (RBACRole const* role = sAccountMgr->GetRBACRole(*it)) - _globalPerms |= role->GetPermissions(); +void RBACData::AddPermissions(RBACPermissionContainer const& permsFrom, RBACPermissionContainer& permsTo) +{ + for (RBACPermissionContainer::const_iterator itr = permsFrom.begin(); itr != permsFrom.end(); ++itr) + permsTo.insert(*itr); +} + +void RBACData::RemovePermissions(RBACPermissionContainer const& permsFrom, RBACPermissionContainer& permsTo) +{ + for (RBACPermissionContainer::const_iterator itr = permsFrom.begin(); itr != permsFrom.end(); ++itr) + permsTo.erase(*itr); +} - // Remove denied permissions from the list - _globalPerms &= ~GetDeniedPermissions(); +void RBACData::ExpandPermissions(RBACPermissionContainer& permissions) +{ + RBACPermissionContainer toCheck = permissions; + permissions.clear(); + + while (!toCheck.empty()) + { + // remove the permission from original list + uint32 permissionId = *toCheck.begin(); + toCheck.erase(toCheck.begin()); + + RBACPermission const* permission = sAccountMgr->GetRBACPermission(permissionId); + if (!permission) + continue; + + // insert into the final list (expanded list) + permissions.insert(permissionId); + + // add all linked permissions (that are not already expanded) to the list of permissions to be checked + RBACPermissionContainer const& linkedPerms = permission->GetLinkedPermissions(); + for (RBACPermissionContainer::const_iterator itr = linkedPerms.begin(); itr != linkedPerms.end(); ++itr) + if (permissions.find(*itr) == permissions.end()) + toCheck.insert(*itr); + } - // Remove those permissions inherited from denied roles - for (RBACRoleContainer::const_iterator it = _deniedRoles.begin(); it != _deniedRoles.end(); ++it) - if (RBACRole const* role = sAccountMgr->GetRBACRole(*it)) - _globalPerms &= ~role->GetPermissions(); + TC_LOG_DEBUG(LOG_FILTER_RBAC, "RBACData::ExpandPermissions: Expanded: %s", GetDebugPermissionString(permissions).c_str()); } void RBACData::ClearData() { - _groups.clear(); - _grantedRoles.clear(); - _deniedRoles.clear(); - _grantedPerms.reset(); - _deniedPerms.reset(); - _globalPerms.reset(); + _grantedPerms.clear(); + _deniedPerms.clear(); + _globalPerms.clear(); } } diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 039492d6a6e..e12e6835cb8 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -42,7 +42,6 @@ #include "Define.h" #include -#include #include #include @@ -101,25 +100,26 @@ enum RBACPermissions RBAC_PERM_COMMANDS_PINFO_CHECK_PERSONAL_DATA = 48, RBAC_PERM_EMAIL_CONFIRM_FOR_PASS_CHANGE = 49, RBAC_PERM_MAY_CHECK_OWN_EMAIL = 50, - // Leave some space for core permissions + // Free space for core permissions (till 149) + // Roles (Permissions with delegated permissions) use 199 and descending RBAC_PERM_COMMAND_RBAC = 200, RBAC_PERM_COMMAND_RBAC_ACC = 201, - RBAC_PERM_COMMAND_RBAC_ACC_GROUP = 202, - RBAC_PERM_COMMAND_RBAC_ACC_GROUP_ADD = 203, - RBAC_PERM_COMMAND_RBAC_ACC_GROUP_DEL = 204, - RBAC_PERM_COMMAND_RBAC_ACC_ROLE = 205, - RBAC_PERM_COMMAND_RBAC_ACC_ROLE_GRANT = 206, - RBAC_PERM_COMMAND_RBAC_ACC_ROLE_DENY = 207, - RBAC_PERM_COMMAND_RBAC_ACC_ROLE_REVOKE = 208, - RBAC_PERM_COMMAND_RBAC_ACC_PERM = 209, - RBAC_PERM_COMMAND_RBAC_ACC_PERM_GRANT = 210, - RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY = 211, - RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE = 212, - RBAC_PERM_COMMAND_RBAC_LIST = 213, - RBAC_PERM_COMMAND_RBAC_LIST_GROUPS = 214, - RBAC_PERM_COMMAND_RBAC_LIST_ROLES = 215, - RBAC_PERM_COMMAND_RBAC_LIST_PERMS = 216, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_LIST = 202, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_GRANT = 203, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY = 204, + RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE = 205, + RBAC_PERM_COMMAND_RBAC_LIST = 206, + // 207 - reuse + // 208 - reuse + // 209 - reuse + // 210 - reuse + // 211 - reuse + // 212 - reuse + // 213 - reuse + // 214 - reuse + // 215 - reuse + // 216 - reuse RBAC_PERM_COMMAND_ACCOUNT = 217, RBAC_PERM_COMMAND_ACCOUNT_ADDON = 218, RBAC_PERM_COMMAND_ACCOUNT_CREATE = 219, @@ -678,8 +678,6 @@ enum RBACPermissions RBAC_PERM_COMMAND_WP_UNLOAD = 772, RBAC_PERM_COMMAND_WP_RELOAD = 773, RBAC_PERM_COMMAND_WP_SHOW = 774, - RBAC_PERM_COMMAND_MODIFY_CURRENCY = 775, // only 4.3.4 - RBAC_PERM_COMMAND_DEBUG_PHASE = 776, // Only 4.3.4 // custom permissions 1000+ RBAC_PERM_MAX @@ -695,93 +693,53 @@ enum RBACCommandResult RBAC_ID_DOES_NOT_EXISTS }; -typedef std::bitset RBACPermissionContainer; -typedef std::set RBACRoleContainer; -typedef std::set RBACGroupContainer; +typedef std::set RBACPermissionContainer; -class RBACObject +class RBACPermission { public: - RBACObject(uint32 id = 0, std::string const& name = ""): + RBACPermission(uint32 id = 0, std::string const& name = ""): _id(id), _name(name) { } - virtual ~RBACObject() { } - /// Gets the Name of the Object std::string const& GetName() const { return _name; } /// Gets the Id of the Object uint32 GetId() const { return _id; } + /// Gets the Permissions linked to this permission + RBACPermissionContainer const& GetLinkedPermissions() const { return _perms; } + /// Adds a new linked Permission + void AddLinkedPermission(uint32 id) { _perms.insert(id); } + /// Removes a linked Permission + void RemoveLinkedPermission(uint32 id) { _perms.erase(id); } + private: uint32 _id; ///> id of the object std::string _name; ///> name of the object -}; - -/// Permission: Defines an autorization to perform certain operation -class RBACPermission: public RBACObject -{ - public: - RBACPermission(uint32 id = 0, std::string const& name = ""): - RBACObject(id, name) { } -}; - -/// Set of Permissions -class RBACRole: public RBACObject -{ - public: - RBACRole(uint32 id = 0, std::string const& name = ""): - RBACObject(id, name) { } - - /// Gets the Permissions assigned to this role - RBACPermissionContainer const& GetPermissions() const { return _perms; } - /// Grants a Permission (Adds) - void GrantPermission(uint32 id); - /// Revokes a Permission (Removes) - void RevokePermission(uint32 id); - - private: RBACPermissionContainer _perms; ///> Set of permissions }; -/// Set of Roles -class RBACGroup: public RBACObject -{ - public: - RBACGroup(uint32 id = 0, std::string const& name = ""): - RBACObject(id, name) { } - - /// Gets the Roles assigned to this group - RBACRoleContainer const& GetRoles() const { return _roles; } - /// Grants a Role (Adds) - void GrantRole(uint32 role); - /// Revokes a Role (Removes) - void RevokeRole(uint32 role); - - private: - RBACRoleContainer _roles; ///> Set of Roles -}; - /** * @name RBACData * @brief Contains all needed information about the acccount * * This class contains all the data needed to calculate the account permissions. - * RBACDAta is formed by group permissions and user permissions through: - * - Granted Groups, which contains roles, which contains permissions: Set of granted permissions - * - Granted Roles, which contains permissions: Set of granted permissions - * - Denied Roles, which contains permissions: Set of denied permissions - * - Granted Permissions - * - Denied Permissions + * RBACDAta is formed by granted and denied permissions and all the inherited permissions * * Calculation of current Permissions: Granted permissions - Denied permissions - * - Granted permissions: through groups, through roles and directly assigned - * - Denied permissions: through roles and directly assigned + * - Granted permissions: through linked permissions and directly assigned + * - Denied permissions: through linked permissions and directly assigned */ -class RBACData: public RBACObject +class RBACData { public: - RBACData(uint32 id, std::string const& name, int32 realmId, uint8 secLevel = 0): - RBACObject(id, name), _realmId(realmId), _secLevel(secLevel) { } + RBACData(uint32 id, std::string const& name, int32 realmId, uint8 secLevel = 255): + _id(id), _name(name), _realmId(realmId), _secLevel(secLevel) { } + + /// Gets the Name of the Object + std::string const& GetName() const { return _name; } + /// Gets the Id of the Object + uint32 GetId() const { return _id; } /** * @name HasPermission @@ -799,7 +757,10 @@ class RBACData: public RBACObject * } * @endcode */ - bool HasPermission(uint32 permission) const { return _globalPerms.test(permission); } + bool HasPermission(uint32 permission) const + { + return _globalPerms.find(permission) != _globalPerms.end(); + } // Functions enabled to be used by command system /// Returns all the granted permissions (after computation) @@ -808,130 +769,6 @@ class RBACData: public RBACObject RBACPermissionContainer const& GetGrantedPermissions() const { return _grantedPerms; } /// Returns all the denied permissions RBACPermissionContainer const& GetDeniedPermissions() const { return _deniedPerms; } - /// Returns all the granted roles - RBACRoleContainer const& GetGrantedRoles() const { return _grantedRoles; } - /// Returns all the denied roles - RBACRoleContainer const& GetDeniedRoles() const { return _deniedRoles; } - /// Returns all the granted groups - RBACGroupContainer const& GetGroups() const { return _groups; } - - /** - * @name AddGroup - * @brief Adds new group - * - * Add a new group to the account. If realm is 0 or the group can not be added - * No save to db action will be performed. - * - * Fails if group Id does not exists or group already present - * - * @param groupId group to be added - * @param realmId realm affected - * - * @return Success or failure (with reason) to add the group - * - * Example Usage: - * @code - * // previously defined "RBACData* rbac" with proper initialization - * uint32 groupId = 2; - * if (rbac->AddGroup(groupId) == RBAC_OK) - * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Group %u succesfully added", groupId); - * @endcode - */ - RBACCommandResult AddGroup(uint32 groupId, int32 realmId = 0); - - /** - * @name RemoveGroup - * @brief Removes a group - * - * Removes a group from the account. If realm is 0 or the group can not be removed - * No save to db action will be performed. Any delete operation will always affect - * "all realms (-1)" in addition to the realm specified - * - * Fails if group not present - * - * @param groupId group to be removed - * @param realmId realm affected - * - * @return Success or failure (with reason) to remove the group - * - * Example Usage: - * // previously defined "RBACData* rbac" with proper initialization - * uint32 groupId = 2; - * if (rbac->RemoveGroup(groupId) == RBAC_OK) - * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Group %u succesfully removed", groupId); - * @endcode - */ - RBACCommandResult RemoveGroup(uint32 groupId, int32 realmId = 0); - - /** - * @name GrantRole - * @brief Grants a role - * - * Grants a role to the account. If realm is 0 or the role can not be added - * No save to db action will be performed. - * - * Fails if role Id does not exists or role already granted or denied - * - * @param roleId role to be granted - * @param realmId realm affected - * - * @return Success or failure (with reason) to grant the role - * - * Example Usage: - * // previously defined "RBACData* rbac" with proper initialization - * uint32 roleId = 2; - * if (rbac->GrantRole(roleId) == RBAC_IN_DENIED_LIST) - * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Failed to grant role %u, already denied", roleId); - * @endcode - */ - RBACCommandResult GrantRole(uint32 roleId, int32 realmId = 0); - - /** - * @name DenyRole - * @brief Denies a role - * - * Denied a role to the account. If realm is 0 or the role can not be added - * No save to db action will be performed. - * - * Fails if role Id does not exists or role already granted or denied - * - * @param roleId role to be denied - * @param realmId realm affected - * - * @return Success or failure (with reason) to deny the role - * - * Example Usage: - * // previously defined "RBACData* rbac" with proper initialization - * uint32 roleId = 2; - * if (rbac->DenyRole(roleId) == RBAC_ID_DOES_NOT_EXISTS) - * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role Id %u does not exists", roleId); - * @endcode - */ - RBACCommandResult DenyRole(uint32 roleId, int32 realmId = 0); - - /** - * @name RevokeRole - * @brief Removes a role - * - * Removes a role from the account. If realm is 0 or the role can not be removed - * No save to db action will be performed. Any delete operation will always affect - * "all realms (-1)" in addition to the realm specified - * - * Fails if role not present - * - * @param roleId role to be removed - * @param realmId realm affected - * - * @return Success or failure (with reason) to remove the role - * - * Example Usage: - * // previously defined "RBACData* rbac" with proper initialization - * uint32 roleId = 2; - * if (rbac->RevokeRole(roleId) == RBAC_OK) - * TC_LOG_DEBUG(LOG_FILTER_PLAYER, "Role %u succesfully removed", roleId); - * @endcode - */ - RBACCommandResult RevokeRole(uint32 roleId, int32 realmId = 0); /** * @name GrantRole @@ -1003,7 +840,7 @@ class RBACData: public RBACObject */ RBACCommandResult RevokePermission(uint32 permissionId, int32 realmId = 0); - /// Loads all permissions, groups and roles assigned to current account + /// Loads all permissions assigned to current account void LoadFromDB(); /// Sets security level @@ -1016,8 +853,6 @@ class RBACData: public RBACObject /// Returns the security level assigned uint8 GetSecurityLevel() const { return _secLevel; } private: - /// Saves a role to DB, Granted or Denied - void SaveRole(uint32 role, bool granted, int32 realm); /// Saves a permission to DB, Granted or Denied void SavePermission(uint32 role, bool granted, int32 realm); /// Clears roles, groups and permissions - Used for reload @@ -1027,20 +862,76 @@ class RBACData: public RBACObject * @name CalculateNewPermissions * @brief Calculates new permissions * - * Calculates new permissions after some change in groups, roles or permissions. + * Calculates new permissions after some change * The calculation is done Granted - Denied: - * - Granted permissions: through groups, through roles and directly assigned - * - Denied permissions: through roles and directly assigned + * - Granted permissions: through linked permissions and directly assigned + * - Denied permissions: through linked permissions and directly assigned */ void CalculateNewPermissions(); int32 GetRealmId() { return _realmId; } + // Auxiliar private functions - defined to allow to maintain same code even + // if internal structure changes. + + /// Checks if a permission is granted + bool HasGrantedPermission(uint32 permissionId) const + { + return _grantedPerms.find(permissionId) != _grantedPerms.end(); + } + + /// Checks if a permission is denied + bool HasDeniedPermission(uint32 permissionId) const + { + return _deniedPerms.find(permissionId) != _deniedPerms.end(); + } + + /// Adds a new granted permission + void AddGrantedPermission(uint32 permissionId) + { + _grantedPerms.insert(permissionId); + } + + /// Removes a granted permission + void RemoveGrantedPermission(uint32 permissionId) + { + _grantedPerms.erase(permissionId); + } + + /// Adds a new denied permission + void AddDeniedPermission(uint32 permissionId) + { + _deniedPerms.insert(permissionId); + } + + /// Removes a denied permission + void RemoveDeniedPermission(uint32 permissionId) + { + _deniedPerms.erase(permissionId); + } + + /// Adds a list of permissions to another list + void AddPermissions(RBACPermissionContainer const& permsFrom, RBACPermissionContainer& permsTo); + + /// Removes a list of permissions to another list + void RemovePermissions(RBACPermissionContainer const& permsFrom, RBACPermissionContainer& permsTo); + + /** + * @name ExpandPermissions + * @brief Adds the list of linked permissions to the original list + * + * Given a list of permissions, gets all the inherited permissions + * @param permissions The list of permissions to expand + * + * @return new list of permissions containing original permissions and + * all other pemissions that are linked to the original ones + */ + void ExpandPermissions(RBACPermissionContainer& permissions); + + uint32 _id; ///> Account id + std::string _name; ///> Account name int32 _realmId; ///> RealmId Affected uint8 _secLevel; ///> Account SecurityLevel - RBACGroupContainer _groups; ///> Granted groups - RBACRoleContainer _grantedRoles; ///> Granted roles - RBACRoleContainer _deniedRoles; ///> Denied roles RBACPermissionContainer _grantedPerms; ///> Granted permissions RBACPermissionContainer _deniedPerms; ///> Denied permissions RBACPermissionContainer _globalPerms; ///> Calculated permissions diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index ce280a11fc3..c50db983845 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -88,37 +88,24 @@ enum TrinityStrings LANG_IMPROPER_VALUE = 62, LANG_RBAC_WRONG_PARAMETER_ID = 63, LANG_RBAC_WRONG_PARAMETER_REALM = 64, - LANG_RBAC_GROUP_IN_LIST = 65, - LANG_RBAC_GROUP_NOT_IN_LIST = 66, - LANG_RBAC_GROUP_ADDED = 67, - LANG_RBAC_GROUP_REMOVED = 68, - LANG_RBAC_GROUP_LIST_HEADER = 69, + LANG_RBAC_LIST_HEADER_GRANTED = 65, + LANG_RBAC_LIST_HEADER_DENIED = 66, + LANG_RBAC_LIST_HEADER_BY_SEC_LEVEL = 67, + LANG_RBAC_LIST_PERMISSIONS_HEADER = 68, + LANG_RBAC_LIST_PERMS_LINKED_HEADER = 69, LANG_RBAC_LIST_EMPTY = 70, LANG_RBAC_LIST_ELEMENT = 71, - LANG_RBAC_ROLE_GRANTED_IN_LIST = 72, - LANG_RBAC_ROLE_GRANTED_IN_DENIED_LIST = 73, - LANG_RBAC_ROLE_GRANTED = 74, - LANG_RBAC_ROLE_DENIED_IN_LIST = 75, - LANG_RBAC_ROLE_DENIED_IN_GRANTED_LIST = 76, - LANG_RBAC_ROLE_DENIED = 77, - LANG_RBAC_ROLE_REVOKED = 78, - LANG_RBAC_ROLE_REVOKED_NOT_IN_LIST = 79, - LANG_RBAC_ROLE_LIST_HEADER_GRANTED = 80, - LANG_RBAC_ROLE_LIST_HEADER_DENIED = 81, - LANG_RBAC_PERM_GRANTED_IN_LIST = 82, - LANG_RBAC_PERM_GRANTED_IN_DENIED_LIST = 83, - LANG_RBAC_PERM_GRANTED = 84, - LANG_RBAC_PERM_DENIED_IN_LIST = 85, - LANG_RBAC_PERM_DENIED_IN_GRANTED_LIST = 86, - LANG_RBAC_PERM_DENIED = 87, - LANG_RBAC_PERM_REVOKED = 88, - LANG_RBAC_PERM_REVOKED_NOT_IN_LIST = 89, - LANG_RBAC_PERM_LIST_HEADER_GRANTED = 90, - LANG_RBAC_PERM_LIST_HEADER_DENIED = 91, - LANG_RBAC_PERM_LIST_GLOBAL = 92, - LANG_RBAC_LIST_GROUPS_HEADER = 93, - LANG_RBAC_LIST_ROLES_HEADER = 94, - LANG_RBAC_LIST_PERMISSIONS_HEADER = 95, + LANG_RBAC_PERM_GRANTED_IN_LIST = 72, + LANG_RBAC_PERM_GRANTED_IN_DENIED_LIST = 73, + LANG_RBAC_PERM_GRANTED = 74, + LANG_RBAC_PERM_DENIED_IN_LIST = 75, + LANG_RBAC_PERM_DENIED_IN_GRANTED_LIST = 76, + LANG_RBAC_PERM_DENIED = 77, + LANG_RBAC_PERM_REVOKED = 78, + LANG_RBAC_PERM_REVOKED_NOT_IN_LIST = 79, + // Free 80 - 95 + + LANG_GUILD_RENAME_ALREADY_EXISTS = 96, LANG_GUILD_RENAME_DONE = 97, LANG_RENAME_PLAYER_ALREADY_EXISTS = 98, diff --git a/src/server/scripts/Commands/cs_rbac.cpp b/src/server/scripts/Commands/cs_rbac.cpp index a3084f1926d..7101c0d67cd 100644 --- a/src/server/scripts/Commands/cs_rbac.cpp +++ b/src/server/scripts/Commands/cs_rbac.cpp @@ -51,53 +51,19 @@ public: ChatCommand* GetCommands() const { - static ChatCommand rbacGroupsCommandTable[] = - { - { "add", rbac::RBAC_PERM_COMMAND_RBAC_ACC_GROUP_ADD, true, &HandleRBACGroupAddCommand, "", NULL }, - { "remove", rbac::RBAC_PERM_COMMAND_RBAC_ACC_GROUP_DEL, true, &HandleRBACGroupRemoveCommand, "", NULL }, - { "", rbac::RBAC_PERM_COMMAND_RBAC_ACC_GROUP, true, &HandleRBACGroupListCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; - - static ChatCommand rbacRolesCommandTable[] = - { - { "grant", rbac::RBAC_PERM_COMMAND_RBAC_ACC_ROLE_GRANT, true, &HandleRBACRoleGrantCommand, "", NULL }, - { "deny", rbac::RBAC_PERM_COMMAND_RBAC_ACC_ROLE_DENY, true, &HandleRBACRoleDenyCommand, "", NULL }, - { "revoke", rbac::RBAC_PERM_COMMAND_RBAC_ACC_ROLE_REVOKE, true, &HandleRBACRoleRevokeCommand, "", NULL }, - { "", rbac::RBAC_PERM_COMMAND_RBAC_ACC_ROLE, true, &HandleRBACRoleListCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; - - static ChatCommand rbacPermsCommandTable[] = + static ChatCommand rbacAccountCommandTable[] = { + { "list", rbac::RBAC_PERM_COMMAND_RBAC_ACC_PERM_LIST, true, &HandleRBACPermListCommand, "", NULL }, { "grant", rbac::RBAC_PERM_COMMAND_RBAC_ACC_PERM_GRANT, true, &HandleRBACPermGrantCommand, "", NULL }, { "deny", rbac::RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY, true, &HandleRBACPermDenyCommand, "", NULL }, { "revoke", rbac::RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE, true, &HandleRBACPermRevokeCommand, "", NULL }, - { "", rbac::RBAC_PERM_COMMAND_RBAC_ACC_PERM, true, &HandleRBACPermListCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; - - static ChatCommand rbacListCommandTable[] = - { - { "groups", rbac::RBAC_PERM_COMMAND_RBAC_LIST_GROUPS, true, &HandleRBACListGroupsCommand, "", NULL }, - { "roles", rbac::RBAC_PERM_COMMAND_RBAC_LIST_ROLES, true, &HandleRBACListRolesCommand, "", NULL }, - { "permissions", rbac::RBAC_PERM_COMMAND_RBAC_LIST_PERMS, true, &HandleRBACListPermissionsCommand, "", NULL }, - { NULL, 0, false, NULL, "", NULL } - }; - - static ChatCommand rbacAccountCommandTable[] = - { - { "group", rbac::RBAC_PERM_COMMAND_RBAC_ACC_GROUP, true, NULL, "", rbacGroupsCommandTable }, - { "role", rbac::RBAC_PERM_COMMAND_RBAC_ACC_ROLE, true, NULL, "", rbacRolesCommandTable }, - { "permission", rbac::RBAC_PERM_COMMAND_RBAC_ACC_PERM, true, NULL, "", rbacPermsCommandTable }, - { "", rbac::RBAC_PERM_COMMAND_RBAC_ACC, true, &HandleRBACAccountPermissionCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; static ChatCommand rbacCommandTable[] = { { "account", rbac::RBAC_PERM_COMMAND_RBAC_ACC, true, NULL, "", rbacAccountCommandTable }, - { "list", rbac::RBAC_PERM_COMMAND_RBAC_LIST, true, NULL, "", rbacListCommandTable }, + { "list", rbac::RBAC_PERM_COMMAND_RBAC_LIST, true, &HandleRBACListPermissionsCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; @@ -194,7 +160,7 @@ public: if (!rdata) { - data->rbac = new rbac::RBACData(accountId, accountName, realmID); + data->rbac = new rbac::RBACData(accountId, accountName, realmID, AccountMgr::GetSecurity(accountId, realmID)); data->rbac->LoadFromDB(); data->needDelete = true; } @@ -206,258 +172,6 @@ public: return data; } - static bool HandleRBACGroupAddCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - rbac::RBACCommandResult result = command->rbac->AddGroup(command->id, command->realmId); - rbac::RBACGroup const* group = sAccountMgr->GetRBACGroup(command->id); - - switch (result) - { - case rbac::RBAC_CANT_ADD_ALREADY_ADDED: - handler->PSendSysMessage(LANG_RBAC_GROUP_IN_LIST, command->id, group->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_OK: - handler->PSendSysMessage(LANG_RBAC_GROUP_ADDED, command->id, group->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_ID_DOES_NOT_EXISTS: - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, command->id); - break; - default: - break; - } - - delete command; - - return true; - } - - static bool HandleRBACGroupRemoveCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - rbac::RBACCommandResult result = command->rbac->RemoveGroup(command->id, command->realmId); - rbac::RBACGroup const* group = sAccountMgr->GetRBACGroup(command->id); - - switch (result) - { - case rbac::RBAC_CANT_REVOKE_NOT_IN_LIST: - handler->PSendSysMessage(LANG_RBAC_GROUP_NOT_IN_LIST, command->id, group->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_OK: - handler->PSendSysMessage(LANG_RBAC_GROUP_REMOVED, command->id, group->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_ID_DOES_NOT_EXISTS: - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, command->id); - break; - default: - break; - } - - delete command; - - return true; - } - - static bool HandleRBACGroupListCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args, false); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - handler->PSendSysMessage(LANG_RBAC_GROUP_LIST_HEADER, command->rbac->GetId(), command->rbac->GetName().c_str()); - rbac::RBACGroupContainer const& groups = command->rbac->GetGroups(); - if (groups.empty()) - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); - else - { - for (rbac::RBACGroupContainer::const_iterator it = groups.begin(); it != groups.end(); ++it) - { - rbac::RBACGroup const* group = sAccountMgr->GetRBACGroup(*it); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, group->GetId(), group->GetName().c_str()); - } - } - - delete command; - - return true; - } - - static bool HandleRBACRoleGrantCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - rbac::RBACCommandResult result = command->rbac->GrantRole(command->id, command->realmId); - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(command->id); - - switch (result) - { - case rbac::RBAC_CANT_ADD_ALREADY_ADDED: - handler->PSendSysMessage(LANG_RBAC_ROLE_GRANTED_IN_LIST, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_IN_DENIED_LIST: - handler->PSendSysMessage(LANG_RBAC_ROLE_GRANTED_IN_DENIED_LIST, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_OK: - handler->PSendSysMessage(LANG_RBAC_ROLE_GRANTED, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_ID_DOES_NOT_EXISTS: - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, command->id); - break; - default: - break; - } - - delete command; - - return true; - } - - static bool HandleRBACRoleDenyCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - rbac::RBACCommandResult result = command->rbac->DenyRole(command->id, command->realmId); - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(command->id); - - switch (result) - { - case rbac::RBAC_CANT_ADD_ALREADY_ADDED: - handler->PSendSysMessage(LANG_RBAC_ROLE_DENIED_IN_LIST, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_IN_GRANTED_LIST: - handler->PSendSysMessage(LANG_RBAC_ROLE_DENIED_IN_GRANTED_LIST, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_OK: - handler->PSendSysMessage(LANG_RBAC_ROLE_DENIED, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_ID_DOES_NOT_EXISTS: - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, command->id); - break; - default: - break; - } - - delete command; - - return true; - } - - static bool HandleRBACRoleRevokeCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - rbac::RBACCommandResult result = command->rbac->RevokeRole(command->id, command->realmId); - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(command->id); - - switch (result) - { - case rbac::RBAC_CANT_REVOKE_NOT_IN_LIST: - handler->PSendSysMessage(LANG_RBAC_ROLE_REVOKED_NOT_IN_LIST, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_OK: - handler->PSendSysMessage(LANG_RBAC_ROLE_REVOKED, command->id, role->GetName().c_str(), - command->realmId, command->rbac->GetId(), command->rbac->GetName().c_str()); - break; - case rbac::RBAC_ID_DOES_NOT_EXISTS: - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, command->id); - break; - default: - break; - } - - delete command; - - return true; - } - - static bool HandleRBACRoleListCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args, false); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - handler->PSendSysMessage(LANG_RBAC_ROLE_LIST_HEADER_GRANTED, command->rbac->GetId(), command->rbac->GetName().c_str()); - rbac::RBACGroupContainer const& granted = command->rbac->GetGrantedRoles(); - if (granted.empty()) - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); - else - { - for (rbac::RBACRoleContainer::const_iterator it = granted.begin(); it != granted.end(); ++it) - { - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(*it); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, role->GetId(), role->GetName().c_str()); - } - } - - handler->PSendSysMessage(LANG_RBAC_ROLE_LIST_HEADER_DENIED, command->rbac->GetId(), command->rbac->GetName().c_str()); - rbac::RBACGroupContainer const& denied = command->rbac->GetDeniedRoles(); - if (denied.empty()) - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); - else - { - for (rbac::RBACRoleContainer::const_iterator it = denied.begin(); it != denied.end(); ++it) - { - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(*it); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, role->GetId(), role->GetName().c_str()); - } - } - - delete command; - - return true; - } - static bool HandleRBACPermGrantCommand(ChatHandler* handler, char const* args) { RBACCommandData* command = ReadParams(handler, args); @@ -581,155 +295,45 @@ public: return false; } - handler->PSendSysMessage(LANG_RBAC_PERM_LIST_HEADER_GRANTED, command->rbac->GetId(), command->rbac->GetName().c_str()); + handler->PSendSysMessage(LANG_RBAC_LIST_HEADER_GRANTED, command->rbac->GetId(), command->rbac->GetName().c_str()); rbac::RBACPermissionContainer const& granted = command->rbac->GetGrantedPermissions(); - if (!granted.any()) + if (granted.empty()) handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); else { - for (uint32 i = 0; i < rbac::RBAC_PERM_MAX; ++i) - if (granted.test(i)) - { - rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(i); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); - } + for (rbac::RBACPermissionContainer::const_iterator itr = granted.begin(); itr != granted.end(); ++itr) + { + rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(*itr); + handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); + } } - handler->PSendSysMessage(LANG_RBAC_PERM_LIST_HEADER_DENIED, command->rbac->GetId(), command->rbac->GetName().c_str()); + handler->PSendSysMessage(LANG_RBAC_LIST_HEADER_DENIED, command->rbac->GetId(), command->rbac->GetName().c_str()); rbac::RBACPermissionContainer const& denied = command->rbac->GetDeniedPermissions(); - if (!denied.any()) - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); - else - { - for (uint32 i = 0; i < rbac::RBAC_PERM_MAX; ++i) - if (denied.test(i)) - { - rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(i); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); - } - } - - delete command; - - return true; - } - - static bool HandleRBACAccountPermissionCommand(ChatHandler* handler, char const* args) - { - RBACCommandData* command = ReadParams(handler, args, false); - - if (!command) - { - handler->SetSentErrorMessage(true); - return false; - } - - handler->PSendSysMessage(LANG_RBAC_PERM_LIST_GLOBAL, command->rbac->GetId(), command->rbac->GetName().c_str()); - rbac::RBACPermissionContainer const& permissions = command->rbac->GetPermissions(); - if (!permissions.any()) + if (denied.empty()) handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); else { - for (uint32 i = 0; i < rbac::RBAC_PERM_MAX; ++i) - if (permissions.test(i)) - { - rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(i); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); - } - } - - delete command; - - return true; - } - - static bool HandleRBACListGroupsCommand(ChatHandler* handler, char const* args) - { - uint32 id = 0; - if (char* param1 = strtok((char*)args, " ")) - id = atoi(param1); - - if (!id) - { - rbac::RBACGroupsContainer const& groups = sAccountMgr->GetRBACGroupList(); - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_GROUPS_HEADER)); - for (rbac::RBACGroupsContainer::const_iterator it = groups.begin(); it != groups.end(); ++it) + for (rbac::RBACPermissionContainer::const_iterator itr = denied.begin(); itr != denied.end(); ++itr) { - rbac::RBACGroup const* group = it->second; - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, group->GetId(), group->GetName().c_str()); + rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(*itr); + handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); } } + handler->PSendSysMessage(LANG_RBAC_LIST_HEADER_DENIED, command->rbac->GetId(), command->rbac->GetName().c_str()); + rbac::RBACPermissionContainer const& default = sAccountMgr->GetRBACDefaultPermissions(command->rbac->GetSecurityLevel()); + if (default.empty()) + handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); else { - rbac::RBACGroup const* group = sAccountMgr->GetRBACGroup(id); - if (!group) - { - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, id); - handler->SetSentErrorMessage(true); - return false; - } - - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_GROUPS_HEADER)); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, group->GetId(), group->GetName().c_str()); - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_ROLES_HEADER)); - rbac::RBACRoleContainer const& roles = group->GetRoles(); - if (roles.empty()) - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); - else - { - for (rbac::RBACRoleContainer::const_iterator it = roles.begin(); it != roles.end(); ++it) - { - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(*it); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, role->GetId(), role->GetName().c_str()); - } - } - } - - return true; - } - - static bool HandleRBACListRolesCommand(ChatHandler* handler, char const* args) - { - uint32 id = 0; - if (char* param1 = strtok((char*)args, " ")) - id = atoi(param1); - - if (!id) - { - rbac::RBACRolesContainer const& roles = sAccountMgr->GetRBACRoleList(); - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_ROLES_HEADER)); - for (rbac::RBACRolesContainer::const_iterator it = roles.begin(); it != roles.end(); ++it) + for (rbac::RBACPermissionContainer::const_iterator itr = default.begin(); itr != default.end(); ++itr) { - rbac::RBACRole const* role = it->second; - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, role->GetId(), role->GetName().c_str()); + rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(*itr); + handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); } } - else - { - rbac::RBACRole const* role = sAccountMgr->GetRBACRole(id); - if (!role) - { - handler->PSendSysMessage(LANG_RBAC_WRONG_PARAMETER_ID, id); - handler->SetSentErrorMessage(true); - return false; - } - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_ROLES_HEADER)); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, role->GetId(), role->GetName().c_str()); - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_PERMISSIONS_HEADER)); - rbac::RBACPermissionContainer const& permissions = role->GetPermissions(); - if (!permissions.any()) - handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); - else - { - for (uint32 i = 0; i < rbac::RBAC_PERM_MAX; ++i) - if (permissions.test(i)) - { - rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(i); - handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); - } - } - } + delete command; return true; } @@ -762,6 +366,11 @@ public: handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_PERMISSIONS_HEADER)); handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); + handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_PERMS_LINKED_HEADER)); + rbac::RBACPermissionContainer const& permissions = permission->GetLinkedPermissions(); + for (rbac::RBACPermissionContainer::const_iterator it = permissions.begin(); it != permissions.end(); ++it) + if (rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(*it)) + handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); } return true; diff --git a/src/server/shared/Database/Implementation/LoginDatabase.cpp b/src/server/shared/Database/Implementation/LoginDatabase.cpp index 6e01e8f515a..cfb5eecc5f1 100644 --- a/src/server/shared/Database/Implementation/LoginDatabase.cpp +++ b/src/server/shared/Database/Implementation/LoginDatabase.cpp @@ -98,14 +98,6 @@ void LoginDatabaseConnection::DoPrepareStatements() PrepareStatement(LOGIN_SEL_ACCOUNT_ACCESS_BY_ID, "SELECT gmlevel, RealmID FROM account_access WHERE id = ? and (RealmID = ? OR RealmID = -1) ORDER BY gmlevel desc", CONNECTION_SYNCH); - PrepareStatement(LOGIN_SEL_RBAC_ACCOUNT_GROUPS, "SELECT groupId FROM rbac_account_groups WHERE accountId = ? AND (realmId = ? OR realmId = -1) GROUP BY groupId", CONNECTION_SYNCH); - PrepareStatement(LOGIN_INS_RBAC_ACCOUNT_GROUP, "INSERT INTO rbac_account_groups (accountId, groupId, realmId) VALUES (?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(LOGIN_DEL_RBAC_ACCOUNT_GROUP, "DELETE FROM rbac_account_groups WHERE accountId = ? AND groupId = ? AND (realmId = ? OR realmId = -1)", CONNECTION_ASYNC); - - PrepareStatement(LOGIN_SEL_RBAC_ACCOUNT_ROLES, "SELECT roleId, granted FROM rbac_account_roles WHERE accountId = ? AND (realmId = ? OR realmId = -1) ORDER BY roleId, realmId", CONNECTION_SYNCH); - PrepareStatement(LOGIN_INS_RBAC_ACCOUNT_ROLE, "INSERT INTO rbac_account_roles (accountId, roleId, granted, realmId) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE granted = VALUES(granted)", CONNECTION_ASYNC); - PrepareStatement(LOGIN_DEL_RBAC_ACCOUNT_ROLE, "DELETE FROM rbac_account_roles WHERE accountId = ? AND roleId = ? AND (realmId = ? OR realmId = -1)", CONNECTION_ASYNC); - PrepareStatement(LOGIN_SEL_RBAC_ACCOUNT_PERMISSIONS, "SELECT permissionId, granted FROM rbac_account_permissions WHERE accountId = ? AND (realmId = ? OR realmId = -1) ORDER BY permissionId, realmId", CONNECTION_SYNCH); PrepareStatement(LOGIN_INS_RBAC_ACCOUNT_PERMISSION, "INSERT INTO rbac_account_permissions (accountId, permissionId, granted, realmId) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE granted = VALUES(granted)", CONNECTION_ASYNC); PrepareStatement(LOGIN_DEL_RBAC_ACCOUNT_PERMISSION, "DELETE FROM rbac_account_permissions WHERE accountId = ? AND permissionId = ? AND (realmId = ? OR realmId = -1)", CONNECTION_ASYNC); diff --git a/src/server/shared/Database/Implementation/LoginDatabase.h b/src/server/shared/Database/Implementation/LoginDatabase.h index 47fa48c6ada..abb1e1c7b13 100644 --- a/src/server/shared/Database/Implementation/LoginDatabase.h +++ b/src/server/shared/Database/Implementation/LoginDatabase.h @@ -117,12 +117,6 @@ enum LoginDatabaseStatements LOGIN_GET_EMAIL_BY_ID, LOGIN_SEL_ACCOUNT_ACCESS_BY_ID, - LOGIN_SEL_RBAC_ACCOUNT_GROUPS, - LOGIN_INS_RBAC_ACCOUNT_GROUP, - LOGIN_DEL_RBAC_ACCOUNT_GROUP, - LOGIN_SEL_RBAC_ACCOUNT_ROLES, - LOGIN_INS_RBAC_ACCOUNT_ROLE, - LOGIN_DEL_RBAC_ACCOUNT_ROLE, LOGIN_SEL_RBAC_ACCOUNT_PERMISSIONS, LOGIN_INS_RBAC_ACCOUNT_PERMISSION, LOGIN_DEL_RBAC_ACCOUNT_PERMISSION, -- cgit v1.2.3 From ad29676c27ffeee376f908d069db9c154c1d7d08 Mon Sep 17 00:00:00 2001 From: Spp Date: Sun, 29 Sep 2013 14:15:58 +0200 Subject: Fix compile under linux and update auth db with latest changes --- sql/base/auth_database.sql | 191 ++++--------------------- sql/updates/auth/2013_09_29_00_auth_misc.sql | 2 +- sql/updates/world/2013_09_29_00_world_misc.sql | 1 - src/server/game/Accounts/AccountMgr.cpp | 4 +- src/server/scripts/Commands/cs_rbac.cpp | 6 +- 5 files changed, 37 insertions(+), 167 deletions(-) (limited to 'sql') diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index c9e0f874457..177ad4d6e15 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -239,33 +239,6 @@ LOCK TABLES `logs` WRITE; /*!40000 ALTER TABLE `logs` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `rbac_account_groups` --- - -DROP TABLE IF EXISTS `rbac_account_groups`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_account_groups` ( - `accountId` int(10) unsigned NOT NULL COMMENT 'Account id', - `groupId` int(10) unsigned NOT NULL COMMENT 'Group id', - `realmId` int(11) NOT NULL DEFAULT '-1' COMMENT 'Realm Id, -1 means all', - PRIMARY KEY (`accountId`,`groupId`,`realmId`), - KEY `fk__rbac_account_groups__rbac_groups` (`groupId`), - CONSTRAINT `fk__rbac_account_groups__account` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE, - CONSTRAINT `fk__rbac_account_groups__rbac_groups` FOREIGN KEY (`groupId`) REFERENCES `rbac_groups` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Account-Group relation'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `rbac_account_groups` --- - -LOCK TABLES `rbac_account_groups` WRITE; -/*!40000 ALTER TABLE `rbac_account_groups` DISABLE KEYS */; -/*!40000 ALTER TABLE `rbac_account_groups` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `rbac_account_permissions` -- @@ -295,82 +268,57 @@ LOCK TABLES `rbac_account_permissions` WRITE; UNLOCK TABLES; -- --- Table structure for table `rbac_account_roles` +-- Table structure for table `rbac_default_permissions` -- -DROP TABLE IF EXISTS `rbac_account_roles`; +DROP TABLE IF EXISTS `rbac_default_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_account_roles` ( - `accountId` int(10) unsigned NOT NULL COMMENT 'Account id', - `roleId` int(10) unsigned NOT NULL COMMENT 'Role id', - `granted` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Granted = 1, Denied = 0', - `realmId` int(11) NOT NULL DEFAULT '-1' COMMENT 'Realm Id, -1 means all', - PRIMARY KEY (`accountId`,`roleId`,`realmId`), - KEY `fk__rbac_account_roles__rbac_roles` (`roleId`), - CONSTRAINT `fk__rbac_account_roles__account` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE, - CONSTRAINT `fk__rbac_account_roles__rbac_roles` FOREIGN KEY (`roleId`) REFERENCES `rbac_roles` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Account-Role relation'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `rbac_account_roles` --- - -LOCK TABLES `rbac_account_roles` WRITE; -/*!40000 ALTER TABLE `rbac_account_roles` DISABLE KEYS */; -/*!40000 ALTER TABLE `rbac_account_roles` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `rbac_group_roles` --- - -DROP TABLE IF EXISTS `rbac_group_roles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_group_roles` ( - `groupId` int(10) unsigned NOT NULL COMMENT 'group id', - `roleId` int(10) unsigned NOT NULL COMMENT 'Role id', - PRIMARY KEY (`groupId`,`roleId`), - KEY `fk__rbac_group_roles__rbac_roles` (`roleId`), - CONSTRAINT `fk__rbac_group_roles__rbac_roles` FOREIGN KEY (`roleId`) REFERENCES `rbac_roles` (`id`) ON DELETE CASCADE, - CONSTRAINT `fk__rbac_group_roles__rbac_groups` FOREIGN KEY (`groupId`) REFERENCES `rbac_groups` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Group Role relation'; +CREATE TABLE `rbac_default_permissions` ( + `secId` int(10) unsigned NOT NULL COMMENT 'Security Level id', + `permissionId` int(10) unsigned NOT NULL COMMENT 'permission id', + PRIMARY KEY (`secId`,`permissionId`), + KEY `fk__rbac_default_permissions__rbac_permissions` (`permissionId`), + CONSTRAINT `fk__rbac_default_permissions__rbac_permissions` FOREIGN KEY (`permissionId`) REFERENCES `rbac_permissions` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Default permission to assign to different account security levels'; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `rbac_group_roles` +-- Dumping data for table `rbac_default_permissions` -- -LOCK TABLES `rbac_group_roles` WRITE; -/*!40000 ALTER TABLE `rbac_group_roles` DISABLE KEYS */; -INSERT INTO `rbac_group_roles` VALUES (1,1),(2,2),(3,3),(4,4),(2,5),(1,6),(1,7),(2,8),(3,8),(4,8),(2,9),(3,9),(4,9),(2,10),(3,10),(4,10),(2,11),(3,11),(4,11),(2,12),(3,12),(4,12),(2,13),(3,13),(4,13),(2,14),(3,14),(4,14),(2,15),(3,15),(4,15),(2,16),(3,16),(4,16),(2,17),(3,17),(4,17),(4,18),(2,19),(3,19),(4,19),(2,20),(3,20),(4,20),(2,21),(3,21),(4,21),(2,22),(3,22),(4,22),(4,23),(2,24),(3,24),(4,24),(2,25),(3,25),(4,25),(2,26),(3,26),(4,26),(2,27),(3,27),(4,27),(2,28),(3,28),(4,28),(2,29),(3,29),(4,29),(2,30),(3,30),(4,30),(2,32),(3,32),(4,32),(2,33),(3,33),(4,33),(1,34),(2,35),(3,35),(4,35),(2,36),(3,36),(4,36),(2,37),(3,37),(4,37),(2,38),(3,38),(4,38),(3,39),(4,39),(1,40),(2,40),(3,40),(4,40); -/*!40000 ALTER TABLE `rbac_group_roles` ENABLE KEYS */; +LOCK TABLES `rbac_default_permissions` WRITE; +/*!40000 ALTER TABLE `rbac_default_permissions` DISABLE KEYS */; +INSERT INTO `rbac_default_permissions` VALUES (3,192),(2,193),(1,194),(0,195); +/*!40000 ALTER TABLE `rbac_default_permissions` ENABLE KEYS */; UNLOCK TABLES; -- --- Table structure for table `rbac_groups` +-- Table structure for table `rbac_linked_permissions` -- -DROP TABLE IF EXISTS `rbac_groups`; +DROP TABLE IF EXISTS `rbac_linked_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_groups` ( - `id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Group id', - `name` varchar(100) NOT NULL COMMENT 'Group name', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Group List'; +CREATE TABLE `rbac_linked_permissions` ( + `id` int(10) unsigned NOT NULL COMMENT 'Permission id', + `linkedId` int(10) unsigned NOT NULL COMMENT 'Linked Permission id', + PRIMARY KEY (`id`,`linkedId`), + KEY `fk__rbac_linked_permissions__rbac_permissions1` (`id`), + KEY `fk__rbac_linked_permissions__rbac_permissions2` (`linkedId`), + CONSTRAINT `fk__rbac_linked_permissions__rbac_permissions1` FOREIGN KEY (`id`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE, + CONSTRAINT `fk__rbac_linked_permissions__rbac_permissions2` FOREIGN KEY (`linkedId`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Permission - Linked Permission relation'; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `rbac_groups` +-- Dumping data for table `rbac_linked_permissions` -- -LOCK TABLES `rbac_groups` WRITE; -/*!40000 ALTER TABLE `rbac_groups` DISABLE KEYS */; -INSERT INTO `rbac_groups` VALUES (1,'Player'),(2,'Moderator'),(3,'GameMaster'),(4,'Administrator'); -/*!40000 ALTER TABLE `rbac_groups` ENABLE KEYS */; +LOCK TABLES `rbac_linked_permissions` WRITE; +/*!40000 ALTER TABLE `rbac_linked_permissions` DISABLE KEYS */; +INSERT INTO `rbac_linked_permissions` VALUES (192,21),(192,42),(192,43),(192,193),(192,196),(193,48),(193,194),(193,197),(194,1),(194,2),(194,11),(194,13),(194,14),(194,15),(194,16),(194,17),(194,18),(194,19),(194,20),(194,22),(194,23),(194,25),(194,26),(194,27),(194,28),(194,29),(194,30),(194,31),(194,32),(194,33),(194,34),(194,35),(194,36),(194,37),(194,38),(194,39),(194,40),(194,41),(194,44),(194,46),(194,47),(194,195),(194,198),(195,3),(195,4),(195,5),(195,6),(195,24),(195,49),(195,199),(196,200),(196,201),(196,226),(196,227),(196,230),(196,231),(196,233),(196,234),(196,235),(196,238),(196,239),(196,240),(196,241),(196,242),(196,243),(196,244),(196,245),(196,246),(196,247),(196,248),(196,249),(196,250),(196,251),(196,252),(196,253),(196,254),(196,255),(196,256),(196,257),(196,258),(196,259),(196,260),(196,261),(196,262),(196,264),(196,265),(196,266),(196,267),(196,268),(196,269),(196,270),(196,271),(196,272),(196,279),(196,280),(196,283),(196,287),(196,288),(196,289),(196,290),(196,291),(196,292),(196,293),(196,294),(196,295),(196,296),(196,297),(196,298),(196,299),(196,302),(196,303),(196,304),(196,305),(196,306),(196,307),(196,308),(196,309),(196,310),(196,313),(196,314),(196,319),(196,320),(196,321),(196,322),(196,323),(196,324),(196,325),(196,326),(196,327),(196,328),(196,329),(196,330),(196,331),(196,332),(196,333),(196,334),(196,335),(196,336),(196,337),(196,338),(196,339),(196,340),(196,341),(196,342),(196,343),(196,344),(196,345),(196,346),(196,347),(196,348),(196,349),(196,350),(196,351),(196,352),(196,353),(196,354),(196,355),(196,356),(196,357),(196,358),(196,359),(196,360),(196,361),(196,362),(196,363),(196,364),(196,365),(196,366),(196,373),(196,375),(196,401),(196,402),(196,403),(196,404),(196,405),(196,406),(196,407),(196,417),(196,418),(196,419),(196,420),(196,421),(196,422),(196,423),(196,424),(196,425),(196,426),(196,427),(196,428),(196,429),(196,434),(196,435),(196,436),(196,437),(196,438),(196,439),(196,440),(196,441),(196,442),(196,443),(196,444),(196,445),(196,446),(196,447),(196,448),(196,449),(196,450),(196,451),(196,452),(196,453),(196,454),(196,455),(196,456),(196,457),(196,458),(196,459),(196,461),(196,463),(196,464),(196,465),(196,472),(196,473),(196,474),(196,475),(196,476),(196,477),(196,478),(196,488),(196,489),(196,491),(196,492),(196,493),(196,495),(196,497),(196,498),(196,499),(196,500),(196,502),(196,503),(196,505),(196,508),(196,511),(196,513),(196,514),(196,516),(196,519),(196,522),(196,523),(196,526),(196,527),(196,529),(196,530),(196,533),(196,535),(196,536),(196,537),(196,538),(196,539),(196,540),(196,541),(196,556),(196,581),(196,582),(196,592),(196,593),(196,596),(196,602),(196,603),(196,604),(196,605),(196,606),(196,607),(196,608),(196,609),(196,610),(196,611),(196,612),(196,613),(196,614),(196,615),(196,616),(196,617),(196,618),(196,619),(196,620),(196,621),(196,622),(196,623),(196,624),(196,625),(196,626),(196,627),(196,628),(196,629),(196,630),(196,631),(196,632),(196,633),(196,634),(196,635),(196,636),(196,637),(196,638),(196,639),(196,640),(196,641),(196,642),(196,643),(196,644),(196,645),(196,646),(196,647),(196,648),(196,649),(196,650),(196,651),(196,652),(196,653),(196,654),(196,655),(196,656),(196,657),(196,658),(196,659),(196,660),(196,661),(196,662),(196,663),(196,664),(196,665),(196,666),(196,667),(196,668),(196,669),(196,670),(196,671),(196,672),(196,673),(196,674),(196,675),(196,676),(196,677),(196,678),(196,679),(196,680),(196,681),(196,682),(196,683),(196,684),(196,685),(196,686),(196,687),(196,688),(196,689),(196,690),(196,691),(196,692),(196,693),(196,694),(196,695),(196,696),(196,697),(196,698),(196,699),(196,700),(196,701),(196,702),(196,703),(196,704),(196,705),(196,706),(196,707),(196,708),(196,709),(196,710),(196,711),(196,712),(196,713),(196,714),(196,715),(196,716),(196,717),(196,718),(196,719),(196,721),(196,722),(196,723),(196,724),(196,725),(196,726),(196,727),(196,728),(196,729),(196,730),(196,733),(196,734),(196,735),(196,736),(196,738),(196,739),(196,748),(196,753),(196,757),(196,773),(197,232),(197,236),(197,237),(197,273),(197,274),(197,275),(197,276),(197,277),(197,284),(197,285),(197,286),(197,301),(197,311),(197,387),(197,388),(197,389),(197,390),(197,391),(197,392),(197,393),(197,394),(197,395),(197,396),(197,397),(197,398),(197,399),(197,479),(197,480),(197,481),(197,482),(197,485),(197,486),(197,487),(197,494),(197,506),(197,509),(197,510),(197,517),(197,518),(197,521),(197,542),(197,543),(197,550),(197,558),(197,568),(197,571),(197,572),(197,573),(197,574),(197,575),(197,576),(197,577),(197,578),(197,579),(197,580),(197,583),(197,584),(197,585),(197,586),(197,587),(197,588),(197,589),(197,590),(197,591),(197,594),(197,595),(197,601),(197,743),(197,750),(197,758),(197,761),(197,762),(197,763),(197,764),(197,765),(197,766),(197,767),(197,768),(197,769),(197,770),(197,771),(197,772),(197,774),(198,218),(198,300),(198,312),(198,315),(198,316),(198,317),(198,318),(198,367),(198,368),(198,369),(198,370),(198,371),(198,372),(198,374),(198,376),(198,377),(198,378),(198,379),(198,380),(198,381),(198,382),(198,383),(198,384),(198,385),(198,386),(198,408),(198,409),(198,410),(198,411),(198,412),(198,413),(198,414),(198,415),(198,416),(198,430),(198,431),(198,432),(198,433),(198,462),(198,466),(198,467),(198,468),(198,469),(198,470),(198,471),(198,483),(198,484),(198,490),(198,504),(198,512),(198,515),(198,520),(198,524),(198,528),(198,531),(198,532),(198,544),(198,545),(198,546),(198,547),(198,548),(198,549),(198,551),(198,552),(198,553),(198,554),(198,555),(198,557),(198,559),(198,560),(198,561),(198,562),(198,563),(198,564),(198,565),(198,566),(198,567),(198,569),(198,570),(198,597),(198,598),(198,599),(198,600),(198,737),(198,740),(198,741),(198,742),(198,744),(198,745),(198,746),(198,747),(198,749),(198,751),(198,752),(198,754),(198,755),(198,756),(198,759),(198,760),(199,217),(199,221),(199,222),(199,223),(199,225),(199,263),(199,496),(199,501),(199,507),(199,525),(199,534); +/*!40000 ALTER TABLE `rbac_linked_permissions` ENABLE KEYS */; UNLOCK TABLES; -- @@ -393,87 +341,10 @@ CREATE TABLE `rbac_permissions` ( LOCK TABLES `rbac_permissions` WRITE; /*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */; -INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(200,'Command: .rbac'),(201,'Command: .rbac account'),(202,'Command: .rbac account group'),(203,'Command: .rbac account group add'),(204,'Command: .rbac account group remove'),(205,'Command: .rbac account role'),(206,'Command: .rbac account role grant'),(207,'Command: .rbac account role deny'),(208,'Command: .rbac account role revoke'),(209,'Command: .rbac account permission'),(210,'Command: .rbac account permission grant'),(211,'Command: .rbac account permission deny'),(212,'Command: .rbac account permission revoke'),(213,'Command: .rbac list'),(214,'Command: .rbac list groups'),(215,'Command: .rbac list roles'),(216,'Command: .rbac list permissions'),(217,'Command: .account'),(218,'Command: .account addon'),(219,'Command: .account create'),(220,'Command: .account delete'),(221,'Command: .account lock'),(222,'Command: .account lock country'),(223,'Command: .account lock ip'),(224,'Command: .account onlinelist'),(225,'Command: .account password'),(226,'Command: .account set'),(227,'Command: .account set addon'),(228,'Command: .account set gmlevel'),(229,'Command: .account set password'),(230,'achievement'),(231,'achievement add'),(232,'arena'),(233,'arena captain'),(234,'arena create'),(235,'arena disband'),(236,'arena info'),(237,'arena lookup'),(238,'arena rename'),(239,'ban'),(240,'ban account'),(241,'ban character'),(242,'ban ip'),(243,'ban playeraccount'),(244,'baninfo'),(245,'baninfo account'),(246,'baninfo character'),(247,'baninfo ip'),(248,'banlist'),(249,'banlist account'),(250,'banlist character'),(251,'banlist ip'),(252,'unban'),(253,'unban account'),(254,'unban character'),(255,'unban ip'),(256,'unban playeraccount'),(257,'bf'),(258,'bf start'),(259,'bf stop'),(260,'bf switch'),(261,'bf timer'),(262,'bf enable'),(263,'account email'),(264,'account set sec'),(265,'account set sec email'),(266,'account set sec regmail'),(267,'cast'),(268,'cast back'),(269,'cast dist'),(270,'cast self'),(271,'cast target'),(272,'cast dest'),(273,'character'),(274,'character customize'),(275,'character changefaction'),(276,'character changerace'),(277,'character deleted'),(279,'character deleted list'),(280,'character deleted restore'),(283,'character level'),(284,'character rename'),(285,'character reputation'),(286,'character titles'),(287,'levelup'),(288,'pdump'),(289,'pdump load'),(290,'pdump write'),(291,'cheat'),(292,'cheat casttime'),(293,'cheat cooldown'),(294,'cheat explore'),(295,'cheat god'),(296,'cheat power'),(297,'cheat status'),(298,'cheat taxi'),(299,'cheat waterwalk'),(300,'debug'),(301,'debug anim'),(302,'debug areatriggers'),(303,'debug arena'),(304,'debug bg'),(305,'debug entervehicle'),(306,'debug getitemstate'),(307,'debug getitemvalue'),(308,'debug getvalue'),(309,'debug hostil'),(310,'debug itemexpire'),(311,'debug lootrecipient'),(312,'debug los'),(313,'debug mod32value'),(314,'debug moveflags'),(315,'debug play'),(316,'debug play cinematics'),(317,'debug play movie'),(318,'debug play sound'),(319,'debug send'),(320,'debug send buyerror'),(321,'debug send channelnotify'),(322,'debug send chatmessage'),(323,'debug send equiperror'),(324,'debug send largepacket'),(325,'debug send opcode'),(326,'debug send qinvalidmsg'),(327,'debug send qpartymsg'),(328,'debug send sellerror'),(329,'debug send setphaseshift'),(330,'debug send spellfail'),(331,'debug setaurastate'),(332,'debug setbit'),(333,'debug setitemvalue'),(334,'debug setvalue'),(335,'debug setvid'),(336,'debug spawnvehicle'),(337,'debug threat'),(338,'debug update'),(339,'debug uws'),(340,'wpgps'),(341,'deserter'),(342,'deserter bg'),(343,'deserter bg add'),(344,'deserter bg remove'),(345,'deserter instance'),(346,'deserter instance add'),(347,'deserter instance remove'),(348,'disable'),(349,'disable add'),(350,'disable add achievement_criteria'),(351,'disable add battleground'),(352,'disable add map'),(353,'disable add mmap'),(354,'disable add outdoorpvp'),(355,'disable add quest'),(356,'disable add spell'),(357,'disable add vmap'),(358,'disable remove'),(359,'disable remove achievement_criteria'),(360,'disable remove battleground'),(361,'disable remove map'),(362,'disable remove mmap'),(363,'disable remove outdoorpvp'),(364,'disable remove quest'),(365,'disable remove spell'),(366,'disable remove vmap'),(367,'event'),(368,'event activelist'),(369,'event start'),(370,'event stop'),(371,'gm'),(372,'gm chat'),(373,'gm fly'),(374,'gm ingame'),(375,'gm list'),(376,'gm visible'),(377,'go'),(378,'go creature'),(379,'go graveyard'),(380,'go grid'),(381,'go object'),(382,'go taxinode'),(383,'go ticket'),(384,'go trigger'),(385,'go xyz'),(386,'go zonexy'),(387,'gobject'),(388,'gobject activate'),(389,'gobject add'),(390,'gobject add temp'),(391,'gobject delete'),(392,'gobject info'),(393,'gobject move'),(394,'gobject near'),(395,'gobject set'),(396,'gobject set phase'),(397,'gobject set state'),(398,'gobject target'),(399,'gobject turn'),(401,'guild'),(402,'guild create'),(403,'guild delete'),(404,'guild invite'),(405,'guild uninvite'),(406,'guild rank'),(407,'guild rename'),(408,'honor'),(409,'honor add'),(410,'honor add kill'),(411,'honor update'),(412,'instance'),(413,'instance listbinds'),(414,'instance unbind'),(415,'instance stats'),(416,'instance savedata'),(417,'learn'),(418,'learn all'),(419,'learn all my'),(420,'learn all my class'),(421,'learn all my pettalents'),(422,'learn all my spells'),(423,'learn all my talents'),(424,'learn all gm'),(425,'learn all crafts'),(426,'learn all default'),(427,'learn all lang'),(428,'learn all recipes'),(429,'unlearn'),(430,'lfg'),(431,'lfg player'),(432,'lfg group'),(433,'lfg queue'),(434,'lfg clean'),(435,'lfg options'),(436,'list'),(437,'list creature'),(438,'list item'),(439,'list object'),(440,'list auras'),(441,'list mail'),(442,'lookup'),(443,'lookup area'),(444,'lookup creature'),(445,'lookup event'),(446,'lookup faction'),(447,'lookup item'),(448,'lookup itemset'),(449,'lookup object'),(450,'lookup quest'),(451,'lookup player'),(452,'lookup player ip'),(453,'lookup player account'),(454,'lookup player email'),(455,'lookup skill'),(456,'lookup spell'),(457,'lookup spell id'),(458,'lookup taxinode'),(459,'lookup tele'),(460,'lookup title'),(461,'lookup map'),(462,'announce'),(463,'channel'),(464,'channel set'),(465,'channel set ownership'),(466,'gmannounce'),(467,'gmnameannounce'),(468,'gmnotify'),(469,'nameannounce'),(470,'notify'),(471,'whispers'),(472,'group'),(473,'group leader'),(474,'group disband'),(475,'group remove'),(476,'group join'),(477,'group list'),(478,'group summon'),(479,'pet'),(480,'pet create'),(481,'pet learn'),(482,'pet unlearn'),(483,'send'),(484,'send items'),(485,'send mail'),(486,'send message'),(487,'send money'),(488,'additem'),(489,'additemset'),(490,'appear'),(491,'aura'),(492,'bank'),(493,'bindsight'),(494,'combatstop'),(495,'cometome'),(496,'commands'),(497,'cooldown'),(498,'damage'),(499,'dev'),(500,'die'),(501,'dismount'),(502,'distance'),(503,'flusharenapoints'),(504,'freeze'),(505,'gps'),(506,'guid'),(507,'help'),(508,'hidearea'),(509,'itemmove'),(510,'kick'),(511,'linkgrave'),(512,'listfreeze'),(513,'maxskill'),(514,'movegens'),(515,'mute'),(516,'neargrave'),(517,'pinfo'),(518,'playall'),(519,'possess'),(520,'recall'),(521,'repairitems'),(522,'respawn'),(523,'revive'),(524,'saveall'),(525,'save'),(526,'setskill'),(527,'showarea'),(528,'summon'),(529,'unaura'),(530,'unbindsight'),(531,'unfreeze'),(532,'unmute'),(533,'unpossess'),(534,'unstuck'),(535,'wchange'),(536,'mmap'),(537,'mmap loadedtiles'),(538,'mmap loc'),(539,'mmap path'),(540,'mmap stats'),(541,'mmap testarea'),(542,'morph'),(543,'demorph'),(544,'modify'),(545,'modify arenapoints'),(546,'modify bit'),(547,'modify drunk'),(548,'modify energy'),(549,'modify faction'),(550,'modify gender'),(551,'modify honor'),(552,'modify hp'),(553,'modify mana'),(554,'modify money'),(555,'modify mount'),(556,'modify phase'),(557,'modify rage'),(558,'modify reputation'),(559,'modify runicpower'),(560,'modify scale'),(561,'modify speed'),(562,'modify speed all'),(563,'modify speed backwalk'),(564,'modify speed fly'),(565,'modify speed walk'),(566,'modify speed swim'),(567,'modify spell'),(568,'modify standstate'),(569,'modify talentpoints'),(570,'npc'),(571,'npc add'),(572,'npc add formation'),(573,'npc add item'),(574,'npc add move'),(575,'npc add temp'),(576,'npc add delete'),(577,'npc add delete item'),(578,'npc add follow'),(579,'npc add follow stop'),(580,'npc set'),(581,'npc set allowmove'),(582,'npc set entry'),(583,'npc set factionid'),(584,'npc set flag'),(585,'npc set level'),(586,'npc set link'),(587,'npc set model'),(588,'npc set movetype'),(589,'npc set phase'),(590,'npc set spawndist'),(591,'npc set spawntime'),(592,'npc set data'),(593,'npc info'),(594,'npc near'),(595,'npc move'),(596,'npc playemote'),(597,'npc say'),(598,'npc textemote'),(599,'npc whisper'),(600,'npc yell'),(601,'npc tame'),(602,'quest'),(603,'quest add'),(604,'quest complete'),(605,'quest remove'),(606,'quest reward'),(607,'reload'),(608,'reload access_requirement'),(609,'reload achievement_criteria_data'),(610,'reload achievement_reward'),(611,'reload all'),(612,'reload all achievement'),(613,'reload all area'),(614,'reload all eventai'),(615,'reload all gossips'),(616,'reload all item'),(617,'reload all locales'),(618,'reload all loot'),(619,'reload all npc'),(620,'reload all quest'),(621,'reload all scripts'),(622,'reload all spell'),(623,'reload areatrigger_involvedrelation'),(624,'reload areatrigger_tavern'),(625,'reload areatrigger_teleport'),(626,'reload auctions'),(627,'reload autobroadcast'),(628,'reload command'),(629,'reload conditions'),(630,'reload config'),(631,'reload creature_text'),(632,'reload creature_ai_scripts'),(633,'reload creature_ai_texts'),(634,'reload creature_questender'),(635,'reload creature_linked_respawn'),(636,'reload creature_loot_template'),(637,'reload creature_onkill_reputation'),(638,'reload creature_queststarter'),(639,'reload creature_summon_groups'),(640,'reload creature_template'),(641,'reload disables'),(642,'reload disenchant_loot_template'),(643,'reload event_scripts'),(644,'reload fishing_loot_template'),(645,'reload game_graveyard_zone'),(646,'reload game_tele'),(647,'reload gameobject_questender'),(648,'reload gameobject_loot_template'),(649,'reload gameobject_queststarter'),(650,'reload gm_tickets'),(651,'reload gossip_menu'),(652,'reload gossip_menu_option'),(653,'reload item_enchantment_template'),(654,'reload item_loot_template'),(655,'reload item_set_names'),(656,'reload lfg_dungeon_rewards'),(657,'reload locales_achievement_reward'),(658,'reload locales_creature'),(659,'reload locales_creature_text'),(660,'reload locales_gameobject'),(661,'reload locales_gossip_menu_option'),(662,'reload locales_item'),(663,'reload locales_item_set_name'),(664,'reload locales_npc_text'),(665,'reload locales_page_text'),(666,'reload locales_points_of_interest'),(667,'reload locales_quest'),(668,'reload mail_level_reward'),(669,'reload mail_loot_template'),(670,'reload milling_loot_template'),(671,'reload npc_spellclick_spells'),(672,'reload npc_trainer'),(673,'reload npc_vendor'),(674,'reload page_text'),(675,'reload pickpocketing_loot_template'),(676,'reload points_of_interest'),(677,'reload prospecting_loot_template'),(678,'reload quest_poi'),(679,'reload quest_template'),(680,'reload rbac'),(681,'reload reference_loot_template'),(682,'reload reserved_name'),(683,'reload reputation_reward_rate'),(684,'reload reputation_spillover_template'),(685,'reload skill_discovery_template'),(686,'reload skill_extra_item_template'),(687,'reload skill_fishing_base_level'),(688,'reload skinning_loot_template'),(689,'reload smart_scripts'),(690,'reload spell_required'),(691,'reload spell_area'),(692,'reload spell_bonus_data'),(693,'reload spell_group'),(694,'reload spell_learn_spell'),(695,'reload spell_loot_template'),(696,'reload spell_linked_spell'),(697,'reload spell_pet_auras'),(698,'reload spell_proc_event'),(699,'reload spell_proc'),(700,'reload spell_scripts'),(701,'reload spell_target_position'),(702,'reload spell_threats'),(703,'reload spell_group_stack_rules'),(704,'reload trinity_string'),(705,'reload warden_action'),(706,'reload waypoint_scripts'),(707,'reload waypoint_data'),(708,'reload vehicle_accessory'),(709,'reload vehicle_template_accessory'),(710,'reset'),(711,'reset achievements'),(712,'reset honor'),(713,'reset level'),(714,'reset spells'),(715,'reset stats'),(716,'reset talents'),(717,'reset all'),(718,'server'),(719,'server corpses'),(720,'server exit'),(721,'server idlerestart'),(722,'server idlerestart cancel'),(723,'server idleshutdown'),(724,'server idleshutdown cancel'),(725,'server info'),(726,'server plimit'),(727,'server restart'),(728,'server restart cancel'),(729,'server set'),(730,'server set closed'),(731,'server set difftime'),(732,'server set loglevel'),(733,'server set motd'),(734,'server shutdown'),(735,'server shutdown cancel'),(736,'server motd'),(737,'tele'),(738,'tele add'),(739,'tele del'),(740,'tele name'),(741,'tele group'),(742,'ticket'),(743,'ticket assign'),(744,'ticket close'),(745,'ticket closedlist'),(746,'ticket comment'),(747,'ticket complete'),(748,'ticket delete'),(749,'ticket escalate'),(750,'ticket escalatedlist'),(751,'ticket list'),(752,'ticket onlinelist'),(753,'ticket reset'),(754,'ticket response'),(755,'ticket response append'),(756,'ticket response appendln'),(757,'ticket togglesystem'),(758,'ticket unassign'),(759,'ticket viewid'),(760,'ticket viewname'),(761,'titles'),(762,'titles add'),(763,'titles current'),(764,'titles remove'),(765,'titles set'),(766,'titles set mask'),(767,'wp'),(768,'wp add'),(769,'wp event'),(770,'wp load'),(771,'wp modify'),(772,'wp unload'),(773,'wp reload'),(774,'wp show'); +INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: reload all eventai'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload creature_text'),(632,'Command: reload creature_ai_scripts'),(633,'Command: reload creature_ai_texts'),(634,'Command: reload creature_questender'),(635,'Command: reload creature_linked_respawn'),(636,'Command: reload creature_loot_template'),(637,'Command: reload creature_onkill_reputation'),(638,'Command: reload creature_queststarter'),(639,'Command: reload creature_summon_groups'),(640,'Command: reload creature_template'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `rbac_role_permissions` --- - -DROP TABLE IF EXISTS `rbac_role_permissions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_role_permissions` ( - `roleId` int(10) unsigned NOT NULL COMMENT 'Role id', - `permissionId` int(10) unsigned NOT NULL COMMENT 'Permission id', - PRIMARY KEY (`roleId`,`permissionId`), - KEY `fk__role_permissions__rbac_permissions` (`permissionId`), - CONSTRAINT `fk__role_permissions__rbac_roles` FOREIGN KEY (`roleId`) REFERENCES `rbac_roles` (`id`) ON DELETE CASCADE, - CONSTRAINT `fk__role_permissions__rbac_permissions` FOREIGN KEY (`permissionId`) REFERENCES `rbac_permissions` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Role Permission relation'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `rbac_role_permissions` --- - -LOCK TABLES `rbac_role_permissions` WRITE; -/*!40000 ALTER TABLE `rbac_role_permissions` DISABLE KEYS */; -INSERT INTO `rbac_role_permissions` VALUES (5,1),(5,2),(6,3),(6,4),(6,5),(7,6),(8,11),(9,13),(33,14),(33,15),(33,16),(33,17),(33,18),(27,19),(22,20),(23,21),(24,22),(17,23),(34,24),(28,25),(30,26),(19,27),(35,28),(36,29),(11,30),(12,31),(10,32),(20,33),(14,34),(37,35),(29,36),(15,37),(13,38),(25,39),(38,40),(26,41),(18,42),(18,43),(16,44),(31,45),(32,46),(21,47),(39,48),(40,49),(41,50),(4,200),(4,201),(4,202),(4,203),(4,204),(4,205),(4,206),(4,207),(4,208),(4,209),(4,210),(4,211),(4,212),(4,213),(4,214),(4,215),(4,216),(1,217),(2,218),(1,221),(1,222),(1,223),(1,225),(4,226),(4,227),(4,230),(4,231),(3,232),(4,233),(4,234),(4,235),(3,236),(3,237),(4,238),(4,239),(4,240),(4,241),(4,242),(4,243),(4,244),(4,245),(4,246),(4,247),(4,248),(4,249),(4,250),(4,251),(4,252),(4,253),(4,254),(4,255),(4,256),(4,257),(4,258),(4,259),(4,260),(4,261),(4,262),(1,263),(2,263),(3,263),(4,263),(4,264),(4,265),(4,266),(4,267),(4,268),(4,269),(4,270),(4,271),(4,272),(3,273),(3,274),(3,275),(3,276),(3,277),(4,279),(4,280),(4,283),(3,284),(3,285),(3,286),(4,287),(4,288),(4,289),(4,290),(4,291),(4,292),(4,293),(4,294),(4,295),(4,296),(4,297),(4,298),(4,299),(2,300),(3,301),(4,302),(4,303),(4,304),(4,305),(4,306),(4,307),(4,308),(4,309),(4,310),(3,311),(2,312),(4,313),(4,314),(2,315),(2,316),(2,317),(2,318),(4,319),(4,320),(4,321),(4,322),(4,323),(4,324),(4,325),(4,326),(4,327),(4,328),(4,329),(4,330),(4,331),(4,332),(4,333),(4,334),(4,335),(4,336),(4,337),(4,338),(4,339),(4,340),(4,341),(4,342),(4,343),(4,344),(4,345),(4,346),(4,347),(4,348),(4,349),(4,350),(4,351),(4,352),(4,353),(4,354),(4,355),(4,356),(4,357),(4,358),(4,359),(4,360),(4,361),(4,362),(4,363),(4,364),(4,365),(4,366),(2,367),(2,368),(2,369),(2,370),(2,371),(2,372),(4,373),(2,374),(4,375),(2,376),(2,377),(2,378),(2,379),(2,380),(2,381),(2,382),(2,383),(2,384),(2,385),(2,386),(3,387),(3,388),(3,389),(3,390),(3,391),(3,392),(3,393),(3,394),(3,395),(3,396),(3,397),(3,398),(3,399),(4,401),(4,402),(4,403),(4,404),(4,405),(4,406),(4,407),(2,408),(2,409),(2,410),(2,411),(2,412),(2,413),(2,414),(2,415),(2,416),(4,417),(4,418),(4,419),(4,420),(4,421),(4,422),(4,423),(4,424),(4,425),(4,426),(4,427),(4,428),(4,429),(2,430),(2,431),(2,432),(2,433),(4,434),(4,435),(4,436),(4,437),(4,438),(4,439),(4,440),(4,441),(4,442),(4,443),(4,444),(4,445),(4,446),(4,447),(4,448),(4,449),(4,450),(4,451),(4,452),(4,453),(4,454),(4,455),(4,456),(4,457),(4,458),(4,459),(4,461),(2,462),(4,463),(4,464),(4,465),(2,466),(2,467),(2,468),(2,469),(2,470),(2,471),(4,472),(4,473),(4,474),(4,475),(4,476),(4,477),(4,478),(3,479),(3,480),(3,481),(3,482),(2,483),(2,484),(3,485),(3,486),(3,487),(4,488),(4,489),(2,490),(4,491),(4,492),(4,493),(3,494),(4,495),(1,496),(4,497),(4,498),(4,499),(4,500),(1,501),(4,502),(4,503),(2,504),(4,505),(3,506),(1,507),(4,508),(3,509),(3,510),(4,511),(2,512),(4,513),(4,514),(2,515),(4,516),(3,517),(3,518),(4,519),(2,520),(3,521),(4,522),(4,523),(2,524),(1,525),(4,526),(4,527),(2,528),(4,529),(4,530),(2,531),(2,532),(4,533),(1,534),(4,535),(4,536),(4,537),(4,538),(4,539),(4,540),(4,541),(3,542),(3,543),(2,544),(2,545),(2,546),(2,547),(2,548),(2,549),(3,550),(2,551),(2,552),(2,553),(2,554),(2,555),(4,556),(2,557),(3,558),(2,559),(2,560),(2,561),(2,562),(2,563),(2,564),(2,565),(2,566),(2,567),(3,568),(2,569),(2,570),(3,571),(3,572),(3,573),(3,574),(3,575),(3,576),(3,577),(3,578),(3,579),(3,580),(4,581),(4,582),(3,583),(3,584),(3,585),(3,586),(3,587),(3,588),(3,589),(3,590),(3,591),(4,592),(4,593),(3,594),(3,595),(4,596),(2,597),(2,598),(2,599),(2,600),(3,601),(4,602),(4,603),(4,604),(4,605),(4,606),(4,607),(4,608),(4,609),(4,610),(4,611),(4,612),(4,613),(4,614),(4,615),(4,616),(4,617),(4,618),(4,619),(4,620),(4,621),(4,622),(4,623),(4,624),(4,625),(4,626),(4,627),(4,628),(4,629),(4,630),(4,631),(4,632),(4,633),(4,634),(4,635),(4,636),(4,637),(4,638),(4,639),(4,640),(4,641),(4,642),(4,643),(4,644),(4,645),(4,646),(4,647),(4,648),(4,649),(4,650),(4,651),(4,652),(4,653),(4,654),(4,655),(4,656),(4,657),(4,658),(4,659),(4,660),(4,661),(4,662),(4,663),(4,664),(4,665),(4,666),(4,667),(4,668),(4,669),(4,670),(4,671),(4,672),(4,673),(4,674),(4,675),(4,676),(4,677),(4,678),(4,679),(4,680),(4,681),(4,682),(4,683),(4,684),(4,685),(4,686),(4,687),(4,688),(4,689),(4,690),(4,691),(4,692),(4,693),(4,694),(4,695),(4,696),(4,697),(4,698),(4,699),(4,700),(4,701),(4,702),(4,703),(4,704),(4,705),(4,706),(4,707),(4,708),(4,709),(4,710),(4,711),(4,712),(4,713),(4,714),(4,715),(4,716),(4,717),(4,718),(4,719),(4,721),(4,722),(4,723),(4,724),(4,725),(4,726),(4,727),(4,728),(4,729),(4,730),(4,733),(4,734),(4,735),(4,736),(2,737),(4,738),(4,739),(2,740),(2,741),(2,742),(3,743),(2,744),(2,745),(2,746),(2,747),(4,748),(2,749),(3,750),(2,751),(2,752),(4,753),(2,754),(2,755),(2,756),(4,757),(3,758),(2,759),(2,760),(3,761),(3,762),(3,763),(3,764),(3,765),(3,766),(3,767),(3,768),(3,769),(3,770),(3,771),(3,772),(4,773),(3,774); -/*!40000 ALTER TABLE `rbac_role_permissions` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `rbac_roles` --- - -DROP TABLE IF EXISTS `rbac_roles`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_roles` ( - `id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Role id', - `name` varchar(100) NOT NULL COMMENT 'Role name', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Roles List'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `rbac_roles` --- - -LOCK TABLES `rbac_roles` WRITE; -/*!40000 ALTER TABLE `rbac_roles` DISABLE KEYS */; -INSERT INTO `rbac_roles` VALUES (1,'Player Commands'),(2,'Moderator Commands'),(3,'GameMaster Commands'),(4,'Administrator Commands'),(5,'Quick Login/Logout'),(6,'Use Battleground/Arenas'),(7,'Use Dungeon Finder'),(8,'Log GM trades'),(9,'Skip Instance required bosses check'),(10,'Ticket management'),(11,'Instant .save'),(12,'Allow params with .unstuck'),(13,'Full HP after resurrect'),(14,'Appear in GM ingame list'),(15,'Use staff badge in chat'),(16,'Receive global GM messages/texts'),(17,'Skip over-speed ping check'),(18,'Allows Admin Opcodes'),(19,'Two side mail interaction'),(20,'Notify if a command was not found'),(21,'Enables lower security than target check'),(22,'Skip disable map check'),(23,'Skip reset talents when used more than allowed check'),(24,'Skip spam chat check'),(25,'Restore saved gm setting states'),(26,'Use Config option START_GM_LEVEL to assign new character level'),(27,'Skip needed requirements to use channel check'),(28,'Allow say chat between factions'),(29,'Filter whispers'),(30,'Allow channel chat between factions'),(31,'Join channels without announce'),(32,'Change channel settings without being channel moderator'),(33,'Skip character creation checks'),(34,'Two side faction characters on the same account'),(35,'See two side who list'),(36,'Add friends of other faction'),(37,'See all security levels with who command'),(38,'Allows to add a gm to friend list'),(39,'Enable IP, Last Login and EMail output in pinfo'),(40,'Forces to enter the email for confirmation on password change'),(41,'Allow user to check his own email with .account'); -/*!40000 ALTER TABLE `rbac_roles` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `rbac_security_level_groups` --- - -DROP TABLE IF EXISTS `rbac_security_level_groups`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `rbac_security_level_groups` ( - `secId` int(10) unsigned NOT NULL COMMENT 'Security Level id', - `groupId` int(10) unsigned NOT NULL COMMENT 'group id', - PRIMARY KEY (`secId`,`groupId`), - KEY `fk__rbac_security_level_groups__rbac_groups` (`groupId`), - CONSTRAINT `fk__rbac_security_level_groups__rbac_groups` FOREIGN KEY (`groupId`) REFERENCES `rbac_groups` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Default groups to assign when an account is set gm level'; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `rbac_security_level_groups` --- - -LOCK TABLES `rbac_security_level_groups` WRITE; -/*!40000 ALTER TABLE `rbac_security_level_groups` DISABLE KEYS */; -INSERT INTO `rbac_security_level_groups` VALUES (0,1),(1,1),(2,1),(3,1),(1,2),(2,2),(3,2),(2,3),(3,3),(3,4); -/*!40000 ALTER TABLE `rbac_security_level_groups` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `realmcharacters` -- diff --git a/sql/updates/auth/2013_09_29_00_auth_misc.sql b/sql/updates/auth/2013_09_29_00_auth_misc.sql index e2d4143c991..e0591c5c827 100644 --- a/sql/updates/auth/2013_09_29_00_auth_misc.sql +++ b/sql/updates/auth/2013_09_29_00_auth_misc.sql @@ -96,4 +96,4 @@ DROP TABLE IF EXISTS `rbac_security_level_groups`; DROP TABLE IF EXISTS `rbac_group_roles`; DROP TABLE IF EXISTS `rbac_role_permissions`; DROP TABLE IF EXISTS `rbac_groups`; -DROP TABLE IF EXISTS `rbac_roles`; \ No newline at end of file +DROP TABLE IF EXISTS `rbac_roles`; diff --git a/sql/updates/world/2013_09_29_00_world_misc.sql b/sql/updates/world/2013_09_29_00_world_misc.sql index 1e318e492fa..b8b01a37d37 100644 --- a/sql/updates/world/2013_09_29_00_world_misc.sql +++ b/sql/updates/world/2013_09_29_00_world_misc.sql @@ -15,4 +15,3 @@ INSERT INTO `command` (`name`, `permission`, `help`) VALUES ('.rbac account deny', 204, 'Syntax: rbac account deny [$account] #id [#realmId]\n\nDeny a permission to selected player or given account.\n\n#reamID may be -1 for all realms.'), ('.rbac account revoke', 205, 'Syntax: rbac account revoke [$account] #id\n\nRemove a permission from an account\n\nNote: Removes the permission from granted or denied permissions'), ('.rbac list', 206, 'Syntax: rbac list [$id]\n\nView list of all permissions. If $id is given will show only info for that permission.'); - diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index cd700839934..6d79c6c77a1 100644 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -456,7 +456,7 @@ void AccountMgr::LoadRBAC() } uint8 secId = 255; - rbac::RBACPermissionContainer* permissions; + rbac::RBACPermissionContainer* permissions = NULL; do { Field* field = result->Fetch(); @@ -544,6 +544,6 @@ void AccountMgr::ClearRBAC() rbac::RBACPermissionContainer const& AccountMgr::GetRBACDefaultPermissions(uint8 secLevel) { - TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACDefaultPermissions: secLevel %u - size: %u", secLevel, _defaultPermissions[secLevel].size()); + TC_LOG_TRACE(LOG_FILTER_RBAC, "AccountMgr::GetRBACDefaultPermissions: secLevel %u - size: %u", secLevel, uint32(_defaultPermissions[secLevel].size())); return _defaultPermissions[secLevel]; } diff --git a/src/server/scripts/Commands/cs_rbac.cpp b/src/server/scripts/Commands/cs_rbac.cpp index 7101c0d67cd..1f946fe80ad 100644 --- a/src/server/scripts/Commands/cs_rbac.cpp +++ b/src/server/scripts/Commands/cs_rbac.cpp @@ -321,12 +321,12 @@ public: } } handler->PSendSysMessage(LANG_RBAC_LIST_HEADER_DENIED, command->rbac->GetId(), command->rbac->GetName().c_str()); - rbac::RBACPermissionContainer const& default = sAccountMgr->GetRBACDefaultPermissions(command->rbac->GetSecurityLevel()); - if (default.empty()) + rbac::RBACPermissionContainer const& defaultPermissions = sAccountMgr->GetRBACDefaultPermissions(command->rbac->GetSecurityLevel()); + if (defaultPermissions.empty()) handler->PSendSysMessage("%s", handler->GetTrinityString(LANG_RBAC_LIST_EMPTY)); else { - for (rbac::RBACPermissionContainer::const_iterator itr = default.begin(); itr != default.end(); ++itr) + for (rbac::RBACPermissionContainer::const_iterator itr = defaultPermissions.begin(); itr != defaultPermissions.end(); ++itr) { rbac::RBACPermission const* permission = sAccountMgr->GetRBACPermission(*itr); handler->PSendSysMessage(LANG_RBAC_LIST_ELEMENT, permission->GetId(), permission->GetName().c_str()); -- cgit v1.2.3 From c67d52730b092288b9f034d2f2c5311712c40f8e Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:16:13 +0200 Subject: DB/SAI: Leading the Ancestors Home By @dr-j fixes #10783 --- sql/updates/world/2013_09_29_01_world_sai.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sql/updates/world/2013_09_29_01_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_01_world_sai.sql b/sql/updates/world/2013_09_29_01_world_sai.sql new file mode 100644 index 00000000000..33a8a4d7c68 --- /dev/null +++ b/sql/updates/world/2013_09_29_01_world_sai.sql @@ -0,0 +1,7 @@ +-- 11610 Leading the Ancestors Home +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN(25397,25398,25399); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(25397,25398,25399) 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 +(25397,0,0,0,8,0,100,0,45536,0,0,0,33,25397,0,0,0,0,0,7,0,0,0,0,0,0,0,'Elder Kesuk - On Spell Hit - Give Quest Credit'), +(25398,0,0,0,8,0,100,0,45536,0,0,0,33,25398,0,0,0,0,0,7,0,0,0,0,0,0,0,'Elder Sagani - On Spell Hit - Give Quest Credit'), +(25399,0,0,0,8,0,100,0,45536,0,0,0,33,25399,0,0,0,0,0,7,0,0,0,0,0,0,0,'Elder Takret - On Spell Hit - Give Quest Credit'); -- cgit v1.2.3 From 728b2555b6fbd5aaf041440103cb43ee38eb8b2e Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:19:44 +0200 Subject: DB/SAI: Neltharion's Flame (12267) By @dr-j fixes #10965 --- sql/updates/world/2013_09_29_02_world_sai.sql | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sql/updates/world/2013_09_29_02_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_02_world_sai.sql b/sql/updates/world/2013_09_29_02_world_sai.sql new file mode 100644 index 00000000000..fac5a69cec8 --- /dev/null +++ b/sql/updates/world/2013_09_29_02_world_sai.sql @@ -0,0 +1,35 @@ +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (27355,27450); +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(27355,27449,27450) AND `source_type`=0; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry IN(27355,27449,27450); +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 +(27450,0,0,1,8,0,100,0,48790,0,0,0,33,27450,0,0,0,0,0,7,0,0,0,0,0,0,0,'Neltharions Flame Control Bunny - On Spellhit (Neltharions Flame) - Give Kill Credit'), +(27450,0,1,2,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,27449,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Set Data 1 1 on Neltharions Flame Fire Bunny'), +(27450,0,2,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,27355,0,200,0,0,0,0, 'Neltharions Flame Control Bunny - Linked with Previous Event - Set Data 1 1 on Rothin the Decaying'), +(27449,0,0,1,38,0,100,0,1,1,0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Neltharions Flame Fire Bunny - On Data set 1 1 - Set Data 1 0 on self'), +(27449,0,1,0,61,0,100,0,0,0,0,0,11,48786,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Neltharions Flame Fire Bunny - Linked with Previous Event - Cast Neltharions Flame Fire Bunny: Periodic Fire Aura'), +(27355,0,0,1,25,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Reset - Disable Combat Movement'), +(27355,0,1,0,61,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - Linked with Previous Event - Set Phase 0'), +(27355,0,2,3,4,0,100,0,0,0,0,0,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Rothin the Decaying - On Agro - Cast Shadowbolt'), +(27355,0,3,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - Linked with Previous Event - Set Phase 1'), +(27355,0,4,0,9,1,100,0,0,40,3400,4800,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Rothin the Decaying - Linked with Previous Event - On Range (Phase 1) - Cast Shadow Bolt'), +(27355,0,5,6,3,1,100,0,0,7,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Less than 7% Mana - Allow Combat Movement'), +(27355,0,6,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - Linked with Previous Event - Set Phase 2'), +(27355,0,7,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Target More than 35 Yards away - Allow Combat Movement'), +(27355,0,8,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Target less than 15 Yards away - Disable Combat Movement'), +(27355,0,9,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Target less than 5 Yards away - Allow Combat Movement'), +(27355,0,10,0,3,3,100,0,15,100,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On More than 15% Mana - Set Phase 1'), +(27355,0,11,0,0,0,100,0,12000,17000,15000,20000,11,51337,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - IC - On Range (Phase 1) - Cast Shadow Flame'), +(27355,0,12,0,2,0,100,1,0,30,9500,11000,11,51512,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Less than 30% HP - Cast Aegis of Neltharion'), +(27355,0,13,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Evade - Set Phase 0'), +(27355,0,14,0,25,0,100,0,0,0,0,0,18,768,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Reset/Spawn - Disable Combat'), +(27355,0,15,16,38,0,100,0,1,1,0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Data set 1 1 - Set Data 1 0 on self'), +(27355,0,16,17,61,0,100,0,0,0,0,0,19,768,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - Linked with Previous Event - Enable Combat'), +(27355,0,17,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - Linked with Previous Event - Say'), +(27355,0,18,0,4,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Agro - Say'), +(27355,0,19,0,6,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Rothin the Decaying - On Death - Say'); + +DELETE FROM `creature_text` WHERE `entry`=27355; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(27355,0,0,'No... NO! What have you done?! So many ancient wyrms wasted... what magic could do this?',14,0,100,1,0,0,'Rothin the Decaying '), +(27355,1,0,'Foolish errand $g boy:girl; ... you will die for interrupting my work!',14,0,100,1,0,0,'Rothin the Decaying '), +(27355,2,0,'This is not the end... death only... strengthens...',14,0,100,1,0,0,'Rothin the Decaying '); -- cgit v1.2.3 From 9842cbf8876e1ea0e77b4c2f9ec2c9192c0e3243 Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:24:56 +0200 Subject: DB/SAI: Finding the Source By @dr-j fixes #10943 --- sql/updates/world/2013_09_29_03_world_sai.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sql/updates/world/2013_09_29_03_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_03_world_sai.sql b/sql/updates/world/2013_09_29_03_world_sai.sql new file mode 100644 index 00000000000..6f38a558dbe --- /dev/null +++ b/sql/updates/world/2013_09_29_03_world_sai.sql @@ -0,0 +1,19 @@ +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=10541; +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(-23712,-23713,-23714,-23715,-23716,10541) 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 +(-23712,0,0,1,8,0,100,0,16378,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Krakle''s Thermometer - On Spell Hit (Temperature Reading)- Say'), +(-23713,0,0,1,8,0,100,0,16378,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Krakle''s Thermometer - On Spell Hit (Temperature Reading)- Say'), +(-23714,0,0,1,8,0,100,0,16378,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Krakle''s Thermometer - On Spell Hit (Temperature Reading)- Say'), +(-23715,0,0,1,8,0,100,0,16378,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Krakle''s Thermometer - On Spell Hit (Temperature Reading)- Say'), +(-23716,0,0,1,8,0,100,0,16378,0,0,0,33,10541,0,0,0,0,0,7,0,0,0,0,0,0,0,'Krakle''s Thermometer - On Spell Hit (Temperature Reading)- Give Kill Credit'), +(-23716,0,1,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Krakle''s Thermometer - Linked with Previous Event - Say'); + +DELETE FROM `creature_text` WHERE `entry` =10541; + +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(10541, 0, 0, 'It''s 428,000 degrees Kraklenheit... What''s happening, hot stuff?', 12, 0, 100, 0, 0, 0, 'Krakle''s Thermometer'), +(10541, 0, 1, 'DING! 428,000 degrees Kraklenheit, exactly! Well, approximately. Almost. Somewhere around there...', 12, 0, 100, 0, 0, 0, 'Krakle''s Thermometer'), +(10541, 0, 2, 'Measuring by Kraklenheit, it is 428,000 dewgrees! That''s Krakley!', 12, 0, 100, 0, 0, 0, 'Krakle''s Thermometer'), +(10541, 1, 0, 'The temperature is 122 degrees Kraklenheit.', 12, 0, 100, 0, 0, 0, 'Krakle''s Thermometer'), +(10541, 1, 1, 'The temperature is 9280 degrees Kraklenheit! That''s HOT!', 12, 0, 100, 0, 0, 0, 'Krakle''s Thermometer'), +(10541, 1, 2, 'Wow, it''s 3 degrees Kraklenheit. Keep Looking.', 12, 0, 100, 0, 0, 0, 'Krakle''s Thermometer'); -- cgit v1.2.3 From ff8bc029cea05a1c74b7633ae5ffecb5960ec55f Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:28:45 +0200 Subject: DB/Update: Gibblewilt fear spam By @Vincent-Michael fixes #10627 --- sql/updates/world/2013_09_29_04_world_updatesi.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2013_09_29_04_world_updatesi.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_04_world_updatesi.sql b/sql/updates/world/2013_09_29_04_world_updatesi.sql new file mode 100644 index 00000000000..9170cfdbaac --- /dev/null +++ b/sql/updates/world/2013_09_29_04_world_updatesi.sql @@ -0,0 +1,3 @@ +UPDATE `smart_scripts` SET `link`=12 WHERE `entryorguid`=8503 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `event_type`=61,`event_param2`=0 WHERE `entryorguid`=8503 AND `source_type`=0 AND `id`=12; +UPDATE `smart_scripts` SET `event_type`=61,`link`=0 WHERE `entryorguid`=8503 AND `source_type`=0 AND `id`=13; -- cgit v1.2.3 From 9bd7cc8a8be1a957c3e74124665d218af43f9b41 Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:43:35 +0200 Subject: DB/Update: Plan B By @untaught fixes #10787 --- sql/updates/world/2013_09_29_05_world_updates.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2013_09_29_05_world_updates.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_05_world_updates.sql b/sql/updates/world/2013_09_29_05_world_updates.sql new file mode 100644 index 00000000000..7d66be10629 --- /dev/null +++ b/sql/updates/world/2013_09_29_05_world_updates.sql @@ -0,0 +1,2 @@ +UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9155 AND `SourceEntry`=0 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=2 AND `ConditionTarget`=0 AND `ConditionValue1`=34842 AND `ConditionValue2`=10 AND `ConditionValue3`=0; +UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9156 AND `SourceEntry`=0 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=2 AND `ConditionTarget`=0 AND `ConditionValue1`=34842 AND `ConditionValue2`=10 AND `ConditionValue3`=0; -- cgit v1.2.3 From dbd994b04776ba515da463fdcd6308c3ae8e065c Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:43:39 +0200 Subject: DB/SAI: Hampering their Escape By @untaught fixes #10780 --- sql/updates/world/2013_09_29_06_world_sai.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2013_09_29_06_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_06_world_sai.sql b/sql/updates/world/2013_09_29_06_world_sai.sql new file mode 100644 index 00000000000..4197a4eed02 --- /dev/null +++ b/sql/updates/world/2013_09_29_06_world_sai.sql @@ -0,0 +1,6 @@ +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN (25442,25441,25443); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25442,25441,25443) 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 +(25441,0,0,0,8,0,100,0,45583,0,0,0,33,25441,0,0,0,0,0,7,0,0,0,0,0,0,0,'North Platform - On Spell Hit - Give Quest Credit'), +(25442,0,0,0,8,0,100,0,45583,0,0,0,33,25442,0,0,0,0,0,7,0,0,0,0,0,0,0,'East Platform - On Spell Hit - Give Quest Credit'), +(25443,0,0,0,8,0,100,0,45583,0,0,0,33,25443,0,0,0,0,0,7,0,0,0,0,0,0,0,'West Platform - On Spell Hit - Give Quest Credit'); -- cgit v1.2.3 From 79ad89a3a7ffacc80b405e34cad1bdcfb4f6836f Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 29 Sep 2013 22:43:44 +0200 Subject: DB/SAI: Destroying the Alters By @untaught fixes #10841 --- sql/updates/world/2013_09_29_07_world_sai.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/2013_09_29_07_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_29_07_world_sai.sql b/sql/updates/world/2013_09_29_07_world_sai.sql new file mode 100644 index 00000000000..95e30ebf511 --- /dev/null +++ b/sql/updates/world/2013_09_29_07_world_sai.sql @@ -0,0 +1,14 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=57852; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,57852,0,0,31,0,3,30742,0,0,0,0,'','Destroy Altar can hit First Summoning Altar'), +(13,1,57852,0,1,31,0,3,30744,0,0,0,0,'','Destroy Altar can hit Second Summoning Altar'), +(13,1,57852,0,2,31,0,3,30745,0,0,0,0,'','Destroy Altar can hit Third Summoning Altar'), +(13,1,57852,0,3,31,0,3,30950,0,0,0,0,'','Destroy Altar can hit Fourth Summoning Altar'); + +UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry` IN (30742,30744,30745,30950); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (30742,30744,30745,30950) 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 +(30742,0,0,0,8,0,100,0,57852,0,0,0,33,30742,0,0,0,0,0,7,0,0,0,0,0,0,0,'First Summoning Altar - On Spell Hit - Give Quest Credit'), +(30744,0,0,0,8,0,100,0,57852,0,0,0,33,30744,0,0,0,0,0,7,0,0,0,0,0,0,0,'Second Summoning Altar - On Spell Hit - Give Quest Credit'), +(30745,0,0,0,8,0,100,0,57852,0,0,0,33,30745,0,0,0,0,0,7,0,0,0,0,0,0,0,'Third Summoning Altar - On Spell Hit - Give Quest Credit'), +(30950,0,0,0,8,0,100,0,57852,0,0,0,33,30950,0,0,0,0,0,7,0,0,0,0,0,0,0,'Fourth Summoning Altar - On Spell Hit - Give Quest Credit'); -- cgit v1.2.3 From 7a234c83f49c4f10deb8dbdcfb92c3dee4342a8a Mon Sep 17 00:00:00 2001 From: dr-j Date: Mon, 30 Sep 2013 11:03:36 +0200 Subject: DB/Loot: Fix Satchel of Helpful Goods Closes #10552 Closes #10292 --- .../2013_09_30_00_world_item_loot_template.sql | 168 +++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 sql/updates/world/2013_09_30_00_world_item_loot_template.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_30_00_world_item_loot_template.sql b/sql/updates/world/2013_09_30_00_world_item_loot_template.sql new file mode 100644 index 00000000000..354155999ce --- /dev/null +++ b/sql/updates/world/2013_09_30_00_world_item_loot_template.sql @@ -0,0 +1,168 @@ +SET @Reference := 10036; -- Needs 26 reference loot template entries +DELETE FROM `item_loot_template` WHERE `entry` BETWEEN 51999 AND 52005; +INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Satchel of Helpfull Goods (level 0-25) +(51999,1,100,1,1,-@Reference,1), -- Cloth +(51999,2,100,1,2,-@Reference-1,1), -- Leather +(51999,3,100,1,3,-@Reference-2,1), -- Mail +-- Satchel of Helpfull Goods (level 26-35) +(52000,1,100,1,1,-@Reference-3,1), -- Cloth +(52000,2,100,1,2,-@Reference-4,1), -- Leather +(52000,3,100,1,3,-@Reference-5,1), -- Mail +-- Satchel of Helpfull Goods (level 36-45) +(52001,1,100,1,1,-@Reference-6,1), -- Cloth +(52001,2,100,1,2,-@Reference-7,1), -- Leather +(52001,3,100,1,3,-@Reference-8,1), -- Mail +(52001,4,100,1,4,-@Reference-9,1), -- Plate +-- Satchel of Helpfull Goods (level 46-55) +(52002,1,100,1,1,-@Reference-10,1), -- Cloth +(52002,2,100,1,2,-@Reference-11,1), -- Leather +(52002,3,100,1,3,-@Reference-12,1), -- Mail +(52002,4,100,1,4,-@Reference-13,1), -- Plate +-- Satchel of Helpfull Goods (level 56-60) +(52003,1,100,1,1,-@Reference-14,1), -- Cloth +(52003,2,100,1,2,-@Reference-15,1), -- leather +(52003,3,100,1,3,-@Reference-16,1), -- Mail +(52003,4,100,1,4,-@Reference-17,1), -- Plate +-- Satchel of Helpfull Goods (level 61-64) +(52004,1,100,1,1,-@Reference-18,1), -- Cloth +(52004,2,100,1,2,-@Reference-19,1), -- leather +(52004,3,100,1,3,-@Reference-20,1), -- mail +(52004,4,100,1,4,-@Reference-21,1), -- plate +-- Satchel of Helpfull Goods (level 65-70) +(52005,1,100,1,1,-@Reference-22,1), -- Cloth +(52005,2,100,1,2,-@Reference-23,1), -- leather +(52005,3,100,1,3,-@Reference-24,1), -- mail +(52005,4,100,1,4,-@Reference-25,1); -- plate +DELETE FROM `reference_loot_template` WHERE `entry` BETWEEN @Reference AND @Reference+25; +INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +-- Satchel of Helpfull Goods (level 0-25) +(@Reference,51968,0,1,1,1,1), -- Enumerated Wrap +(@Reference,51994,0,1,1,1,1), -- Tumultuous Cloak +(@Reference+1,51964,0,1,2,1,1), -- Vigorous Belt +(@Reference+1,51994,0,1,2,1,1), -- Tumultuous Cloak +(@Reference+2,51978,0,1,3,1,1), -- Earthbound Girdle +(@Reference+2,51994,0,1,3,1,1), -- Tumultuous Cloak +-- Satchel of Helpfull Goods (level 26-35) +(@Reference+3,51973,0,1,1,1,1), -- Enumerated Handwraps +(@Reference+3,51996,0,1,1,1,1), -- Tumultuous Necklace +(@Reference+4,51965,0,1,2,1,1), -- Vigorous Handguards +(@Reference+4,51996,0,1,2,1,1), -- Tumultuous Necklace +(@Reference+5,51980,0,1,3,1,1), -- Earthbound Handgrips +(@Reference+5,51996,0,1,3,1,1), -- Tumultuous Necklace +-- Satchel of Helpfull Goods (level 36-45) +(@Reference+6,51974,0,1,1,1,1), -- Enumerated Shoulderpads +(@Reference+6,51992,0,1,1,1,1), -- Tumultuous Ring +(@Reference+7,51966,0,1,2,1,1), -- Vigorous Spaulders +(@Reference+7,51992,0,1,2,1,1), -- Tumultuous Ring +(@Reference+8,51976,0,1,3,1,1), -- Earthbound Shoulderguards +(@Reference+8,51992,0,1,3,1,1), -- Tumultuous Ring +(@Reference+9,51984,0,1,4,1,1), -- Stalwart Shoulderpads +(@Reference+9,51992,0,1,4,1,1), -- Tumultuous Ring +-- Satchel of Helpfull Goods (level 46-55) +(@Reference+10,51967,0,1,1,1,1), -- Enumerated Sandals +(@Reference+10,51972,0,1,1,1,1), -- Enumerated Bracers +(@Reference+11,51962,0,1,2,1,1), -- Vigorous Bracers +(@Reference+11,51963,0,1,2,1,1), -- Vigorous Stompers +(@Reference+12,51981,0,1,3,1,1), -- Earthbound Wristguards +(@Reference+12,51982,0,1,3,1,1), -- Earthbound Boots +(@Reference+13,51989,0,1,4,1,1), -- Stalwart Bands +(@Reference+13,51990,0,1,4,1,1), -- Stalwart Treads +-- Satchel of Helpfull Goods (level 56-60) +(@Reference+14,51971,0,1,1,1,1), -- Enumerated Belt +(@Reference+14,51993,0,1,1,1,1), -- Turbulent Cloak +(@Reference+15,51959,0,1,2,1,1), -- Vigorous Belt +(@Reference+15,51993,0,1,2,1,1), -- Turbulent Cloak +(@Reference+16,51977,0,1,3,1,1), -- Earthbound Girdle +(@Reference+16,51993,0,1,3,1,1), -- Turbulent Cloak +(@Reference+17,51985,0,1,4,1,1), -- Stalwart Belt +(@Reference+17,51993,0,1,4,1,1), -- Turbulent Cloak +-- Satchel of Helpfull Goods (level 61-64) +(@Reference+18,51970,0,1,1,1,1), -- Enumerated Gloves +(@Reference+18,51995,0,1,1,1,1), -- Turbulent Necklace +(@Reference+19,51960,0,1,2,1,1), -- Vigorous Gloves +(@Reference+19,51995,0,1,2,1,1), -- Turbulent Necklace +(@Reference+20,51979,0,1,3,1,1), -- Earthbound Grips +(@Reference+20,51995,0,1,3,1,1), -- Turbulent Necklace +(@Reference+21,51987,0,1,4,1,1), -- Stalwart Grips +(@Reference+21,51995,0,1,4,1,1), -- Turbulent Necklace +-- Satchel of Helpfull Goods (level 65-70) +(@Reference+22,51961,0,1,1,1,1), -- Vigorous Shoulderguards +(@Reference+22,51991,0,1,1,1,1), -- Turbulent Signet +(@Reference+23,51969,0,1,2,1,1), -- Enumerated Shoulders +(@Reference+23,51991,0,1,2,1,1), -- Turbulent Signet +(@Reference+24,51975,0,1,3,1,1), -- Earthbound Shoulders +(@Reference+24,51991,0,1,3,1,1), -- Turbulent Signet +(@Reference+25,51983,0,1,4,1,1), -- Stalwart Shoulderguards +(@Reference+25,51991,0,1,4,1,1); -- Turbulent Signet + +-- ------------------------------------------------------------------- +-- Set some Parameters +-- ------------------------------------------------------------------- +SET @Cloth := 400; -- Class Bitmask: 16 (Priest) +128 (Mage) +256 (Warlock) +SET @Leather1 := 1100; -- Class Bitmask: 4 (Hunter) +8 (Rogue) +64 (Shaman) +1024 (Druid) +SET @Leather2 := 1032; -- Class Bitmask: 8 (Rogue) +1024 (Druid) +SET @Mail1 := 3; -- Class Bitmask: 1 (Warrior) +2 (Paladin) +SET @Mail2 := 68; -- Class Bitmask: 4 (Hunter) +8 (Shaman) +SET @Plate := 35; -- Class Bitmask: 1 (Warrior) +2 (Paladin) +32 (DeathKnight) +-- Add conditions to make sure everyone gets beneficial loot for their class +-- ------------------------------------------------------------------- +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=5 AND `SourceGroup` BETWEEN 51999 AND 52005; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup` BETWEEN @Reference AND @Reference+25; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +-- Cloth Items +(10,@Reference,51968,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Wrap only for clothusers'), +(10,@Reference,51994,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Tumultuous Cloak only for clothusers'), +(10,@Reference+3,51973,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Handwraps only for clothusers'), +(10,@Reference+3,51996,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Tumultuous Necklace only for clothusers'), +(10,@Reference+6,51974,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Shoulderpads only for clothusers'), +(10,@Reference+6,51992,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Tumultuous Ring only for clothusers'), +(10,@Reference+10,51967,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Sandals only for clothusers'), +(10,@Reference+10,51972,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Bracers only for clothusers'), +(10,@Reference+14,51971,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Belt only for clothusers'), +(10,@Reference+14,51993,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Turbulent Cloak only for clothusers'), +(10,@Reference+18,51970,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Gloves only for clothusers'), +(10,@Reference+18,51995,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Turbulent Necklace only for clothusers'), +(10,@Reference+22,51969,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Enumerated Shoulders only for clothusers'), +(10,@Reference+22,51991,0,0,15,0,@Cloth,0,0,0,0,'','SOHG: Turbulent Signet only for clothusers'), +-- Leather Items +(10,@Reference+1,51964,0,0,15,0,@Leather1,0,0,0,0,'','SOHG: Vigorous Belt only for leatherusers'), +(10,@Reference+1,51994,0,0,15,0,@Leather1,0,0,0,0,'','SOHG: Tumultuous Cloak only for leatherusers'), +(10,@Reference+4,51965,0,0,15,0,@Leather1,0,0,0,0,'','SOHG: Vigorous Handguards only for leatherusers'), +(10,@Reference+4,51996,0,0,15,0,@Leather1,0,0,0,0,'','SOHG: Tumultuous Necklace only for leatherusers'), +(10,@Reference+7,51966,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Spaulders only for leatherusers'), +(10,@Reference+7,51992,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Tumultuous ring only for leatherusers'), +(10,@Reference+11,51962,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Bracers only for leatherusers'), +(10,@Reference+11,51963,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Stompers only for leatherusers'), +(10,@Reference+15,51959,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Belt only for leatherusers'), +(10,@Reference+15,51993,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Turbulent Cloak only for leatherusers'), +(10,@Reference+19,51960,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Gloves only for leatherusers'), +(10,@Reference+19,51995,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Turbulent Necklace only for leatherusers'), +(10,@Reference+23,51961,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Vigorous Shoulderguards only for leatherusers'), +(10,@Reference+23,51991,0,0,15,0,@Leather2,0,0,0,0,'','SOHG: Turbulent Signet only for leatherusers'), +-- Mail Items +(10,@Reference+2,51978,0,0,15,0,@Mail1,0,0,0,0,'','SOHG: Earthbound Girdle only for mail users'), +(10,@Reference+2,51994,0,0,15,0,@Mail1,0,0,0,0,'','SOHG: Tumultuous Cloak only for mail users'), +(10,@Reference+5,51980,0,0,15,0,@Mail1,0,0,0,0,'','SOHG: Earthbound Handgrips only for mail users'), +(10,@Reference+5,51996,0,0,15,0,@Mail1,0,0,0,0,'','SOHG: Tumultuous Necklace only for Mail users'), +(10,@Reference+8,51976,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Shoulderguards only for mail users'), +(10,@Reference+8,51992,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Tumultuous Ring only for mail users'), +(10,@Reference+12,51982,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Boots only for mail users'), +(10,@Reference+12,51981,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Wristguards only for mail users'), +(10,@Reference+16,51977,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Girdle only for mail users'), +(10,@Reference+16,51993,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Turbulent Cloak only for mail users'), +(10,@Reference+20,51979,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Grips only for mail users'), +(10,@Reference+20,51995,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Turbulent Necklace only for mail users'), +(10,@Reference+24,51975,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Earthbound Shoulders only for mail users'), +(10,@Reference+24,51991,0,0,15,0,@Mail2,0,0,0,0,'','SOHG: Turbulent Signet only for Mail users'), +-- Plate Items +(10,@Reference+9,51984,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Shoulderpads only for plate users'), +(10,@Reference+9,51992,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Tumultuous Ring only for plate users'), +(10,@Reference+13,51989,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Bands only for plate users'), +(10,@Reference+13,51990,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Treads only for plate users'), +(10,@Reference+17,51985,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Belt only for plate users'), +(10,@Reference+17,51993,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Turbulent Cloak only for plate users'), +(10,@Reference+21,51987,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Grips only for plate users'), +(10,@Reference+21,51995,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Turbulent Necklace only for plate users'), +(10,@Reference+25,51983,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Stalwart Shoulderguards only for plate users'), +(10,@Reference+25,51991,0,0,15,0,@Plate,0,0,0,0,'','SOHG: Turbulent Signet only for plate users'); -- cgit v1.2.3 From 6e9584696c2f531ebc547e8c04f8f00eeb97807a Mon Sep 17 00:00:00 2001 From: zxbiohazardzx Date: Mon, 30 Sep 2013 11:27:13 +0200 Subject: DB/Loot: correct petdrops from the fishingbags and cleanup the misused reference Closes #10975 --- sql/updates/world/2013_09_30_01_world_item_loot_template.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sql/updates/world/2013_09_30_01_world_item_loot_template.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_30_01_world_item_loot_template.sql b/sql/updates/world/2013_09_30_01_world_item_loot_template.sql new file mode 100644 index 00000000000..9c60a618139 --- /dev/null +++ b/sql/updates/world/2013_09_30_01_world_item_loot_template.sql @@ -0,0 +1,8 @@ +DELETE FROM `reference_loot_template` WHERE `entry`=11112; +UPDATE `reference_loot_template` SET `entry`=11114 WHERE `item`= 34831 AND `entry`=11115; +DELETE FROM `item_loot_template` WHERE `entry`=35348; +INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(35348,1,100,1,0,-11113,1), -- Garanteed Drops +(35348,2, 60,1,0,-11116,1), -- Rare Pets +(35348,4, 60,1,0,-11115,1), -- Junk items +(35348,3, 5,1,0,-11114,1); -- Lesser Treasures -- cgit v1.2.3 From 5c95431df2e68e79b21ec0d74260555a0114b212 Mon Sep 17 00:00:00 2001 From: FireEmerald Date: Mon, 30 Sep 2013 11:30:58 +0200 Subject: DB/SAI: Correction on waypoints for quest npc. Closes #10937 --- sql/updates/world/2013_09_30_02_world_sai_335.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/2013_09_30_02_world_sai_335.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_30_02_world_sai_335.sql b/sql/updates/world/2013_09_30_02_world_sai_335.sql new file mode 100644 index 00000000000..909f0d42b42 --- /dev/null +++ b/sql/updates/world/2013_09_30_02_world_sai_335.sql @@ -0,0 +1,5 @@ +-- DB/Quest: Fix: [A/H] The Summoning +-- Note: This warrior quest was deleted in 4.0.1. +SET @ENTRY := 6176; -- Bath'rah the Windwatcher +DELETE FROM `waypoints` WHERE `entry` = @ENTRY AND `pointid` BETWEEN 8 AND 14; +UPDATE `smart_scripts` SET `event_type` = 40 WHERE `entryorguid` = @ENTRY AND `id` = 1; -- cgit v1.2.3 From 0c0ff983442f147b308a3d06a460f1eb49f53993 Mon Sep 17 00:00:00 2001 From: Spp Date: Mon, 30 Sep 2013 11:55:51 +0200 Subject: Core/RBAC: Fix errors in RBAC sql related to ea2fe0217d --- sql/base/auth_database.sql | 4 ++-- sql/updates/world/2013_09_30_03_world_misc.sql | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/2013_09_30_03_world_misc.sql (limited to 'sql') diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index 177ad4d6e15..a52d4875314 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -2,7 +2,7 @@ -- -- Host: localhost Database: auth -- ------------------------------------------------------ --- Server version 5.6.9-rc +-- Server version 5.6.9-rc /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -341,7 +341,7 @@ CREATE TABLE `rbac_permissions` ( LOCK TABLES `rbac_permissions` WRITE; /*!40000 ALTER TABLE `rbac_permissions` DISABLE KEYS */; -INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: reload all eventai'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload creature_text'),(632,'Command: reload creature_ai_scripts'),(633,'Command: reload creature_ai_texts'),(634,'Command: reload creature_questender'),(635,'Command: reload creature_linked_respawn'),(636,'Command: reload creature_loot_template'),(637,'Command: reload creature_onkill_reputation'),(638,'Command: reload creature_queststarter'),(639,'Command: reload creature_summon_groups'),(640,'Command: reload creature_template'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'); +INSERT INTO `rbac_permissions` VALUES (1,'Instant logout'),(2,'Skip Queue'),(3,'Join Normal Battleground'),(4,'Join Random Battleground'),(5,'Join Arenas'),(6,'Join Dungeon Finder'),(11,'Log GM trades'),(13,'Skip Instance required bosses check'),(14,'Skip character creation team mask check'),(15,'Skip character creation class mask check'),(16,'Skip character creation race mask check'),(17,'Skip character creation reserved name check'),(18,'Skip character creation heroic min level check'),(19,'Skip needed requirements to use channel check'),(20,'Skip disable map check'),(21,'Skip reset talents when used more than allowed check'),(22,'Skip spam chat check'),(23,'Skip over-speed ping check'),(24,'Two side faction characters on the same account'),(25,'Allow say chat between factions'),(26,'Allow channel chat between factions'),(27,'Two side mail interaction'),(28,'See two side who list'),(29,'Add friends of other faction'),(30,'Save character without delay with .save command'),(31,'Use params with .unstuck command'),(32,'Can be assigned tickets with .assign ticket command'),(33,'Notify if a command was not found'),(34,'Check if should appear in list using .gm ingame command'),(35,'See all security levels with who command'),(36,'Filter whispers'),(37,'Use staff badge in chat'),(38,'Resurrect with full Health Points'),(39,'Restore saved gm setting states'),(40,'Allows to add a gm to friend list'),(41,'Use Config option START_GM_LEVEL to assign new character level'),(42,'Allows to use CMSG_WORLD_TELEPORT opcode'),(43,'Allows to use CMSG_WHOIS opcode'),(44,'Receive global GM messages/texts'),(45,'Join channels without announce'),(46,'Change channel settings without being channel moderator'),(47,'Enables lower security than target check'),(48,'Enable IP, Last Login and EMail output in pinfo'),(49,'Forces to enter the email for confirmation on password change'),(50,'Allow user to check his own email with .account'),(192,'Role: Sec Level Administrator'),(193,'Role: Sec Level Gamemaster'),(194,'Role: Sec Level Moderator'),(195,'Role: Sec Level Player'),(196,'Role: Administrator Commands'),(197,'Role: Gamemaster Commands'),(198,'Role: Moderator Commands'),(199,'Role: Player Commands'),(200,'Command: rbac'),(201,'Command: rbac account'),(202,'Command: rbac account list'),(203,'Command: rbac account grant'),(204,'Command: rbac account deny'),(205,'Command: rbac account revoke'),(206,'Command: rbac list'),(217,'Command: account'),(218,'Command: account addon'),(219,'Command: account create'),(220,'Command: account delete'),(221,'Command: account lock'),(222,'Command: account lock country'),(223,'Command: account lock ip'),(224,'Command: account onlinelist'),(225,'Command: account password'),(226,'Command: account set'),(227,'Command: account set addon'),(228,'Command: account set gmlevel'),(229,'Command: account set password'),(230,'Command: achievement'),(231,'Command: achievement add'),(232,'Command: arena'),(233,'Command: arena captain'),(234,'Command: arena create'),(235,'Command: arena disband'),(236,'Command: arena info'),(237,'Command: arena lookup'),(238,'Command: arena rename'),(239,'Command: ban'),(240,'Command: ban account'),(241,'Command: ban character'),(242,'Command: ban ip'),(243,'Command: ban playeraccount'),(244,'Command: baninfo'),(245,'Command: baninfo account'),(246,'Command: baninfo character'),(247,'Command: baninfo ip'),(248,'Command: banlist'),(249,'Command: banlist account'),(250,'Command: banlist character'),(251,'Command: banlist ip'),(252,'Command: unban'),(253,'Command: unban account'),(254,'Command: unban character'),(255,'Command: unban ip'),(256,'Command: unban playeraccount'),(257,'Command: bf'),(258,'Command: bf start'),(259,'Command: bf stop'),(260,'Command: bf switch'),(261,'Command: bf timer'),(262,'Command: bf enable'),(263,'Command: account email'),(264,'Command: account set sec'),(265,'Command: account set sec email'),(266,'Command: account set sec regmail'),(267,'Command: cast'),(268,'Command: cast back'),(269,'Command: cast dist'),(270,'Command: cast self'),(271,'Command: cast target'),(272,'Command: cast dest'),(273,'Command: character'),(274,'Command: character customize'),(275,'Command: character changefaction'),(276,'Command: character changerace'),(277,'Command: character deleted'),(279,'Command: character deleted list'),(280,'Command: character deleted restore'),(283,'Command: character level'),(284,'Command: character rename'),(285,'Command: character reputation'),(286,'Command: character titles'),(287,'Command: levelup'),(288,'Command: pdump'),(289,'Command: pdump load'),(290,'Command: pdump write'),(291,'Command: cheat'),(292,'Command: cheat casttime'),(293,'Command: cheat cooldown'),(294,'Command: cheat explore'),(295,'Command: cheat god'),(296,'Command: cheat power'),(297,'Command: cheat status'),(298,'Command: cheat taxi'),(299,'Command: cheat waterwalk'),(300,'Command: debug'),(301,'Command: debug anim'),(302,'Command: debug areatriggers'),(303,'Command: debug arena'),(304,'Command: debug bg'),(305,'Command: debug entervehicle'),(306,'Command: debug getitemstate'),(307,'Command: debug getitemvalue'),(308,'Command: debug getvalue'),(309,'Command: debug hostil'),(310,'Command: debug itemexpire'),(311,'Command: debug lootrecipient'),(312,'Command: debug los'),(313,'Command: debug mod32value'),(314,'Command: debug moveflags'),(315,'Command: debug play'),(316,'Command: debug play cinematics'),(317,'Command: debug play movie'),(318,'Command: debug play sound'),(319,'Command: debug send'),(320,'Command: debug send buyerror'),(321,'Command: debug send channelnotify'),(322,'Command: debug send chatmessage'),(323,'Command: debug send equiperror'),(324,'Command: debug send largepacket'),(325,'Command: debug send opcode'),(326,'Command: debug send qinvalidmsg'),(327,'Command: debug send qpartymsg'),(328,'Command: debug send sellerror'),(329,'Command: debug send setphaseshift'),(330,'Command: debug send spellfail'),(331,'Command: debug setaurastate'),(332,'Command: debug setbit'),(333,'Command: debug setitemvalue'),(334,'Command: debug setvalue'),(335,'Command: debug setvid'),(336,'Command: debug spawnvehicle'),(337,'Command: debug threat'),(338,'Command: debug update'),(339,'Command: debug uws'),(340,'Command: wpgps'),(341,'Command: deserter'),(342,'Command: deserter bg'),(343,'Command: deserter bg add'),(344,'Command: deserter bg remove'),(345,'Command: deserter instance'),(346,'Command: deserter instance add'),(347,'Command: deserter instance remove'),(348,'Command: disable'),(349,'Command: disable add'),(350,'Command: disable add achievement_criteria'),(351,'Command: disable add battleground'),(352,'Command: disable add map'),(353,'Command: disable add mmap'),(354,'Command: disable add outdoorpvp'),(355,'Command: disable add quest'),(356,'Command: disable add spell'),(357,'Command: disable add vmap'),(358,'Command: disable remove'),(359,'Command: disable remove achievement_criteria'),(360,'Command: disable remove battleground'),(361,'Command: disable remove map'),(362,'Command: disable remove mmap'),(363,'Command: disable remove outdoorpvp'),(364,'Command: disable remove quest'),(365,'Command: disable remove spell'),(366,'Command: disable remove vmap'),(367,'Command: event'),(368,'Command: event activelist'),(369,'Command: event start'),(370,'Command: event stop'),(371,'Command: gm'),(372,'Command: gm chat'),(373,'Command: gm fly'),(374,'Command: gm ingame'),(375,'Command: gm list'),(376,'Command: gm visible'),(377,'Command: go'),(378,'Command: go creature'),(379,'Command: go graveyard'),(380,'Command: go grid'),(381,'Command: go object'),(382,'Command: go taxinode'),(383,'Command: go ticket'),(384,'Command: go trigger'),(385,'Command: go xyz'),(386,'Command: go zonexy'),(387,'Command: gobject'),(388,'Command: gobject activate'),(389,'Command: gobject add'),(390,'Command: gobject add temp'),(391,'Command: gobject delete'),(392,'Command: gobject info'),(393,'Command: gobject move'),(394,'Command: gobject near'),(395,'Command: gobject set'),(396,'Command: gobject set phase'),(397,'Command: gobject set state'),(398,'Command: gobject target'),(399,'Command: gobject turn'),(401,'Command: guild'),(402,'Command: guild create'),(403,'Command: guild delete'),(404,'Command: guild invite'),(405,'Command: guild uninvite'),(406,'Command: guild rank'),(407,'Command: guild rename'),(408,'Command: honor'),(409,'Command: honor add'),(410,'Command: honor add kill'),(411,'Command: honor update'),(412,'Command: instance'),(413,'Command: instance listbinds'),(414,'Command: instance unbind'),(415,'Command: instance stats'),(416,'Command: instance savedata'),(417,'Command: learn'),(418,'Command: learn all'),(419,'Command: learn all my'),(420,'Command: learn all my class'),(421,'Command: learn all my pettalents'),(422,'Command: learn all my spells'),(423,'Command: learn all my talents'),(424,'Command: learn all gm'),(425,'Command: learn all crafts'),(426,'Command: learn all default'),(427,'Command: learn all lang'),(428,'Command: learn all recipes'),(429,'Command: unlearn'),(430,'Command: lfg'),(431,'Command: lfg player'),(432,'Command: lfg group'),(433,'Command: lfg queue'),(434,'Command: lfg clean'),(435,'Command: lfg options'),(436,'Command: list'),(437,'Command: list creature'),(438,'Command: list item'),(439,'Command: list object'),(440,'Command: list auras'),(441,'Command: list mail'),(442,'Command: lookup'),(443,'Command: lookup area'),(444,'Command: lookup creature'),(445,'Command: lookup event'),(446,'Command: lookup faction'),(447,'Command: lookup item'),(448,'Command: lookup itemset'),(449,'Command: lookup object'),(450,'Command: lookup quest'),(451,'Command: lookup player'),(452,'Command: lookup player ip'),(453,'Command: lookup player account'),(454,'Command: lookup player email'),(455,'Command: lookup skill'),(456,'Command: lookup spell'),(457,'Command: lookup spell id'),(458,'Command: lookup taxinode'),(459,'Command: lookup tele'),(460,'Command: lookup title'),(461,'Command: lookup map'),(462,'Command: announce'),(463,'Command: channel'),(464,'Command: channel set'),(465,'Command: channel set ownership'),(466,'Command: gmannounce'),(467,'Command: gmnameannounce'),(468,'Command: gmnotify'),(469,'Command: nameannounce'),(470,'Command: notify'),(471,'Command: whispers'),(472,'Command: group'),(473,'Command: group leader'),(474,'Command: group disband'),(475,'Command: group remove'),(476,'Command: group join'),(477,'Command: group list'),(478,'Command: group summon'),(479,'Command: pet'),(480,'Command: pet create'),(481,'Command: pet learn'),(482,'Command: pet unlearn'),(483,'Command: send'),(484,'Command: send items'),(485,'Command: send mail'),(486,'Command: send message'),(487,'Command: send money'),(488,'Command: additem'),(489,'Command: additemset'),(490,'Command: appear'),(491,'Command: aura'),(492,'Command: bank'),(493,'Command: bindsight'),(494,'Command: combatstop'),(495,'Command: cometome'),(496,'Command: commands'),(497,'Command: cooldown'),(498,'Command: damage'),(499,'Command: dev'),(500,'Command: die'),(501,'Command: dismount'),(502,'Command: distance'),(503,'Command: flusharenapoints'),(504,'Command: freeze'),(505,'Command: gps'),(506,'Command: guid'),(507,'Command: help'),(508,'Command: hidearea'),(509,'Command: itemmove'),(510,'Command: kick'),(511,'Command: linkgrave'),(512,'Command: listfreeze'),(513,'Command: maxskill'),(514,'Command: movegens'),(515,'Command: mute'),(516,'Command: neargrave'),(517,'Command: pinfo'),(518,'Command: playall'),(519,'Command: possess'),(520,'Command: recall'),(521,'Command: repairitems'),(522,'Command: respawn'),(523,'Command: revive'),(524,'Command: saveall'),(525,'Command: save'),(526,'Command: setskill'),(527,'Command: showarea'),(528,'Command: summon'),(529,'Command: unaura'),(530,'Command: unbindsight'),(531,'Command: unfreeze'),(532,'Command: unmute'),(533,'Command: unpossess'),(534,'Command: unstuck'),(535,'Command: wchange'),(536,'Command: mmap'),(537,'Command: mmap loadedtiles'),(538,'Command: mmap loc'),(539,'Command: mmap path'),(540,'Command: mmap stats'),(541,'Command: mmap testarea'),(542,'Command: morph'),(543,'Command: demorph'),(544,'Command: modify'),(545,'Command: modify arenapoints'),(546,'Command: modify bit'),(547,'Command: modify drunk'),(548,'Command: modify energy'),(549,'Command: modify faction'),(550,'Command: modify gender'),(551,'Command: modify honor'),(552,'Command: modify hp'),(553,'Command: modify mana'),(554,'Command: modify money'),(555,'Command: modify mount'),(556,'Command: modify phase'),(557,'Command: modify rage'),(558,'Command: modify reputation'),(559,'Command: modify runicpower'),(560,'Command: modify scale'),(561,'Command: modify speed'),(562,'Command: modify speed all'),(563,'Command: modify speed backwalk'),(564,'Command: modify speed fly'),(565,'Command: modify speed walk'),(566,'Command: modify speed swim'),(567,'Command: modify spell'),(568,'Command: modify standstate'),(569,'Command: modify talentpoints'),(570,'Command: npc'),(571,'Command: npc add'),(572,'Command: npc add formation'),(573,'Command: npc add item'),(574,'Command: npc add move'),(575,'Command: npc add temp'),(576,'Command: npc add delete'),(577,'Command: npc add delete item'),(578,'Command: npc add follow'),(579,'Command: npc add follow stop'),(580,'Command: npc set'),(581,'Command: npc set allowmove'),(582,'Command: npc set entry'),(583,'Command: npc set factionid'),(584,'Command: npc set flag'),(585,'Command: npc set level'),(586,'Command: npc set link'),(587,'Command: npc set model'),(588,'Command: npc set movetype'),(589,'Command: npc set phase'),(590,'Command: npc set spawndist'),(591,'Command: npc set spawntime'),(592,'Command: npc set data'),(593,'Command: npc info'),(594,'Command: npc near'),(595,'Command: npc move'),(596,'Command: npc playemote'),(597,'Command: npc say'),(598,'Command: npc textemote'),(599,'Command: npc whisper'),(600,'Command: npc yell'),(601,'Command: npc tame'),(602,'Command: quest'),(603,'Command: quest add'),(604,'Command: quest complete'),(605,'Command: quest remove'),(606,'Command: quest reward'),(607,'Command: reload'),(608,'Command: reload access_requirement'),(609,'Command: reload achievement_criteria_data'),(610,'Command: reload achievement_reward'),(611,'Command: reload all'),(612,'Command: reload all achievement'),(613,'Command: reload all area'),(614,'Command: reload all eventai'),(615,'Command: reload all gossips'),(616,'Command: reload all item'),(617,'Command: reload all locales'),(618,'Command: reload all loot'),(619,'Command: reload all npc'),(620,'Command: reload all quest'),(621,'Command: reload all scripts'),(622,'Command: reload all spell'),(623,'Command: reload areatrigger_involvedrelation'),(624,'Command: reload areatrigger_tavern'),(625,'Command: reload areatrigger_teleport'),(626,'Command: reload auctions'),(627,'Command: reload autobroadcast'),(628,'Command: reload command'),(629,'Command: reload conditions'),(630,'Command: reload config'),(631,'Command: reload creature_text'),(632,'Command: reload creature_ai_scripts'),(633,'Command: reload creature_ai_texts'),(634,'Command: reload creature_questender'),(635,'Command: reload creature_linked_respawn'),(636,'Command: reload creature_loot_template'),(637,'Command: reload creature_onkill_reputation'),(638,'Command: reload creature_queststarter'),(639,'Command: reload creature_summon_groups'),(640,'Command: reload creature_template'),(641,'Command: reload disables'),(642,'Command: reload disenchant_loot_template'),(643,'Command: reload event_scripts'),(644,'Command: reload fishing_loot_template'),(645,'Command: reload game_graveyard_zone'),(646,'Command: reload game_tele'),(647,'Command: reload gameobject_questender'),(648,'Command: reload gameobject_loot_template'),(649,'Command: reload gameobject_queststarter'),(650,'Command: reload gm_tickets'),(651,'Command: reload gossip_menu'),(652,'Command: reload gossip_menu_option'),(653,'Command: reload item_enchantment_template'),(654,'Command: reload item_loot_template'),(655,'Command: reload item_set_names'),(656,'Command: reload lfg_dungeon_rewards'),(657,'Command: reload locales_achievement_reward'),(658,'Command: reload locales_creature'),(659,'Command: reload locales_creature_text'),(660,'Command: reload locales_gameobject'),(661,'Command: reload locales_gossip_menu_option'),(662,'Command: reload locales_item'),(663,'Command: reload locales_item_set_name'),(664,'Command: reload locales_npc_text'),(665,'Command: reload locales_page_text'),(666,'Command: reload locales_points_of_interest'),(667,'Command: reload locales_quest'),(668,'Command: reload mail_level_reward'),(669,'Command: reload mail_loot_template'),(670,'Command: reload milling_loot_template'),(671,'Command: reload npc_spellclick_spells'),(672,'Command: reload npc_trainer'),(673,'Command: reload npc_vendor'),(674,'Command: reload page_text'),(675,'Command: reload pickpocketing_loot_template'),(676,'Command: reload points_of_interest'),(677,'Command: reload prospecting_loot_template'),(678,'Command: reload quest_poi'),(679,'Command: reload quest_template'),(680,'Command: reload rbac'),(681,'Command: reload reference_loot_template'),(682,'Command: reload reserved_name'),(683,'Command: reload reputation_reward_rate'),(684,'Command: reload reputation_spillover_template'),(685,'Command: reload skill_discovery_template'),(686,'Command: reload skill_extra_item_template'),(687,'Command: reload skill_fishing_base_level'),(688,'Command: reload skinning_loot_template'),(689,'Command: reload smart_scripts'),(690,'Command: reload spell_required'),(691,'Command: reload spell_area'),(692,'Command: reload spell_bonus_data'),(693,'Command: reload spell_group'),(694,'Command: reload spell_learn_spell'),(695,'Command: reload spell_loot_template'),(696,'Command: reload spell_linked_spell'),(697,'Command: reload spell_pet_auras'),(698,'Command: reload spell_proc_event'),(699,'Command: reload spell_proc'),(700,'Command: reload spell_scripts'),(701,'Command: reload spell_target_position'),(702,'Command: reload spell_threats'),(703,'Command: reload spell_group_stack_rules'),(704,'Command: reload trinity_string'),(705,'Command: reload warden_action'),(706,'Command: reload waypoint_scripts'),(707,'Command: reload waypoint_data'),(708,'Command: reload vehicle_accessory'),(709,'Command: reload vehicle_template_accessory'),(710,'Command: reset'),(711,'Command: reset achievements'),(712,'Command: reset honor'),(713,'Command: reset level'),(714,'Command: reset spells'),(715,'Command: reset stats'),(716,'Command: reset talents'),(717,'Command: reset all'),(718,'Command: server'),(719,'Command: server corpses'),(720,'Command: server exit'),(721,'Command: server idlerestart'),(722,'Command: server idlerestart cancel'),(723,'Command: server idleshutdown'),(724,'Command: server idleshutdown cancel'),(725,'Command: server info'),(726,'Command: server plimit'),(727,'Command: server restart'),(728,'Command: server restart cancel'),(729,'Command: server set'),(730,'Command: server set closed'),(731,'Command: server set difftime'),(732,'Command: server set loglevel'),(733,'Command: server set motd'),(734,'Command: server shutdown'),(735,'Command: server shutdown cancel'),(736,'Command: server motd'),(737,'Command: tele'),(738,'Command: tele add'),(739,'Command: tele del'),(740,'Command: tele name'),(741,'Command: tele group'),(742,'Command: ticket'),(743,'Command: ticket assign'),(744,'Command: ticket close'),(745,'Command: ticket closedlist'),(746,'Command: ticket comment'),(747,'Command: ticket complete'),(748,'Command: ticket delete'),(749,'Command: ticket escalate'),(750,'Command: ticket escalatedlist'),(751,'Command: ticket list'),(752,'Command: ticket onlinelist'),(753,'Command: ticket reset'),(754,'Command: ticket response'),(755,'Command: ticket response append'),(756,'Command: ticket response appendln'),(757,'Command: ticket togglesystem'),(758,'Command: ticket unassign'),(759,'Command: ticket viewid'),(760,'Command: ticket viewname'),(761,'Command: titles'),(762,'Command: titles add'),(763,'Command: titles current'),(764,'Command: titles remove'),(765,'Command: titles set'),(766,'Command: titles set mask'),(767,'Command: wp'),(768,'Command: wp add'),(769,'Command: wp event'),(770,'Command: wp load'),(771,'Command: wp modify'),(772,'Command: wp unload'),(773,'Command: wp reload'),(774,'Command: wp show'); /*!40000 ALTER TABLE `rbac_permissions` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/world/2013_09_30_03_world_misc.sql b/sql/updates/world/2013_09_30_03_world_misc.sql new file mode 100644 index 00000000000..579958f111a --- /dev/null +++ b/sql/updates/world/2013_09_30_03_world_misc.sql @@ -0,0 +1,7 @@ +DELETE FROM `command` WHERE `permission` BETWEEN 200 AND 216; +INSERT INTO `command` (`name`, `permission`, `help`) VALUES +('rbac account list', 202, 'Syntax: rbac account list [$account]\n\nView permissions of selected player or given account\nNote: Only those that affect current realm'), +('rbac account grant', 203, 'Syntax: rbac account grant [$account] #id [#realmId]\n\nGrant a permission to selected player or given account.\n\n#reamID may be -1 for all realms.'), +('rbac account deny', 204, 'Syntax: rbac account deny [$account] #id [#realmId]\n\nDeny a permission to selected player or given account.\n\n#reamID may be -1 for all realms.'), +('rbac account revoke', 205, 'Syntax: rbac account revoke [$account] #id\n\nRemove a permission from an account\n\nNote: Removes the permission from granted or denied permissions'), +('rbac list', 206, 'Syntax: rbac list [$id]\n\nView list of all permissions. If $id is given will show only info for that permission.'); -- cgit v1.2.3 From 1010e140bf311500475e9440f88558279c496dd0 Mon Sep 17 00:00:00 2001 From: Filip Date: Mon, 30 Sep 2013 22:52:14 +0200 Subject: DB/Update: Return To...RP event update By @Foldor fixes #10886 --- sql/updates/world/2013_09_30_04_world_update.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2013_09_30_04_world_update.sql (limited to 'sql') diff --git a/sql/updates/world/2013_09_30_04_world_update.sql b/sql/updates/world/2013_09_30_04_world_update.sql new file mode 100644 index 00000000000..a96cad21e64 --- /dev/null +++ b/sql/updates/world/2013_09_30_04_world_update.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template_addon` SET `mount`=25678, `bytes2`=0x1 WHERE `entry`=37845; +UPDATE `smart_scripts` SET `action_param1`=45492, `comment`='Quel''Delar Skull Target - on spell hit - Cast Shadow Nova' WHERE `entryorguid`=37852 AND `source_type`=0 AND `id`=1 AND `link`=0; -- cgit v1.2.3 From 8aa92ea2525c578b81c41cae1f714c4471cabeb9 Mon Sep 17 00:00:00 2001 From: Filip Date: Tue, 1 Oct 2013 21:41:40 +0200 Subject: Are we there, yeti? By @dr-j fixes #10972 --- sql/updates/world/2013_10_01_00_world_sai.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/2013_10_01_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_10_01_00_world_sai.sql b/sql/updates/world/2013_10_01_00_world_sai.sql new file mode 100644 index 00000000000..13f4e825e81 --- /dev/null +++ b/sql/updates/world/2013_10_01_00_world_sai.sql @@ -0,0 +1,6 @@ +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(10977,10978,7583); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (10977,10978,7583); +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 +(10977, 0, 0, 0, 8, 0, 100, 0, 17166, 0, 0, 0, 33, 10977 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Quixxil - On Spellhit (Release Umis Yeti) - Kill Credit'), +(10978, 0, 0, 0, 8, 0, 100, 0, 17166, 0, 0, 0, 33, 10978 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Legacki - On Spellhit (Release Umis Yeti)- Kill Credit'), +(7583, 0, 0, 0, 8, 0, 100, 0, 17166, 0, 0, 0, 33, 7583 , 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Sprinkle - On Spellhit (Release Umis Yeti)- Kill Credit'); -- cgit v1.2.3 From f8fb6d6a5856df061376b3b52ef5967ccb4d12c2 Mon Sep 17 00:00:00 2001 From: Filip Date: Fri, 4 Oct 2013 12:35:13 +0200 Subject: DB/Misc: Ormus the Penitent vendor By @Foldor fixes #10885 --- sql/updates/world/2013_10_01_00_misc.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/2013_10_01_00_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2013_10_01_00_misc.sql b/sql/updates/world/2013_10_01_00_misc.sql new file mode 100644 index 00000000000..b6283dbd820 --- /dev/null +++ b/sql/updates/world/2013_10_01_00_misc.sql @@ -0,0 +1,9 @@ +UPDATE `creature_template` SET `npcflag`=4227 WHERE `entry`=38316; + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10996 AND `id`=5; +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES +(10996, 5, 1, 'Show me the armor of Scourge lords, Ormus.', 3, 128, 0, 0, 0, 0, ''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10996 AND `SourceEntry`=5; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10996, 5, 0, 0, 15, 0, 32, 0, 0, 0, 0, 0, '', 'Ormus the Penitent - Show gossip option if player is a Death Knight'); -- cgit v1.2.3 From 7f42a68c14a721033908ed4855f9aa2afea94cbe Mon Sep 17 00:00:00 2001 From: Filip Date: Sat, 5 Oct 2013 22:35:51 +0200 Subject: DB/SAI: Blighted last rites By @dr-j fixes #9172 --- sql/updates/world/2013_10_05_00_world_sai.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/2013_10_05_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_10_05_00_world_sai.sql b/sql/updates/world/2013_10_05_00_world_sai.sql new file mode 100644 index 00000000000..c76916ee053 --- /dev/null +++ b/sql/updates/world/2013_10_05_00_world_sai.sql @@ -0,0 +1,9 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=48188; + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 48188, 0, 0, 31, 0, 3, 27349, 0, 0, 0, 0, '', 'Flask of Blight Targets Scarlet Onslaught Prisoner'); + +DELETE FROM `disables` WHERE `sourceType`=0 AND `entry`=48188; + +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(0, 48188, 64, '', '', 'Ignore LOS on Flask of Blight'); -- cgit v1.2.3 From f2ba8ed34b6799afe637709b85f6f3a3f7e9313e Mon Sep 17 00:00:00 2001 From: Filip Date: Sun, 6 Oct 2013 18:16:00 +0200 Subject: DB/SAI: The Final Code By @dr-j fixes #3640 --- sql/updates/world/2013_10_06_00_world_sai.sql | 105 ++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 sql/updates/world/2013_10_06_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_10_06_00_world_sai.sql b/sql/updates/world/2013_10_06_00_world_sai.sql new file mode 100644 index 00000000000..7891f9741e6 --- /dev/null +++ b/sql/updates/world/2013_10_06_00_world_sai.sql @@ -0,0 +1,105 @@ +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry`=184725; +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(21039,21898,20767,21504) ; + +DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=184725; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`IN(21039,21898,20767,21504); +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=2103900; +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 +(184725, 1, 0 ,1, 70, 0, 100, 0, 2, 0, 0,0,45,1,1,0,0,0,0,10,73864,21039,0,0,0,0,0, 'Mana Bomb - On State Changed - Set Data Mana Bomb Kill Credit Trigger'), +(184725, 1, 1 ,2, 61, 0, 100, 0, 0, 0, 0,0,33,21039,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Mana Bomb - Linked with Previous Event - Quest Credit'), +(184725, 1, 2 ,0, 61, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,16769,0,50,0,0,0,0, 'Mana Bomb - Linked with Previous Event - Set Data'), +-- +(21039, 0, 0 ,1, 38, 0, 100, 0, 1, 1, 0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Data Set - Set Data'), +(21039, 0, 1 ,2, 61, 0, 100, 0, 0, 0, 0,0,1,0,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Say'), +(21039, 0, 2 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 3 ,4, 52, 0, 100, 0, 0, 21039, 0,0,1,1,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Say'), +(21039, 0, 4 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 5 ,6, 52, 0, 100, 0, 1, 21039, 0,0,1,2,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over Event - Say'), +(21039, 0, 6 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 7 ,8, 52, 0, 100, 0, 2, 21039, 0,0,1,3,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Say'), +(21039, 0, 8 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +(21039, 0, 9 ,10, 52, 0, 100, 0, 3, 21039, 0,0,1,4,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Say'), +(21039, 0, 10 ,0, 61, 0, 100, 0, 0, 0, 0,0,80,2103900,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Kill Credit Trigger - Linked with Previous Event - Run Script'), +-- +(21039, 0, 12 ,0, 52, 0, 100, 0, 4, 21039, 0,0,45,1,1,0,0,0,0,9,20767,0,200,0,0,0,0, 'Mana Bomb Kill Credit Trigger - On Text Over - Set Data Mana Bomb Explosion Trigger'), +(20767, 0, 0 ,1, 38, 0, 100, 0, 1, 1, 0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Explosion Trigger - On Data Set - Set Data'), +(20767, 0, 1 ,2, 61, 0, 100, 0, 0, 0, 0,0,11,35513,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Mana Bomb Explosion Trigger - Linked with Previous Event - Cast Mana Bomb Explosion'), +-- +(21898, 0, 0 ,1, 38, 0, 100, 0, 1, 1, 0,0,45,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Mana Bomb Lightning Trigger - On Data Set - Set Data'), +(21898, 0, 1 ,0, 61, 0, 100, 0, 0, 0, 0,0,11,37843,0,0,0,0,0,9,21899,0,200,0, 0, 0, 0, 'Mana Bomb Lightning Trigger - Linked with Previous Event - Cast Mana Bomb Lightning'), +(2103900, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,9,21898,0,200,0, 0, 0, 0, 'Mana Bomb - Script - Set Data'); + + +DELETE FROM `creature_text` WHERE `entry` IN(21039,18554,16769); +DELETE FROM `creature_text` WHERE `entry` =21504 AND `groupid`>3; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(21039,0,0,'5...',41,0,100,0,0,0,'Mana Bomb'), +(21039,1,0,'4...',41,0,100,0,0,0,'Mana Bomb'), +(21039,2,0,'3...',41,0,100,0,0,0,'Mana Bomb'), +(21039,3,0,'2...',41,0,100,0,0,0,'Mana Bomb'), +(21039,4,0,'1...',41,0,100,0,0,0,'Mana Bomb'), +(18554,0,0,'You come into my house and threaten ME? I think not!',12,0,100,0,0,0,'Sharth Voldoun'), +(18554,1,0,'All goes exceedingly well, my lord. Testing of the smaller prototype at the Cenarion Thicket was a complete success. The second bomb is being ritually fueled in the courtyard below even as we speak. And, I''ve sent a courier to Tuurem to bring the rest of the parts to us here.',12,0,100,0,0,0,'Sharth Voldoun'), +(18554,2,0,'You are satisfied?',12,0,100,0,0,0,'Sharth Voldoun'), +(18554,3,0,'I can assure you that we will not fail, my master. I am personally overseeing every aspect of the construction, and I hold the final codes, myself. Within a day''s time, I will have the bomb detonated on those nearby pests.',12,0,100,0,0,0,'Sharth Voldoun'), +(16769,0,0,'Knowing there isn''t enough time, the Firewing Warlock doesn''t even try to run.', 16,0,100,0,0,0,'Firewing Warlock'), +-- +(21504,4,0,'For the time being, yes. However, allow my presence to be a motivator. Prince Kael''thas was displeased with the failure of the crystal experiment on Fallen Sky Ridge. This is one of the reasons for why we chose the Cenarion druids as the testing grounds for the bomb.',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,5,0,'I need not tell you what will happen should the mana bomb down in the courtyard fail to be used on its target soon? Since moving into the forest, they''ve become increasingly annoying to our operations: here, at Tuurem and to the south at the Bonechewer Ruins.',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,6,0,'I think that we should teach a lesson to both the Horde and the Alliance. One that they will not soon forget!',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,7,0,'See to it that you do, Sharth, or I will personally see to your slow torture and death.',12,0,100,0,0,0,'Pathaleon the Calculators Image'), +(21504,8,0,'I believe I may recognize them. Deal with this quickly, Sharth. Then take the mana bomb and destroy their town!',12,0,100,0,0,0,'Pathaleon the Calculators Image'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=35958; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 3, 35958, 0, 0, 31, 0, 3, 16769, 0, 0, 0, '','Mana Bomb Explosion Targets Firewing Warlock'), +(13, 3, 35958, 0, 1, 31, 0, 3, 5355, 0, 0, 0, '','Mana Bomb Explosion Targets Firewing Defender'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 18554; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=18554; +DELETE FROM `smart_scripts` WHERE `entryorguid`=18554; +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 +(21504,0,0,0,38,0,100,0,1,1,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Pathaleon the Calculators Image - On Data Set - Despawn'), +-- +(18554,0,0,0,0,0,100,0,3000,5000,40000,45000,11,15277,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - IC - Cast Seal of Reckoning'), +(18554,0,1,0,2,0,100,0,0,40,15000,20000,11,13952,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Below 40% HP - Cast Holy Light'), +(18554,0,2,3,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,2000,0,0,0,0,0, 'Sharth Voldoun - On Agro - Say'), +(18554,0,3,4,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - Linked with Previous Event - Despawn Pathaleon the Calculators Image'), +(18554,0,4,0,61,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - Linked with Previous Event - Set Phase 0'), +-- +(18554,0,5,6,25,0,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Reset - Set Phase 2'), +(18554,0,6,0,61,0,100,0,0,0,0,0,12,21504,8,0,0,0,0,8,0,0,0,-2281.936523,3099.178711,152.817734,3.699372, 'Sharth Voldoun - Linked with Previous Event - Spawn Pathaleon the Calculators Image'), +(18554,0,7,0,10,2,100,0,1,200,60000,60000,1,1,6000,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - Linked with Previous Event - Spawn Pathaleon the Calculators Image'), +(18554,0,8,0,52,2,100,0,1,18554,0,0,1,2,3000,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,9,0,52,2,100,0,2,18554,0,0,1,4,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,10,0,52,2,100,0,4,21504,0,0,1,5,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,11,0,52,2,100,0,5,21504,0,0,1,6,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,12,0,52,2,100,0,6,21504,0,0,1,3,6000,0,0,0,0,1,0,0,0,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,13,0,52,2,100,0,3,18554,0,0,1,7,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'), +(18554,0,14,0,52,0,100,0,0,18554,0,0,1,8,6000,0,0,0,0,9,21504,0,200,0,0,0,0, 'Sharth Voldoun - On Text Over Event - Say'); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`= 16769; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=16769; +DELETE FROM `smart_scripts` WHERE `entryorguid`=16769; +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 +(16769,0,0,0,25,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Reset - Prevent Combat Movement'), +(16769,0,1,2,4,0,100,0,0,0,0,0,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On Agro - Cast Shadow Bolt'), +(16769,0,2,0,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - Linked with Previous Event - Set Phase 1'), +(16769,0,3,0,9,1,100,0,0,40,2400,3800,11,9613,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Cast Shadow Bolt'), +(16769,0,4,5,3,1,100,0,0,15,0,0,21,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On Less than 15% Mana - Allow Combat Movement'), +(16769,0,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - Linked with Previous Event - Set Phase 2'), +(16769,0,6,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Allow Combat Movement'), +(16769,0,7,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Prevent Combat Movement'), +(16769,0,8,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Range - Allow Combat Movement'), +(16769,0,9,0,3,2,100,0,30,0,0,0,22,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Firewing Warlock - On More than 30% Mana - Set Phase 1'), +(16769,0,10,0,0,0,100,0,5000,9000,25000,35000,11,33483,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - IC - Cast Mana Tap'), +(16769,0,11,0,0,0,100,0,9000,15000,15000,20000,11,33390,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Firewing Warlock - IC - Cast Arcane Torrent'), +(16769,0,12,0,0,0,100,0,3000,5000,18000,24000,11,11962,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Firewing Warlock - IC - Cast Immolate'), +(16769,0,13,0,2,0,100,1,0,30,0,0,11,32932,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Less than 30% HP - Cast Sun Shield'), +(16769,0,14,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Less than 15% HP - Flee for Assist'), +(16769,0,15,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Evade - Set Phase 0'), +(16769,0,16,0,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Firewing Warlock - On Data Set - Say'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=16769; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 17, 16769, 0, 0, 36, 1, 0, 0, 0, 0, 0, '','Only execute SAI if firewing warlock alive'); -- cgit v1.2.3 From 24136b00c68a697e667e825e820775263a1488c4 Mon Sep 17 00:00:00 2001 From: Filip Date: Mon, 7 Oct 2013 10:05:04 +0200 Subject: DB/Quest: Once More Unto The Breach, Hero progression By @dr-j fixes #10940 --- sql/updates/world/2013_10_07_00_world_cond.sql | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/updates/world/2013_10_07_00_world_cond.sql (limited to 'sql') diff --git a/sql/updates/world/2013_10_07_00_world_cond.sql b/sql/updates/world/2013_10_07_00_world_cond.sql new file mode 100644 index 00000000000..3d84c4e8496 --- /dev/null +++ b/sql/updates/world/2013_10_07_00_world_cond.sql @@ -0,0 +1,22 @@ +UPDATE `quest_template` SET `ExclusiveGroup`=13104 WHERE `Id` IN (13104,13105); +UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`IN (13110,13122,13118,13125); +UPDATE `quest_template` SET `RequiredClasses`=1503 WHERE `Id`=13104; +UPDATE `quest_template` SET `RequiredClasses`=32 WHERE `Id`=13105; +DELETE FROM `conditions` WHERE `SourceEntry` IN (13122,13110,13118,13125); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(20, 0, 13110, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(19, 0, 13110, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(20, 0, 13110, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(19, 0, 13110, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Restless Dead after Once More Unto The Breach, Hero'), +(20, 0, 13122, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(19, 0, 13122, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(20, 0, 13122, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(19, 0, 13122, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Scourgestone after Once More Unto The Breach, Hero'), +(20, 0, 13118, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(19, 0, 13118, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(20, 0, 13118, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(19, 0, 13118, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Purging Of Scourgeholme after Once More Unto The Breach, Hero'), +(20, 0, 13125, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'), +(19, 0, 13125, 0, 0, 8, 0, 13104, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'), +(20, 0, 13125, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'), +(19, 0, 13125, 0, 1, 8, 0, 13105, 0, 0, 0, 0, '', 'The Air Stands Still after Once More Unto The Breach, Hero'); -- cgit v1.2.3 From c8f525c76e162b5b546c91628a1457f9aef43699 Mon Sep 17 00:00:00 2001 From: Filip Date: Mon, 7 Oct 2013 10:17:44 +0200 Subject: DB/SAI: The Great Hunter's Challenge By @Polkic fixes #11003 --- sql/updates/world/2013_10_07_01_world_sai.sql | 70 +++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 sql/updates/world/2013_10_07_01_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2013_10_07_01_world_sai.sql b/sql/updates/world/2013_10_07_01_world_sai.sql new file mode 100644 index 00000000000..3037ad434ce --- /dev/null +++ b/sql/updates/world/2013_10_07_01_world_sai.sql @@ -0,0 +1,70 @@ +-- Shattertusk Bull +SET @ENTRY := 28380; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28380; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +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 +(@ENTRY,@SOURCETYPE,0,0,0,0,100,0,2000,5000,5000,8000,11,51944,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Shattertusk Bull - In Combat - Cast Trample"), +(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,7000,10000,13000,16000,11,55196,1,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Shattertusk Bull - In Combat - Cast Stomp"); + +-- Dreadsaber +SET @ENTRY := 28001; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28001; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +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 +(@ENTRY,@SOURCETYPE,0,0,0,0,100,0,3000,6000,5000,7000,11,24187,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Dreadsaber - In Combat - Cast Claw"); + +-- Shardhorn Rhino +SET @ENTRY := 28009; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28009; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +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 +(@ENTRY,@SOURCETYPE,0,0,4,0,100,0,0,0,0,0,11,55193,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Shardhorn Rhino - On Aggro - Cast Rhino Charge"), +(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,5000,9000,7000,12000,11,32019,32,0,0,0,0,4,0,0,0,0.0,0.0,0.0,0.0,"Shardhorn Rhino - In Combat - Cast Gore"); + +-- Shango +SET @ENTRY := 28297; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28297; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +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 +(@ENTRY,@SOURCETYPE,0,0,0,0,100,0,5000,9000,7000,12000,11,32019,32,0,0,0,0,4,0,0,0,0.0,0.0,0.0,0.0,"Shango - In Combat - Cast Gore"); + +-- Mangal Crocolisk +SET @ENTRY := 28002; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28002; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +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 +(@ENTRY,@SOURCETYPE,0,0,4,0,100,0,0,0,0,0,11,50502,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Mangal Crocolisk - On Aggro - Cast Thick Hide"), +(@ENTRY,@SOURCETYPE,1,0,0,0,100,0,3000,6000,6000,9000,11,48287,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Mangal Crocolisk - In Combat - Cast Powerfull Bite"); + +-- Emperor Cobra +SET @ENTRY := 28011; +SET @SOURCETYPE := 0; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=28011; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE; +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry=@ENTRY; +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 +(@ENTRY,@SOURCETYPE,0,1,1,0,100,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - On Spawn - Prevent Combat"), +(@ENTRY,@SOURCETYPE,1,0,61,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Link - Set Phase to 0 on Spawn"), +(@ENTRY,@SOURCETYPE,2,3,4,0,100,0,0,0,0,0,11,32093,0,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - On Aggro - Cast Poison"), +(@ENTRY,@SOURCETYPE,3,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - On Link - Set Phase 1"), +(@ENTRY,@SOURCETYPE,4,0,9,1,100,0,0,40,3400,4800,11,32093,32,0,0,0,0,2,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Cast Poison Spit (Phase 1)"), +(@ENTRY,@SOURCETYPE,5,0,9,1,100,0,35,80,0,0,21,1,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Start Combat Movement at 35 Yards (Phase 1)"), +(@ENTRY,@SOURCETYPE,6,0,9,1,100,0,5,15,0,0,21,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Prevent Combat Movement at 15 Yards (Phase 1)"), +(@ENTRY,@SOURCETYPE,7,0,9,1,100,0,0,5,0,0,21,1,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Start Combat Movement Below 5 Yards (Phase 1)"), +(@ENTRY,@SOURCETYPE,8,0,7,0,100,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0.0,0.0,0.0,0.0,"Emperor Cobra - Set Phase to 0 on Evade"); -- cgit v1.2.3