Merge branch 'master' into 4.3.4 (Added SQL to fix trinity_string conflict)
Conflicts: src/server/game/AI/EventAI/CreatureEventAIMgr.cpp src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Groups/Group.cpp src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Miscellaneous/Language.h src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/Auras/SpellAuras.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_kilnara.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
This commit is contained in:
@@ -51,6 +51,8 @@ include(CheckPlatform)
|
||||
find_package(PCHSupport)
|
||||
find_package(ACE REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if( NOT USE_MYSQL_SOURCES )
|
||||
find_package(MySQL REQUIRED)
|
||||
endif()
|
||||
|
||||
@@ -52,9 +52,10 @@ if(NOT WITH_WARNINGS)
|
||||
endif()
|
||||
|
||||
# Specify the maximum PreCompiled Header memory allocation limit
|
||||
# Fixes a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012, hence we need to set an upper limit with /Zm to avoid disrupancies)
|
||||
# Fixes a compiler-problem when using PCH - the /Ym flag is adjusted by the compiler in MSVC2012, hence we need to set an upper limit with /Zm to avoid discrepancies)
|
||||
# (And yes, this is a verified , unresolved bug with MSVC... *sigh*)
|
||||
string(REPLACE "/Zm1000" "/Zm500" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REGEX REPLACE "/Zm[0-9]+ *" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm500" CACHE STRING "" FORCE)
|
||||
|
||||
# Enable and treat as errors the following warnings to easily detect virtual function signature failures:
|
||||
# 'function' : member function does not override any base class virtual member function
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
SET @ENTRY := 176;
|
||||
DELETE FROM `trinity_string` WHERE `entry` IN(@ENTRY, @ENTRY+1);
|
||||
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
|
||||
(@ENTRY, 'Invalid gameobject type, must be a destructible building.'),
|
||||
(@ENTRY+1, 'Gameobject %s (GUID: %u) damaged %u (actual health: %u).');
|
||||
@@ -0,0 +1,473 @@
|
||||
-- NPCs
|
||||
SET @VOICE_OF_YOGG_SARON := 33280;
|
||||
SET @YOGG_SARON := 33288;
|
||||
SET @YOGG_SARON_H := 33955;
|
||||
SET @SARA := 33134;
|
||||
SET @SARA_H := 34332;
|
||||
SET @BRAIN_OF_YOGG_SARON := 33890;
|
||||
SET @BRAIN_OF_YOGG_SARON_H := 33954;
|
||||
SET @OMINOUS_CLOUD := 33292;
|
||||
SET @GUARDIAN_OF_YOGG_SARON := 33136;
|
||||
SET @GUARDIAN_OF_YOGG_SARON_H := 33968;
|
||||
SET @CORRUPTOR_TENTACLE := 33985;
|
||||
SET @CORRUPTOR_TENTACLE_H := 33986;
|
||||
SET @CONSTRICTOR_TENTACLE := 33983;
|
||||
SET @CONSTRICTOR_TENTACLE_H := 33984;
|
||||
SET @CRUSHER_TENTACLE := 33966;
|
||||
SET @CRUSHER_TENTACLE_H := 33967;
|
||||
SET @LAUGHING_SKULL := 33990;
|
||||
SET @DEATH_RAY := 33881;
|
||||
SET @DEATH_ORB := 33882;
|
||||
SET @GARONA := 33436;
|
||||
SET @KING_LLANE := 33437;
|
||||
SET @SUIT_OF_ARMOR := 33433;
|
||||
SET @THE_LICH_KING := 33441;
|
||||
SET @IMMOLATED_CHAMPION := 33442;
|
||||
SET @TURNED_CHAMPION := 33962;
|
||||
SET @DEATHSWORN_ZEALOT := 33567;
|
||||
SET @NELTHARION := 33523;
|
||||
SET @ALEXSTRASZA := 33536;
|
||||
SET @YSERA := 33495;
|
||||
SET @MALYGOS := 33535;
|
||||
SET @OBSIDIAN_CONSORT := 33720;
|
||||
SET @AZURE_CONSORT := 33717;
|
||||
SET @EMERALD_CONSORT := 33719;
|
||||
SET @RUBY_CONSORT := 33716;
|
||||
SET @YOGG_SARON_ILLUSIONS := 33552;
|
||||
SET @TRIGGER := 28332; -- Generic Trigger LAB (Large AOI), maybe to start illusion events?
|
||||
SET @FREYA_GOSSIP := 33241;
|
||||
SET @HODIR_GOSSIP := 33213;
|
||||
SET @THORIM_GOSSIP := 33242;
|
||||
SET @MIMIRON_GOSSIP := 33244;
|
||||
SET @FREYA_YS := 33410;
|
||||
SET @HODIR_YS := 33411;
|
||||
SET @MIMIRON_YS := 33412;
|
||||
SET @THORIM_YS := 33413;
|
||||
SET @IMMORTAL_GUARDIAN := 33988;
|
||||
SET @IMMORTAL_GUARDIAN_H := 33989;
|
||||
SET @MARKED_IMMORTAL_GUARDIAN := 36064;
|
||||
SET @MARKED_IMMORTAL_GUARDIAN_H := 36067;
|
||||
SET @SANITY_WELL := 33991;
|
||||
SET @INFLUENCE_TENTACLE := 33943;
|
||||
SET @INFLUENCE_TENTACLE_H := 33959;
|
||||
SET @DESCEND_INTO_MADNESS := 34072;
|
||||
|
||||
SET @GUID := 62015;
|
||||
|
||||
-- GameObjects
|
||||
SET @FLEE_TO_THE_SURFACE := 194625;
|
||||
SET @DRAGON_SOUL := 194462;
|
||||
SET @INSTANCE_PORTAL := 194338;
|
||||
SET @CHAIR := 194360;
|
||||
|
||||
SET @GO_GUID := 17800;
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry` IN (@SARA,@YOGG_SARON,@VOICE_OF_YOGG_SARON,@GARONA,@KING_LLANE,@THE_LICH_KING,@IMMOLATED_CHAMPION,@NELTHARION,@YSERA,@MALYGOS,@YOGG_SARON_ILLUSIONS,@FREYA_GOSSIP,@HODIR_GOSSIP,@THORIM_GOSSIP,@MIMIRON_GOSSIP,@OMINOUS_CLOUD,@BRAIN_OF_YOGG_SARON);
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@SARA,0,0,'Help me! Please get them off me!',14,0,100,0,0,15771,'Sara - SAY_SARA_ULDUAR_SCREAM_1'),
|
||||
(@SARA,1,0,'What do you want from me? Leave me alone!',14,0,100,0,0,15772,'Sara - SAY_SARA_ULDUAR_SCREAM_2'),
|
||||
(@SARA,2,0,'The time to strike at the head of the beast will soon be upon us! Focus your anger and hatred on his minions!',14,0,100,457,0,15775,'Sara - SAY_SARA_AGGRO'),
|
||||
(@SARA,3,0,'Yes! YES! Show them no mercy! Give no pause to your attacks!',14,0,100,0,0,15773,'Sara - SAY_SARA_FERVOR_HIT'),
|
||||
(@SARA,4,0,'Let hatred and rage guide your blows!',14,0,100,0,0,15774,'SAY_SARA_BLESSING_HIT'),
|
||||
(@SARA,5,0,'Could they have been saved?',14,0,100,0,0,15779,'Sara - SAY_SARA_KILL'),
|
||||
(@SARA,5,1,'Powerless to act...',14,0,100,0,0,15778,'Sara - SAY_SARA_KILL'),
|
||||
(@SARA,6,0,'I am the lucid dream.',14,0,100,457,0,15754,'Sara - SAY_SARA_TRANSFORM_1'),
|
||||
(@SARA,7,0,'The monster in your nightmares.',14,0,100,457,0,0,'Sara - SAY_SARA_TRANSFORM_2'),
|
||||
(@SARA,8,0,'The fiend of a thousand faces.',14,0,100,457,0,0,'Sara - SAY_SARA_TRANSFORM_3'),
|
||||
(@SARA,9,0,'Cower before my true form.',14,0,100,457,0,0,'Sara - SAY_SARA_TRANSFORM_4'),
|
||||
(@SARA,10,0,'Tremble, mortals, before the coming of the end!',14,0,100,0,0,15777,'Sara - SAY_SARA_DEATH_RAY'),
|
||||
(@SARA,11,0,'Suffocate upon your own hate!',14,0,100,0,0,15776,'Sara - SAY_SARA_PSYCHOSIS_HIT'),
|
||||
(@OMINOUS_CLOUD,0,0,'%s begins to boil upon touching $n!',16,0,100,0,0,0,'Ominous Cloud - EMOTE_OMINOUS_CLOUD_PLAYER_TOUCH'),
|
||||
(@YOGG_SARON,0,0,'BOW DOWN BEFORE THE GOD OF DEATH!',14,0,100,0,0,0,'Yogg-Saron - SAY_YOGG_SARON_SPAWN'),
|
||||
(@YOGG_SARON,1,0,'MADNESS WILL CONSUME YOU!',14,0,100,0,0,15756,'Yogg-Saron - SAY_YOGG_SARON_MADNESS'),
|
||||
(@YOGG_SARON,2,0,'Portals open into %s''s mind!',41,0,100,0,0,0,'Yogg-Saron - EMOTE_YOGG_SARON_MADNESS'),
|
||||
(@YOGG_SARON,3,0,'Look upon the true face of death and know that your end comes soon!',14,0,100,0,0,15755,'Yogg-Saron - SAY_YOGG_SARON_PHASE_3'),
|
||||
(@YOGG_SARON,4,0,'Eternal suffering awaits!',14,0,100,0,0,15758,'Yogg-Saron - SAY_YOGG_SARON_DEAFENING_ROAR'),
|
||||
(@YOGG_SARON,5,0,'%s opens his mouth wide!',41,0,100,0,0,0,'Yogg-Saron - EMOTE_YOGG_SARON_DEAFENING_ROAR'),
|
||||
(@YOGG_SARON,6,0,'Your fate is sealed. The end of days is finally upon you and ALL who inhabit this miserable little seedling. Uulwi ifis halahs gag erh''ongg w''ssh.',14,0,100,0,0,15761,'Yogg-Saron - SAY_YOGG_SARON_DEATH'),
|
||||
(@YOGG_SARON,7,0,'%s prepares to unleash Empowering Shadows!',41,0,100,0,0,0,'Yogg-Saron - EMOTE_YOGG_SARON_EMPOWERING_SHADOWS'),
|
||||
(@YOGG_SARON,8,0,'%s goes berserk, extinguishing all life!',41,0,100,0,0,0,'Yogg-Saron - EMOTE_YOGG_SARON_EXTINGUISH_ALL_LIFE'),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,'Weak-minded fools!',15,0,100,0,0,15780,'Voice of Yogg-Saron - WHISPER_VOICE_PHASE_1_WIPE'),
|
||||
(@VOICE_OF_YOGG_SARON,1,0,'Your will is no longer your own...',15,0,100,0,0,15759,'Voice of Yogg-Saron - WHISPER_VOICE_INSANE'),
|
||||
(@VOICE_OF_YOGG_SARON,1,1,'Destroy them minion, your master commands it!',15,0,100,0,0,15760,'Voice of Yogg-Saron - WHISPER_VOICE_INSANE'),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,'The illusion shatters and a path to the central chamber opens!',41,0,100,0,0,0,'Brain of Yogg-Saron - EMOTE_BRAIN_ILLUSION_SHATTERED'),
|
||||
(@GARONA,0,0,'Bad news sire.',12,0,100,66,0,15538,'Garona'),
|
||||
(@GARONA,1,0,'The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',12,0,100,274,0,15539,'Garona'),
|
||||
(@GARONA,2,0,'Gul''dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',12,0,100,1,0,15540,'Garona'),
|
||||
(@GARONA,3,0,'The orc leaders agree with your assessment.',12,0,100,0,0,15541,'Garona'),
|
||||
(@KING_LLANE,0,0,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',12,0,100,274,0,15585,'King Llane'),
|
||||
(@THE_LICH_KING,0,0,'Your resilience is admirable.',12,0,100,0,0,15598,'The Lich King'),
|
||||
(@THE_LICH_KING,1,0,'I will break you as I broke him.',12,0,100,0,0,15599,'The Lich King'),
|
||||
(@IMMOLATED_CHAMPION,0,0,'Arrrrrrgh!',14,0,100,0,0,15470,'Immolated Champion'),
|
||||
(@IMMOLATED_CHAMPION,1,0,'I''m not afraid of you!',12,0,100,0,0,15471,'Immolated Champion'),
|
||||
(@NELTHARION,0,0,'It is done... All have been given that which must be given. I now seal the Dragon Soul forever...',12,0,100,0,0,15631,'Neltharion'),
|
||||
(@NELTHARION,1,0,'For it to be as it must, yes.',12,0,100,273,0,15632,'Neltharion'),
|
||||
(@YSERA,0,0,'That terrible glow... should that be?',12,0,100,0,0,15702,'Ysera'), -- or sound 15784? they are the same
|
||||
(@MALYGOS,0,0,'It is a weapon like no other. It must be like no other.',12,0,100,1,0,15610,'Malygos'),
|
||||
(@YOGG_SARON_ILLUSIONS,0,0,'A thousand deaths... or one murder.',12,0,100,0,0,15762,'Yogg-Saron'), -- sound splited! 15763 - "or one murder".
|
||||
(@YOGG_SARON_ILLUSIONS,1,0,'Your petty quarrels only make me stronger!',12,0,100,0,0,15764,'Yogg-Saron'),
|
||||
(@YOGG_SARON_ILLUSIONS,2,0,'Yrr n''lyeth... shuul anagg!',12,0,100,0,0,15766,'Yogg-Saron'),
|
||||
(@YOGG_SARON_ILLUSIONS,3,0,'He will learn... no king rules forever; only death is eternal!',12,0,100,0,0,15767,'Yogg-Saron'),
|
||||
(@YOGG_SARON_ILLUSIONS,4,0,'His brood learned their lesson before too long. You will soon learn yours!',12,0,100,0,0,15765,'Yogg-Saron'),
|
||||
(@FREYA_GOSSIP,0,0,'As you wish, $N.',12,0,100,0,0,0,'Freya (Observation Ring) - On Gossip Select'),
|
||||
(@FREYA_GOSSIP,1,0,'Eonar, your servant calls for your blessing!',14,0,100,0,0,15535,'Freya (Observation Ring) - On Gossip Select'),
|
||||
(@HODIR_GOSSIP,0,0,'As you wish, $N.',12,0,100,0,0,0,'Hodir (Observation Ring) - On Gossip Select'),
|
||||
(@HODIR_GOSSIP,1,0,'The veil of winter will protect you, champions!',14,0,100,0,0,15559,'Hodir (Observation Ring) - On Gossip Select'),
|
||||
(@THORIM_GOSSIP,0,0,'As you wish, $N.',12,0,100,0,0,0,'Thorim (Observation Ring) - On Gossip Select'),
|
||||
(@THORIM_GOSSIP,1,0,'Golganneth, lend me your strengh! Grant my mortal allies the power of thunder!',14,0,100,0,0,15750,'Thorim (Observation Ring) - On Gossip Select'),
|
||||
(@MIMIRON_GOSSIP,0,0,'As you wish, $N.',12,0,100,0,0,0,'Mimiron (Observation Ring) - On Gossip Select'),
|
||||
(@MIMIRON_GOSSIP,1,0,'Combat matrix enhanced. Behold wonderous rapidity!',14,0,100,0,0,15630,'Mimiron (Observation Ring) - On Gossip Select');
|
||||
|
||||
DELETE FROM `npc_text` WHERE `ID` IN (14332,14333);
|
||||
INSERT INTO `npc_text` (`ID`,`text0_0`,`text0_1`,`lang0`,`prob0`,`em0_0`,`em0_1`,`em0_2`,`em0_3`,`em0_4`,`em0_5`,`text1_0`,`text1_1`,`lang1`,`prob1`,`em1_0`,`em1_1`,`em1_2`,`em1_3`,`em1_4`,`em1_5`,`text2_0`,`text2_1`,`lang2`,`prob2`,`em2_0`,`em2_1`,`em2_2`,`em2_3`,`em2_4`,`em2_5`,`text3_0`,`text3_1`,`lang3`,`prob3`,`em3_0`,`em3_1`,`em3_2`,`em3_3`,`em3_4`,`em3_5`,`text4_0`,`text4_1`,`lang4`,`prob4`,`em4_0`,`em4_1`,`em4_2`,`em4_3`,`em4_4`,`em4_5`,`text5_0`,`text5_1`,`lang5`,`prob5`,`em5_0`,`em5_1`,`em5_2`,`em5_3`,`em5_4`,`em5_5`,`text6_0`,`text6_1`,`lang6`,`prob6`,`em6_0`,`em6_1`,`em6_2`,`em6_3`,`em6_4`,`em6_5`,`text7_0`,`text7_1`,`lang7`,`prob7`,`em7_0`,`em7_1`,`em7_2`,`em7_3`,`em7_4`,`em7_5`,`WDBVerified`) VALUES
|
||||
(14332,'Mortals, I am indebted to you for freeing me from the terrible corruption that besets this place. Though I have not yet recovered fully, I can help you battle Yogg-Saron.$B$BI can grant you and your friends the Resilience of Nature, increasing your damage and increasing healing taken from spells and effects. In addition, I can conjure Sanity Wells that will allow you to recover your Sanity when your grip on reality falters.','',0,1,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,1),
|
||||
(14333,'Mortals, I am indebted to you for freeing me from the terrible corruption that besets this place. Though I have not yet recovered fully, I can help you battle Yogg-Saron.$B$BI can grant you and your friends the Fury of the Storm, increasing your damage and maximum health. Should you be faced with evil so malevolent that it cannot be destroyed, I can channel all my power into a final Titanic Storm that will destroy even Immortals.','',0,1,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,'','',0,0,0,0,0,0,0,0,1);
|
||||
|
||||
DELETE FROM `gossip_menu` WHERE `entry` IN (10324,10333,10335,10336,10337);
|
||||
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
|
||||
(10324,14332),
|
||||
(10333,14325),
|
||||
(10335,14326),
|
||||
(10337,14333),
|
||||
(10336,14334);
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10324,10333,10335,10336,10337);
|
||||
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
|
||||
(10324,0,0,'Lend us your aid, keeper. Together we will defeat Yogg-Saron.',1,1,10333,0,0,0,''),
|
||||
(10333,0,0,'Yes.',1,1,0,0,0,0,''), -- not sure if this menu_id is shared for all keepers
|
||||
(10335,0,0,'Lend us your aid, keeper. Together we will defeat Yogg-Saron.',1,1,10333,0,0,0,''),
|
||||
(10337,0,0,'Lend us your aid, keeper. Together we will defeat Yogg-Saron.',1,1,10333,0,0,0,''),
|
||||
(10336,0,0,'Lend us your aid, keeper. Together we will defeat Yogg-Saron.',1,1,10333,0,0,0,'');
|
||||
|
||||
DELETE FROM `gameobject` WHERE `id` IN (@FLEE_TO_THE_SURFACE,@DRAGON_SOUL,@INSTANCE_PORTAL+0,@INSTANCE_PORTAL+1,@CHAIR+0,@CHAIR+1,@CHAIR+2,@CHAIR+3,@CHAIR+4,@CHAIR+5);
|
||||
DELETE FROM `gameobject` WHERE `guid` BETWEEN @GO_GUID+0 AND @GO_GUID+11;
|
||||
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
|
||||
(@GO_GUID+0,@FLEE_TO_THE_SURFACE,603,3,1,1999.761,-57.29888,243.5464,0,0,0,0,1,604800,0,0),
|
||||
(@GO_GUID+1,@FLEE_TO_THE_SURFACE,603,3,1,1943.855,-25.59109,243.7952,0,0,0,0,1,604800,0,0),
|
||||
(@GO_GUID+2,@FLEE_TO_THE_SURFACE,603,3,1,2000.26,5.519748,243.1853,0,0,0,0,1,604800,0,0),
|
||||
(@GO_GUID+3,@DRAGON_SOUL,603,3,1,2104.028,-25.21278,242.6467,0,0,0,0,1,604800,0,0),
|
||||
(@GO_GUID+4,@INSTANCE_PORTAL+0,603,2,1,2178.255,-24.15329,248.345,3.141593,0,0,-1,0,604800,0,0),
|
||||
(@GO_GUID+5,@INSTANCE_PORTAL+1,603,1,1,2178.255,-24.15329,248.345,3.141593,0,0,-1,0,604800,0,0),
|
||||
(@GO_GUID+6,@CHAIR+0,603,3,1,1954.696,91.8725,239.6242,5.989951,0,0,-0.1460924,0.9892709,604800,0,0),
|
||||
(@GO_GUID+7,@CHAIR+1,603,3,1,1961.835,65.23161,239.6471,3.686116,0,0,-0.9631653,0.2689101,604800,0,0),
|
||||
(@GO_GUID+8,@CHAIR+2,603,3,1,1886.634,72.21145,239.6242,1.713894,0,0,0.755847,0.6547483,604800,0,0),
|
||||
(@GO_GUID+9,@CHAIR+3,603,3,1,1944.326,106.1581,239.6471,3.686116,0,0,-0.9631653,0.2689101,604800,0,0),
|
||||
(@GO_GUID+10,@CHAIR+4,603,3,1,1899.228,45.58289,239.6471,1.417184,0,0,0.6507654,0.7592788,604800,0,0),
|
||||
(@GO_GUID+11,@CHAIR+5,603,3,1,1923.472,28.16412,239.6471,2.289849,0,0,0.9106789,0.413115,604800,0,0);
|
||||
|
||||
DELETE FROM `creature` WHERE `id` IN (@VOICE_OF_YOGG_SARON,@SARA,@BRAIN_OF_YOGG_SARON,@OMINOUS_CLOUD,@LAUGHING_SKULL,@THE_LICH_KING,@IMMOLATED_CHAMPION,@DEATHSWORN_ZEALOT,@GARONA,@KING_LLANE,@SUIT_OF_ARMOR,@NELTHARION,@MALYGOS,@ALEXSTRASZA,@YSERA,@OBSIDIAN_CONSORT,@AZURE_CONSORT,@EMERALD_CONSORT,@RUBY_CONSORT,@YOGG_SARON_ILLUSIONS,@TRIGGER,@SANITY_WELL);
|
||||
DELETE FROM `creature` WHERE `guid` BETWEEN @GUID+0 AND @GUID+7;
|
||||
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,@VOICE_OF_YOGG_SARON,603,3,1,0,0,1980.137,-25.74376,326.4671,0,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+1,@SARA,603,3,1,0,0,1980.43,-25.7708,329.3963,3.124139,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+2,@BRAIN_OF_YOGG_SARON,603,3,1,0,0,1981.622,-25.89063,261.6898,0.1047198,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+3,@SANITY_WELL,603,3,1,0,0,1899.941,0.330621,332.2957,0,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+4,@SANITY_WELL,603,3,1,0,0,1900.478,-51.23861,332.1303,0,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+5,@SANITY_WELL,603,3,1,0,0,1987.125,-91.27024,330.1858,0,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+6,@SANITY_WELL,603,3,1,0,0,1975.885,40.02165,331.0996,0,604800,0,0,0,0,0,0,0,0),
|
||||
(@GUID+7,@SANITY_WELL,603,3,1,0,0,2042.559,-40.3667,329.2744,0,604800,0,0,0,0,0,0,0,0);
|
||||
-- (@GUID+8,@TRIGGER,603,3,1,0,0,,604800,0,0,0,0,0,0,0,0), -- spawn was not found in sniffs (Icecrown vision)
|
||||
-- (@GUID+9,@TRIGGER,603,3,1,0,0,1928.978,67.9108,242.4596,0,604800,0,0,0,0,0,0,0,0),
|
||||
-- (@GUID+10,@TRIGGER,603,3,1,0,0,2113.323,-28.4375,242.8768,0,604800,0,0,0,0,0,0,0,0);
|
||||
|
||||
DELETE FROM `creature_summon_groups` WHERE `summonerId` IN (@VOICE_OF_YOGG_SARON,@BRAIN_OF_YOGG_SARON);
|
||||
INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES
|
||||
(@VOICE_OF_YOGG_SARON,0,0,@OMINOUS_CLOUD,1993.538,-17.93403,324.9728,0,6,0),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,@OMINOUS_CLOUD,1968.158,-42.65644,324.9676,0,6,0),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,@OMINOUS_CLOUD,1952.901,-27.36388,325.6934,0,6,0),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,@OMINOUS_CLOUD,1991.673,-65.39913,328.3430,0,6,0),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,@OMINOUS_CLOUD,2018.573,4.088733,328.8741,0,6,0),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,@OMINOUS_CLOUD,2034.443,-25.29962,329.0554,0,6,0),
|
||||
(@VOICE_OF_YOGG_SARON,0,1,@DESCEND_INTO_MADNESS,1964.596,-42.70562,325.0845,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,1,@DESCEND_INTO_MADNESS,1986.936,-46.21083,324.9798,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,1,@DESCEND_INTO_MADNESS,1989.495,-6.69694,325.0786,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,1,@DESCEND_INTO_MADNESS,1965.521,-8.089301,324.9476,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,2,@DESCEND_INTO_MADNESS,2000.841,-25.40006,325.192,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,2,@DESCEND_INTO_MADNESS,1960.216,-26.14138,325.0096,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,2,@DESCEND_INTO_MADNESS,1976.303,-47.82541,325.1116,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,2,@DESCEND_INTO_MADNESS,1997.688,-37.46083,325.039,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,2,@DESCEND_INTO_MADNESS,1998.07,-13.35666,325.1668,0,3,60000),
|
||||
(@VOICE_OF_YOGG_SARON,0,2,@DESCEND_INTO_MADNESS,1976.992,-3.959093,325.1694,0,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@NELTHARION,2117.713,-25.27073,242.73,3.141593,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@MALYGOS,2107.963,-37.29351,242.73,2.024582,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@ALEXSTRASZA,2092.347,-25.26042,242.7301,6.265732,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@YSERA,2109.765,-14.37967,242.73,4.206244,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@OBSIDIAN_CONSORT,2146.88,-17.03125,239.8058,3.351032,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@OBSIDIAN_CONSORT,2146.24,-34.40451,239.8058,3.01942,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@AZURE_CONSORT,2113.33,-65.71007,239.8058,1.780236,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@AZURE_CONSORT,2139.83,-50.28646,239.8058,2.460914,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@EMERALD_CONSORT,2116.931,11.375,239.8058,4.415683,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@EMERALD_CONSORT,2136.641,-1.996528,239.8058,3.839724,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@RUBY_CONSORT,2069.479,-5.699653,239.8058,5.427974,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@RUBY_CONSORT,2069.298,-43.53168,239.8006,0.4712389,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@YOGG_SARON_ILLUSIONS,2109.695,-25.09549,222.3250,0,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2134.533,18.86881,239.8042,1.850049,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2063.156,27.95839,244.2707,5.288348,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2070.133,-73.0108,242.5237,1.308997,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2135.219,-41.44271,239.8027,5.846853,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2088.254,5.053657,239.8672,0.9948376,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2119.228,1.421441,239.8039,0,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,@LAUGHING_SKULL,2102.441,-75.04541,239.8635,1.658063,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@THE_LICH_KING,1908.557,-152.4427,240.0719,4.328416,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@IMMOLATED_CHAMPION,1903.599,-160.3576,240.1064,1.082104,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@TURNED_CHAMPION,1919.113,-160.9657,240.0659,2.700784,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1917.559,-135.7448,240.0730,4.188790,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1919.125,-140.9566,240.0730,3.979351,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1948.469,-136.2951,240.0707,3.438299,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1956.444,-138.4028,240.1078,3.368485,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1952.965,-130.5295,240.1347,3.804818,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1902.132,-111.3594,240.0698,4.852015,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1905.326,-104.7865,240.0523,4.764749,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1897.345,-106.6076,240.1444,4.939282,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@DEATHSWORN_ZEALOT,1912.129,-136.9340,240.0730,4.188790,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@YOGG_SARON_ILLUSIONS,1906.226,-155.8941,223.4727,0,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1863.897,-100.9364,240.073,5.235988,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1948.668,-152.4481,240.073,1.919862,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1932.213,-93.62798,240.073,4.852015,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1964.457,-149.5943,240.073,3.385939,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1992.463,-131.2119,240.073,3.455752,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1901.194,-90.4624,240.073,0.1396263,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1923.746,-164.5339,240.073,3.455752,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,1,@LAUGHING_SKULL,1905.937,-133.1651,240.073,5.77704,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@GARONA,1931.064,60.5659,241.5013,2.084251,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@KING_LLANE,1928.349,66.05186,242.4596,5.113815,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1956.503,72.19462,239.7495,3.281219,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1951.04,49.88875,239.7495,2.495821,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1931.14,38.46949,239.7495,1.710423,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1908.993,44.26659,239.7495,0.9250245,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1897.344,64.31419,239.7495,0.1396263,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1903.393,86.60285,239.7495,5.61996,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1923.342,98.01228,239.7495,4.834562,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@SUIT_OF_ARMOR,1945.442,92.17952,239.7495,4.049164,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@YOGG_SARON_ILLUSIONS,1929.160,67.75694,221.7322,0,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@LAUGHING_SKULL,1941.561,109.4812,239.7496,3.316126,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@LAUGHING_SKULL,1922.55,54.68001,241.1263,0.1919862,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@LAUGHING_SKULL,1893.146,44.24343,239.7496,0,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@LAUGHING_SKULL,1926.526,43.26215,239.7496,0.9948376,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@LAUGHING_SKULL,1904.3,73.70443,239.7496,4.276057,3,60000),
|
||||
(@BRAIN_OF_YOGG_SARON,0,2,@LAUGHING_SKULL,1955.173,85.26153,239.7496,4.049164,3,60000);
|
||||
|
||||
-- ScriptNames
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_voice_of_yogg_saron' WHERE `entry`=@VOICE_OF_YOGG_SARON;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=@YOGG_SARON;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_sara' WHERE `entry`=@SARA;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_brain_of_yogg_saron' WHERE `entry`=@BRAIN_OF_YOGG_SARON;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_ominous_cloud' WHERE `entry`=@OMINOUS_CLOUD;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_guardian_of_yogg_saron' WHERE `entry`=@GUARDIAN_OF_YOGG_SARON;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_immortal_guardian' WHERE `entry` IN (@IMMORTAL_GUARDIAN,@MARKED_IMMORTAL_GUARDIAN);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_corruptor_tentacle' WHERE `entry`=@CORRUPTOR_TENTACLE;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_constrictor_tentacle' WHERE `entry`=@CONSTRICTOR_TENTACLE;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_crusher_tentacle' WHERE `entry`=@CRUSHER_TENTACLE; -- should have UNIT_FLAG_PACIFIED? but it breaks tentacle's AI
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_descend_into_madness' WHERE `entry`=@DESCEND_INTO_MADNESS;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_influence_tentacle' WHERE `entry` IN (@SUIT_OF_ARMOR,@DEATHSWORN_ZEALOT,@RUBY_CONSORT,@EMERALD_CONSORT,@OBSIDIAN_CONSORT,@AZURE_CONSORT,@INFLUENCE_TENTACLE);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_observation_ring_keeper' WHERE `entry` IN (@FREYA_GOSSIP,@HODIR_GOSSIP,@THORIM_GOSSIP,@MIMIRON_GOSSIP);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_yogg_saron_keeper' WHERE `entry` IN (@FREYA_YS,@HODIR_YS,@THORIM_YS,@MIMIRON_YS);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_laughing_skull' WHERE `entry`=@LAUGHING_SKULL;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_yogg_saron_illusions' WHERE `entry`=@YOGG_SARON_ILLUSIONS;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_garona' WHERE `entry`=@GARONA;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_turned_champion' WHERE `entry`=@TURNED_CHAMPION;
|
||||
|
||||
-- Difficulty entries
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@BRAIN_OF_YOGG_SARON_H WHERE `entry`=@BRAIN_OF_YOGG_SARON;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@GUARDIAN_OF_YOGG_SARON_H WHERE `entry`=@GUARDIAN_OF_YOGG_SARON;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@CORRUPTOR_TENTACLE_H WHERE `entry`=@CORRUPTOR_TENTACLE;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@CONSTRICTOR_TENTACLE_H WHERE `entry`=@CONSTRICTOR_TENTACLE;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@CRUSHER_TENTACLE_H WHERE `entry`=@CRUSHER_TENTACLE;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@IMMORTAL_GUARDIAN_H WHERE `entry`=@IMMORTAL_GUARDIAN;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@MARKED_IMMORTAL_GUARDIAN_H WHERE `entry`=@MARKED_IMMORTAL_GUARDIAN;
|
||||
UPDATE `creature_template` SET `difficulty_entry_1`=@INFLUENCE_TENTACLE_H WHERE `entry`=@INFLUENCE_TENTACLE;
|
||||
|
||||
-- creature_template updates
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=10324,`npcflag`=1 WHERE `entry`=@FREYA_GOSSIP;
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=10335,`npcflag`=1 WHERE `entry`=@HODIR_GOSSIP;
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=10337,`npcflag`=1 WHERE `entry`=@THORIM_GOSSIP;
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=10336,`npcflag`=1 WHERE `entry`=@MIMIRON_GOSSIP;
|
||||
UPDATE `creature_template` SET `minlevel`=81,`maxlevel`=81,`unit_flags`=33554432 WHERE `entry`=@SANITY_WELL;
|
||||
UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`minlevel`=80,`maxlevel`=80,`unit_flags`=33554432 WHERE `entry` IN (@VOICE_OF_YOGG_SARON,@DEATH_ORB);
|
||||
UPDATE `creature_template` SET `faction_A`=14,`faction_H`=14,`minlevel`=81,`maxlevel`=81,`unit_flags`=33554432 WHERE `entry` IN (@LAUGHING_SKULL,@DEATH_RAY);
|
||||
UPDATE `creature_template` SET `faction_A`=16,`faction_H`=16,`minlevel`=82,`maxlevel`=82 WHERE `entry` IN (@CRUSHER_TENTACLE,@CRUSHER_TENTACLE_H);
|
||||
UPDATE `creature_template` SET `exp`=2,`faction_A`=16,`faction_H`=16,`minlevel`=82,`maxlevel`=82 WHERE `entry` IN (@GUARDIAN_OF_YOGG_SARON,@GUARDIAN_OF_YOGG_SARON_H);
|
||||
UPDATE `creature_template` SET `faction_A`=190,`faction_H`=190,`minlevel`=82,`maxlevel`=82 WHERE `entry` IN (@SUIT_OF_ARMOR,@DEATHSWORN_ZEALOT,@RUBY_CONSORT,@EMERALD_CONSORT,@OBSIDIAN_CONSORT,@AZURE_CONSORT,@INFLUENCE_TENTACLE,@INFLUENCE_TENTACLE_H);
|
||||
UPDATE `creature_template` SET `faction_A`=16,`faction_H`=16 WHERE `entry` IN (@YOGG_SARON,@YOGG_SARON_H,@BRAIN_OF_YOGG_SARON,@BRAIN_OF_YOGG_SARON_H,@IMMORTAL_GUARDIAN,@IMMORTAL_GUARDIAN_H,@CONSTRICTOR_TENTACLE,@CONSTRICTOR_TENTACLE_H,@CORRUPTOR_TENTACLE,@CORRUPTOR_TENTACLE_H);
|
||||
UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (@SARA,@SARA_H,@BRAIN_OF_YOGG_SARON,@BRAIN_OF_YOGG_SARON_H,@VOICE_OF_YOGG_SARON,@DEATH_ORB);
|
||||
UPDATE `creature_template` SET `minlevel`=60,`maxlevel`=60,`unit_flags`=33554688,`InhabitType`=4 WHERE `entry`=@YOGG_SARON_ILLUSIONS;
|
||||
UPDATE `creature_template` SET `npcflag`=16777216 WHERE `entry`=@DESCEND_INTO_MADNESS;
|
||||
|
||||
-- Creature immunities
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask`=617299839 WHERE `entry` IN (@YOGG_SARON,@YOGG_SARON_H,@BRAIN_OF_YOGG_SARON,@BRAIN_OF_YOGG_SARON_H);
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask`=13312063 WHERE `entry` IN (@CRUSHER_TENTACLE,@CRUSHER_TENTACLE_H,@CONSTRICTOR_TENTACLE,@CONSTRICTOR_TENTACLE_H,@CORRUPTOR_TENTACLE,@CORRUPTOR_TENTACLE_H,@SUIT_OF_ARMOR,@DEATHSWORN_ZEALOT,@RUBY_CONSORT,@EMERALD_CONSORT,@OBSIDIAN_CONSORT,@AZURE_CONSORT,@INFLUENCE_TENTACLE,@INFLUENCE_TENTACLE_H);
|
||||
|
||||
UPDATE `creature_model_info` SET `bounding_radius`=0.31,`combat_reach`=33 WHERE `modelid`=28951;
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` IN (@OMINOUS_CLOUD,@VOICE_OF_YOGG_SARON,@BRAIN_OF_YOGG_SARON,@BRAIN_OF_YOGG_SARON_H,@SARA,@SARA_H,@DEATH_ORB,@DEATHSWORN_ZEALOT);
|
||||
INSERT INTO `creature_template_addon`(`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(@OMINOUS_CLOUD,0,0,0,0,0,'63029'),
|
||||
(@VOICE_OF_YOGG_SARON,0,0,50331648,0,0,''),
|
||||
(@BRAIN_OF_YOGG_SARON,0,0,33554432,0,0,''),
|
||||
(@BRAIN_OF_YOGG_SARON_H,0,0,33554432,0,0,''),
|
||||
(@SARA,0,0,50331648,0,0,''),
|
||||
(@SARA_H,0,0,50331648,0,0,''),
|
||||
(@DEATH_ORB,0,0,50331648,0,0,''),
|
||||
(@DEATHSWORN_ZEALOT,0,0,8,0,0,'');
|
||||
|
||||
DELETE FROM `spell_dbc` WHERE `Id`=63029;
|
||||
INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`AttributesEx2`,`AttributesEx3`,`AttributesEx4`,`AttributesEx5`,`AttributesEx6`,`AttributesEx7`,`Stances`,`StancesNot`,`Targets`,`CastingTimeIndex`,`AuraInterruptFlags`,`ProcFlags`,`ProcChance`,`ProcCharges`,`MaxLevel`,`BaseLevel`,`SpellLevel`,`DurationIndex`,`RangeIndex`,`StackAmount`,`EquippedItemClass`,`EquippedItemSubClassMask`,`EquippedItemInventoryTypeMask`,`Effect1`,`Effect2`,`Effect3`,`EffectDieSides1`,`EffectDieSides2`,`EffectDieSides3`,`EffectRealPointsPerLevel1`,`EffectRealPointsPerLevel2`,`EffectRealPointsPerLevel3`,`EffectBasePoints1`,`EffectBasePoints2`,`EffectBasePoints3`,`EffectMechanic1`,`EffectMechanic2`,`EffectMechanic3`,`EffectImplicitTargetA1`,`EffectImplicitTargetA2`,`EffectImplicitTargetA3`,`EffectImplicitTargetB1`,`EffectImplicitTargetB2`,`EffectImplicitTargetB3`,`EffectRadiusIndex1`,`EffectRadiusIndex2`,`EffectRadiusIndex3`,`EffectApplyAuraName1`,`EffectApplyAuraName2`,`EffectApplyAuraName3`,`EffectAmplitude1`,`EffectAmplitude2`,`EffectAmplitude3`,`EffectMultipleValue1`,`EffectMultipleValue2`,`EffectMultipleValue3`,`EffectMiscValue1`,`EffectMiscValue2`,`EffectMiscValue3`,`EffectMiscValueB1`,`EffectMiscValueB2`,`EffectMiscValueB3`,`EffectTriggerSpell1`,`EffectTriggerSpell2`,`EffectTriggerSpell3`,`EffectSpellClassMaskA1`,`EffectSpellClassMaskA2`,`EffectSpellClassMaskA3`,`EffectSpellClassMaskB1`,`EffectSpellClassMaskB2`,`EffectSpellClassMaskB3`,`EffectSpellClassMaskC1`,`EffectSpellClassMaskC2`,`EffectSpellClassMaskC3`,`MaxTargetLevel`,`SpellFamilyName`,`SpellFamilyFlags1`,`SpellFamilyFlags2`,`SpellFamilyFlags3`,`MaxAffectedTargets`,`DmgClass`,`PreventionType`,`DmgMultiplier1`,`DmgMultiplier2`,`DmgMultiplier3`,`AreaGroupId`,`SchoolMask`,`Comment`) VALUES
|
||||
(63029,0,0,0x00000100,0x10000000,0,0,0,0,0,0,0,0,0,1,0,0,101,0,0,70,70,21,1,0,-1,0,0,6,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,23,0,0,1000,0,0,0,0,0,0,0,0,0,0,0,63030,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,'Ominous Cloud - SPELL_BOIL_OMINOUSLY_PERIODIC');
|
||||
|
||||
DELETE FROM `spelldifficulty_dbc` WHERE `id` IN (63795,62714,64468,64159,64125);
|
||||
INSERT INTO `spelldifficulty_dbc` (`id`,`spellid0`,`spellid1`,`spellid2`,`spellid3`) VALUES
|
||||
(63795,63795,65301,0,0),
|
||||
(62714,62714,65209,0,0),
|
||||
(64468,64468,64486,0,0),
|
||||
(64159,64159,64160,0,0),
|
||||
(64125,64125,64126,0,0);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (62650,62670,62671,62702,63030,63050,63120,63305,63802,63830,63881,63984,64125,64174,64465,64466,64467,64132,64131,64161,63744,63745,63747,65206,64172,64059,64069,65238,63882,63993,64010,64013,64012,64148,64164,64168,64184,63795,63803,65301,64555);
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(62650,'spell_yogg_saron_keeper_aura'),
|
||||
(62670,'spell_yogg_saron_keeper_aura'),
|
||||
(62671,'spell_yogg_saron_keeper_aura'),
|
||||
(62702,'spell_yogg_saron_keeper_aura'),
|
||||
(63030,'spell_yogg_saron_boil_ominously'),
|
||||
(63050,'spell_yogg_saron_sanity'),
|
||||
(63120,'spell_yogg_saron_insane'),
|
||||
(63305,'spell_yogg_saron_grim_reprisal'),
|
||||
(63802,'spell_yogg_saron_brain_link'),
|
||||
(63803,'spell_yogg_saron_brain_link_damage'),
|
||||
(63795,'spell_yogg_saron_psychosis'),
|
||||
(65301,'spell_yogg_saron_psychosis'),
|
||||
(63830,'spell_yogg_saron_malady_of_the_mind'),
|
||||
(63881,'spell_yogg_saron_malady_of_the_mind'),
|
||||
(63984,'spell_yogg_saron_hate_to_zero'),
|
||||
(64125,'spell_yogg_saron_squeeze'),
|
||||
(64174,'spell_yogg_saron_hodirs_protective_gaze'),
|
||||
(64465,'spell_yogg_saron_shadow_beacon'),
|
||||
(64466,'spell_yogg_saron_empowering_shadows_range_check'),
|
||||
(64467,'spell_yogg_saron_empowering_shadows_missile'),
|
||||
(64132,'spell_yogg_saron_constrictor_tentacle'),
|
||||
(64131,'spell_yogg_saron_lunge'),
|
||||
(64161,'spell_yogg_saron_empowered'),
|
||||
(63744,'spell_yogg_saron_target_selectors'),
|
||||
(63745,'spell_yogg_saron_target_selectors'),
|
||||
(63747,'spell_yogg_saron_target_selectors'),
|
||||
(65206,'spell_yogg_saron_target_selectors'),
|
||||
(64172,'spell_yogg_saron_titanic_storm'),
|
||||
(64059,'spell_yogg_saron_induce_madness'),
|
||||
(64069,'spell_yogg_saron_match_health'),
|
||||
(65238,'spell_yogg_saron_shattered_illusion'),
|
||||
(63882,'spell_yogg_saron_death_ray_warning_visual'),
|
||||
(63993,'spell_yogg_saron_cancel_illusion_room_aura'),
|
||||
(64010,'spell_yogg_saron_nondescript'),
|
||||
(64013,'spell_yogg_saron_nondescript'),
|
||||
(64012,'spell_yogg_saron_revealed_tentacle'),
|
||||
(64148,'spell_yogg_saron_diminsh_power'),
|
||||
(64164,'spell_yogg_saron_lunatic_gaze'),
|
||||
(64168,'spell_yogg_saron_lunatic_gaze'),
|
||||
(64184,'spell_yogg_saron_in_the_maws_of_the_old_god'),
|
||||
(64555,'spell_yogg_saron_insane_periodic');
|
||||
|
||||
DELETE FROM `spell_target_position` WHERE `id` IN (63989,63997,63998,63992);
|
||||
INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
|
||||
(63989,603,1954.14,21.522,239.718,2.09439),
|
||||
(63997,603,2043.12,-25.6981,239.721,0),
|
||||
(63998,603,1949.13,-80.6744,239.99,4.18879),
|
||||
(63992,603,1970.61,-25.5988,324.55,3.10346);
|
||||
|
||||
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@DESCEND_INTO_MADNESS;
|
||||
INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES
|
||||
(@DESCEND_INTO_MADNESS,63989,2,0),
|
||||
(@DESCEND_INTO_MADNESS,63997,2,0),
|
||||
(@DESCEND_INTO_MADNESS,63998,2,0);
|
||||
|
||||
DELETE FROM `disables` WHERE `SourceType`=4 AND `entry` IN (10187,10189,10293,10294,10388,10409,10410,10412,10414,10415,10416,10417);
|
||||
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (10185,10187,10189,10296,10321,10322,10323,10324,10325,10326,10388,10409,10410,10412,10414,10415,10416,10417);
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
|
||||
(10185,18,0,0,''),
|
||||
(10185,12,0,0,''),
|
||||
(10187,1,@SARA,0,''),
|
||||
(10187,7,65157,0,''),
|
||||
(10187,12,0,0,''),
|
||||
(10189,1,@SARA,0,''),
|
||||
(10189,7,65157,0,''),
|
||||
(10189,12,1,0,''),
|
||||
(10296,18,0,0,''),
|
||||
(10296,12,1,0,''),
|
||||
(10321,18,0,0,''),
|
||||
(10321,12,1,0,''),
|
||||
(10322,18,0,0,''),
|
||||
(10322,12,1,0,''),
|
||||
(10323,18,0,0,''),
|
||||
(10323,12,1,0,''),
|
||||
(10324,18,0,0,''),
|
||||
(10324,12,0,0,''),
|
||||
(10325,18,0,0,''),
|
||||
(10325,12,0,0,''),
|
||||
(10326,18,0,0,''),
|
||||
(10326,12,0,0,''),
|
||||
(10388,18,0,0,''),
|
||||
(10388,12,0,0,''),
|
||||
(10409,18,0,0,''),
|
||||
(10409,12,0,0,''),
|
||||
(10410,18,0,0,''),
|
||||
(10410,12,0,0,''),
|
||||
(10412,18,0,0,''),
|
||||
(10412,12,0,0,''),
|
||||
(10414,18,0,0,''),
|
||||
(10414,12,1,0,''),
|
||||
(10415,18,0,0,''),
|
||||
(10415,12,1,0,''),
|
||||
(10416,18,0,0,''),
|
||||
(10416,12,1,0,''),
|
||||
(10417,18,0,0,''),
|
||||
(10417,12,1,0,'');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (62714,65209,62978,63037,63882,63884,63886,64059,64063,64069,64172,64173,64184,65238,63744,63745,63747,64465,64466,64555,65719,65206);
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=64184;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceGroup`=@DESCEND_INTO_MADNESS;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(18,@DESCEND_INTO_MADNESS,63997,0,0,13,0,38,0,0,0,0,0,'','Required instance data for spellclick'),
|
||||
(18,@DESCEND_INTO_MADNESS,63998,0,0,13,0,38,1,0,0,0,0,'','Required instance data for spellclick'),
|
||||
(18,@DESCEND_INTO_MADNESS,63989,0,0,13,0,38,2,0,0,0,0,'','Required instance data for spellclick'),
|
||||
(13,2,62714,0,0,31,0,3,@GUARDIAN_OF_YOGG_SARON,0,0,0,0,'','Shadow Nova'),
|
||||
(13,2,65209,0,0,31,0,3,@GUARDIAN_OF_YOGG_SARON,0,0,0,0,'','Shadow Nova'),
|
||||
(13,1,62978,0,0,31,0,3,@OMINOUS_CLOUD,0,0,0,0,'','Summon Guardian'),
|
||||
(13,1,63037,0,0,31,0,3,@IMMOLATED_CHAMPION,0,0,0,0,'','Deathgrasp'),
|
||||
(13,1,63744,0,0,31,0,3,@GUARDIAN_OF_YOGG_SARON,0,0,0,0,'','Sara''s Anger'),
|
||||
(13,1,63745,0,0,31,0,4,0,0,0,0,0,'','Sara''s Blessing'),
|
||||
(13,1,63747,0,0,31,0,4,0,0,0,0,0,'','Sara''s Fervor'),
|
||||
(13,1,63882,0,0,31,0,3,@DEATH_ORB,0,0,0,0,'','Death Ray Warning Visual'),
|
||||
(13,1,63884,0,0,1,0,63120,0,0,1,0,0,'','Death Ray damage'),
|
||||
(13,1,63884,0,0,1,0,63830,1,0,1,0,0,'','Death Ray damage'),
|
||||
(13,1,63884,0,0,1,0,63881,1,0,1,0,0,'','Death Ray damage'),
|
||||
(13,1,63886,0,0,31,0,3,@DEATH_ORB,0,0,0,0,'','Death Ray Damage Visual'),
|
||||
(13,1,64059,0,0,31,0,4,0,0,0,0,0,'','Induce Madness'),
|
||||
(13,1,64059,0,0,1,0,63988,0,0,0,0,0,'','Induce Madness'),
|
||||
(13,1,64063,0,0,31,0,3,@KING_LLANE,0,0,0,0,'','Assassinate'),
|
||||
(13,1,64069,0,0,31,0,3,@YOGG_SARON,0,0,0,0,'','Match Health'),
|
||||
(13,1,64172,0,0,31,0,3,@IMMORTAL_GUARDIAN,0,0,0,0,'','Titanic Storm'),
|
||||
(13,1,64172,0,0,1,0,64162,0,0,0,0,0,'','Titanic Storm'),
|
||||
(13,1,64172,0,1,31,0,3,@MARKED_IMMORTAL_GUARDIAN,0,0,0,0,'','Titanic Storm'),
|
||||
(13,1,64172,0,1,1,0,64162,0,0,0,0,0,'','Titanic Storm'),
|
||||
(13,1,64173,0,0,31,0,3,@SARA,0,0,0,0,'','Shattered Illusion'),
|
||||
(13,1,64173,0,1,31,0,3,@YOGG_SARON,0,0,0,0,'','Shattered Illusion'),
|
||||
(13,1,64173,0,2,31,0,3,@CRUSHER_TENTACLE,0,0,0,0,'','Shattered Illusion'),
|
||||
(13,1,64173,0,3,31,0,3,@CONSTRICTOR_TENTACLE,0,0,0,0,'','Shattered Illusion'),
|
||||
(13,1,64173,0,4,31,0,3,@CORRUPTOR_TENTACLE,0,0,0,0,'','Shattered Illusion'),
|
||||
(13,1,64184,0,0,31,0,3,@YOGG_SARON,0,0,0,0,'','In the Maws of the Old God'),
|
||||
(13,1,65238,0,0,31,0,3,@SARA,0,0,0,0,'','Shattered Illusion remove'),
|
||||
(13,1,65238,0,1,31,0,3,@YOGG_SARON,0,0,0,0,'','Shattered Illusion remove'),
|
||||
(13,1,65238,0,2,31,0,3,@CRUSHER_TENTACLE,0,0,0,0,'','Shattered Illusion remove'),
|
||||
(13,1,65238,0,3,31,0,3,@CONSTRICTOR_TENTACLE,0,0,0,0,'','Shattered Illusion remove'),
|
||||
(13,1,65238,0,4,31,0,3,@CORRUPTOR_TENTACLE,0,0,0,0,'','Shattered Illusion remove'),
|
||||
(13,1,64465,0,0,31,0,3,@IMMORTAL_GUARDIAN,0,0,0,0,'','Shadow Beacon'),
|
||||
(13,1,64465,0,0,1,0,64497,0,0,1,0,0,'','Shadow Beacon'),
|
||||
(13,1,64466,0,0,31,0,3,@YOGG_SARON,0,0,0,0,'','Empowering Shadows'),
|
||||
(13,1,64555,0,0,1,0,63050,0,0,1,0,0,'','Insane Periodic'),
|
||||
(13,1,65719,0,0,31,0,3,@SARA,0,0,0,0,'','Shadow Nova'),
|
||||
(13,1,65206,0,0,31,0,3,@CORRUPTOR_TENTACLE,0,0,0,0,'','Destabilization Matrix'),
|
||||
(13,1,65206,0,1,31,0,3,@CRUSHER_TENTACLE,0,0,0,0,'','Destabilization Matrix');
|
||||
|
||||
-- Loot
|
||||
UPDATE `creature_loot_template` SET `lootmode`=32-`lootmode` WHERE `entry` IN (@YOGG_SARON,@YOGG_SARON_H);
|
||||
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=-100,`lootmode`=32 WHERE `entry`=@YOGG_SARON_H AND `item`=45897;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- only for 3.3.5
|
||||
UPDATE spell_target_position SET effIndex='0' WHERE id IN (68081, 67837, 67836, 67835, 67838, 67834);
|
||||
@@ -0,0 +1 @@
|
||||
DELETE FROM `creature_addon` WHERE `guid`=136437;
|
||||
@@ -0,0 +1,35 @@
|
||||
-- Prevent multiple template installation tries
|
||||
UPDATE `smart_scripts` SET `event_type`=37 WHERE `entryorguid` IN (474,881,26257) AND `source_type`=0 AND `id`=0;
|
||||
UPDATE `smart_scripts` SET `event_type`=37 WHERE `entryorguid` IN (18716,18719) AND `source_type`=0 AND `id`=1;
|
||||
|
||||
-- Remove not existing event links
|
||||
UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=61 AND `id`=0 AND `source_type`=1;
|
||||
UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=3594 AND `id`=0 AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=1399 AND `id`=3 AND `source_type`=0;
|
||||
UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=305400 AND `id`=0 AND `source_type`=9;
|
||||
|
||||
-- Convert EAI to SAI and add conditions to prevent multiple SMART_ACTION_UPDATE_TEMPLATE calls
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=20778;
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=20778;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=20778 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES
|
||||
(20778,0,0,2000,6000,7000,10000,11,36519,32,5,'Void Waste - Cast Toxic Burst'),
|
||||
(20778,1,8,35686,0,0,0,36,20805,0,1,'Void Waste - Change Entry after (proc) Spell 35686');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=2 AND `SourceEntry`=20778 AND `SourceId`=0;
|
||||
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ConditionTarget`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) VALUE
|
||||
(22,2,20778,0,1,31,3,20805,1,'Void Waste may not already be transformed to template entry 20805 when trying to update template to 20805');
|
||||
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=20501;
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=20501;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=20501 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES
|
||||
(20501,0,2,0,50,30000,45000,11,36465,0,1,'Seeping Sludge - Cast Seeping Split at 50% HP'),
|
||||
(20501,1,8,35686,0,0,0,36,20806,0,1,'Seeping Sludge - Change Entry after (proc) Spell 35686'),
|
||||
(20501,2,11,0,0,0,0,11,35242,0,1,'Seeping Sludge - Darkstalker Birth');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=2 AND `SourceEntry`=20501 AND `SourceId`=0;
|
||||
INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ConditionTarget`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) VALUE
|
||||
(22,2,20501,0,1,31,3,20805,1,'Seeping Sludge may not already be transformed to template entry 20806 when trying to update template to 20806');
|
||||
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `areatrigger_teleport` WHERE `id` IN (2547, 2548, 2549);
|
||||
INSERT INTO `areatrigger_teleport` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`, `name`) VALUES
|
||||
(2547, 0, 1399.42, -2574.59, 107.786, 6.28319, 'Scholomance - Exit Porch Target 001'),
|
||||
(2548, 0, 1399.42, -2574.59, 107.786, 6.28319, 'Scholomance - Exit Porch Target 001'),
|
||||
(2549, 0, 1399.42, -2574.59, 107.786, 6.28319, 'Scholomance - Exit Porch Target 001');
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `trinity_string` WHERE `entry` IN (183, 184);
|
||||
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
|
||||
(183, '|cff0099FFPhaseMgr: Report for player: %s, zoneId: %u, level: %u, team: %u, phaseupdateflag: %u|r'),
|
||||
(184, '|cff663399PhaseMgr: There are no definitions defined for zoneId %u.|r');
|
||||
@@ -80,6 +80,8 @@ target_link_libraries(authserver
|
||||
shared
|
||||
${MYSQL_LIBRARY}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${ACE_LIBRARY}
|
||||
)
|
||||
|
||||
if( WIN32 )
|
||||
|
||||
@@ -272,7 +272,7 @@ bool BIH::readFromFile(FILE* rf)
|
||||
check += fread(&count, sizeof(uint32), 1, rf);
|
||||
objects.resize(count); // = new uint32[nObjects];
|
||||
check += fread(&objects[0], sizeof(uint32), count, rf);
|
||||
return check == (3 + 3 + 2 + treeSize + count);
|
||||
return uint64(check) == uint64(3 + 3 + 1 + 1 + uint64(treeSize) + uint64(count));
|
||||
}
|
||||
|
||||
void BIH::BuildStats::updateLeaf(int depth, int n)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace MMAP
|
||||
{
|
||||
// ######################## MMapFactory ########################
|
||||
// our global singleton copy
|
||||
MMapManager *g_MMapManager = NULL;
|
||||
MMapManager* g_MMapManager = NULL;
|
||||
|
||||
MMapManager* MMapFactory::createOrGetMMapManager()
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace MMAP
|
||||
|
||||
snprintf(fileName, pathLen, (sWorld->GetDataPath()+"mmaps/%03i%02i%02i.mmtile").c_str(), mapId, x, y);
|
||||
|
||||
FILE *file = fopen(fileName, "rb");
|
||||
FILE* file = fopen(fileName, "rb");
|
||||
if (!file)
|
||||
{
|
||||
TC_LOG_DEBUG(LOG_FILTER_MAPS, "MMAP:loadMap: Could not open mmtile file '%s'", fileName);
|
||||
@@ -123,6 +123,7 @@ namespace MMAP
|
||||
if (fread(&fileHeader, sizeof(MmapTileHeader), 1, file) != 1 || fileHeader.mmapMagic != MMAP_MAGIC)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMap: Bad header in mmap %03u%02i%02i.mmtile", mapId, x, y);
|
||||
fclose(file);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -130,6 +131,7 @@ namespace MMAP
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_MAPS, "MMAP:loadMap: %03u%02i%02i.mmtile was built with generator v%i, expected v%i",
|
||||
mapId, x, y, fileHeader.mmapVersion, MMAP_VERSION);
|
||||
fclose(file);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -154,7 +156,7 @@ namespace MMAP
|
||||
{
|
||||
mmap->mmapLoadedTiles.insert(std::pair<uint32, dtTileRef>(packedGridPos, tileRef));
|
||||
++loadedTiles;
|
||||
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:loadMap: Loaded mmtile %03i[%02i,%02i] into %03i[%02i,%02i]", mapId, x, y, mapId, header->x, header->y);
|
||||
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:loadMap: Loaded mmtile %03i[%02i, %02i] into %03i[%02i, %02i]", mapId, x, y, mapId, header->x, header->y);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -203,7 +205,7 @@ namespace MMAP
|
||||
{
|
||||
mmap->mmapLoadedTiles.erase(packedGridPos);
|
||||
--loadedTiles;
|
||||
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded mmtile %03i[%02i,%02i] from %03i", mapId, x, y, mapId);
|
||||
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -230,7 +232,7 @@ namespace MMAP
|
||||
else
|
||||
{
|
||||
--loadedTiles;
|
||||
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded mmtile %03i[%02i,%02i] from %03i", mapId, x, y, mapId);
|
||||
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP:unloadMap: Unloaded mmtile %03i[%02i, %02i] from %03i", mapId, x, y, mapId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -516,7 +516,8 @@ namespace VMAP
|
||||
for (uint32 g = 0; g < groups && succeed; ++g)
|
||||
succeed = groupsArray[g].Read(rf);
|
||||
|
||||
fclose(rf);
|
||||
if (succeed) /// rf will be freed inside Read if the function had any errors.
|
||||
fclose(rf);
|
||||
return succeed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1470,8 +1470,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!einfo)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id %u for creature %u", equipId, npc->GetEntry());
|
||||
delete targets;
|
||||
return;
|
||||
}
|
||||
|
||||
npc->SetCurrentEquipmentId(equipId);
|
||||
slot[0] = einfo->ItemEntry[0];
|
||||
slot[1] = einfo->ItemEntry[1];
|
||||
@@ -2576,6 +2578,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
return;
|
||||
|
||||
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->getVictim());
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_FRIENDLY_HEALTH:
|
||||
{
|
||||
|
||||
@@ -367,31 +367,31 @@ void ArenaTeam::Roster(WorldSession* session)
|
||||
uint8 unk308 = 0;
|
||||
|
||||
WorldPacket data(SMSG_ARENA_TEAM_ROSTER, 100);
|
||||
data << uint32(GetId()); // team id
|
||||
data << uint8(unk308); // 308 unknown value but affect packet structure
|
||||
data << uint32(GetMembersSize()); // members count
|
||||
data << uint32(GetType()); // arena team type?
|
||||
data << uint32(GetId()); // team id
|
||||
data << uint8(unk308); // 3.0.8 unknown value but affect packet structure
|
||||
data << uint32(GetMembersSize()); // members count
|
||||
data << uint32(GetType()); // arena team type?
|
||||
|
||||
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
|
||||
{
|
||||
player = ObjectAccessor::FindPlayer(itr->Guid);
|
||||
|
||||
data << uint64(itr->Guid); // guid
|
||||
data << uint64(itr->Guid); // guid
|
||||
data << uint8((player ? 1 : 0)); // online flag
|
||||
data << itr->Name; // member name
|
||||
data << uint32((itr->Guid == GetCaptain() ? 0 : 1));// captain flag 0 captain 1 member
|
||||
data << uint8((player ? player->getLevel() : 0)); // unknown, level?
|
||||
data << uint8(itr->Class); // class
|
||||
data << uint32(itr->WeekGames); // played this week
|
||||
data << uint32(itr->WeekWins); // wins this week
|
||||
data << uint32(itr->SeasonGames); // played this season
|
||||
data << uint32(itr->SeasonWins); // wins this season
|
||||
data << uint32(itr->PersonalRating); // personal rating
|
||||
if (unk308)
|
||||
{
|
||||
data << float(0.0f); // 308 unk
|
||||
data << float(0.0f); // 308 unk
|
||||
}
|
||||
data << itr->Name; // member name
|
||||
data << uint32((itr->Guid == GetCaptain() ? 0 : 1)); // captain flag 0 captain 1 member
|
||||
data << uint8((player ? player->getLevel() : 0)); // unknown, level?
|
||||
data << uint8(itr->Class); // class
|
||||
data << uint32(itr->WeekGames); // played this week
|
||||
data << uint32(itr->WeekWins); // wins this week
|
||||
data << uint32(itr->SeasonGames); // played this season
|
||||
data << uint32(itr->SeasonWins); // wins this season
|
||||
data << uint32(itr->PersonalRating); // personal rating
|
||||
//if (unk308)
|
||||
//{
|
||||
// data << float(0.0f); // 308 unk
|
||||
// data << float(0.0f); // 308 unk
|
||||
//}
|
||||
}
|
||||
|
||||
session->SendPacket(&data);
|
||||
|
||||
@@ -812,6 +812,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId original
|
||||
{
|
||||
case BATTLEGROUND_RB:
|
||||
isRandom = true;
|
||||
/// Intentional fallback, "All Arenas" is random too
|
||||
case BATTLEGROUND_AA:
|
||||
bgTypeId = GetRandomBG(originalBgTypeId);
|
||||
break;
|
||||
@@ -1335,7 +1336,7 @@ void BattlegroundMgr::ScheduleQueueUpdate(uint32 arenaMatchmakerRating, uint8 ar
|
||||
{
|
||||
//This method must be atomic, @todo add mutex
|
||||
//we will use only 1 number created of bgTypeId and bracket_id
|
||||
uint64 const scheduleId = ((uint64)arenaMatchmakerRating << 32) | (arenaType << 24) | (bgQueueTypeId << 16) | (bgTypeId << 8) | bracket_id;
|
||||
uint64 const scheduleId = ((uint64)arenaMatchmakerRating << 32) | (uint32(arenaType) << 24) | (bgQueueTypeId << 16) | (bgTypeId << 8) | bracket_id;
|
||||
if (std::find(m_QueueUpdateScheduler.begin(), m_QueueUpdateScheduler.end(), scheduleId) == m_QueueUpdateScheduler.end())
|
||||
m_QueueUpdateScheduler.push_back(scheduleId);
|
||||
}
|
||||
|
||||
@@ -1046,7 +1046,7 @@ const uint32 BG_AV_CreatureInfo[AV_NPC_INFO_MAX][4] =
|
||||
{ 13326, 1216, 59, 59 }, //Seasoned Defender
|
||||
{ 13331, 1216, 60, 60 }, //Veteran Defender
|
||||
{ 13422, 1216, 61, 61 }, //Champion Defender
|
||||
{ 13358, 1216, 59, 60 }, //Stormpike Bowman /// @todo: Confirm if this is correct. Author assumpted 60,61 & 69,70, but wouldn't work here
|
||||
{ 13358, 1216, 59, 60 }, //Stormpike Bowman /// @todo: Confirm if this is correct. Author assumpted 60, 61 & 69, 70, but wouldn't work here
|
||||
{ 11949, 469, 0, 0}, //not spawned with this data, but used for handlekillunit
|
||||
{ 11948, 469, 0, 0}, //not spawned with this data, but used for handlekillunit
|
||||
{ 12053, 1214, 58, 58 }, //Frostwolf Guardian
|
||||
|
||||
@@ -159,20 +159,20 @@ void CalendarMgr::RemoveEvent(uint64 eventId, uint64 remover)
|
||||
PreparedStatement* stmt;
|
||||
MailDraft mail(calendarEvent->BuildCalendarMailSubject(remover), calendarEvent->BuildCalendarMailBody());
|
||||
|
||||
CalendarInviteStore::iterator itr = _invites[eventId].begin();
|
||||
while (itr != _invites[eventId].end())
|
||||
CalendarInviteStore& eventInvites = _invites[eventId];
|
||||
for (size_t i = 0; i < eventInvites.size(); ++i)
|
||||
{
|
||||
CalendarInvite* invite = eventInvites[i];
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CALENDAR_INVITE);
|
||||
stmt->setUInt64(0, (*itr)->GetInviteId());
|
||||
stmt->setUInt64(0, invite->GetInviteId());
|
||||
trans->Append(stmt);
|
||||
|
||||
// guild events only? check invite status here?
|
||||
// When an event is deleted, all invited (accepted/declined? - verify) guildies are notified via in-game mail. (wowwiki)
|
||||
if (remover && (*itr)->GetInviteeGUID() != remover)
|
||||
mail.SendMailTo(trans, MailReceiver((*itr)->GetInviteeGUID()), calendarEvent, MAIL_CHECK_MASK_COPIED);
|
||||
if (remover && invite->GetInviteeGUID() != remover)
|
||||
mail.SendMailTo(trans, MailReceiver(invite->GetInviteeGUID()), calendarEvent, MAIL_CHECK_MASK_COPIED);
|
||||
|
||||
delete *itr;
|
||||
_invites[eventId].erase(itr);
|
||||
delete invite;
|
||||
}
|
||||
|
||||
_invites.erase(eventId);
|
||||
|
||||
@@ -1134,6 +1134,9 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
|
||||
if ((1<<firstEffIndex) & *itr)
|
||||
break;
|
||||
|
||||
if (firstEffIndex >= MAX_SPELL_EFFECTS)
|
||||
return false;
|
||||
|
||||
// get shared data
|
||||
ConditionList* sharedList = spellInfo->Effects[firstEffIndex].ImplicitTargetConditions;
|
||||
|
||||
@@ -1153,9 +1156,18 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
|
||||
{
|
||||
// add new list, create new shared mask
|
||||
sharedList = new ConditionList();
|
||||
bool assigned = false;
|
||||
for (uint8 i = firstEffIndex; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if ((1<<i) & commonMask)
|
||||
{
|
||||
spellInfo->Effects[i].ImplicitTargetConditions = sharedList;
|
||||
assigned = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!assigned)
|
||||
delete sharedList;
|
||||
}
|
||||
sharedList->push_back(cond);
|
||||
break;
|
||||
|
||||
@@ -853,6 +853,18 @@ AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char const* GetRaceName(uint8 race, uint8 /*locale*/)
|
||||
{
|
||||
ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race);
|
||||
return raceEntry ? raceEntry->name : NULL;
|
||||
}
|
||||
|
||||
char const* GetClassName(uint8 class_, uint8 /*locale*/)
|
||||
{
|
||||
ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_);
|
||||
return classEntry ? classEntry->name : NULL;
|
||||
}
|
||||
|
||||
uint32 GetAreaFlagByMapId(uint32 mapid)
|
||||
{
|
||||
AreaFlagByMapID::iterator i = sAreaFlagByMapID.find(mapid);
|
||||
@@ -1226,7 +1238,7 @@ LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty)
|
||||
if (!dungeon)
|
||||
continue;
|
||||
|
||||
if (dungeon->map == mapId && Difficulty(dungeon->difficulty) == difficulty)
|
||||
if (dungeon->map == int32(mapId) && Difficulty(dungeon->difficulty) == difficulty)
|
||||
return dungeon;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@ AreaTableEntry const* GetAreaEntryByAreaID(uint32 area_id);
|
||||
AreaTableEntry const* GetAreaEntryByAreaFlagAndMap(uint32 area_flag, uint32 map_id);
|
||||
uint32 GetAreaFlagByMapId(uint32 mapid);
|
||||
|
||||
char const* GetRaceName(uint8 race, uint8 locale);
|
||||
char const* GetClassName(uint8 class_, uint8 locale);
|
||||
|
||||
WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid, int32 groupid);
|
||||
|
||||
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId);
|
||||
|
||||
@@ -2624,8 +2624,9 @@ void Player::Regenerate(Powers power)
|
||||
}
|
||||
break;
|
||||
case POWER_RUNES:
|
||||
case POWER_HEALTH:
|
||||
break;
|
||||
case POWER_HEALTH:
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4223,6 +4224,7 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
|
||||
// learnSpell(prev_id, false);
|
||||
}
|
||||
// if ranked non-stackable spell: need activate lesser rank and update dendence state
|
||||
/// No need to check for spellInfo != NULL here because if cur_active is true, then that means that the spell was already in m_spells, and only valid spells can be pushed there.
|
||||
else if (cur_active && !spellInfo->IsStackableWithRanks() && spellInfo->IsRanked())
|
||||
{
|
||||
// need manually update dependence state (learn spell ignore like attempts)
|
||||
@@ -4746,12 +4748,6 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
charDelete_method = CHAR_DELETE_REMOVE;
|
||||
else if (CharacterNameData const* nameData = sWorld->GetCharacterNameData(guid)) // To avoid a query, we select loaded data. If it doesn't exist, return.
|
||||
{
|
||||
if (!nameData)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_PLAYER, "Cannot find CharacterNameData entry for player %u from account %u. Could not delete character.", guid, accountId);
|
||||
return;
|
||||
}
|
||||
|
||||
// Define the required variables
|
||||
uint32 charDelete_minLvl = sWorld->getIntConfig(nameData->m_class != CLASS_DEATH_KNIGHT ? CONFIG_CHARDELETE_MIN_LEVEL : CONFIG_CHARDELETE_HEROIC_MIN_LEVEL);
|
||||
|
||||
|
||||
@@ -6895,6 +6895,8 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 /*damage*/, Aura* triggeredByAura
|
||||
// Glyph of Divinity
|
||||
else if (dummySpell->Id == 54939)
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
*handled = true;
|
||||
// Check if we are the target and prevent mana gain
|
||||
if (victim && triggeredByAura->GetCasterGUID() == victim->GetGUID())
|
||||
@@ -7143,6 +7145,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
Aura* charge = GetAura(50241);
|
||||
if (charge && charge->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL))
|
||||
RemoveAurasDueToSpell(50240);
|
||||
break;
|
||||
}
|
||||
// Warrior - Vigilance, SPELLFAMILY_GENERIC
|
||||
if (auraSpellInfo->Id == 50720)
|
||||
@@ -9382,6 +9385,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SPELL_DAMAGE_CLASS_MAGIC:
|
||||
{
|
||||
if (schoolMask & SPELL_SCHOOL_MASK_NORMAL)
|
||||
@@ -9525,6 +9529,7 @@ bool Unit::isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMas
|
||||
break;
|
||||
}
|
||||
}
|
||||
/// Intentional fallback. Calculate critical strike chance for both Ranged and Melee spells
|
||||
case SPELL_DAMAGE_CLASS_RANGED:
|
||||
{
|
||||
if (victim)
|
||||
@@ -15893,7 +15898,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
}
|
||||
}
|
||||
|
||||
if (aurApp && aurApp->GetRemoveMode())
|
||||
if (!aurApp || aurApp->GetRemoveMode())
|
||||
return;
|
||||
|
||||
if (Player* player = ToPlayer())
|
||||
|
||||
@@ -353,8 +353,9 @@ SeatMap::const_iterator Vehicle::GetNextEmptySeat(int8 seatId, bool next) const
|
||||
}
|
||||
else
|
||||
{
|
||||
if (seat-- == Seats.begin())
|
||||
if (seat == Seats.begin())
|
||||
seat = Seats.end();
|
||||
--seat;
|
||||
}
|
||||
|
||||
// Make sure we don't loop indefinetly
|
||||
@@ -417,7 +418,7 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 typ
|
||||
* @author Machiavelli
|
||||
* @date 17-2-2013
|
||||
*
|
||||
* @param [in,out] The prospective passenger.
|
||||
* @param [in, out] The prospective passenger.
|
||||
* @param seatId Identifier for the seat. Value of -1 indicates the next available seat.
|
||||
*
|
||||
* @return true if it succeeds, false if it fails.
|
||||
@@ -492,7 +493,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
|
||||
* @author Machiavelli
|
||||
* @date 17-2-2013
|
||||
*
|
||||
* @param [in,out] unit The passenger to remove.
|
||||
* @param [in, out] unit The passenger to remove.
|
||||
*/
|
||||
|
||||
void Vehicle::RemovePassenger(Unit* unit)
|
||||
@@ -615,7 +616,7 @@ void Vehicle::InitMovementInfoForBase()
|
||||
* @author Machiavelli
|
||||
* @date 17-2-2013
|
||||
*
|
||||
* @param [in,out] The passenger for which we check the seat info.
|
||||
* @param [in, out] The passenger for which we check the seat info.
|
||||
*
|
||||
* @return null if passenger not found on vehicle, else the DBC record for the seat.
|
||||
*/
|
||||
@@ -637,7 +638,7 @@ VehicleSeatEntry const* Vehicle::GetSeatForPassenger(Unit const* passenger) cons
|
||||
* @author Machiavelli
|
||||
* @date 17-2-2013
|
||||
*
|
||||
* @param [in,out] passenger Passenger to look up.
|
||||
* @param [in, out] passenger Passenger to look up.
|
||||
*
|
||||
* @return The seat iterator for specified passenger if it's found on the vehicle. Otherwise Seats.end() (invalid iterator).
|
||||
*/
|
||||
|
||||
@@ -396,24 +396,21 @@ bool Group::AddMember(Player* player)
|
||||
|
||||
SubGroupCounterIncrease(subGroup);
|
||||
|
||||
if (player)
|
||||
player->SetGroupInvite(NULL);
|
||||
if (player->GetGroup())
|
||||
{
|
||||
player->SetGroupInvite(NULL);
|
||||
if (player->GetGroup())
|
||||
{
|
||||
if (isBGGroup() || isBFGroup()) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid()
|
||||
player->SetBattlegroundOrBattlefieldRaid(this, subGroup);
|
||||
else //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup()
|
||||
player->SetOriginalGroup(this, subGroup);
|
||||
}
|
||||
else //if player is not in group, then call set group
|
||||
player->SetGroup(this, subGroup);
|
||||
|
||||
// if the same group invites the player back, cancel the homebind timer
|
||||
InstanceGroupBind* bind = GetBoundInstance(player);
|
||||
if (bind && bind->save->GetInstanceId() == player->GetInstanceId())
|
||||
player->m_InstanceValid = true;
|
||||
if (isBGGroup() || isBFGroup()) // if player is in group and he is being added to BG raid group, then call SetBattlegroundRaid()
|
||||
player->SetBattlegroundOrBattlefieldRaid(this, subGroup);
|
||||
else //if player is in bg raid and we are adding him to normal group, then call SetOriginalGroup()
|
||||
player->SetOriginalGroup(this, subGroup);
|
||||
}
|
||||
else //if player is not in group, then call set group
|
||||
player->SetGroup(this, subGroup);
|
||||
|
||||
// if the same group invites the player back, cancel the homebind timer
|
||||
InstanceGroupBind* bind = GetBoundInstance(player);
|
||||
if (bind && bind->save->GetInstanceId() == player->GetInstanceId())
|
||||
player->m_InstanceValid = true;
|
||||
|
||||
if (!isRaidGroup()) // reset targetIcons for non-raid-groups
|
||||
{
|
||||
@@ -439,89 +436,86 @@ bool Group::AddMember(Player* player)
|
||||
SendUpdate();
|
||||
sScriptMgr->OnGroupAddMember(this, player->GetGUID());
|
||||
|
||||
if (player)
|
||||
if (!IsLeader(player->GetGUID()) && !isBGGroup() && !isBFGroup())
|
||||
{
|
||||
if (!IsLeader(player->GetGUID()) && !isBGGroup() && !isBFGroup())
|
||||
{
|
||||
// reset the new member's instances, unless he is currently in one of them
|
||||
// including raid/heroic instances that they are not permanently bound to!
|
||||
player->ResetInstances(INSTANCE_RESET_GROUP_JOIN, false);
|
||||
player->ResetInstances(INSTANCE_RESET_GROUP_JOIN, true);
|
||||
// reset the new member's instances, unless he is currently in one of them
|
||||
// including raid/heroic instances that they are not permanently bound to!
|
||||
player->ResetInstances(INSTANCE_RESET_GROUP_JOIN, false);
|
||||
player->ResetInstances(INSTANCE_RESET_GROUP_JOIN, true);
|
||||
|
||||
if (player->getLevel() >= LEVELREQUIREMENT_HEROIC)
|
||||
if (player->getLevel() >= LEVELREQUIREMENT_HEROIC)
|
||||
{
|
||||
if (player->GetDungeonDifficulty() != GetDungeonDifficulty())
|
||||
{
|
||||
if (player->GetDungeonDifficulty() != GetDungeonDifficulty())
|
||||
{
|
||||
player->SetDungeonDifficulty(GetDungeonDifficulty());
|
||||
player->SendDungeonDifficulty(true);
|
||||
}
|
||||
if (player->GetRaidDifficulty() != GetRaidDifficulty())
|
||||
{
|
||||
player->SetRaidDifficulty(GetRaidDifficulty());
|
||||
player->SendRaidDifficulty(true);
|
||||
}
|
||||
player->SetDungeonDifficulty(GetDungeonDifficulty());
|
||||
player->SendDungeonDifficulty(true);
|
||||
}
|
||||
if (player->GetRaidDifficulty() != GetRaidDifficulty())
|
||||
{
|
||||
player->SetRaidDifficulty(GetRaidDifficulty());
|
||||
player->SendRaidDifficulty(true);
|
||||
}
|
||||
}
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
|
||||
UpdatePlayerOutOfRange(player);
|
||||
|
||||
// quest related GO state dependent from raid membership
|
||||
if (isRaidGroup())
|
||||
player->UpdateForQuestWorldObjects();
|
||||
|
||||
{
|
||||
// Broadcast new player group member fields to rest of the group
|
||||
player->SetFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
|
||||
UpdateData groupData(player->GetMapId());
|
||||
WorldPacket groupDataPacket;
|
||||
|
||||
// Broadcast group members' fields to player
|
||||
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
if (itr->getSource() == player)
|
||||
continue;
|
||||
|
||||
if (Player* member = itr->getSource())
|
||||
{
|
||||
if (player->HaveAtClient(member)) // must be on the same map, or shit will break
|
||||
{
|
||||
member->SetFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
member->BuildValuesUpdateBlockForPlayer(&groupData, player);
|
||||
member->RemoveFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
}
|
||||
|
||||
if (member->HaveAtClient(player))
|
||||
{
|
||||
UpdateData newData(player->GetMapId());
|
||||
WorldPacket newDataPacket;
|
||||
player->BuildValuesUpdateBlockForPlayer(&newData, member);
|
||||
if (newData.HasData())
|
||||
{
|
||||
newData.BuildPacket(&newDataPacket);
|
||||
member->SendDirectMessage(&newDataPacket);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (groupData.HasData())
|
||||
{
|
||||
groupData.BuildPacket(&groupDataPacket);
|
||||
player->SendDirectMessage(&groupDataPacket);
|
||||
}
|
||||
|
||||
player->RemoveFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
}
|
||||
|
||||
if (m_maxEnchantingLevel < player->GetSkillValue(SKILL_ENCHANTING))
|
||||
m_maxEnchantingLevel = player->GetSkillValue(SKILL_ENCHANTING);
|
||||
}
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
|
||||
UpdatePlayerOutOfRange(player);
|
||||
|
||||
// quest related GO state dependent from raid membership
|
||||
if (isRaidGroup())
|
||||
player->UpdateForQuestWorldObjects();
|
||||
|
||||
{
|
||||
// Broadcast new player group member fields to rest of the group
|
||||
player->SetFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
|
||||
UpdateData groupData(player->GetMapId());
|
||||
WorldPacket groupDataPacket;
|
||||
|
||||
// Broadcast group members' fields to player
|
||||
for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
if (itr->getSource() == player)
|
||||
continue;
|
||||
|
||||
if (Player* member = itr->getSource())
|
||||
{
|
||||
if (player->HaveAtClient(member))
|
||||
{
|
||||
member->SetFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
member->BuildValuesUpdateBlockForPlayer(&groupData, player);
|
||||
member->RemoveFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
}
|
||||
|
||||
if (member->HaveAtClient(player))
|
||||
{
|
||||
UpdateData newData(player->GetMapId());
|
||||
WorldPacket newDataPacket;
|
||||
player->BuildValuesUpdateBlockForPlayer(&newData, member);
|
||||
if (newData.HasData())
|
||||
{
|
||||
newData.BuildPacket(&newDataPacket);
|
||||
member->SendDirectMessage(&newDataPacket);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (groupData.HasData())
|
||||
{
|
||||
groupData.BuildPacket(&groupDataPacket);
|
||||
player->SendDirectMessage(&groupDataPacket);
|
||||
}
|
||||
|
||||
player->RemoveFieldNotifyFlag(UF_FLAG_PARTY_MEMBER);
|
||||
}
|
||||
|
||||
if (m_maxEnchantingLevel < player->GetSkillValue(SKILL_ENCHANTING))
|
||||
m_maxEnchantingLevel = player->GetSkillValue(SKILL_ENCHANTING);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
|
||||
bool Group::RemoveMember(uint64 guid, const RemoveMethod& method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
|
||||
{
|
||||
BroadcastGroupUpdate();
|
||||
|
||||
|
||||
@@ -2989,7 +2989,7 @@ inline int32 Guild::_GetMemberRemainingSlots(Member const* member, uint8 tabId)
|
||||
uint8 rankId = member->GetRankId();
|
||||
if (rankId == GR_GUILDMASTER)
|
||||
return GUILD_WITHDRAW_SLOT_UNLIMITED;
|
||||
if ((_GetRankBankTabRights(rankId, tabId) & GUILD_BANK_RIGHT_VIEW_TAB) != GR_RIGHT_EMPTY)
|
||||
if ((_GetRankBankTabRights(rankId, tabId) & GUILD_BANK_RIGHT_VIEW_TAB) != 0)
|
||||
{
|
||||
int32 remaining = _GetRankBankTabSlotsPerDay(rankId, tabId) - member->GetBankWithdrawValue(tabId);
|
||||
if (remaining > 0)
|
||||
@@ -3007,7 +3007,7 @@ inline int32 Guild::_GetMemberRemainingMoney(Member const* member) const
|
||||
if (rankId == GR_GUILDMASTER)
|
||||
return GUILD_WITHDRAW_MONEY_UNLIMITED;
|
||||
|
||||
if ((_GetRankRights(rankId) & (GR_RIGHT_WITHDRAW_REPAIR | GR_RIGHT_WITHDRAW_GOLD)) != GR_RIGHT_EMPTY)
|
||||
if ((_GetRankRights(rankId) & (GR_RIGHT_WITHDRAW_REPAIR | GR_RIGHT_WITHDRAW_GOLD)) != 0)
|
||||
{
|
||||
int32 remaining = _GetRankBankMoneyPerDay(rankId) - member->GetBankWithdrawValue(GUILD_BANK_MAX_TABS);
|
||||
if (remaining > 0)
|
||||
|
||||
@@ -254,146 +254,143 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < itemsCount; ++i)
|
||||
Item* item = items[0];
|
||||
|
||||
uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
|
||||
uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
|
||||
if (!_player->HasEnoughMoney((uint64)deposit))
|
||||
{
|
||||
Item* item = items[i];
|
||||
|
||||
uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
|
||||
uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
|
||||
if (!_player->HasEnoughMoney((uint64)deposit))
|
||||
{
|
||||
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_NOT_ENOUGHT_MONEY);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->ModifyMoney(-int32(deposit));
|
||||
|
||||
AuctionEntry* AH = new AuctionEntry;
|
||||
AH->Id = sObjectMgr->GenerateAuctionID();
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
||||
AH->auctioneer = 23442;
|
||||
else
|
||||
AH->auctioneer = GUID_LOPART(auctioneer);
|
||||
|
||||
// Required stack size of auction matches to current item stack size, just move item to auctionhouse
|
||||
if (itemsCount == 1 && item->GetCount() == count[i])
|
||||
{
|
||||
if (HasPermission(RBAC_PERM_LOG_GM_TRADE))
|
||||
{
|
||||
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
|
||||
GetPlayerName().c_str(), GetAccountId(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount());
|
||||
}
|
||||
|
||||
AH->itemGUIDLow = item->GetGUIDLow();
|
||||
AH->itemEntry = item->GetEntry();
|
||||
AH->itemCount = item->GetCount();
|
||||
AH->owner = _player->GetGUIDLow();
|
||||
AH->startbid = bid;
|
||||
AH->bidder = 0;
|
||||
AH->bid = 0;
|
||||
AH->buyout = buyout;
|
||||
AH->expire_time = time(NULL) + auctionTime;
|
||||
AH->deposit = deposit;
|
||||
AH->auctionHouseEntry = auctionHouseEntry;
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) "
|
||||
"to auctioneer %u with count %u with initial bid " UI64FMTD " with buyout " UI64FMTD " and with time %u (in sec) in auctionhouse %u",
|
||||
_player->GetName().c_str(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(),
|
||||
AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
sAuctionMgr->AddAItem(item);
|
||||
auctionHouse->AddAuction(AH);
|
||||
|
||||
_player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
item->DeleteFromInventoryDB(trans);
|
||||
item->SaveToDB(trans);
|
||||
AH->SaveToDB(trans);
|
||||
_player->SaveInventoryAndGoldToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
SendAuctionCommandResult(AH, AUCTION_SELL_ITEM, ERR_AUCTION_OK);
|
||||
|
||||
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
|
||||
return;
|
||||
}
|
||||
else // Required stack size of auction does not match to current item stack size, clone item and set correct stack size
|
||||
{
|
||||
Item* newItem = item->CloneItem(finalCount, _player);
|
||||
if (!newItem)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
|
||||
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasPermission(RBAC_PERM_LOG_GM_TRADE))
|
||||
{
|
||||
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
|
||||
GetPlayerName().c_str(), GetAccountId(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetCount());
|
||||
}
|
||||
|
||||
AH->itemGUIDLow = newItem->GetGUIDLow();
|
||||
AH->itemEntry = newItem->GetEntry();
|
||||
AH->itemCount = newItem->GetCount();
|
||||
AH->owner = _player->GetGUIDLow();
|
||||
AH->startbid = bid;
|
||||
AH->bidder = 0;
|
||||
AH->bid = 0;
|
||||
AH->buyout = buyout;
|
||||
AH->expire_time = time(NULL) + auctionTime;
|
||||
AH->deposit = deposit;
|
||||
AH->auctionHouseEntry = auctionHouseEntry;
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to "
|
||||
"auctioneer %u with count %u with initial bid " UI64FMTD " with buyout " UI64FMTD " and with time %u (in sec) in auctionhouse %u",
|
||||
_player->GetName().c_str(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(),
|
||||
newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
sAuctionMgr->AddAItem(newItem);
|
||||
auctionHouse->AddAuction(AH);
|
||||
|
||||
for (uint32 j = 0; j < itemsCount; ++j)
|
||||
{
|
||||
Item* item2 = items[j];
|
||||
|
||||
// Item stack count equals required count, ready to delete item - cloned item will be used for auction
|
||||
if (item2->GetCount() == count[j])
|
||||
{
|
||||
_player->MoveItemFromInventory(item2->GetBagSlot(), item2->GetSlot(), true);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
item2->DeleteFromInventoryDB(trans);
|
||||
item2->DeleteFromDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
else // Item stack count is bigger than required count, update item stack count and save to database - cloned item will be used for auction
|
||||
{
|
||||
item2->SetCount(item2->GetCount() - count[j]);
|
||||
item2->SetState(ITEM_CHANGED, _player);
|
||||
_player->ItemRemovedQuestCheck(item2->GetEntry(), count[j]);
|
||||
item2->SendUpdateToPlayer(_player);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
item2->SaveToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
}
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
newItem->SaveToDB(trans);
|
||||
AH->SaveToDB(trans);
|
||||
_player->SaveInventoryAndGoldToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
SendAuctionCommandResult(AH, AUCTION_SELL_ITEM, ERR_AUCTION_OK);
|
||||
|
||||
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
|
||||
return;
|
||||
}
|
||||
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_NOT_ENOUGHT_MONEY);
|
||||
return;
|
||||
}
|
||||
|
||||
AuctionEntry* AH = new AuctionEntry();
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
||||
AH->auctioneer = 23442; ///@TODO - HARDCODED DB GUID, BAD BAD BAD
|
||||
else
|
||||
AH->auctioneer = GUID_LOPART(auctioneer);
|
||||
|
||||
// Required stack size of auction matches to current item stack size, just move item to auctionhouse
|
||||
if (itemsCount == 1 && item->GetCount() == count[0])
|
||||
{
|
||||
if (HasPermission(RBAC_PERM_LOG_GM_TRADE))
|
||||
{
|
||||
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
|
||||
GetPlayerName().c_str(), GetAccountId(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetCount());
|
||||
}
|
||||
|
||||
AH->Id = sObjectMgr->GenerateAuctionID();
|
||||
AH->itemGUIDLow = item->GetGUIDLow();
|
||||
AH->itemEntry = item->GetEntry();
|
||||
AH->itemCount = item->GetCount();
|
||||
AH->owner = _player->GetGUIDLow();
|
||||
AH->startbid = bid;
|
||||
AH->bidder = 0;
|
||||
AH->bid = 0;
|
||||
AH->buyout = buyout;
|
||||
AH->expire_time = time(NULL) + auctionTime;
|
||||
AH->deposit = deposit;
|
||||
AH->auctionHouseEntry = auctionHouseEntry;
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) "
|
||||
"to auctioneer %u with count %u with initial bid " UI64FMTD " with buyout " UI64FMTD " and with time %u (in sec) in auctionhouse %u",
|
||||
_player->GetName().c_str(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(),
|
||||
AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
sAuctionMgr->AddAItem(item);
|
||||
auctionHouse->AddAuction(AH);
|
||||
|
||||
_player->MoveItemFromInventory(item->GetBagSlot(), item->GetSlot(), true);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
item->DeleteFromInventoryDB(trans);
|
||||
item->SaveToDB(trans);
|
||||
AH->SaveToDB(trans);
|
||||
_player->SaveInventoryAndGoldToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
SendAuctionCommandResult(AH, AUCTION_SELL_ITEM, ERR_AUCTION_OK);
|
||||
|
||||
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
|
||||
}
|
||||
else // Required stack size of auction does not match to current item stack size, clone item and set correct stack size
|
||||
{
|
||||
Item* newItem = item->CloneItem(finalCount, _player);
|
||||
if (!newItem)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Could not create clone of item %u", item->GetEntry());
|
||||
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
|
||||
delete AH;
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasPermission(RBAC_PERM_LOG_GM_TRADE))
|
||||
{
|
||||
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
|
||||
GetPlayerName().c_str(), GetAccountId(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetCount());
|
||||
}
|
||||
|
||||
AH->Id = sObjectMgr->GenerateAuctionID();
|
||||
AH->itemGUIDLow = newItem->GetGUIDLow();
|
||||
AH->itemEntry = newItem->GetEntry();
|
||||
AH->itemCount = newItem->GetCount();
|
||||
AH->owner = _player->GetGUIDLow();
|
||||
AH->startbid = bid;
|
||||
AH->bidder = 0;
|
||||
AH->bid = 0;
|
||||
AH->buyout = buyout;
|
||||
AH->expire_time = time(NULL) + auctionTime;
|
||||
AH->deposit = deposit;
|
||||
AH->auctionHouseEntry = auctionHouseEntry;
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to "
|
||||
"auctioneer %u with count %u with initial bid " UI64FMTD " with buyout " UI64FMTD " and with time %u (in sec) in auctionhouse %u",
|
||||
_player->GetName().c_str(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(),
|
||||
newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
sAuctionMgr->AddAItem(newItem);
|
||||
auctionHouse->AddAuction(AH);
|
||||
|
||||
for (uint32 j = 0; j < itemsCount; ++j)
|
||||
{
|
||||
Item* item2 = items[j];
|
||||
|
||||
// Item stack count equals required count, ready to delete item - cloned item will be used for auction
|
||||
if (item2->GetCount() == count[j])
|
||||
{
|
||||
_player->MoveItemFromInventory(item2->GetBagSlot(), item2->GetSlot(), true);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
item2->DeleteFromInventoryDB(trans);
|
||||
item2->DeleteFromDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
else // Item stack count is bigger than required count, update item stack count and save to database - cloned item will be used for auction
|
||||
{
|
||||
item2->SetCount(item2->GetCount() - count[j]);
|
||||
item2->SetState(ITEM_CHANGED, _player);
|
||||
_player->ItemRemovedQuestCheck(item2->GetEntry(), count[j]);
|
||||
item2->SendUpdateToPlayer(_player);
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
item2->SaveToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
}
|
||||
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
newItem->SaveToDB(trans);
|
||||
AH->SaveToDB(trans);
|
||||
_player->SaveInventoryAndGoldToDB(trans);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
SendAuctionCommandResult(AH, AUCTION_SELL_ITEM, ERR_AUCTION_OK);
|
||||
|
||||
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CREATE_AUCTION, 1);
|
||||
}
|
||||
|
||||
_player->ModifyMoney(-int32(deposit));
|
||||
}
|
||||
|
||||
// this function is called when client bids or buys out auction
|
||||
|
||||
@@ -450,8 +450,8 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
// 946684800 is 01/01/2000 00:00:00 - default response time
|
||||
CalendarInvite* invite = new CalendarInvite(inviteId, 0, inviteeGuid, playerGuid, 946684800, CALENDAR_STATUS_INVITED, CALENDAR_RANK_PLAYER, "");
|
||||
sCalendarMgr->SendCalendarEventInvite(*invite);
|
||||
CalendarInvite invite(inviteId, 0, inviteeGuid, playerGuid, 946684800, CALENDAR_STATUS_INVITED, CALENDAR_RANK_PLAYER, "");
|
||||
sCalendarMgr->SendCalendarEventInvite(invite);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
|
||||
// If player is a Gamemaster and doesn't accept whisper, we auto-whitelist every player that the Gamemaster is talking to
|
||||
// We also do that if a player is under the required level for whispers.
|
||||
if (receiver->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) ||
|
||||
if (receiver->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) ||
|
||||
(HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) && !sender->isAcceptWhispers() && !sender->IsInWhisperWhiteList(receiver->GetGUID())))
|
||||
sender->AddWhisperWhiteList(receiver->GetGUID());
|
||||
|
||||
|
||||
@@ -1001,7 +1001,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recvData)
|
||||
|
||||
TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "RAD: type %u", type);
|
||||
|
||||
if (type > NUM_ACCOUNT_DATA_TYPES)
|
||||
if (type >= NUM_ACCOUNT_DATA_TYPES)
|
||||
return;
|
||||
|
||||
AccountData* adata = GetAccountData(AccountDataType(type));
|
||||
|
||||
@@ -83,6 +83,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket& recvData)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "CMSG_GMTICKET_CREATE possibly corrupt. Uncompression failed.");
|
||||
recvData.rfinish();
|
||||
delete ticket;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,12 @@ uint32 LootStore::LoadLootTable()
|
||||
continue; // error already printed to log/console.
|
||||
}
|
||||
|
||||
if (group >= 1 << 7) // it stored in 7 bit field
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: group (%u) must be less %u - skipped", GetName(), entry, item, group, 1 << 7);
|
||||
return false;
|
||||
}
|
||||
|
||||
LootStoreItem* storeitem = new LootStoreItem(item, chanceOrQuestChance, lootmode, group, mincountOrRef, maxcount);
|
||||
|
||||
if (!storeitem->IsValid(*this, entry)) // Validity checks
|
||||
@@ -293,12 +299,6 @@ bool LootStoreItem::Roll(bool rate) const
|
||||
// Checks correctness of values
|
||||
bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
|
||||
{
|
||||
if (group >= 1 << 7) // it stored in 7 bit field
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: group (%u) must be less %u - skipped", store.GetName(), entry, itemid, group, 1 << 7);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mincountOrRef == 0)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Table '%s' entry %d item %d: wrong mincountOrRef (%d) - skipped", store.GetName(), entry, itemid, mincountOrRef);
|
||||
|
||||
@@ -672,6 +672,8 @@ void Map::ProcessRelocationNotifies(const uint32 diff)
|
||||
|
||||
void Map::RemovePlayerFromMap(Player* player, bool remove)
|
||||
{
|
||||
sScriptMgr->OnPlayerLeaveMap(this, player);
|
||||
|
||||
player->RemoveFromWorld();
|
||||
SendRemoveTransports(player);
|
||||
|
||||
@@ -682,11 +684,7 @@ void Map::RemovePlayerFromMap(Player* player, bool remove)
|
||||
ASSERT(remove); //maybe deleted in logoutplayer when player is not in a map
|
||||
|
||||
if (remove)
|
||||
{
|
||||
DeleteFromWorld(player);
|
||||
|
||||
sScriptMgr->OnPlayerLeaveMap(this, player);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
||||
@@ -113,8 +113,9 @@ private:
|
||||
|
||||
struct PhaseUpdateData
|
||||
{
|
||||
void AddConditionType(ConditionTypes conditionType) { _conditionTypeFlags |= (1 << conditionType); }
|
||||
void AddQuestUpdate(uint32 questId);
|
||||
PhaseUpdateData(): _conditionTypeFlags(0), _questId(0) { }
|
||||
void AddConditionType(ConditionTypes const conditionType) { _conditionTypeFlags |= (1 << conditionType); }
|
||||
void AddQuestUpdate(uint32 const questId);
|
||||
|
||||
bool IsConditionRelated(Condition const* condition) const;
|
||||
|
||||
|
||||
@@ -209,15 +209,17 @@ enum TrinityStrings
|
||||
LANG_YOU_CHANGE_RUNIC_POWER = 173,
|
||||
LANG_YOURS_RUNIC_POWER_CHANGED = 174,
|
||||
LANG_LIQUID_STATUS = 175,
|
||||
LANG_INVALID_GAMEOBJECT_TYPE = 176,
|
||||
LANG_GAMEOBJECT_DAMAGED = 177,
|
||||
|
||||
LANG_PHASING_REPORT_STATUS = 176,
|
||||
LANG_PHASING_NO_DEFINITIONS = 177, // Phasing
|
||||
LANG_PHASING_SUCCESS = 178,
|
||||
LANG_PHASING_FAILED = 179,
|
||||
LANG_PHASING_LAST_PHASE = 180,
|
||||
LANG_PHASING_LIST = 181,
|
||||
LANG_PHASING_PHASEMASK = 182,
|
||||
// Room for more level 1 183-199 not used
|
||||
LANG_PHASING_REPORT_STATUS = 183,
|
||||
LANG_PHASING_NO_DEFINITIONS = 184, // Phasing
|
||||
// Room for more level 1 185-199 not used
|
||||
|
||||
// level 2 chat
|
||||
LANG_NO_SELECTION = 200,
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "Player.h"
|
||||
|
||||
template<class T, typename D>
|
||||
void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool updateDestination)
|
||||
void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool updateDestination)
|
||||
{
|
||||
if (!i_target.isValid() || !i_target->IsInWorld())
|
||||
return;
|
||||
@@ -117,7 +117,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T* owner, bool upd
|
||||
}
|
||||
|
||||
template<class T, typename D>
|
||||
bool TargetedMovementGeneratorMedium<T,D>::DoUpdate(T* owner, uint32 time_diff)
|
||||
bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T* owner, uint32 time_diff)
|
||||
{
|
||||
if (!i_target.isValid() || !i_target->IsInWorld())
|
||||
return false;
|
||||
@@ -185,7 +185,7 @@ template<class T>
|
||||
void ChaseMovementGenerator<T>::_reachTarget(T* owner)
|
||||
{
|
||||
if (owner->IsWithinMeleeRange(this->i_target.getTarget()))
|
||||
owner->Attack(this->i_target.getTarget(),true);
|
||||
owner->Attack(this->i_target.getTarget(), true);
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -303,14 +303,14 @@ void FollowMovementGenerator<Creature>::MovementInform(Creature* unit)
|
||||
}
|
||||
|
||||
//-----------------------------------------------//
|
||||
template void TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::_setTargetLocation(Player*, bool);
|
||||
template void TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::_setTargetLocation(Player*, bool);
|
||||
template void TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature*, bool);
|
||||
template void TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::_setTargetLocation(Creature*, bool);
|
||||
template bool TargetedMovementGeneratorMedium<Player,ChaseMovementGenerator<Player> >::DoUpdate(Player*, uint32);
|
||||
template bool TargetedMovementGeneratorMedium<Player,FollowMovementGenerator<Player> >::DoUpdate(Player*, uint32);
|
||||
template bool TargetedMovementGeneratorMedium<Creature,ChaseMovementGenerator<Creature> >::DoUpdate(Creature*, uint32);
|
||||
template bool TargetedMovementGeneratorMedium<Creature,FollowMovementGenerator<Creature> >::DoUpdate(Creature*, uint32);
|
||||
template void TargetedMovementGeneratorMedium<Player, ChaseMovementGenerator<Player> >::_setTargetLocation(Player*, bool);
|
||||
template void TargetedMovementGeneratorMedium<Player, FollowMovementGenerator<Player> >::_setTargetLocation(Player*, bool);
|
||||
template void TargetedMovementGeneratorMedium<Creature, ChaseMovementGenerator<Creature> >::_setTargetLocation(Creature*, bool);
|
||||
template void TargetedMovementGeneratorMedium<Creature, FollowMovementGenerator<Creature> >::_setTargetLocation(Creature*, bool);
|
||||
template bool TargetedMovementGeneratorMedium<Player, ChaseMovementGenerator<Player> >::DoUpdate(Player*, uint32);
|
||||
template bool TargetedMovementGeneratorMedium<Player, FollowMovementGenerator<Player> >::DoUpdate(Player*, uint32);
|
||||
template bool TargetedMovementGeneratorMedium<Creature, ChaseMovementGenerator<Creature> >::DoUpdate(Creature*, uint32);
|
||||
template bool TargetedMovementGeneratorMedium<Creature, FollowMovementGenerator<Creature> >::DoUpdate(Creature*, uint32);
|
||||
|
||||
template void ChaseMovementGenerator<Player>::_reachTarget(Player*);
|
||||
template void ChaseMovementGenerator<Creature>::_reachTarget(Creature*);
|
||||
|
||||
@@ -701,7 +701,7 @@ dtStatus PathGenerator::FindSmoothPath(float const* startPos, float const* endPo
|
||||
// Find movement delta.
|
||||
float delta[VERTEX_SIZE];
|
||||
dtVsub(delta, steerPos, iterPos);
|
||||
float len = dtSqrt(dtVdot(delta,delta));
|
||||
float len = dtSqrt(dtVdot(delta, delta));
|
||||
// If the steer target is end of path or off-mesh link, do not move past the location.
|
||||
if ((endOfPath || offMeshConnection) && len < SMOOTH_PATH_STEP_SIZE)
|
||||
len = 1.0f;
|
||||
|
||||
@@ -40,13 +40,13 @@ class Path
|
||||
void erase(uint32 idx) { i_nodes.erase(i_nodes.begin()+idx); }
|
||||
void crop(unsigned int start, unsigned int end)
|
||||
{
|
||||
while(start && !i_nodes.empty())
|
||||
while (start && !i_nodes.empty())
|
||||
{
|
||||
i_nodes.pop_front();
|
||||
--start;
|
||||
}
|
||||
|
||||
while(end && !i_nodes.empty())
|
||||
while (end && !i_nodes.empty())
|
||||
{
|
||||
i_nodes.pop_back();
|
||||
--end;
|
||||
|
||||
@@ -446,6 +446,7 @@ void AddSC_ulduar_teleporter();
|
||||
void AddSC_boss_mimiron();
|
||||
void AddSC_boss_hodir();
|
||||
void AddSC_boss_freya();
|
||||
void AddSC_boss_yogg_saron();
|
||||
void AddSC_boss_algalon_the_observer();
|
||||
void AddSC_instance_ulduar();
|
||||
void AddSC_boss_keleseth(); //Utgarde Keep
|
||||
@@ -1188,6 +1189,7 @@ void AddNorthrendScripts()
|
||||
AddSC_boss_mimiron();
|
||||
AddSC_boss_hodir();
|
||||
AddSC_boss_freya();
|
||||
AddSC_boss_yogg_saron();
|
||||
AddSC_boss_algalon_the_observer();
|
||||
AddSC_instance_ulduar();
|
||||
AddSC_boss_keleseth(); //Utgarde Keep
|
||||
|
||||
@@ -683,7 +683,7 @@ void AuraEffect::CalculateSpellMod()
|
||||
m_spellmod->op = SpellModOp(GetMiscValue());
|
||||
ASSERT(m_spellmod->op < MAX_SPELLMOD);
|
||||
|
||||
m_spellmod->type = SpellModType(GetAuraType()); // SpellModType value == spell aura types
|
||||
m_spellmod->type = SpellModType(uint32(GetAuraType())); // SpellModType value == spell aura types
|
||||
m_spellmod->spellId = GetId();
|
||||
m_spellmod->mask = GetSpellInfo()->Effects[GetEffIndex()].SpellClassMask;
|
||||
m_spellmod->charges = GetBase()->GetCharges();
|
||||
@@ -1788,17 +1788,17 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
int32 basePoints = std::min<int32>(oldPower, FurorChance);
|
||||
target->SetPower(POWER_ENERGY, 0);
|
||||
target->CastCustomSpell(target, 17099, &basePoints, NULL, NULL, true, NULL, this);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FORM_BEAR:
|
||||
if (irand(0, 99) < FurorChance)
|
||||
if (urand(0, 99) < FurorChance)
|
||||
target->CastSpell(target, 17057, true);
|
||||
default:
|
||||
{
|
||||
int32 newEnergy = std::min(target->GetPower(POWER_ENERGY), FurorChance);
|
||||
target->SetPower(POWER_ENERGY, newEnergy);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2613,7 +2613,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
{
|
||||
// for delayed spells ignore negative spells (after duel end) for friendly targets
|
||||
/// @todo this cause soul transfer bugged
|
||||
if (m_spellInfo->Speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->IsPositive())
|
||||
// 63881 - Malady of the Mind jump spell (Yogg-Saron)
|
||||
if (m_spellInfo->Speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !m_spellInfo->IsPositive() && m_spellInfo->Id != 63881)
|
||||
return SPELL_MISS_EVADE;
|
||||
|
||||
// assisting case, healing and resurrection
|
||||
@@ -3344,7 +3345,7 @@ void Spell::handle_immediate()
|
||||
if (m_spellInfo->IsChanneled())
|
||||
{
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
if (duration)
|
||||
if (duration > 0)
|
||||
{
|
||||
// First mod_duration then haste - see Missile Barrage
|
||||
// Apply duration mod
|
||||
|
||||
@@ -5417,7 +5417,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l+1) && player->GetCurrentRune(l+1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)))
|
||||
{
|
||||
// Should always update the rune with the lowest cd
|
||||
if (player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1))
|
||||
if (l + 1 < MAX_RUNES && player->GetRuneCooldown(l) >= player->GetRuneCooldown(l+1))
|
||||
l++;
|
||||
player->SetRuneCooldown(l, 0);
|
||||
--count;
|
||||
|
||||
@@ -2690,7 +2690,7 @@ bool SpellInfo::_IsPositiveEffect(uint8 effIndex, bool deep) const
|
||||
continue;
|
||||
// if non-positive trigger cast targeted to positive target this main cast is non-positive
|
||||
// this will place this spell auras as debuffs
|
||||
if (!_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
|
||||
if (_IsPositiveTarget(spellTriggeredProto->Effects[i].TargetA.GetTarget(), spellTriggeredProto->Effects[i].TargetB.GetTarget()) && !spellTriggeredProto->_IsPositiveEffect(i, true))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
|
||||
// ToC Icehowl Arctic Breath
|
||||
else if (spellproto->SpellVisual[0] == 14153)
|
||||
return DIMINISHING_NONE;
|
||||
// Black Plague
|
||||
else if (spellproto->Id == 64155)
|
||||
return DIMINISHING_NONE;
|
||||
break;
|
||||
}
|
||||
// Event spells
|
||||
@@ -3374,6 +3377,14 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
// that will be clear if we get more spells with problem like this
|
||||
spellInfo->AttributesEx |= SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY;
|
||||
break;
|
||||
case 61791: // Ride Vehicle (Yogg-Saron)
|
||||
// TODO: remove this when basepoints of all Ride Vehicle auras are calculated correctly
|
||||
spellInfo->Effects[EFFECT_0].BasePoints = 1;
|
||||
break;
|
||||
case 64468: // Empowering Shadows (Yogg-Saron)
|
||||
case 64486: // Empowering Shadows (Yogg-Saron)
|
||||
spellInfo->MaxAffectedTargets = 3; // same for both modes?
|
||||
break;
|
||||
case 62301: // Cosmic Smash (Algalon the Observer)
|
||||
spellInfo->MaxAffectedTargets = 1;
|
||||
break;
|
||||
|
||||
@@ -2203,7 +2203,7 @@ namespace Trinity
|
||||
{
|
||||
WorldPacket* data = new WorldPacket();
|
||||
|
||||
uint32 lineLength = (line ? strlen(line) : 0) + 1;
|
||||
uint32 lineLength = strlen(line) + 1;
|
||||
|
||||
data->Initialize(SMSG_MESSAGECHAT, 100); // guess size
|
||||
*data << uint8(CHAT_MSG_SYSTEM);
|
||||
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
char* arg3 = strtok(NULL, " ");
|
||||
bool isAccountNameGiven = true;
|
||||
|
||||
if (arg1 && !arg3)
|
||||
if (!arg3)
|
||||
{
|
||||
if (!handler->getSelectedPlayer())
|
||||
return false;
|
||||
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
|
||||
playerOldName = target->GetName();
|
||||
}
|
||||
else
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (WorldSession* session = handler->GetSession())
|
||||
{
|
||||
if (!session->HasPermission(RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(newName))
|
||||
|
||||
@@ -45,20 +45,20 @@ public:
|
||||
|
||||
ChatCommand* GetCommands() const
|
||||
{
|
||||
static ChatCommand deserterInstanceCommandTable[] =
|
||||
static ChatCommand deserterInstanceCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, &HandleDeserterInstanceAdd, "", NULL },
|
||||
{ "remove", SEC_ADMINISTRATOR, false, &HandleDeserterInstanceRemove, "", NULL },
|
||||
{ NULL, SEC_PLAYER, false, NULL, "", NULL }
|
||||
};
|
||||
static ChatCommand deserterBGCommandTable[] =
|
||||
static ChatCommand deserterBGCommandTable[] =
|
||||
{
|
||||
{ "add", SEC_ADMINISTRATOR, false, &HandleDeserterBGAdd, "", NULL },
|
||||
{ "remove", SEC_ADMINISTRATOR, false, &HandleDeserterBGRemove, "", NULL },
|
||||
{ NULL, SEC_PLAYER, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand deserterCommandTable[] =
|
||||
static ChatCommand deserterCommandTable[] =
|
||||
{
|
||||
{ "instance", SEC_ADMINISTRATOR, false, NULL, "", deserterInstanceCommandTable },
|
||||
{ "bg", SEC_ADMINISTRATOR, false, NULL, "", deserterBGCommandTable },
|
||||
|
||||
@@ -518,7 +518,7 @@ public:
|
||||
uint32 copp = (money % GOLD) % SILVER;
|
||||
std::string receiverStr = handler->playerLink(receiver);
|
||||
std::string senderStr = handler->playerLink(sender);
|
||||
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_1 , messageId, subject.c_str(),gold, silv, copp);
|
||||
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_1, messageId, subject.c_str(), gold, silv, copp);
|
||||
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_2, senderStr.c_str(), senderId, receiverStr.c_str(), receiverId);
|
||||
handler->PSendSysMessage(LANG_LIST_MAIL_INFO_3, TimeToTimestampStr(deliverTime).c_str(), TimeToTimestampStr(expireTime).c_str());
|
||||
if (hasItem == 1)
|
||||
@@ -541,7 +541,7 @@ public:
|
||||
uint32 item_entry = fields[0].GetUInt32();
|
||||
uint32 item_count = fields[1].GetUInt32();
|
||||
QueryResult result4;
|
||||
result4 = WorldDatabase.PQuery("SELECT name,quality FROM item_template WHERE entry = '%u'", item_entry);
|
||||
result4 = WorldDatabase.PQuery("SELECT name, quality FROM item_template WHERE entry = '%u'", item_entry);
|
||||
Field* fields1 = result4->Fetch();
|
||||
std::string item_name = fields1[0].GetString();
|
||||
int item_quality = fields1[1].GetUInt8();
|
||||
|
||||
@@ -869,12 +869,7 @@ public:
|
||||
|
||||
uint32 id = atoi((char*)args);
|
||||
|
||||
bool found = false;
|
||||
uint32 count = 0;
|
||||
uint32 maxResults = 1;
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id);
|
||||
if (spellInfo)
|
||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id))
|
||||
{
|
||||
int locale = handler->GetSessionDbcLocale();
|
||||
std::string name = spellInfo->SpellName;
|
||||
@@ -884,14 +879,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (locale < TOTAL_LOCALES)
|
||||
{
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool known = target && target->HasSpell(id);
|
||||
bool learn = (spellInfo->Effects[0].Effect == SPELL_EFFECT_LEARN_SPELL);
|
||||
|
||||
@@ -935,13 +922,8 @@ public:
|
||||
ss << handler->GetTrinityString(LANG_ACTIVE);
|
||||
|
||||
handler->SendSysMessage(ss.str().c_str());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
else
|
||||
handler->SendSysMessage(LANG_COMMAND_NOSPELLFOUND);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1070,9 +1070,7 @@ public:
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
uint32 zone_id = player->GetZoneId();
|
||||
|
||||
WorldSafeLocsEntry const* graveyard = sObjectMgr->GetClosestGraveYard(
|
||||
player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), team);
|
||||
|
||||
WorldSafeLocsEntry const* graveyard = sObjectMgr->GetClosestGraveYard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), team);
|
||||
if (graveyard)
|
||||
{
|
||||
uint32 graveyardId = graveyard->ID;
|
||||
@@ -1102,14 +1100,12 @@ public:
|
||||
{
|
||||
std::string team_name;
|
||||
|
||||
if (team == 0)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_ANY);
|
||||
else if (team == HORDE)
|
||||
if (team == HORDE)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_HORDE);
|
||||
else if (team == ALLIANCE)
|
||||
team_name = handler->GetTrinityString(LANG_COMMAND_GRAVEYARD_ALLIANCE);
|
||||
|
||||
if (team == ~uint32(0))
|
||||
if (!team)
|
||||
handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAVEYARDS, zone_id);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_COMMAND_ZONENOGRAFACTION, zone_id, team_name.c_str());
|
||||
@@ -2046,6 +2042,70 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* str = strtok((char*)args, " ");
|
||||
|
||||
if (strcmp(str, "go") == 0)
|
||||
{
|
||||
char* guidStr = strtok(NULL, " ");
|
||||
if (!guidStr)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 guid = atoi(guidStr);
|
||||
if (!guid)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
char* damageStr = strtok(NULL, " ");
|
||||
if (!damageStr)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 damage = atoi(damageStr);
|
||||
if (!damage)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Player* player = handler->GetSession()->GetPlayer())
|
||||
{
|
||||
GameObject* go = NULL;
|
||||
|
||||
if (GameObjectData const* goData = sObjectMgr->GetGOData(guid))
|
||||
go = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guid, goData->id);
|
||||
|
||||
if (!go)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guid);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!go->IsDestructibleBuilding())
|
||||
{
|
||||
handler->SendSysMessage(LANG_INVALID_GAMEOBJECT_TYPE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
go->ModifyHealth(-damage, player);
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_DAMAGED, go->GetName().c_str(), guid, -damage, go->GetGOValue()->Building.Health);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Unit* target = handler->getSelectedUnit();
|
||||
if (!target || !handler->GetSession()->GetPlayer()->GetSelection())
|
||||
{
|
||||
@@ -2084,7 +2144,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 school = schoolStr ? atoi((char*)schoolStr) : SPELL_SCHOOL_NORMAL;
|
||||
uint32 school = atoi((char*)schoolStr);
|
||||
if (school >= MAX_SPELL_SCHOOL)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
int32 gy = 32 - player->GetPositionY() / SIZE_OF_GRIDS;
|
||||
|
||||
handler->PSendSysMessage("%03u%02i%02i.mmtile", player->GetMapId(), gy, gx);
|
||||
handler->PSendSysMessage("gridloc [%i,%i]", gx, gy);
|
||||
handler->PSendSysMessage("gridloc [%i, %i]", gx, gy);
|
||||
|
||||
// calculate navmesh tile location
|
||||
dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapManager()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId());
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
int32 tilex = int32((y - min[0]) / SIZE_OF_GRIDS);
|
||||
int32 tiley = int32((x - min[2]) / SIZE_OF_GRIDS);
|
||||
|
||||
handler->PSendSysMessage("Calc [%02i,%02i]", tilex, tiley);
|
||||
handler->PSendSysMessage("Calc [%02i, %02i]", tilex, tiley);
|
||||
|
||||
// navmesh poly -> navmesh tile location
|
||||
dtQueryFilter filter = dtQueryFilter();
|
||||
@@ -156,16 +156,16 @@ public:
|
||||
navmeshquery->findNearestPoly(location, extents, &filter, &polyRef, NULL);
|
||||
|
||||
if (polyRef == INVALID_POLYREF)
|
||||
handler->PSendSysMessage("Dt [??,??] (invalid poly, probably no tile loaded)");
|
||||
handler->PSendSysMessage("Dt [??, ??] (invalid poly, probably no tile loaded)");
|
||||
else
|
||||
{
|
||||
dtMeshTile const* tile;
|
||||
dtPoly const* poly;
|
||||
navmesh->getTileAndPolyByRef(polyRef, &tile, &poly);
|
||||
if (tile)
|
||||
handler->PSendSysMessage("Dt [%02i,%02i]", tile->header->x, tile->header->y);
|
||||
handler->PSendSysMessage("Dt [%02i, %02i]", tile->header->x, tile->header->y);
|
||||
else
|
||||
handler->PSendSysMessage("Dt [??,??] (no tile loaded)");
|
||||
handler->PSendSysMessage("Dt [??, ??] (no tile loaded)");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
if (!tile || !tile->header)
|
||||
continue;
|
||||
|
||||
handler->PSendSysMessage("[%02i,%02i]", tile->header->x, tile->header->y);
|
||||
handler->PSendSysMessage("[%02i, %02i]", tile->header->x, tile->header->y);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -310,24 +310,14 @@ public:
|
||||
|
||||
if (!pfactionid)
|
||||
{
|
||||
if (target)
|
||||
{
|
||||
uint32 factionid = target->getFaction();
|
||||
uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS);
|
||||
uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
uint32 dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
}
|
||||
uint32 factionid = target->getFaction();
|
||||
uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS);
|
||||
uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
uint32 dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 factionid = atoi(pfactionid);
|
||||
uint32 flag;
|
||||
|
||||
@@ -341,7 +331,7 @@ public:
|
||||
|
||||
uint32 npcflag;
|
||||
if (!pnpcflag)
|
||||
npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
else
|
||||
npcflag = atoi(pnpcflag);
|
||||
|
||||
@@ -349,7 +339,7 @@ public:
|
||||
|
||||
uint32 dyflag;
|
||||
if (!pdyflag)
|
||||
dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
else
|
||||
dyflag = atoi(pdyflag);
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 vendor_entry = vendor ? vendor->GetEntry() : 0;
|
||||
uint32 vendor_entry = vendor->GetEntry();
|
||||
|
||||
if (!sObjectMgr->IsVendorItemValid(vendor_entry, itemId, maxcount, incrtime, extendedcost, type, handler->GetSession()->GetPlayer()))
|
||||
{
|
||||
|
||||
@@ -32,6 +32,12 @@ EndScriptData */
|
||||
struct RBACCommandData
|
||||
{
|
||||
RBACCommandData(): id(0), realmId(0), rbac(NULL), needDelete(false) { }
|
||||
~RBACCommandData()
|
||||
{
|
||||
if (needDelete)
|
||||
delete rbac;
|
||||
}
|
||||
|
||||
uint32 id;
|
||||
int32 realmId;
|
||||
RBACData* rbac;
|
||||
@@ -230,8 +236,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -266,8 +271,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -295,8 +299,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -335,8 +338,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -375,8 +377,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -411,8 +412,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -453,8 +453,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -493,8 +492,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -533,8 +531,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -569,8 +566,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -613,8 +609,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -643,8 +638,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (command->needDelete)
|
||||
delete command;
|
||||
delete command;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ public:
|
||||
if (show == "info")
|
||||
{
|
||||
// Check if the user did specify a visual waypoint
|
||||
if (target->GetEntry() != VISUAL_WAYPOINT)
|
||||
if (target && target->GetEntry() != VISUAL_WAYPOINT)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_SELECT);
|
||||
handler->SetSentErrorMessage(true);
|
||||
|
||||
@@ -146,49 +146,51 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent() && !UpdateVictim())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case INTRO_1:
|
||||
me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false);
|
||||
break;
|
||||
case INTRO_2:
|
||||
me->GetMotionMaster()->MovePoint(0, PosMove[0]);
|
||||
events.ScheduleEvent(INTRO_3, 1000);
|
||||
break;
|
||||
case INTRO_3:
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
me->SetFacingTo(0.01745329f);
|
||||
events.ScheduleEvent(INTRO_4, 3000);
|
||||
break;
|
||||
case INTRO_4:
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD)))
|
||||
brazier->SetGoState(GO_STATE_READY);
|
||||
me->SetWalk(true);
|
||||
me->SetDisableGravity(false);
|
||||
DoCast(me, SPELL_KIRTONOS_TRANSFORM);
|
||||
me->SetCanFly(false);
|
||||
events.ScheduleEvent(INTRO_5, 1000);
|
||||
break;
|
||||
case INTRO_5:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_KIRTONOS_STAFF));
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.ScheduleEvent(INTRO_6, 5000);
|
||||
break;
|
||||
case INTRO_6:
|
||||
me->GetMotionMaster()->MovePoint(0, PosMove[1]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case INTRO_1:
|
||||
me->GetMotionMaster()->MovePath(KIRTONOS_PATH, false);
|
||||
break;
|
||||
case INTRO_2:
|
||||
me->GetMotionMaster()->MovePoint(0, PosMove[0]);
|
||||
events.ScheduleEvent(INTRO_3, 1000);
|
||||
break;
|
||||
case INTRO_3:
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
me->SetFacingTo(0.01745329f);
|
||||
events.ScheduleEvent(INTRO_4, 3000);
|
||||
break;
|
||||
case INTRO_4:
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD)))
|
||||
brazier->SetGoState(GO_STATE_READY);
|
||||
me->SetWalk(true);
|
||||
me->SetDisableGravity(false);
|
||||
DoCast(me, SPELL_KIRTONOS_TRANSFORM);
|
||||
me->SetCanFly(false);
|
||||
events.ScheduleEvent(INTRO_5, 1000);
|
||||
break;
|
||||
case INTRO_5:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_KIRTONOS_STAFF));
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.ScheduleEvent(INTRO_6, 5000);
|
||||
break;
|
||||
case INTRO_6:
|
||||
me->GetMotionMaster()->MovePoint(0, PosMove[1]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
@@ -773,7 +773,7 @@ public:
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true);
|
||||
if (target && summon)
|
||||
if (target)
|
||||
summon->Attack(target, false);
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_STINGER_SPRAY = 0,
|
||||
EVENT_POISON_STINGER = 1,
|
||||
EVENT_SUMMON_SWARMER = 2,
|
||||
EVENT_SWARMER_ATTACK = 3,
|
||||
EVENT_PARALYZE = 4,
|
||||
EVENT_LASH = 5,
|
||||
EVENT_TRASH = 6
|
||||
EVENT_STINGER_SPRAY = 1,
|
||||
EVENT_POISON_STINGER = 2,
|
||||
EVENT_SUMMON_SWARMER = 3,
|
||||
EVENT_SWARMER_ATTACK = 4,
|
||||
EVENT_PARALYZE = 5,
|
||||
EVENT_LASH = 6,
|
||||
EVENT_TRASH = 7
|
||||
};
|
||||
|
||||
enum Emotes
|
||||
|
||||
@@ -42,11 +42,11 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_DISMEMBER = 0,
|
||||
EVENT_GATHERING_SPEED = 1,
|
||||
EVENT_FULL_SPEED = 2,
|
||||
EVENT_CREEPING_PLAGUE = 3,
|
||||
EVENT_RESPAWN_EGG = 4
|
||||
EVENT_DISMEMBER = 1,
|
||||
EVENT_GATHERING_SPEED = 2,
|
||||
EVENT_FULL_SPEED = 3,
|
||||
EVENT_CREEPING_PLAGUE = 4,
|
||||
EVENT_RESPAWN_EGG = 5
|
||||
};
|
||||
|
||||
enum Phases
|
||||
|
||||
@@ -40,10 +40,10 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_ARCANE_EXPLOSION = 0,
|
||||
EVENT_FULLFILMENT = 1,
|
||||
EVENT_BLINK = 2,
|
||||
EVENT_EARTH_SHOCK = 3
|
||||
EVENT_ARCANE_EXPLOSION = 1,
|
||||
EVENT_FULLFILMENT = 2,
|
||||
EVENT_BLINK = 3,
|
||||
EVENT_EARTH_SHOCK = 4
|
||||
};
|
||||
|
||||
uint32 const BlinkSpells[3] = { 4801, 8195, 20449 };
|
||||
|
||||
@@ -58,8 +58,8 @@ enum HauntingWitchHill
|
||||
NPC_RISEN_SPIRIT = 23554,
|
||||
|
||||
// Events
|
||||
EVENT_CONSUME_FLESH = 0,
|
||||
EVENT_INTANGIBLE_PRESENCE = 1,
|
||||
EVENT_CONSUME_FLESH = 1,
|
||||
EVENT_INTANGIBLE_PRESENCE = 2,
|
||||
};
|
||||
|
||||
class mobs_risen_husk_spirit : public CreatureScript
|
||||
|
||||
@@ -154,14 +154,14 @@ struct DialogueEntry
|
||||
class DialogueHelper
|
||||
{
|
||||
public:
|
||||
// The array MUST be terminated by {0,0,0}
|
||||
// The array MUST be terminated by {0, 0, 0}
|
||||
DialogueHelper(DialogueEntry const* dialogueArray) :
|
||||
_dialogueArray(dialogueArray),
|
||||
_currentEntry(NULL),
|
||||
_actionTimer(0),
|
||||
_isFirstSide(true)
|
||||
{}
|
||||
// The array MUST be terminated by {0,0,0,0,0}
|
||||
// The array MUST be terminated by {0, 0, 0, 0, 0}
|
||||
|
||||
/// Function to initialize the dialogue helper for instances. If not used with instances, GetSpeakerByEntry MUST be overwritten to obtain the speakers
|
||||
/// Set if take first entries or second entries
|
||||
@@ -182,9 +182,7 @@ public:
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DoNextDialogueStep();
|
||||
}
|
||||
@@ -210,7 +208,7 @@ private:
|
||||
void DoNextDialogueStep()
|
||||
{
|
||||
// Last Dialogue Entry done?
|
||||
if (_currentEntry && !_currentEntry->TextEntry)
|
||||
if (!_currentEntry || !_currentEntry->TextEntry)
|
||||
{
|
||||
_actionTimer = 0;
|
||||
return;
|
||||
@@ -400,7 +398,7 @@ public:
|
||||
|
||||
void WaypointReached(uint32 pointId)
|
||||
{
|
||||
switch(pointId)
|
||||
switch (pointId)
|
||||
{
|
||||
case 3:
|
||||
Talk(SAY_ENTER_OWL_THICKET);
|
||||
@@ -439,7 +437,7 @@ public:
|
||||
SetEscortPaused(true);
|
||||
DoSummonPriestess();
|
||||
Talk(SAY_RANSHALLA_ALTAR_2);
|
||||
events.ScheduleEvent(EVENT_RESUME,2000);
|
||||
events.ScheduleEvent(EVENT_RESUME, 2000);
|
||||
break;
|
||||
case 44:
|
||||
// Stop the escort and turn towards the altar
|
||||
|
||||
@@ -26,7 +26,7 @@ set(scripts_STAT_SRCS
|
||||
Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
|
||||
Northrend/Ulduar/Ulduar/instance_ulduar.cpp
|
||||
Northrend/Ulduar/Ulduar/boss_auriaya.cpp
|
||||
Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp
|
||||
Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
|
||||
Northrend/Ulduar/Ulduar/boss_hodir.cpp
|
||||
Northrend/Ulduar/Ulduar/boss_assembly_of_iron.cpp
|
||||
Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
|
||||
|
||||
+3
@@ -149,6 +149,9 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= NUM_MESSAGES)
|
||||
return false;
|
||||
|
||||
player->SEND_GOSSIP_MENU(_GossipMessage[i].msgnum, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_BERSERK = 0,
|
||||
EVENT_CLOUD = 1,
|
||||
EVENT_INJECT = 2,
|
||||
EVENT_SPRAY = 3
|
||||
EVENT_BERSERK = 1,
|
||||
EVENT_CLOUD = 2,
|
||||
EVENT_INJECT = 3,
|
||||
EVENT_SPRAY = 4
|
||||
};
|
||||
|
||||
enum CreatureId
|
||||
@@ -46,7 +46,8 @@ enum CreatureId
|
||||
|
||||
class boss_grobbulus : public CreatureScript
|
||||
{
|
||||
public: boss_grobbulus() : CreatureScript("boss_grobbulus") { }
|
||||
public:
|
||||
boss_grobbulus() : CreatureScript("boss_grobbulus") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
|
||||
@@ -754,7 +754,7 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim() && _phase != PHASE_NOT_STARTED && _phase != PHASE_TWO)
|
||||
if (!instance || (!UpdateVictim() && _phase != PHASE_NOT_STARTED && _phase != PHASE_TWO))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
@@ -854,7 +854,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (_arcaneReinforcements && instance)
|
||||
if (_arcaneReinforcements)
|
||||
{
|
||||
for (uint8 rangeDisks = 0; rangeDisks < (GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL ? 4 : 5); rangeDisks++)
|
||||
{
|
||||
|
||||
@@ -110,103 +110,107 @@ class npc_verdisa_beglaristrasz_eternos : public CreatureScript
|
||||
public:
|
||||
npc_verdisa_beglaristrasz_eternos() : CreatureScript("npc_verdisa_beglaristrasz_eternos") { }
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_VERDISA: //Verdisa
|
||||
switch (action)
|
||||
case NPC_VERDISA: //Verdisa
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(player))
|
||||
switch (action)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA2, creature->GetGUID());
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(player))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERDISA2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA2, creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
player->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_EMERALD_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
player->StoreNewItem(dest, ITEM_EMERALD_ESSENCE, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VERDISA3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NPC_BELGARISTRASZ: //Belgaristrasz
|
||||
switch (action)
|
||||
case NPC_BELGARISTRASZ: //Belgaristrasz
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(player))
|
||||
switch (action)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ2, creature->GetGUID());
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(player))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BELGARISTRASZ2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ2, creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
player->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_RUBY_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
player->StoreNewItem(dest, ITEM_RUBY_ESSENCE, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_BELGARISTRASZ3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case NPC_ETERNOS: //Eternos
|
||||
switch (action)
|
||||
case NPC_ETERNOS: //Eternos
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(player))
|
||||
switch (action)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS2, creature->GetGUID());
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
if (!HAS_ESSENCE(player))
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS1, creature->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ETERNOS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS2, creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
player->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_AMBER_ESSENCE, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
player->StoreNewItem(dest, ITEM_AMBER_ESSENCE, true);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ETERNOS3, creature->GetGUID());
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -235,15 +239,15 @@ public:
|
||||
|
||||
void MovementInform(uint32 /*type*/, uint32 id)
|
||||
{
|
||||
if (id)
|
||||
return;
|
||||
|
||||
// When Belgaristraz finish his moving say grateful text
|
||||
if (me->GetEntry() == NPC_BELGARISTRASZ)
|
||||
if (id == 0)
|
||||
{
|
||||
Talk(SAY_BELGARISTRASZ);
|
||||
}
|
||||
Talk(SAY_BELGARISTRASZ);
|
||||
|
||||
// The gossip flag should activate when Drakos die and not from DB
|
||||
if (id == 0)
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ulduar.h"
|
||||
|
||||
enum Sara
|
||||
{
|
||||
// text
|
||||
YELL_SARA_PREFIGHT = 0,
|
||||
YELL_COMBAT_PHASE_1 = 1,
|
||||
YELL_COMBAT_PHASE_2 = 2,
|
||||
YELL_SLAY = 3,
|
||||
|
||||
// Phase 1 spells
|
||||
SPELL_SARAS_ANGER_1 = 63147, // Target Entry 33136
|
||||
SPELL_SARAS_ANGER_2 = 63744, // Target Entry 33136
|
||||
SPELL_SARAS_FEVOR_1 = 63138, // Target Player
|
||||
SPELL_SARAS_FEVOR_2 = 63747, // Target Player
|
||||
SPELL_SARAS_BLESSING_1 = 63134, // Target Player
|
||||
SPELL_SARAS_BLESSING_2 = 63745, // Target Self
|
||||
|
||||
// Phase 2 spells
|
||||
SPELL_PHYCHOSIS = 63795, // Target Self
|
||||
SPELL_MALADY_OF_THE_MIND = 63830, // Target Self
|
||||
SPELL_DEATH_RAY = 63891, // Target Self
|
||||
SPELL_BRAIN_LINK = 63802, // Target Self
|
||||
};
|
||||
|
||||
enum YoggSaron_Yells
|
||||
{
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ACHIEV_TIMED_START_EVENT = 21001,
|
||||
};
|
||||
//not in scriptloader yet just to remove warning boss_yoggsaron.obj : warning LNK4221: no public symbols found; archive member will be inaccessible
|
||||
void AddSC_boss_yoggsaron()
|
||||
{
|
||||
}
|
||||
@@ -24,14 +24,15 @@
|
||||
|
||||
static DoorData const doorData[] =
|
||||
{
|
||||
{GO_LEVIATHAN_DOOR, BOSS_LEVIATHAN, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_XT_002_DOOR, BOSS_XT002, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_W },
|
||||
{GO_DOODAD_UL_UNIVERSEFLOOR_01, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_UNIVERSEFLOOR_02, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_UNIVERSEGLOBE01, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{GO_LEVIATHAN_DOOR, BOSS_LEVIATHAN, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_XT_002_DOOR, BOSS_XT002, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_YOGG_SARON_DOOR, BOSS_YOGG_SARON, DOOR_TYPE_ROOM, BOUNDARY_S },
|
||||
{GO_DOODAD_UL_SIGILDOOR_03, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_W },
|
||||
{GO_DOODAD_UL_UNIVERSEFLOOR_01, BOSS_ALGALON, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_UNIVERSEFLOOR_02, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_UNIVERSEGLOBE01, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, BOSS_ALGALON, DOOR_TYPE_SPAWN_HOLE, BOUNDARY_NONE },
|
||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
};
|
||||
|
||||
MinionData const minionData[] =
|
||||
@@ -56,7 +57,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint64 IgnisGUID;
|
||||
uint64 RazorscaleGUID;
|
||||
uint64 RazorscaleController;
|
||||
uint64 RazorHarpoonGUIDs[4];
|
||||
uint64 ExpeditionCommanderGUID;
|
||||
uint64 XT002GUID;
|
||||
uint64 XTToyPileGUIDs[4];
|
||||
@@ -67,14 +67,18 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint64 HodirGUID;
|
||||
uint64 ThorimGUID;
|
||||
uint64 FreyaGUID;
|
||||
uint64 KeeperGUIDs[3];
|
||||
uint64 ElderGUIDs[3];
|
||||
uint64 VezaxGUID;
|
||||
uint64 YoggSaronGUID;
|
||||
uint64 VoiceOfYoggSaronGUID;
|
||||
uint64 SaraGUID;
|
||||
uint64 BrainOfYoggSaronGUID;
|
||||
uint64 AlgalonGUID;
|
||||
uint64 LeviathanGateGUID;
|
||||
uint64 VezaxDoorGUID;
|
||||
uint64 BrannBronzebeardAlgGUID;
|
||||
|
||||
// GameObjects
|
||||
uint64 LeviathanGateGUID;
|
||||
uint64 RazorHarpoonGUIDs[4];
|
||||
uint64 KologarnChestGUID;
|
||||
uint64 KologarnBridgeGUID;
|
||||
uint64 KologarnDoorGUID;
|
||||
@@ -84,11 +88,13 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint64 HodirDoorGUID;
|
||||
uint64 HodirIceDoorGUID;
|
||||
uint64 ArchivumDoorGUID;
|
||||
uint64 VezaxDoorGUID;
|
||||
uint64 BrainRoomDoorGUIDs[3];
|
||||
uint64 KeeperGUIDs[4];
|
||||
uint64 AlgalonSigilDoorGUID[3];
|
||||
uint64 AlgalonFloorGUID[2];
|
||||
uint64 AlgalonUniverseGUID;
|
||||
uint64 AlgalonTrapdoorGUID;
|
||||
uint64 BrannBronzebeardAlgGUID;
|
||||
uint64 GiftOfTheObserverGUID;
|
||||
|
||||
// Miscellaneous
|
||||
@@ -96,8 +102,11 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint32 HodirRareCacheData;
|
||||
uint32 ColossusData;
|
||||
uint8 elderCount;
|
||||
uint8 illusion;
|
||||
uint8 keepersCount;
|
||||
bool conSpeedAtory;
|
||||
bool Unbroken;
|
||||
bool IsDriveMeCrazyEligible;
|
||||
|
||||
std::set<uint64> mRubbleSpawns;
|
||||
|
||||
@@ -119,6 +128,9 @@ class instance_ulduar : public InstanceMapScript
|
||||
FreyaGUID = 0;
|
||||
VezaxGUID = 0;
|
||||
YoggSaronGUID = 0;
|
||||
VoiceOfYoggSaronGUID = 0;
|
||||
SaraGUID = 0;
|
||||
BrainOfYoggSaronGUID = 0;
|
||||
AlgalonGUID = 0;
|
||||
KologarnChestGUID = 0;
|
||||
KologarnBridgeGUID = 0;
|
||||
@@ -141,6 +153,8 @@ class instance_ulduar : public InstanceMapScript
|
||||
HodirRareCacheData = 0;
|
||||
ColossusData = 0;
|
||||
elderCount = 0;
|
||||
illusion = 0;
|
||||
keepersCount = 0;
|
||||
conSpeedAtory = false;
|
||||
Unbroken = true;
|
||||
_algalonSummoned = false;
|
||||
@@ -151,7 +165,11 @@ class instance_ulduar : public InstanceMapScript
|
||||
memset(XTToyPileGUIDs, 0, sizeof(XTToyPileGUIDs));
|
||||
memset(AssemblyGUIDs, 0, sizeof(AssemblyGUIDs));
|
||||
memset(RazorHarpoonGUIDs, 0, sizeof(RazorHarpoonGUIDs));
|
||||
memset(ElderGUIDs, 0, sizeof(ElderGUIDs));
|
||||
memset(BrainRoomDoorGUIDs, 0, sizeof(BrainRoomDoorGUIDs));
|
||||
memset(KeeperGUIDs, 0, sizeof(KeeperGUIDs));
|
||||
memset(_summonObservationRingKeeper, false, sizeof(_summonObservationRingKeeper));
|
||||
memset(_summonYSKeeper, false, sizeof(_summonYSKeeper));
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& packet)
|
||||
@@ -174,6 +192,38 @@ class instance_ulduar : public InstanceMapScript
|
||||
else
|
||||
algalon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
// Keepers at Observation Ring
|
||||
if (GetBossState(BOSS_FREYA) == DONE && _summonObservationRingKeeper[0] && !KeeperGUIDs[0])
|
||||
{
|
||||
_summonObservationRingKeeper[0] = false;
|
||||
instance->SummonCreature(NPC_FREYA_OBSERVATION_RING, ObservationRingKeepersPos[0]);
|
||||
}
|
||||
if (GetBossState(BOSS_HODIR) == DONE && _summonObservationRingKeeper[1] && !KeeperGUIDs[1])
|
||||
{
|
||||
_summonObservationRingKeeper[1] = false;
|
||||
instance->SummonCreature(NPC_HODIR_OBSERVATION_RING, ObservationRingKeepersPos[1]);
|
||||
}
|
||||
if (GetBossState(BOSS_THORIM) == DONE && _summonObservationRingKeeper[2] && !KeeperGUIDs[2])
|
||||
{
|
||||
_summonObservationRingKeeper[2] = false;
|
||||
instance->SummonCreature(NPC_THORIM_OBSERVATION_RING, ObservationRingKeepersPos[2]);
|
||||
}
|
||||
if (GetBossState(BOSS_MIMIRON) == DONE && _summonObservationRingKeeper[3] && !KeeperGUIDs[3])
|
||||
{
|
||||
_summonObservationRingKeeper[3] = false;
|
||||
instance->SummonCreature(NPC_MIMIRON_OBSERVATION_RING, ObservationRingKeepersPos[3]);
|
||||
}
|
||||
|
||||
// Keepers in Yogg-Saron's room
|
||||
if (_summonYSKeeper[0])
|
||||
instance->SummonCreature(NPC_FREYA_YS, YSKeepersPos[0]);
|
||||
if (_summonYSKeeper[1])
|
||||
instance->SummonCreature(NPC_HODIR_YS, YSKeepersPos[1]);
|
||||
if (_summonYSKeeper[2])
|
||||
instance->SummonCreature(NPC_THORIM_YS, YSKeepersPos[2]);
|
||||
if (_summonYSKeeper[3])
|
||||
instance->SummonCreature(NPC_MIMIRON_YS, YSKeepersPos[3]);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
@@ -194,6 +244,8 @@ class instance_ulduar : public InstanceMapScript
|
||||
case NPC_IGNIS:
|
||||
IgnisGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
// Razorscale
|
||||
case NPC_RAZORSCALE:
|
||||
RazorscaleGUID = creature->GetGUID();
|
||||
break;
|
||||
@@ -203,6 +255,8 @@ class instance_ulduar : public InstanceMapScript
|
||||
case NPC_EXPEDITION_COMMANDER:
|
||||
ExpeditionCommanderGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
// XT-002 Deconstructor
|
||||
case NPC_XT002:
|
||||
XT002GUID = creature->GetGUID();
|
||||
break;
|
||||
@@ -229,24 +283,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
AddMinion(creature, true);
|
||||
break;
|
||||
|
||||
// Freya's Keeper
|
||||
case NPC_IRONBRANCH:
|
||||
KeeperGUIDs[0] = creature->GetGUID();
|
||||
if (GetBossState(BOSS_FREYA) == DONE)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
case NPC_BRIGHTLEAF:
|
||||
KeeperGUIDs[1] = creature->GetGUID();
|
||||
if (GetBossState(BOSS_FREYA) == DONE)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
case NPC_STONEBARK:
|
||||
KeeperGUIDs[2] = creature->GetGUID();
|
||||
if (GetBossState(BOSS_FREYA) == DONE)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
|
||||
// Kologarn
|
||||
case NPC_KOLOGARN:
|
||||
KologarnGUID = creature->GetGUID();
|
||||
break;
|
||||
@@ -256,25 +292,11 @@ class instance_ulduar : public InstanceMapScript
|
||||
case NPC_MIMIRON:
|
||||
MimironGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
// Hodir
|
||||
case NPC_HODIR:
|
||||
HodirGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_THORIM:
|
||||
ThorimGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_FREYA:
|
||||
FreyaGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_VEZAX:
|
||||
VezaxGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_YOGGSARON:
|
||||
YoggSaronGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ALGALON:
|
||||
AlgalonGUID = creature->GetGUID();
|
||||
break;
|
||||
// Hodir's Helper NPCs
|
||||
case NPC_EIVI_NIGHTFEATHER:
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_TOR_GREYCLOUD, HORDE);
|
||||
@@ -307,6 +329,80 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (TeamInInstance == HORDE)
|
||||
creature->UpdateEntry(NPC_BATTLE_PRIEST_GINA, HORDE);
|
||||
break;
|
||||
|
||||
case NPC_THORIM:
|
||||
ThorimGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
// Freya
|
||||
case NPC_FREYA:
|
||||
FreyaGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_IRONBRANCH:
|
||||
ElderGUIDs[0] = creature->GetGUID();
|
||||
if (GetBossState(BOSS_FREYA) == DONE)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
case NPC_BRIGHTLEAF:
|
||||
ElderGUIDs[1] = creature->GetGUID();
|
||||
if (GetBossState(BOSS_FREYA) == DONE)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
case NPC_STONEBARK:
|
||||
ElderGUIDs[2] = creature->GetGUID();
|
||||
if (GetBossState(BOSS_FREYA) == DONE)
|
||||
creature->DespawnOrUnsummon();
|
||||
break;
|
||||
|
||||
case NPC_VEZAX:
|
||||
VezaxGUID = creature->GetGUID();
|
||||
break;
|
||||
|
||||
// Yogg-Saron
|
||||
case NPC_YOGG_SARON:
|
||||
YoggSaronGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_VOICE_OF_YOGG_SARON:
|
||||
VoiceOfYoggSaronGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_BRAIN_OF_YOGG_SARON:
|
||||
BrainOfYoggSaronGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SARA:
|
||||
SaraGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_FREYA_YS:
|
||||
KeeperGUIDs[0] = creature->GetGUID();
|
||||
_summonYSKeeper[0] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
break;
|
||||
case NPC_HODIR_YS:
|
||||
KeeperGUIDs[1] = creature->GetGUID();
|
||||
_summonYSKeeper[1] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
break;
|
||||
case NPC_THORIM_YS:
|
||||
KeeperGUIDs[2] = creature->GetGUID();
|
||||
_summonYSKeeper[2] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
break;
|
||||
case NPC_MIMIRON_YS:
|
||||
KeeperGUIDs[3] = creature->GetGUID();
|
||||
_summonYSKeeper[3] = false;
|
||||
SaveToDB();
|
||||
++keepersCount;
|
||||
break;
|
||||
case NPC_SANITY_WELL:
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
break;
|
||||
|
||||
// Algalon
|
||||
case NPC_ALGALON:
|
||||
AlgalonGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_BRANN_BRONZBEARD_ALG:
|
||||
BrannBronzebeardAlgGUID = creature->GetGUID();
|
||||
break;
|
||||
@@ -418,6 +514,18 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (GetBossState(BOSS_ASSEMBLY_OF_IRON) != DONE)
|
||||
HandleGameObject(ArchivumDoorGUID, false);
|
||||
break;
|
||||
case GO_YOGG_SARON_DOOR:
|
||||
AddDoor(gameObject, true);
|
||||
break;
|
||||
case GO_BRAIN_ROOM_DOOR_1:
|
||||
BrainRoomDoorGUIDs[0] = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_BRAIN_ROOM_DOOR_2:
|
||||
BrainRoomDoorGUIDs[1] = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_BRAIN_ROOM_DOOR_3:
|
||||
BrainRoomDoorGUIDs[2] = gameObject->GetGUID();
|
||||
break;
|
||||
case GO_CELESTIAL_PLANETARIUM_ACCESS_10:
|
||||
case GO_CELESTIAL_PLANETARIUM_ACCESS_25:
|
||||
if (_algalonSummoned)
|
||||
@@ -509,27 +617,36 @@ class instance_ulduar : public InstanceMapScript
|
||||
{
|
||||
// Flame Leviathan's Tower Event triggers
|
||||
Creature* FlameLeviathan = instance->GetCreature(LeviathanGUID);
|
||||
if (FlameLeviathan && FlameLeviathan->isAlive()) // No leviathan, no event triggering ;)
|
||||
|
||||
switch (eventId)
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_TOWER_OF_STORM_DESTROYED:
|
||||
case EVENT_TOWER_OF_STORM_DESTROYED:
|
||||
if (FlameLeviathan && FlameLeviathan->isAlive())
|
||||
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_STORM_DESTROYED);
|
||||
break;
|
||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||
break;
|
||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||
if (FlameLeviathan && FlameLeviathan->isAlive())
|
||||
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_FROST_DESTROYED);
|
||||
break;
|
||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||
break;
|
||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||
if (FlameLeviathan && FlameLeviathan->isAlive())
|
||||
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_FLAMES_DESTROYED);
|
||||
break;
|
||||
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
||||
break;
|
||||
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
||||
if (FlameLeviathan && FlameLeviathan->isAlive())
|
||||
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_LIFE_DESTROYED);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case EVENT_ACTIVATE_SANITY_WELL:
|
||||
if (Creature* freya = instance->GetCreature(KeeperGUIDs[0]))
|
||||
freya->AI()->DoAction(4/*ACTION_SANITY_WELLS*/);
|
||||
break;
|
||||
case EVENT_HODIRS_PROTECTIVE_GAZE_PROC:
|
||||
if (Creature* hodir = instance->GetCreature(KeeperGUIDs[1]))
|
||||
hodir->AI()->DoAction(5/*ACTION_FLASH_FREEZE*/);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state)
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
@@ -542,8 +659,14 @@ class instance_ulduar : public InstanceMapScript
|
||||
case BOSS_RAZORSCALE:
|
||||
case BOSS_XT002:
|
||||
case BOSS_AURIAYA:
|
||||
break;
|
||||
case BOSS_MIMIRON:
|
||||
if (state == DONE)
|
||||
instance->SummonCreature(NPC_MIMIRON_OBSERVATION_RING, ObservationRingKeepersPos[3]);
|
||||
break;
|
||||
case BOSS_FREYA:
|
||||
if (state == DONE)
|
||||
instance->SummonCreature(NPC_FREYA_OBSERVATION_RING, ObservationRingKeepersPos[0]);
|
||||
break;
|
||||
case BOSS_ASSEMBLY_OF_IRON:
|
||||
if (state == DONE)
|
||||
@@ -553,7 +676,7 @@ class instance_ulduar : public InstanceMapScript
|
||||
if (state == DONE)
|
||||
HandleGameObject(VezaxDoorGUID, true);
|
||||
break;
|
||||
case BOSS_YOGGSARON:
|
||||
case BOSS_YOGG_SARON:
|
||||
break;
|
||||
case BOSS_KOLOGARN:
|
||||
if (state == DONE)
|
||||
@@ -576,12 +699,18 @@ class instance_ulduar : public InstanceMapScript
|
||||
HodirChest->SetRespawnTime(HodirChest->GetRespawnDelay());
|
||||
HandleGameObject(HodirDoorGUID, true);
|
||||
HandleGameObject(HodirIceDoorGUID, true);
|
||||
|
||||
instance->SummonCreature(NPC_HODIR_OBSERVATION_RING, ObservationRingKeepersPos[1]);
|
||||
}
|
||||
break;
|
||||
case BOSS_THORIM:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (GameObject* gameObject = instance->GetGameObject(ThorimChestGUID))
|
||||
gameObject->SetRespawnTime(gameObject->GetRespawnDelay());
|
||||
|
||||
instance->SummonCreature(NPC_THORIM_OBSERVATION_RING, ObservationRingKeepersPos[2]);
|
||||
}
|
||||
break;
|
||||
case BOSS_ALGALON:
|
||||
if (state == DONE)
|
||||
@@ -661,6 +790,12 @@ class instance_ulduar : public InstanceMapScript
|
||||
case DATA_UNBROKEN:
|
||||
Unbroken = bool(data);
|
||||
break;
|
||||
case DATA_ILLUSION:
|
||||
illusion = data;
|
||||
break;
|
||||
case DATA_DRIVE_ME_CRAZY:
|
||||
IsDriveMeCrazyEligible = data ? true : false;
|
||||
break;
|
||||
case EVENT_DESPAWN_ALGALON:
|
||||
DoUpdateWorldState(WORLD_STATE_ALGALON_TIMER_ENABLED, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_ALGALON_DESPAWN_TIMER, 60);
|
||||
@@ -688,37 +823,12 @@ class instance_ulduar : public InstanceMapScript
|
||||
return LeviathanGUID;
|
||||
case BOSS_IGNIS:
|
||||
return IgnisGUID;
|
||||
|
||||
// Razorscale
|
||||
case BOSS_RAZORSCALE:
|
||||
return RazorscaleGUID;
|
||||
case DATA_RAZORSCALE_CONTROL:
|
||||
return RazorscaleController;
|
||||
case BOSS_XT002:
|
||||
return XT002GUID;
|
||||
case DATA_TOY_PILE_0:
|
||||
case DATA_TOY_PILE_1:
|
||||
case DATA_TOY_PILE_2:
|
||||
case DATA_TOY_PILE_3:
|
||||
return XTToyPileGUIDs[data - DATA_TOY_PILE_0];
|
||||
case BOSS_KOLOGARN:
|
||||
return KologarnGUID;
|
||||
case BOSS_AURIAYA:
|
||||
return AuriayaGUID;
|
||||
case BOSS_MIMIRON:
|
||||
return MimironGUID;
|
||||
case BOSS_HODIR:
|
||||
return HodirGUID;
|
||||
case BOSS_THORIM:
|
||||
return ThorimGUID;
|
||||
case BOSS_FREYA:
|
||||
return FreyaGUID;
|
||||
case BOSS_VEZAX:
|
||||
return VezaxGUID;
|
||||
case BOSS_YOGGSARON:
|
||||
return YoggSaronGUID;
|
||||
case BOSS_ALGALON:
|
||||
return AlgalonGUID;
|
||||
|
||||
// Razorscale expedition commander
|
||||
case DATA_EXPEDITION_COMMANDER:
|
||||
return ExpeditionCommanderGUID;
|
||||
case GO_RAZOR_HARPOON_1:
|
||||
@@ -730,6 +840,15 @@ class instance_ulduar : public InstanceMapScript
|
||||
case GO_RAZOR_HARPOON_4:
|
||||
return RazorHarpoonGUIDs[3];
|
||||
|
||||
// XT-002 Deconstructor
|
||||
case BOSS_XT002:
|
||||
return XT002GUID;
|
||||
case DATA_TOY_PILE_0:
|
||||
case DATA_TOY_PILE_1:
|
||||
case DATA_TOY_PILE_2:
|
||||
case DATA_TOY_PILE_3:
|
||||
return XTToyPileGUIDs[data - DATA_TOY_PILE_0];
|
||||
|
||||
// Assembly of Iron
|
||||
case DATA_STEELBREAKER:
|
||||
return AssemblyGUIDs[0];
|
||||
@@ -738,13 +857,57 @@ class instance_ulduar : public InstanceMapScript
|
||||
case DATA_BRUNDIR:
|
||||
return AssemblyGUIDs[2];
|
||||
|
||||
// Freya's Keepers
|
||||
case BOSS_KOLOGARN:
|
||||
return KologarnGUID;
|
||||
case BOSS_AURIAYA:
|
||||
return AuriayaGUID;
|
||||
case BOSS_MIMIRON:
|
||||
return MimironGUID;
|
||||
case BOSS_HODIR:
|
||||
return HodirGUID;
|
||||
case BOSS_THORIM:
|
||||
return ThorimGUID;
|
||||
|
||||
// Freya
|
||||
case BOSS_FREYA:
|
||||
return FreyaGUID;
|
||||
case BOSS_BRIGHTLEAF:
|
||||
return KeeperGUIDs[0];
|
||||
return ElderGUIDs[0];
|
||||
case BOSS_IRONBRANCH:
|
||||
return KeeperGUIDs[1];
|
||||
return ElderGUIDs[1];
|
||||
case BOSS_STONEBARK:
|
||||
return ElderGUIDs[2];
|
||||
|
||||
case BOSS_VEZAX:
|
||||
return VezaxGUID;
|
||||
|
||||
// Yogg-Saron
|
||||
case BOSS_YOGG_SARON:
|
||||
return YoggSaronGUID;
|
||||
case DATA_VOICE_OF_YOGG_SARON:
|
||||
return VoiceOfYoggSaronGUID;
|
||||
case DATA_BRAIN_OF_YOGG_SARON:
|
||||
return BrainOfYoggSaronGUID;
|
||||
case DATA_SARA:
|
||||
return SaraGUID;
|
||||
case GO_BRAIN_ROOM_DOOR_1:
|
||||
return BrainRoomDoorGUIDs[0];
|
||||
case GO_BRAIN_ROOM_DOOR_2:
|
||||
return BrainRoomDoorGUIDs[1];
|
||||
case GO_BRAIN_ROOM_DOOR_3:
|
||||
return BrainRoomDoorGUIDs[2];
|
||||
case DATA_FREYA_YS:
|
||||
return KeeperGUIDs[0];
|
||||
case DATA_HODIR_YS:
|
||||
return KeeperGUIDs[1];
|
||||
case DATA_THORIM_YS:
|
||||
return KeeperGUIDs[2];
|
||||
case DATA_MIMIRON_YS:
|
||||
return KeeperGUIDs[3];
|
||||
|
||||
// Algalon
|
||||
case BOSS_ALGALON:
|
||||
return AlgalonGUID;
|
||||
case DATA_SIGILDOOR_01:
|
||||
return AlgalonSigilDoorGUID[0];
|
||||
case DATA_SIGILDOOR_02:
|
||||
@@ -776,6 +939,10 @@ class instance_ulduar : public InstanceMapScript
|
||||
return HodirRareCacheData;
|
||||
case DATA_UNBROKEN:
|
||||
return uint32(Unbroken);
|
||||
case DATA_ILLUSION:
|
||||
return illusion;
|
||||
case DATA_KEEPERS_COUNT:
|
||||
return keepersCount;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -789,6 +956,30 @@ class instance_ulduar : public InstanceMapScript
|
||||
{
|
||||
case CRITERIA_HERALD_OF_TITANS:
|
||||
return _maxArmorItemLevel <= MAX_HERALD_ARMOR_ITEMLEVEL && _maxWeaponItemLevel <= MAX_HERALD_WEAPON_ITEMLEVEL;
|
||||
case CRITERIA_WAITS_DREAMING_STORMWIND_25:
|
||||
case CRITERIA_WAITS_DREAMING_STORMWIND_10:
|
||||
return illusion == STORMWIND_ILLUSION;
|
||||
case CRITERIA_WAITS_DREAMING_CHAMBER_25:
|
||||
case CRITERIA_WAITS_DREAMING_CHAMBER_10:
|
||||
return illusion == CHAMBER_ILLUSION;
|
||||
case CRITERIA_WAITS_DREAMING_ICECROWN_25:
|
||||
case CRITERIA_WAITS_DREAMING_ICECROWN_10:
|
||||
return illusion == ICECROWN_ILLUSION;
|
||||
case CRITERIA_DRIVE_ME_CRAZY_10:
|
||||
case CRITERIA_DRIVE_ME_CRAZY_25:
|
||||
return IsDriveMeCrazyEligible;
|
||||
case CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_25:
|
||||
return keepersCount <= 3;
|
||||
case CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_25:
|
||||
return keepersCount <= 2;
|
||||
case CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_25:
|
||||
return keepersCount <= 1;
|
||||
case CRITERIA_ALONE_IN_THE_DARKNESS_10:
|
||||
case CRITERIA_ALONE_IN_THE_DARKNESS_25:
|
||||
return keepersCount == 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -801,6 +992,9 @@ class instance_ulduar : public InstanceMapScript
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "U U " << GetBossSaveData() << GetData(DATA_COLOSSUS) << ' ' << _algalonTimer << ' ' << (_algalonSummoned ? 1 : 0);
|
||||
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
saveStream << ' ' << (KeeperGUIDs[i] ? 1 : 0);
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
@@ -851,6 +1045,21 @@ class instance_ulduar : public InstanceMapScript
|
||||
DoUpdateWorldState(WORLD_STATE_ALGALON_DESPAWN_TIMER, _algalonTimer);
|
||||
}
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
loadStream >> tempState;
|
||||
_summonYSKeeper[i] = tempState != 0;
|
||||
}
|
||||
|
||||
if (GetBossState(BOSS_FREYA) == DONE && !_summonYSKeeper[0])
|
||||
_summonObservationRingKeeper[0] = true;
|
||||
if (GetBossState(BOSS_HODIR) == DONE && !_summonYSKeeper[1])
|
||||
_summonObservationRingKeeper[1] = true;
|
||||
if (GetBossState(BOSS_THORIM) == DONE && !_summonYSKeeper[2])
|
||||
_summonObservationRingKeeper[2] = true;
|
||||
if (GetBossState(BOSS_MIMIRON) == DONE && !_summonYSKeeper[3])
|
||||
_summonObservationRingKeeper[3] = true;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
@@ -889,6 +1098,8 @@ class instance_ulduar : public InstanceMapScript
|
||||
uint32 _algalonTimer;
|
||||
bool _summonAlgalon;
|
||||
bool _algalonSummoned;
|
||||
bool _summonObservationRingKeeper[4];
|
||||
bool _summonYSKeeper[4];
|
||||
uint32 _maxArmorItemLevel;
|
||||
uint32 _maxWeaponItemLevel;
|
||||
};
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ObjectMgr.h"
|
||||
#define UlduarScriptName "instance_ulduar"
|
||||
|
||||
extern Position const ObservationRingKeepersPos[4];
|
||||
extern Position const YSKeepersPos[4];
|
||||
extern Position const AlgalonLandPos;
|
||||
|
||||
enum UlduarBosses
|
||||
@@ -42,7 +44,7 @@ enum UlduarBosses
|
||||
BOSS_IRONBRANCH = 12,
|
||||
BOSS_STONEBARK = 13,
|
||||
BOSS_VEZAX = 14,
|
||||
BOSS_YOGGSARON = 15,
|
||||
BOSS_YOGG_SARON = 15,
|
||||
BOSS_ALGALON = 16,
|
||||
};
|
||||
|
||||
@@ -74,7 +76,7 @@ enum UlduarNPCs
|
||||
NPC_THORIM = 32865,
|
||||
NPC_FREYA = 32906,
|
||||
NPC_VEZAX = 33271,
|
||||
NPC_YOGGSARON = 33288,
|
||||
NPC_YOGG_SARON = 33288,
|
||||
NPC_ALGALON = 32871,
|
||||
|
||||
// Mimiron
|
||||
@@ -115,6 +117,39 @@ enum UlduarNPCs
|
||||
NPC_NATURES_BLADE = 33527,
|
||||
NPC_GUARDIAN_OF_LIFE = 33528,
|
||||
|
||||
// Yogg-Saron
|
||||
NPC_SARA = 33134,
|
||||
NPC_GUARDIAN_OF_YOGG_SARON = 33136,
|
||||
NPC_HODIR_OBSERVATION_RING = 33213,
|
||||
NPC_FREYA_OBSERVATION_RING = 33241,
|
||||
NPC_THORIM_OBSERVATION_RING = 33242,
|
||||
NPC_MIMIRON_OBSERVATION_RING = 33244,
|
||||
NPC_VOICE_OF_YOGG_SARON = 33280,
|
||||
NPC_OMINOUS_CLOUD = 33292,
|
||||
NPC_FREYA_YS = 33410,
|
||||
NPC_HODIR_YS = 33411,
|
||||
NPC_MIMIRON_YS = 33412,
|
||||
NPC_THORIM_YS = 33413,
|
||||
NPC_SUIT_OF_ARMOR = 33433,
|
||||
NPC_KING_LLANE = 33437,
|
||||
NPC_THE_LICH_KING = 33441,
|
||||
NPC_IMMOLATED_CHAMPION = 33442,
|
||||
NPC_YSERA = 33495,
|
||||
NPC_NELTHARION = 33523,
|
||||
NPC_MALYGOS = 33535,
|
||||
NPC_DEATH_RAY = 33881,
|
||||
NPC_DEATH_ORB = 33882,
|
||||
NPC_BRAIN_OF_YOGG_SARON = 33890,
|
||||
NPC_INFLUENCE_TENTACLE = 33943,
|
||||
NPC_TURNED_CHAMPION = 33962,
|
||||
NPC_CRUSHER_TENTACLE = 33966,
|
||||
NPC_CONSTRICTOR_TENTACLE = 33983,
|
||||
NPC_CORRUPTOR_TENTACLE = 33985,
|
||||
NPC_IMMORTAL_GUARDIAN = 33988,
|
||||
NPC_SANITY_WELL = 33991,
|
||||
NPC_DESCEND_INTO_MADNESS = 34072,
|
||||
NPC_MARKED_IMMORTAL_GUARDIAN = 36064,
|
||||
|
||||
// Algalon the Observer
|
||||
NPC_BRANN_BRONZBEARD_ALG = 34064,
|
||||
NPC_AZEROTH = 34246,
|
||||
@@ -155,6 +190,12 @@ enum UlduarGameObjects
|
||||
GO_HODIR_ICE_DOOR = 194441,
|
||||
GO_ARCHIVUM_DOOR = 194556,
|
||||
|
||||
// Yogg-Saron
|
||||
GO_YOGG_SARON_DOOR = 194773,
|
||||
GO_BRAIN_ROOM_DOOR_1 = 194635,
|
||||
GO_BRAIN_ROOM_DOOR_2 = 194636,
|
||||
GO_BRAIN_ROOM_DOOR_3 = 194637,
|
||||
|
||||
// Algalon the Observer
|
||||
GO_CELESTIAL_PLANETARIUM_ACCESS_10 = 194628,
|
||||
GO_CELESTIAL_PLANETARIUM_ACCESS_25 = 194752,
|
||||
@@ -169,12 +210,18 @@ enum UlduarGameObjects
|
||||
GO_GIFT_OF_THE_OBSERVER_25 = 194822,
|
||||
};
|
||||
|
||||
enum LeviathanData
|
||||
enum EventIds
|
||||
{
|
||||
EVENT_TOWER_OF_STORM_DESTROYED = 21031,
|
||||
EVENT_TOWER_OF_FROST_DESTROYED = 21032,
|
||||
EVENT_TOWER_OF_FLAMES_DESTROYED = 21033,
|
||||
EVENT_TOWER_OF_LIFE_DESTROYED = 21030,
|
||||
EVENT_ACTIVATE_SANITY_WELL = 21432,
|
||||
EVENT_HODIRS_PROTECTIVE_GAZE_PROC = 21437,
|
||||
};
|
||||
|
||||
enum LeviathanActions
|
||||
{
|
||||
ACTION_TOWER_OF_STORM_DESTROYED = 1,
|
||||
ACTION_TOWER_OF_FROST_DESTROYED = 2,
|
||||
ACTION_TOWER_OF_FLAMES_DESTROYED = 3,
|
||||
@@ -184,14 +231,30 @@ enum LeviathanData
|
||||
|
||||
enum UlduarAchievementCriteriaIds
|
||||
{
|
||||
CRITERIA_CON_SPEED_ATORY = 21597,
|
||||
CRITERIA_DISARMED = 21687,
|
||||
CRITERIA_HERALD_OF_TITANS = 10678,
|
||||
CRITERIA_CON_SPEED_ATORY = 21597,
|
||||
CRITERIA_DISARMED = 21687,
|
||||
CRITERIA_WAITS_DREAMING_STORMWIND_25 = 10321,
|
||||
CRITERIA_WAITS_DREAMING_CHAMBER_25 = 10322,
|
||||
CRITERIA_WAITS_DREAMING_ICECROWN_25 = 10323,
|
||||
CRITERIA_WAITS_DREAMING_STORMWIND_10 = 10324,
|
||||
CRITERIA_WAITS_DREAMING_CHAMBER_10 = 10325,
|
||||
CRITERIA_WAITS_DREAMING_ICECROWN_10 = 10326,
|
||||
CRITERIA_DRIVE_ME_CRAZY_10 = 10185,
|
||||
CRITERIA_DRIVE_ME_CRAZY_25 = 10296,
|
||||
CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_10 = 10410,
|
||||
CRITERIA_THREE_LIGHTS_IN_THE_DARKNESS_25 = 10414,
|
||||
CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_10 = 10388,
|
||||
CRITERIA_TWO_LIGHTS_IN_THE_DARKNESS_25 = 10415,
|
||||
CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_10 = 10409,
|
||||
CRITERIA_ONE_LIGHT_IN_THE_DARKNESS_25 = 10416,
|
||||
CRITERIA_ALONE_IN_THE_DARKNESS_10 = 10412,
|
||||
CRITERIA_ALONE_IN_THE_DARKNESS_25 = 10417,
|
||||
CRITERIA_HERALD_OF_TITANS = 10678,
|
||||
};
|
||||
|
||||
enum UlduarData
|
||||
{
|
||||
// Collosus (Leviathan)
|
||||
// Colossus (Leviathan)
|
||||
DATA_COLOSSUS = 20,
|
||||
|
||||
// Razorscale
|
||||
@@ -212,6 +275,18 @@ enum UlduarData
|
||||
// Hodir
|
||||
DATA_HODIR_RARE_CACHE,
|
||||
|
||||
// Yogg-Saron
|
||||
DATA_VOICE_OF_YOGG_SARON,
|
||||
DATA_SARA,
|
||||
DATA_BRAIN_OF_YOGG_SARON,
|
||||
DATA_FREYA_YS,
|
||||
DATA_HODIR_YS,
|
||||
DATA_THORIM_YS,
|
||||
DATA_MIMIRON_YS,
|
||||
DATA_ILLUSION,
|
||||
DATA_DRIVE_ME_CRAZY,
|
||||
DATA_KEEPERS_COUNT,
|
||||
|
||||
// Algalon the Observer
|
||||
DATA_ALGALON_SUMMON_STATE,
|
||||
DATA_SIGILDOOR_01,
|
||||
@@ -245,6 +320,13 @@ enum UlduarEvents
|
||||
ACTION_INIT_ALGALON = 6,
|
||||
};
|
||||
|
||||
enum YoggSaronIllusions
|
||||
{
|
||||
CHAMBER_ILLUSION = 0,
|
||||
ICECROWN_ILLUSION = 1,
|
||||
STORMWIND_ILLUSION = 2,
|
||||
};
|
||||
|
||||
template<class AI>
|
||||
CreatureAI* GetUlduarAI(Creature* creature)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ SDComment:
|
||||
SDCategory:
|
||||
Script Data End */
|
||||
|
||||
#include <algorithm>
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "utgarde_pinnacle.h"
|
||||
@@ -105,20 +106,25 @@ public:
|
||||
uint32 uiWaitingTimer;
|
||||
Phase currentPhase;
|
||||
uint8 AddCount;
|
||||
bool DoneAdds[4];
|
||||
Phase Sequence[4];
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
/// There is a good reason to store them like this, we are going to shuffle the order.
|
||||
for (uint32 i = PHASE_FRENZIED_WORGEN; i < PHASE_GORTOK_PALEHOOF; ++i)
|
||||
Sequence[i] = Phase(i);
|
||||
|
||||
/// This ensures a random order and only executes each phase once.
|
||||
std::random_shuffle(Sequence, Sequence + PHASE_GORTOK_PALEHOOF);
|
||||
|
||||
uiArcingSmashTimer = 15000;
|
||||
uiImpaleTimer = 12000;
|
||||
uiWhiteringRoarTimer = 10000;
|
||||
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
for (uint32 i = 0; i < 4; i++)
|
||||
DoneAdds[i] = false;
|
||||
AddCount = 0;
|
||||
|
||||
currentPhase = PHASE_NONE;
|
||||
@@ -235,26 +241,7 @@ public:
|
||||
if (AddCount >= DUNGEON_MODE(2, 4))
|
||||
move = PHASE_GORTOK_PALEHOOF;
|
||||
else
|
||||
{
|
||||
//select random not yet defeated add
|
||||
uint8 next = urand(0, 3);
|
||||
for (uint8 i = 0; i < 16; i++)
|
||||
{
|
||||
if (!DoneAdds[i % 4])
|
||||
{
|
||||
if (next == 0)
|
||||
{
|
||||
move = (Phase)(i % 4);
|
||||
break;
|
||||
}
|
||||
else if (next > 0)
|
||||
--next;
|
||||
}
|
||||
}
|
||||
++AddCount;
|
||||
DoneAdds[move] = true;
|
||||
move = (Phase)(move % 4);
|
||||
}
|
||||
move = Sequence[AddCount++];
|
||||
//send orb to summon spot
|
||||
Creature* pOrb = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_MOB_ORB) : 0);
|
||||
if (pOrb && pOrb->isAlive())
|
||||
|
||||
@@ -921,7 +921,7 @@ class npc_frostbrood_skytalon : public CreatureScript
|
||||
if (id == POINT_GRAB_DECOY)
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
if (Unit* summoner = summon->GetSummoner())
|
||||
DoCast(summoner, SPELL_GRAB);
|
||||
DoCast(summoner, SPELL_GRAB);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
|
||||
@@ -62,6 +62,8 @@ OPvPCapturePointHP::OPvPCapturePointHP(OutdoorPvP* pvp, OutdoorPvPHPTowerType ty
|
||||
OutdoorPvPHP::OutdoorPvPHP()
|
||||
{
|
||||
m_TypeId = OUTDOOR_PVP_HP;
|
||||
m_AllianceTowersControlled = 0;
|
||||
m_HordeTowersControlled = 0;
|
||||
}
|
||||
|
||||
bool OutdoorPvPHP::SetupOutdoorPvP()
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
OutdoorPvPNA::OutdoorPvPNA()
|
||||
{
|
||||
m_TypeId = OUTDOOR_PVP_NA;
|
||||
m_obj = NULL;
|
||||
}
|
||||
|
||||
void OutdoorPvPNA::HandleKillImpl(Player* player, Unit* killed)
|
||||
@@ -216,8 +217,8 @@ bool OutdoorPvPNA::SetupOutdoorPvP()
|
||||
m_obj = new OPvPCapturePointNA(this);
|
||||
if (!m_obj)
|
||||
return false;
|
||||
AddCapturePoint(m_obj);
|
||||
|
||||
AddCapturePoint(m_obj);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,17 @@
|
||||
OutdoorPvPTF::OutdoorPvPTF()
|
||||
{
|
||||
m_TypeId = OUTDOOR_PVP_TF;
|
||||
|
||||
m_IsLocked = false;
|
||||
m_LockTimer = TF_LOCK_TIME;
|
||||
m_LockTimerUpdate = 0;
|
||||
|
||||
m_AllianceTowersControlled = 0;
|
||||
m_HordeTowersControlled = 0;
|
||||
|
||||
hours_left = 6;
|
||||
second_digit = 0;
|
||||
first_digit = 0;
|
||||
}
|
||||
|
||||
OPvPCapturePointTF::OPvPCapturePointTF(OutdoorPvP* pvp, OutdoorPvPTF_TowerType type)
|
||||
|
||||
@@ -45,9 +45,9 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_STREAM_OF_MACHINE_FLUID = 0,
|
||||
EVENT_SAW_BLADE = 1,
|
||||
EVENT_SHADOW_POWER = 2
|
||||
EVENT_STREAM_OF_MACHINE_FLUID = 1,
|
||||
EVENT_SAW_BLADE = 2,
|
||||
EVENT_SHADOW_POWER = 3
|
||||
};
|
||||
|
||||
class boss_gatewatcher_gyrokill : public CreatureScript
|
||||
|
||||
@@ -52,11 +52,11 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_FROST_ATTACK = 0,
|
||||
EVENT_ARCANE_BLAST = 1,
|
||||
EVENT_DRAGONS_BREATH = 2,
|
||||
EVENT_KNOCKBACK = 3,
|
||||
EVENT_SOLARBURN = 4
|
||||
EVENT_FROST_ATTACK = 1,
|
||||
EVENT_ARCANE_BLAST = 2,
|
||||
EVENT_DRAGONS_BREATH = 3,
|
||||
EVENT_KNOCKBACK = 4,
|
||||
EVENT_SOLARBURN = 5
|
||||
};
|
||||
|
||||
class boss_nethermancer_sepethrea : public CreatureScript
|
||||
|
||||
@@ -54,11 +54,11 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SUMMON = 0,
|
||||
EVENT_MANA_TAP = 1,
|
||||
EVENT_ARCANE_TORRENT = 2,
|
||||
EVENT_DOMINATION = 3,
|
||||
EVENT_ARCANE_EXPLOSION = 4
|
||||
EVENT_SUMMON = 1,
|
||||
EVENT_MANA_TAP = 2,
|
||||
EVENT_ARCANE_TORRENT = 3,
|
||||
EVENT_DOMINATION = 4,
|
||||
EVENT_ARCANE_EXPLOSION = 5
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
|
||||
@@ -918,7 +918,7 @@ class spell_mage_ring_of_frost : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (ringOfFrost)
|
||||
if (GetMaxDuration() - (int32)ringOfFrost->GetTimer() >= sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_DUMMY)->GetDuration())
|
||||
@@ -1018,7 +1018,7 @@ class spell_mage_ring_of_frost_freeze : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
|
||||
if (GetCaster())
|
||||
|
||||
@@ -1745,7 +1745,7 @@ public:
|
||||
{
|
||||
me->HandleEmoteCommand(emote);
|
||||
Unit* owner = me->GetOwner();
|
||||
if (emote != TEXT_EMOTE_KISS || owner || owner->GetTypeId() != TYPEID_PLAYER ||
|
||||
if (emote != TEXT_EMOTE_KISS || !owner || owner->GetTypeId() != TYPEID_PLAYER ||
|
||||
owner->ToPlayer()->GetTeam() != player->GetTeam())
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
SHA1Hash::SHA1Hash()
|
||||
{
|
||||
SHA1_Init(&mC);
|
||||
memset(mDigest, 0, SHA_DIGEST_LENGTH * sizeof(uint8));
|
||||
}
|
||||
|
||||
SHA1Hash::~SHA1Hash()
|
||||
|
||||
@@ -22,6 +22,7 @@ Field::Field()
|
||||
data.value = NULL;
|
||||
data.type = MYSQL_TYPE_NULL;
|
||||
data.length = 0;
|
||||
data.raw = false;
|
||||
}
|
||||
|
||||
Field::~Field()
|
||||
|
||||
@@ -84,8 +84,10 @@ bool MySQLConnection::Open()
|
||||
|
||||
int port;
|
||||
char const* unix_socket;
|
||||
//unsigned int timeout = 10;
|
||||
|
||||
mysql_options(mysqlInit, MYSQL_SET_CHARSET_NAME, "utf8");
|
||||
//mysql_options(mysqlInit, MYSQL_OPT_READ_TIMEOUT, (char const*)&timeout);
|
||||
#ifdef _WIN32
|
||||
if (m_connectionInfo.host == ".") // named pipe use option (Windows)
|
||||
{
|
||||
|
||||
@@ -203,6 +203,7 @@ void PreparedStatement::setNull(const uint8 index)
|
||||
}
|
||||
|
||||
MySQLPreparedStatement::MySQLPreparedStatement(MYSQL_STMT* stmt) :
|
||||
m_stmt(NULL),
|
||||
m_Mstmt(stmt),
|
||||
m_bind(NULL)
|
||||
{
|
||||
|
||||
@@ -20,33 +20,37 @@
|
||||
|
||||
#include <ace/Stack_Trace.h>
|
||||
#include <ace/OS_NS_unistd.h>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace Trinity {
|
||||
|
||||
void Assert(char const *file, int line, char const *function, char const *message)
|
||||
void Assert(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
ACE_Stack_Trace st;
|
||||
fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n",
|
||||
file, line, function, message, st.c_str());
|
||||
*((volatile int*)NULL) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void Fatal(char const *file, int line, char const *function, char const *message)
|
||||
void Fatal(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s FATAL ERROR:\n %s\n",
|
||||
file, line, function, message);
|
||||
ACE_OS::sleep(10);
|
||||
*((volatile int*)NULL) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void Error(char const *file, int line, char const *function, char const *message)
|
||||
void Error(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s ERROR:\n %s\n",
|
||||
file, line, function, message);
|
||||
*((volatile int*)NULL) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void Warning(char const *file, int line, char const *function, char const *message)
|
||||
void Warning(char const* file, int line, char const* function, char const* message)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s WARNING:\n %s\n",
|
||||
file, line, function, message);
|
||||
|
||||
@@ -19,22 +19,25 @@
|
||||
#ifndef TRINITYCORE_ERRORS_H
|
||||
#define TRINITYCORE_ERRORS_H
|
||||
|
||||
namespace Trinity {
|
||||
#include "Define.h"
|
||||
|
||||
void Assert(char const *file, int line, char const *function, char const *message);
|
||||
namespace Trinity
|
||||
{
|
||||
|
||||
void Fatal(char const *file, int line, char const *function, char const *message);
|
||||
DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
void Error(char const *file, int line, char const *function, char const *message);
|
||||
DECLSPEC_NORETURN void Fatal(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
void Warning(char const *file, int line, char const *function, char const *message);
|
||||
DECLSPEC_NORETURN void Error(char const* file, int line, char const* function, char const* message) ATTR_NORETURN;
|
||||
|
||||
void Warning(char const* file, int line, char const* function, char const* message);
|
||||
|
||||
} // namespace Trinity
|
||||
|
||||
#define WPAssert(cond) do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond); } while(0)
|
||||
#define WPFatal(cond, msg) do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
|
||||
#define WPError(cond, msg) do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
|
||||
#define WPWarning(cond, msg) do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0)
|
||||
#define WPAssert(cond) do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, #cond); } while (0)
|
||||
#define WPFatal(cond, msg) do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, (msg)); } while (0)
|
||||
#define WPError(cond, msg) do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while (0)
|
||||
#define WPWarning(cond, msg) do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while (0)
|
||||
|
||||
#define ASSERT WPAssert
|
||||
|
||||
|
||||
@@ -96,14 +96,14 @@ inline bool Log::ShouldLog(LogFilterType type, LogLevel level) const
|
||||
|
||||
#define sLog ACE_Singleton<Log, ACE_Thread_Mutex>::instance()
|
||||
|
||||
#if PLATFORM != PLATFORM_WINDOWS
|
||||
# define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \
|
||||
#if COMPILER != COMPILER_MICROSOFT
|
||||
#define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \
|
||||
do { \
|
||||
if (sLog->ShouldLog(filterType__, level__)) \
|
||||
sLog->call__(filterType__, __VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
# define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \
|
||||
#define TC_LOG_MESSAGE_BODY(level__, call__, filterType__, ...) \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable:4127)) \
|
||||
do { \
|
||||
|
||||
@@ -37,7 +37,7 @@ class ByteBufferException : public std::exception
|
||||
public:
|
||||
~ByteBufferException() throw() { }
|
||||
|
||||
char const * what() const throw() { return msg_.c_str(); }
|
||||
char const* what() const throw() { return msg_.c_str(); }
|
||||
|
||||
protected:
|
||||
std::string & message() throw() { return msg_; }
|
||||
|
||||
@@ -35,7 +35,7 @@ template <typename Result, typename ParamType, bool chain = false>
|
||||
class QueryCallback
|
||||
{
|
||||
public:
|
||||
QueryCallback() : _stage(chain ? 0 : CALLBACK_STAGE_INVALID) {}
|
||||
QueryCallback() : _param(), _stage(chain ? 0 : CALLBACK_STAGE_INVALID) {}
|
||||
|
||||
//! The parameter of this function should be a resultset returned from either .AsyncQuery or .AsyncPQuery
|
||||
void SetFutureResult(ACE_Future<Result> value)
|
||||
|
||||
@@ -178,6 +178,7 @@ target_link_libraries(worldserver
|
||||
${MYSQL_LIBRARY}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
if( WIN32 )
|
||||
|
||||
@@ -58,15 +58,15 @@ uint32 realmID; ///< Id of the realm
|
||||
/// Print out the usage string for this program on the console.
|
||||
void usage(const char *prog)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Usage: \n %s [<options>]\n"
|
||||
" -c config_file use config_file as configuration file\n\r"
|
||||
#ifdef _WIN32
|
||||
" Running as service functions:\n\r"
|
||||
" --service run as service\n\r"
|
||||
" -s install install service\n\r"
|
||||
" -s uninstall uninstall service\n\r"
|
||||
#endif
|
||||
, prog);
|
||||
printf("Usage:\n");
|
||||
printf(" %s [<options>]\n", prog);
|
||||
printf(" -c config_file use config_file as configuration file\n");
|
||||
#ifdef _WIN32
|
||||
printf(" Running as service functions:\n");
|
||||
printf(" --service run as service\n");
|
||||
printf(" -s install install service\n");
|
||||
printf(" -s uninstall uninstall service\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Launch the Trinity server
|
||||
@@ -135,6 +135,7 @@ extern int main(int argc, char **argv)
|
||||
printf("Verify that the file exists and has \'[worldserver]' written in the top of the file!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using configuration file %s.", cfg_file);
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
class TCSoapRunnable: public ACE_Based::Runnable
|
||||
{
|
||||
public:
|
||||
TCSoapRunnable() { }
|
||||
TCSoapRunnable() : m_host(""), m_port(0) { }
|
||||
void run();
|
||||
void setListenArguments(std::string host, uint16 port)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
Generator command line args
|
||||
|
||||
--threads [#] Max number of threads used by the generator
|
||||
Default: 3
|
||||
|
||||
--offMeshInput [file.*] Path to file containing off mesh connections data.
|
||||
Format must be: (see offmesh_example.txt)
|
||||
"map_id tile_x,tile_y (start_x start_y start_z) (end_x end_y end_z) size //optional comments"
|
||||
@@ -63,4 +66,4 @@ movement_extractor 0
|
||||
builds all tiles of map 0
|
||||
|
||||
movement_extractor 0 --tile 34,46
|
||||
builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain)
|
||||
builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain)
|
||||
|
||||
Reference in New Issue
Block a user