mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 22:27:34 +01:00
Scripts: Update Silithus Wind Stones (#27700)
* Despawn Wind Stone after use, allow it to respawn (remove GO_FLAG_NODESPAWN on initialize) * Re-check twilight set aura on GossipSelect (don't allow to summon without wearing set) * Fix spell Abyssal Punisment (24803) not casting when interacting with stone without required items * Fix miniboss not despawning after leaving combat * Fix possible exploit of spawning many minibosses from a single wind stone spawn * Improve creature scripts * Set correct respawn time for wind stones Closes #27698 Closes #26814
This commit is contained in:
112
sql/updates/world/3.3.5/2022_02_04_00_world.sql
Normal file
112
sql/updates/world/3.3.5/2022_02_04_00_world.sql
Normal file
@@ -0,0 +1,112 @@
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (15209,15211,15212,15307,15206,15207,15208,15220,15203,15204,15205,15305) AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1520300,1520600,1520900) AND `source_type` = 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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(1520300,9,0,0,0,0,100,0,0,0,0,0,0,11,25035,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Script - Cast 'Elemental Spawn-in'"),
|
||||
(1520300,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Script - Set Orientation Summoner"),
|
||||
(1520300,9,2,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Script - Say Line 0"),
|
||||
(1520300,9,3,0,0,0,100,0,8000,8000,0,0,0,144,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Script - Set ImmunePC Off"),
|
||||
(1520300,9,4,0,0,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Script - Start Attack Summoner"),
|
||||
|
||||
(1520600,9,0,0,0,0,100,0,0,0,0,0,0,11,25035,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Script - Cast 'Elemental Spawn-in'"),
|
||||
(1520600,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Script - Set Orientation Summoner"),
|
||||
(1520600,9,2,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Script - Say Line 0"),
|
||||
(1520600,9,3,0,0,0,100,0,8000,8000,0,0,0,144,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Script - Set ImmunePC Off"),
|
||||
(1520600,9,4,0,0,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Script - Start Attack Summoner"),
|
||||
|
||||
(1520900,9,0,0,0,0,100,0,0,0,0,0,0,11,25035,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Crimson Templar - On Script - Cast 'Elemental Spawn-in'"),
|
||||
(1520900,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Crimson Templar - On Script - Set Orientation Summoner"),
|
||||
(1520900,9,2,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Crimson Templar - On Script - Say Line 0"),
|
||||
(1520900,9,3,0,0,0,100,0,8000,8000,0,0,0,144,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Crimson Templar - On Script - Set ImmunePC Off"),
|
||||
(1520900,9,4,0,0,0,100,0,0,0,0,0,0,49,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Crimson Templar - On Script - Start Attack Summoner"),
|
||||
|
||||
-- High Council
|
||||
(15203,0,0,0,11,0,100,0,0,0,0,0,0,80,1520300,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Spawn - Run Script"),
|
||||
(15203,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Prince Skaldrenox - On Evade - Despawn"),
|
||||
(15203,0,2,0,0,0,100,0,10000,15000,10000,15000,0,11,15284,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Prince Skaldrenox - In Combat - Cast 'Cleave'"),
|
||||
(15203,0,3,0,0,0,100,0,15000,15000,30000,30000,0,11,25049,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Prince Skaldrenox - In Combat - Cast 'Blastwave'"),
|
||||
(15203,0,4,0,0,0,100,0,10000,20000,10000,20000,0,11,25050,0,0,0,0,0,5,0,0,0,0,0,0,0,0,"Prince Skaldrenox - In Combat - Cast 'Mark of Flames'"),
|
||||
|
||||
(15204,0,0,0,11,0,100,0,0,0,0,0,0,80,1520300,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"High Marshal Whirlaxis - On Spawn - Run Script"),
|
||||
(15204,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"High Marshal Whirlaxis - On Evade - Despawn"),
|
||||
(15204,0,2,0,60,0,100,0,0,25000,25000,35000,0,11,25020,32,0,0,0,0,1,0,0,0,0,0,0,0,0,"High Marshal Whirlaxis - On Update - Cast 'Lightning Shield'"),
|
||||
(15204,0,3,0,0,0,100,0,15000,25000,15000,25000,0,11,20627,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"High Marshal Whirlaxis - In Combat - Cast 'Lightning Breath'"),
|
||||
(15204,0,4,0,0,0,100,0,25000,35000,25000,35000,0,11,25060,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"High Marshal Whirlaxis - In Combat - Cast 'Updraft'"),
|
||||
|
||||
(15205,0,0,0,11,0,100,0,0,0,0,0,0,80,1520300,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Baron Kazum - On Spawn - Run Script"),
|
||||
(15205,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Baron Kazum - On Evade - Despawn"),
|
||||
(15205,0,2,0,0,0,100,0,10000,15000,10000,15000,0,11,17547,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Baron Kazum - In Combat - Cast 'Mortal Strike'"),
|
||||
(15205,0,3,0,0,0,100,0,15000,25000,15000,25000,0,11,19129,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Baron Kazum - In Combat - Cast 'Massive Tremor'"),
|
||||
(15205,0,4,0,0,0,100,0,25000,35000,25000,35000,0,11,25056,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Baron Kazum - In Combat - Cast 'Stomp'"),
|
||||
-- Sunder Armor was removed at some point in vanilla
|
||||
-- No aura here for Thrash
|
||||
(15305,0,0,0,11,0,100,0,0,0,0,0,0,80,1520300,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lord Skwol - On Spawn - Run Script"),
|
||||
(15305,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lord Skwol - On Evade - Despawn"),
|
||||
(15305,0,2,0,0,0,100,0,10000,15000,10000,15000,0,11,3391,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lord Skwol - In Combat - Cast 'Thrash'"),
|
||||
(15305,0,3,0,0,0,100,0,10000,15000,20000,30000,0,11,25053,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Lord Skwol - In Combat - Cast 'Venom Spit'"),
|
||||
|
||||
-- The Duke
|
||||
(15206,0,0,0,11,0,100,0,0,0,0,0,0,80,1520600,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Spawn - Run Script"),
|
||||
(15206,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Cynders - On Evade - Despawn"),
|
||||
(15206,0,2,0,0,0,100,0,15000,20000,20000,25000,0,11,18399,0,0,0,0,0,5,0,0,0,0,0,0,0,0,"The Duke of Cynders - In Combat - Cast 'Flamestrike'"),
|
||||
(15206,0,3,0,0,0,100,0,10000,15000,20000,25000,0,11,22424,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Cynders - In Combat - Cast 'Blast Wave'"),
|
||||
(15206,0,4,0,0,0,100,0,15000,25000,15000,25000,0,11,25028,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"The Duke of Cynders - In Combat - Cast 'Fire Blast'"),
|
||||
-- No aura here for Thrash
|
||||
(15207,0,0,0,11,0,100,0,0,0,0,0,0,80,1520600,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Fathoms - On Spawn - Run Script"),
|
||||
(15207,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Fathoms - On Evade - Despawn"),
|
||||
(15207,0,2,0,0,0,100,0,10000,15000,10000,15000,0,11,3391,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Fathoms - In Combat - Cast 'Thrash'"),
|
||||
(15207,0,3,0,0,0,100,0,10000,15000,15000,20000,0,11,16790,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"The Duke of Fathoms - In Combat - Cast 'Knockdown'"),
|
||||
(15207,0,4,0,0,0,100,0,15000,20000,20000,25000,0,11,18670,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"The Duke of Fathoms - In Combat - Cast 'Knock Away'"),
|
||||
|
||||
(15208,0,0,0,11,0,100,0,0,0,0,0,0,80,1520600,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Shards - On Spawn - Run Script"),
|
||||
(15208,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Shards - On Evade - Despawn"),
|
||||
(15208,0,2,0,0,0,100,0,5000,10000,5000,10000,0,11,13446,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"The Duke of Shards - In Combat - Cast 'Strike'"),
|
||||
(15208,0,3,0,0,0,100,0,10000,15000,15000,20000,0,11,8078,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Shards - In Combat - Cast 'Thunderclap'"),
|
||||
(15208,0,4,0,0,0,100,0,15000,25000,15000,25000,0,11,6524,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Shards - In Combat - Cast 'Ground Tremor'"),
|
||||
|
||||
(15220,0,0,0,11,0,100,0,0,0,0,0,0,80,1520600,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Zephyrs - On Spawn - Run Script"),
|
||||
(15220,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Zephyrs - On Evade - Despawn"),
|
||||
(15220,0,2,0,0,0,100,0,15000,20000,20000,30000,0,11,12882,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Duke of Zephyrs - In Combat - Cast 'Wing Flap'"),
|
||||
(15220,0,3,0,0,0,100,0,10000,15000,15000,25000,0,11,15535,0,0,0,0,0,5,0,0,0,0,0,0,0,0,"The Duke of Zephyrs - In Combat - Cast 'Enveloping Winds'"),
|
||||
(15220,0,4,0,0,0,100,0,10000,15000,10000,20000,0,11,25034,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"The Duke of Zephyrs - In Combat - Cast 'Forked Lightning'"),
|
||||
|
||||
-- Templar
|
||||
(15209,0,0,0,11,0,100,0,0,0,0,0,0,80,1520900,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Crimson Templar - On Spawn - Run Script"),
|
||||
(15209,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Crimson Templar - On Evade - Despawn"),
|
||||
(15209,0,2,0,0,0,100,0,10000,15000,10000,15000,0,11,11989,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Crimson Templar - In Combat - Cast 'Fireball Volley'"),
|
||||
(15209,0,3,0,0,0,100,0,5000,10000,5000,10000,0,11,16536,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Crimson Templar - In Combat - Cast 'Flame Buffet'"),
|
||||
|
||||
(15211,0,0,0,11,0,100,0,0,0,0,0,0,80,1520900,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Azure Templar - On Spawn - Run Script"),
|
||||
(15211,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Azure Templar - On Evade - Despawn"),
|
||||
(15211,0,2,0,0,0,100,0,5000,10000,10000,15000,0,11,12548,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Azure Templar - In Combat - Cast 'Frost Shock'"),
|
||||
(15211,0,3,0,0,0,100,0,10000,15000,15000,20000,0,11,14907,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Azure Templar - In Combat - Cast 'Frost Nova'"),
|
||||
|
||||
(15212,0,0,0,11,0,100,0,0,0,0,0,0,80,1520900,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Hoary Templar - On Spawn - Run Script"),
|
||||
(15212,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Hoary Templar - On Evade - Despawn"),
|
||||
(15212,0,2,0,60,0,100,0,0,10000,10000,15000,0,11,25020,32,0,0,0,0,1,0,0,0,0,0,0,0,0,"Hoary Templar - On Update - Cast 'Lightning Shield'"),
|
||||
(15212,0,3,0,0,0,100,0,10000,15000,10000,15000,0,11,2610,2,0,0,0,0,2,0,0,0,0,0,0,0,0,"Hoary Templar - In Combat - Cast 'Shock'"),
|
||||
|
||||
(15307,0,0,0,11,0,100,0,0,0,0,0,0,80,1520900,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Earthen Templar - On Spawn - Run Script"),
|
||||
(15307,0,1,0,7,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Earthen Templar - On Evade - Despawn"),
|
||||
(15307,0,2,0,0,0,100,0,10000,15000,15000,25000,0,11,18813,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Earthen Templar - In Combat - Cast 'Knock Away'"),
|
||||
(15307,0,3,0,0,0,100,0,5000,10000,15000,25000,0,11,22127,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Earthen Templar - In Combat - Cast 'Entangling Roots'");
|
||||
|
||||
--
|
||||
UPDATE `gameobject` SET `spawntimesecs` = 300 WHERE `id` IN (180456,180518,180529,180544,180549,180564);
|
||||
UPDATE `gameobject` SET `spawntimesecs` = 10800 WHERE `id` IN (180466,180539,180559);
|
||||
|
||||
-- Credit: vmangos
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 2.28571, `BaseAttackTime` = 2500, `unit_flags` = 256 WHERE `entry` = 15203;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 2.28571, `unit_flags` = 256 WHERE `entry` = 15204;
|
||||
UPDATE `creature_template` SET `speed_walk` = 0.777776, `speed_run` = 2.28571, `BaseAttackTime` = 3000, `unit_flags` = 256 WHERE `entry` = 15205;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15206;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15207;
|
||||
UPDATE `creature_template` SET `speed_walk` = 0.777776, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15208;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15209;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1.55556, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15211;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15212;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15220;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1, `speed_run` = 1.71429, `BaseAttackTime` = 2000, `unit_flags` = 256 WHERE `entry` = 15305;
|
||||
UPDATE `creature_template` SET `speed_walk` = 1.55556, `speed_run` = 1.71429, `unit_flags` = 256 WHERE `entry` = 15307;
|
||||
|
||||
UPDATE `creature_template_addon` SET `bytes2` = 1, `auras` = '19818' WHERE `entry` = 15204;
|
||||
@@ -1059,8 +1059,7 @@ enum WSSpells
|
||||
SPELL_ROYAL_EARTH = 24792,
|
||||
SPELL_ROYAL_WATER = 24793,
|
||||
|
||||
SPELL_PUNISHMENT = 24803,
|
||||
SPELL_SPAWN_IN = 25035
|
||||
SPELL_PUNISHMENT = 24803
|
||||
};
|
||||
|
||||
enum WSGossip
|
||||
@@ -1131,13 +1130,6 @@ enum WS
|
||||
AIR = 0x8
|
||||
};
|
||||
|
||||
enum WSTexts
|
||||
{
|
||||
SAY_TEMPLAR_AGGRO = 0,
|
||||
SAY_DUKE_AGGRO = 0,
|
||||
YELL_ROYAL_AGGRO = 0
|
||||
};
|
||||
|
||||
class go_wind_stone : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
@@ -1148,7 +1140,9 @@ class go_wind_stone : public GameObjectScript
|
||||
go_wind_stoneAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
private:
|
||||
uint8 GetPlayerRank(Player* player) // For random summoning
|
||||
bool isSummoning = false;
|
||||
|
||||
uint8 GetPlayerTwilightSetRank(Player* player) // For random summoning
|
||||
{
|
||||
bool setAura = player->HasAura(AURA_TWILIGHT_SET);
|
||||
bool medallionAura = player->HasAura(AURA_MEDALLION);
|
||||
@@ -1164,7 +1158,7 @@ class go_wind_stone : public GameObjectScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8 GetItems(Player* player, WS type)
|
||||
uint8 GetSummonItems(Player* player, WS type)
|
||||
{
|
||||
uint8 result = 0x0;
|
||||
|
||||
@@ -1214,41 +1208,25 @@ class go_wind_stone : public GameObjectScript
|
||||
|
||||
void SummonNPC(GameObject* go, Player* player, uint32 npc, uint32 spell)
|
||||
{
|
||||
player->CastSpell(player, spell);
|
||||
TempSummon* summons = go->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - float(M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10min);
|
||||
summons->CastSpell(summons, SPELL_SPAWN_IN, false);
|
||||
switch (summons->GetEntry())
|
||||
{
|
||||
case NPC_TEMPLAR_FIRE:
|
||||
case NPC_TEMPLAR_WATER:
|
||||
case NPC_TEMPLAR_AIR:
|
||||
case NPC_TEMPLAR_EARTH:
|
||||
summons->AI()->Talk(SAY_TEMPLAR_AGGRO, player);
|
||||
break;
|
||||
isSummoning = true;
|
||||
|
||||
case NPC_DUKE_FIRE:
|
||||
case NPC_DUKE_WATER:
|
||||
case NPC_DUKE_EARTH:
|
||||
case NPC_DUKE_AIR:
|
||||
summons->AI()->Talk(SAY_DUKE_AGGRO, player);
|
||||
break;
|
||||
case NPC_ROYAL_FIRE:
|
||||
case NPC_ROYAL_AIR:
|
||||
case NPC_ROYAL_EARTH:
|
||||
case NPC_ROYAL_WATER:
|
||||
summons->AI()->Talk(YELL_ROYAL_AGGRO, player);
|
||||
break;
|
||||
}
|
||||
summons->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
summons->EngageWithTarget(player);
|
||||
player->SummonCreature(npc, go->GetPositionX(), go->GetPositionY(), go->GetPositionZ(), player->GetOrientation() - float(M_PI), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5min);
|
||||
me->CastSpell(player, spell);
|
||||
me->DespawnOrUnsummon(1100ms);
|
||||
}
|
||||
|
||||
public:
|
||||
bool OnGossipHello(Player* player) override
|
||||
{
|
||||
uint8 rank = GetPlayerRank(player);
|
||||
// fix possible exploit
|
||||
if (isSummoning)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
uint8 rank = GetPlayerTwilightSetRank(player);
|
||||
|
||||
uint32 gossipId = me->GetGOInfo()->GetGossipMenuId();
|
||||
|
||||
switch (gossipId)
|
||||
{
|
||||
case GOSSIP_ID_LESSER_WS:
|
||||
@@ -1257,11 +1235,11 @@ class go_wind_stone : public GameObjectScript
|
||||
AddGossipItemFor(player, GOSSIP_ID_LESSER_WS, OPTION_ID_WS_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
else
|
||||
{
|
||||
me->CastSpell(player, SPELL_PUNISHMENT);
|
||||
player->CastSpell(player, SPELL_PUNISHMENT, true);
|
||||
break;
|
||||
}
|
||||
|
||||
uint8 item = GetItems(player, TEMPLAR);
|
||||
uint8 item = GetSummonItems(player, TEMPLAR);
|
||||
if (item & FIRE)
|
||||
AddGossipItemFor(player, GOSSIP_ID_LESSER_WS, OPTION_ID_1_CRIMSON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
if (item & WATER)
|
||||
@@ -1278,11 +1256,11 @@ class go_wind_stone : public GameObjectScript
|
||||
AddGossipItemFor(player, GOSSIP_ID_WIND_STONE, OPTION_ID_WS_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
else
|
||||
{
|
||||
me->CastSpell(player, SPELL_PUNISHMENT);
|
||||
player->CastSpell(player, SPELL_PUNISHMENT, true);
|
||||
break;
|
||||
}
|
||||
|
||||
uint8 item = GetItems(player, DUKE);
|
||||
uint8 item = GetSummonItems(player, DUKE);
|
||||
if (item & FIRE)
|
||||
AddGossipItemFor(player, GOSSIP_ID_WIND_STONE, OPTION_ID_1_CYNDERS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
if (item & WATER)
|
||||
@@ -1299,11 +1277,11 @@ class go_wind_stone : public GameObjectScript
|
||||
AddGossipItemFor(player, GOSSIP_ID_GREATER_WS, OPTION_ID_WS_RANDOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
|
||||
else
|
||||
{
|
||||
me->CastSpell(player, SPELL_PUNISHMENT);
|
||||
player->CastSpell(player, SPELL_PUNISHMENT, true);
|
||||
break;
|
||||
}
|
||||
|
||||
uint8 item = GetItems(player, ROYAL);
|
||||
uint8 item = GetSummonItems(player, ROYAL);
|
||||
if (item & FIRE)
|
||||
AddGossipItemFor(player, GOSSIP_ID_GREATER_WS, OPTION_ID_1_SKALDRENOX, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
|
||||
if (item & WATER)
|
||||
@@ -1328,54 +1306,107 @@ class go_wind_stone : public GameObjectScript
|
||||
ClearGossipMenuFor(player);
|
||||
player->PlayerTalkClass->SendCloseGossip();
|
||||
|
||||
// fix possible exploit
|
||||
if (isSummoning)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8 rank = GetPlayerTwilightSetRank(player);
|
||||
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
SummonNPC(me, player, RAND(NPC_TEMPLAR_WATER, NPC_TEMPLAR_FIRE, NPC_TEMPLAR_EARTH, NPC_TEMPLAR_AIR), SPELL_TEMPLAR_RANDOM);
|
||||
if (rank >= 1)
|
||||
{
|
||||
SummonNPC(me, player, RAND(NPC_TEMPLAR_WATER, NPC_TEMPLAR_FIRE, NPC_TEMPLAR_EARTH, NPC_TEMPLAR_AIR), SPELL_TEMPLAR_RANDOM);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
SummonNPC(me, player, NPC_TEMPLAR_FIRE, SPELL_TEMPLAR_FIRE);
|
||||
if (rank >= 1)
|
||||
{
|
||||
SummonNPC(me, player, NPC_TEMPLAR_FIRE, SPELL_TEMPLAR_FIRE);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
SummonNPC(me, player, NPC_TEMPLAR_WATER, SPELL_TEMPLAR_WATER);
|
||||
if (rank >= 1)
|
||||
{
|
||||
SummonNPC(me, player, NPC_TEMPLAR_WATER, SPELL_TEMPLAR_WATER);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
SummonNPC(me, player, NPC_TEMPLAR_EARTH, SPELL_TEMPLAR_EARTH);
|
||||
if (rank >= 1)
|
||||
{
|
||||
SummonNPC(me, player, NPC_TEMPLAR_EARTH, SPELL_TEMPLAR_EARTH);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 5:
|
||||
SummonNPC(me, player, NPC_TEMPLAR_AIR, SPELL_TEMPLAR_AIR);
|
||||
if (rank >= 1)
|
||||
{
|
||||
SummonNPC(me, player, NPC_TEMPLAR_AIR, SPELL_TEMPLAR_AIR);
|
||||
}
|
||||
break;
|
||||
|
||||
case GOSSIP_ACTION_INFO_DEF + 6:
|
||||
SummonNPC(me, player, RAND(NPC_DUKE_FIRE, NPC_DUKE_WATER, NPC_DUKE_EARTH, NPC_DUKE_AIR), SPELL_DUKE_RANDOM);
|
||||
if (rank >= 2)
|
||||
{
|
||||
SummonNPC(me, player, RAND(NPC_DUKE_FIRE, NPC_DUKE_WATER, NPC_DUKE_EARTH, NPC_DUKE_AIR), SPELL_DUKE_RANDOM);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 7:
|
||||
SummonNPC(me, player, NPC_DUKE_FIRE, SPELL_DUKE_FIRE);
|
||||
if (rank >= 2)
|
||||
{
|
||||
SummonNPC(me, player, NPC_DUKE_FIRE, SPELL_DUKE_FIRE);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 8:
|
||||
SummonNPC(me, player, NPC_DUKE_WATER, SPELL_DUKE_WATER);
|
||||
if (rank >= 2)
|
||||
{
|
||||
SummonNPC(me, player, NPC_DUKE_WATER, SPELL_DUKE_WATER);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 9:
|
||||
SummonNPC(me, player, NPC_DUKE_EARTH, SPELL_DUKE_EARTH);
|
||||
if (rank >= 2)
|
||||
{
|
||||
SummonNPC(me, player, NPC_DUKE_EARTH, SPELL_DUKE_EARTH);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 10:
|
||||
SummonNPC(me, player, NPC_DUKE_AIR, SPELL_DUKE_AIR);
|
||||
if (rank >= 2)
|
||||
{
|
||||
SummonNPC(me, player, NPC_DUKE_AIR, SPELL_DUKE_AIR);
|
||||
}
|
||||
break;
|
||||
|
||||
case GOSSIP_ACTION_INFO_DEF + 11:
|
||||
SummonNPC(me, player, RAND(NPC_ROYAL_FIRE, NPC_ROYAL_AIR, NPC_ROYAL_EARTH, NPC_ROYAL_WATER), SPELL_ROYAL_RANDOM);
|
||||
if (rank == 3)
|
||||
{
|
||||
SummonNPC(me, player, RAND(NPC_ROYAL_FIRE, NPC_ROYAL_AIR, NPC_ROYAL_EARTH, NPC_ROYAL_WATER), SPELL_ROYAL_RANDOM);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 12:
|
||||
SummonNPC(me, player, NPC_ROYAL_FIRE, SPELL_ROYAL_FIRE);
|
||||
if (rank == 3)
|
||||
{
|
||||
SummonNPC(me, player, NPC_ROYAL_FIRE, SPELL_ROYAL_FIRE);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 13:
|
||||
SummonNPC(me, player, NPC_ROYAL_WATER, SPELL_ROYAL_WATER);
|
||||
if (rank == 3)
|
||||
{
|
||||
SummonNPC(me, player, NPC_ROYAL_WATER, SPELL_ROYAL_WATER);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 14:
|
||||
SummonNPC(me, player, NPC_ROYAL_EARTH, SPELL_ROYAL_EARTH);
|
||||
if (rank == 3)
|
||||
{
|
||||
SummonNPC(me, player, NPC_ROYAL_EARTH, SPELL_ROYAL_EARTH);
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 15:
|
||||
SummonNPC(me, player, NPC_ROYAL_AIR, SPELL_ROYAL_AIR);
|
||||
if (rank == 3)
|
||||
{
|
||||
SummonNPC(me, player, NPC_ROYAL_AIR, SPELL_ROYAL_AIR);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1383,6 +1414,13 @@ class go_wind_stone : public GameObjectScript
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
// Allow despawning
|
||||
me->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
isSummoning = false;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
@@ -1422,8 +1460,7 @@ class spell_silithus_summon_cultist_periodic : public AuraScript
|
||||
|
||||
// All these spells trigger a spell that requires reagents; if the
|
||||
// triggered spell is cast as "triggered", reagents are not consumed
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST)).SetTriggeringAura(aurEff));
|
||||
GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST)).SetTriggeringAura(aurEff));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user