From 9b7b8152e7402f3a0a967d92772e624c26bbc303 Mon Sep 17 00:00:00 2001 From: Nay Date: Mon, 27 Aug 2012 15:38:50 +0100 Subject: DB/SAI: Fix opening the door before Broggok in Blood Furnace Based on the fix of oneblizz Closes #350 --- sql/updates/world/2012_08_27_01_world_sai.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sql/updates/world/2012_08_27_01_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_01_world_sai.sql b/sql/updates/world/2012_08_27_01_world_sai.sql new file mode 100644 index 00000000000..302c3ac1942 --- /dev/null +++ b/sql/updates/world/2012_08_27_01_world_sai.sql @@ -0,0 +1,13 @@ +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=17398; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=17398; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-85712,-85717,-85719,-85724); +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 +(-85724, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 9, 29607, 0, 0, 0, 0, 0, 14, 22299, 0, 0, 0, 0, 0, 0, 'Blood Furnace - First Cell'), +(-85719, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 9, 29607, 0, 0, 0, 0, 0, 14, 22297, 0, 0, 0, 0, 0, 0, 'Blood Furnace - Second Cell'), +(-85717, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 9, 29607, 0, 0, 0, 0, 0, 14, 22298, 0, 0, 0, 0, 0, 0, 'Blood Furnace - Third Cell'), +(-85712, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 9, 29607, 0, 0, 0, 0, 0, 14, 22296, 0, 0, 0, 0, 0, 0, 'Blood Furnace - Fourth Cell'); + +DELETE FROM `gameobject_scripts` WHERE `id`=150441; +INSERT INTO `gameobject_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES +(150441, 3, 11, 22295, 0, 0, 0, 0, 0, 0); -- cgit v1.2.3 From d07be0cf61a339a47a4979cda49e9ff4db6faef1 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Mon, 27 Aug 2012 17:08:30 +0200 Subject: DB/Player: Fix draenei race spell 'Shadow Resistance' --- sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql b/sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql new file mode 100644 index 00000000000..9c664142bba --- /dev/null +++ b/sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql @@ -0,0 +1,9 @@ +DELETE FROM `playercreateinfo_spell` WHERE `Spell` IN (59221,59535,59536,59538,59539,59540,59541); +INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES +(11,1,59221,'Shadow Resistance'), +(11,2,59535,'Shadow Resistance'), +(11,3,59536,'Shadow Resistance'), +(11,5,59538,'Shadow Resistance'), +(11,6,59539,'Shadow Resistance'), +(11,7,59540,'Shadow Resistance'), +(11,8,59541,'Shadow Resistance'); -- cgit v1.2.3 From b0256c30a465d190a034f637343a84766d8406ad Mon Sep 17 00:00:00 2001 From: neuro_999 Date: Mon, 27 Aug 2012 16:26:22 +0100 Subject: Scripts/Uldaman: Archaedas now Awaken his minnions & spawn of npc lore keeper of norgannon Closes #765 --- sql/updates/world/2012_08_27_02_world_creature.sql | 4 ++++ .../scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp | 13 ++++++++----- .../scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp | 3 +++ 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 sql/updates/world/2012_08_27_02_world_creature.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_02_world_creature.sql b/sql/updates/world/2012_08_27_02_world_creature.sql new file mode 100644 index 00000000000..3595ea7b576 --- /dev/null +++ b/sql/updates/world/2012_08_27_02_world_creature.sql @@ -0,0 +1,4 @@ +SET @GUID = 42638; -- Set by TDB team (need X) +DELETE FROM `creature` WHERE `guid`=@GUID AND `id`=7172; +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 +(@GUID,7172,70,1,1,0,0,150.466,306.014,-49.543,5.2359,300,0,0,1,0,0,0,0,0); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index 3ffb873e4d2..74fad4f94d8 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -95,14 +95,17 @@ class boss_archaedas : public CreatureScript me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } - void ActivateMinion(uint64 uiGuid, bool bFlag) + void ActivateMinion(uint64 uiGuid, bool flag) { - Unit* pMinion = Unit::GetUnit(*me, uiGuid); + Unit* minion = Unit::GetUnit(*me, uiGuid); - if (pMinion && pMinion->isAlive()) + if (minion && minion->isAlive()) { - DoCast(pMinion, SPELL_AWAKEN_VAULT_WALKER, bFlag); - pMinion->CastSpell(pMinion, SPELL_ARCHAEDAS_AWAKEN, true); + DoCast(minion, SPELL_AWAKEN_VAULT_WALKER, flag); + minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true); + minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + minion->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE); + minion->setFaction(14); } } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index ade07039a23..ee82da668f8 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -202,6 +202,9 @@ class instance_uldaman : public InstanceMapScript continue; archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true); target->CastSpell(target, SPELL_ARCHAEDAS_AWAKEN, true); + target->RemoveFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE); + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + target->setFaction(14); return; // only want the first one we find } } -- cgit v1.2.3 From 949fde098aeb7bff60e56783a0f116e34dfeae5d Mon Sep 17 00:00:00 2001 From: nelegalno Date: Mon, 27 Aug 2012 16:34:26 +0100 Subject: DB/GOs: Spawn Blackened Urn in Karazhan, should fix Nightbane summoning and the quest chain Closes #975 --- sql/updates/world/2012_08_27_00_creature_template.sql | 2 -- sql/updates/world/2012_08_27_00_world_creature_template.sql | 2 ++ sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql | 9 --------- sql/updates/world/2012_08_27_02_world_playercreateinfo_spell.sql | 9 +++++++++ sql/updates/world/2012_08_27_03_world_gameobject.sql | 6 ++++++ 5 files changed, 17 insertions(+), 11 deletions(-) delete mode 100644 sql/updates/world/2012_08_27_00_creature_template.sql create mode 100644 sql/updates/world/2012_08_27_00_world_creature_template.sql delete mode 100644 sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql create mode 100644 sql/updates/world/2012_08_27_02_world_playercreateinfo_spell.sql create mode 100644 sql/updates/world/2012_08_27_03_world_gameobject.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_00_creature_template.sql b/sql/updates/world/2012_08_27_00_creature_template.sql deleted file mode 100644 index 804d7b5c61d..00000000000 --- a/sql/updates/world/2012_08_27_00_creature_template.sql +++ /dev/null @@ -1,2 +0,0 @@ --- NPC script linking for Wyrmrest Defender ID: 27629 -UPDATE `creature_template` SET `ScriptName`='npc_wyrmrest_defender' WHERE `entry`=27629; diff --git a/sql/updates/world/2012_08_27_00_world_creature_template.sql b/sql/updates/world/2012_08_27_00_world_creature_template.sql new file mode 100644 index 00000000000..804d7b5c61d --- /dev/null +++ b/sql/updates/world/2012_08_27_00_world_creature_template.sql @@ -0,0 +1,2 @@ +-- NPC script linking for Wyrmrest Defender ID: 27629 +UPDATE `creature_template` SET `ScriptName`='npc_wyrmrest_defender' WHERE `entry`=27629; diff --git a/sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql b/sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql deleted file mode 100644 index 9c664142bba..00000000000 --- a/sql/updates/world/2012_08_27_02_playercreateinfo_spell.sql +++ /dev/null @@ -1,9 +0,0 @@ -DELETE FROM `playercreateinfo_spell` WHERE `Spell` IN (59221,59535,59536,59538,59539,59540,59541); -INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES -(11,1,59221,'Shadow Resistance'), -(11,2,59535,'Shadow Resistance'), -(11,3,59536,'Shadow Resistance'), -(11,5,59538,'Shadow Resistance'), -(11,6,59539,'Shadow Resistance'), -(11,7,59540,'Shadow Resistance'), -(11,8,59541,'Shadow Resistance'); diff --git a/sql/updates/world/2012_08_27_02_world_playercreateinfo_spell.sql b/sql/updates/world/2012_08_27_02_world_playercreateinfo_spell.sql new file mode 100644 index 00000000000..9c664142bba --- /dev/null +++ b/sql/updates/world/2012_08_27_02_world_playercreateinfo_spell.sql @@ -0,0 +1,9 @@ +DELETE FROM `playercreateinfo_spell` WHERE `Spell` IN (59221,59535,59536,59538,59539,59540,59541); +INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES +(11,1,59221,'Shadow Resistance'), +(11,2,59535,'Shadow Resistance'), +(11,3,59536,'Shadow Resistance'), +(11,5,59538,'Shadow Resistance'), +(11,6,59539,'Shadow Resistance'), +(11,7,59540,'Shadow Resistance'), +(11,8,59541,'Shadow Resistance'); diff --git a/sql/updates/world/2012_08_27_03_world_gameobject.sql b/sql/updates/world/2012_08_27_03_world_gameobject.sql new file mode 100644 index 00000000000..1bf836c96e0 --- /dev/null +++ b/sql/updates/world/2012_08_27_03_world_gameobject.sql @@ -0,0 +1,6 @@ +-- Spawn Blackened Urn (194092) GO based on sniff by Aokromes +SET @GUID := 334; -- Set by TDB team + +DELETE FROM `gameobject` WHERE `id`=194092; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@GUID,194092,532,1,1,-11126.87,-1874.455,91.47264,6.056293,0,0,-0.113203,0.9935719,180,100,1); -- cgit v1.2.3 From f50ad5dd990d07e7a64e325b3002e91d65fc30fc Mon Sep 17 00:00:00 2001 From: gadge Date: Mon, 27 Aug 2012 16:41:07 +0100 Subject: DB/Quests: Set correct relations for quest The Conqueror's Task Ref #1006 --- sql/updates/world/2012_08_27_04_world_quest_template.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2012_08_27_04_world_quest_template.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_04_world_quest_template.sql b/sql/updates/world/2012_08_27_04_world_quest_template.sql new file mode 100644 index 00000000000..9169a6e5862 --- /dev/null +++ b/sql/updates/world/2012_08_27_04_world_quest_template.sql @@ -0,0 +1 @@ +UPDATE `quest_template` SET `NextQuestId`=12257 WHERE `ID`=12468; -- cgit v1.2.3 From 543ec0c02a991cc9c484514eaf1cef90b4b9fe87 Mon Sep 17 00:00:00 2001 From: WishToDie Date: Mon, 27 Aug 2012 17:03:21 +0100 Subject: DB/SAI: (BT) Fix quest A Race Against Time Closes #1074 --- sql/updates/world/2012_08_27_05_world_sai.sql | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sql/updates/world/2012_08_27_05_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_05_world_sai.sql b/sql/updates/world/2012_08_27_05_world_sai.sql new file mode 100644 index 00000000000..7aa5d8d1429 --- /dev/null +++ b/sql/updates/world/2012_08_27_05_world_sai.sql @@ -0,0 +1,56 @@ +-- A Race Against Time (11671) + +SET @NPC_SALRAND := 25584; -- Inquisitor Salrand +SET @NPC_BERYL_INVISMAN := 25594; -- Beryl Point InvisMan +SET @GOB_BERYL_SHIELD := 187773; -- Beryl Shield +SET @GOB_BERYL_SHIELD_FOCUS := 300176; -- TEMP Beryl Force Shield +SET @SPELL_BEAM := 45777; -- Salrand's Beam +SET @SPELL_THROW_DETONATOR := 45780; -- Throw Beryl Shield Detonator +SET @SPELL_SUMMON_DETONATOR := 45791; -- Summon Beryl Detonator +SET @SPELL_EXPLOSION := 45796; -- Beryl Shield Explosion +SET @SPELL_LOCKBOX := 45809; -- Summon Salrand's Lockbox +SET @GUID := 60441; -- used for a wrong go spawn,will reuse + +UPDATE `gameobject_template` SET `data1`=80 WHERE `entry`=300176; -- spell focus radius +UPDATE `gameobject_template` SET `flags`=32 WHERE `entry`=187773; -- shield:nodespawn flag + +-- missing spell focus +DELETE FROM `gameobject` WHERE `guid`=@GUID; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(@GUID,@GOB_BERYL_SHIELD_FOCUS,571,1,1,3392.85,6161.089,79.8313,0,0,0,0,0,300,0,1); + +UPDATE `creature_template` SET `InhabitType`=0x4,`unit_flags`=0x100,`AIName`='SmartAI' WHERE `entry`=@NPC_SALRAND; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_BERYL_INVISMAN; + +DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_SALRAND; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@NPC_SALRAND,0,0x0,0x1,'45775'); + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NPC_SALRAND; +DELETE FROM `smart_scripts` WHERE (`source_type`=0 AND `entryorguid` IN (@NPC_SALRAND,@NPC_BERYL_INVISMAN)) OR (`source_type`=9 AND `entryorguid` IN (@NPC_SALRAND*100,@NPC_BERYL_INVISMAN*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 +(@NPC_SALRAND,0,0,0,38,0,100,1,1,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On data 1 1 - Say'), +(@NPC_SALRAND,0,1,2,38,0,100,1,1,2,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On data 1 2 - Say'), +(@NPC_SALRAND,0,2,0,61,0,100,1,0,0,0,0,80,@NPC_SALRAND*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'On link - Run script'), +(@NPC_SALRAND,0,3,4,6,0,100,1,0,0,0,0,11,@SPELL_LOCKBOX,0,0,0,0,0,1,0,0,0,0,0,0,0,'On death - Cast spell'), +(@NPC_SALRAND,0,4,0,61,0,100,1,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'On death - Say'), +(@NPC_SALRAND,0,5,0,11,0,100,1,0,0,0,0,24,0,0,0,0,0,0,15,0,0,0,0,0,0,0,'On respawn - Evade'), +(@NPC_SALRAND*100,9,0,0,0,0,100,0,0,0,0,0,60,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On script - set fly off'), +(@NPC_SALRAND*100,9,1,0,0,0,100,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,3392.852,6161.092,79.83095,0,'On script - Move to pos'), +(@NPC_SALRAND*100,9,2,0,0,0,100,0,3000,3000,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'On script - Set unit flags'), +-- +(@NPC_BERYL_INVISMAN,0,0,0,8,0,100,0,@SPELL_THROW_DETONATOR,0,0,0,80,@NPC_BERYL_INVISMAN*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'On spellhit - Run Script'), +(@NPC_BERYL_INVISMAN*100,9,0,0,0,0,100,0,0,0,0,0,11,@SPELL_SUMMON_DETONATOR,0,0,0,0,0,1,0,0,0,0,0,0,0,'On script - Cast Spell'), +(@NPC_BERYL_INVISMAN*100,9,1,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,19,@NPC_SALRAND,100,0,0,0,0,0,'On script - Set Data'), +(@NPC_BERYL_INVISMAN*100,9,2,0,0,0,100,0,8000,8000,0,0,45,1,2,0,0,0,0,19,@NPC_SALRAND,100,0,0,0,0,0,'On script - Set Data'), +(@NPC_BERYL_INVISMAN*100,9,3,0,0,0,100,0,2000,2000,0,0,11,@SPELL_EXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0,'On script - Cast Spell'); + +DELETE FROM `creature_text` WHERE `entry`=@NPC_SALRAND; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_SALRAND,0,0,'What is the meaning of this disturbance?!',14,0,100,0,0,0,'Inquisitor Salrand to Beryl Point InvisMan'), +(@NPC_SALRAND,1,0,'Who dares interrupt my work!? Show yourself, coward!',14,0,100,0,0,0,'Inquisitor Salrand to Beryl Point InvisMan'), +(@NPC_SALRAND,2,0,'I''ve destroyed the key! Your cherished archmage belongs to Malygos!',12,0,100,0,0,0,'Inquisitor Salrand'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_DETONATOR; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,@SPELL_DETONATOR,0,0,31,0,3,@NPC_BERYL_INVISMAN,0,0,0,'','Throw Beryl Shield Detonator target npc'); -- cgit v1.2.3 From 09821b495322fab0bfa16829f56a1156b06e6fd0 Mon Sep 17 00:00:00 2001 From: Nay Date: Mon, 27 Aug 2012 17:24:18 +0100 Subject: SQLS: Fix a typo --- sql/updates/world/2012_08_27_05_world_sai.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_05_world_sai.sql b/sql/updates/world/2012_08_27_05_world_sai.sql index 7aa5d8d1429..3da0143e6e6 100644 --- a/sql/updates/world/2012_08_27_05_world_sai.sql +++ b/sql/updates/world/2012_08_27_05_world_sai.sql @@ -51,6 +51,6 @@ INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`pr (@NPC_SALRAND,1,0,'Who dares interrupt my work!? Show yourself, coward!',14,0,100,0,0,0,'Inquisitor Salrand to Beryl Point InvisMan'), (@NPC_SALRAND,2,0,'I''ve destroyed the key! Your cherished archmage belongs to Malygos!',12,0,100,0,0,0,'Inquisitor Salrand'); -DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_DETONATOR; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_THROW_DETONATOR; INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES -(13,1,@SPELL_DETONATOR,0,0,31,0,3,@NPC_BERYL_INVISMAN,0,0,0,'','Throw Beryl Shield Detonator target npc'); +(13,1,@SPELL_THROW_DETONATOR,0,0,31,0,3,@NPC_BERYL_INVISMAN,0,0,0,'','Throw Beryl Shield Detonator target npc'); -- cgit v1.2.3 From 41a62da6b5dd3f420f24728cb3d5e0ca6e3e99b7 Mon Sep 17 00:00:00 2001 From: Trista Date: Mon, 27 Aug 2012 18:09:16 +0100 Subject: DB/SAI: (HF) Fix quest The Shining Light Closes #1230 --- sql/updates/world/2012_08_27_06_world_sai.sql | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 sql/updates/world/2012_08_27_06_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_06_world_sai.sql b/sql/updates/world/2012_08_27_06_world_sai.sql new file mode 100644 index 00000000000..8b1aafd1558 --- /dev/null +++ b/sql/updates/world/2012_08_27_06_world_sai.sql @@ -0,0 +1,43 @@ +-- Fix {Q/A} The Shining Light ID: 11288 +-- Makes it blizzlike timed 10 minutes +UPDATE `quest_template` SET `LimitTime`=600 WHERE `id`=11288; +-- Decomposing Ghoul SAI +SET @Ghoul := 24177; +SET @SpellTrigger := 43202; +SET @Spell := 43203; +SET @Ares := 24189; +UPDATE `creature_template` SET `AIname`='SmartAI' WHERE `entry`=@Ghoul; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Ghoul; +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 +(@Ghoul,0,0,0,1,0,100,0,20000,300000,50000,350000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Decomposing Ghoul - Occ - Say random text'), +(@Ghoul,0,1,2,8,0,100,0,@Spell,0,0,0,18,33685506,0,0,0,0,0,1,0,0,0,0,0,0,0,'Decomposing Ghoul - On hit by spell - Set unit flag for not targetable'), +(@Ghoul,0,2,3,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Decomposing Ghoul - Linked with previous event - Switch faction to clear aggro'), +(@Ghoul,0,3,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Decomposing Ghoul - Linked with previous event - Say random text'), +(@Ghoul,0,4,5,1,0,100,0,3500,3500,3500,3500,19,33685506,0,0,0,0,0,1,0,0,0,0,0,0,0,'Decomposing Ghoul - OOC for 3,5 sec - Remove unit flag'), +(@Ghoul,0,5,0,61,0,100,0,0,0,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Decomposing Ghoul - Linked with previous event - Change faction back to 14'); +-- Add SAI for Ares - quest giver +UPDATE `creature_template` SET `AIname`='SmartAI' WHERE `entry`=@Ares; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Ares; +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 +(@Ares,0,0,0,19,0,100,0,11288,0,0,0,85,@SpellTrigger,0,0,0,0,0,7,0,0,0,0,0,0,0,'Ares - On target quest accepted 11288 - Cast spell Shining Light'); +-- Decomposing Ghoul texts +DELETE FROM `creature_text` WHERE `entry`=@Ghoul; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@Ghoul,0,1,'Light... light so bright...',12,0,50,0,0,0,'Decomposing Ghoul - On spell hit'), +(@Ghoul,0,2,'ARGHHHH...',12,0,50,0,0,0,'Decomposing Ghoul - On spell hit'), +(@Ghoul,0,3,'Away... go...',12,0,50,0,0,0,'Decomposing Ghoul - On spell hit'), +(@Ghoul,0,4,'Bad light... hurt...',12,0,50,0,0,0,'Decomposing Ghoul - On spell hit'), +(@Ghoul,0,5,'BURNS! IT BURNS!',12,0,50,0,0,0,'Decomposing Ghoul - On spell hit'), +(@Ghoul,1,1,'So... Hungry...',12,0,50,0,0,0,'Decomposing Ghoul - OOC'), +(@Ghoul,1,2,'Closer... come closer...',12,0,50,0,0,0,'Decomposing Ghoul - OOC'), +(@Ghoul,1,3,'FEED ME...',12,0,50,0,0,0,'Decomposing Ghoul - OOC'), +(@Ghoul,1,4,'FOOD! EAT YOU!',12,0,50,0,0,0,'Decomposing Ghoul - OOC'), +(@Ghoul,1,5,'BRAINNNS!',12,0,50,0,0,0,'Decomposing Ghoul - OOC'); +-- Add conditions for spell Shining Light to hit only Ghouls +DELETE FROM `conditions` WHERE `SourceEntry`=@Spell AND `SourceTypeOrReferenceId`=13; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,@Spell,0,0,31,0,3,@Ghoul,0,0,0,'', 'Shinning Light can only hit Decomposing Ghouls'); +-- Add conditions for spell Shining Light to be available only, if on quest +DELETE FROM `conditions` WHERE `SourceEntry`=@Spell AND `SourceTypeOrReferenceId`=17; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17,0,@Spell,0,0,9,0,11288,0,0,0,0,'', 'Shinning Light can only hit targets on the quest'); -- cgit v1.2.3 From 11b91ef2e9457473e2370d848dde644a44558761 Mon Sep 17 00:00:00 2001 From: Trista Date: Mon, 27 Aug 2012 18:37:55 +0100 Subject: DB/Spells: (SB) Fix quest The Angry Gorloc Closes #1288 --- sql/updates/world/2012_08_27_07_world_spell_area.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2012_08_27_07_world_spell_area.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_07_world_spell_area.sql b/sql/updates/world/2012_08_27_07_world_spell_area.sql new file mode 100644 index 00000000000..18be6ff0dbe --- /dev/null +++ b/sql/updates/world/2012_08_27_07_world_spell_area.sql @@ -0,0 +1,4 @@ +-- Fix quest - The Angry Gorloc ID: 12578 +DELETE FROM `spell_area` WHERE `spell`=54057; +INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) VALUES +(54057, 4297, 12578, 1, 12578, 0, 0, 2, 1); -- cgit v1.2.3 From 5f2c73d3a82d0cb12881e26045eecae6fde954ef Mon Sep 17 00:00:00 2001 From: nelegalno Date: Mon, 27 Aug 2012 18:44:54 +0100 Subject: DB: (Db) Fix quest Fire Upon the Waters Thanks to wispeckt, zxbiohazardzx and Svannon Closes #1344 --- sql/updates/world/2012_08_27_08_world_misc.sql | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sql/updates/world/2012_08_27_08_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_08_world_misc.sql b/sql/updates/world/2012_08_27_08_world_misc.sql new file mode 100644 index 00000000000..62a57cd42de --- /dev/null +++ b/sql/updates/world/2012_08_27_08_world_misc.sql @@ -0,0 +1,29 @@ +-- Fire Upon the Waters (12243) quest fix +-- add Fire Upon the Waters Kill Credit Bunny at sail locations +SET @GUID =42887; +DELETE FROM `creature` WHERE `id`=28013; +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 +(@GUID+0,28013,571,1,1,0,0,2488.86,-400.017,19.0803,2.99498,300,0,0,42,0,0,0,33554432,0), +(@GUID+1,28013,571,1,1,0,0,2458.96,-401.066,20.7778,0.108631,300,0,0,42,0,0,0,33554432,0); + +-- SAI +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28013; +DELETE FROM `smart_scripts` WHERE `entryorguid`=28013 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 +(28013,0,0,0,8,0,100,0,48455,0,0,0,33,28013,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fire Upon the Waters Kill Credit Bunny - On SpellHit Apothecary's Burning Water - Call KilledMonster Fire Upon the Waters Kill Credit Bunny"); + +-- Ensure spell only works on Fire Upon the Waters Kill Credit Bunny +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=48455; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,48455,0,0,31,0,3,28013,0,0,0,'',"Fire Upon the Waters - spell to Fire Upon the Waters Kill Credit Bunny"); + +-- add quest item loot to Captain Shely +DELETE FROM `creature_loot_template` WHERE `entry`=27232; +INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES +(27232,37305,-100,1,0,1,1), -- Captain Shely's Rutters +(27232,43851,25,1,0,1,1), -- Fur Clothing Scraps +(27232,33470,10,1,0,1,3), -- Frostweave Cloth +(27232,33443,5,1,0,1,1), -- Sour Goat Cheese +(27232,33444,2,1,0,1,1), -- Pungent Seal Whey +(27232,22829,1,1,0,1,1), -- Super Healing Potion +(27232,45912,0.05,1,0,1,1); -- Book Glyph of Mastery -- cgit v1.2.3 From fe970b1c1ebe519b8312fb17e61dd17fcea99d15 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Mon, 27 Aug 2012 19:56:07 +0200 Subject: DB/Conditions: Fix 'Foam Sword Attack' / 'Foam Sword Attack' targets --- sql/updates/world/2012_08_27_09_world_conditions.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sql/updates/world/2012_08_27_09_world_conditions.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_09_world_conditions.sql b/sql/updates/world/2012_08_27_09_world_conditions.sql new file mode 100644 index 00000000000..6d536859060 --- /dev/null +++ b/sql/updates/world/2012_08_27_09_world_conditions.sql @@ -0,0 +1,8 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (62973,62991); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,3,62973,0,0, 1,0,62972,0,0,0,0,'','Foam Sword Attack'), +(13,3,62973,0,0,31,0,4,0,0,0,0,'','Foam Sword Attack'), +(13,3,62973,0,0,33,0,1,0,0,1,0,'','Foam Sword Attack'), +(13,3,62991,0,0, 1,0,62972,0,0,0,0,'','Bonked!'), +(13,3,62991,0,0,31,0,4,0,0,0,0,'','Bonked!'), +(13,3,62991,0,0,33,0,1,0,0,1,0,'','Bonked!'); -- cgit v1.2.3 From 7e2d007e0d842326b139fb7ef345d0036d244978 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Mon, 27 Aug 2012 19:57:26 +0200 Subject: Core/Spells: Fix 'Foam Sword Rack' mechanic --- .../2012_08_27_10_world_spell_script_names.sql | 4 + src/server/game/Spells/SpellEffects.cpp | 11 --- src/server/scripts/Spells/spell_generic.cpp | 92 ++++++++++++++++++++++ 3 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 sql/updates/world/2012_08_27_10_world_spell_script_names.sql (limited to 'sql') diff --git a/sql/updates/world/2012_08_27_10_world_spell_script_names.sql b/sql/updates/world/2012_08_27_10_world_spell_script_names.sql new file mode 100644 index 00000000000..9ffb153f498 --- /dev/null +++ b/sql/updates/world/2012_08_27_10_world_spell_script_names.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`IN (64142,62991); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(64142,'spell_gen_upper_deck_create_foam_sword'), +(62991,'spell_gen_bonked'); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 11356e8b155..a5e24ff1cec 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -4281,17 +4281,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) unitTarget->CastSpell(unitTarget, spellTarget[urand(0, 4)], true); break; } - case 64142: // Upper Deck - Create Foam Sword - if (unitTarget->GetTypeId() != TYPEID_PLAYER) - return; - Player* player = unitTarget->ToPlayer(); - static uint32 const itemId[] = {45061, 45176, 45177, 45178, 45179, 0}; - // player can only have one of these items - for (uint32 const* itr = &itemId[0]; *itr; ++itr) - if (player->HasItemCount(*itr, 1, true)) - return; - DoCreateItem(effIndex, itemId[urand(0, 4)]); - return; } break; } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 9cbf81b39af..5eebb69d7a5 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -3076,6 +3076,96 @@ class spell_gen_mount : public SpellScriptLoader uint32 _mount310; }; +enum FoamSword +{ + ITEM_FOAM_SWORD_GREEN = 45061, + ITEM_FOAM_SWORD_PINK = 45176, + ITEM_FOAM_SWORD_BLUE = 45177, + ITEM_FOAM_SWORD_RED = 45178, + ITEM_FOAM_SWORD_YELLOW = 45179, + + SPELL_BONKED = 62991, + SPELL_FOAM_SWORD_DEFEAT = 62994, + SPELL_ON_GUARD = 62972, +}; + +class spell_gen_upper_deck_create_foam_sword : public SpellScriptLoader +{ + public: + spell_gen_upper_deck_create_foam_sword() : SpellScriptLoader("spell_gen_upper_deck_create_foam_sword") { } + + class spell_gen_upper_deck_create_foam_sword_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_upper_deck_create_foam_sword_SpellScript); + + void HandleScript(SpellEffIndex effIndex) + { + if (Player* player = GetHitPlayer()) + { + static uint32 const itemId[5] = { ITEM_FOAM_SWORD_GREEN, ITEM_FOAM_SWORD_PINK, ITEM_FOAM_SWORD_BLUE, ITEM_FOAM_SWORD_RED, ITEM_FOAM_SWORD_YELLOW }; + // player can only have one of these items + for (uint8 i = 0; i < 5; ++i) + { + if (player->HasItemCount(itemId[i], 1, true)) + return; + } + + CreateItem(effIndex, itemId[urand(0, 4)]); + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_upper_deck_create_foam_sword_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_upper_deck_create_foam_sword_SpellScript(); + } +}; + +class spell_gen_bonked : public SpellScriptLoader +{ + public: + spell_gen_bonked() : SpellScriptLoader("spell_gen_bonked") { } + + class spell_gen_bonked_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_bonked_SpellScript); + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Player* target = GetHitPlayer()) + { + Aura const* aura = GetHitAura(); + if (!(aura && aura->GetStackAmount() == 3)) + return; + + target->CastSpell(target, SPELL_FOAM_SWORD_DEFEAT, true); + target->RemoveAurasDueToSpell(SPELL_BONKED); + + if (Aura const* aura = target->GetAura(SPELL_ON_GUARD)) + { + if (Item* item = target->GetItemByGuid(aura->GetCastItemGUID())) + target->DestroyItemCount(item->GetEntry(), 1, true); + } + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_gen_bonked_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_gen_bonked_SpellScript(); + } +}; + void AddSC_generic_spell_scripts() { new spell_gen_absorb0_hitlimit1(); @@ -3148,4 +3238,6 @@ void AddSC_generic_spell_scripts() new spell_gen_mount("spell_blazing_hippogryph", 0, 0, 0, SPELL_BLAZING_HIPPOGRYPH_150, SPELL_BLAZING_HIPPOGRYPH_280); new spell_gen_mount("spell_celestial_steed", 0, SPELL_CELESTIAL_STEED_60, SPELL_CELESTIAL_STEED_100, SPELL_CELESTIAL_STEED_150, SPELL_CELESTIAL_STEED_280, SPELL_CELESTIAL_STEED_310); new spell_gen_mount("spell_x53_touring_rocket", 0, 0, 0, SPELL_X53_TOURING_ROCKET_150, SPELL_X53_TOURING_ROCKET_280, SPELL_X53_TOURING_ROCKET_310); + new spell_gen_upper_deck_create_foam_sword(); + new spell_gen_bonked(); } -- cgit v1.2.3