diff options
29 files changed, 963 insertions, 26 deletions
diff --git a/sql/updates/world/2011_11_20_00_world_command.sql b/sql/updates/world/2011_11_20_00_world_command.sql new file mode 100644 index 00000000000..73d52974766 --- /dev/null +++ b/sql/updates/world/2011_11_20_00_world_command.sql @@ -0,0 +1 @@ +UPDATE `command` SET `help`='Syntax: .tele name [#playername] #location\n\nTeleport the given character to a given location. Character can be offline.\n\nTo teleport to homebind, set #location to "$home" (without quotes).' WHERE `name` = 'tele name'; diff --git a/sql/updates/world/2011_11_20_01_world_sai.sql b/sql/updates/world/2011_11_20_01_world_sai.sql new file mode 100644 index 00000000000..dbb4f39a499 --- /dev/null +++ b/sql/updates/world/2011_11_20_01_world_sai.sql @@ -0,0 +1,45 @@ +-- [Q] Laying Waste to the Unwanted + +-- Invis Horde Siege Engine - West SAI +SET @ENTRY := 19009; +SET @SPELL_IGNITE_SIEGE := 32979; +SET @SPELL_HELLFIRE_FIRE := 34386; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature` SET `position_x`=-183.947998,`position_y`=2773.389893,`position_z`=49.198399 WHERE `guid`=68321 AND `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West - On Spellhit - Cast Create Hellfire Fire"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West - On Spellhit - Quest Credit"); + +-- Invis Horde Siege Engine - West 02 SAI +SET @ENTRY := 21236; +SET @SPELL_IGNITE_SIEGE := 32979; +SET @SPELL_HELLFIRE_FIRE := 34386; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature` SET `position_z`=43.094120 WHERE `guid`=74454 AND `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West 02 - On Spellhit - Cast Create Hellfire Fire"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - West 02 - On Spellhit - Quest Credit"); + +-- Invis Horde Siege Engine - East SAI +SET @ENTRY := 21237; +SET @SPELL_IGNITE_SIEGE := 32979; +SET @SPELL_HELLFIRE_FIRE := 34386; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature` SET `position_x`=-157.329712,`position_y`=2518.655273,`position_z`=58.221237 WHERE `guid`=67186 AND `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East - On Spellhit - Cast Create Hellfire Fire"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East - On Spellhit - Quest Credit"); + +-- Invis Horde Siege Engine - East 02 SAI +SET @ENTRY := 18818; +SET @SPELL_IGNITE_SIEGE := 32979; +SET @SPELL_HELLFIRE_FIRE := 34386; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature` SET `position_x`=-152.163116,`position_y`=2662.497314,`position_z`=60.728378 WHERE `guid`=74455 AND `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,8,0,100,0,@SPELL_IGNITE_SIEGE,0,60000,60000,11,@SPELL_HELLFIRE_FIRE,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East 02 - On Spellhit - Cast Create Hellfire Fire"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,@ENTRY,0,0,0,0,0,1,0,0,0,0,0,0,0,"Invis Horde Siege Engine - East 02 - On Spellhit - Quest Credit"); diff --git a/sql/updates/world/2011_11_20_02_world_sai.sql b/sql/updates/world/2011_11_20_02_world_sai.sql new file mode 100644 index 00000000000..f064aa67f9f --- /dev/null +++ b/sql/updates/world/2011_11_20_02_world_sai.sql @@ -0,0 +1,45 @@ +-- [Q] Fel Spirits + +-- Port Fel Spirit's EAI to creature_template_addon +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=22454; +DELETE FROM `creature_template_addon` WHERE `entry`=22454; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (22454,0,0,1,0,"39205"); +UPDATE `creature_template` SET `AIName`='',`unit_flags`=32768,`baseattacktime`=2000 WHERE `entry`=22454; + +-- Shattered Hand Berserker SAI +SET @ENTRY := 16878; +SET @SPELL_CHARGE := 35570; +SET @SPELL_ENRAGE := 8599; +SET @SPELL_SUMMON := 39206; +SET @SPELL_CONTRITION := 39184; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,4,0,100,0,0,0,0,0,11,@SPELL_CHARGE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Aggro - Cast Charge"), +(@ENTRY,0,1,0,8,0,100,0,@SPELL_CONTRITION,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Spellhit - Set Phase 1"), +(@ENTRY,0,2,0,6,1,100,0,0,0,0,0,11,@SPELL_SUMMON,2,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Hand Berserker - On Death (P1) - Cast Summon Fel Spirit"), +(@ENTRY,0,3,4,2,0,100,1,0,30,0,0,11,@SPELL_ENRAGE,1,0,0,0,0,1,0,0,0,0,0,0,0,"Shattered Hand Berserker - At 30% HP - Cast Enrage"), +(@ENTRY,0,4,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Shattered Hand Berserker - At 30% HP - Say Line 0"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"%s becomes enraged!",16,0,100,0,0,0,"Shattered Hand Berserker"); + +-- Anchorite Relic Bunny SAI +SET @ENTRY := 22444; +SET @SPELL_CONTRITION := 39184; +UPDATE `creature_template` SET `AIName`='SmartAI',`exp`=2,`minlevel`=35,`maxlevel`=35,`baseattacktime`=2000,`unit_flags`=`unit_flags`|2048 WHERE `entry`=@ENTRY; +DELETE FROM `creature_template_addon` WHERE `entry`=@ENTRY; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (@ENTRY,0,0,1,0, NULL); +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,54,0,100,0,0,0,0,0,21,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anchorite Relic Bunny - Just Summoned - Prevent Combat Movemenet"), +(@ENTRY,0,1,0,60,0,100,0,1000,3000,15000,20000,11,@SPELL_CONTRITION,0,0,0,0,0,11,16878,0,0,0,0,0,0,"Anchorite Relic Bunny - On Update - Cast Anchorite Contrition"); + +-- Condition for spell Anchorite Contrition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (@SPELL_CONTRITION,@SPELL_SUMMON); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,@SPELL_CONTRITION,0,18,1,16878,0,0,'',"Spell Anchorite Contrition targets Shattered Hand Berserker"), +(13,0,@SPELL_SUMMON,0,18,1,22444,0,0,'',"Spell Summon Fel Spirit targets Anchorite Relic Bunny"); diff --git a/sql/updates/world/2011_11_20_03_world_sai.sql b/sql/updates/world/2011_11_20_03_world_sai.sql new file mode 100644 index 00000000000..bd47430acd8 --- /dev/null +++ b/sql/updates/world/2011_11_20_03_world_sai.sql @@ -0,0 +1,49 @@ +-- [Q] Hard to Swallow + +-- Hulking Jormungar SAI +SET @ENTRY := 26293; +SET @SPELL_CORROSIVE_POISON := 50293; +SET @SPELL_GRENADE := 47305; +SET @SPELL_EXPLOSION := 47311; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1); +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,0,0,0,0,0,100,0,6000,7000,11000,13000,11,@SPELL_CORROSIVE_POISON,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hulking Jormungar - In Combat - Cast Corrode Flesh"), +(@ENTRY,0,1,0,2,0,100,1,0,80,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - At 80% HP - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Say Line 0"), +(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Set Phase 1"), +(@ENTRY*100,9,2,0,0,0,100,0,5000,5000,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Set Phase 0"), +(@ENTRY,0,2,0,8,1,100,0,@SPELL_GRENADE,0,0,0,80,@ENTRY*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Spellhit (P1) - Run Script"), +(@ENTRY*100+1,9,0,0,0,0,100,0,3000,3000,0,0,11,@SPELL_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Cast Quest - Jormungar Explosion Spell Spawner"), +(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Hulking Jormungar - On Script - Die"); + +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"The Hulking Jormungar falters for a moment, opening its mouth wide.",41,0,100,0,0,0,"Hulking Jormungar"); + +-- Potent Explosive Charge conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_GRENADE; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,0,@SPELL_GRENADE,0,18,1,@ENTRY,0,0,'',"Potent Explosive Charge only targets Hulking Jormungar"), +(13,0,@SPELL_GRENADE,0,20,80,0,0,0,'',"Potent Explosive Charge requires target to be below 80% HP"); + +-- Quest - Jormungar Explosion Spell Spawner triggers the meat throw spells +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=@SPELL_EXPLOSION; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(@SPELL_EXPLOSION,47925,0,"Quest - Jormungar Explosion Spell Spawner triggers Quest - Jormungar Explosion Summon Object"), +(@SPELL_EXPLOSION,47924,0,"Quest - Jormungar Explosion Spell Spawner triggers Quest - Jormungar Explosion Summon Object"), +(@SPELL_EXPLOSION,47309,0,"Quest - Jormungar Explosion Spell Spawner triggers Quest - Jormungar Explosion Summon Object"); + +-- Jormungar Meat SAI +SET @ENTRY := 26699; +UPDATE `creature_template` SET `AIname`='SmartAI',`unit_flags`=`unit_flags`|33554432,`flags_extra`=`flags_extra`|128 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,54,0,100,0,0,0,0,0,50,188434,120000,0,0,0,0,1,0,0,0,0,0,0,0,"Jormungar Meat - Just Summoned - Summon Jormungar Meat"); + +-- Give Jormungar Meat quest item loot +DELETE FROM `gameobject_loot_template` WHERE `entry`=23442; +INSERT INTO `gameobject_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(23442,36731,-100,1,0,1,1); diff --git a/sql/updates/world/2011_11_20_04_world_sai.sql b/sql/updates/world/2011_11_20_04_world_sai.sql new file mode 100644 index 00000000000..e362b0d0866 --- /dev/null +++ b/sql/updates/world/2011_11_20_04_world_sai.sql @@ -0,0 +1,24 @@ +-- [Q] The Might of the Horde + +-- Warsong Battle Standard SAI +SET @ENTRY := 26678; +SET @QUEST := 12053; +UPDATE `creature_template` SET `AIName`='SmartAI',`minlevel`=70,`maxlevel`=71,`exp`=1 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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,0,0,0,1,0,100,1,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Spawn - Set React State Passive"), -- We shouldn't EVER attack back or move +(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,6,@QUEST,0,0,0,0,0,23,0,0,0,0,0,0,0,"Warsong Battle Standard - On Death - Fail Quest"), +(@ENTRY,0,2,0,54,0,100,0,0,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - Just Summoned - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,5000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"), +(@ENTRY*100,9,1,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"), +(@ENTRY*100,9,2,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"), +(@ENTRY*100,9,3,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"), +(@ENTRY*100,9,4,0,0,0,100,0,8000,15000,0,0,12,26676,1,30000,0,0,0,1,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Summon Anub'ar Invader"), +(@ENTRY*100,9,5,0,0,0,100,0,4000,4000,0,0,15,@QUEST,0,0,0,0,0,23,0,0,0,0,0,0,0,"Warsong Battle Standard - On Script - Quest Credit"); + +-- Anub'ar Invader SAI +SET @ENTRY := 26676; +UPDATE `creature_template` SET `AIName`='SmartAI',`faction_A`=2018,`faction_H`=2018 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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,0,0,0,54,0,100,1,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,"Anub'ar Invader - Just Summoned - Attack Summoner"); diff --git a/sql/updates/world/2011_11_20_05_world_sai.sql b/sql/updates/world/2011_11_20_05_world_sai.sql new file mode 100644 index 00000000000..464d0635bb8 --- /dev/null +++ b/sql/updates/world/2011_11_20_05_world_sai.sql @@ -0,0 +1,78 @@ +-- [Q] Jack Likes His Drink +-- We are making Jack dance through SAI instead of creature(_template)_addon so we can cancel it in the actual SAI + +-- Olga, the Scalawag Wench SAI +SET @ENTRY_OLGA := 24639; +SET @ENTRY_JACK := 24788; +SET @GOSSIP := 9015; +SET @QUEST := 11466; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@ENTRY_OLGA,@ENTRY_JACK); +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP+10 WHERE `entry`=@ENTRY_JACK; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_OLGA,@ENTRY_OLGA*100,@ENTRY_OLGA*100+1,@ENTRY_OLGA*100+2,@ENTRY_JACK,@ENTRY_JACK*100); +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_OLGA,0,0,0,62,0,100,0,@GOSSIP+1,0,0,0,80,@ENTRY_OLGA*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Gossip Select - Run Script"), +(@ENTRY_OLGA*100,9,0,0,0,0,100,0,0,0,0,0,53,0,@ENTRY_OLGA,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Start WP"), +(@ENTRY_OLGA*100,9,1,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Close Gossip"), +(@ENTRY_OLGA*100,9,2,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Whisper Line 0"), +(@ENTRY_OLGA*100,9,3,0,0,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script - Remove Gossip Flag"), + +(@ENTRY_OLGA,0,1,0,40,0,100,0,2,@ENTRY_OLGA,0,0,80,@ENTRY_OLGA*100+1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On WP 2 - Run Script 2"), +(@ENTRY_OLGA*100+1,9,0,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,11,@ENTRY_JACK,15,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Face Jack Adams"), +(@ENTRY_OLGA*100+1,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Say Line 1"), +(@ENTRY_OLGA*100+1,9,2,0,0,0,100,0,3000,3000,0,0,45,1,1,0,0,0,0,19,@ENTRY_JACK,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Set Data 1 1 Jack Adams"), +(@ENTRY_OLGA*100+1,9,3,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Say Line 2"), +(@ENTRY_OLGA*100+1,9,4,0,0,0,100,0,4000,4000,0,0,45,2,2,0,0,0,0,19,@ENTRY_JACK,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Script 2 - Set Data 2 2 Jack Adams"), +(@ENTRY_OLGA,0,2,0,38,0,100,0,3,3,0,0,53,0,@ENTRY_OLGA*10,0,0,0,0,1,0,0,0,0,0,0,0,"Olga, the Scalawag Wench - On Data 3 3 Set - Start WP 2"), + +(@ENTRY_JACK,0,0,0,1,0,100,1,0,0,0,0,5,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - Out of Combat - Start Dancing"), +(@ENTRY_JACK,0,1,2,38,0,100,0,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Data 1 1 Set - Say Line 0"), +(@ENTRY_JACK,0,2,0,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Data 1 1 Set - Set Faction 35"), +(@ENTRY_JACK,0,3,4,62,0,100,0,@GOSSIP+10,0,0,0,56,34116,1,0,0,0,0,7,0,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Give Quest Item"), +(@ENTRY_JACK,0,4,5,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Close Gossip"), +(@ENTRY_JACK,0,5,6,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Remove Gossip Flag"), -- To prevent getting more than one item per event +(@ENTRY_JACK,0,6,0,61,0,100,0,0,0,0,0,45,3,3,0,0,0,0,19,@ENTRY_OLGA,0,0,0,0,0,0,"Jack Adams - On Gossip Select - Set Data Olga, the Scalawag Wench"), + +(@ENTRY_JACK,0,7,0,38,0,100,0,2,2,0,0,80,@ENTRY_JACK*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Data 2 2 Set - Run Script"), +(@ENTRY_JACK*100,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Say Line 1"), +(@ENTRY_JACK*100,9,1,0,0,0,100,0,0,0,0,0,5,26,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Stop Dancing"), +(@ENTRY_JACK*100,9,2,0,0,0,100,0,2000,2000,0,0,5,16,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - EMOTE_ONESHOT_KNEEL"), +(@ENTRY_JACK*100,9,3,0,0,0,100,0,4000,4000,0,0,5,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - EMOTE_ONESHOT_EAT"), +(@ENTRY_JACK*100,9,4,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Say Line 2"), +(@ENTRY_JACK*100,9,5,0,0,0,100,0,4000,4000,0,0,11,43391,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Cast Vomit"), +(@ENTRY_JACK*100,9,6,0,0,0,100,0,3000,3000,0,0,11,29266,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Cast Permanent Feign Death"), +(@ENTRY_JACK*100,9,7,0,0,0,100,0,0,0,0,0,81,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Add Gossip Flag"), +(@ENTRY_JACK*100,9,8,0,0,0,100,0,0,0,0,0,41,30000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jack Adams - On Script - Forced Despawn"); + +-- Texts +DELETE FROM `creature_text` WHERE `entry` IN (@ENTRY_OLGA,@ENTRY_JACK); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY_OLGA,0,0,"Keep quiet, will you? If anyone catches on, we're both dead.",15,0,100,0,0,0,"Olga, the Scalawag Wench"), +(@ENTRY_OLGA,1,0,"All right, fellas! Who ordered the spiced rum? Was it you, Jackie boy?",12,0,100,0,0,0,"Olga, the Scalawag Wench"), +(@ENTRY_OLGA,2,0,"It's okay, sweetheart. This one's on the house.",12,0,100,0,0,0,"Olga, the Scalawag Wench"), + +(@ENTRY_JACK,0,0,"Sure thing, love. Put it on Harry's tab, will ya? He owes me a drink!",12,0,100,0,0,0,"Jack Adams"), +(@ENTRY_JACK,1,0,"Free rum? Why... that's me favorite kind!",12,0,100,0,0,0,"Jack Adams"), +(@ENTRY_JACK,2,0,"Sweet Neptulon! That was... one drink... too many!",12,0,100,0,0,0,"Jack Adams"); + +-- Insert option menu +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (@GOSSIP,@GOSSIP+1,@GOSSIP+10); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`box_money`,`box_text`) VALUES +(@GOSSIP+0,0,0,"I'd like to buy Jack a drink. Perhaps something... extra strong.",1,1,@GOSSIP+1,0,''), +(@GOSSIP+1,0,0,"Here's a gold, buy yourself something nice.",1,1,0,10000,'Do you really want to bribe Olga?'), +(@GOSSIP+10,0,0,"<Discreetly search the pirate's pockets for Taruk's payment.>",1,1,0,0,''); + +-- Waypoints for Olga, the Scalawag Wench +DELETE FROM `waypoints` WHERE `entry` IN (@ENTRY_OLGA,@ENTRY_OLGA*10); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY_OLGA,1,-89.466621,-3539.939941,7.715524,'Olga, the Scalawag Wench'), +(@ENTRY_OLGA,2,-86.451447,-3544.374268,7.716601,'Olga, the Scalawag Wench'), + +(@ENTRY_OLGA*10,1,-86.451447,-3544.374268,7.716601,'Olga, the Scalawag Wench'), +(@ENTRY_OLGA*10,2,-89.466621,-3539.939941,7.715524,'Olga, the Scalawag Wench'); + +-- Only show first gossip if player is on quest Gambling Debt +DELETE FROM `conditions` WHERE `SourceGroup` IN (@GOSSIP+0,@GOSSIP+10) AND `ConditionValue1` IN (@QUEST); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@GOSSIP+0,0,0,9,@QUEST,0,0,0,'',"Only show first gossip if player is on quest Gambling Debt"), + +(15,@GOSSIP+10,0,0,9,@QUEST,0,0,0,'',"Only show first gossip if player is on quest Gambling Debt"); diff --git a/sql/updates/world/2011_11_20_06_world_sai.sql b/sql/updates/world/2011_11_20_06_world_sai.sql new file mode 100644 index 00000000000..68bffade858 --- /dev/null +++ b/sql/updates/world/2011_11_20_06_world_sai.sql @@ -0,0 +1,57 @@ +-- Tapper Swindlekeg SAI +SET @ENTRY := 24711; +SET @SPELL_GROW := 50551; +SET @SPELL_DRINK := 50552; +SET @SPELL_FINISH := 50555; +SET @QUEST_DIRE_BREW := 12492; +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|2 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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,0,0,0,20,0,100,0,@QUEST_DIRE_BREW,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tapper Swindlekeg - On Quest Complete - Run Script"), +(@ENTRY*100+0,9,0,0,0,0,100,0,1500,1500,0,0,1,0,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 0"), +(@ENTRY*100+0,9,1,0,0,0,100,0,0,0,0,0,11,@SPELL_DRINK,0,0,0,0,0,0,1,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Cast Questgiver Tries Dire Brew"), +(@ENTRY*100+0,9,2,0,0,0,100,0,8500,8500,0,0,11,@SPELL_FINISH,0,0,0,0,0,0,1,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Cast Questgiver Finishes Drinking"), +(@ENTRY*100+0,9,3,0,0,0,100,0,0,0,0,0,28,@SPELL_GROW,0,0,0,0,0,0,1,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Remove Growth Aura"), +(@ENTRY*100+0,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 1"), +(@ENTRY*100+0,9,5,0,0,0,100,0,3500,3500,0,0,1,2,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 2"), +(@ENTRY*100+0,9,6,0,0,0,100,0,3500,3500,0,0,1,3,0,0,0,0,0,0,7,0,0,0,0,0,0,"Tapper Swindlekeg - On Script - Say Line 3"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Well time's money, and time's wasting! Let's have that drink...",12,0,100,1,0,0,"Tapper Swindlekeg"), +(@ENTRY,1,0,"Wow! This really greases the steamplugs!",12,0,100,1,0,0,"Tapper Swindlekeg"), +(@ENTRY,2,0,"If I were an honest goblin, I'd say this was the best beer of the festival...",12,0,100,1,0,0,"Tapper Swindlekeg"), +(@ENTRY,3,0,"Too bad Coren's dead. If I could buy that brew from him and resell it - watered down and rebottled under my own label, of course - I'd be rich!",12,0,100,1,0,0,"Tapper Swindlekeg"), +-- These three are used in areatrigger script +(@ENTRY,4,0,"Hey there, and welcome to Brewfest. Come in and have a drink or three!",12,1,100,3,0,0,"Tapper Swindlekeg"), +(@ENTRY,4,1,"What's up, friend? Welcome to the Brewfest Grounds! Now go buy some drinks!",12,1,100,3,0,0,"Tapper Swindlekeg"), +(@ENTRY,4,2,"Hey hey, it's another $r! Welcome to my annual Brewfest celebration... now go feast and drink some!",12,1,100,3,0,0,"Tapper Swindlekeg"); + +-- Ipfelkofer Ironkeg SAI +SET @ENTRY := 24710; +SET @SPELL_GROW := 50551; +SET @SPELL_DRINK := 50552; +SET @SPELL_FINISH := 50555; +SET @QUEST_DIRE_BREW := 12491; +UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|2 WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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,0,0,0,20,0,100,0,@QUEST_DIRE_BREW,0,0,0,80,@ENTRY*100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Quest Complete - Run Script"), +(@ENTRY*100+0,9,0,0,0,0,100,0,1500,1500,0,0,1,0,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 0"), +(@ENTRY*100+0,9,1,0,0,0,100,0,0,0,0,0,11,@SPELL_DRINK,0,0,0,0,0,0,1,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Cast Questgiver Tries Dire Brew"), +(@ENTRY*100+0,9,2,0,0,0,100,0,8500,8500,0,0,11,@SPELL_FINISH,0,0,0,0,0,0,1,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Cast Questgiver Finishes Drinking"), +(@ENTRY*100+0,9,3,0,0,0,100,0,0,0,0,0,28,@SPELL_GROW,0,0,0,0,0,0,1,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Remove Growth Aura"), +(@ENTRY*100+0,9,4,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 1"), +(@ENTRY*100+0,9,5,0,0,0,100,0,3500,3500,0,0,1,2,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 2"), +(@ENTRY*100+0,9,6,0,0,0,100,0,3500,3500,0,0,1,3,0,0,0,0,0,0,7,0,0,0,0,0,0,"Ipfelkofer Ironkeg - On Script - Say Line 3"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Right! Let's try this so-called dire brew...",12,0,100,0,0,0,"Ipfelkofer Ironkeg"), +(@ENTRY,1,0,"Bronzebeard's beard! What a drink!",12,0,100,0,0,0,"Ipfelkofer Ironkeg"), +(@ENTRY,2,0,"$N, this beer... well, it might be the best of Brewfest!",12,0,100,15,0,0,"Ipfelkofer Ironkeg"), +(@ENTRY,3,0,"It is a shame Coren's Dire Brew can't quench more thirsting throats! It's blasphemy, I know, but I envy those Dark Iron dwarves!",12,0,100,274,0,0,"Ipfelkofer Ironkeg"), +-- These three are used in areatrigger script +(@ENTRY,4,0,"Ho there, and welcome to Brewfest!",12,7,100,3,0,0,"Ipfelkofer Ironkeg"), +(@ENTRY,4,1,"Hello, friend! Welcome to the Brewfest Grounds!",12,7,100,3,0,0,"Ipfelkofer Ironkeg"), +(@ENTRY,4,2,"Hail, good $c! Welcome to Ironforge's annual Brewfest celebration!",12,7,100,3,0,0,"Ipfelkofer Ironkeg"); diff --git a/sql/updates/world/2011_11_20_07_world_sai.sql b/sql/updates/world/2011_11_20_07_world_sai.sql new file mode 100644 index 00000000000..efb89f6ba5a --- /dev/null +++ b/sql/updates/world/2011_11_20_07_world_sai.sql @@ -0,0 +1,212 @@ +-- [Q] [A/H] Ring of Blood +-- Gurghthock SAI +SET @ENTRY_GURTHOCK := 18471; +SET @ENTRY_BROKENTOE := 18398; +SET @ENTRY_TWIN := 18399; +SET @ENTRY_ROKDAR := 18400; +SET @ENTRY_SKRAGATH := 18401; +SET @ENTRY_WARMAUL := 18402; +SET @ENTRY_MOGOR := 18069; +SET @QUEST_BROKENTOE := 9962; +SET @QUEST_BLUE_BROTHERS := 9967; +SET @QUEST_ROKDAR := 9970; +SET @QUEST_SKRAGATH := 9972; +SET @QUEST_WARMAUL := 9973; +SET @QUEST_MOGOR := 9977; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY_GURTHOCK; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`SpecialFlags`=2 WHERE `entry` IN (@QUEST_BROKENTOE,@QUEST_BLUE_BROTHERS,@QUEST_ROKDAR,@QUEST_SKRAGATH,@QUEST_WARMAUL,@QUEST_MOGOR); +DELETE FROM `quest_start_scripts` WHERE `id` IN (@QUEST_BROKENTOE,@QUEST_BLUE_BROTHERS,@QUEST_ROKDAR,@QUEST_SKRAGATH,@QUEST_WARMAUL,@QUEST_MOGOR); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY_GURTHOCK,@ENTRY_GURTHOCK*100+0,@ENTRY_GURTHOCK*100+1,@ENTRY_GURTHOCK*100+2,@ENTRY_GURTHOCK*100+3,@ENTRY_GURTHOCK*100+4); +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_GURTHOCK,0,0,1,19,0,100,0,@QUEST_BROKENTOE,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"), +(@ENTRY_GURTHOCK,0,1,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+0,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"), +(@ENTRY_GURTHOCK,0,2,3,19,0,100,0,@QUEST_BLUE_BROTHERS,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"), +(@ENTRY_GURTHOCK,0,3,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"), +(@ENTRY_GURTHOCK,0,4,5,19,0,100,0,@QUEST_ROKDAR,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"), +(@ENTRY_GURTHOCK,0,5,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+2,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"), +(@ENTRY_GURTHOCK,0,6,7,19,0,100,0,@QUEST_SKRAGATH,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"), +(@ENTRY_GURTHOCK,0,7,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+3,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"), +(@ENTRY_GURTHOCK,0,8,9,19,0,100,0,@QUEST_WARMAUL,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 0"), +(@ENTRY_GURTHOCK,0,9,0,61,0,100,0,0,0,0,0,80,@ENTRY_GURTHOCK*100+4,0,2,0,0,0,1,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Run Script"), +(@ENTRY_GURTHOCK*100+0,9,0,0,0,0,100,0,13000,13000,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 1"), +(@ENTRY_GURTHOCK*100+0,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_BROKENTOE,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Brokentoe"), +(@ENTRY_GURTHOCK*100+1,9,0,0,0,0,100,0,13000,13000,0,0,1,3,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 3"), +(@ENTRY_GURTHOCK*100+1,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_TWIN,1,120000,0,0,0,8,0,0,0,-717.852356,7877.326660,45.547367,1.599185,"Gurghthock - On Script - Summon Murkblood Twin"), +(@ENTRY_GURTHOCK*100+1,9,2,0,0,0,100,0,0,0,0,0,12,@ENTRY_TWIN,1,120000,0,0,0,8,0,0,0,-695.944275,7880.357910,47.097507,2.084561,"Gurghthock - On Script - Summon Murkblood Twin"), +(@ENTRY_GURTHOCK*100+2,9,0,0,0,0,100,0,13000,13000,0,0,1,5,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 5"), +(@ENTRY_GURTHOCK*100+2,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_ROKDAR,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Rokdar the Sundered Lord"), +(@ENTRY_GURTHOCK*100+3,9,0,0,0,0,100,0,13000,13000,0,0,1,7,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 7"), +(@ENTRY_GURTHOCK*100+3,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_SKRAGATH,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Skra'gath"), +(@ENTRY_GURTHOCK*100+4,9,0,0,0,0,100,0,13000,13000,0,0,1,9,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurgthock - On Script - Say Line 9"), +(@ENTRY_GURTHOCK*100+4,9,1,0,0,0,100,0,5000,5000,0,0,12,@ENTRY_WARMAUL,1,120000,0,0,0,8,0,0,0,-704.669,7871.08,45.0387,1.59531,"Gurghthock - On Script - Summon Warmaul Champion"), +(@ENTRY_GURTHOCK,0,10,11,19,0,100,0,@QUEST_MOGOR,0,0,0,1,11,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Say Line 11"), +(@ENTRY_GURTHOCK,0,11,0,61,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@ENTRY_MOGOR,0,0,0,0,0,0,"Gurghthock - On Quest Accept - Set Data Mogor"), +(@ENTRY_GURTHOCK,0,12,0,38,0,100,0,10,10,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 2"), -- Brokentoe's death +(@ENTRY_GURTHOCK,0,13,0,38,0,100,0,11,11,0,0,1,4,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 4"), -- Murkblood Twins death +(@ENTRY_GURTHOCK,0,14,15,38,0,100,0,12,12,0,0,1,6,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 6"), -- Rokdar the Sundered Lord's death +(@ENTRY_GURTHOCK,0,15,0,61,0,100,0,0,0,0,0,45,12,12,0,0,0,0,19,18069,0,0,0,0,0,0,"Gurghthock - On Data Set - Set Data Mogor"), -- Rokdar the Sundered Lord's death +(@ENTRY_GURTHOCK,0,16,17,38,0,100,0,13,13,0,0,1,8,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 8"), -- Skra'gath's death +(@ENTRY_GURTHOCK,0,17,0,61,0,100,0,0,0,0,0,45,13,13,0,0,0,0,19,18069,0,0,0,0,0,0,"Gurghthock - On Data Set - Set Data Mogor"), -- Skra'gath's death +(@ENTRY_GURTHOCK,0,18,19,38,0,100,0,14,14,0,0,1,10,0,0,0,0,0,7,0,0,0,0,0,0,0,"Gurghthock - On Data Set - Say Line 10"), -- Warmaul Champion's death +(@ENTRY_GURTHOCK,0,19,0,61,0,100,0,0,0,0,0,45,14,14,0,0,0,0,19,18069,0,0,0,0,0,0,"Gurghthock - On Data Set - Set Data Mogor"); -- Warmaul Champion's death +-- Text +DELETE FROM `db_script_string` WHERE `entry` IN (2000000001,2000000002,2000000003,2000000102,2000000103,2000000104); +DELETE FROM `creature_text` WHERE `entry`=@ENTRY_GURTHOCK; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY_GURTHOCK,0,0,"Get in the Ring of Blood, $N. The fight is about to start!",12,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,1,0,"The battle is about to begin! $N versus the ferocious clefthoof, Brokentoe!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,2,0,"$N has defeated Brokentoe!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,3,0,"The battle is about to begin! The unmerciful Murkblood twins versus $N!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,4,0,"Unbelievable! $N has defeated the Murkblood Twins!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,5,0,"Hailing from the mountains of Blade's Edge comes Rokdar the Sundered Lord! $N is in for the fight of $g his:her; life.",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,6,0,"$N is victorious once more!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,7,0,"From parts unkown: Skra'gath! Can $N possibly survive the onslaught of void energies?",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,8,0,"$N is victorious once more!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,9,0,"This is the moment we've all been waiting for! The Warmaul champion is about to make $g his:her; first showing at the Ring of Blood in weeks! Will $N go down in defeat as easily as the champion's other opponents? We shall see...",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,10,0,"$N is victorious once more!",14,0,100,0,0,0,"Gurgthock"), +(@ENTRY_GURTHOCK,11,0,"Mogor has challenged you. You have to accept! Get in the ring if you are ready to fight.",12,0,100,0,0,0,"Gurgthock"); +-- Mogor SAI +SET @ENTRY := 18069; +SET @QUEST := 9977; +SET @SPELL_CHAIN_LIGHTNING := 16033; +SET @SPELL_FLAME_SHOCK := 39529; +SET @SPELL_HEALING_WAVE := 15982; +SET @SPELL_FRENZY := 28747; +SET @SPELL_REVIVE_SELF := 32343; +UPDATE `creature_template` SET `AIName`="SmartAI",`faction_A`=35,`faction_H`=35 WHERE `entry`=@ENTRY; +DELETE FROM `creature` WHERE `id`=@ENTRY; +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 +(1022681,@ENTRY,530,1,1,0,0,-714.823,7931.65,58.8672,4.3693,300,0,0,60720,29330,0,0,0,0); +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1); +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,0,0,0,0,0,100,0,1000,1000,3500,3500,11,@SPELL_CHAIN_LIGHTNING,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mogor - In Combat - Cast Chain Lightning"), +(@ENTRY,0,1,0,0,0,100,0,4000,4000,11000,13000,11,@SPELL_FLAME_SHOCK,0,0,0,0,0,2,0,0,0,0,0,0,0,"Mogor - In Combat - Cast Flame Shock"), +(@ENTRY,0,2,0,2,0,100,1,0,60,0,0,11,@SPELL_HEALING_WAVE,1,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At 60% HP - Cast Healing Wave"), +(@ENTRY,0,3,0,2,0,100,1,0,30,0,0,11,@SPELL_FRENZY,1,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At 30% HP - Cast Frenzy"), +(@ENTRY,0,4,0,2,0,100,1,0,30,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Mogor - At 30% HP - Say Line 0"), +(@ENTRY,0,5,0,6,0,100,1,0,0,0,0,80,@ENTRY*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Death - Run Script"), +(@ENTRY*100+1,9,0,0,0,0,100,0,2000,2000,0,0,11,@SPELL_REVIVE_SELF,2,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Cast Revive Self"), +(@ENTRY*100+1,9,1,0,0,0,100,0,1000,1000,0,0,70,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Revive Self"), +(@ENTRY*100+1,9,2,0,0,0,100,0,1000,1000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Say Line 5"), +(@ENTRY*100+1,9,3,0,0,0,100,0,500,500,0,0,49,0,0,0,0,0,0,21,0,0,0,0,0,0,0,"Mogor - On Script - Attack Closest Player"), +(@ENTRY,0,6,0,38,0,100,0,12,12,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 1"), -- Rokdar the Sundered Lord's death +(@ENTRY,0,7,0,38,0,100,0,13,13,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 2"), -- Skra'gath's death +(@ENTRY,0,8,0,38,0,100,0,14,14,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 6"), -- Warmaul Champion's death +(@ENTRY,0,9,10,38,0,100,0,1,1,0,0,53,0,@ENTRY,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Data Set - Start WP"), +(@ENTRY,0,10,0,61,0,100,0,0,0,0,0,1,3,0,0,0,0,0,7,0,0,0,0,0,0,0,"Mogor - On Data Set - Say Line 3"), +(@ENTRY,0,11,12,40,0,100,0,4,@ENTRY,0,0,54,100000,0,2,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At WP 4 - Pause Path"), +(@ENTRY,0,12,0,61,0,100,0,0,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Mogor - At WP 4 - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Say Line 4"), +(@ENTRY*100,9,1,0,0,0,100,0,5000,5000,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Set Faction Aggressive"), +(@ENTRY*100,9,2,0,0,0,100,0,9,9,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - On Script - Set React State Aggressive"), +(@ENTRY,0,13,0,21,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mogor - Reached Home - Set Faction Friendly"); -- To prevent issues =) +-- Waypoints +DELETE FROM `waypoints` WHERE `entry`=@ENTRY; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ENTRY,1,-715.036621,7922.948730,59.506184,"Mogor"), +(@ENTRY,2,-720.282532,7916.268066,57.146416,"Mogor"), +(@ENTRY,3,-724.706299,7909.140137,51.817696,"Mogor"), +(@ENTRY,4,-717.016479,7896.937500,48.460430,"Mogor"); +-- Texts +DELETE FROM `db_script_string` WHERE `entry` IN (2000000001,2000000002,2000000003); +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"%s goes into a frenzy!",16,0,100,0,0,0,"Mogor"), +(@ENTRY,1,0,"Dat was poop! Mogor could put up much better fight den dat!",14,0,100,0,0,0,"Mogor"), +(@ENTRY,2,0,"Mogor not impressed! Skra'gath wuz made of da air and shadow! Soft like da squishy orcies!",14,0,100,0,0,0,"Mogor"), +(@ENTRY,3,0,"Now you face da true champion! I give you chance to run away little one. Run away now before Mogor decim... destyor... Run away before Mogor KILL!",14,0,100,0,0,0,"Mogor"), +(@ENTRY,4,0,"No more chances! Now you pay da ogre!",14,0,100,15,0,0,"Mogor"), -- ONESHOT_ROAR +(@ENTRY,5,0,"No more nice ogre! You hurt Mogor!",14,0,100,0,0,0,"Mogor"), +(@ENTRY,6,0,"WUT!? UNPOSSIBLE!! You fight Mogor now! Mogor destroy!",14,0,100,0,0,0,"Mogor"); +-- Brokentoe SAI +SET @ENTRY := 18398; +SET @QUEST := 9962; +SET @SPELL_HOOF_STOMP := 32023; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,0,0,100,0,1000,1000,9000,11000,11,@SPELL_HOOF_STOMP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Brokentoe - In Combat - Cast Hoof Stomp"), +(@ENTRY,0,1,2,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Brokentoe - On Death - Give Quest Credit"), +(@ENTRY,0,2,0,61,0,100,1,0,0,0,0,45,10,10,0,0,0,0,19,18471,0,0,0,0,0,0,"Brokentoe - On Death - Set Data Gurghthock"); +-- Murkblood Twin SAI +SET @ENTRY := 18399; +SET @QUEST := 9967; +SET @SPELL_EVISCERATE := 15691; +SET @SPELL_MUTILATE := 32319; +SET @SPELL_SINISTER_STRIKE := 14873; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Murkblood Twin - On Aggro - Say Line 0"), +(@ENTRY,0,1,0,0,0,100,0,1000,1000,2000,2000,11,@SPELL_SINISTER_STRIKE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Murkblood Twin - In Combat - Cast Sinister Strike"), +(@ENTRY,0,2,0,0,0,100,0,5000,6000,11000,12000,11,@SPELL_EVISCERATE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Murkblood Twin - In Combat - Cast Eviscerate"), +(@ENTRY,0,3,0,0,0,100,0,8000,9000,15000,16000,11,@SPELL_MUTILATE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Murkblood Twin - In Combat - Cast Gouge"), +(@ENTRY,0,4,5,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Murkblood Twin - On Death - Give Quest Credit"), +(@ENTRY,0,5,0,61,0,100,1,0,0,0,0,45,11,11,0,0,0,0,19,18471,0,0,0,0,0,0,"Murkblood Twin - On Death - Set Data Gurghthock"); +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Blue brothers reign supreme!",12,0,100,0,0,0,"Murkblood Twin"); +-- Rokdar the Sundered Lord SAI +SET @ENTRY := 18400; +SET @QUEST := 9970; +SET @SPELL_WAR_STOMP := 16727; +SET @SPELL_PUNCTURE := 15976; +SET @SPELL_KNOCK_AWAY := 31389; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,1,0,100,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - Out of Combat - Say Line"), +(@ENTRY,0,1,0,0,0,100,0,1000,1000,9000,11000,11,@SPELL_WAR_STOMP,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - In Combat - Cast War Stomp"), +(@ENTRY,0,2,0,31,0,100,0,@SPELL_KNOCK_AWAY,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - On Target Spellhit War Stomp - Say Line"), +(@ENTRY,0,3,0,0,0,100,0,6000,6000,12000,12000,11,@SPELL_KNOCK_AWAY,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - In Combat - Cast Knock Away"), +(@ENTRY,0,4,0,0,0,100,0,20000,20000,25000,25000,11,@SPELL_PUNCTURE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - In Combat - Cast Puncture"), +(@ENTRY,0,5,6,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Rokdar the Sundered Lord - On Death - Give Quest Credit"), +(@ENTRY,0,6,0,61,0,100,1,0,0,0,0,45,12,12,0,0,0,0,19,18471,0,0,0,0,0,0,"Rokdar the Sundered Lord - On Death - Set Data Gurghthock"); +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"ROKDAR SMASH PUNY %t!",14,0,100,0,0,0,"Rokdar the Sundered Lord"); +-- Skra'gath SAI +SET @ENTRY := 18401; +SET @QUEST := 9972; +SET @SPELL_DRAINING_TOUCH := 29299; +SET @SPELL_SHADOW_BURST := 32324; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,1,0,100,1,0,0,0,0,11,@SPELL_DRAINING_TOUCH,0,0,0,0,0,1,0,0,0,0,0,0,0,"Skra'gath - Out of Combat - Cast Draining Touch"), +(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Skra'gath - On Aggro - Say Line"), +(@ENTRY,0,2,0,0,0,100,0,6000,6000,12000,12000,11,@SPELL_SHADOW_BURST,0,0,0,0,0,2,0,0,0,0,0,0,0,"Skra'gath - In Combat - Cast Shadow Burst"), +(@ENTRY,0,3,4,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Skra'gath - On Death - Give Quest Credit"), +(@ENTRY,0,4,0,61,0,100,1,0,0,0,0,45,13,13,0,0,0,0,19,18471,0,0,0,0,0,0,"Skra'gath - On Death - Set Data Gurgthock"); +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Closer... Come closer... See what the void brings!",14,0,100,0,0,0,"Skra'gath"); +-- Warmaul Champion SAI +SET @ENTRY := 18402; +SET @QUEST := 9973; +SET @SPELL_BATTLE_SHOUT := 31403; +SET @SPELL_CHARGE := 32323; +SET @SPELL_MORTAL_STRIKE := 15708; +SET @SPELL_SUNDERING_CLEAVE := 17963; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,4,0,100,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Warmaul Champion - On Aggro - Say Line"), +(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,11,@SPELL_BATTLE_SHOUT,1,0,0,0,0,1,0,0,0,0,0,0,0,"Warmaul Champion - On Aggro - Cast Battle Shout"), +(@ENTRY,0,2,0,9,0,100,1,5,30,1500,2000,11,@SPELL_CHARGE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Warmaul Champion - On Player Range - Cast Charge"), +(@ENTRY,0,3,0,0,0,100,0,3000,4000,6000,7000,11,@SPELL_MORTAL_STRIKE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Warmaul Champion - In Combat - Cast Mortal Strike"), +(@ENTRY,0,4,0,0,0,100,0,1000,1000,9000,11000,11,@SPELL_SUNDERING_CLEAVE,1,0,0,0,0,2,0,0,0,0,0,0,0,"Warmaul Champion - In Combat - Cast Sundering Cleave"), +(@ENTRY,0,4,5,6,0,100,1,0,0,0,0,15,@QUEST,0,0,0,0,0,24,0,0,0,0,0,0,0,"Warmaul Champion - On Death - Give Quest Credit"), +(@ENTRY,0,5,0,61,0,100,1,0,0,0,0,45,14,14,0,0,0,0,19,18471,0,0,0,0,0,0,"Warmaul Champion - On Death - Set Data Gurgthock"); +-- Text +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Piece by piece I will tear this challenger apart... PIECE BY PIECE!",14,0,100,0,0,0,"Warmaul Champion"); diff --git a/sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql b/sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..6e121274acb --- /dev/null +++ b/sql/updates/world/2011_11_20_08_world_achievement_criteria_data.sql @@ -0,0 +1,5 @@ +-- G.N.E.R.D. Rage +DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=3882; +INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES +(3882,5,48890,0,''), -- The aura +(3882,16,324,0,''); -- Holiday must be active diff --git a/sql/updates/world/2011_11_20_09_world_sai.sql b/sql/updates/world/2011_11_20_09_world_sai.sql new file mode 100644 index 00000000000..8931a7084d9 --- /dev/null +++ b/sql/updates/world/2011_11_20_09_world_sai.sql @@ -0,0 +1,35 @@ +-- [Q] Maintaining Discipline + +-- Exhausted Vrykul SAI +SET @ENTRY := 30146; +SET @SPELL_DESPERATE_BLOW := 57395; +SET @SPELL_DISCIPLINING_ROD := 42837; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100+0,@ENTRY*100+1); +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,0,0,0,1,0,100,0,0,0,0,0,90,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - Out of Combat - Set Bytes1 Sit"), -- Not doing this in creature_addon(_template) so that we can cancel this in SAI +(@ENTRY,0,1,2,8,0,100,0,@SPELL_DISCIPLINING_ROD,0,0,0,87,@ENTRY*100+0,@ENTRY*100+1,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Spellhit - Run Random Script"), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Spellhit - Set Phase 1"), -- To prevent the same one to give more credits +(@ENTRY*100+0,9,0,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Attack Player"), +(@ENTRY*100+0,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Say Line 0 (random)"), +(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Say Line 1 (random)"), +(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,91,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Stand Up"), +(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,5,233,0,0,0,0,0,1,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Emote Work"), +(@ENTRY*100+1,9,3,0,0,0,100,0,0,0,0,0,33,29886,0,0,0,0,0,7,0,0,0,0,0,0,0,"Exhausted Vrykul - On Script - Kill Credit"), +(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,11,@SPELL_DESPERATE_BLOW,0,0,0,0,0,2,0,0,0,0,0,0,0,"Exhausted Vrykul - At 15% HP - Cast Desperate Blow"); + +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Curse you! You will not treat me like a beast!",12,0,100,1,0,0,"Exhausted Vrykul"), +(@ENTRY,0,1,"Enough! I will teach you some manners, wench!",12,0,100,1,0,0,"Exhausted Vrykul"), +(@ENTRY,0,2,"I'd rather die fighting than live like a slave!",12,0,100,1,0,0,"Exhausted Vrykul"), + +(@ENTRY,1,0,"Back... to work...",12,0,100,1,0,0,"Exhausted Vrykul"), +(@ENTRY,1,1,"We will have revenge... some day.",12,0,100,1,0,0,"Exhausted Vrykul"), +(@ENTRY,1,2,"You treat us worse than animals!",12,0,100,1,0,0,"Exhausted Vrykul"); + +-- Captive Vrykul should be mining +DELETE FROM `creature_template_addon` WHERE `entry`=29427; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES (29427,0,0,1,233,NULL); diff --git a/sql/updates/world/2011_11_20_10_world_sai.sql b/sql/updates/world/2011_11_20_10_world_sai.sql new file mode 100644 index 00000000000..b56fd826e95 --- /dev/null +++ b/sql/updates/world/2011_11_20_10_world_sai.sql @@ -0,0 +1,55 @@ +-- [Q] [A/H] The Skettis Offensive +-- Defender Grashna SAI +SET @ENTRY := 22373; +SET @QUEST := 10879; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0,`SpecialFlags`=2 WHERE `entry`=@QUEST; +DELETE FROM `quest_start_scripts` WHERE `id`=@QUEST; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100); +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,0,0,0,19,0,100,0,@QUEST,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Quest Accept - Run Script"), +-- Wave one - no text +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +(@ENTRY*100,9,1,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +-- Wave two +(@ENTRY*100,9,2,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Script - Say Line 0"), +(@ENTRY*100,9,3,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +(@ENTRY*100,9,4,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +-- Wave three +(@ENTRY*100,9,5,0,0,0,100,0,30000,30000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Script - Say Line 1"), +(@ENTRY*100,9,6,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +(@ENTRY*100,9,7,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +(@ENTRY*100,9,8,0,0,0,100,0,0,0,0,0,12,22376,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Minion of Terokk"), +-- Wave four +(@ENTRY*100,9,9,0,0,0,100,0,30000,30000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Script - Say Line 2"), +(@ENTRY*100,9,10,0,0,0,100,0,0,0,0,0,12,22375,1,60000,0,0,0,8,0,0,0,-1626.12,5402.47,-42.31,2.08131,"Defender Grashna - On Script - Summon Avatar of Terokk"), +(@ENTRY,0,1,0,38,0,100,0,1,1,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defender Grashna - On Data Set - Say Line 3"); +-- Text +DELETE FROM `db_script_string` WHERE `entry` IN (2000000022,2000000023,2000000024,2000000025); +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"More Minions of Terokk are coming!",12,0,100,0,0,0,"Defender Grashna"), +(@ENTRY,1,0,"The invaders persist! Hold them off!",12,0,100,0,0,0,"Defender Grashna"), +(@ENTRY,2,0,"An Avatar of Terokk!! To arms!",12,0,100,0,0,0,"Defender Grashna"), +(@ENTRY,3,0,"The Avatar of Terokk has been defeated! Death to Terokk! Death to Skettis!",12,0,100,0,0,0,"Defender Grashna"); +-- Minion of Terokk SAI +SET @ENTRY := 22376; +SET @SPELL_SCREECH := 38021; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,54,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-1647.329956,5443.410156,-40.911999,2.254425,"Minion of Terokk - Just Summoned - Move To Pos"), +(@ENTRY,0,1,0,0,0,100,1,3000,4000,8000,8000,11,@SPELL_SCREECH,0,0,0,0,0,2,0,0,0,0,0,0,0,"Minion of Terokk - In Combat - Cast Terrifying Screech"); +-- Avatar of Terokk SAI +SET @ENTRY := 22375; +SET @SPELL_CHARGE := 24193; +SET @SPELL_FEATHER_BURST := 39068; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,54,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-1641.118652,5436.648926,-43.344521,0.803601,"Avatar of Terokk - Just Summoned - Move To Pos"), +(@ENTRY,0,1,0,4,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,-1641.118652,5436.648926,-43.344521,0.803601,"Avatar of Terokk - Just Summoned - Move To Pos"), +(@ENTRY,0,2,3,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,6546,0,0,0,0,0,0,"Avatar of Terokk - On Death - Set Data Defender Grashna"), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,"Avatar of Terokk - On Death - Quest Credit"), +(@ENTRY,0,4,0,4,0,100,1,0,0,0,0,11,@SPELL_CHARGE,0,0,0,0,0,2,0,0,0,0,0,0,0,"Avatar of Terokk - On Aggro - Cast Charge"), +(@ENTRY,0,5,0,0,0,100,0,6000,9000,11000,14000,11,@SPELL_FEATHER_BURST,0,0,0,0,0,2,0,0,0,0,0,0,0,"Avatar of Terokk - In Combat - Cast Feather Burst"); diff --git a/sql/updates/world/2011_11_20_11_world_sai.sql b/sql/updates/world/2011_11_20_11_world_sai.sql new file mode 100644 index 00000000000..a05b26e6831 --- /dev/null +++ b/sql/updates/world/2011_11_20_11_world_sai.sql @@ -0,0 +1,9 @@ +-- [Q] A Carver and a Croaker + +-- Scalawag Frog SAI +SET @ENTRY := 26503; +UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=`npcflag`|1,`IconName`='LootAll' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,64,0,100,0,0,0,0,0,56,35803,1,0,0,0,0,7,0,0,0,0,0,0,0,"Scalawag Frog - Gossip Hello - Create Item Scalawag Frog"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scalawag Frog - Gossip Hello - Force Despawn"); diff --git a/sql/updates/world/2011_11_20_12_world_sai.sql b/sql/updates/world/2011_11_20_12_world_sai.sql new file mode 100644 index 00000000000..527db0e02e7 --- /dev/null +++ b/sql/updates/world/2011_11_20_12_world_sai.sql @@ -0,0 +1,30 @@ +-- [Q] Rivenwood Captives + +-- Riven Widow Cocoon SAI +SET @ENTRY := 24210; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `creature` SET `MovementType`=0,`spawndist`=0 WHERE `id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,6,0,25,0,0,0,0,0,12,24211,2,8000,0,0,0,1,0,0,0,0,0,0,0,"Riven Widow Cocoon - On Death - Summon Freed Winterhoof Longrunner (25%)"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,33,24211,0,0,0,0,0,7,0,0,0,0,0,0,0,"Riven Widow Cocoon - On Death - Quest Credit"); + +-- Freed Winterhoof Longrunner SAI +SET @ENTRY := 24211; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,1,54,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Freed Winterhoof Longrunner - Just Summoned - Say Line 0"), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,41,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Freed Winterhoof Longrunner - Just Summoned - Forced Desoawn"); + +-- Texts +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Blessings of the spirits of the land and air upon you.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,1,"I must return. Good hunting to you.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,2,"I owe you a life debt, stranger.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,3,"Strange ghosts walk the land. Be careful!",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,4,"Thank you, stranger.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,5,"They took us one by one. I'm sure there are other survivors.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,6,"We should never have traveled through the Rivenwood. Everyone knows this!",12,0,100,1,0,0,"Freed Winterhoof Longrunner"), +(@ENTRY,0,7,"You saved me from certain death. I owe you.",12,0,100,1,0,0,"Freed Winterhoof Longrunner"); diff --git a/sql/updates/world/2011_11_20_13_world_sai.sql b/sql/updates/world/2011_11_20_13_world_sai.sql new file mode 100644 index 00000000000..c4cd10912a3 --- /dev/null +++ b/sql/updates/world/2011_11_20_13_world_sai.sql @@ -0,0 +1,15 @@ +-- [Q] Elixir of Pain +-- Stanley SAI +SET @ENTRY := 2274; +SET @QUEST := 502; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,20,0,100,0,@QUEST,0,0,0,36,2275,0,0,0,0,0,1,0,0,0,0,0,0,0,"Stanley - On Quest Complete - Update Entry"); +-- Enraged Standley SAI +SET @ENTRY := 2275; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@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,0,0,0,54,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,0,0,0,0,0,0,0,"Enraged Standley - Just Summoned - Attack Closest Player"); diff --git a/sql/updates/world/2011_11_20_14_world_revert.sql b/sql/updates/world/2011_11_20_14_world_revert.sql new file mode 100644 index 00000000000..067c750b694 --- /dev/null +++ b/sql/updates/world/2011_11_20_14_world_revert.sql @@ -0,0 +1,4 @@ +-- revert 2011_11_20_11_world_sai.sql +SET @ENTRY := 26503; +UPDATE `creature_template` SET `AIName`='',`npcflag`=`npcflag`&~1,`IconName`='' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`= @ENTRY AND `source_type`=0; diff --git a/sql/updates/world/2011_11_20_15_world_sai.sql b/sql/updates/world/2011_11_20_15_world_sai.sql new file mode 100644 index 00000000000..8e0b4141379 --- /dev/null +++ b/sql/updates/world/2011_11_20_15_world_sai.sql @@ -0,0 +1,41 @@ +-- [Q] [A/H] Cleansing of the Orb of Orahil +-- [Q] [A/H] Mana Surges +-- Tabetha SAI +SET @ENTRY := 6546; +SET @QUEST_CLEANSING := 4961; +SET @QUEST_MANA_SURGE := 1957; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +UPDATE `quest_template` SET `StartScript`=0,`CompleteScript`=0 WHERE `entry` IN (@QUEST_CLEANSING,@QUEST_MANA_SURGE); +DELETE FROM `quest_start_scripts` WHERE `id` IN (@QUEST_CLEANSING,@QUEST_MANA_SURGE); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3) 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 +(@ENTRY,0,0,0,19,0,100,0,@QUEST_CLEANSING,0,0,0,80,@ENTRY*100,0,2,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Quest Accept - Run Script"), +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Script - Say Line 0"), +(@ENTRY*100,9,1,0,0,0,100,0,2000,2000,0,0,11,9097,0,0,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Script - Cast Summon Demon of the Orb"), + +(@ENTRY,0,1,0,20,0,100,0,@QUEST_MANA_SURGE,0,0,0,9,0,0,0,0,0,0,14,28294,103680,0,0,0,0,0,"Tabetha - On Quest Complete - Deactivate Mana Rift (GO)"), -- Make it stop being visual +(@ENTRY,0,2,3,19,0,100,0,@QUEST_MANA_SURGE,0,0,0,9,0,0,0,0,0,0,14,28294,103680,0,0,0,0,0,"Tabetha - On Quest Accept - Activate Mana Rift (GO)"), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,87,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Quest Accept - Run Random Script"), +(@ENTRY,0,4,0,38,0,100,0,1,1,0,0,87,@ENTRY*100+1,@ENTRY*100+2,@ENTRY*100+3,0,0,0,1,0,0,0,0,0,0,0,"Tabetha - On Data Set - Run Random Script"), +(@ENTRY*100+1,9,0,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.22,-3383.91,38.2265,2.7963,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+1,9,1,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.22,-3383.91,38.2265,2.7963,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+1,9,2,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.22,-3383.91,38.2265,2.7963,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+2,9,0,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.99,-3394.54,38.5507,1.8342,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+2,9,1,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4019.99,-3394.54,38.5507,1.8342,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+3,9,0,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4013.29,-3385.14,38.4656,2.3801,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+3,9,1,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4013.29,-3385.14,38.4656,2.3801,"Tabetha - On Random Script - Summon Mana Surge"), +(@ENTRY*100+3,9,2,0,0,0,100,0,0,0,0,0,12,6550,1,600000,0,0,0,8,0,0,0,-4013.29,-3385.14,38.4656,2.3801,"Tabetha - On Random Script - Summon Mana Surge"); +-- Text +DELETE FROM `db_script_string` WHERE `entry`=2000000032; +DELETE FROM `creature_text` WHERE `entry`=@ENTRY; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@ENTRY,0,0,"Grid yourself, $N. The demon in this orb is a fel beast.",12,0,100,0,0,0,"Tabetha"); +-- Mana Surge SAI +SET @ENTRY := 6550; +SET @SPELL_SHOCK := 11824; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,54,0,100,1,0,0,0,0,89,10,0,0,0,0,0,1,0,0,0,0,0,0,0,"Mana Surge - On Just Summoned - Set Random Movement"), +(@ENTRY,0,1,0,6,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,6546,0,0,0,0,0,0,"Mana Surge - On Death - Set Data Tabetha"), +(@ENTRY,0,2,0,0,0,100,0,3000,4000,8000,8000,11,@SPELL_SHOCK,0,0,0,0,0,2,0,0,0,0,0,0,0,'Mana Surge - In Combat - Cast Shock'); diff --git a/sql/updates/world/2011_11_21_00_world_db_errors.sql b/sql/updates/world/2011_11_21_00_world_db_errors.sql new file mode 100644 index 00000000000..d3ae6fb197b --- /dev/null +++ b/sql/updates/world/2011_11_21_00_world_db_errors.sql @@ -0,0 +1,11 @@ +UPDATE `creature_template` SET `lootid`=0 WHERE `entry`=11054; +UPDATE `conditions` SET `SourceTypeOrReferenceId`=17 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47305 AND `ConditionTypeOrReference`=20; +UPDATE `conditions` SET `SourceTypeOrReferenceId`=18, `SourceEntry`=36732, `ConditionTypeOrReference`=24 WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47305 AND `ConditionTypeOrReference`=18; +UPDATE `smart_scripts` SET `target_param1`=35 WHERE `entryorguid`=2275 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_param1`=35 WHERE `entryorguid`=1806901 AND `source_type`=9 AND `id`=3; + +DELETE FROM `db_script_string` WHERE `entry` IN (2000000102, 2000000103, 2000000104); +INSERT INTO `db_script_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES +(2000000102,'Oh, darn...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(2000000103,'Ok, let''s get started!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL), +(2000000104,'... oops.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql b/sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql new file mode 100644 index 00000000000..7083107a8c2 --- /dev/null +++ b/sql/updates/world/2011_11_21_01_pilgrim_achievement_reward.sql @@ -0,0 +1 @@ +UPDATE `achievement_reward` SET `item`=44810, `sender`=28951, `subject`='A Gobbler not yet Gobbled', `text` = 'Can you believe this Plump Turkey made it through November alive?$B$BSince all this friends have been served up on Bountiful Tables with sides of Cranberry Chutney and Spice Bread Stuffing and... ooo... I''m getting hungry. But anyhow! He''s all alone, now, so I was hoping you might be willing to take care of him. There simply isn''t enough room left in my shop!$B$BJust keep him away from cooking fires, please. He gets this strange look in his eyes around them...' WHERE `entry` IN (3478,3656); -- Pilgrim achievement (A/H) diff --git a/sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql b/sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql new file mode 100644 index 00000000000..589dbb0b2a4 --- /dev/null +++ b/sql/updates/world/2011_11_21_02_pilgrim_achievement_criteria_data.sql @@ -0,0 +1,11 @@ +-- Achievement: Turkey Lurkey +DELETE FROM `achievement_criteria_data` WHERE `type`=2 AND `criteria_id` IN (11158,11159,11160,11161,11162,11163,11164,11165); +INSERT INTO `achievement_criteria_data` (`criteria_id`, `type`, `value1`, `value2`) VALUES +(11158, 2, 4, 1), -- Human Rogue +(11159, 2, 4, 4), -- Night Elf Rogue +(11160, 2, 4, 2), -- Orc Rogue +(11161, 2, 4, 8), -- Troll Rogue +(11162, 2, 4, 5), -- Undead Rogue +(11163, 2, 4, 10), -- Blood Elf Rogue +(11164, 2, 4, 3), -- Dwarf Rogue +(11165, 2, 4, 7); -- Gnome Rogue diff --git a/sql/updates/world/2011_11_21_03_pilgrim_misc.sql b/sql/updates/world/2011_11_21_03_pilgrim_misc.sql new file mode 100644 index 00000000000..ff58b61cb87 --- /dev/null +++ b/sql/updates/world/2011_11_21_03_pilgrim_misc.sql @@ -0,0 +1,145 @@ +-- Misc stuffz +UPDATE `npc_text` SET `WDBVerified`=12340 WHERE `ID`=14648; -- "A Bountiful Table is laid out..." + +-- Template updates +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=3, `unit_flags`=33536 WHERE `entry`=34654; -- Bountiful Feast Hostess +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`unit_flags`=33536 WHERE `entry`=34678; -- Dokin Farplain +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34684; -- Laha Farplain +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`speed_run`=1 WHERE `entry`=35343; -- Bountiful Barrel +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34685; -- Dalni Tallgrass +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`speed_run`=1 WHERE `entry`=35342; -- Bountiful Barrel +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=83,`unit_flags`=33536 WHERE `entry`=34713; -- Ondani Greatmill +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34787; -- John Rigsdale +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=83,`unit_flags`=33536 WHERE `entry`=34786; -- Alice Rigsdale +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`unit_flags`=33536 WHERE `entry`=34677; -- Miles Standish +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=83,`unit_flags`=33536 WHERE `entry`=34712; -- Roberta Carter +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`unit_flags`=33536 WHERE `entry`=34683; -- Rose Standish +UPDATE `creature_template` SET `faction_A`=714,`faction_H`=714,`baseattacktime`=2000,`npcflag`=640,`speed_run`=1 WHERE `entry`=35341; -- Bountiful Barrel + +UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34819; -- The Stuffing Chair +UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34824; -- The Sweet Potato Chair +UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34823; -- The Cranberry Chair +UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34812; -- The Turkey Chair +UPDATE `creature_template` SET `baseattacktime`=2000,`npcflag`=16777216,`unit_flags`=16384,`speed_run`=1.57143,`VehicleId`=321 WHERE `entry`=34822; -- The Pie Chair + +UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29330; -- Bountiful Feast Hostess +UPDATE `creature_model_info` SET `bounding_radius`=0.9747,`combat_reach`=4.05,`gender`=0 WHERE `modelid`=29339; -- Dokin Farplain +UPDATE `creature_model_info` SET `bounding_radius`=1,`combat_reach`=0,`gender`=0 WHERE `modelid`=29775; -- Bountiful Barrel +UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29342; -- Laha Farplain +UPDATE `creature_model_info` SET `bounding_radius`=1.6,`combat_reach`=0,`gender`=2 WHERE `modelid`=29205; -- Chairs +UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29397; -- Dalni Tallgrass +UPDATE `creature_model_info` SET `bounding_radius`=0.8725,`combat_reach`=3.75,`gender`=1 WHERE `modelid`=29401; -- Ondani Greatmill +UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=29428; -- John Rigsdale +UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=29427; -- Alice Rigsdale +UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=0 WHERE `modelid`=29338; -- Miles Standish +UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=29365; -- Roberta Carter +UPDATE `creature_model_info` SET `bounding_radius`=0.383,`combat_reach`=1.5,`gender`=1 WHERE `modelid`=29340; -- Rose Standish + +DELETE FROM `creature_template_addon` WHERE `entry` IN (34654,34678,35343,34684,34819,34824,34823,34812,34822,34685,35342,34713,34787,34786,34677,34712,34683,35341); +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(34654,0,0,1,0, NULL), -- Bountiful Feast Hostess +(34678,0,0,2,0, NULL), -- Dokin Farplain +(35343,0,0,1,0, NULL), -- Bountiful Barrel (TB) +(34684,0,0,1,0, NULL), -- Laha Farplain +(34685,0,0,1,0, NULL), -- Dalni Tallgrass +(35342,0,0,1,0, NULL), -- Bountiful Barrel (OG) +(34713,0,0,2,0, NULL), -- Ondani Greatmill +(34787,0,0,1,0, NULL), -- John Rigsdale +(34786,0,0,2,0, NULL), -- Alice Rigsdale +(34677,0,0,2,0, NULL), -- Miles Standish +(34712,0,0,2,0, NULL), -- Roberta Carter +(34683,0,0,1,0, NULL), -- Rose Standish +(35341,0,0,1,0, NULL), -- Bountiful Barrel +(34819,0,0,1,0, '61795'), -- The Stuffing Chair (Stuffing Server) +(34824,0,0,1,0, '61797'), -- The Sweet Potato Chair (Sweet Potatoes Server) +(34823,0,0,1,0, '61793'), -- The Cranberry Chair (Cranberry Server) +(34812,0,0,1,0, '61796'), -- The Turkey Chair (Turkey Server) +(34822,0,0,1,0, '61794'); -- The Pie Chair (Pie Server) + +-- Vehicles +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (34819,34824,34823,34812,34822); +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `quest_start`, `quest_start_active`, `quest_end`, `cast_flags`, `aura_required`, `aura_forbidden`, `user_type`) VALUES +(34819, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Stuffing Chair (Ride Vehicle) +(34824, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Sweet Potato Chair (Ride Vehicle) +(34823, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Cranberry Chair (Ride Vehicle) +(34812, 65403, 0, 0, 0, 1, 0, 0, 0), -- The Turkey Chair (Ride Vehicle) +(34822, 65403, 0, 0, 0, 1, 0, 0, 0); -- The Pie Chair (Ride Vehicle) + +-- Gossips +UPDATE `creature_template` SET `gossip_menu_id`=10575 WHERE `entry`=34654; -- Bountiful Feast Hostess +DELETE FROM `gossip_menu` WHERE `entry`=10575 AND `text_id`=14633; +DELETE FROM `gossip_menu` WHERE `entry`=10589 AND `text_id`=14648; +INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES +(10575, 14633), +(10589, 14648); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=10575 AND `id`=0; +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 +(10575, 0, 0, 'How do the Bountiful Tables work?', 1, 1, 10589, 0, 0, 0, NULL); + +-- Vendor tables +UPDATE `item_template` SET `BuyCount`=5 WHERE `entry` IN (44835,44853,46797,46793,46796); -- Autumnal Herbs, Honey, Mulgore Sweet Potato, Tangy Southfury Cranberries, Ripe Tirisfal Pumpkin +DELETE FROM `npc_vendor` WHERE `entry` IN (35343,34684,35342,34685,34787,35341,34683); +INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `ExtendedCost`) VALUES +-- 35343 (Bountiful Barrel) +(35343, 1, 46810, 0, 0), -- Bountiful Cookbook +(35343, 2, 46797, 0, 0), -- Mulgore Sweet Potato +(35343, 3, 44835, 0, 0), -- Autumnal Herbs +(35343, 4, 44853, 0, 0), -- Honey +(35343, 5, 159, 0, 0), -- Refreshing Spring Water +(35343, 6, 2678, 0, 0), -- Mild Spices +(35343, 7, 30817, 0, 0), -- Simple Flour +(35343, 8, 46888, 0, 0), -- Bountiful Basket +-- 34684 (Laha Farplain) +(34684, 1, 46810, 0, 0), -- Bountiful Cookbook +(34684, 2, 46797, 0, 0), -- Mulgore Sweet Potato +(34684, 3, 44835, 0, 0), -- Autumnal Herbs +(34684, 4, 44853, 0, 0), -- Honey +(34684, 5, 159, 0, 0), -- Refreshing Spring Water +(34684, 6, 2678, 0, 0), -- Mild Spices +(34684, 7, 30817, 0, 0), -- Simple Flour +(34684, 8, 46888, 0, 0), -- Bountiful Basket +-- 35342 (Bountiful Barrel) +(35342, 1, 46810, 0, 0), -- Bountiful Cookbook +(35342, 2, 46793, 0, 0), -- Tangy Southfury Cranberries +(35342, 3, 44835, 0, 0), -- Autumnal Herbs +(35342, 4, 44853, 0, 0), -- Honey +(35342, 5, 159, 0, 0), -- Refreshing Spring Water +(35342, 6, 2678, 0, 0), -- Mild Spices +(35342, 7, 30817, 0, 0), -- Simple Flour +(35342, 8, 46888, 0, 0), -- Bountiful Basket +-- 34685 (Dalni Tallgrass) +(34685, 1, 46810, 0, 0), -- Bountiful Cookbook +(34685, 2, 46793, 0, 0), -- Tangy Southfury Cranberries +(34685, 3, 44835, 0, 0), -- Autumnal Herbs +(34685, 4, 44853, 0, 0), -- Honey +(34685, 5, 159, 0, 0), -- Refreshing Spring Water +(34685, 6, 2678, 0, 0), -- Mild Spices +(34685, 7, 30817, 0, 0), -- Simple Flour +(34685, 8, 46888, 0, 0), -- Bountiful Basket +-- 34787 (John Rigsdale) +(34787, 1, 46810, 0, 0), -- Bountiful Cookbook +(34787, 2, 44835, 0, 0), -- Autumnal Herbs +(34787, 3, 44853, 0, 0), -- Honey +(34787, 4, 159, 0, 0), -- Refreshing Spring Water +(34787, 5, 2678, 0, 0), -- Mild Spices +(34787, 6, 30817, 0, 0), -- Simple Flour +(34787, 7, 46888, 0, 0), -- Bountiful Basket +-- 35341 (Bountiful Barrel) +(35341, 1, 46810, 0, 0), -- Bountiful Cookbook +(35341, 2, 46796, 0, 0), -- Ripe Tirisfal Pumpkin +(35341, 3, 44835, 0, 0), -- Autumnal Herbs +(35341, 4, 44853, 0, 0), -- Honey +(35341, 5, 159, 0, 0), -- Refreshing Spring Water +(35341, 6, 2678, 0, 0), -- Mild Spices +(35341, 7, 30817, 0, 0), -- Simple Flour +(35341, 8, 46888, 0, 0), -- Bountiful Basket +-- 34683 (Rose Standish) +(34683, 1, 46810, 0, 0), -- Bountiful Cookbook +(34683, 2, 46796, 0, 0), -- Ripe Tirisfal Pumpkin +(34683, 3, 44835, 0, 0), -- Autumnal Herbs +(34683, 4, 44853, 0, 0), -- Honey +(34683, 5, 159, 0, 0), -- Refreshing Spring Water +(34683, 6, 2678, 0, 0), -- Mild Spices +(34683, 7, 30817, 0, 0), -- Simple Flour +(34683, 8, 46888, 0, 0); -- Bountiful Basket
\ No newline at end of file diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index faa73cefb11..6815d73d1b3 100755 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -71,6 +71,7 @@ DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt); DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore(CinematicSequencesEntryfmt); DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt); DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt); +DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore(CreatureModelDatafmt); DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt); DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt); DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt); @@ -292,6 +293,7 @@ void LoadDBCStores(const std::string& dataPath) LoadDBC(availableDbcLocales, bad_dbc_files, sCinematicSequencesStore, dbcPath, "CinematicSequences.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureDisplayInfoStore, dbcPath, "CreatureDisplayInfo.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureFamilyStore, dbcPath, "CreatureFamily.dbc"); + LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureModelDataStore, dbcPath, "CreatureModelData.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureSpellDataStore, dbcPath, "CreatureSpellData.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sCreatureTypeStore, dbcPath, "CreatureType.dbc"); LoadDBC(availableDbcLocales, bad_dbc_files, sCurrencyTypesStore, dbcPath, "CurrencyTypes.dbc"); diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h index 367746616d1..7edfaad03f1 100755 --- a/src/server/game/DataStores/DBCStores.h +++ b/src/server/game/DataStores/DBCStores.h @@ -81,6 +81,7 @@ extern DBCStorage <ChrRacesEntry> sChrRacesStore; extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore; extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore; extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore; +extern DBCStorage <CreatureModelDataEntry> sCreatureModelDataStore; extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore; extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore; extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore; diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index e01acd2e03d..32510da70d3 100755 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -723,7 +723,7 @@ struct CinematicSequencesEntry struct CreatureDisplayInfoEntry { uint32 Displayid; // 0 m_ID - // 1 m_modelID + uint32 ModelId; // 1 m_modelID // 2 m_soundID // 3 m_extendedDisplayInfoID float scale; // 4 m_creatureModelScale @@ -754,6 +754,28 @@ struct CreatureFamilyEntry // 27 m_iconFile }; +struct CreatureModelDataEntry +{ + uint32 Id; + //uint32 Flags; + //char* ModelPath[16] + //uint32 Unk1; + //float Scale; // Used in calculation of unit collision data + //int32 Unk2 + //int32 Unk3 + //uint32 Unk4 + //uint32 Unk5 + //float Unk6 + //uint32 Unk7 + //float Unk8 + //uint32 Unk9 + //uint32 Unk10 + float CollisionWidth; + float CollisionHeight; + //float Unk11; // Used in calculation of unit collision data when mounted + //float Unks[11] +}; + #define MAX_CREATURE_SPELL_DATA_SLOT 4 struct CreatureSpellDataEntry diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 5d33a3011ab..d71565d8a39 100755 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -38,8 +38,9 @@ const char ChatChannelsEntryfmt[]="nixssssssssssssssssxxxxxxxxxxxxxxxxxx"; const char ChrClassesEntryfmt[]="nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii"; const char ChrRacesEntryfmt[]="nxixiixixxxxixssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi"; const char CinematicSequencesEntryfmt[]="nxxxxxxxxx"; -const char CreatureDisplayInfofmt[]="nxxxfxxxxxxxxxxx"; +const char CreatureDisplayInfofmt[]="nixxfxxxxxxxxxxx"; const char CreatureFamilyfmt[]="nfifiiiiixssssssssssssssssxx"; +const char CreatureModelDatafmt[]="nxxxxxxxxxxxxxffxxxxxxxxxxxx"; const char CreatureSpellDatafmt[]="niiiixxxx"; const char CreatureTypefmt[]="nxxxxxxxxxxxxxxxxxx"; const char CurrencyTypesfmt[]="xnxi"; diff --git a/src/server/game/DungeonFinding/LFGMgr.h b/src/server/game/DungeonFinding/LFGMgr.h index 0d11405789d..95cb2e81869 100755 --- a/src/server/game/DungeonFinding/LFGMgr.h +++ b/src/server/game/DungeonFinding/LFGMgr.h @@ -292,6 +292,7 @@ class LFGMgr LfgState GetState(uint64 guid); const LfgDungeonSet& GetSelectedDungeons(uint64 guid); uint32 GetDungeon(uint64 guid, bool asId = true); + void SetState(uint64 guid, LfgState state); void ClearState(uint64 guid); void RemovePlayerData(uint64 guid); void RemoveGroupData(uint64 guid); @@ -304,7 +305,6 @@ class LFGMgr uint8 GetRoles(uint64 guid); const std::string& GetComment(uint64 gguid); void RestoreState(uint64 guid); - void SetState(uint64 guid, LfgState state); void SetDungeon(uint64 guid, uint32 dungeon); void SetSelectedDungeons(uint64 guid, const LfgDungeonSet& dungeons); void SetLockedDungeons(uint64 guid, const LfgLockMap& lock); diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index f553b069162..42119a02ef8 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -82,6 +82,7 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, } sLFGMgr->ClearState(guid); + sLFGMgr->SetState(guid, LFG_STATE_NONE); if (Player* player = ObjectAccessor::FindPlayer(guid)) { /* diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index bb39d902ae7..ddafefc087e 100755 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2493,6 +2493,20 @@ class Player : public Unit, public GridObject<Player> void AddWhisperWhiteList(uint64 guid) { WhisperList.push_back(guid); } bool IsInWhisperWhiteList(uint64 guid); + //! Return collision height sent to client + //! we currently only send this on dismount + float GetCollisionHeight() + { + CreatureDisplayInfoEntry const* displayInfo = sCreatureDisplayInfoStore.LookupEntry(GetNativeDisplayId()); + ASSERT(displayInfo); + CreatureModelDataEntry const* modelData = sCreatureModelDataStore.LookupEntry(displayInfo->ModelId); + ASSERT(modelData); + + return modelData->CollisionHeight; + + //! TODO: Need a proper calculation for collision height when mounted + } + protected: // Gamemaster whisper whitelist WhisperListContainer WhisperList; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e74712299c0..3b57b434430 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6290,7 +6290,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere { if (procSpell->SpellVisual[0] == 750 && procSpell->Effects[1].ApplyAuraName == 3) { - if (target->GetTypeId() == TYPEID_UNIT) + if (target && target->GetTypeId() == TYPEID_UNIT) { triggered_spell_id = 54820; break; @@ -9232,10 +9232,9 @@ ReputationRank Unit::GetReactionTo(Unit const* target) const if (GetCharmerOrOwnerOrSelf() == target->GetCharmerOrOwnerOrSelf()) return REP_FRIENDLY; - // this is 0x8 in the 13580 client - if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) + if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) { - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) { Player const* selfPlayerOwner = GetAffectingPlayer(); Player const* targetPlayerOwner = target->GetAffectingPlayer(); @@ -11947,6 +11946,15 @@ void Unit::Unmount() SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0); RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT); + if (Player* thisPlayer = ToPlayer()) + { + WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4); + data.append(GetPackGUID()); + data << uint32(sWorld->GetGameTime()); // Packet counter + data << thisPlayer->GetCollisionHeight(); + thisPlayer->GetSession()->SendPacket(&data); + } + WorldPacket data(SMSG_DISMOUNT, 8); data.appendPackGUID(GetGUID()); SendMessageToSet(&data, true); @@ -12166,29 +12174,21 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) return false; - //! since 'this' in the client's context of this function *always* resembles the _player_ (feel free to correct me), - //! in the server context we will ignore the this->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE) (possibly misnamed) check for non-players. - //! Feel free to change this if a more proper solution is found. - bool ignoreOwnOOCFlag = true; if (Player const* playerAttacker = ToPlayer()) { - ignoreOwnOOCFlag = false; if (playerAttacker->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_UNK19)) return false; } - // check flags - // UNIT_FLAG_PLAYER_CONTROLLED is 0x8 in 13580 if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_TAXI_FLIGHT | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_UNK_16) - || (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) - || (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) - //! Also notable: in CGUnit_C__CanAttack the third parameter is a boolean that determines if the following flag check is exempted or not - || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) - || (!ignoreOwnOOCFlag && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))) + || (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) + || (!target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE)) + || (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) + || (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))) return false; // CvC case - can attack each other only when one of them is hostile - if (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && !target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) + if (!HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && !target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) return GetReactionTo(target) <= REP_HOSTILE || target->GetReactionTo(this) <= REP_HOSTILE; // PvP, PvC, CvP case @@ -12201,8 +12201,8 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co if (creatureAttacker && creatureAttacker->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_UNK26) return false; - Player const* playerAffectingAttacker = HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) ? GetAffectingPlayer() : NULL; - Player const* playerAffectingTarget = target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) ? target->GetAffectingPlayer() : NULL; + Player const* playerAffectingAttacker = HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) ? GetAffectingPlayer() : NULL; + Player const* playerAffectingTarget = target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) ? target->GetAffectingPlayer() : NULL; // check duel - before sanctuary checks if (playerAffectingAttacker && playerAffectingTarget) @@ -12211,7 +12211,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell) co // PvP case - can't attack when attacker or target are in sanctuary // however, 13850 client doesn't allow to attack when one of the unit's has sanctuary flag and is pvp - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && ((target->GetByteValue(UNIT_FIELD_BYTES_2, 1) & UNIT_BYTE2_FLAG_SANCTUARY) || (GetByteValue(UNIT_FIELD_BYTES_2, 1) & UNIT_BYTE2_FLAG_SANCTUARY))) return false; @@ -12289,10 +12289,10 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co return false; // PvP case - if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) + if (target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) { Player const* targetPlayerOwner = target->GetAffectingPlayer(); - if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) + if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE)) { Player const* selfPlayerOwner = GetAffectingPlayer(); if (selfPlayerOwner && targetPlayerOwner) @@ -12314,7 +12314,7 @@ bool Unit::_IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) co } // PvC case - player can assist creature only if has specific type flags // !target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && - else if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED) + else if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE) && (!bySpell || !(bySpell->AttributesEx6 & SPELL_ATTR6_UNK3)) && !((target->GetByteValue(UNIT_FIELD_BYTES_2, 1) & UNIT_BYTE2_FLAG_PVP))) { diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp index 85e0ff2390b..8bfa010463a 100644 --- a/src/server/scripts/Commands/cs_tele.cpp +++ b/src/server/scripts/Commands/cs_tele.cpp @@ -125,6 +125,29 @@ public: if (!handler->extractPlayerTarget(nameStr, &target, &target_guid, &target_name)) return false; + if (strcmp(teleStr, "$home") == 0) // References target's homebind + { + if (target) + target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation()); + else + { + QueryResult resultDB = CharacterDatabase.PQuery("SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = %u", target_guid); + if (resultDB) + { + Field* fieldsDB = resultDB->Fetch(); + uint32 mapId = fieldsDB[0].GetUInt32(); + uint32 zoneId = fieldsDB[1].GetUInt32(); + float posX = fieldsDB[2].GetFloat(); + float posY = fieldsDB[3].GetFloat(); + float posZ = fieldsDB[4].GetFloat(); + + Player::SavePositionInDB(mapId, posX, posY, posZ, 0, zoneId, target_guid); + } + } + + return true; + } + // id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r GameTele const* tele = handler->extractGameTeleFromLink(teleStr); if (!tele) |