Conflicts:
	src/server/game/Achievements/AchievementMgr.cpp
	src/server/game/Battlegrounds/ArenaScore.h
	src/server/game/Battlegrounds/Zones/BattlegroundAB.h
	src/server/game/Battlegrounds/Zones/BattlegroundAV.h
	src/server/game/Battlegrounds/Zones/BattlegroundEY.h
	src/server/game/Battlegrounds/Zones/BattlegroundIC.h
	src/server/game/Battlegrounds/Zones/BattlegroundSA.h
	src/server/game/Battlegrounds/Zones/BattlegroundWS.h
	src/server/game/Entities/Creature/Creature.h
	src/server/game/Entities/DynamicObject/DynamicObject.h
	src/server/game/Entities/Item/Item.h
	src/server/game/Entities/Object/Updates/UpdateData.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Player/Player.h
	src/server/game/Entities/Unit/Unit.h
	src/server/game/Guilds/Guild.h
	src/server/game/Handlers/CharacterHandler.cpp
	src/server/game/Handlers/TradeHandler.cpp
	src/server/game/Miscellaneous/SharedDefines.h
	src/server/game/Server/WorldPacket.h
	src/server/game/Server/WorldSession.cpp
	src/server/game/Server/WorldSession.h
	src/server/game/Server/WorldSocket.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/World/World.cpp
	src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
	src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
	src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
	src/server/scripts/Kalimdor/zone_orgrimmar.cpp
	src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/shared/Packets/ByteBuffer.h
This commit is contained in:
Shauren committed 2014-08-12 00:45:24 +02:00
commit 4a741258f1
234 files changed
+2878 -1642

No files matched your search

+2 -2
View File
@@ -18,14 +18,14 @@ install:
- mysql -uroot -e 'create database test_mysql;'
- mkdir bin
- cd bin
- cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=1 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=1 -DSERVERS=1 -DCMAKE_BUILD_TYPE=Release
- cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=1 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=1 -DSERVERS=1 -DNOJEM=1 -DCMAKE_BUILD_TYPE=Release
script:
- cd ..
- mysql -uroot < sql/create/create_mysql.sql
- mysql -uroot auth < sql/base/auth_database.sql
- mysql -uroot characters < sql/base/characters_database.sql
- mysql -uroot world < sql/base/world_database.sql
- mysql -uroot world < sql/base/dev/world_database.sql
- for file in sql/updates/world/*.sql; do mysql -uroot world < $file; done
- mysql -uroot < sql/create/drop_mysql.sql
- cd bin
+8 -4
View File
@@ -21,17 +21,21 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
if(USE_MYSQL_SOURCES)
if(USE_MYSQL_SOURCES AND SERVERS)
add_subdirectory(mysqllite)
endif()
if(TOOLS)
add_subdirectory(bzip2)
endif()
add_subdirectory(zlib)
if(SERVERS OR TOOLS)
add_subdirectory(zlib)
endif()
endif()
add_subdirectory(g3dlite)
add_subdirectory(recastnavigation)
if(SERVERS OR TOOLS)
add_subdirectory(g3dlite)
add_subdirectory(recastnavigation)
endif()
if(SERVERS)
add_subdirectory(gsoap)
File renamed without changes.
@@ -0,0 +1,73 @@
UPDATE `creature_text` SET `type`=14 WHERE `entry`=8391 AND `groupid`=1 AND `id`=0;
DELETE FROM `creature_text` WHERE `entry`IN(8421, 8391);
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
(8421, 0, 0, 'Fools. I knew that if I played upon my brother''s feeble emotions, he would send ''rescuers.''', 12, 0, 100, 0, 0, 0, 'Dorius', 4394),
(8421, 1, 0, 'How easy it was to manipulate you into recovering the last Suntara stone from those imbeciles of the Twilight\'s Hammer.', 12, 0, 100, 0, 0, 0, 'Dorius', 4395),
(8421, 2, 0, 'When I stumbled upon the Suntara stones at the Grimesilt Digsite, the power of Ragnaros surged through my being. It was Ragnaros that gave me a purpose.', 12, 0, 100, 0, 0, 0, 'Dorius', 4396),
(8421, 3, 0, 'It was the will of Ragnaros that Obsidion be built. Obsidion will destroy the Blackrock orcs of Blackrock Spire, uniting us with our bretheren in the fiery depths.', 12, 0, 100, 0, 0, 0, 'Dorius', 4397),
(8421, 4, 0, 'And ultimately, it was Ragnaros that named me when I was reborn as an acolyte of fire: Lathoric... Lathoric the Black.', 12, 0, 100, 0, 0, 0, 'Dorius', 4398),
(8421, 5, 0, '%s''s laughter trails off...', 16, 0, 100, 0, 0, 0, 'Dorius', 4399),
(8421, 6, 0, 'Bravo! Bravo! Good show. What? You thought I was dead?', 12, 0, 100, 0, 0, 0, 'Dorius', 4393),
(8391, 0, 0, 'Your task is complete. Prepare to meet your doom.', 12, 0, 100, 0, 0, 0, 'Lathoric the Black', 4391),
(8391, 1, 0, 'Obsidion, Rise and Serve your Master!', 14, 0, 100, 0, 0, 0, 'Lathoric the Black', 4392);
UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=148498;
DELETE FROM `smart_scripts` WHERE `entryorguid` =148498;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(148498,1,0,1,62,0,100,0,1282,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Altar of Suntara - On Gossip Select - Close gossip'),
(148498,1,1,0,61,0,100,0,0,0,0,0,45,2,2,0,0,0,0,19,8400,0,0,0,0,0,0,'Altar of Suntara - Linked with previous event - Set Data 3 3 on Obsidion');
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=8391;
DELETE FROM `smart_scripts` WHERE `entryorguid` =8391;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8391, 0,0,0,11,0,100,0,0,0,0,0,69,0,0,0,0,0,0,19,8400,0,0,0,0,0,0,'Lathoric the Black - On Spawn - Move to Altar of Suntara'),
(8391, 0,1,2,1,0,100,1,8000,8000,0,0,101,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - OOC (No Repeat) - Set Home Position'),
(8391, 0,2,0,61,0,100,1,0,0,0,0,49,0,0,0,0,0,0,21,100,0,0,0,0,0,0,'Lathoric the Black - Linked with Previous Event - Attack'),
(8391, 0,3,0,7,0,100,1,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - On Evade - Despawn'),
(8391, 0,4,0,11,0,100,1,0,0,0,0,8,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - On Spawn - Set React State Defensive');
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=8400;
DELETE FROM `smart_scripts` WHERE `entryorguid` =8400;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8400, 0,0,1,38,0,100,0,1,1,0,0,19,256,0,0,0,0,0,8,0,0,0,0,0,0,0,'Obsidion - On Data Set - Remove Unattackable Flags'),
(8400, 0,1,2,61,0,100,0,0,0,0,0,91,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Obsidion - Linked with Previous Event - Set Bytes_1'),
(8400, 0,2,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,100,0,0,0,0,0,0,'Obsidion - Linked with Previous Event - Attack'),
(8400, 0,3,4,7,0,100,0,0,0,0,0,90,7,0,0,0,0,0,1,0,0,0,0,0,0,0,'Obsidion - On Evade - Set Bytes_1'),
(8400, 0,4,0,61,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'Obsidion - On Evade - Set Unit Flags'),
(8400, 0,5,0,9,0,100,0,0,10,20000,30000,11,12734,2,0,0,0,0,1,0,0,0,0,0,0,0,'Obsidion - On Range - Cast Floor Smash'),
(8400, 0,6,0,9,0,100,0,0,5,15000,30000,11,10101,2,0,0,0,0,7,0,0,0,0,0,0,0,'Obsidion - On Range - Cast Knock Away'),
(8400, 0,7,8,38,0,100,0,2,2,60000,60000,12,8421,3,31000,0,0,0,8,0,0,0,-6481.127441,-1237.451538,180.067535,5.104429,'Obsidion - On Data Set 2 2 - Spawn Dorius'),
(8400, 0,8,0,61 ,0,100,1,8000,8000,0,0,1,6,5000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - OOC - Say (Dorius)'),
(8400, 0,9,0,52,0,100,0,0,8421,0,0,1,1,5000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - On Text Over - Say (Dorius)'),
(8400, 0,10,0,52,0,100,0,1,8421,0,0,1,2,5000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - On Text Over - Say (Dorius)'),
(8400, 0,11,0,52,0,100,0,2,8421,0,0,1,3,5000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - On Text Over - Say (Dorius)'),
(8400, 0,12,0,52,0,100,0,3,8421,0,0,1,4,3000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - On Text Over - Say (Dorius)'),
(8400, 0,13,14,52,0,100,0,4,8421,0,0,1,5,3000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - On Text Over - Say (Dorius)'),
(8400, 0,14,0,61,0,100,0,0,0,0,0,12,8391,3,300000,0,0,0,8,0,0,0,-6528.036621, -1233.628296, 182.052963, 5.990324,'Obsidion - On Text Over - Spawn Lathoric The Black'),
(8400, 0,16,0,52,0,100,0,5,8421,0,0,1,0,5000,0,0,0,0,19,8391,0,0,0,0,0,0,'Obsidion - On Text Over - Say (Lathoric the Black)'),
(8400, 0,17,0,52,0,100,0,6,8421,0,0,1,0,5000,0,0,0,0,9,8421,0,100,0,0,0,0,'Obsidion - On Text Over - Say (Dorius)'),
(8400, 0,18,0,52,0,100,0,0,8391,0,0,1,1,2000,0,0,0,0,19,8391,0,0,0,0,0,0,'Obsidion - On Text Over - Say (Lathoric the Black)'),
(8400, 0,19,20,52,0,100,0,1,8391,0,0,45,2,2,0,0,0,0,19,8391,0,0,0,0,0,0,'Obsidion - On Text Over- Send Data to Lathoric the Black'),
(8400, 0,20,0,61,0,100,0,1,0,0,0,45,1,1,0,0,0,0,1,0,0,0,0,0,0,0,'Lathoric the Black - OOC - Send Data to Obsidion');
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=8417;
DELETE FROM `smart_scripts` WHERE `entryorguid` =8417;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8417,0,0,0,19,0,100,0,3566,0,0,0,45,2,2,0,0,0,0,19,8400,0,0,0,0,0,0,' Dying Archaeologist - On Quest Accept - Set Data 2 2 on Obsidion');
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=8421;
DELETE FROM `smart_scripts` WHERE `entryorguid` =8421;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8421, 0,0,1,11,0,100,1,0,0,0,0,8,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dorius - On Spawn - Set React State Defensive'),
(8421, 0,1,0,61,0,100,1,0,0,0,0,2,120,0,0,0,0,0,1,0,0,0,0,0,0,0,'Dorius - On Spawn - Set Faction');
@@ -0,0 +1 @@
UPDATE `creature_template` SET `faction`=14 WHERE `entry`=16118; -- Kormok
@@ -0,0 +1,244 @@
-- Hate'rel SAI
SET @ENTRY := 9034;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,3400,4800,11,15232,64,0,0,0,0,2,0,0,0,0,0,0,0,"Hate'rel - In Combat CMC - Cast 'Shadow Bolt'(Normal Dungeon)"),
(@ENTRY,0,1,0,9,0,100,2,0,5,5000,7000,11,15580,0,0,0,0,0,2,0,0,0,0,0,0,0,"Hate'rel - Within 0-5 Range - Cast 'Strike' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,9000,14000,40000,48000,11,15232,1,0,0,0,0,1,0,0,0,0,0,0,0,"Hate'rel - In Combat - Cast 'Shadow Bolt' (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,2,14000,17000,15000,20000,11,15232,1,0,0,0,0,5,0,0,0,0,0,0,0,"Hate'rel - In Combat - Cast 'Shadow Bolt' (Normal Dungeon)"),
(@ENTRY,0,4,0,21,0,100,3,0,0,0,0,34,4,2,0,0,0,0,1,0,0,0,0,0,0,0,"Hate'rel - On Reached Home - Set Instance Data 4 to 2 (Phase 1) (No Repeat) (Normal Dungeon)");
-- Vile'rel SAI
SET @ENTRY := 9036;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,3400,4800,11,15587,64,0,0,0,0,2,0,0,0,0,0,0,0,"Vile'rel - In Combat CMC - Cast 'Mind Blast' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,20000,30000,60000,120000,11,11974,1,0,0,0,0,1,0,0,0,0,0,0,0,"Vile'rel - In Combat - Cast 'Power Word: Shield' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,15000,20000,15000,20000,11,15585,1,0,0,0,0,1,0,0,0,0,0,0,0,"Vile'rel - In Combat - Cast 'Prayer of Healing' (Normal Dungeon)"),
(@ENTRY,0,3,0,2,0,100,2,0,50,16000,20000,11,15586,1,0,0,0,0,1,0,0,0,0,0,0,0,"Vile'rel - Between 0-50% Health - Cast 'Heal' (Normal Dungeon)"),
(@ENTRY,0,4,0,21,0,100,3,0,0,0,0,34,4,2,0,0,0,0,1,0,0,0,0,0,0,0,"Vile'rel - On Reached Home - Set Instance Data 4 to 2 (No Repeat) (Normal Dungeon)");
-- Seeth'rel SAI
SET @ENTRY := 9038;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,2,1000,1000,1800000,1800000,11,12544,33,0,0,0,0,1,0,0,0,0,0,0,0,"Seeth'rel - Out of Combat - Cast 'Frost Armor' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,0,0,3400,4800,11,12675,64,0,0,0,0,2,0,0,0,0,0,0,0,"Seeth'rel - In Combat CMC - Cast 'Frostbolt' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,9000,14000,19000,24000,11,15244,1,0,0,0,0,1,0,0,0,0,0,0,0,"Seeth'rel - In Combat - Cast 'Cone of Cold' (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,2,12000,16000,20000,23000,11,12674,1,0,0,0,0,1,0,0,0,0,0,0,0,"Seeth'rel - In Combat - Cast 'Frost Nova' (Normal Dungeon)"),
(@ENTRY,0,4,0,0,0,100,2,3000,5000,64000,75000,11,15044,1,0,0,0,0,1,0,0,0,0,0,0,0,"Seeth'rel - In Combat - Cast 'Frost Ward' (Normal Dungeon)"),
(@ENTRY,0,5,0,21,0,100,3,0,0,0,0,34,4,2,0,0,0,0,1,0,0,0,0,0,0,0,"Seeth'rel - On Reached Home - Set Instance Data 4 to 2 (No Repeat) (Normal Dungeon)");
-- Warder Stilgiss SAI
SET @ENTRY := 9041;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,2,1000,1000,1800000,1800000,11,12544,33,0,0,0,0,1,0,0,0,0,0,0,0,"Warder Stilgiss - Out of Combat - Cast 'Frost Armor' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,0,0,2400,3800,11,12675,64,0,0,0,0,2,0,0,0,0,0,0,0,"Warder Stilgiss - In Combat CMC - Cast 'Frostbolt' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,7000,9000,14000,18000,11,12674,1,0,0,0,0,1,0,0,0,0,0,0,0,"Warder Stilgiss - In Combat - Cast 'Frost Nova' (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,2,3000,4000,65000,70000,11,15044,1,0,0,0,0,1,0,0,0,0,0,0,0,"Warder Stilgiss - In Combat - Cast 'Frost Ward' (Normal Dungeon)"),
(@ENTRY,0,4,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Warder Stilgiss - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
-- Spirestone Ogre Magus SAI
SET @ENTRY := 9201;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15979,64,0,0,0,0,2,0,0,0,0,0,0,0,"Spirestone Ogre Magus - In Combat CMC - Cast 'Arcane Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,2,0,100,2,0,40,30000,35000,11,6742,1,0,0,0,0,1,0,0,0,0,0,0,0,"Spirestone Ogre Magus - Between 0-40% Health - Cast 'Bloodlust'= (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,6000,9000,20000,30000,11,13747,1,0,0,0,0,2,0,0,0,0,0,0,0,"Spirestone Ogre Magus - In Combat - Cast 'Slow'= (Normal Dungeon)");
-- Spirestone Lord Magus SAI
SET @ENTRY := 9217;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15230,64,0,0,0,0,2,0,0,0,0,0,0,0,"Spirestone Lord Magus - In Combat CMC - Cast 'Arcane Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,7000,12000,14000,19000,11,13323,1,0,0,0,0,6,0,0,0,0,0,0,0,"Spirestone Lord Magus - In Combat - Cast 'Polymorph' (Normal Dungeon)"),
(@ENTRY,0,2,0,2,0,100,2,0,50,25000,30000,11,8365,1,0,0,0,0,1,0,0,0,0,0,0,0,"Spirestone Lord Magus - Between 0-50% Health - Cast 'Enlarge' (Normal Dungeon)"),
(@ENTRY,0,3,0,2,0,100,2,0,30,30000,35000,11,6742,1,0,0,0,0,1,0,0,0,0,0,0,0,"Spirestone Lord Magus - Between 0-30% Health - Cast 'Bloodlust' (Normal Dungeon)");
-- Smolderthorn Headhunter SAI
SET @ENTRY := 9241;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2300,3900,11,15795,64,0,0,0,0,2,0,0,0,0,0,0,0,"Smolderthorn Headhunter - In Combat CMC - Cast 'Throw' (Phase 1) (Normal Dungeon)"),
(@ENTRY,0,1,0,9,0,100,2,5,30,9000,13000,11,16001,1,0,0,0,0,2,0,0,0,0,0,0,0,"Smolderthorn Headhunter - Within 5-30 Range - Cast 'Impale' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,5000,10000,22000,26000,11,6016,0,0,0,0,0,2,0,0,0,0,0,0,0,"Smolderthorn Headhunter - In Combat - Cast 'Pierce Armor' (Normal Dungeon)"),
(@ENTRY,0,3,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Smolderthorn Headhunter - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
-- Scarshield Warlock SAI
SET @ENTRY := 9257;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,12471,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarshield Warlock - In Combat CMC - Cast 'Shadow Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,10000,20000,60000,75000,11,15125,1,0,0,0,0,1,0,0,0,0,0,0,0,"Scarshield Warlock - In Combat - Cast 'Scarshield Portal' (Normal Dungeon)"),
(@ENTRY,0,2,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scarshield Warlock - Between 0-15% Health - Flee For Assist (Normal Dungeon)");
-- Firebrand Darkweaver SAI
SET @ENTRY := 9261;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,12471,64,0,0,0,0,2,0,0,0,0,0,0,0,"Firebrand Darkweaver - In Combat CMC - Cast 'Shadow Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,50,2,4000,6000,30000,45000,11,15128,32,0,0,0,0,5,0,0,0,0,0,0,0,"Firebrand Darkweaver - In Combat - Cast 'Mark of Flames' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,9000,14000,9000,14000,11,15090,1,0,0,0,0,5,0,0,0,0,0,0,0,"Firebrand Darkweaver - In Combat - Cast 'Dispel Magic' (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,2,1000,4000,12000,15000,11,16071,32,0,0,0,0,5,0,0,0,0,0,0,0,"Firebrand Darkweaver - In Combat - Cast 'Curse of the Firebrand' (Normal Dungeon)"),
(@ENTRY,0,4,0,0,0,100,2,12000,15000,12000,15000,11,14887,1,0,0,0,0,2,0,0,0,0,0,0,0,"Firebrand Darkweaver - In Combat - Cast 'Shadow Bolt Volley' (Normal Dungeon)"),
(@ENTRY,0,5,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Firebrand Darkweaver - Between 0-15% Health - Flee For Assist (Normal Dungeon)");
-- Firebrand Invoker SAI
SET @ENTRY := 9262;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15242,64,0,0,0,0,2,0,0,0,0,0,0,0,"Firebrand Invoker - In Combat CMC - Cast 'Fireball' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,50,2,4000,6000,30000,45000,11,15128,32,0,0,0,0,5,0,0,0,0,0,0,0,"Firebrand Invoker - In Combat - Cast 'Mark of Flames' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,8000,10000,11000,14000,11,12470,1,0,0,0,0,1,0,0,0,0,0,0,0,"Firebrand Invoker - In Combat - Cast 'Fire Nova' (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,2,12000,16000,14000,18000,11,12468,0,0,0,0,0,5,0,0,0,0,0,0,0,"Firebrand Invoker - In Combat - Cast 'Flamestrike' (Normal Dungeon)"),
(@ENTRY,0,4,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Firebrand Invoker - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
-- Smolderthorn Axe Thrower SAI
SET @ENTRY := 9267;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2300,3900,11,15795,64,0,0,0,0,2,0,0,0,0,0,0,0,"Smolderthorn Axe Thrower - In Combat CMC - Cast 'Throw' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,6000,9000,9000,12000,11,3391,1,0,0,0,0,1,0,0,0,0,0,0,0,"Smolderthorn Axe Thrower - In Combat - Cast 'Thrash' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,2,9000,14000,11000,15000,11,11428,1,0,0,0,0,2,0,0,0,0,0,0,0,"Smolderthorn Axe Thrower - In Combat - Cast 'Knockdown' (Normal Dungeon)"),
(@ENTRY,0,3,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Smolderthorn Axe Thrower - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
-- Smolderthorn Seer SAI
SET @ENTRY := 9269;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,2,1000,1000,600000,600000,11,13585,33,0,0,0,0,1,0,0,0,0,0,0,0,"Smolderthorn Seer - Out of Combat - Cast 'Lightning Shield' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,0,0,2400,3800,11,15801,64,0,0,0,0,2,0,0,0,0,0,0,0,"Smolderthorn Seer - In Combat CMC - Cast 'Lightning Bolt' (Normal Dungeon)"),
(@ENTRY,0,2,0,14,0,100,2,3000,40,15000,25000,11,12492,1,0,0,0,0,7,0,0,0,0,0,0,0,"Smolderthorn Seer - Friendly At 3000 Health - Cast 'Healing Wave' (Normal Dungeon)"),
(@ENTRY,0,3,0,0,0,100,2,3000,6000,12000,15000,11,15802,32,0,0,0,0,5,0,0,0,0,0,0,0,"Smolderthorn Seer - In Combat - Cast 'Shrink' (Normal Dungeon)"),
(@ENTRY,0,4,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Smolderthorn Seer - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
-- Dark Keeper Vorfalk SAI
SET @ENTRY := 9437;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15234,64,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Vorfalk - In Combat CMC - Cast 'Lightning Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,6000,9000,7000,10000,11,15306,1,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Vorfalk - In Combat - Cast 'Shock' (Normal Dungeon)");
-- Dark Keeper Bethek SAI
SET @ENTRY := 9438;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15228,64,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Bethek - In Combat CMC - Cast 'Fireball' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,3000,5000,15000,20000,11,12738,1,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Bethek - In Combat - Cast 'Amplify Damage' (Normal Dungeon)");
-- Dark Keeper Uggel SAI
SET @ENTRY := 9439;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15232,64,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Uggel - In Combat CMC - Cast 'Shadow Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,5000,7000,12000,18000,11,14875,33,0,0,0,0,5,0,0,0,0,0,0,0,"Dark Keeper Uggel - In Combat - Cast 'Curse of Agony' (Normal Dungeon)");
-- Dark Keeper Ofgut SAI
SET @ENTRY := 9442;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,15230,64,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Ofgut - In Combat CMC - Cast 'Arcane Bolt' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,7000,12000,18000,24000,11,7121,1,0,0,0,0,1,0,0,0,0,0,0,0,"Dark Keeper Ofgut - In Combat - Cast 'Anti-Magic Shield' (Normal Dungeon)");
-- Dark Keeper Pelver SAI
SET @ENTRY := 9443;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,2,1000,1000,1800000,1800000,11,12544,33,0,0,0,0,1,0,0,0,0,0,0,0,"Dark Keeper Pelver - Out of Combat - Cast 'Frost Armor' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,2,0,0,2400,3800,11,12675,64,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Keeper Pelver - In Combat CMC - Cast 'Frostbolt' (Normal Dungeon)");
-- Scarlet Cleric SAI
SET @ENTRY := 9449;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,0,0,0,3400,4800,11,15587,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Cleric - In Combat CMC - Cast 'Mind Blast'"),
(@ENTRY,0,1,0,74,0,100,0,0,40,25000,35000,11,15587,1,0,0,0,0,9,0,0,0,0,0,0,0,"Scarlet Cleric - On Friendly Between 0-40% Health - Cast 'Mind Blast'"),
(@ENTRY,0,2,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Cleric - Between 0-15% Health - Flee For Assist (No Repeat)");
-- Scarlet Curate SAI
SET @ENTRY := 9450;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,9,0,100,0,0,40,3400,4800,11,25054,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Curate - In Combat CMC - Cast 'Holy Smite'"),
(@ENTRY,0,1,0,15,0,100,1,0,0,30,0,11,17201,1,0,0,0,0,7,0,0,0,0,0,0,0,"Scarlet Curate - Friendly Crowd Controlled - Cast 'Dispel Magic'"),
(@ENTRY,0,2,0,74,0,100,0,0,40,25000,35000,11,17201,1,0,0,0,0,9,0,0,0,0,0,0,0,"Scarlet Curate - On Friendly Between 0-40% Health - Cast 'Dispel Magic'"),
(@ENTRY,0,3,0,61,0,100,1,0,0,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Curate - Between 0-15% Health - Flee For Assist (No Repeat)");
-- Scarlet Archmage SAI
SET @ENTRY := 9451;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,0,1000,1000,1800000,1800000,11,18100,1,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Archmage - Out of Combat - Cast 'Frost Armor'"),
(@ENTRY,0,1,0,9,0,100,0,0,40,3400,4800,11,15242,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Archmage - In Combat CMC - Cast 'Fireball'"),
(@ENTRY,0,2,0,0,0,100,0,8000,11000,16000,21000,11,15244,1,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Archmage - In Combat - Cast 'Cone of Cold'"),
(@ENTRY,0,3,0,13,0,100,1,0,0,0,0,11,15122,1,0,0,0,0,7,0,0,0,0,0,0,0,"Scarlet Archmage - Target Casting - Cast 'Counterspell'"),
(@ENTRY,0,4,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Scarlet Archmage - Between 0-15% Health - Flee For Assist (No Repeat)");
-- Scarlet Enchanter SAI
SET @ENTRY := 9452;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,0,0,0,3400,4800,11,25055,64,0,0,0,0,2,0,0,0,0,0,0,0,"Scarlet Enchanter - In Combat CMC - Cast 'Arcane Bolt'"),
(@ENTRY,0,1,0,0,0,100,0,7000,10000,18000,22000,11,15970,1,0,0,0,0,6,0,0,0,0,0,0,0,"Scarlet Enchanter - In Combat - Cast 'Sleep'");
-- Bloodaxe Evoker SAI
SET @ENTRY := 9693;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2400,3800,11,13748,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bloodaxe Evoker - In Combat CMC - Cast 'Arcane Bolt'"),
(@ENTRY,0,1,0,0,0,75,2,12000,14000,25000,30000,11,15743,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bloodaxe Evoker - In Combat - Cast 'Flamecrack' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,80,2,7000,9000,15000,20000,11,15744,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bloodaxe Evoker - In Combat - Cast 'Blast Wave' (Normal Dungeon)"),
(@ENTRY,0,3,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Bloodaxe Evoker - Between 0-15% Health - Flee For Assist (No Repeat) (Normal Dungeon)");
-- Bloodaxe Summoner SAI
SET @ENTRY := 9717;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,3400,5800,11,15791,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bloodaxe Summoner - In Combat CMC - Cast 'Arcane Missiles' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,90,2,6000,9000,13000,18000,11,15532,1,0,0,0,0,1,0,0,0,0,0,0,0,"Bloodaxe Summoner - In Combat - Cast 'Frost Nova' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,75,2,8000,12000,25000,30000,11,15734,1,0,0,0,0,6,0,0,0,0,0,0,0,"Bloodaxe Summoner - In Combat - Cast 'Summon' (Normal Dungeon)");
-- Flamekin Spitter SAI
SET @ENTRY := 9776;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,0,0,0,2600,5100,11,15664,64,0,0,0,0,2,0,0,0,0,0,0,0,"Flamekin Spitter - In Combat CMC - Cast 'Venom Spit'");
-- Flamekin Torcher SAI
SET @ENTRY := 9778;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,0,0,0,3500,4700,11,15665,64,0,0,0,0,2,0,0,0,0,0,0,0,"Flamekin Torcher - In Combat CMC - Cast 'Fireball'");
-- Wesley SAI
SET @ENTRY := 9978;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wesley - Between 0-15% Health - Flee For Assist");
@@ -0,0 +1,3 @@
DELETE FROM spell_script_names WHERE spell_id=-49027;
INSERT INTO spell_script_names VALUES
(-49027, 'spell_dk_bloodworms');
@@ -0,0 +1,42 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`IN(49191,49554);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 49191, 0, 0, 31, 0, 3, 27712, 0, 0, 0, 0, '', '7th Legion Chain Gun hits Mindless Ghoul'),
(13, 1, 49554, 0, 0, 31, 0, 3, 27795, 0, 0, 0, 0, '', 'Summon injured soldier hits Injured Soldier Summon Point');
UPDATE `creature` SET `spawntimesecs`=120 WHERE `id`=27712;
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(27712,27795,27788);
DELETE FROM `smart_scripts` WHERE `entryorguid`IN(27712,27788) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=2778800 AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(27712, 0, 0, 0, 9, 0, 100, 0, 0, 5, 10000, 15000, 11, 50196, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Mindless Ghoul - IC - Cast Rotting Touch'),
(27788, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On Just Summoned - Store Targetlist'),
(27788, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 49774, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On Just Summoned - Cast cast Cower + Fear Visual'),
(27788, 0, 2, 12, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2778800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Run Script'),
(27788, 0, 3, 5, 7, 0, 100, 0, 0, 0, 0, 0, 11, 49774, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On Evade - cast Cower + Fear Visual'),
(27788, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion cannon within 3 yards - Disable Combat movement'),
(27788, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On Death - Reset all scripts'),
(27788, 0, 6, 4, 75, 0, 100, 1, 0, 27714, 10, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 15 yards - Remove aura Cower + Fear Visual'),
(27788, 0, 7, 8, 75, 0, 100, 1, 0, 27714, 3, 0, 1, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 5 yards - Say'),
(27788, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 33, 27788, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 5 yards - Give kill credit to stored target'),
(27788, 0, 9, 13, 61, 0, 100, 0, 0, 0, 0, 0, 28, 49774, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 5 yards - Remove aura Cower + Fear Visual'),
(27788, 0, 10, 0, 1, 0, 100, 0, 500, 500, 7500, 7500, 29, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - OOC - Follow stored target 2'),
(27788, 0, 11, 12, 61, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Just Summoned - Disable melee combat'),
(27788, 0, 12, 0, 61, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Just Summoned - Disable Combat movement'),
(27788, 0, 13, 14, 61, 0, 100, 0, 0, 0, 0, 0, 28, 49775, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 15 yards - Remove aura Cower + Fear Visual'),
(27788, 0, 14, 15, 61, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 15 yards - Set Unit Flags'),
(27788, 0, 15, 0, 61, 0, 100, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On 7th Legion Cannon within 15 yards - Set Run'),
(27788, 0, 16, 0, 7, 0, 100, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 12, 2, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - On Evade Follow stored targetlist 2'),
(2778800, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 64, 2, 0, 0, 0, 0, 0, 19, 27792, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Script - Store Targetlist 2 closest Injured Soldier Waypoint 01 '),
(2778800, 9, 1, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 64, 2, 0, 0, 0, 0, 0, 19, 27793, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Script - Store Targetlist 2 closest Injured Soldier Waypoint 02'),
(2778800, 9, 2, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 64, 2, 0, 0, 0, 0, 0, 19, 27794, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Script - Store Targetlist 2 closest Injured Soldier Waypoint 03'),
(2778800, 9, 3, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 64, 2, 0, 27714, 0, 0, 0, 19, 27714, 0, 0, 0, 0, 0, 0, 'Injured 7th Legion Soldier - Script - Store Targetlist 2 7th legion chain gun');
DELETE FROM `creature_text` WHERE `entry`=27788;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
(27788, 0, 0, 'I was almost ghoul bait! Thanks for the rescue!', 12, 0, 100, 0, 0, 0, 'Injured 7th Legion Soldier', 27097),
(27788, 0, 1, 'It''s a good thing you came along, ally! We were done for!', 12, 0, 100, 0, 0, 0, 'Injured 7th Legion Soldier', 27098),
(27788, 0, 2, 'Thanks for the cover fire! It''s a MADHOUSE down there!', 12, 0, 100, 0, 0, 0, 'Injured 7th Legion Soldier', 27095),
(27788, 0, 3, 'Wow, I thought I was a goner! Thanks, friend!', 12, 0, 100, 0, 0, 0, 'Injured 7th Legion Soldier', 27096);
@@ -0,0 +1,26 @@
UPDATE `creature_template` SET `AIName`='SmartAI',`npcflag`=16777216 WHERE `entry`=28161;
DELETE FROM `smart_scripts` WHERE `entryorguid`=28161 and `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=2816100 and `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(28161, 0, 0, 4, 8, 0, 100, 0, 51959, 0, 11000, 11000, 28, 51846, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - On Spellhit (Chicken Net) - Remove Aura Scared Chicken'),
(28161, 0, 1, 2, 73, 0, 100, 0, 0, 0, 0, 0, 85, 51037, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - On Spellclick - Invoker Cast Capture Chicken Escapee '),
(28161, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - On Spellclick - Despawn'),
(28161, 0, 2, 3, 11, 0, 100, 0, 0, 0, 0, 0, 11, 50734, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - On Reset - Cast Frenzyheart Chicken: Invisibility'),
(28161, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 51846, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - On Reset - Cast Scared Chicken'),
(28161, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2816100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - Link - Run Script'),
(2816100, 9, 0, 0, 0, 0, 100, 0, 10, 10, 0, 0, 11, 51959, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Chicken Escapee - Script - Cast Chicken Net');
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=28161;
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(28161, 51037, 0, 0);
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceGroup`=28161;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(18, 28161, 51037, 0, 0, 9, 0, 12702, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick'),
(18, 28161, 51037, 0, 1, 9, 0, 12532, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=51959;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 51959, 0, 0, 31, 0, 3, 28161, 0, 0, 0, 0, '', 'Chicken Net targets chicken escapee');
@@ -0,0 +1,14 @@
SET @MECHANIC_CHARM = 1;
SET @MECHANIC_FEAR = 16;
SET @MECHANIC_ROOT = 64;
SET @MECHANIC_SLEEP = 512;
SET @MECHANIC_FREEZE = 4096;
SET @MECHANIC_POLYMORPH = 65536;
SET @MECHANIC_SAPPED = 536870912;
UPDATE `creature_template`
SET `mechanic_immune_mask`= `mechanic_immune_mask`|@MECHANIC_CHARM|@MECHANIC_FEAR|@MECHANIC_ROOT|@MECHANIC_SLEEP|@MECHANIC_FREEZE|@MECHANIC_POLYMORPH|@MECHANIC_SAPPED
WHERE `ScriptName` LIKE 'boss_%' OR
`entry` IN (SELECT `difficulty_entry_1` FROM (SELECT `difficulty_entry_1` FROM `creature_template` WHERE `ScriptName` LIKE 'boss_%') AS diff1) OR
`entry` IN (SELECT `difficulty_entry_2` FROM (SELECT `difficulty_entry_2` FROM `creature_template` WHERE `ScriptName` LIKE 'boss_%') AS diff2) OR
`entry` IN (SELECT `difficulty_entry_3` FROM (SELECT `difficulty_entry_3` FROM `creature_template` WHERE `ScriptName` LIKE 'boss_%') AS diff3);
@@ -0,0 +1,19 @@
-- Defias Watchman SAI
SET @ENTRY := 1725;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,0,0,100,2,0,0,2200,3800,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Defias Watchman - In Combat CMC - Cast 'Shoot' (Normal Dungeon)"),
(@ENTRY,0,1,0,2,0,100,3,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defias Watchman - Between 0-15% Health - Flee For Assist (Normal Dungeon) (No Repeat)"),
(@ENTRY,0,2,0,0,0,100,0,0,0,2200,3800,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Defias Watchman - In Combat CMC - Cast 'Shoot'"),
(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defias Watchman - Between 0-15% Health - Flee For Assist (No Repeat)");
-- Defias Magician SAI
SET @ENTRY := 1726;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,1,0,100,0,1000,1000,1800000,1800000,11,12544,1,0,0,0,0,1,0,0,0,0,0,0,0,"Defias Magician - Out of Combat - Cast 'Frost Armor' (Normal Dungeon)"),
(@ENTRY,0,1,0,0,0,100,0,0,0,4000,6600,11,9053,64,0,0,0,0,2,0,0,0,0,0,0,0,"Defias Magician - In Combat CMC - Cast 'Fireball' (Normal Dungeon)"),
(@ENTRY,0,2,0,0,0,100,0,0,0,23200,38500,11,5110,1,0,0,0,0,1,0,0,0,0,0,0,0,"Defias Magician - In Combat - Cast 'Summon Living Flame' (Normal Dungeon)"),
(@ENTRY,0,3,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Defias Watchman - Between 0-15% Health - Flee For Assist (Normal Dungeon) (No Repeat)");
@@ -0,0 +1,2 @@
--
UPDATE `quest_template` SET `RequestItemsText` = '<Nipsy puts his index finger through one of the air holes in the carton.>$b$bAlive and kicking... and just in time!' WHERE `id` = 6662;
@@ -0,0 +1,5 @@
-- Gramma Stonefield's Note page 2
UPDATE `page_text` SET `text` = 'I fear the war between the Stonefields and the Maclures will kill Tommy Joe and Maybell''s blossoming romance, and in times like these - where dark news and rumors of war loom over us - youth and love must be nurtured.$b$bSo, the favor: I ask that you use your skills and concoct a potion or elixir to aid these young lovers in their quest for each other.$b$bThank you, William. And please, when you have some time away from work, come visit. We''ll have a few chuckles over the past.$b$b-Mildred' WHERE `entry` = 218;
-- Additional fix for "Meeting the Warchief" which was done, however with 2 additional whitespaces
UPDATE `quest_template` SET `OfferRewardText` = '<Thrall begins to read the letter.>$b$bSo the blood elves finally took care of their little problem. It is no surprise that it took your help as well as that of an entire Forsaken regiment to get the job done.$b$b<The Warchief breaks into laughter.>$b$bI suppose there''s no stopping this. In the end we need them just as much as they need us.' WHERE `id` = 9813;
@@ -0,0 +1,2 @@
-- A Bloodstained Journal Page
UPDATE `page_text` SET `text` = '. . .downward spiral of despair. First she mocks me and now she is engaged. The ungracious charlatan was pretending to love when truly she desired to hurt me all along. A black void lurks with in me now and it grows with each waking moment. The blood I shall spill pales in comparison to the tears I have shed. . .' WHERE `entry` = 24;
@@ -0,0 +1,2 @@
-- Brock's List
UPDATE `page_text` SET `text` = 'Below is the list of students who obtained a Platinum Star grade at Brock''s School of Mining and Surveying, earning them an Honorary Miner''s Pick:$b$bMelia Stoneshaker$bBardin Ironband$bUmi Togglevolt$bRumi Togglevolt$bVorel Steelspire' WHERE `entry` = 2514;
@@ -0,0 +1,2 @@
--
UPDATE `creature_template` SET `faction`=59 WHERE `entry`=1118;
@@ -0,0 +1,11 @@
-- Senir's Report page 1
UPDATE `page_text` SET `text` = 'A Report on the State of the Frostmane Trolls in the General Area of Coldridge Valley$b$bThe trolls situated in Dun Morogh are largely centralized in Frostmane Hold, a mountain cave on the western border. They have sufficient numbers to cause some concern, however, they seem more than content to stay in their cave. This is, no doubt, because they do not wish to incur the wrath of the dwarves again, and risk total extermination. Their actions can be considered territorial, if anything, and it is' WHERE `entry` = 88;
-- Senir's Report page 2
UPDATE `page_text` SET `text` = 'my belief that they pose no real threat to us, so long as we do not encroach upon their territory. This may be a situation unappealing to the dwarven populace, but given the dispersal of military resources, it may be prudent to relegate the extermination of the trolls to a lower level of importance, and continue to focus on the threat posed by the troggs and the Dark Irons.$b$bEnclosed, you will also find a copy of my brother Grelin''s report on Anvilmar.$b$bSigned,$bSenir Whitebeard' WHERE `entry` = 89;
-- Senir's Report page 3
UPDATE `page_text` SET `text` = 'A Report on the State of the Frostmane Trolls in the General Area of Coldridge Valley$b$bPrepared by Grelin Whitebeard, Senate Special Envoy$b$bFrom the time that I have spent observing the movement of the Frostmane trolls in the Coldridge Valley area, I have determined that they pose no large threat to dwarven settlements in the area. Moreover, they are a threat that can be eliminated with little additional support from the army. Through the assistance of Mountaineers already stationed in' WHERE `entry` = 90;
-- Senir's Report page 4
UPDATE `page_text` SET `text` = 'Coldridge Valley and mercenaries (paid with funds set aside by the Senate prior to my dispatchment), I am confident that the problem will be solved in short order.$b$bThis action has been authorized with the sanction given to me by King Bronzebeard.' WHERE `entry` = 91;
@@ -0,0 +1,2 @@
--
UPDATE `quest_template` SET `PrevQuestId` = 0 WHERE `Id`= 315;
@@ -0,0 +1,2 @@
UPDATE `gameobject` SET `spawntimesecs`=-60 WHERE `guid`=46424;
UPDATE `event_scripts` SET `datalong2`=60 WHERE `id`=466;
@@ -0,0 +1,2 @@
-- Fix Hunter Trainers offering Hunter quest to Rogues
UPDATE `quest_template` SET `RequiredClasses`=4 WHERE `id` IN (6721,6722);
@@ -0,0 +1,90 @@
DELETE FROM `creature_text` WHERE `entry` IN(17058,16794,16938,21257,21279,16795,19354,20680,19191,19273,19255,20677,20678,20679);
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
(17058, 0, 0, 'Do not stop! I promise you a thousand deaths if you even think about putting down that pick!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16425),
(17058, 0, 1, 'Dig faster, wretch! Do not force me to show you the true meaning of pain!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16424),
(17058, 0, 2, 'Faster, scum! The Master won''t be pleased if we don''t find the Ata''mal crystal he''s after.', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16421),
(17058, 1, 0, 'You dare interfere with the Master''s endeavors? You will pay, foolish mortal!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16438),
(17058, 1, 1, 'Slay these intruders, filthy Dreghood! I promise you neverending pain if you disobey me!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16439),
(17058, 1, 2, 'Go, you little wretches! Show these fools that our Master is not to be trifled with!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16440),
(17058, 1, 3, 'Do not even think of fleeing, Broken wretches! I promise you a fate worse than death if you don''t slay these intruders!', 12, 0, 100, 0, 0, 0, 'Illidari Taskmaster',16441),
(16794, 0, 0, '...a potent concoction!', 12, 0, 100, 0, 0, 0, 'Apothecary Azethen',13678),
(16794, 1, 0, 'But where could I ever find a suitable test subject?', 12, 0, 100, 6, 0, 0, 'Apothecary Azethen',13682),
(16794, 2, 0, 'Drink this, you blue brute! Disobey me and I promise you a slow, painful death!', 12, 0, 100, 25, 0, 0, 'Apothecary Azethen',13683),
(16794, 3, 0, 'Hmmm... looks like I''m going to need a new test subject.', 12, 0, 100, 274, 0, 0, 'Apothecary Azethen',13684),
(16938, 0, 0, 'Put me out of this misery!', 12, 0, 100, 0, 0, 0, 'Dreghood Brute',16471),
(16938, 0, 1, 'Forgive me... I have no choice.', 12, 0, 100, 0, 0, 0, 'Dreghood Brute',16469),
(21257, 0, 0, 'Thank you, $n. Now, to perform the test...', 12, 0, 100, 1, 0, 0, 'Apothecary Zelana',19022),
(21257, 1, 0, 'Ah, I see...', 12, 0, 100, 0, 0, 0, 'Apothecary Zelana',19023),
(21257, 2, 0, 'Yes, this is unfortunate.', 12, 0, 100, 0, 0, 0, 'Apothecary Zelana',19024),
(21257, 3, 0, '$n, I have confirmed that this blood is from the Bonechewer clan of orcs, tainted with demonic power. I''m afraid, however, that my current equipment can delve no deeper into this mystery...', 12, 0, 100, 1, 0, 0, 'Apothecary Zelana',19025),
(21279, 0, 0, 'Please excuse me while I begin my tests...', 12, 0, 100, 1, 0, 0, 'Apothecary Albreck',19065),
(21279, 1, 0, 'Interesting...', 12, 0, 100, 0, 0, 0, 'Apothecary Albreck',19066),
(21279, 2, 0, 'But what is this?', 12, 0, 100, 0, 0, 0, 'Apothecary Albreck',19067),
(21279, 3, 0, 'Oh, my!', 12, 0, 100, 0, 0, 0, 'Apothecary Albreck',19068),
(21279, 4, 0, 'If my blood hadn''t clotted long ago, it would be boiling with rage right now...', 12, 0, 100, 1, 0, 0, 'Apothecary Albreck',19069),
(16795, 0, 0, 'I pity you, Forsaken. Your soul is devoid of light.', 12, 35, 100, 0, 0, 0, 'Draenei Prisoner',13685),
(19354, 0, 0, 'Work these Broken wretches to the bones, Illidari! If there''s anything of value in this forsaken place we shall find it!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16472),
(19354, 0, 1, 'Do not allow these wretches a moment of rest! If there''s an Ata''mal crystal here then we shall find it!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16476),
(19354, 0, 2, 'Keep a close eye on this Broken scum! Far too many have escaped from us!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16474),
(19354, 0, 3, 'We will find what the Master is looking for! Failure is not an option!', 14, 0, 100, 0, 0, 0, 'Arzeth the Merciless',16475),
(20680, 1, 0, 'That Broken worm gave you that staff, didn''t he? Did he also tell you he''s the one that sold out his tribe? No matter, you will both pay for this!', 14, 0, 100, 0, 0, 0, 'Arzeth the Powerless',18349),
(19191, 0, 0, 'What insolence! What arrogance! To believe you could defeat me on my own doorstep!', 14, 0, 100, 0, 0, 0, 'Arazzius the Cruel',17653),
(19191, 1, 0, 'Master, I have failed...', 14, 0, 100, 0, 0, 0, 'Arazzius the Cruel',16429),
(19273, 0, 0, 'Speak with Wing Commander Brack, $n. He''ll outfit you with one of our armored wyvern destroyers. And, good luck!', 12, 0, 100, 25, 0, 0, 'Forward Commander To''arch',17964),
(19255, 0, 0, 'Yea, we got problems. I think that''s crystal clear. The question is, what are we gonna do about it?', 12, 1, 100, 1, 0, 0, 'General Krakork',16392),
(19255, 0, 1, 'Get used to it, girls. We''re out here for the rest of our miserable lives as far as I''m concerned. Welcome to Hellfire Peninsula, your new home.', 12, 1, 100, 1, 0, 0, 'General Krakork',16394),
(19255, 0, 2, 'How many more of you grunts do I need to send back to mommy and daddy in a body bag before you grow a brain and realize that runnin'' head first into a Legion kill squad is suicide? And don''t nod your thick skulls at me as if you know what I''m talkin'' about!', 12, 1, 100, 1, 0, 0, 'General Krakork',16393),
(19255, 0, 3, 'I''m not gonna lie to you, soldiers. We''re getting our butts kicked out there! Now which one of you is orc enough to do something about it?', 12, 1, 100, 1, 0, 0, 'General Krakork',16390),
(20677, 0, 0, 'You''ve freed me! The winds speak to my people once again and grant us their strength. I thank you, stranger.', 12, 0, 100, 1, 0, 0, 'Morod the Windstirrer',18358),
(20678, 0, 0, 'I am free! I will ask the spirit of fire to return to us so that my people may have the courage to fight their masters! I thank you, $r.', 12, 0, 100, 15, 0, 0, 'Akoru the Firecaller',18356),
(20679, 0, 0, 'I''m free! The spirit of water returns to my people. It will bring us the wisdom we need to survive in this harsh land. I am in your debt, $n.', 12, 0, 100, 1, 0, 0, 'Aylaan the Waterwaker',18357);
UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry` IN(16794,16795,21257,21279,16764,19273);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(16794,16795,21257,21279,19255) and `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1679400,1679500,2125700,2127900) and `source_type`=9;
DELETE FROM `smart_scripts` WHERE `entryorguid`=17058 AND `source_type`=0 AND `id` IN(2,3);
DELETE FROM `smart_scripts` WHERE `entryorguid`=16938 AND `source_type`=0 AND `id` IN(1);
DELETE FROM `smart_scripts` WHERE `entryorguid`=19354 AND `source_type`=0 AND `id` IN(3,4);
DELETE FROM `smart_scripts` WHERE `entryorguid`=19191 AND `source_type`=0 AND `id` IN(4,5);
DELETE FROM `smart_scripts` WHERE `entryorguid`=19273 AND `source_type`=0 AND `id` IN(1);
DELETE FROM `smart_scripts` WHERE `entryorguid`IN(20677,20678,20679) AND `source_type`=0 AND `id` IN(2);
UPDATE `smart_scripts` SET `link`=2 WHERE `entryorguid` IN(20677,20678,20679) AND `source_type`=0 AND `id`=1;
UPDATE `smart_scripts` SET `link`=4 WHERE `entryorguid`=19354 AND `source_type`=0 AND `id`=2;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(17058, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Illidari Taskmaster - On Agro - Say'),
(17058, 0, 3, 0, 1, 0, 100, 0, 15000, 60000, 45000, 90000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Illidari Taskmaster - OOC - Say'),
(16794, 0, 0, 0, 20, 0, 100, 0, 9387, 0, 0, 0, 80, 1679400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - On Quest Reward (Source of the Corruption) - Run Script'),
(16795, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 80, 1679500, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - On Data Set 1 1 - Run Script'),
(16938, 0, 1, 0, 4, 0, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Dreghood Brute - On Agro - Say'),
(21257, 0, 0, 0, 20, 0, 100, 0, 10449, 0, 0, 0, 80, 2125700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - On Quest Reward (Apothecary Zelana) - Run Script'),
(21279, 0, 0, 0, 20, 0, 100, 0, 10538, 0, 0, 0, 80, 2127900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - On Quest Reward (Boiling Blood) - Run Script'),
(19354, 0, 3, 0, 1, 0, 100, 0, 35000, 45000, 40000, 90000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Arzeth the Merciless - OOC - Say'),
(19354, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Arzeth the Merciless - Link - Say'),
(19191, 0, 4, 0, 4, 0, 100, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Arazzius the Cruel - On Agro - Say'),
(19191, 0, 5, 0, 6, 0, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Arazzius the Cruel - On Death - Say'),
(19273, 0, 1, 0, 19, 0, 100, 0, 10129, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Forward Commander To''arch - On Quest Accepted (Mission: The Abyssal Shelf) - Say'),
(19255, 0, 0, 0, 1, 0, 100, 0, 30000, 60000, 30000, 90000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'General Krakork - OOC - Say'),
(20677, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Morod the Windstirrer - Link - Say'),
(20678, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Akoru the Firecaller - Link - Say'),
(20679, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Aylaan the Waterwaker - Link - Say'),
(1679400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
(1679400, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
(1679400, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
(1679400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 16795, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Set Data 1 1 on Draenei Prisoner'),
(1679400, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Azethen - Script - Say'),
(1679500, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - Script - Say'),
(1679500, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - Script - Play Emote OneShotEat'),
(1679500, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Draenei Prisoner - Script - Die'),
(2125700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
(2125700, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
(2125700, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
(2125700, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Zelana - Script - Say'),
(2127900, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
(2127900, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
(2127900, 9, 2, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
(2127900, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say'),
(2127900, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Albreck - Script - Say');
@@ -0,0 +1,238 @@
DELETE FROM `creature_text` WHERE `entry` IN(19270,19228,18756,19271);
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
(19270, 0, 0, 'If you are ready to laugh, head over to the World''s End Tavern!', 14, 0, 100, 0, 0, 0, 'Shattrath Saul',16380),
(18756, 0, 0, 'I, like, so don''t get it...', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16888),
(18756, 0, 1, 'Psshh... whatever.', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16882),
(18756, 0, 2, 'That''s hot.', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16881),
(18756, 0, 3, 'That joke''s hot.', 12, 0, 100, 1, 0, 0, 'Haris Pilton',16887),
(19228, 0, 0, 'Hey all! So how long until the jokes spawn?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16382),
(19228, 0, 1, 'I just flew in from Ironforge and, Boy!, are my mount''s wings tired!', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16649),
(19228, 0, 2, 'Hey folks, go easy on me... it''s my first time.', 12, 0, 100, 24, 0, 0, 'Perry Gatner',16328),
(19228, 0, 3, 'Thanks for coming out to see me! I hope you are ready for a good time, because I am.', 12, 0, 100, 21, 0, 0, 'Perry Gatner',16327),
(19228, 1, 0, 'I never met a tauren I didn''t like...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16378),
(19228, 2, 0, 'To eat!!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16379),
(19228, 3, 0, 'Last week I was in Goldshire. Have you been there?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16651),
(19228, 4, 0, 'That town''s so small, I asked a kid to draw me a map. He drew it on the back of a Defias wanted poster...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16652),
(19228, 5, 0, 'to scale!!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16653),
(19228, 6, 0, 'Impersonation time!! I call this, "The Silly Tauren."', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16337),
(19228, 7, 0, 'The comedian clears his throat.', 16, 0, 100, 0, 0, 0, 'Perry Gatner',16338),
(19228, 8, 0, 'The comedian impersonates a tauren.', 16, 0, 100, 5, 0, 6386, 'Perry Gatner',16580),
(19228, 9, 0, 'Here''s a good one, why do watermelons have water in them? ', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16333),
(19228, 10, 0, 'Because they are planted in the spring!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16336),
(19228, 11, 0, 'What''s the deal with women? I mean they are always like...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16339),
(19228, 12, 0, 'The comedian impersonates a human female.', 16, 0, 100, 5, 0, 6143, 'Perry Gatner',16583),
(19228, 13, 0, 'And then gnomes are even worse! They are always saying stuff like...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16340),
(19228, 14, 0, 'The comedian impersonates a gnome.', 16, 0, 100, 5, 0, 6133, 'Perry Gatner',16581),
(19228, 15, 0, 'What time is it when an elekk sits on your fence?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16368),
(19228, 16, 0, 'Time to get a new fence!!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16369),
(19228, 17, 0, 'If I knew it was going to be like this, I''d have worn my Greater Boots of Laughter.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16388),
(19228, 17, 1, 'Apparently my reputation with you people is hostile.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16385),
(19228, 17, 2, 'Wow! The laughs don''t drop very often here, do they?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16389),
(19228, 18, 0, 'Hey! Hey! Hey! It''s Raliq the drunk... His momma''s so fat she didn''t just make the front cover of Ogre Today...', 12, 0, 100, 25, 0, 0, 'Perry Gatner',16667),
(19228, 19, 0, 'She made the back cover too!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16668),
(19228, 20, 0, 'The gnomes used to be a nice respectful people...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16669),
(19228, 21, 0, 'The other day I saw one walking down the street shouting, "Once you go gnome, you never go home!"', 12, 0, 100, 1, 0, 4415, 'Perry Gatner',16670),
(19228, 22, 0, 'I love blood elf women. Especially when they say stuff like this...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16374),
(19228, 23, 0, 'The comedian impersonates a blood elf.', 16, 0, 100, 5, 0, 9643, 'Perry Gatner',16582),
(19228, 24, 0, 'So the blood elves think they''re just one step away from ruling the world...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16682),
(19228, 25, 0, 'Twelve steps is more like it!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16683),
(19228, 26, 0, 'One last impersonation. It''s tough, but let''s see if you can guess who it is...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16351),
(19228, 27, 0, 'The comedian impersonates an orc.', 16, 0, 100, 5, 0, 7195, 'Perry Gatner',16584),
(19228, 28, 0, 'Now that the show''s done, can someone run me through Scarlet Monestary?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16381),
(19228, 28, 1, 'Thank you! Don''t forget to tip your waiters! Good night folks.', 12, 0, 100, 0, 0, 0, 'Perry Gatner',16341),
(19228, 28, 2, 'Well, it''s time to take these comedic muscles elsewhere. Have a good night all!', 12, 0, 100, 23, 0, 0, 'Perry Gatner',16348),
(19228, 28, 3, 'Is it over already? You''ve been great folks. Walk safely and have a good night.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16343),
(19228, 29, 0, 'How many kobolds does it take to change a lantern wick?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16657),
(19228, 30, 0, 'You no take candle!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16658),
(19228, 31, 0, 'Goldshire''s inn advertises a lakeside view...', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16655),
(19228, 32, 0, 'I saw a murloc swim by my window.', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16656),
(19228, 33, 0, 'Have you ever noticed that all those cute, orc kids look the same?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16331),
(19228, 34, 0, 'It''s too bad they don''t stay cute. There must be some rite of passage in the Barrens called, "Climb ugly tree and fall out."', 12, 0, 100, 0, 0, 0, 'Perry Gatner',16334),
(19228, 35, 0, 'I''ve heard that gnomes can grant wishes...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16375),
(19228, 36, 0, 'Well I wish they''d go away!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16376),
(19228, 37, 0, 'Look who''s here, it''s Raliq the drunk... His momma''s so fat dragons won''t eat her...', 12, 0, 100, 25, 0, 0, 'Perry Gatner',16665),
(19228, 38, 0, 'They don''t know where to store the leftovers!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16666),
(19228, 39, 0, 'My wife and I were happy for 23 years...', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16370),
(19228, 40, 0, 'And then we met!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16371),
(19228, 41, 0, 'What do you call a broken boomerang?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16372),
(19228, 42, 0, 'A stick!', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16373),
(19228, 43, 0, 'So this gnome tells a tauren that he''s been to Molten Core.', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16332),
(19228, 44, 0, 'The tauren says, "That''s a load of bull."', 12, 0, 100, 5, 0, 0, 'Perry Gatner',16335),
(19228, 45, 0, 'How desperate do you have to be for allies that you recruit your livestock?', 12, 0, 100, 6, 0, 0, 'Perry Gatner',16680),
(19228, 46, 0, 'I own a dog, but I''m not giving him a sword.', 12, 0, 100, 1, 0, 0, 'Perry Gatner',16681),
(19271, 0, 0, 'Thank you all for coming tonight. Now put your hands together to welcome Shattrath''s best, Perry Gatner!', 12, 0, 100, 21, 0, 0, 'Albert Quarksprocket',16383),
(19271, 1, 0, 'Perry Gatner! What an act! The cantina is open all night long, so please, stay and enjoy yourselves!', 12, 0, 100, 21, 0, 0, 'Albert Quarksprocket',16384);
-- Delete the permament spawn of Perry Gatner
DELETE FROM `creature` WHERE `guid`=6747;
DELETE FROM `waypoints` WHERE `entry` IN(19228,19271,1927100);
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
(19228,1,-1748.807, 5131.199, -35.77385,'Perry Gatner WP1'),
(19228,2,-1749.057, 5132.199, -36.02385,'Perry Gatner WP2'),
(19228,3,-1750.557, 5137.449, -36.02385,'Perry Gatner WP3'), -- Stage
(19228,4,-1748.807, 5131.199, -35.77385,'Perry Gatner WP4'),
(19228,5,-1749.029, 5132.317, -36.02094,'Perry Gatner WP5'),
(19228,6,-1748.779, 5131.067, -36.02094,'Perry Gatner WP6'), -- back
(19271,1,-1740.421, 5139.315, -37.04716,'Albert Quarksprocket WP1'),
(19271,2,-1741.421, 5139.315, -36.54716,'Albert Quarksprocket WP2'),
(19271,3,-1745.072, 5139.196, -36.11526,'Albert Quarksprocket WP3'),
(19271,4,-1749.072, 5140.196, -36.11526,'Albert Quarksprocket WP4'),
(19271,5,-1750.931, 5143.452, -35.98227,'Albert Quarksprocket WP5'), -- Intro
(19271,6,-1749.931, 5144.202, -36.48227,'Albert Quarksprocket WP6'),
(19271,7,-1749.181, 5144.952, -36.73227,'Albert Quarksprocket WP7'),
(19271,8,-1748.681, 5145.452, -36.73227,'Albert Quarksprocket WP8'),
(19271,9,-1747.681, 5144.952, -36.73227,'Albert Quarksprocket WP9'),
(19271,10,-1740.931, 5142.721, -37.01586,'Albert Quarksprocket WP10'), -- end
(19271,11,-1739.931, 5141.971, -37.01586,'Albert Quarksprocket WP11'),
(19271,12,-1740.726, 5142.045, -37.01049,'Albert Quarksprocket WP12'),
(19271,13,-1741.726, 5142.545, -37.01049,'Albert Quarksprocket WP13'),
(19271,14,-1747.726, 5145.545, -37.01049,'Albert Quarksprocket WP14'),
(19271,15,-1748.1, 5145.452, -36.73235,'Albert Quarksprocket WP15'),
(19271,16,-1748.6, 5145.952, -36.73235,'Albert Quarksprocket WP16'),
(19271,17,-1749.35, 5144.952, -36.73235,'Albert Quarksprocket WP17'),
(19271,18,-1749.85, 5143.702, -36.23235,'Albert Quarksprocket WP18'), -- Outro
(19271,19,-1749.56, 5143.69, -35.98226,'Albert Quarksprocket WP19'),
(19271,20,-1748.56, 5143.94, -36.48226,'Albert Quarksprocket WP20'),
(19271,21,-1747.31, 5144.44, -36.73226,'Albert Quarksprocket WP21'),
(19271,22,-1748.287, 5144.005, -36.37066,'Albert Quarksprocket WP22'),
(19271,23,-1747.037, 5144.505, -36.87066,'Albert Quarksprocket WP23'),
(19271,24,-1745.287, 5145.255, -36.87066,'Albert Quarksprocket WP24'),
(19271,25,-1741.787, 5142.005, -36.87066,'Albert Quarksprocket WP25'),
(19271,26,-1737.287, 5138.584, -37.30579,'Albert Quarksprocket WP26');-- end
DELETE FROM `game_event` WHERE `eventEntry` IN(65,66);
INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`, `world_event`, `announce`) VALUES
(65, '2008-01-02 15:55:00', '2020-12-31 06:00:00', 1440, 15, 0, 'Perry Gatner 4pm', 0, 2),
(66, '2008-01-02 19:55:00', '2020-12-31 06:00:00', 1440, 15, 0, 'Perry Gatner 8pm', 0, 2);
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry` IN(19270,19228,19271,15106,14990,22015,30567,15105,34949);
DELETE FROM `smart_scripts` WHERE `entryorguid`IN(19270,19228,19271,15106,14990,22015,30567,15105,34949) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1922800,1922801,1922802,1927000,1927100,1927101,1927102,1927103,1927104,1927105,1927106,1927107,1927108,1927109,1927110,1927111,1927112,1927113,1927114) AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(19270, 0, 0, 0, 68, 0, 100, 0, 65, 0, 0, 0, 80, 1927000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - On Event Start Run Timed action list'),
(19270, 0, 1, 0, 68, 0, 100, 0, 66, 0, 0, 0, 80, 1927000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - On Event Start Run Timed action list'),
(1927000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - Script - Say'),
(1927000, 9, 1, 0, 0, 0, 100, 0, 120000, 120000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - Script - Say'),
(1927000, 9, 2, 0, 0, 0, 100, 0, 120000, 120000, 0, 0, 12, 19228, 1, 900000, 0, 0, 0, 8, 0, 0, 0, -1747.617, 5126.938, -35.78802, 1.867502, 'Shattrath Saul - Script - Spawn Perry Gatner'),
(1927000, 9, 3, 0, 0, 0, 100, 0, 60000, 60000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Shattrath Saul - Script - Set Data 1 1 on Albert Quarksprocket'),
(19271, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 19271, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data 11 - Start WP'),
(19271, 0, 1, 2, 40, 0, 100, 0, 5, 19271, 0, 0, 54, 13000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP5 - Pause WP'),
(19271, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1.867502, 'Albert Quarksprocket - On Reached WP5 - Set Orientation'),
(19271, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 5000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP5 - Say line 1'),
(19271, 0, 4, 0, 52, 0, 100, 0, 0, 19271, 0, 0, 80, 1927104, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Text over line 1 - Run Script '),
(19271, 0, 5, 6, 40, 0, 100, 0, 10, 19271, 0, 0, 54, 229000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP10 - Stop WP'),
(19271, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP10 - Set Orientation'),
(19271, 0, 7, 0, 38, 0, 100, 0, 2, 2, 0, 0, 87, 1927102, 1927103, 1927113, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2.03774, 'Albert Quarksprocket - On Reached WP26 - Set Orientation'),
(19271, 0, 8, 9, 40, 0, 100, 0, 18, 19271, 0, 0, 54, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP18 - Pause WP'),
(19271, 0, 9, 10, 61, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1.867502, 'Albert Quarksprocket - On Reached WP18 - Set Orientation'),
(19271, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 14000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Reached WP18 - Say line 2'),
(19271, 0, 11, 0, 40, 0, 100, 0, 26, 19271, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 2.03774, 'Albert Quarksprocket - On Reached WP26 - Set Orientation'),
(19271, 0, 12, 0, 38, 0, 100, 0, 3, 3, 0, 0, 87, 1927100, 1927101, 1927111, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 3 3 - Run Random script'),
(19271, 0, 13, 0, 38, 0, 100, 0, 4, 4, 0, 0, 87, 1927105, 1927106, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 4 4 - Run Random script'),
(19271, 0, 14, 0, 38, 0, 100, 0, 5, 5, 0, 0, 87, 1927107, 1927108, 1927114, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 5 5 - Run Random script'),
(19271, 0, 15, 0, 38, 0, 100, 0, 6, 6, 0, 0, 87, 1927109, 1927110, 1927112, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - On Data set 5 5 - Run Random script'),
(1927100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 15, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 1 - Say Line 15 (Perry Gatner'),
(1927100, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 16, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 1 - Say Line 16 (Perry Gatner'),
(1927101, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 29, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 2 - Say Line 29 (Perry Gatner'),
(1927101, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 30, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 2 - Say Line 30 (Perry Gatner'),
(1927102, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 9, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 15 (Perry Gatner'),
(1927102, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 10, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 16 (Perry Gatner'),
(1927103, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 31, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 31 (Perry Gatner'),
(1927103, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 32, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 3 - Say Line 32 (Perry Gatner'),
(1927104, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Set Orientation'),
(1927104, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 5, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Play emote Oneshot_applause'),
(1927104, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 25, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Play emote Oneshot_point'),
(1927104, 9, 3, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 5, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Play emote Oneshot_applause'),
(1927104, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 4 - Set Data 1 1 on Perry Gatner'),
(1927105, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 5 - Say Line 1 (Perry Gatner'),
(1927105, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 5 - Say Line 2 (Perry Gatner'),
(1927106, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 33, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 6 - Say Line 33 (Perry Gatner'),
(1927106, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 34, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 6 - Say Line 34 (Perry Gatner'),
(1927107, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 24, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 7 - Say Line 24 (Perry Gatner'),
(1927107, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 25, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 7 - Say Line 25 (Perry Gatner'),
(1927108, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 35, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 8 - Say Line 35 (Perry Gatner'),
(1927108, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 36, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 8 - Say Line 36 (Perry Gatner'),
(1927109, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 18, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 9 - Say Line 24 (Perry Gatner'),
(1927109, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 19, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 9 - Say Line 25 (Perry Gatner'),
(1927110, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 37, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 10 - Say Line 35 (Perry Gatner'),
(1927110, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 38, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 10 - Say Line 36 (Perry Gatner'),
(1927111, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 39, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 11 - Say Line 39 (Perry Gatner'),
(1927111, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 40, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 11 - Say Line 40 (Perry Gatner'),
(1927112, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 41, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 12 - Say Line 41 (Perry Gatner'),
(1927112, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 42, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 12 - Say Line 42 (Perry Gatner'),
(1927113, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 43, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 13 - Say Line 42 (Perry Gatner'),
(1927113, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 44, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 13 - Say Line 43 (Perry Gatner'),
(1927114, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 45, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 14 - Say Line 44 (Perry Gatner'),
(1927114, 9, 1, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 46, 0, 0, 0, 0, 0, 19, 19228, 0, 0, 0, 0, 0, 0, 'Albert Quarksprocket - - Script 14 - Say Line 45 (Perry Gatner'),
(19228, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 19228, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Data Set 1 1 - Start WP'),
(19228, 0, 1, 2, 40, 0, 100, 0, 3, 19228, 0, 0, 54, 220000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP3 - Pause WP'),
(19228, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1922800, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP3 - Run Script 1'),
(19228, 0, 3, 0, 40, 0, 100, 0, 6, 19228, 0, 0, 41, 5000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP6 - Despawn'),
(19228, 0, 4, 0, 40, 0, 100, 0, 2, 19228, 0, 0, 80, 1922801, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP2 - Run Script 2'),
(19228, 0, 5, 0, 40, 0, 100, 0, 4, 19228, 0, 0, 80, 1922802, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - On Reached WP6 - Run Script 3'),
(1922800, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 1, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 4 4 on Albert Quarksprocket'),
(1922800, 9, 2, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 4, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 5, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 6, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 8, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 2 2 on Albert Quarksprocket'),
(1922800, 9, 9, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 10, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 11, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 12, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 13, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 14, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 15, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 3 3 on Albert Quarksprocket'),
(1922800, 9, 16, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 18756, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line 1 on Hilton Paris'),
(1922800, 9, 17, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 17, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 18, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 6, 6, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 6 6 on Albert Quarksprocket'),
(1922800, 9, 19, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 20, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 20, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 21, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 21, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 22, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 22, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 23, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 23, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 24, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 19271, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Set Data 5 5 on Albert Quarksprocket'),
(1922800, 9, 25, 0, 0, 0, 100, 0, 14000, 14000, 0, 0, 1, 26, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 26, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 27, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 27, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922800, 9, 38, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 28, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script - Say Line'),
(1922801, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 15106, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Frostwolf Emissary'),
(1922801, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 14990, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Defilers Emissary'),
(1922801, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 22015, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Eye of the Storm Envoy'),
(1922801, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 30567, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Strand of the Ancients Envoy'),
(1922801, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 15105, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Warsong Emissary'),
(1922801, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 34949, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 2 - Set Data 1 1 on Isle of Conquest Envoy'),
(1922802, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 15106, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Frostwolf Emissary'),
(1922802, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 14990, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Defilers Emissary'),
(1922802, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 22015, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Eye of the Storm Envoy'),
(1922802, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 30567, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Strand of the Ancients Envoy'),
(1922802, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 15105, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Warsong Emissary'),
(1922802, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 34949, 0, 0, 0, 0, 0, 0, 'Perry Gatner - Script 3 - Set Data 2 2 on Isle of Conquest Envoy'),
(15106, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostwolf Emissary - On Data Set 1 1 - Set Phase 2'),
(15106, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostwolf Emissary - On Data Set 2 2 - Set Phase 1'),
(15106, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frostwolf Emissary - OOC (Phase 2) - Play emote oneshot laugh'),
(14990, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Defilers Emissary - On Data Set 1 1 - Set Phase 2'),
(14990, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Defilers Emissary - On Data Set 2 2 - Set Phase 1'),
(14990, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Defilers Emissary - OOC (Phase 2) - Play emote oneshot laugh'),
(22015, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eye of the Storm Envoy - On Data Set 1 1 - Set Phase 2'),
(22015, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eye of the Storm Envoy - On Data Set 2 2 - Set Phase 1'),
(22015, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Eye of the Storm Envoy - OOC (Phase 2) - Play emote oneshot laugh'),
(30567, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Strand of the Ancients Envoy - On Data Set 1 1 - Set Phase 2'),
(30567, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Strand of the Ancients Envoy - On Data Set 2 2 - Set Phase 1'),
(30567, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Strand of the Ancients Envoy - OOC (Phase 2) - Play emote oneshot laugh'),
(15105, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warsong Emissary - On Data Set 1 1 - Set Phase 2'),
(15105, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warsong Emissary - On Data Set 2 2 - Set Phase 1'),
(15105, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warsong Emissary - OOC (Phase 2) - Play emote oneshot laugh'),
(34949, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Isle of Conquest Envoy - On Data Set 1 1 - Set Phase 2'),
(34949, 0, 1, 0, 38, 0, 100, 0, 2, 2, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Isle of Conquest Envoy - On Data Set 2 2 - Set Phase 1'),
(34949, 0, 2, 0, 1, 2, 100, 0, 14000, 21000, 7000, 21000, 5, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Isle of Conquest Envoy - OOC (Phase 2) - Play emote oneshot laugh');
@@ -0,0 +1,102 @@
DELETE FROM `creature_text` WHERE `entry` IN(17831,17955);
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
(17831, 0, 0, '$n, let''s go see if this plan will work. Come along, Buddy!', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14608),
(17831, 1, 0, 'Ok, let''s see about using those mushrooms you brought back to grow the bog lords a new food supply.', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14609),
(17831, 2, 0, 'Wait and see what happens!', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14615),
(17831, 3, 0, 'Oh Buddy, you big baby! Look, it''s working. It''s really working!! Now all I need to do is grow more of these mushrooms here and the bog lords will likely leave the sporelings alone!', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14610),
(17831, 4, 0, 'Oh, thank you, $n! You''ve made it possible to save both the sporelings from the bog lords, and the bog lords from our wrath.', 12, 0, 100, 0, 0, 0, 'Watcher Leesa''oh',14611),
(17955, 0, 0, 'The %s takes a piece of the mushroom tree and holds it to its ''nose''. Seemingly satisfied, it eats it!', 16, 0, 100, 36, 0, 0, 'Hungry Bog Lord',14612),
(17955, 1, 0, 'The %s uproots the rest of the mushroom tree and makes off with it.', 16, 0, 100, 36, 0, 0, 'Hungry Bog Lord',14613);
DELETE FROM `waypoints` WHERE `entry` IN(17831,17955,17953);
INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
(17831,1, -280.0389, 8304.785, 20.12167,'Watcher Leesa''oh '),
(17831,2, -276.2272, 8298.744, 20.00148,'Watcher Leesa''oh '),
(17831,3, -278.8585, 8289.577, 19.76397,'Watcher Leesa''oh '),
(17831,4, -280.1085, 8285.827, 19.01397,'Watcher Leesa''oh '),
(17831,5, -280.6085, 8283.827, 18.51397,'Watcher Leesa''oh '),
(17831,6, -281.8585, 8280.077, 18.01397,'Watcher Leesa''oh '),
(17831,7, -288.8013, 8259.563, 17.99014,'Watcher Leesa''oh '),
(17831,8, -292.6434, 8246.023, 18.64896,'Watcher Leesa''oh '),
(17831,9, -293.1434, 8240.273, 18.89896,'Watcher Leesa''oh '),
(17831,10, -293.4886, 8239.822, 19.07904,'Watcher Leesa''oh '),
(17831,11, -293.4886, 8238.322, 19.57904,'Watcher Leesa''oh '),
(17831,12, -293.7386, 8235.572, 20.32904,'Watcher Leesa''oh '),
(17831,13, -293.7386, 8233.572, 20.82904,'Watcher Leesa''oh '), -- event
(17831,14, -293.5977, 8234.545, 20.6902,'Watcher Leesa''oh '),
(17831,15, -293.5977, 8236.545, 19.9402,'Watcher Leesa''oh '),
(17831,16, -293.3477, 8238.295, 19.4402,'Watcher Leesa''oh '),
(17831,17, -293.0977, 8241.295, 18.9402,'Watcher Leesa''oh '),
(17831,18, -292.3477, 8250.045, 18.1902,'Watcher Leesa''oh '),
(17831,19, -291.7706, 8253.604, 18.16209,'Watcher Leesa''oh '),
(17831,20, -288.8718, 8267.246, 17.94799,'Watcher Leesa''oh '),
(17831,21, -283.1218, 8282.746, 18.44799,'Watcher Leesa''oh '),
(17831,22, -282.3718, 8284.746, 18.94799,'Watcher Leesa''oh '),
(17831,23, -281.6218, 8286.496, 19.44799,'Watcher Leesa''oh '),
(17831,24, -282.2319, 8284.964, 19.17534,'Watcher Leesa''oh '),
(17831,25, -281.4819, 8286.714, 19.42534,'Watcher Leesa''oh '),
(17831,26, -281.4819, 8287.214, 19.67534,'Watcher Leesa''oh '),
(17831,27, -277.4792, 8293.729, 20.06543,'Watcher Leesa''oh '),
(17831,28, -276.6099, 8299.607, 20.13173,'Watcher Leesa''oh '),
(17831,29, -280.3798, 8302.444, 20.07166,'Watcher Leesa''oh '),
(17831,30,-283.8611, 8302.739, 19.72713,'Watcher Leesa''oh '),
(17955,1, -350.6533, 8217.619, 23.96465,'Hungry Boglord'),
(17955,2, -343.4033, 8219.119, 23.71465,'Hungry Boglord'),
(17955,3, -332.9033, 8217.119, 23.46465,'Hungry Boglord'),
(17955,4, -330.9033, 8216.619, 22.96465,'Hungry Boglord'),
(17955,5, -330.5525, 8216.891, 22.75951,'Hungry Boglord'),
(17955,6, -323.0525, 8215.641, 23.00951,'Hungry Boglord'),
(17955,7, -315.3025, 8216.391, 23.50951,'Hungry Boglord'),
(17955,8, -306.3025, 8217.141, 22.75951,'Hungry Boglord'),
(17955,9, -303.5525, 8217.391, 22.25951,'Hungry Boglord'), -- eat
(17955,10, -270.5456, 8223.803, 21.73361,'Hungry Boglord'),
(17955,11, -270.1879, 8223.752, 21.80058,'Hungry Boglord'),
(17955,12, -269.6879, 8224.002, 21.55058,'Hungry Boglord'),
(17955,13, -267.1879, 8222.752, 21.05058,'Hungry Boglord'),
(17955,14, -264.1879, 8221.752, 20.55058,'Hungry Boglord'),
(17955,15, -251.7115, 8216.566, 20.36899,'Hungry Boglord'),
(17955,16, -245.7115, 8208.816, 21.11899,'Hungry Boglord'),
(17955,17, -241.9615, 8204.316, 21.61899,'Hungry Boglord'),
(17955,18, -235.9615, 8196.316, 21.11899,'Hungry Boglord'),
(17955,19, -235.5499, 8195.942, 21.19431,'Hungry Boglord'),
(17955,20, -232.5499, 8192.192, 20.94431,'Hungry Boglord'),
(17955,21, -226.0499, 8159.192, 21.19431,'Hungry Boglord'),
(17955,22, -226.1419, 8158.809, 21.23708,'Hungry Boglord'),
(17955,23, -223.8919, 8147.559, 20.73708,'Hungry Boglord'),
(17953,1, -223.8919, 8147.559, 20.73708,'Buddy');
UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(17831,17953,17955);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(17831,17953,17955) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1783100,1783101) AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(17831, 0, 0, 1, 20, 0, 100, 0, 9709, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Quest Reward - Store Target List'),
(17831, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1783101, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Quest Reward - Run Script'),
(17831, 0, 2, 3, 40, 0, 100, 0, 13, 17831, 0, 0, 54, 50000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Reached WP21 - Pause WP'),
(17831, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1783100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Reached WP13 - Run Script'),
(17831, 0, 4, 5, 40, 0, 100, 0, 31, 17831, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0.9250245, 'Watcher Leesa''oh - On Reached WP41 - Set Orientation'),
(17831, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 81, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - On Reached WP31 - Set NPC Flags'),
(17953, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 29, 0, 0, 0, 0, 0, 0, 19, 17831, 0, 0, 0, 0, 0, 0, 'Buddy - On Data Set - Follow Watcher Leesa''oh '),
(17953, 0, 1, 2, 1, 0, 100, 0, 0, 30000, 60000, 0, 5, 36, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - OOC - Play emote OneShotAttack1H'),
(17953, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 4, 643, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - OOC - Play Sound ID 643'),
(17953, 0, 3, 0, 25, 0, 100, 0, 0, 0, 0, 0, 89, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - On Reset Set Random Movement'),
(17953, 0, 4, 5, 38, 0, 100, 0, 2, 2, 0, 0, 29, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - On Data Set - Follow Watcher Leesa''oh '),
(17953, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 53, 0, 17953, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - OOC - Play Sound ID 643'),
(17953, 0, 6, 0, 40, 0, 100, 0, 1, 17953, 0, 0, 89, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Buddy - On Reached WP1 - Set Random Movement'),
(17955, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 53, 1, 17955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Boglord - On Just Summoned Start WP'),
(17955, 0, 1, 0, 40, 0, 100, 0, 9, 17955, 0, 0, 54, 11500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Boglord - On Reached WP10 Pause WP'),
(17955, 0, 2, 0, 40, 0, 100, 0, 23, 17955, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hungry Boglord - On Reached WP24 - Despawn'),
(1783100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 2'),
(1783100, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 32618, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Cast'),
(1783100, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 3'),
(1783100, 9, 3, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 50, 182073, 21, 0, 0, 0, 0, 8, 0, 0, 0, -293.1354, 8218.522, 22.26159, 2.757613, 'Watcher Leesa''oh - Script - Spawn Grown Mushroom'),
(1783100, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 12, 17955, 1, 30000, 0, 0, 0, 8, 0, 0, 0, -362.3764, 8215.58, 25.25911, 0.3794507, 'Watcher Leesa''oh - Script - Spawn Hungry Boglord'),
(1783100, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 17955, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 1 on Hungry Boglord'),
(1783100, 9, 6, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 17953, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Set Data 2 2 on Buddy'),
(1783100, 9, 7, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 4'),
(1783100, 9, 8, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 17955, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 2 on Hungry Boglord'),
(1783100, 9, 9, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script - Say Line 4'),
(1783101, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Set Npc Flags'),
(1783101, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 7000, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Say Line 1'),
(1783101, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 17953, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Set Data 1 1 on Buddy'),
(1783101, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 17831, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Watcher Leesa''oh - Script 2 - Start WP');
@@ -0,0 +1,70 @@
UPDATE `creature_text` SET `emote`=5 WHERE `entry`=19831 AND `groupid`=4 AND `id`=0;
UPDATE `creature_text` SET `emote`=1 WHERE `entry`=19831 AND `groupid`=0 AND `id`=0;
UPDATE `creature_text` SET `emote`=6 WHERE `entry`=19830 AND `groupid`=0 AND `id`=0;
UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=0 AND `id`=0;
UPDATE `creature_text` SET `emote`=5 WHERE `entry`=21504 AND `groupid`=1 AND `id`=0;
UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=2 AND `id`=0;
UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=3 AND `id`=0;
UPDATE `creature_text` SET `emote`=2 WHERE `entry`=18554 AND `groupid`=3 AND `id`=0;
UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=4 AND `id`=0;
UPDATE `creature_text` SET `emote`=1 WHERE `entry`=21504 AND `groupid`=5 AND `id`=0;
UPDATE `creature_text` SET `emote`=5, `sound`=7274 WHERE `entry`=21504 AND `groupid`=6 AND `id`=0;
UPDATE `creature_text` SET `emote`=25 WHERE `entry`=21504 AND `groupid`=7 AND `id`=0;
UPDATE `creature_text` SET `emote`=25 WHERE `entry`=18385 AND `groupid`=1 AND `id`=0;
UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry` IN(19466);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(19466) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1946600) AND `source_type`=9;
DELETE FROM `smart_scripts` WHERE `entryorguid`=1410 AND `source_type`=0 AND `id`=3;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5355 AND `source_type`=0 AND `id`=3;
DELETE FROM `smart_scripts` WHERE `entryorguid`=16769 AND `source_type`=0 AND `id`=17;
DELETE FROM `smart_scripts` WHERE `entryorguid`=21611 AND `source_type`=0 AND `id`=3;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(19466, 0, 0, 0, 1, 0, 100, 0, 0, 30000, 180000, 240000, 80, 1946600, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - OOC - Run Script'),
(1410, 0, 3, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Firewing Bloodwarder - On Agro - Say'),
(5355, 0, 3, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Firewing Defender - On Agro - Say'),
(16769, 0, 17, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Firewing Warlock - On Agro - Say'),
(21611, 0, 3, 0, 4, 0, 30, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Cabal SkirmisheR - On Agro - Say'),
(1946600, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 19467, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1 (Anchorite Karja)'),
(1946600, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 19468, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1 (Spymaster Thalodien)'),
(1946600, 9, 2, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1'),
(1946600, 9, 3, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 19469, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 1 (Magistrix Larynna)'),
(1946600, 9, 4, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19467, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2 (Anchorite Karja)'),
(1946600, 9, 5, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 19467, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 3 (Anchorite Karja)'),
(1946600, 9, 6, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19469, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2 (Magistrix Larynna)'),
(1946600, 9, 7, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 19468, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2 (Spymaster Thalodien)'),
(1946600, 9, 8, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 2'),
(1946600, 9, 9, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 19468, 0, 0, 0, 0, 0, 0, 'Exarch Orelis - Script - Say Line 3 (Spymaster Thalodien)');
DELETE FROM `creature_text` WHERE `entry` IN(19466,19468,19541,19467,19469,1410,5355,21661);
DELETE FROM `creature_text` WHERE `entry` =16769 AND `groupid`=1;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
(19466, 0, 0, 'Hold your tongue, knave! Do not dare use that tone with a priestess of the Light!', 12, 0, 100, 25, 0, 0, 'Exarch Orelis',16873),
(19466, 1, 0, 'Even you must admit that your information from defectors is outdated and unreliable. Let us make calculated attacks on these manaforges and gather what information we can.', 12, 0, 100, 5, 0, 0, 'Exarch Orelis',16890),
(19468, 0, 0, 'Look, sweetheart. No one''s talking about storming Tempest Keep ourselves, but when we see a target of opportunity we have to take it.', 12, 0, 100, 0, 0, 0, 'Spymaster Thalodien',16872),
(19468, 1, 0, '...and just look at where that got us!', 12, 0, 100, 0, 0, 0, 'Spymaster Thalodien',16889),
(19468, 2, 0, 'Finally some talk of action from the big guy!', 12, 0, 100, 1, 0, 0, 'Spymaster Thalodien',16891),
(19541, 0, 0, 'Good thing that we''re surrounded by neighbors with excess machine parts.', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',17119),
(19541, 0, 1, 'Maybe I should gather up some other agents and head out there after this shift?', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',17115),
(19541, 0, 2, 'Hmm, arcane annihilators are pretty tough. I wonder if Papa Wheeler knows what he''s asking for?', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',17116),
(19541, 0, 3, 'Last time someone went out to try to collect the bounty on Netherock, all we got back was a compressed layer of foolhardy adventurer!', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',19660),
(19541, 0, 4, 'Netherock?! That thing''ll squish you flat with one step of its massive foot! No thanks!', 12, 0, 100, 1, 0, 0, 'Netherstorm Agent',19659),
(19467, 0, 0, 'With all due respect, A''dal sent us here to investigate Kael''s activities, not mount a full-scaled attack.', 12, 0, 100, 0, 0, 0, 'Anchorite Karja',16870),
(19467, 1, 0, 'The magistrix will be happy to know I''m fluent in Thalassian. Your courtesy is not lost on me.', 12, 0, 100, 0, 0, 0, 'Anchorite Karja',16875),
(19467, 2, 0, 'Back to the topic... we should focus our attention on these manaforges. We need to learn what the enemy is doing with them and why.', 12, 0, 100, 0, 0, 0, 'Anchorite Karja',16876),
(19469, 0, 0, 'I''m surrounded by idiots!', 12, 10, 100, 5, 0, 0, 'Magistrix Larynna',16874),
(19469, 1, 0, 'We''ve told you all there is to know! Do you forget that many of us used to be trusted followers of Kael''thas?', 12, 0, 100, 22, 0, 0, 'Magistrix Larynna',16883),
(1410, 0, 0, 'You won''t escape alive!', 12, 0, 100, 0, 0, 0, 'Firewing Bloodwarder',16249),
(1410, 0, 1, 'I will have your energy and then your life!', 12, 0, 100, 0, 0, 0, 'Firewing Bloodwarder',16254),
(5355, 0, 2, 'You won''t escape alive!', 12, 0, 100, 0, 0, 0, 'Firewing Defender',16249),
(5355, 0, 3, 'You know too much!', 12, 0, 100, 0, 0, 0, 'Firewing Defender',16251),
(16769, 1, 0, 'For Kael''thas!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16252),
(16769, 1, 1, 'You won''t escape alive!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16249),
(16769, 1, 2, 'Kill them before they get away!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16250),
(16769, 1, 3, 'I will have your energy and then your life!', 12, 0, 100, 0, 0, 0, 'Firewing Warlock',16254),
(21661, 0, 0, '%s becomes enraged!', 16, 0, 100, 0, 0, 0, 'Cabal Skirmisher',10677),
(21661, 1, 0, 'The end comes for you!', 12, 0, 100, 0, 0, 0, 'Cabal Skirmisher',16800),
(21661, 1, 1, 'You will not escape us so easily!', 12, 0, 100, 0, 0, 0, 'Cabal Skirmisher',20165),
(21661, 1, 2, 'I shall be rewarded!', 12, 0, 100, 0, 0, 0, 'Cabal Skirmisher',16803);
+2
View File
@@ -106,6 +106,7 @@ int main(int argc, char** argv)
if (sRealmList->size() == 0)
{
TC_LOG_ERROR("server.authserver", "No valid realms specified.");
StopDB();
return 1;
}
@@ -114,6 +115,7 @@ int main(int argc, char** argv)
if (port < 0 || port > 0xFFFF)
{
TC_LOG_ERROR("server.authserver", "Specified port out of allowed range (1-65535)");
StopDB();
return 1;
}
+8 -6
View File
@@ -137,8 +137,10 @@ void RealmList::UpdateRealms(bool init)
uint32 realmId = fields[0].GetUInt32();
std::string name = fields[1].GetString();
boost::asio::ip::tcp::resolver::query externalAddressQuery(ip::tcp::v4(), fields[2].GetString(), "");
boost::asio::ip::tcp::resolver::iterator endPoint = _resolver->resolve(externalAddressQuery);
if (endPoint == end)
boost::system::error_code ec;
boost::asio::ip::tcp::resolver::iterator endPoint = _resolver->resolve(externalAddressQuery, ec);
if (endPoint == end || ec)
{
TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[2].GetString().c_str());
return;
@@ -147,8 +149,8 @@ void RealmList::UpdateRealms(bool init)
ip::address externalAddress = (*endPoint).endpoint().address();
boost::asio::ip::tcp::resolver::query localAddressQuery(ip::tcp::v4(), fields[3].GetString(), "");
endPoint = _resolver->resolve(localAddressQuery);
if (endPoint == end)
endPoint = _resolver->resolve(localAddressQuery, ec);
if (endPoint == end || ec)
{
TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[3].GetString().c_str());
return;
@@ -157,8 +159,8 @@ void RealmList::UpdateRealms(bool init)
ip::address localAddress = (*endPoint).endpoint().address();
boost::asio::ip::tcp::resolver::query localSubmaskQuery(ip::tcp::v4(), fields[4].GetString(), "");
endPoint = _resolver->resolve(localSubmaskQuery);
if (endPoint == end)
endPoint = _resolver->resolve(localSubmaskQuery, ec);
if (endPoint == end || ec)
{
TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[4].GetString().c_str());
return;
+36 -48
View File
@@ -21,6 +21,7 @@
#include "AuthCodes.h"
#include "Database/DatabaseEnv.h"
#include "SHA1.h"
#include "TOTP.h"
#include "openssl/crypto.h"
#include "Configuration/Config.h"
#include "RealmList.h"
@@ -52,7 +53,6 @@ enum eStatus
typedef struct AUTH_LOGON_CHALLENGE_C
{
uint8 cmd;
uint8 error;
uint16 size;
uint8 gamename[4];
@@ -71,7 +71,6 @@ typedef struct AUTH_LOGON_CHALLENGE_C
typedef struct AUTH_LOGON_PROOF_C
{
uint8 cmd;
uint8 A[32];
uint8 M1[20];
uint8 crc_hash[20];
@@ -99,7 +98,6 @@ typedef struct AUTH_LOGON_PROOF_S_OLD
typedef struct AUTH_RECONNECT_PROOF_C
{
uint8 cmd;
uint8 R1[16];
uint8 R2[20];
uint8 R3[20];
@@ -114,10 +112,10 @@ enum class BufferSizes : uint32
SRP_6_S = 0x20,
};
#define REALM_LIST_PACKET_SIZE 5
#define XFER_ACCEPT_SIZE 1
#define XFER_RESUME_SIZE 9
#define XFER_CANCEL_SIZE 1
#define REALM_LIST_PACKET_SIZE 4
#define XFER_ACCEPT_SIZE 0
#define XFER_RESUME_SIZE 8
#define XFER_CANCEL_SIZE 0
std::unordered_map<uint8, AuthHandler> AuthSession::InitHandlers()
{
@@ -137,48 +135,43 @@ std::unordered_map<uint8, AuthHandler> AuthSession::InitHandlers()
std::unordered_map<uint8, AuthHandler> const Handlers = AuthSession::InitHandlers();
void AuthSession::ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes)
void AuthSession::ReadHeaderHandler()
{
if (!error && transferedBytes == 1)
uint8 cmd = GetHeaderBuffer()[0];
auto itr = Handlers.find(cmd);
if (itr != Handlers.end())
{
uint8 cmd = GetReadBuffer()[0];
auto itr = Handlers.find(cmd);
if (itr != Handlers.end())
// Handle dynamic size packet
if (cmd == AUTH_LOGON_CHALLENGE || cmd == AUTH_RECONNECT_CHALLENGE)
{
// Handle dynamic size packet
if (cmd == AUTH_LOGON_CHALLENGE || cmd == AUTH_RECONNECT_CHALLENGE)
{
ReadData(sizeof(uint8) + sizeof(uint16), sizeof(cmd)); //error + size
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer());
ReadData(sizeof(uint8) + sizeof(uint16)); //error + size
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetDataBuffer());
AsyncReadData(challenge->size, sizeof(uint8) + sizeof(uint8) + sizeof(uint16)); // cmd + error + size
}
else
AsyncReadData(itr->second.packetSize, sizeof(uint8));
AsyncReadData(challenge->size);
}
else
AsyncReadData(itr->second.packetSize);
}
else
CloseSocket();
}
void AuthSession::ReadDataHandler(boost::system::error_code error, size_t transferedBytes)
void AuthSession::ReadDataHandler()
{
if (!error && transferedBytes > 0)
if (!(*this.*Handlers.at(GetHeaderBuffer()[0]).handler)())
{
if (!(*this.*Handlers.at(GetReadBuffer()[0]).handler)())
{
CloseSocket();
return;
}
AsyncReadHeader();
}
else
CloseSocket();
return;
}
AsyncReadHeader();
}
void AuthSession::AsyncWrite(ByteBuffer& packet)
{
if (!IsOpen())
return;
std::lock_guard<std::mutex> guard(_writeLock);
bool needsWriteStart = _writeQueue.empty();
@@ -191,7 +184,7 @@ void AuthSession::AsyncWrite(ByteBuffer& packet)
bool AuthSession::HandleLogonChallenge()
{
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer());
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetDataBuffer());
//TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size);
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I);
@@ -412,7 +405,7 @@ bool AuthSession::HandleLogonProof()
TC_LOG_DEBUG("server.authserver", "Entering _HandleLogonProof");
// Read the packet
sAuthLogonProof_C *logonProof = reinterpret_cast<sAuthLogonProof_C*>(GetReadBuffer());
sAuthLogonProof_C *logonProof = reinterpret_cast<sAuthLogonProof_C*>(GetDataBuffer());
// If the client has no valid version
if (_expversion == NO_VALID_EXP_FLAG)
@@ -519,17 +512,12 @@ bool AuthSession::HandleLogonProof()
// Check auth token
if ((logonProof->securityFlags & 0x04) || !_tokenKey.empty())
{
// TODO To be fixed
/*
uint8 size;
socket().recv((char*)&size, 1);
char* token = new char[size + 1];
token[size] = '\0';
socket().recv(token, size);
unsigned int validToken = TOTP::GenerateToken(_tokenKey.c_str());
unsigned int incomingToken = atoi(token);
delete[] token;
ReadData(1);
uint8 size = *(GetDataBuffer() + sizeof(sAuthLogonProof_C));
ReadData(size);
std::string token(reinterpret_cast<char*>(GetDataBuffer() + sizeof(sAuthLogonProof_C) + sizeof(size)), size);
uint32 validToken = TOTP::GenerateToken(_tokenKey.c_str());
uint32 incomingToken = atoi(token.c_str());
if (validToken != incomingToken)
{
ByteBuffer packet;
@@ -539,7 +527,7 @@ bool AuthSession::HandleLogonProof()
packet << uint8(0);
AsyncWrite(packet);
return false;
}*/
}
}
ByteBuffer packet;
@@ -647,7 +635,7 @@ bool AuthSession::HandleLogonProof()
bool AuthSession::HandleReconnectChallenge()
{
TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectChallenge");
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetReadBuffer());
sAuthLogonChallenge_C* challenge = reinterpret_cast<sAuthLogonChallenge_C*>(GetDataBuffer());
//TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size);
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I);
@@ -698,7 +686,7 @@ bool AuthSession::HandleReconnectChallenge()
bool AuthSession::HandleReconnectProof()
{
TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectProof");
sAuthReconnectProof_C *reconnectProof = reinterpret_cast<sAuthReconnectProof_C*>(GetReadBuffer());
sAuthReconnectProof_C *reconnectProof = reinterpret_cast<sAuthReconnectProof_C*>(GetDataBuffer());
if (_login.empty() || !_reconnectProof.GetNumBytes() || !K.GetNumBytes())
return false;
+4 -3
View File
@@ -37,7 +37,8 @@ class AuthSession : public Socket<AuthSession, ByteBuffer>
public:
static std::unordered_map<uint8, AuthHandler> InitHandlers();
AuthSession(tcp::socket&& socket) : Socket(std::move(socket), 1)
AuthSession(tcp::socket&& socket) : Socket(std::move(socket), 1),
_isAuthenticated(false), _build(0), _expversion(0), _accountSecurityLevel(SEC_PLAYER)
{
N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
g.SetDword(7);
@@ -51,8 +52,8 @@ public:
void AsyncWrite(ByteBuffer& packet);
protected:
void ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes) override;
void ReadDataHandler(boost::system::error_code error, size_t transferedBytes) override;
void ReadHeaderHandler() override;
void ReadDataHandler() override;
private:
bool HandleLogonChallenge();
@@ -18,8 +18,9 @@
#ifndef __BATTLENETBITSTREAM_H__
#define __BATTLENETBITSTREAM_H__
#include "ByteConverter.h"
#include "Common.h"
#include "ByteConverter.h"
#include "MessageBuffer.h"
#include <exception>
#include <vector>
#include <type_traits>
@@ -63,6 +64,10 @@ namespace Battlenet
_buffer.resize(length, 0);
}
BitStream(MessageBuffer&& buffer) : _buffer(buffer.Move()), _numBits(_buffer.size() * 8), _readPos(0), _writePos(0)
{
}
BitStream() : _numBits(0), _readPos(0), _writePos(0)
{
_buffer.reserve(0x1000);
@@ -538,17 +538,10 @@ bool Battlenet::Session::HandleRealmJoinRequest(PacketHeader& header, BitStream&
return true;
}
void Battlenet::Session::ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes)
void Battlenet::Session::ReadDataHandler()
{
if (error)
{
CloseSocket();
return;
}
BitStream packet(transferedBytes);
std::memcpy(packet.GetBuffer(), GetReadBuffer(), transferedBytes);
_crypt.DecryptRecv(packet.GetBuffer(), transferedBytes);
BitStream packet(MoveData());
_crypt.DecryptRecv(packet.GetBuffer(), packet.GetSize());
while (!packet.IsRead())
{
@@ -589,17 +582,23 @@ void Battlenet::Session::ReadHeaderHandler(boost::system::error_code error, size
}
}
AsyncReadHeader();
AsyncReadData(size_t(BufferSizes::Read));
}
void Battlenet::Session::Start()
{
TC_LOG_TRACE("server.battlenet", "Battlenet::Session::Start");
AsyncReadHeader();
AsyncReadData(size_t(BufferSizes::Read));
}
void Battlenet::Session::AsyncWrite(ServerPacket* packet)
{
if (!IsOpen())
{
delete packet;
return;
}
TC_LOG_TRACE("server.battlenet", "Battlenet::Session::AsyncWrite %s", packet->ToString().c_str());
packet->Write();
@@ -79,9 +79,11 @@ namespace Battlenet
void AsyncWrite(ServerPacket* packet);
bool IsDataReady() const override { return GetDataSize() > 0; }
protected:
void ReadHeaderHandler(boost::system::error_code error, size_t transferedBytes) override;
void ReadDataHandler(boost::system::error_code /*error*/, size_t /*transferedBytes*/) override { }
void ReadHeaderHandler() override { }
void ReadDataHandler() override;
private:
void _SetVSFields(std::string const& rI);
+12 -12
View File
@@ -53,7 +53,7 @@ namespace VMAP
class ManagedModel
{
public:
ManagedModel() : iModel(0), iRefCount(0) { }
ManagedModel() : iModel(nullptr), iRefCount(0) { }
void setModel(WorldModel* model) { iModel = model; }
WorldModel* getModel() { return iModel; }
void incRefCount() { ++iRefCount; }
@@ -86,32 +86,32 @@ namespace VMAP
VMapManager2();
~VMapManager2(void);
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y);
int loadMap(const char* pBasePath, unsigned int mapId, int x, int y) override;
void unloadMap(unsigned int mapId, int x, int y);
void unloadMap(unsigned int mapId);
void unloadMap(unsigned int mapId, int x, int y) override;
void unloadMap(unsigned int mapId) override;
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) ;
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) override ;
/**
fill the hit pos and return true, if an object was hit
*/
bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist);
float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist);
bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist) override;
float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist) override;
bool processCommand(char* /*command*/) { return false; } // for debug and extensions
bool processCommand(char* /*command*/) override { return false; } // for debug and extensions
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const;
bool getAreaInfo(unsigned int pMapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const override;
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type) const override;
WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O
virtual std::string getDirFileName(unsigned int mapId, int /*x*/, int /*y*/) const
virtual std::string getDirFileName(unsigned int mapId, int /*x*/, int /*y*/) const override
{
return getMapFileName(mapId);
}
virtual bool existsMap(const char* basePath, unsigned int mapId, int x, int y);
virtual bool existsMap(const char* basePath, unsigned int mapId, int x, int y) override;
public:
void getInstanceMapTree(InstanceTreeMap &instanceMapTree);
};
+1 -1
View File
@@ -31,7 +31,7 @@ namespace VMAP
struct LocationInfo
{
LocationInfo(): hitInstance(0), hitModel(0), ground_Z(-G3D::inf()) { }
LocationInfo(): hitInstance(nullptr), hitModel(nullptr), ground_Z(-G3D::inf()) { }
const ModelInstance* hitInstance;
const GroupModel* hitModel;
float ground_Z;
+2 -2
View File
@@ -63,9 +63,9 @@ namespace VMAP
class ModelInstance: public ModelSpawn
{
public:
ModelInstance(): iInvScale(0.0f), iModel(0) { }
ModelInstance(): iInvScale(0.0f), iModel(nullptr) { }
ModelInstance(const ModelSpawn &spawn, WorldModel* model);
void setUnloaded() { iModel = 0; }
void setUnloaded() { iModel = nullptr; }
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool pStopAtFirstHit) const;
void intersectPoint(const G3D::Vector3& p, AreaInfo &info) const;
bool GetLocationInfo(const G3D::Vector3& p, LocationInfo &info) const;
+4 -4
View File
@@ -108,7 +108,7 @@ namespace VMAP
iFlags = new uint8[width*height];
}
WmoLiquid::WmoLiquid(const WmoLiquid &other): iHeight(0), iFlags(0)
WmoLiquid::WmoLiquid(const WmoLiquid &other): iHeight(nullptr), iFlags(nullptr)
{
*this = other; // use assignment operator...
}
@@ -135,14 +135,14 @@ namespace VMAP
memcpy(iHeight, other.iHeight, (iTilesX+1)*(iTilesY+1)*sizeof(float));
}
else
iHeight = 0;
iHeight = nullptr;
if (other.iFlags)
{
iFlags = new uint8[iTilesX * iTilesY];
memcpy(iFlags, other.iFlags, iTilesX * iTilesY);
}
else
iFlags = 0;
iFlags = nullptr;
return *this;
}
@@ -254,7 +254,7 @@ namespace VMAP
GroupModel::GroupModel(const GroupModel &other):
iBound(other.iBound), iMogpFlags(other.iMogpFlags), iGroupWMOID(other.iGroupWMOID),
vertices(other.vertices), triangles(other.triangles), meshTree(other.meshTree), iLiquid(0)
vertices(other.vertices), triangles(other.triangles), meshTree(other.meshTree), iLiquid(nullptr)
{
if (other.iLiquid)
iLiquid = new WmoLiquid(*other.iLiquid);
+20 -20
View File
@@ -30,7 +30,7 @@ class AggressorAI : public CreatureAI
public:
explicit AggressorAI(Creature* c) : CreatureAI(c) { }
void UpdateAI(uint32);
void UpdateAI(uint32) override;
static int Permissible(const Creature*);
};
@@ -41,12 +41,12 @@ class CombatAI : public CreatureAI
public:
explicit CombatAI(Creature* c) : CreatureAI(c) { }
void InitializeAI();
void Reset();
void EnterCombat(Unit* who);
void JustDied(Unit* killer);
void UpdateAI(uint32 diff);
void SpellInterrupted(uint32 spellId, uint32 unTimeMs);
void InitializeAI() override;
void Reset() override;
void EnterCombat(Unit* who) override;
void JustDied(Unit* killer) override;
void UpdateAI(uint32 diff) override;
void SpellInterrupted(uint32 spellId, uint32 unTimeMs) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -59,10 +59,10 @@ class CasterAI : public CombatAI
{
public:
explicit CasterAI(Creature* c) : CombatAI(c) { m_attackDist = MELEE_RANGE; }
void InitializeAI();
void AttackStart(Unit* victim) { AttackStartCaster(victim, m_attackDist); }
void UpdateAI(uint32 diff);
void EnterCombat(Unit* /*who*/);
void InitializeAI() override;
void AttackStart(Unit* victim) override { AttackStartCaster(victim, m_attackDist); }
void UpdateAI(uint32 diff) override;
void EnterCombat(Unit* /*who*/) override;
private:
float m_attackDist;
};
@@ -71,8 +71,8 @@ struct ArcherAI : public CreatureAI
{
public:
explicit ArcherAI(Creature* c);
void AttackStart(Unit* who);
void UpdateAI(uint32 diff);
void AttackStart(Unit* who) override;
void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -84,9 +84,9 @@ struct TurretAI : public CreatureAI
{
public:
explicit TurretAI(Creature* c);
bool CanAIAttack(Unit const* who) const;
void AttackStart(Unit* who);
void UpdateAI(uint32 diff);
bool CanAIAttack(Unit const* who) const override;
void AttackStart(Unit* who) override;
void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
@@ -102,10 +102,10 @@ struct VehicleAI : public CreatureAI
public:
explicit VehicleAI(Creature* creature);
void UpdateAI(uint32 diff);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void OnCharmed(bool apply);
void UpdateAI(uint32 diff) override;
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit*) override { }
void OnCharmed(bool apply) override;
static int Permissible(Creature const* /*creature*/) { return PERMIT_BASE_NO; }
+1 -1
View File
@@ -68,7 +68,7 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
void UpdateAI(uint32 /*diff*/) { }
void UpdateAI(uint32 /*diff*/) override { }
static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};
+3 -3
View File
@@ -29,10 +29,10 @@ class GuardAI : public ScriptedAI
explicit GuardAI(Creature* creature);
static int Permissible(Creature const* creature);
bool CanSeeAlways(WorldObject const* obj);
bool CanSeeAlways(WorldObject const* obj) override;
void EnterEvadeMode();
void JustDied(Unit* killer);
void EnterEvadeMode() override;
void JustDied(Unit* killer) override;
};
#endif
+1 -1
View File
@@ -75,5 +75,5 @@ void CritterAI::EnterEvadeMode()
void TriggerAI::IsSummonedBy(Unit* summoner)
{
if (me->m_spells[0])
me->CastSpell(me, me->m_spells[0], false, 0, 0, summoner->GetGUID());
me->CastSpell(me, me->m_spells[0], false, nullptr, nullptr, summoner->GetGUID());
}
+17 -17
View File
@@ -26,9 +26,9 @@ class PassiveAI : public CreatureAI
public:
explicit PassiveAI(Creature* c);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void UpdateAI(uint32);
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit*) override { }
void UpdateAI(uint32) override;
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -38,13 +38,13 @@ class PossessedAI : public CreatureAI
public:
explicit PossessedAI(Creature* c);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit* target);
void UpdateAI(uint32);
void EnterEvadeMode() { }
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit* target) override;
void UpdateAI(uint32) override;
void EnterEvadeMode() override { }
void JustDied(Unit*);
void KilledUnit(Unit* victim);
void JustDied(Unit*) override;
void KilledUnit(Unit* victim) override;
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -54,11 +54,11 @@ class NullCreatureAI : public CreatureAI
public:
explicit NullCreatureAI(Creature* c);
void MoveInLineOfSight(Unit*) { }
void AttackStart(Unit*) { }
void UpdateAI(uint32) { }
void EnterEvadeMode() { }
void OnCharmed(bool /*apply*/) { }
void MoveInLineOfSight(Unit*) override { }
void AttackStart(Unit*) override { }
void UpdateAI(uint32) override { }
void EnterEvadeMode() override { }
void OnCharmed(bool /*apply*/) override { }
static int Permissible(const Creature*) { return PERMIT_BASE_IDLE; }
};
@@ -68,15 +68,15 @@ class CritterAI : public PassiveAI
public:
explicit CritterAI(Creature* c) : PassiveAI(c) { }
void DamageTaken(Unit* done_by, uint32& /*damage*/);
void EnterEvadeMode();
void DamageTaken(Unit* done_by, uint32& /*damage*/) override;
void EnterEvadeMode() override;
};
class TriggerAI : public NullCreatureAI
{
public:
explicit TriggerAI(Creature* c) : NullCreatureAI(c) { }
void IsSummonedBy(Unit* summoner);
void IsSummonedBy(Unit* summoner) override;
};
#endif
-2
View File
@@ -246,8 +246,6 @@ void PetAI::UpdateAI(uint32 diff)
me->SendUpdateToPlayer(owner->ToPlayer());
}
me->AddCreatureSpellCooldown(spell->m_spellInfo->Id);
spell->prepare(&targets);
}
+10 -10
View File
@@ -31,23 +31,23 @@ class PetAI : public CreatureAI
explicit PetAI(Creature* c);
void UpdateAI(uint32);
void UpdateAI(uint32) override;
static int Permissible(const Creature*);
void KilledUnit(Unit* /*victim*/);
void AttackStart(Unit* target);
void MovementInform(uint32 moveType, uint32 data);
void OwnerAttackedBy(Unit* attacker);
void OwnerAttacked(Unit* target);
void AttackedBy(Unit* attacker);
void ReceiveEmote(Player* player, uint32 textEmote);
void KilledUnit(Unit* /*victim*/) override;
void AttackStart(Unit* target) override;
void MovementInform(uint32 moveType, uint32 data) override;
void OwnerAttackedBy(Unit* attacker) override;
void OwnerAttacked(Unit* target) override;
void AttackedBy(Unit* attacker) override;
void ReceiveEmote(Player* player, uint32 textEmote) override;
// The following aren't used by the PetAI but need to be defined to override
// default CreatureAI functions which interfere with the PetAI
//
void MoveInLineOfSight(Unit* /*who*/) { } // CreatureAI interferes with returning pets
void MoveInLineOfSight(Unit* /*who*/) override { } // CreatureAI interferes with returning pets
void MoveInLineOfSight_Safe(Unit* /*who*/) { } // CreatureAI interferes with returning pets
void EnterEvadeMode() { } // For fleeing, pets don't use this type of Evade mechanic
void EnterEvadeMode() override { } // For fleeing, pets don't use this type of Evade mechanic
private:
bool _isVisible(Unit*) const;
+2 -2
View File
@@ -29,8 +29,8 @@ class ReactorAI : public CreatureAI
explicit ReactorAI(Creature* c) : CreatureAI(c) { }
void MoveInLineOfSight(Unit*) { }
void UpdateAI(uint32 diff);
void MoveInLineOfSight(Unit*) override { }
void UpdateAI(uint32 diff) override;
static int Permissible(const Creature*);
};
+4 -4
View File
@@ -31,11 +31,11 @@ class TotemAI : public CreatureAI
explicit TotemAI(Creature* c);
void MoveInLineOfSight(Unit* who);
void AttackStart(Unit* victim);
void EnterEvadeMode();
void MoveInLineOfSight(Unit* who) override;
void AttackStart(Unit* victim) override;
void EnterEvadeMode() override;
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
static int Permissible(Creature const* creature);
private:
+2 -2
View File
@@ -275,13 +275,13 @@ class PlayerAI : public UnitAI
public:
explicit PlayerAI(Player* player) : UnitAI((Unit*)player), me(player) { }
void OnCharmed(bool apply);
void OnCharmed(bool apply) override;
};
class SimpleCharmedAI : public PlayerAI
{
public:
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
SimpleCharmedAI(Player* player): PlayerAI(player) { }
};
+1 -1
View File
@@ -127,7 +127,7 @@ class CreatureAI : public UnitAI
// Called at waypoint reached or point movement finished
virtual void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
void OnCharmed(bool apply);
void OnCharmed(bool apply) override;
// Called at reaching home after evade
virtual void JustReachedHome() { }
+4 -4
View File
@@ -34,9 +34,9 @@ struct CreatureAIFactory : public SelectableAI
{
CreatureAIFactory(const char* name) : SelectableAI(name) { }
CreatureAI* Create(void*) const;
CreatureAI* Create(void*) const override;
int Permit(const Creature* c) const { return REAL_AI::Permissible(c); }
int Permit(const Creature* c) const override { return REAL_AI::Permissible(c); }
};
template<class REAL_AI>
@@ -61,9 +61,9 @@ struct GameObjectAIFactory : public SelectableGameObjectAI
{
GameObjectAIFactory(const char* name) : SelectableGameObjectAI(name) { }
GameObjectAI* Create(void*) const;
GameObjectAI* Create(void*) const override;
int Permit(const GameObject* g) const { return REAL_GO_AI::Permissible(g); }
int Permit(const GameObject* g) const override { return REAL_GO_AI::Permissible(g); }
};
template<class REAL_GO_AI>
@@ -25,6 +25,15 @@
#include "InstanceScript.h"
#define CAST_AI(a, b) (dynamic_cast<a*>(b))
#define ENSURE_AI(a,b) (EnsureAI<a>(b))
template<class T, class U>
T* EnsureAI(U* ai)
{
T* cast_ai = dynamic_cast<T*>(ai);
ASSERT(cast_ai);
return cast_ai;
};
class InstanceScript;
@@ -141,31 +150,31 @@ struct ScriptedAI : public CreatureAI
void AttackStartNoMove(Unit* target);
// Called at any Damage from any attacker (before damage apply)
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) { }
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) override { }
//Called at World update tick
virtual void UpdateAI(uint32 diff);
virtual void UpdateAI(uint32 diff) override;
//Called at creature death
void JustDied(Unit* /*killer*/) { }
void JustDied(Unit* /*killer*/) override { }
//Called at creature killing another unit
void KilledUnit(Unit* /*victim*/) { }
void KilledUnit(Unit* /*victim*/) override { }
// Called when the creature summon successfully other creature
void JustSummoned(Creature* /*summon*/) { }
void JustSummoned(Creature* /*summon*/) override { }
// Called when a summoned creature is despawned
void SummonedCreatureDespawn(Creature* /*summon*/) { }
void SummonedCreatureDespawn(Creature* /*summon*/) override { }
// Called when hit by a spell
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) { }
void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) override { }
// Called when spell hits a target
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) { }
void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) override { }
//Called at waypoint reached or PointMovement end
void MovementInform(uint32 /*type*/, uint32 /*id*/) { }
void MovementInform(uint32 /*type*/, uint32 /*id*/) override { }
// Called when AI is temporarily replaced or put back when possess is applied or removed
void OnPossess(bool /*apply*/) { }
@@ -185,13 +194,13 @@ struct ScriptedAI : public CreatureAI
// *************
//Called at creature reset either by death or evade
void Reset() { }
void Reset() override { }
//Called at creature aggro either by MoveInLOS or Attack Start
void EnterCombat(Unit* /*victim*/) { }
void EnterCombat(Unit* /*victim*/) override { }
// Called before EnterCombat even before the creature is in combat.
void AttackStart(Unit* /*target*/);
void AttackStart(Unit* /*target*/) override;
// *************
//AI Helper Functions
@@ -339,10 +348,10 @@ class BossAI : public ScriptedAI
InstanceScript* const instance;
BossBoundaryMap const* GetBoundary() const { return _boundary; }
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
void JustSummoned(Creature* summon) override;
void SummonedCreatureDespawn(Creature* summon) override;
virtual void UpdateAI(uint32 diff);
virtual void UpdateAI(uint32 diff) override;
// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
@@ -350,10 +359,10 @@ class BossAI : public ScriptedAI
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/) { }
void Reset() { _Reset(); }
void EnterCombat(Unit* /*who*/) { _EnterCombat(); }
void JustDied(Unit* /*killer*/) { _JustDied(); }
void JustReachedHome() { _JustReachedHome(); }
void Reset() override { _Reset(); }
void EnterCombat(Unit* /*who*/) override { _EnterCombat(); }
void JustDied(Unit* /*killer*/) override { _JustDied(); }
void JustReachedHome() override { _JustReachedHome(); }
protected:
void _Reset();
@@ -388,10 +397,10 @@ class WorldBossAI : public ScriptedAI
WorldBossAI(Creature* creature);
virtual ~WorldBossAI() { }
void JustSummoned(Creature* summon);
void SummonedCreatureDespawn(Creature* summon);
void JustSummoned(Creature* summon) override;
void SummonedCreatureDespawn(Creature* summon) override;
virtual void UpdateAI(uint32 diff);
virtual void UpdateAI(uint32 diff) override;
// Hook used to execute events scheduled into EventMap without the need
// to override UpdateAI
@@ -399,9 +408,9 @@ class WorldBossAI : public ScriptedAI
// is supposed to run more than once
virtual void ExecuteEvent(uint32 /*eventId*/) { }
void Reset() { _Reset(); }
void EnterCombat(Unit* /*who*/) { _EnterCombat(); }
void JustDied(Unit* /*killer*/) { _JustDied(); }
void Reset() override { _Reset(); }
void EnterCombat(Unit* /*who*/) override { _EnterCombat(); }
void JustDied(Unit* /*killer*/) override { _JustDied(); }
protected:
void _Reset();
@@ -56,22 +56,22 @@ struct npc_escortAI : public ScriptedAI
~npc_escortAI() { }
// CreatureAI functions
void AttackStart(Unit* who);
void AttackStart(Unit* who) override;
void MoveInLineOfSight(Unit* who);
void MoveInLineOfSight(Unit* who) override;
void JustDied(Unit*);
void JustDied(Unit*) override;
void JustRespawned();
void JustRespawned() override;
void ReturnToLastPoint();
void EnterEvadeMode();
void EnterEvadeMode() override;
void UpdateAI(uint32 diff); //the "internal" update, calls UpdateEscortAI()
void UpdateAI(uint32 diff) override; //the "internal" update, calls UpdateEscortAI()
virtual void UpdateEscortAI(uint32 const diff); //used when it's needed to add code in update (abilities, scripted events, etc)
void MovementInform(uint32, uint32);
void MovementInform(uint32, uint32) override;
// EscortAI functions
void AddWaypoint(uint32 id, float x, float y, float z, uint32 waitTime = 0); // waitTime is in ms
@@ -94,7 +94,7 @@ struct npc_escortAI : public ScriptedAI
void SetEscortPaused(bool on);
bool HasEscortState(uint32 escortState) { return (m_uiEscortState & escortState) != 0; }
virtual bool IsEscorted() { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
virtual bool IsEscorted() override { return (m_uiEscortState & STATE_ESCORT_ESCORTING); }
void SetMaxPlayerDistance(float newMax) { MaxPlayerDistance = newMax; }
float GetMaxPlayerDistance() { return MaxPlayerDistance; }
@@ -40,19 +40,19 @@ class FollowerAI : public ScriptedAI
//virtual void WaypointReached(uint32 uiPointId) = 0;
void MovementInform(uint32 motionType, uint32 pointId);
void MovementInform(uint32 motionType, uint32 pointId) override;
void AttackStart(Unit*);
void AttackStart(Unit*) override;
void MoveInLineOfSight(Unit*);
void MoveInLineOfSight(Unit*) override;
void EnterEvadeMode();
void EnterEvadeMode() override;
void JustDied(Unit*);
void JustDied(Unit*) override;
void JustRespawned();
void JustRespawned() override;
void UpdateAI(uint32); //the "internal" update, calls UpdateFollowerAI()
void UpdateAI(uint32) override; //the "internal" update, calls UpdateFollowerAI()
virtual void UpdateFollowerAI(uint32); //used when it's needed to add code in update (abilities, scripted events, etc)
void StartFollow(Player* player, uint32 factionForFollower = 0, const Quest* quest = NULL);
+1 -1
View File
@@ -931,7 +931,7 @@ class SmartTrigger : public AreaTriggerScript
SmartTrigger() : AreaTriggerScript("SmartTrigger") { }
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger)
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) override
{
if (!player->IsAlive())
return false;
+50 -50
View File
@@ -70,94 +70,94 @@ class SmartAI : public CreatureAI
bool IsEscortInvokerInRange();
// Called when creature is spawned or respawned
void JustRespawned();
void JustRespawned() override;
// Called at reaching home after evade, InitializeAI(), EnterEvadeMode() for resetting variables
void JustReachedHome();
void JustReachedHome() override;
// Called for reaction at enter to combat if not in combat yet (enemy can be NULL)
void EnterCombat(Unit* enemy);
void EnterCombat(Unit* enemy) override;
// Called for reaction at stopping attack at no attackers or targets
void EnterEvadeMode();
void EnterEvadeMode() override;
// Called when the creature is killed
void JustDied(Unit* killer);
void JustDied(Unit* killer) override;
// Called when the creature kills a unit
void KilledUnit(Unit* victim);
void KilledUnit(Unit* victim) override;
// Called when the creature summon successfully other creature
void JustSummoned(Creature* creature);
void JustSummoned(Creature* creature) override;
// Tell creature to attack and follow the victim
void AttackStart(Unit* who);
void AttackStart(Unit* who) override;
// Called if IsVisible(Unit* who) is true at each *who move, reaction at visibility zone enter
void MoveInLineOfSight(Unit* who);
void MoveInLineOfSight(Unit* who) override;
// Called when hit by a spell
void SpellHit(Unit* unit, const SpellInfo* spellInfo);
void SpellHit(Unit* unit, const SpellInfo* spellInfo) override;
// Called when spell hits a target
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo);
void SpellHitTarget(Unit* target, const SpellInfo* spellInfo) override;
// Called at any Damage from any attacker (before damage apply)
void DamageTaken(Unit* doneBy, uint32& damage);
void DamageTaken(Unit* doneBy, uint32& damage) override;
// Called when the creature receives heal
void HealReceived(Unit* doneBy, uint32& addhealth);
void HealReceived(Unit* doneBy, uint32& addhealth) override;
// Called at World update tick
void UpdateAI(uint32 diff);
void UpdateAI(uint32 diff) override;
// Called at text emote receive from player
void ReceiveEmote(Player* player, uint32 textEmote);
void ReceiveEmote(Player* player, uint32 textEmote) override;
// Called at waypoint reached or point movement finished
void MovementInform(uint32 MovementType, uint32 Data);
void MovementInform(uint32 MovementType, uint32 Data) override;
// Called when creature is summoned by another unit
void IsSummonedBy(Unit* summoner);
void IsSummonedBy(Unit* summoner) override;
// Called at any Damage to any victim (before damage apply)
void DamageDealt(Unit* doneTo, uint32& damage, DamageEffectType /*damagetype*/);
void DamageDealt(Unit* doneTo, uint32& damage, DamageEffectType /*damagetype*/) override;
// Called when a summoned creature dissapears (UnSommoned)
void SummonedCreatureDespawn(Creature* unit);
void SummonedCreatureDespawn(Creature* unit) override;
// called when the corpse of this creature gets removed
void CorpseRemoved(uint32& respawnDelay);
void CorpseRemoved(uint32& respawnDelay) override;
// Called at World update tick if creature is charmed
void UpdateAIWhileCharmed(const uint32 diff);
// Called when a Player/Creature enters the creature (vehicle)
void PassengerBoarded(Unit* who, int8 seatId, bool apply);
void PassengerBoarded(Unit* who, int8 seatId, bool apply) override;
// Called when gets initialized, when creature is added to world
void InitializeAI();
void InitializeAI() override;
// Called when creature gets charmed by another unit
void OnCharmed(bool apply);
void OnCharmed(bool apply) override;
// Called when victim is in line of sight
bool CanAIAttack(const Unit* who) const;
bool CanAIAttack(const Unit* who) const override;
// Used in scripts to share variables
void DoAction(int32 param = 0);
void DoAction(int32 param = 0) override;
// Used in scripts to share variables
uint32 GetData(uint32 id = 0) const;
uint32 GetData(uint32 id = 0) const override;
// Used in scripts to share variables
void SetData(uint32 id, uint32 value);
void SetData(uint32 id, uint32 value) override;
// Used in scripts to share variables
void SetGUID(uint64 guid, int32 id = 0);
void SetGUID(uint64 guid, int32 id = 0) override;
// Used in scripts to share variables
uint64 GetGUID(int32 id = 0) const;
uint64 GetGUID(int32 id = 0) const override;
//core related
static int Permissible(const Creature*);
@@ -174,15 +174,15 @@ class SmartAI : public CreatureAI
void SetInvincibilityHpLevel(uint32 level) { mInvincibilityHpLevel = level; }
void sGossipHello(Player* player);
void sGossipSelect(Player* player, uint32 sender, uint32 action);
void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code);
void sQuestAccept(Player* player, Quest const* quest);
void sGossipHello(Player* player) override;
void sGossipSelect(Player* player, uint32 sender, uint32 action) override;
void sGossipSelectCode(Player* player, uint32 sender, uint32 action, const char* code) override;
void sQuestAccept(Player* player, Quest const* quest) override;
//void sQuestSelect(Player* player, Quest const* quest);
//void sQuestComplete(Player* player, Quest const* quest);
void sQuestReward(Player* player, Quest const* quest, uint32 opt);
bool sOnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex);
void sOnGameEvent(bool start, uint16 eventId);
void sQuestReward(Player* player, Quest const* quest, uint32 opt) override;
bool sOnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex) override;
void sOnGameEvent(bool start, uint16 eventId) override;
uint32 mEscortQuestID;
@@ -193,7 +193,7 @@ class SmartAI : public CreatureAI
}
void StartDespawn() { mDespawnState = 2; }
void OnSpellClick(Unit* clicker, bool& result);
void OnSpellClick(Unit* clicker, bool& result) override;
private:
uint32 mFollowCreditType;
@@ -237,23 +237,23 @@ class SmartGameObjectAI : public GameObjectAI
SmartGameObjectAI(GameObject* g) : GameObjectAI(g) { }
~SmartGameObjectAI() { }
void UpdateAI(uint32 diff);
void InitializeAI();
void Reset();
void UpdateAI(uint32 diff) override;
void InitializeAI() override;
void Reset() override;
SmartScript* GetScript() { return &mScript; }
static int Permissible(const GameObject* g);
bool GossipHello(Player* player);
bool GossipSelect(Player* player, uint32 sender, uint32 action);
bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/);
bool QuestAccept(Player* player, Quest const* quest);
bool QuestReward(Player* player, Quest const* quest, uint32 opt);
void Destroyed(Player* player, uint32 eventId);
void SetData(uint32 id, uint32 value);
bool GossipHello(Player* player) override;
bool GossipSelect(Player* player, uint32 sender, uint32 action) override;
bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) override;
bool QuestAccept(Player* player, Quest const* quest) override;
bool QuestReward(Player* player, Quest const* quest, uint32 opt) override;
void Destroyed(Player* player, uint32 eventId) override;
void SetData(uint32 id, uint32 value) override;
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
void OnGameEvent(bool start, uint16 eventId);
void OnStateChanged(uint32 state, Unit* unit);
void EventInform(uint32 eventId);
void OnGameEvent(bool start, uint16 eventId) override;
void OnStateChanged(uint32 state, Unit* unit) override;
void EventInform(uint32 eventId) override;
private:
SmartScript mScript;
+23 -23
View File
@@ -519,7 +519,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
mana < spellInfo->CalcPowerCost(me, spellInfo->GetSchoolMask()))
_allowMove = true;
CAST_AI(SmartAI, me->AI())->SetCombatMove(_allowMove);
ENSURE_AI(SmartAI, me->AI())->SetCombatMove(_allowMove);
}
me->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) != 0);
@@ -707,7 +707,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsSmart())
break;
CAST_AI(SmartAI, me->AI())->SetAutoAttack(e.action.autoAttack.attack != 0);
ENSURE_AI(SmartAI, me->AI())->SetAutoAttack(e.action.autoAttack.attack != 0);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_AUTO_ATTACK: Creature: %u bool on = %u",
me->GetGUIDLow(), e.action.autoAttack.attack);
break;
@@ -718,7 +718,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
bool move = e.action.combatMove.move != 0;
CAST_AI(SmartAI, me->AI())->SetCombatMove(move);
ENSURE_AI(SmartAI, me->AI())->SetCombatMove(move);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature %u bool on = %u",
me->GetGUIDLow(), e.action.combatMove.move);
break;
@@ -817,7 +817,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ObjectList* targets = GetTargets(e, unit);
if (!targets)
{
CAST_AI(SmartAI, me->AI())->StopFollow();
ENSURE_AI(SmartAI, me->AI())->StopFollow();
break;
}
@@ -825,7 +825,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (IsUnit(*itr))
{
CAST_AI(SmartAI, me->AI())->SetFollow((*itr)->ToUnit(), (float)e.action.follow.dist, (float)e.action.follow.angle, e.action.follow.credit, e.action.follow.entry, e.action.follow.creditType);
ENSURE_AI(SmartAI, me->AI())->SetFollow((*itr)->ToUnit(), (float)e.action.follow.dist, (float)e.action.follow.angle, e.action.follow.credit, e.action.follow.entry, e.action.follow.creditType);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_FOLLOW: Creature %u following target %u",
me->GetGUIDLow(), (*itr)->GetGUIDLow());
break;
@@ -1035,8 +1035,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if ((*itr)->ToUnit()->IsAlive() && IsSmart((*itr)->ToCreature()))
{
CAST_AI(SmartAI, (*itr)->ToCreature()->AI())->SetDespawnTime(e.action.forceDespawn.delay + 1); // Next tick
CAST_AI(SmartAI, (*itr)->ToCreature()->AI())->StartDespawn();
ENSURE_AI(SmartAI, (*itr)->ToCreature()->AI())->SetDespawnTime(e.action.forceDespawn.delay + 1); // Next tick
ENSURE_AI(SmartAI, (*itr)->ToCreature()->AI())->StartDespawn();
}
else
(*itr)->ToCreature()->DespawnOrUnsummon(e.action.forceDespawn.delay);
@@ -1331,7 +1331,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsSmart())
break;
CAST_AI(SmartAI, me->AI())->SetFly(e.action.setFly.fly != 0);
ENSURE_AI(SmartAI, me->AI())->SetFly(e.action.setFly.fly != 0);
break;
}
case SMART_ACTION_SET_RUN:
@@ -1339,7 +1339,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsSmart())
break;
CAST_AI(SmartAI, me->AI())->SetRun(e.action.setRun.run != 0);
ENSURE_AI(SmartAI, me->AI())->SetRun(e.action.setRun.run != 0);
break;
}
case SMART_ACTION_SET_SWIM:
@@ -1347,7 +1347,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsSmart())
break;
CAST_AI(SmartAI, me->AI())->SetSwim(e.action.setSwim.swim != 0);
ENSURE_AI(SmartAI, me->AI())->SetSwim(e.action.setSwim.swim != 0);
break;
}
case SMART_ACTION_WP_START:
@@ -1361,12 +1361,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
ObjectList* targets = GetTargets(e, unit);
StoreTargetList(targets, SMART_ESCORT_TARGETS);
me->SetReactState((ReactStates)e.action.wpStart.reactState);
CAST_AI(SmartAI, me->AI())->StartPath(run, entry, repeat, unit);
ENSURE_AI(SmartAI, me->AI())->StartPath(run, entry, repeat, unit);
uint32 quest = e.action.wpStart.quest;
uint32 DespawnTime = e.action.wpStart.despawnTime;
CAST_AI(SmartAI, me->AI())->mEscortQuestID = quest;
CAST_AI(SmartAI, me->AI())->SetDespawnTime(DespawnTime);
ENSURE_AI(SmartAI, me->AI())->mEscortQuestID = quest;
ENSURE_AI(SmartAI, me->AI())->SetDespawnTime(DespawnTime);
break;
}
case SMART_ACTION_WP_PAUSE:
@@ -1375,7 +1375,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
break;
uint32 delay = e.action.wpPause.delay;
CAST_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_WAYPOINT_REACHED ? false : true);
ENSURE_AI(SmartAI, me->AI())->PausePath(delay, e.GetEventType() == SMART_EVENT_WAYPOINT_REACHED ? false : true);
break;
}
case SMART_ACTION_WP_STOP:
@@ -1386,7 +1386,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
uint32 DespawnTime = e.action.wpStop.despawnTime;
uint32 quest = e.action.wpStop.quest;
bool fail = e.action.wpStop.fail != 0;
CAST_AI(SmartAI, me->AI())->StopPath(DespawnTime, quest, fail);
ENSURE_AI(SmartAI, me->AI())->StopPath(DespawnTime, quest, fail);
break;
}
case SMART_ACTION_WP_RESUME:
@@ -1394,7 +1394,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (!IsSmart())
break;
CAST_AI(SmartAI, me->AI())->ResumePath();
ENSURE_AI(SmartAI, me->AI())->ResumePath();
break;
}
case SMART_ACTION_SET_ORIENTATION:
@@ -1630,7 +1630,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
for (ObjectList::iterator itr = targets->begin(); itr != targets->end(); ++itr)
if (Creature* target = (*itr)->ToCreature())
if (IsSmart(target) && target->GetVictim())
if (CAST_AI(SmartAI, target->AI())->CanCombatMove())
if (ENSURE_AI(SmartAI, target->AI())->CanCombatMove())
target->GetMotionMaster()->MoveChase(target->GetVictim(), attackDistance, attackAngle);
delete targets;
@@ -1652,12 +1652,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Creature* target = (*itr)->ToCreature())
{
if (IsSmart(target))
CAST_AI(SmartAI, target->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
ENSURE_AI(SmartAI, target->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
}
else if (GameObject* goTarget = (*itr)->ToGameObject())
{
if (IsSmartGO(goTarget))
CAST_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
ENSURE_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, e.action.timedActionList.id, GetLastInvoker());
}
}
@@ -1788,12 +1788,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Creature* target = (*itr)->ToCreature())
{
if (IsSmart(target))
CAST_AI(SmartAI, target->AI())->SetScript9(e, id, GetLastInvoker());
ENSURE_AI(SmartAI, target->AI())->SetScript9(e, id, GetLastInvoker());
}
else if (GameObject* goTarget = (*itr)->ToGameObject())
{
if (IsSmartGO(goTarget))
CAST_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, id, GetLastInvoker());
ENSURE_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, id, GetLastInvoker());
}
}
@@ -1818,12 +1818,12 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (Creature* target = (*itr)->ToCreature())
{
if (IsSmart(target))
CAST_AI(SmartAI, target->AI())->SetScript9(e, id, GetLastInvoker());
ENSURE_AI(SmartAI, target->AI())->SetScript9(e, id, GetLastInvoker());
}
else if (GameObject* goTarget = (*itr)->ToGameObject())
{
if (IsSmartGO(goTarget))
CAST_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, id, GetLastInvoker());
ENSURE_AI(SmartGameObjectAI, goTarget->AI())->SetScript9(e, id, GetLastInvoker());
}
}
@@ -1421,7 +1421,7 @@ class SmartWaypointMgr
{
if (waypoint_map.find(id) != waypoint_map.end())
return waypoint_map[id];
else return 0;
else return nullptr;
}
private:
+4 -4
View File
@@ -247,12 +247,12 @@ class Battlefield : public ZoneScript
void HandlePlayerLeaveZone(Player* player, uint32 zone);
// All-purpose data storage 64 bit
virtual uint64 GetData64(uint32 dataId) const { return m_Data64[dataId]; }
virtual void SetData64(uint32 dataId, uint64 value) { m_Data64[dataId] = value; }
virtual uint64 GetData64(uint32 dataId) const override { return m_Data64[dataId]; }
virtual void SetData64(uint32 dataId, uint64 value) override { m_Data64[dataId] = value; }
// All-purpose data storage 32 bit
virtual uint32 GetData(uint32 dataId) const { return m_Data32[dataId]; }
virtual void SetData(uint32 dataId, uint32 value) { m_Data32[dataId] = value; }
virtual uint32 GetData(uint32 dataId) const override { return m_Data32[dataId]; }
virtual void SetData(uint32 dataId, uint32 value) override { m_Data32[dataId] = value; }
virtual void UpdateData(uint32 index, int32 pad) { m_Data32[index] += pad; }
// Battlefield - generic methods
@@ -255,7 +255,7 @@ class WintergraspCapturePoint : public BfCapturePoint
void LinkToWorkshop(WGWorkshop* workshop) { m_Workshop = workshop; }
void ChangeTeam(TeamId oldteam);
void ChangeTeam(TeamId oldteam) override;
TeamId GetTeam() const { return m_team; }
protected:
@@ -276,7 +276,7 @@ class BattlefieldWG : public Battlefield
* - Rebuild tower and wall
* - Invite player to war
*/
void OnBattleStart();
void OnBattleStart() override;
/**
* \brief Called when battle end
@@ -287,13 +287,13 @@ class BattlefieldWG : public Battlefield
* - Remove vehicle
* \param endByTimer : true if battle ended when timer is at 00:00, false if battle ended by clicking on relic
*/
void OnBattleEnd(bool endByTimer);
void OnBattleEnd(bool endByTimer) override;
/**
* \brief Called when grouping starts (15 minutes before battlestart)
* - Invite all player in zone to join queue
*/
void OnStartGrouping();
void OnStartGrouping() override;
/**
* \brief Called when player accept invite to join battle
@@ -303,20 +303,20 @@ class BattlefieldWG : public Battlefield
* - Update tenacity
* \param player: Player who accepted invite
*/
void OnPlayerJoinWar(Player* player);
void OnPlayerJoinWar(Player* player) override;
/**
* \brief Called when player left the battle
* - Update player aura
* \param player : Player who left the battle
*/
void OnPlayerLeaveWar(Player* player);
void OnPlayerLeaveWar(Player* player) override;
/**
* \brief Called when player left the WG zone
* \param player : Player who left the zone
*/
void OnPlayerLeaveZone(Player* player);
void OnPlayerLeaveZone(Player* player) override;
/**
* \brief Called when player enters in WG zone
@@ -324,7 +324,7 @@ class BattlefieldWG : public Battlefield
* - Update worldstate
* \param player : Player who enters the zone
*/
void OnPlayerEnterZone(Player* player);
void OnPlayerEnterZone(Player* player) override;
/**
* \brief Called for update battlefield data
@@ -332,24 +332,24 @@ class BattlefieldWG : public Battlefield
* - Update imunity aura from graveyard
* \param diff : time elapsed since the last call (in ms)
*/
bool Update(uint32 diff);
bool Update(uint32 diff) override;
/**
* \brief Called when a creature is created
* - Update vehicle count
*/
void OnCreatureCreate(Creature* creature);
void OnCreatureCreate(Creature* creature) override;
/**
* \brief Called when a creature is removed
* - Update vehicle count
*/
void OnCreatureRemove(Creature* creature);
void OnCreatureRemove(Creature* creature) override;
/**
* \brief Called when a gameobject is created
*/
void OnGameObjectCreate(GameObject* go);
void OnGameObjectCreate(GameObject* go) override;
/**
* \brief Called when a wall/tower is broken
@@ -370,14 +370,14 @@ class BattlefieldWG : public Battlefield
*/
void UpdatedDestroyedTowerCount(TeamId team);
void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1);
void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1) override;
void RemoveAurasFromPlayer(Player* player);
/**
* \brief Called when battlefield is setup, at server start
*/
bool SetupBattlefield();
bool SetupBattlefield() override;
/// Return pointer to relic object
GameObject* GetRelic() { return GetGameObject(m_titansRelicGUID); }
@@ -395,22 +395,22 @@ class BattlefieldWG : public Battlefield
void UpdateCounterVehicle(bool init);
void SendInitWorldStatesTo(Player* player);
void SendInitWorldStatesToAll();
void FillInitialWorldStates(WorldPacket& data);
void SendInitWorldStatesToAll() override;
void FillInitialWorldStates(WorldPacket& data) override;
void HandleKill(Player* killer, Unit* victim);
void OnUnitDeath(Unit* unit);
void HandleKill(Player* killer, Unit* victim) override;
void OnUnitDeath(Unit* unit) override;
void PromotePlayer(Player* killer);
void UpdateTenacity();
void ProcessEvent(WorldObject* obj, uint32 eventId);
void ProcessEvent(WorldObject* obj, uint32 eventId) override;
bool FindAndRemoveVehicleFromList(Unit* vehicle);
// returns the graveyardId in the specified area.
uint8 GetSpiritGraveyardId(uint32 areaId) const;
uint32 GetData(uint32 data) const;
uint32 GetData(uint32 data) const override;
protected:
bool m_isRelicInteractible;
+2 -2
View File
@@ -30,7 +30,7 @@ struct ArenaScore : public BattlegroundScore
protected:
ArenaScore(uint64 playerGuid, uint32 team) : BattlegroundScore(playerGuid, team), TeamId(team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE) { }
void AppendToPacket(WorldPacket& data, ByteBuffer& content) final
void AppendToPacket(WorldPacket& data, ByteBuffer& content) final override
{
uint32 primaryTree = 0;
if (Player* player = ObjectAccessor::FindPlayer(PlayerGuid))
@@ -87,7 +87,7 @@ struct ArenaScore : public BattlegroundScore
content.WriteByteSeq(PlayerGuid[2]);
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& /*content*/) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& /*content*/) final override
{
data.WriteBits(0, 24); // Objectives Count
}
@@ -143,8 +143,8 @@ class BGQueueInviteEvent : public BasicEvent
{ }
virtual ~BGQueueInviteEvent() { }
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
virtual bool Execute(uint64 e_time, uint32 p_time) override;
virtual void Abort(uint64 e_time) override;
private:
uint64 m_PlayerGuid;
uint32 m_BgInstanceGUID;
@@ -167,8 +167,8 @@ class BGQueueRemoveEvent : public BasicEvent
virtual ~BGQueueRemoveEvent() { }
virtual bool Execute(uint64 e_time, uint32 p_time);
virtual void Abort(uint64 e_time);
virtual bool Execute(uint64 e_time, uint32 p_time) override;
virtual void Abort(uint64 e_time) override;
private:
uint64 m_PlayerGuid;
uint32 m_BgInstanceGUID;
@@ -260,7 +260,7 @@ struct BattlegroundABScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final override
{
data.WriteBits(2, 24); // Objectives Count
content << uint32(BasesAssaulted);
@@ -277,31 +277,31 @@ class BattlegroundAB : public Battleground
BattlegroundAB();
~BattlegroundAB();
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void Reset();
void EndBattleground(uint32 winner);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void Reset() override;
void EndBattleground(uint32 winner) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/* Scorekeeping */
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
/* Nodes occupying */
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
/* achievement req. */
bool IsAllNodesControlledByTeam(uint32 team) const;
bool CheckAchievementCriteriaMeet(uint32 /*criteriaId*/, Player const* /*player*/, Unit const* /*target*/ = NULL, uint32 /*miscvalue1*/ = 0);
bool IsAllNodesControlledByTeam(uint32 team) const override;
bool CheckAchievementCriteriaMeet(uint32 /*criteriaId*/, Player const* /*player*/, Unit const* /*target*/ = nullptr, uint32 /*miscvalue1*/ = 0) override;
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
/* Gameobject spawning/despawning */
void _CreateBanner(uint8 node, uint8 type, uint8 teamIndex, bool delay);
void _DelBanner(uint8 node, uint8 type, uint8 teamIndex);
@@ -1558,7 +1558,7 @@ struct BattlegroundAVScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final override
{
data.WriteBits(5, 24); // Objectives Count
content << uint32(GraveyardsAssaulted);
@@ -1582,37 +1582,37 @@ class BattlegroundAV : public Battleground
~BattlegroundAV();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* player, uint32 trigger);
bool SetupBattleground();
void ResetBGSubclass();
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* player, uint32 trigger) override;
bool SetupBattleground() override;
void ResetBGSubclass() override;
/*general stuff*/
void UpdateScore(uint16 team, int16 points);
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
/*handlestuff*/ //these are functions which get called from extern
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj);
void HandleKillPlayer(Player* player, Player* killer);
void HandleKillUnit(Creature* unit, Player* killer);
void HandleQuestComplete(uint32 questid, Player* player);
bool CanActivateGO(int32 GOId, uint32 team) const;
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
void HandleKillPlayer(Player* player, Player* killer) override;
void HandleKillUnit(Creature* unit, Player* killer) override;
void HandleQuestComplete(uint32 questid, Player* player) override;
bool CanActivateGO(int32 GOId, uint32 team) const override;
void EndBattleground(uint32 winner);
void EndBattleground(uint32 winner) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
// Achievement: Av perfection and Everything counts
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0);
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = nullptr, uint32 miscvalue1 = 0) override;
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
/* Nodes occupying */
void EventPlayerAssaultsPoint(Player* player, uint32 object);
@@ -1636,7 +1636,7 @@ class BattlegroundAV : public Battleground
void ChangeMineOwner(uint8 mine, uint32 team, bool initial=false);
/*worldstates*/
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
uint8 GetWorldStateType(uint8 state, uint16 team);
void SendMineWorldStates(uint32 mine);
void UpdateNodeWorldState(BG_AV_Nodes node);
@@ -48,11 +48,11 @@ class BattlegroundBE : public Arena
BattlegroundBE();
/* inherited from BattlegroundClass */
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void FillInitialWorldStates(WorldPacket &d);
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void FillInitialWorldStates(WorldPacket &d) override;
};
#endif
@@ -94,15 +94,15 @@ class BattlegroundDS : public Arena
BattlegroundDS();
/* inherited from BattlegroundClass */
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void FillInitialWorldStates(WorldPacket &d);
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void FillInitialWorldStates(WorldPacket &d) override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
EventMap _events;
@@ -343,7 +343,7 @@ struct BattlegroundEYScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final override
{
data.WriteBits(1, 24); // Objectives Count
content << uint32(FlagCaptures);
@@ -359,42 +359,42 @@ class BattlegroundEY : public Battleground
~BattlegroundEY();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
/* BG Flags */
uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const { return m_FlagKeeper; }
uint64 GetFlagPickerGUID(int32 /*team*/ = -1) const override { return m_FlagKeeper; }
void SetFlagPicker(uint64 guid) { m_FlagKeeper = guid; }
bool IsFlagPickedup() const { return m_FlagKeeper != 0; }
uint8 GetFlagState() const { return m_FlagState; }
void RespawnFlag(bool send_message);
void RespawnFlagAfterDrop();
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleBuffUse(uint64 buff_guid);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void HandleKillPlayer(Player* player, Player* killer);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
bool SetupBattleground();
void Reset();
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
void HandleKillPlayer(Player* player, Player* killer) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
bool SetupBattleground() override;
void Reset() override;
void UpdateTeamScore(uint32 Team);
void EndBattleground(uint32 winner);
void EndBattleground(uint32 winner) override;
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
void FillInitialWorldStates(WorldPacket& data);
void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) { m_DroppedFlagGUID = guid;}
void FillInitialWorldStates(WorldPacket& data) override;
void SetDroppedFlagGUID(uint64 guid, int32 /*TeamID*/ = -1) override { m_DroppedFlagGUID = guid;}
uint64 GetDroppedFlagGUID() const { return m_DroppedFlagGUID;}
/* Battleground Events */
void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj);
void EventPlayerDroppedFlag(Player* Source);
void EventPlayerClickedOnFlag(Player* Source, GameObject* target_obj) override;
void EventPlayerDroppedFlag(Player* Source) override;
/* achievement req. */
bool IsAllNodesControlledByTeam(uint32 team) const;
bool IsAllNodesControlledByTeam(uint32 team) const override;
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
void EventPlayerCapturedFlag(Player* Source, uint32 BgObjectType);
void EventTeamCapturedPoint(Player* Source, uint32 Point);
@@ -871,7 +871,7 @@ struct BattlegroundICScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final override
{
data.WriteBits(2, 24); // Objectives Count
content << uint32(BasesAssaulted);
@@ -889,36 +889,36 @@ class BattlegroundIC : public Battleground
~BattlegroundIC();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void PostUpdateImpl(uint32 diff);
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void PostUpdateImpl(uint32 diff) override;
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* player, uint32 trigger);
bool SetupBattleground();
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* player, uint32 trigger) override;
bool SetupBattleground() override;
void SpawnLeader(uint32 teamid);
void HandleKillUnit(Creature* unit, Player* killer);
void HandleKillPlayer(Player* player, Player* killer);
void EndBattleground(uint32 winner);
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/);
void HandleKillUnit(Creature* unit, Player* killer) override;
void HandleKillPlayer(Player* player, Player* killer) override;
void EndBattleground(uint32 winner) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/) override;
void DestroyGate(Player* player, GameObject* go);
void DestroyGate(Player* player, GameObject* go) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/* Scorekeeping */
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
void DoAction(uint32 action, uint64 var);
void DoAction(uint32 action, uint64 var) override;
void HandlePlayerResurrect(Player* player);
void HandlePlayerResurrect(Player* player) override;
uint32 GetNodeState(uint8 nodeType) const { return (uint8)nodePoint[nodeType].nodeState; }
bool IsAllNodesControlledByTeam(uint32 team) const;
bool IsAllNodesControlledByTeam(uint32 team) const override;
bool IsSpellAllowed(uint32 spellId, Player const* player) const;
bool IsSpellAllowed(uint32 spellId, Player const* player) const override;
private:
uint32 closeFortressDoorsTimer;
@@ -47,11 +47,11 @@ class BattlegroundNA : public Arena
BattlegroundNA();
/* inherited from BattlegroundClass */
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void FillInitialWorldStates(WorldPacket &d);
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
void FillInitialWorldStates(WorldPacket &d) override;
};
#endif
@@ -43,11 +43,11 @@ class BattlegroundRL : public Arena
BattlegroundRL();
/* inherited from BattlegroundClass */
void FillInitialWorldStates(WorldPacket &d);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void FillInitialWorldStates(WorldPacket &d) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
};
#endif
@@ -96,14 +96,14 @@ class BattlegroundRV : public Arena
BattlegroundRV();
/* inherited from BattlegroundClass */
void StartingEventOpenDoors();
void FillInitialWorldStates(WorldPacket &d);
void StartingEventOpenDoors() override;
void FillInitialWorldStates(WorldPacket &d) override;
void HandleAreaTrigger(Player* Source, uint32 Trigger);
bool SetupBattleground();
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
bool SetupBattleground() override;
private:
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
void TogglePillarCollision();
@@ -531,7 +531,7 @@ struct BattlegroundSAScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final override
{
data.WriteBits(2, 24); // Objectives Count
content << uint32(DemolishersDestroyed);
@@ -554,27 +554,27 @@ class BattlegroundSA : public Battleground
* -Update timer
* -Round switch
*/
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
/* inherited from BattlegroundClass */
/// Called when a player join battle
void AddPlayer(Player* player);
void AddPlayer(Player* player) override;
/// Called when battle start
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
/// Called for ini battleground, after that the first player be entered
bool SetupBattleground();
void Reset();
bool SetupBattleground() override;
void Reset() override;
/// Called for generate packet contain worldstate data
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
/// Called when a player kill a unit in bg
void HandleKillUnit(Creature* creature, Player* killer);
void HandleKillUnit(Creature* creature, Player* killer) override;
/// Return the nearest graveyard where player can respawn
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
/// Called when someone activates an event
void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/, WorldObject* /*invoker*/ = NULL) override;
/// Called when a player click on flag (graveyard flag)
void EventPlayerClickedOnFlag(Player* source, GameObject* go);
void EventPlayerClickedOnFlag(Player* source, GameObject* go) override;
/// Called when a player clicked on relic
void TitanRelicActivated(Player* clicker);
@@ -588,11 +588,11 @@ class BattlegroundSA : public Battleground
}
/// Called on battleground ending
void EndBattleground(uint32 winner);
void EndBattleground(uint32 winner) override;
/// Called when a player leave battleground
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* Source, uint32 Trigger);
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* Source, uint32 Trigger) override;
/* Scorekeeping */
@@ -630,7 +630,7 @@ class BattlegroundSA : public Battleground
* -Update worldstate
* -Delete gameobject in front of door (lighting object, with different colours for each door)
*/
void DestroyGate(Player* player, GameObject* go);
void DestroyGate(Player* player, GameObject* go) override;
/// Update timer worldstate
void SendTime();
/**
@@ -170,7 +170,7 @@ struct BattlegroundWGScore final : public BattlegroundScore
}
}
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final
void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final override
{
data.WriteBits(2, 24); // Objectives Count
content << uint32(FlagCaptures);
@@ -189,12 +189,12 @@ class BattlegroundWS : public Battleground
~BattlegroundWS();
/* inherited from BattlegroundClass */
void AddPlayer(Player* player);
void StartingEventCloseDoors();
void StartingEventOpenDoors();
void AddPlayer(Player* player) override;
void StartingEventCloseDoors() override;
void StartingEventOpenDoors() override;
/* BG Flags */
uint64 GetFlagPickerGUID(int32 team) const
uint64 GetFlagPickerGUID(int32 team) const override
{
if (team == TEAM_ALLIANCE || team == TEAM_HORDE)
return m_FlagKeepers[team];
@@ -209,40 +209,40 @@ class BattlegroundWS : public Battleground
uint8 GetFlagState(uint32 team) { return _flagState[GetTeamIndexByTeamId(team)]; }
/* Battleground Events */
void EventPlayerDroppedFlag(Player* player);
void EventPlayerClickedOnFlag(Player* player, GameObject* target_obj);
void EventPlayerDroppedFlag(Player* player) override;
void EventPlayerClickedOnFlag(Player* player, GameObject* target_obj) override;
void EventPlayerCapturedFlag(Player* player);
void RemovePlayer(Player* player, uint64 guid, uint32 team);
void HandleAreaTrigger(Player* player, uint32 trigger);
void HandleKillPlayer(Player* player, Player* killer);
bool SetupBattleground();
void Reset();
void EndBattleground(uint32 winner);
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
void RemovePlayer(Player* player, uint64 guid, uint32 team) override;
void HandleAreaTrigger(Player* player, uint32 trigger) override;
void HandleKillPlayer(Player* player, Player* killer) override;
bool SetupBattleground() override;
void Reset() override;
void EndBattleground(uint32 winner) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
void UpdateFlagState(uint32 team, uint32 value);
void SetLastFlagCapture(uint32 team) { _lastFlagCaptureTeam = team; }
void UpdateTeamScore(uint32 team);
bool UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor = true) override;
void SetDroppedFlagGUID(uint64 guid, int32 team = -1)
void SetDroppedFlagGUID(uint64 guid, int32 team = -1) override
{
if (team == TEAM_ALLIANCE || team == TEAM_HORDE)
m_DroppedFlagGUID[team] = guid;
}
uint64 GetDroppedFlagGUID(uint32 TeamID) { return m_DroppedFlagGUID[GetTeamIndexByTeamId(TeamID)];}
void FillInitialWorldStates(WorldPacket& data);
void FillInitialWorldStates(WorldPacket& data) override;
/* Scorekeeping */
void AddPoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] += Points; }
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
uint32 GetPrematureWinner();
uint32 GetPrematureWinner() override;
/* Achievements*/
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0);
bool CheckAchievementCriteriaMeet(uint32 criteriaId, Player const* source, Unit const* target = nullptr, uint32 miscvalue1 = 0) override;
private:
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
@@ -260,6 +260,6 @@ class BattlegroundWS : public Battleground
uint8 _flagDebuffState; // 0 - no debuffs, 1 - focused assault, 2 - brutal assault
uint8 _minutesElapsed;
void PostUpdateImpl(uint32 diff);
void PostUpdateImpl(uint32 diff) override;
};
#endif
+2 -2
View File
@@ -984,7 +984,7 @@ static char const* const spellKeys[] =
"Henchant", // enchanting recipe spell
"Htrade", // profession/skill spell
"Hglyph", // glyph
0
nullptr
};
uint32 ChatHandler::extractSpellIdFromLink(char* text)
@@ -1068,7 +1068,7 @@ static char const* const guidKeys[] =
"Hplayer",
"Hcreature",
"Hgameobject",
0
nullptr
};
uint64 ChatHandler::extractGuidFromLink(char* text)
+8 -8
View File
@@ -148,14 +148,14 @@ class CliHandler : public ChatHandler
explicit CliHandler(void* callbackArg, Print* zprint) : m_callbackArg(callbackArg), m_print(zprint) { }
// overwrite functions
const char *GetTrinityString(int32 entry) const;
bool isAvailable(ChatCommand const& cmd) const;
bool HasPermission(uint32 /*permission*/) const { return true; }
void SendSysMessage(const char *str);
std::string GetNameLink() const;
bool needReportToTarget(Player* chr) const;
LocaleConstant GetSessionDbcLocale() const;
int GetSessionDbLocaleIndex() const;
const char *GetTrinityString(int32 entry) const override;
bool isAvailable(ChatCommand const& cmd) const override;
bool HasPermission(uint32 /*permission*/) const override { return true; }
void SendSysMessage(const char *str) override;
std::string GetNameLink() const override;
bool needReportToTarget(Player* chr) const override;
LocaleConstant GetSessionDbcLocale() const override;
int GetSessionDbLocaleIndex() const override;
private:
void* m_callbackArg;
+14 -14
View File
@@ -61,8 +61,8 @@ public:
{
memset(_data, 0, sizeof(_data));
}
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
std::string FormatName(uint8 index, ItemLocale const* locale, char* suffixStrings) const;
@@ -77,9 +77,9 @@ protected:
class QuestChatLink : public ChatLink
{
public:
QuestChatLink() : ChatLink(), _quest(NULL), _questLevel(0) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
QuestChatLink() : ChatLink(), _quest(nullptr), _questLevel(0) { }
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
Quest const* _quest;
@@ -90,9 +90,9 @@ protected:
class SpellChatLink : public ChatLink
{
public:
SpellChatLink() : ChatLink(), _spell(NULL) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
SpellChatLink() : ChatLink(), _spell(nullptr) { }
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
SpellInfo const* _spell;
@@ -106,8 +106,8 @@ public:
{
memset(_data, 0, sizeof(_data));
}
virtual bool Initialize(std::istringstream& iss);
virtual bool ValidateName(char* buffer, const char* context);
virtual bool Initialize(std::istringstream& iss) override;
virtual bool ValidateName(char* buffer, const char* context) override;
protected:
uint32 _guid;
@@ -120,7 +120,7 @@ class TradeChatLink : public SpellChatLink
{
public:
TradeChatLink() : SpellChatLink(), _minSkillLevel(0), _maxSkillLevel(0), _guid(0) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
private:
int32 _minSkillLevel;
int32 _maxSkillLevel;
@@ -133,7 +133,7 @@ class TalentChatLink : public SpellChatLink
{
public:
TalentChatLink() : SpellChatLink(), _talentId(0), _rankId(0) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
private:
uint32 _talentId;
@@ -145,7 +145,7 @@ class EnchantmentChatLink : public SpellChatLink
{
public:
EnchantmentChatLink() : SpellChatLink() { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
};
// GlyphChatLink - link to glyph
@@ -153,7 +153,7 @@ class GlyphChatLink : public SpellChatLink
{
public:
GlyphChatLink() : SpellChatLink(), _slotId(0), _glyph(NULL) { }
virtual bool Initialize(std::istringstream& iss);
virtual bool Initialize(std::istringstream& iss) override;
private:
uint32 _slotId;
GlyphPropertiesEntry const* _glyph;
+3 -3
View File
@@ -117,13 +117,13 @@ class HostileReference : public Reference<Unit, ThreatManager>
//=================================================
// Tell our refTo (target) object that we have a link
void targetObjectBuildLink();
void targetObjectBuildLink() override;
// Tell our refTo (taget) object, that the link is cut
void targetObjectDestroyLink();
void targetObjectDestroyLink() override;
// Tell our refFrom (source) object, that the link is cut (Target destroyed)
void sourceObjectDestroyLink();
void sourceObjectDestroyLink() override;
private:
// Inform the source, that the status of that reference was changed
void fireStatusChanged(ThreatRefStatusChangeEvent& threatRefStatusChangeEvent);
+8 -8
View File
@@ -35,9 +35,9 @@ class LFGPlayerScript : public PlayerScript
LFGPlayerScript();
// Player Hooks
void OnLogout(Player* player);
void OnLogin(Player* player, bool loginFirst);
void OnMapChanged(Player* player);
void OnLogout(Player* player) override;
void OnLogin(Player* player, bool loginFirst) override;
void OnMapChanged(Player* player) override;
};
class LFGGroupScript : public GroupScript
@@ -46,11 +46,11 @@ class LFGGroupScript : public GroupScript
LFGGroupScript();
// Group Hooks
void OnAddMember(Group* group, uint64 guid);
void OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, char const* reason);
void OnDisband(Group* group);
void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
void OnInviteMember(Group* group, uint64 guid);
void OnAddMember(Group* group, uint64 guid) override;
void OnRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, char const* reason) override;
void OnDisband(Group* group) override;
void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid) override;
void OnInviteMember(Group* group, uint64 guid) override;
};
} // namespace lfg
+2 -2
View File
@@ -52,8 +52,8 @@ class Corpse : public WorldObject, public GridObject<Corpse>
explicit Corpse(CorpseType type = CORPSE_BONES);
~Corpse();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
bool Create(uint32 guidlow, Map* map);
bool Create(uint32 guidlow, Player* owner);
+1 -10
View File
@@ -548,15 +548,6 @@ void Creature::Update(uint32 diff)
if (!IsAlive())
break;
time_t now = time(NULL);
// Check if we should refill the pickpocketing loot
if (loot.loot_type == LOOT_PICKPOCKETING && _pickpocketLootRestore && _pickpocketLootRestore <= now)
{
loot.clear();
_pickpocketLootRestore = 0;
}
if (m_regenTimer > 0)
{
if (diff >= m_regenTimer)
@@ -1542,7 +1533,7 @@ void Creature::Respawn(bool force)
TC_LOG_DEBUG("entities.unit", "Respawning creature %s (GuidLow: %u, Full GUID: " UI64FMTD " Entry: %u)",
GetName().c_str(), GetGUIDLow(), GetGUID(), GetEntry());
m_respawnTime = 0;
_pickpocketLootRestore = 0;
ResetPickPocketRefillTimer();
loot.clear();
if (m_originalEntry != GetEntry())
UpdateEntry(m_originalEntry);
+31 -30
View File
@@ -436,11 +436,11 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
explicit Creature(bool isWorldObject = false);
virtual ~Creature();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void SetObjectScale(float scale);
void SetDisplayId(uint32 modelId);
void SetObjectScale(float scale) override;
void SetDisplayId(uint32 modelId) override;
void DisappearAndDie();
@@ -451,8 +451,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint32 GetDBTableGUIDLow() const { return m_DBTableGuid; }
void Update(uint32 time); // overwrited Unit::Update
void GetRespawnPosition(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
void Update(uint32 time) override; // overwrited Unit::Update
void GetRespawnPosition(float &x, float &y, float &z, float* ori = nullptr, float* dist =nullptr) const;
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
uint32 GetCorpseDelay() const { return m_corpseDelay; }
@@ -462,7 +462,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool IsGuard() const { return (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_GUARD) != 0; }
bool CanWalk() const { return (GetCreatureTemplate()->InhabitType & INHABIT_GROUND) != 0; }
bool CanSwim() const { return (GetCreatureTemplate()->InhabitType & INHABIT_WATER) != 0 || IsPet(); }
bool CanFly() const { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; }
bool CanFly() const override { return (GetCreatureTemplate()->InhabitType & INHABIT_AIR) != 0; }
void SetReactState(ReactStates st) { m_reactState = st; }
ReactStates GetReactState() { return m_reactState; }
@@ -473,14 +473,14 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool isCanInteractWithBattleMaster(Player* player, bool msg) const;
bool isCanTrainingAndResetTalentsOf(Player* player) const;
bool CanCreatureAttack(Unit const* victim, bool force = true) const;
bool IsImmunedToSpell(SpellInfo const* spellInfo) const; // override Unit::IsImmunedToSpell
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // override Unit::IsImmunedToSpellEffect
bool IsImmunedToSpell(SpellInfo const* spellInfo) const override; // override Unit::IsImmunedToSpell
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override; // override Unit::IsImmunedToSpellEffect
bool isElite() const;
bool isWorldBoss() const;
bool IsDungeonBoss() const;
uint8 getLevelForTarget(WorldObject const* target) const; // overwrite Unit::getLevelForTarget for boss level support
uint8 getLevelForTarget(WorldObject const* target) const override; // overwrite Unit::getLevelForTarget for boss level support
bool IsInEvadeMode() const { return HasUnitState(UNIT_STATE_EVADE); }
@@ -489,7 +489,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
CreatureAI* AI() const { return (CreatureAI*)i_AI; }
SpellSchoolMask GetMeleeDamageSchoolMask() const { return m_meleeDamageSchoolMask; }
SpellSchoolMask GetMeleeDamageSchoolMask() const override { return m_meleeDamageSchoolMask; }
void SetMeleeDamageSchool(SpellSchools school) { m_meleeDamageSchoolMask = SpellSchoolMask(1 << school); }
void _AddCreatureSpellCooldown(uint32 spell_id, time_t end_time);
@@ -498,21 +498,21 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool HasSpellCooldown(uint32 spell_id) const;
bool HasCategoryCooldown(uint32 spell_id) const;
uint32 GetCreatureSpellCooldownDelay(uint32 spellId) const;
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
bool HasSpell(uint32 spellID) const;
bool HasSpell(uint32 spellID) const override;
bool UpdateEntry(uint32 entry, CreatureData const* data = nullptr);
void UpdateMovementFlags();
bool UpdateStats(Stats stat);
bool UpdateAllStats();
void UpdateResistances(uint32 school);
void UpdateArmor();
void UpdateMaxHealth();
void UpdateMaxPower(Powers power);
void UpdateAttackPowerAndDamage(bool ranged = false);
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void UpdateResistances(uint32 school) override;
void UpdateArmor() override;
void UpdateMaxHealth() override;
void UpdateMaxPower(Powers power) override;
void UpdateAttackPowerAndDamage(bool ranged = false) override;
void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float& minDamage, float& maxDamage) override;
void SetCanDualWield(bool value) override;
@@ -537,9 +537,9 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint32 GetScriptId() const;
// override WorldObject function for proper name localization
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const;
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override;
void setDeathState(DeathState s); // override virtual Unit::setDeathState
void setDeathState(DeathState s) override; // override virtual Unit::setDeathState
bool LoadFromDB(uint32 guid, Map* map) { return LoadCreatureFromDB(guid, map, false); }
bool LoadCreatureFromDB(uint32 guid, Map* map, bool addToMap = true);
@@ -551,6 +551,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
Loot loot;
void StartPickPocketRefillTimer();
void ResetPickPocketRefillTimer() { _pickpocketLootRestore = 0; }
bool CanGeneratePickPocketLoot() const { return _pickpocketLootRestore <= time(NULL); }
void SetSkinner(uint64 guid) { _skinner = guid; }
uint64 GetSkinner() const { return _skinner; } // Returns the player who skinned this creature
Player* GetLootRecipient() const;
@@ -606,7 +607,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
time_t GetRespawnTimeEx() const;
void SetRespawnTime(uint32 respawn) { m_respawnTime = respawn ? time(NULL) + respawn : 0; }
void Respawn(bool force = false);
void SaveRespawnTime();
void SaveRespawnTime() override;
uint32 GetRespawnDelay() const { return m_respawnDelay; }
void SetRespawnDelay(uint32 delay) { m_respawnDelay = delay; }
@@ -621,8 +622,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void SetInCombatWithZone();
bool hasQuest(uint32 quest_id) const;
bool hasInvolvedQuest(uint32 quest_id) const;
bool hasQuest(uint32 quest_id) const override;
bool hasInvolvedQuest(uint32 quest_id) const override;
bool isRegeneratingHealth() { return m_regenHealth; }
void setRegeneratingHealth(bool regenHealth) { m_regenHealth = regenHealth; }
@@ -673,7 +674,7 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
bool m_isTempWorldObject; //true when possessed
// Handling caster facing during spellcast
void SetTarget(uint64 guid);
void SetTarget(uint64 guid) override;
void FocusTarget(Spell const* focusSpell, WorldObject const* target);
void ReleaseFocus(Spell const* focusSpell);
@@ -725,8 +726,8 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
uint16 m_LootMode; // Bitmask (default: LOOT_MODE_DEFAULT) that determines what loot will be lootable
bool IsInvisibleDueToDespawn() const;
bool CanAlwaysSee(WorldObject const* obj) const;
bool IsInvisibleDueToDespawn() const override;
bool CanAlwaysSee(WorldObject const* obj) const override;
private:
void ForcedDespawn(uint32 timeMSToDespawn = 0);
@@ -747,7 +748,7 @@ class AssistDelayEvent : public BasicEvent
public:
AssistDelayEvent(uint64 victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { }
bool Execute(uint64 e_time, uint32 p_time);
bool Execute(uint64 e_time, uint32 p_time) override;
void AddAssistant(uint64 guid) { m_assistants.push_back(guid); }
private:
AssistDelayEvent();
@@ -761,7 +762,7 @@ class ForcedDespawnDelayEvent : public BasicEvent
{
public:
ForcedDespawnDelayEvent(Creature& owner) : BasicEvent(), m_owner(owner) { }
bool Execute(uint64 e_time, uint32 p_time);
bool Execute(uint64 e_time, uint32 p_time) override;
private:
Creature& m_owner;
@@ -42,13 +42,13 @@ class TempSummon : public Creature
public:
explicit TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
virtual ~TempSummon() { }
void Update(uint32 time);
void Update(uint32 time) override;
virtual void InitStats(uint32 lifetime);
virtual void InitSummon();
virtual void UnSummon(uint32 msTime = 0);
void RemoveFromWorld();
void RemoveFromWorld() override;
void SetTempSummonType(TempSummonType type);
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) { }
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) override { }
Unit* GetSummoner() const;
Creature* GetSummonerCreatureBase() const;
uint64 GetSummonerGUID() const { return m_summonerGUID; }
@@ -67,10 +67,10 @@ class Minion : public TempSummon
{
public:
Minion(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
void InitStats(uint32 duration);
void RemoveFromWorld();
void InitStats(uint32 duration) override;
void RemoveFromWorld() override;
Unit* GetOwner() const { return m_owner; }
float GetFollowAngle() const { return m_followAngle; }
float GetFollowAngle() const override { return m_followAngle; }
void SetFollowAngle(float angle) { m_followAngle = angle; }
bool IsPetGhoul() const {return GetEntry() == 26125;} // Ghoul may be guardian or pet
bool IsSpiritWolf() const {return GetEntry() == 29264;} // Spirit wolf from feral spirits
@@ -84,17 +84,17 @@ class Guardian : public Minion
{
public:
Guardian(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject);
void InitStats(uint32 duration);
void InitStats(uint32 duration) override;
bool InitStatsForLevel(uint8 level);
void InitSummon();
void InitSummon() override;
bool UpdateStats(Stats stat);
bool UpdateAllStats();
void UpdateResistances(uint32 school);
void UpdateArmor();
void UpdateMaxHealth();
void UpdateMaxPower(Powers power);
void UpdateAttackPowerAndDamage(bool ranged = false);
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void UpdateResistances(uint32 school) override;
void UpdateArmor() override;
void UpdateMaxHealth() override;
void UpdateMaxPower(Powers power) override;
void UpdateAttackPowerAndDamage(bool ranged = false) override;
void UpdateDamagePhysical(WeaponAttackType attType) override;
int32 GetBonusDamage() const { return m_bonusSpellDamage; }
@@ -108,17 +108,17 @@ class Puppet : public Minion
{
public:
Puppet(SummonPropertiesEntry const* properties, Unit* owner);
void InitStats(uint32 duration);
void InitSummon();
void Update(uint32 time);
void RemoveFromWorld();
void InitStats(uint32 duration) override;
void InitSummon() override;
void Update(uint32 time) override;
void RemoveFromWorld() override;
};
class ForcedUnsummonDelayEvent : public BasicEvent
{
public:
ForcedUnsummonDelayEvent(TempSummon& owner) : BasicEvent(), m_owner(owner) { }
bool Execute(uint64 e_time, uint32 p_time);
bool Execute(uint64 e_time, uint32 p_time) override;
private:
TempSummon& m_owner;
@@ -38,11 +38,11 @@ class DynamicObject : public WorldObject, public GridObject<DynamicObject>, publ
DynamicObject(bool isWorldObject);
~DynamicObject();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
bool CreateDynamicObject(uint32 guidlow, Unit* caster, SpellInfo const* spell, Position const& pos, float radius, DynamicObjectType type);
void Update(uint32 p_time);
void Update(uint32 p_time) override;
void Remove();
void SetDuration(int32 newDuration);
int32 GetDuration() const;
@@ -1800,14 +1800,14 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, bool triggered /*= true
trigger->setFaction(owner->getFaction());
// needed for GO casts for proper target validation checks
trigger->SetOwnerGUID(owner->GetGUID());
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, 0, 0, owner->GetGUID());
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, owner->GetGUID());
}
else
{
trigger->setFaction(14);
// Set owner guid for target if no owner available - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, 0, 0, target ? target->GetGUID() : 0);
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, target ? target->GetGUID() : 0);
}
}
@@ -638,14 +638,14 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
explicit GameObject();
~GameObject();
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
void AddToWorld();
void RemoveFromWorld();
void CleanupsBeforeDelete(bool finalCleanup = true);
void AddToWorld() override;
void RemoveFromWorld() override;
void CleanupsBeforeDelete(bool finalCleanup = true) override;
bool Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit = 0);
void Update(uint32 p_time);
void Update(uint32 p_time) override;
static GameObject* GetGameObject(WorldObject& object, uint64 guid);
GameObjectTemplate const* GetGOInfo() const { return m_goInfo; }
GameObjectData const* GetGOData() const { return m_goData; }
@@ -660,7 +660,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void UpdateRotationFields(float rotation2 = 0.0f, float rotation3 = 0.0f);
// overwrite WorldObject function for proper name localization
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const;
std::string const& GetNameForLocaleIdx(LocaleConstant locale_idx) const override;
void SaveToDB();
void SaveToDB(uint32 mapid, uint8 spawnMask, uint32 phaseMask);
@@ -760,7 +760,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
uint32 GetUseCount() const { return m_usetimes; }
uint32 GetUniqueUseCount() const { return m_unique_users.size(); }
void SaveRespawnTime();
void SaveRespawnTime() override;
Loot loot;
@@ -772,8 +772,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
uint32 m_groupLootTimer; // (msecs)timer used for group loot
uint32 lootingGroupLowGUID; // used to find group which is looting
bool hasQuest(uint32 quest_id) const;
bool hasInvolvedQuest(uint32 quest_id) const;
bool hasQuest(uint32 quest_id) const override;
bool hasInvolvedQuest(uint32 quest_id) const override;
bool ActivateToQuest(Player* target) const;
void UseDoorOrButton(uint32 time_to_restore = 0, bool alternative = false, Unit* user = NULL);
// 0 = use `gameobject`.`spawntimesecs`
@@ -783,10 +783,10 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
bool IsNeverVisible() const override;
bool IsAlwaysVisibleFor(WorldObject const* seer) const;
bool IsInvisibleDueToDespawn() const;
bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
bool IsInvisibleDueToDespawn() const override;
uint8 getLevelForTarget(WorldObject const* target) const
uint8 getLevelForTarget(WorldObject const* target) const override
{
if (Unit* owner = GetOwner())
return owner->getLevelForTarget(target);
@@ -831,10 +831,10 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
Transport* ToTransport() { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport*>(this); else return NULL; }
Transport const* ToTransport() const { if (GetGOInfo()->type == GAMEOBJECT_TYPE_MO_TRANSPORT) return reinterpret_cast<Transport const*>(this); else return NULL; }
float GetStationaryX() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
float GetStationaryY() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
float GetStationaryZ() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
float GetStationaryO() const { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
float GetStationaryX() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionX(); return GetPositionX(); }
float GetStationaryY() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionY(); return GetPositionY(); }
float GetStationaryZ() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetPositionZ(); return GetPositionZ(); }
float GetStationaryO() const override { if (GetGOInfo()->type != GAMEOBJECT_TYPE_MO_TRANSPORT) return m_stationaryPosition.GetOrientation(); return GetOrientation(); }
float GetInteractionDistance() const;
@@ -876,7 +876,7 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
void SwitchDoorOrButton(bool activate, bool alternative = false);
//! Object distance/size - overridden from Object::_IsWithinDist. Needs to take in account proper GO size.
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool /*is3D*/) const override
{
//! Following check does check 3d distance
return IsInRange(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), dist2compare);
@@ -32,10 +32,10 @@ class Bag : public Item
Bag();
~Bag();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
bool Create(uint32 guidlow, uint32 itemid, Player const* owner);
bool Create(uint32 guidlow, uint32 itemid, Player const* owner) override;
void Clear();
void StoreItem(uint8 slot, Item* pItem, bool update);
@@ -52,13 +52,13 @@ class Bag : public Item
// DB operations
// overwrite virtual Item::SaveToDB
void SaveToDB(SQLTransaction& trans);
void SaveToDB(SQLTransaction& trans) override;
// overwrite virtual Item::LoadFromDB
bool LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry);
bool LoadFromDB(uint32 guid, uint64 owner_guid, Field* fields, uint32 entry) override;
// overwrite virtual Item::DeleteFromDB
void DeleteFromDB(SQLTransaction& trans);
void DeleteFromDB(SQLTransaction& trans) override;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
protected:
+3 -3
View File
@@ -331,8 +331,8 @@ class Item : public Object
uState = state;
}
bool hasQuest(uint32 quest_id) const { return GetTemplate()->StartQuest == quest_id; }
bool hasInvolvedQuest(uint32 /*quest_id*/) const { return false; }
bool hasQuest(uint32 quest_id) const override { return GetTemplate()->StartQuest == quest_id; }
bool hasInvolvedQuest(uint32 /*quest_id*/) const override { return false; }
bool HasStats() const;
bool IsPotion() const { return GetTemplate()->IsPotion(); }
bool IsVellum() const { return GetTemplate()->IsVellum(); }
@@ -358,7 +358,7 @@ class Item : public Object
void ClearSoulboundTradeable(Player* currentOwner);
bool CheckSoulboundTradeExpire();
void BuildUpdate(UpdateDataMapType&);
void BuildUpdate(UpdateDataMapType&) override;
uint32 GetScriptId() const { return GetTemplate()->ScriptId; }
+1 -1
View File
@@ -121,7 +121,7 @@ Object::~Object()
}
delete [] m_uint32Values;
m_uint32Values = 0;
m_uint32Values = nullptr;
}
void Object::_InitValues()
+2 -2
View File
@@ -655,7 +655,7 @@ class WorldObject : public Object, public WorldLocation
virtual void Update (uint32 /*time_diff*/) { }
void _Create(uint32 guidlow, HighGuid guidhigh, uint32 phaseMask);
virtual void RemoveFromWorld();
virtual void RemoveFromWorld() override;
void GetNearPoint2D(float &x, float &y, float distance, float absAngle) const;
void GetNearPoint(WorldObject const* searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle) const;
@@ -792,7 +792,7 @@ class WorldObject : public Object, public WorldLocation
void DestroyForNearbyPlayers();
virtual void UpdateObjectVisibility(bool forced = true);
void BuildUpdate(UpdateDataMapType&);
void BuildUpdate(UpdateDataMapType&) override;
//relocation and visibility system functions
void AddToNotify(uint16 f) { m_notifyflags |= f;}
+13 -13
View File
@@ -43,10 +43,10 @@ class Pet : public Guardian
explicit Pet(Player* owner, PetType type = MAX_PET_TYPE);
virtual ~Pet();
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void SetDisplayId(uint32 modelId);
void SetDisplayId(uint32 modelId) override;
PetType getPetType() const { return m_petType; }
void setPetType(PetType type) { m_petType = type; }
@@ -60,16 +60,16 @@ class Pet : public Guardian
bool CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner);
bool CreateBaseAtTamed(CreatureTemplate const* cinfo, Map* map, uint32 phaseMask);
bool LoadPetFromDB(Player* owner, uint32 petentry = 0, uint32 petnumber = 0, bool current = false);
bool isBeingLoaded() const { return m_loading;}
bool isBeingLoaded() const override { return m_loading;}
void SavePetToDB(PetSaveMode mode);
void Remove(PetSaveMode mode, bool returnreagent = false);
static void DeleteFromDB(uint32 guidlow);
void setDeathState(DeathState s); // overwrite virtual Creature::setDeathState and Unit::setDeathState
void Update(uint32 diff); // overwrite virtual Creature::Update and Unit::Update
void setDeathState(DeathState s) override; // overwrite virtual Creature::setDeathState and Unit::setDeathState
void Update(uint32 diff) override; // overwrite virtual Creature::Update and Unit::Update
uint8 GetPetAutoSpellSize() const { return m_autospells.size(); }
uint32 GetPetAutoSpellOnPos(uint8 pos) const
uint8 GetPetAutoSpellSize() const override { return m_autospells.size(); }
uint32 GetPetAutoSpellOnPos(uint8 pos) const override
{
if (pos >= m_autospells.size())
return 0;
@@ -98,7 +98,7 @@ class Pet : public Guardian
void ToggleAutocast(SpellInfo const* spellInfo, bool apply);
bool HasSpell(uint32 spell) const;
bool HasSpell(uint32 spell) const override;
void LearnPetPassives();
void CastPetAuras(bool current);
@@ -119,7 +119,7 @@ class Pet : public Guardian
bool unlearnSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
bool removeSpell(uint32 spell_id, bool learn_prev, bool clear_ab = true);
void CleanupActionBar();
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
virtual void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
PetSpellMap m_spells;
AutoSpellList m_autospells;
@@ -127,7 +127,7 @@ class Pet : public Guardian
void InitPetCreateSpells();
bool resetTalents();
static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = NULL);
static void resetTalentsForAllPetsOf(Player* owner, Pet* online_pet = nullptr);
void InitTalentForLevel();
uint8 GetMaxTalentPointsForLevel(uint8 level);
@@ -156,11 +156,11 @@ class Pet : public Guardian
DeclinedName *m_declinedname;
private:
void SaveToDB(uint32, uint8, uint32) // override of Creature::SaveToDB - must not be called
void SaveToDB(uint32, uint8, uint32) override // override of Creature::SaveToDB - must not be called
{
ASSERT(false);
}
void DeleteFromDB() // override of Creature::DeleteFromDB - must not be called
void DeleteFromDB() override // override of Creature::DeleteFromDB - must not be called
{
ASSERT(false);
}
+103 -75
View File
@@ -376,7 +376,10 @@ void TradeData::SetMoney(uint64 money)
if (!m_player->HasEnoughMoney(money))
{
m_player->GetSession()->SendTradeStatus(TRADE_STATUS_BUSY);
TradeStatusInfo info;
info.Status = TRADE_STATUS_CLOSE_WINDOW;
info.Result = EQUIP_ERR_NOT_ENOUGH_MONEY;
m_player->GetSession()->SendTradeStatus(info);
return;
}
@@ -402,10 +405,12 @@ void TradeData::SetAccepted(bool state, bool crosssend /*= false*/)
if (!state)
{
TradeStatusInfo info;
info.Status = TRADE_STATUS_BACK_TO_TRADE;
if (crosssend)
m_trader->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
m_trader->GetSession()->SendTradeStatus(info);
else
m_player->GetSession()->SendTradeStatus(TRADE_STATUS_BACK_TO_TRADE);
m_player->GetSession()->SendTradeStatus(info);
}
}
@@ -1636,7 +1641,7 @@ void Player::Update(uint32 p_time)
else
{
q_status.Timer -= p_time;
m_QuestStatusSave[*iter] = true;
m_QuestStatusSave[*iter] = QUEST_DEFAULT_SAVE_TYPE;
++iter;
}
}
@@ -9113,18 +9118,27 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
{
if (loot->loot_type != LOOT_PICKPOCKETING)
{
creature->StartPickPocketRefillTimer();
loot->clear();
if (creature->CanGeneratePickPocketLoot())
{
creature->StartPickPocketRefillTimer();
loot->clear();
if (uint32 lootid = creature->GetCreatureTemplate()->pickpocketLootId)
loot->FillLoot(lootid, LootTemplates_Pickpocketing, this, true);
if (uint32 lootid = creature->GetCreatureTemplate()->pickpocketLootId)
loot->FillLoot(lootid, LootTemplates_Pickpocketing, this, true);
// Generate extra money for pick pocket loot
const uint32 a = urand(0, creature->getLevel()/2);
const uint32 b = urand(0, getLevel()/2);
loot->gold = uint32(10 * (a + b) * sWorld->getRate(RATE_DROP_MONEY));
permission = OWNER_PERMISSION;
}
// Generate extra money for pick pocket loot
const uint32 a = urand(0, creature->getLevel() / 2);
const uint32 b = urand(0, getLevel() / 2);
loot->gold = uint32(10 * (a + b) * sWorld->getRate(RATE_DROP_MONEY));
permission = OWNER_PERMISSION;
}
else
{
permission = NONE_PERMISSION;
SendLootError(guid, LOOT_ERROR_ALREADY_PICKPOCKETED);
return;
}
} // else - still has pickpocket loot generated & not fully taken
}
else
{
@@ -9203,8 +9217,6 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
}
}
SetLootGUID(guid);
// LOOT_INSIGNIA and LOOT_FISHINGHOLE unsupported by client
switch (loot_type)
{
@@ -9217,21 +9229,35 @@ void Player::SendLoot(uint64 guid, LootType loot_type)
// need know merged fishing/corpse loot type for achievements
loot->loot_type = loot_type;
WorldPacket data(SMSG_LOOT_RESPONSE, 8 + 1 + 50 + 1 + 1); // we guess size
data << uint64(guid);
data << uint8(loot_type);
data << LootView(*loot, this, permission);
SendDirectMessage(&data);
// add 'this' player as one of the players that are looting 'loot'
if (permission != NONE_PERMISSION)
{
SetLootGUID(guid);
WorldPacket data(SMSG_LOOT_RESPONSE, (9 + 50)); // we guess size
data << uint64(guid);
data << uint8(loot_type);
data << LootView(*loot, this, permission);
SendDirectMessage(&data);
// add 'this' player as one of the players that are looting 'loot'
loot->AddLooter(GetGUID());
}
else
SendLootError(GetLootGUID(), LOOT_ERROR_DIDNT_KILL);
if (loot_type == LOOT_CORPSE && !IS_ITEM_GUID(guid))
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_LOOTING);
}
void Player::SendLootError(uint64 guid, LootError error)
{
WorldPacket data(SMSG_LOOT_RESPONSE, 10);
data << uint64(guid);
data << uint8(LOOT_NONE);
data << uint8(error);
SendDirectMessage(&data);
}
void Player::SendNotifyLootMoneyRemoved()
{
WorldPacket data(SMSG_LOOT_CLEAR_MONEY, 0);
@@ -10613,7 +10639,7 @@ bool Player::HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32
return false;
}
InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count) const
InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count /*= NULL*/, uint32* itemLimitCategory /*= NULL*/) const
{
ItemTemplate const* pProto = sObjectMgr->GetItemTemplate(entry);
if (!pProto)
@@ -10659,6 +10685,8 @@ InventoryResult Player::CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item
{
if (no_space_count)
*no_space_count = count + curcount - limitEntry->maxCount;
if (itemLimitCategory)
*itemLimitCategory = pProto->ItemLimitCategory;
return EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS;
}
}
@@ -11161,61 +11189,61 @@ InventoryResult Player::CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &des
}
//////////////////////////////////////////////////////////////////////////
InventoryResult Player::CanStoreItems(Item** pItems, int count) const
InventoryResult Player::CanStoreItems(Item** items, int count, uint32* itemLimitCategory) const
{
Item* pItem2;
Item* item2;
// fill space table
int inv_slot_items[INVENTORY_SLOT_ITEM_END - INVENTORY_SLOT_ITEM_START];
int inv_bags[INVENTORY_SLOT_BAG_END - INVENTORY_SLOT_BAG_START][MAX_BAG_SIZE];
uint32 inventoryCounts[INVENTORY_SLOT_ITEM_END - INVENTORY_SLOT_ITEM_START];
uint32 bagCounts[INVENTORY_SLOT_BAG_END - INVENTORY_SLOT_BAG_START][MAX_BAG_SIZE];
memset(inv_slot_items, 0, sizeof(int) * (INVENTORY_SLOT_ITEM_END - INVENTORY_SLOT_ITEM_START));
memset(inv_bags, 0, sizeof(int) * (INVENTORY_SLOT_BAG_END - INVENTORY_SLOT_BAG_START) * MAX_BAG_SIZE);
memset(inventoryCounts, 0, sizeof(uint32) * (INVENTORY_SLOT_ITEM_END - INVENTORY_SLOT_ITEM_START));
memset(bagCounts, 0, sizeof(uint32) * (INVENTORY_SLOT_BAG_END - INVENTORY_SLOT_BAG_START) * MAX_BAG_SIZE);
for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
{
pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
if (pItem2 && !pItem2->IsInTrade())
inv_slot_items[i - INVENTORY_SLOT_ITEM_START] = pItem2->GetCount();
item2 = GetItemByPos(INVENTORY_SLOT_BAG_0, i);
if (item2 && !item2->IsInTrade())
inventoryCounts[i - INVENTORY_SLOT_ITEM_START] = item2->GetCount();
}
for (uint8 i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
if (Bag* pBag = GetBagByPos(i))
for (uint32 j = 0; j < pBag->GetBagSize(); j++)
{
pItem2 = GetItemByPos(i, j);
if (pItem2 && !pItem2->IsInTrade())
inv_bags[i - INVENTORY_SLOT_BAG_START][j] = pItem2->GetCount();
item2 = GetItemByPos(i, j);
if (item2 && !item2->IsInTrade())
bagCounts[i - INVENTORY_SLOT_BAG_START][j] = item2->GetCount();
}
// check free space for all items
for (int k = 0; k < count; ++k)
{
Item* pItem = pItems[k];
Item* item = items[k];
// no item
if (!pItem)
if (!item)
continue;
TC_LOG_DEBUG("entities.player.items", "STORAGE: CanStoreItems %i. item = %u, count = %u", k + 1, pItem->GetEntry(), pItem->GetCount());
ItemTemplate const* pProto = pItem->GetTemplate();
TC_LOG_DEBUG("entities.player.items", "STORAGE: CanStoreItems %i. item = %u, count = %u", k + 1, item->GetEntry(), item->GetCount());
ItemTemplate const* pProto = item->GetTemplate();
// strange item
if (!pProto)
return EQUIP_ERR_ITEM_NOT_FOUND;
// item used
if (pItem->m_lootGenerated)
if (item->m_lootGenerated)
return EQUIP_ERR_LOOT_GONE;
// item it 'bind'
if (pItem->IsBindedNotWith(this))
if (item->IsBindedNotWith(this))
return EQUIP_ERR_NOT_OWNER;
ItemTemplate const* pBagProto;
// item is 'one item only'
InventoryResult res = CanTakeMoreSimilarItems(pItem);
InventoryResult res = CanTakeMoreSimilarItems(item, itemLimitCategory);
if (res != EQUIP_ERR_OK)
return res;
@@ -11226,10 +11254,10 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
for (int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
{
pItem2 = GetItemByPos(INVENTORY_SLOT_BAG_0, t);
if (pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_slot_items[t-INVENTORY_SLOT_ITEM_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
item2 = GetItemByPos(INVENTORY_SLOT_BAG_0, t);
if (item2 && item2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inventoryCounts[t-INVENTORY_SLOT_ITEM_START] + item->GetCount() <= pProto->GetMaxStackSize())
{
inv_slot_items[t-INVENTORY_SLOT_ITEM_START] += pItem->GetCount();
inventoryCounts[t-INVENTORY_SLOT_ITEM_START] += item->GetCount();
b_found = true;
break;
}
@@ -11241,14 +11269,14 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
{
if (Bag* bag = GetBagByPos(t))
{
if (ItemCanGoIntoBag(pItem->GetTemplate(), bag->GetTemplate()))
if (ItemCanGoIntoBag(item->GetTemplate(), bag->GetTemplate()))
{
for (uint32 j = 0; j < bag->GetBagSize(); j++)
{
pItem2 = GetItemByPos(t, j);
if (pItem2 && pItem2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && inv_bags[t-INVENTORY_SLOT_BAG_START][j] + pItem->GetCount() <= pProto->GetMaxStackSize())
item2 = GetItemByPos(t, j);
if (item2 && item2->CanBeMergedPartlyWith(pProto) == EQUIP_ERR_OK && bagCounts[t-INVENTORY_SLOT_BAG_START][j] + item->GetCount() <= pProto->GetMaxStackSize())
{
inv_bags[t-INVENTORY_SLOT_BAG_START][j] += pItem->GetCount();
bagCounts[t-INVENTORY_SLOT_BAG_START][j] += item->GetCount();
b_found = true;
break;
}
@@ -11277,9 +11305,9 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
{
for (uint32 j = 0; j < bag->GetBagSize(); j++)
{
if (inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0)
if (bagCounts[t-INVENTORY_SLOT_BAG_START][j] == 0)
{
inv_bags[t-INVENTORY_SLOT_BAG_START][j] = 1;
bagCounts[t-INVENTORY_SLOT_BAG_START][j] = 1;
b_found = true;
break;
}
@@ -11295,9 +11323,9 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
bool b_found = false;
for (int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
{
if (inv_slot_items[t-INVENTORY_SLOT_ITEM_START] == 0)
if (inventoryCounts[t-INVENTORY_SLOT_ITEM_START] == 0)
{
inv_slot_items[t-INVENTORY_SLOT_ITEM_START] = 1;
inventoryCounts[t-INVENTORY_SLOT_ITEM_START] = 1;
b_found = true;
break;
}
@@ -11318,9 +11346,9 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
for (uint32 j = 0; j < bag->GetBagSize(); j++)
{
if (inv_bags[t-INVENTORY_SLOT_BAG_START][j] == 0)
if (bagCounts[t-INVENTORY_SLOT_BAG_START][j] == 0)
{
inv_bags[t-INVENTORY_SLOT_BAG_START][j] = 1;
bagCounts[t-INVENTORY_SLOT_BAG_START][j] = 1;
b_found = true;
break;
}
@@ -11330,7 +11358,7 @@ InventoryResult Player::CanStoreItems(Item** pItems, int count) const
// no free slot found?
if (!b_found)
return EQUIP_ERR_INV_FULL;
return EQUIP_ERR_BAG_FULL;
}
return EQUIP_ERR_OK;
@@ -13243,7 +13271,7 @@ void Player::AddItemToBuyBackSlot(Item* pItem)
// found empty
if (!m_items[i])
{
slot = i;
oldest_slot = i;
break;
}
@@ -15213,7 +15241,7 @@ void Player::AddQuest(Quest const* quest, Object* questGiver)
SetQuestSlot(log_slot, quest_id, qtime);
m_QuestStatusSave[quest_id] = true;
m_QuestStatusSave[quest_id] = QUEST_DEFAULT_SAVE_TYPE;
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_QUEST, quest_id);
@@ -15396,7 +15424,7 @@ void Player::RewardQuest(Quest const* quest, uint32 reward, Object* questGiver,
RemoveActiveQuest(quest_id, false);
m_RewardedQuests.insert(quest_id);
m_RewardedQuestsSave[quest_id] = true;
m_RewardedQuestsSave[quest_id] = QUEST_DEFAULT_SAVE_TYPE;
// StoreNewItem, mail reward, etc. save data directly to the database
// to prevent exploitable data desynchronisation we save the quest status to the database too
@@ -16044,7 +16072,7 @@ void Player::SetQuestStatus(uint32 questId, QuestStatus status, bool update /*=
if (sObjectMgr->GetQuestTemplate(questId))
{
m_QuestStatus[questId].Status = status;
m_QuestStatusSave[questId] = true;
m_QuestStatusSave[questId] = QUEST_DEFAULT_SAVE_TYPE;
}
if (update)
@@ -16057,7 +16085,7 @@ void Player::RemoveActiveQuest(uint32 questId, bool update /*= true*/)
if (itr != m_QuestStatus.end())
{
m_QuestStatus.erase(itr);
m_QuestStatusSave[questId] = false;
m_QuestStatusSave[questId] = QUEST_DELETE_SAVE_TYPE;
}
if (update)
@@ -16070,7 +16098,7 @@ void Player::RemoveRewardedQuest(uint32 questId, bool update /*= true*/)
if (rewItr != m_RewardedQuests.end())
{
m_RewardedQuests.erase(rewItr);
m_RewardedQuestsSave[questId] = false;
m_RewardedQuestsSave[questId] = QUEST_FORCE_DELETE_SAVE_TYPE;
}
if (update)
@@ -16236,7 +16264,7 @@ void Player::AdjustQuestReqItemCount(Quest const* quest, QuestStatusData& questS
uint32 curitemcount = GetItemCount(quest->RequiredItemId[i], true);
questStatusData.ItemCount[i] = std::min(curitemcount, reqitemcount);
m_QuestStatusSave[quest->GetQuestId()] = true;
m_QuestStatusSave[quest->GetQuestId()] = QUEST_DEFAULT_SAVE_TYPE;
}
}
}
@@ -16327,7 +16355,7 @@ void Player::AreaExploredOrEventHappens(uint32 questId)
if (!q_status.Explored)
{
q_status.Explored = true;
m_QuestStatusSave[questId] = true;
m_QuestStatusSave[questId] = QUEST_DEFAULT_SAVE_TYPE;
}
}
if (CanCompleteQuest(questId))
@@ -16380,7 +16408,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count)
if (curitemcount < reqitemcount)
{
q_status.ItemCount[j] = std::min<uint16>(q_status.ItemCount[j] + count, reqitemcount);
m_QuestStatusSave[questid] = true;
m_QuestStatusSave[questid] = QUEST_DEFAULT_SAVE_TYPE;
//SendQuestUpdateAddItem(qInfo, j, additemcount);
// FIXME: verify if there's any packet sent updating item
@@ -16427,7 +16455,7 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count)
if (newItemCount != q_status.ItemCount[j])
{
q_status.ItemCount[j] = newItemCount;
m_QuestStatusSave[questid] = true;
m_QuestStatusSave[questid] = QUEST_DEFAULT_SAVE_TYPE;
IncompleteQuest(questid);
}
return;
@@ -16495,7 +16523,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid /*= 0*/)
{
q_status.CreatureOrGOCount[j] = curkillcount + addkillcount;
m_QuestStatusSave[questid] = true;
m_QuestStatusSave[questid] = QUEST_DEFAULT_SAVE_TYPE;
SendQuestUpdateAddCreatureOrGo(qInfo, guid, j, curkillcount, addkillcount);
}
@@ -16537,7 +16565,7 @@ void Player::KilledPlayerCredit()
{
q_status.PlayerCount = curkill + addkillcount;
m_QuestStatusSave[questid] = true;
m_QuestStatusSave[questid] = QUEST_DEFAULT_SAVE_TYPE;
SendQuestUpdateAddPlayer(qInfo, curkill, addkillcount);
}
@@ -16589,7 +16617,7 @@ void Player::KillCreditGO(uint32 entry, uint64 guid)
{
q_status.CreatureOrGOCount[j] = curCastCount + addCastCount;
m_QuestStatusSave[questid] = true;
m_QuestStatusSave[questid] = QUEST_DEFAULT_SAVE_TYPE;
SendQuestUpdateAddCreatureOrGo(qInfo, guid, j, curCastCount, addCastCount);
}
@@ -16646,7 +16674,7 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid)
{
q_status.CreatureOrGOCount[j] = curTalkCount + addTalkCount;
m_QuestStatusSave[questid] = true;
m_QuestStatusSave[questid] = QUEST_DEFAULT_SAVE_TYPE;
SendQuestUpdateAddCreatureOrGo(qInfo, guid, j, curTalkCount, addTalkCount);
}
@@ -20008,7 +20036,7 @@ void Player::_SaveQuestStatus(SQLTransaction& trans)
for (saveItr = m_QuestStatusSave.begin(); saveItr != m_QuestStatusSave.end(); ++saveItr)
{
if (saveItr->second)
if (saveItr->second == QUEST_DEFAULT_SAVE_TYPE)
{
statusItr = m_QuestStatus.find(saveItr->first);
if (statusItr != m_QuestStatus.end() && (keepAbandoned || statusItr->second.Status != QUEST_STATUS_NONE))
@@ -20045,7 +20073,7 @@ void Player::_SaveQuestStatus(SQLTransaction& trans)
for (saveItr = m_RewardedQuestsSave.begin(); saveItr != m_RewardedQuestsSave.end(); ++saveItr)
{
if (saveItr->second)
if (saveItr->second == QUEST_DEFAULT_SAVE_TYPE)
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_QUESTSTATUS_REWARDED);
stmt->setUInt32(0, GetGUIDLow());
@@ -20053,7 +20081,7 @@ void Player::_SaveQuestStatus(SQLTransaction& trans)
trans->Append(stmt);
}
else if (!keepAbandoned)
else if (saveItr->second == QUEST_FORCE_DELETE_SAVE_TYPE || !keepAbandoned)
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_QUESTSTATUS_REWARDED_BY_QUEST);
stmt->setUInt32(0, GetGUIDLow());
+60 -38
View File
@@ -606,8 +606,16 @@ enum AtLoginFlags
typedef std::map<uint32, QuestStatusData> QuestStatusMap;
typedef std::set<uint32> RewardedQuestSet;
// quest, keep
typedef std::map<uint32, bool> QuestStatusSaveMap;
enum QuestSaveType
{
QUEST_DEFAULT_SAVE_TYPE = 0,
QUEST_DELETE_SAVE_TYPE,
QUEST_FORCE_DELETE_SAVE_TYPE
};
// quest
typedef std::map<uint32, QuestSaveType> QuestStatusSaveMap;
enum QuestSlotOffsets
{
@@ -1061,6 +1069,19 @@ struct BGData
bool HasTaxiPath() const { return taxiPath[0] && taxiPath[1]; }
};
struct TradeStatusInfo
{
TradeStatusInfo() : Status(TRADE_STATUS_BUSY), TraderGuid(0), Result(EQUIP_ERR_OK),
IsTargetResult(false), ItemLimitCategoryId(0), Slot(0) { }
TradeStatus Status;
ObjectGuid TraderGuid;
InventoryResult Result;
bool IsTargetResult;
uint32 ItemLimitCategoryId;
uint8 Slot;
};
struct VoidStorageItem
{
VoidStorageItem()
@@ -1232,12 +1253,12 @@ class Player : public Unit, public GridObject<Player>
explicit Player(WorldSession* session);
~Player();
void CleanupsBeforeDelete(bool finalCleanup = true);
void CleanupsBeforeDelete(bool finalCleanup = true) override;
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void SetObjectScale(float scale)
void SetObjectScale(float scale) override
{
Unit::SetObjectScale(scale);
SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, scale * DEFAULT_WORLD_OBJECT_SIZE);
@@ -1253,14 +1274,14 @@ class Player : public Unit, public GridObject<Player>
bool Create(uint32 guidlow, CharacterCreateInfo* createInfo);
void Update(uint32 time);
void Update(uint32 time) override;
static bool BuildEnumData(PreparedQueryResult result, ByteBuffer* dataBuffer, ByteBuffer* bitBuffer);
void SetInWater(bool apply);
bool IsInWater() const { return m_isInWater; }
bool IsUnderWater() const;
bool IsInWater() const override { return m_isInWater; }
bool IsUnderWater() const override;
void SendInitialPacketsBeforeAddToMap();
void SendInitialPacketsAfterAddToMap();
@@ -1319,7 +1340,7 @@ class Player : public Unit, public GridObject<Player>
uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; }
uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; }
void setDeathState(DeathState s); // overwrite Unit::setDeathState
void setDeathState(DeathState s) override; // overwrite Unit::setDeathState
void InnEnter(time_t time, uint32 mapid, float x, float y, float z);
@@ -1356,7 +1377,7 @@ class Player : public Unit, public GridObject<Player>
/*********************************************************/
void SetVirtualItemSlot(uint8 i, Item* item);
void SetSheath(SheathState sheathed); // overwrite Unit version
void SetSheath(SheathState sheathed) override; // overwrite Unit version
uint8 FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) const;
uint32 GetItemCount(uint32 item, bool inBankAlso = false, Item* skipItem = NULL) const;
uint32 GetItemCountWithLimitCategory(uint32 limitCategory, Item* skipItem = NULL) const;
@@ -1386,11 +1407,11 @@ class Player : public Unit, public GridObject<Player>
bool CanNoReagentCast(SpellInfo const* spellInfo) const;
bool HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_slot = NULL_SLOT) const;
bool HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 count, uint8 except_slot = NULL_SLOT) const;
InventoryResult CanTakeMoreSimilarItems(Item* pItem) const { return CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem); }
InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count) const { return CanTakeMoreSimilarItems(entry, count, NULL); }
InventoryResult CanTakeMoreSimilarItems(Item* pItem, uint32* itemLimitCategory = NULL) const { return CanTakeMoreSimilarItems(pItem->GetEntry(), pItem->GetCount(), pItem, NULL, itemLimitCategory); }
InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count, uint32* itemLimitCategory = NULL) const { return CanTakeMoreSimilarItems(entry, count, NULL, NULL, itemLimitCategory); }
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 item, uint32 count, uint32* no_space_count = NULL) const;
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, Item* pItem, bool swap = false) const;
InventoryResult CanStoreItems(Item** pItem, int count) const;
InventoryResult CanStoreItems(Item** items, int count, uint32* itemLimitCategory) const;
InventoryResult CanEquipNewItem(uint8 slot, uint16& dest, uint32 item, bool swap) const;
InventoryResult CanEquipItem(uint8 slot, uint16& dest, Item* pItem, bool swap, bool not_loading = true) const;
@@ -1414,7 +1435,7 @@ class Player : public Unit, public GridObject<Player>
void AutoStoreLoot(uint32 loot_id, LootStore const& store, bool broadcast = false) { AutoStoreLoot(NULL_BAG, NULL_SLOT, loot_id, store, broadcast); }
void StoreLootItem(uint8 lootSlot, Loot* loot);
InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const;
InventoryResult CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL, uint32* itemLimitCategory = NULL) const;
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item* pItem = NULL, bool swap = false, uint32* no_space_count = NULL) const;
void AddRefundReference(uint32 it);
@@ -1653,7 +1674,7 @@ class Player : public Unit, public GridObject<Player>
/*********************************************************/
bool LoadFromDB(uint32 guid, SQLQueryHolder *holder);
bool isBeingLoaded() const;
bool isBeingLoaded() const override;
void Initialize(uint32 guid);
static uint32 GetUInt32ValueFromArray(Tokenizer const& data, uint16 index);
@@ -1758,7 +1779,7 @@ class Player : public Unit, public GridObject<Player>
void PossessSpellInitialize();
void VehicleSpellInitialize();
void SendRemoveControlBar();
bool HasSpell(uint32 spell) const;
bool HasSpell(uint32 spell) const override;
bool HasActiveSpell(uint32 spell) const; // show in spellbook
TrainerSpellState GetTrainerSpellState(TrainerSpell const* trainer_spell) const;
bool IsSpellFitByClassAndRace(uint32 spell_id) const;
@@ -1854,7 +1875,7 @@ class Player : public Unit, public GridObject<Player>
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
void ModifySpellCooldown(uint32 spellId, int32 cooldown);
void SendCooldownEvent(SpellInfo const* spellInfo, uint32 itemId = 0, Spell* spell = NULL, bool setCooldown = true);
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs);
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override;
void RemoveSpellCooldown(uint32 spell_id, bool update = false);
void RemoveSpellCategoryCooldown(uint32 cat, bool update = false);
void SendClearCooldown(uint32 spell_id, Unit* target);
@@ -1975,14 +1996,14 @@ class Player : public Unit, public GridObject<Player>
float GetHealthBonusFromStamina();
float GetManaBonusFromIntellect();
bool UpdateStats(Stats stat);
bool UpdateAllStats();
bool UpdateStats(Stats stat) override;
bool UpdateAllStats() override;
void ApplySpellPenetrationBonus(int32 amount, bool apply);
void UpdateResistances(uint32 school);
void UpdateArmor();
void UpdateMaxHealth();
void UpdateMaxPower(Powers power);
void UpdateAttackPowerAndDamage(bool ranged = false);
void UpdateResistances(uint32 school) override;
void UpdateArmor() override;
void UpdateMaxHealth() override;
void UpdateMaxPower(Powers power) override;
void UpdateAttackPowerAndDamage(bool ranged = false) override;
void ApplySpellPowerBonus(int32 amount, bool apply);
void UpdateSpellDamageAndHealingBonus();
void ApplyRatingMod(CombatRating cr, int32 value, bool apply);
@@ -2032,8 +2053,8 @@ class Player : public Unit, public GridObject<Player>
WorldSession* GetSession() const { return m_session; }
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const;
void DestroyForPlayer(Player* target, bool onDeath = false) const;
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
void DestroyForPlayer(Player* target, bool onDeath = false) const override;
void SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool recruitAFriend = false, float group_rate=1.0f);
// notifiers
@@ -2052,14 +2073,14 @@ class Player : public Unit, public GridObject<Player>
void SendResetInstanceFailed(uint32 reason, uint32 MapId);
void SendResetFailedNotify(uint32 mapid);
virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false);
virtual bool UpdatePosition(float x, float y, float z, float orientation, bool teleport = false) override;
bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); }
void UpdateUnderwaterState(Map* m, float x, float y, float z);
void UpdateUnderwaterState(Map* m, float x, float y, float z) override;
void SendMessageToSet(WorldPacket* data, bool self) {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
void SendMessageToSetInRange(WorldPacket* data, float fist, bool self);// overwrite Object::SendMessageToSetInRange
void SendMessageToSet(WorldPacket* data, bool self) override {SendMessageToSetInRange(data, GetVisibilityRange(), self); };// overwrite Object::SendMessageToSet
void SendMessageToSetInRange(WorldPacket* data, float fist, bool self) override;// overwrite Object::SendMessageToSetInRange
void SendMessageToSetInRange(WorldPacket* data, float dist, bool self, bool own_team_only);
void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr);
void SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) override;
Corpse* GetCorpse() const;
void SpawnCorpseBones();
@@ -2221,6 +2242,7 @@ class Player : public Unit, public GridObject<Player>
std::vector<ItemSetEffect*> ItemSetEff;
void SendLoot(uint64 guid, LootType loot_type);
void SendLootError(uint64 guid, LootError error);
void SendLootRelease(uint64 guid);
void SendNotifyLootItemRemoved(uint8 lootSlot);
void SendNotifyLootMoneyRemoved();
@@ -2360,12 +2382,12 @@ class Player : public Unit, public GridObject<Player>
bool HaveAtClient(WorldObject const* u) const;
bool IsNeverVisible() const;
bool IsNeverVisible() const override;
bool IsVisibleGloballyFor(Player const* player) const;
void SendInitialVisiblePackets(Unit* target);
void UpdateObjectVisibility(bool forced = true);
void UpdateObjectVisibility(bool forced = true) override;
void UpdateVisibilityForPlayer();
void UpdateVisibilityOf(WorldObject* target);
void UpdateTriggerVisibility();
@@ -2462,8 +2484,8 @@ class Player : public Unit, public GridObject<Player>
MapReference &GetMapRef() { return m_mapRef; }
// Set map to player and add reference
void SetMap(Map* map);
void ResetMap();
void SetMap(Map* map) override;
void ResetMap() override;
bool isAllowedToLoot(const Creature* creature);
@@ -2822,9 +2844,9 @@ class Player : public Unit, public GridObject<Player>
Runes *m_runes;
EquipmentSets m_EquipmentSets;
bool CanAlwaysSee(WorldObject const* obj) const;
bool CanAlwaysSee(WorldObject const* obj) const override;
bool IsAlwaysDetectableFor(WorldObject const* seer) const;
bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
uint8 m_grantableLevels;
+12 -12
View File
@@ -40,25 +40,25 @@ class Totem : public Minion
public:
Totem(SummonPropertiesEntry const* properties, Unit* owner);
virtual ~Totem() { }
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
void UnSummon(uint32 msTime = 0);
void Update(uint32 time) override;
void InitStats(uint32 duration) override;
void InitSummon() override;
void UnSummon(uint32 msTime = 0) override;
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }
TotemType GetTotemType() const { return m_type; }
bool UpdateStats(Stats /*stat*/) { return true; }
bool UpdateAllStats() { return true; }
void UpdateResistances(uint32 /*school*/) { }
void UpdateArmor() { }
void UpdateMaxHealth() { }
void UpdateMaxPower(Powers /*power*/) { }
void UpdateAttackPowerAndDamage(bool /*ranged*/) { }
bool UpdateStats(Stats /*stat*/) override { return true; }
bool UpdateAllStats() override { return true; }
void UpdateResistances(uint32 /*school*/) override { }
void UpdateArmor() override { }
void UpdateMaxHealth() override { }
void UpdateMaxPower(Powers /*power*/) override { }
void UpdateAttackPowerAndDamage(bool /*ranged*/) override { }
void UpdateDamagePhysical(WeaponAttackType /*attType*/) override { }
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const;
bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const override;
protected:
TotemType m_type;
+1 -3
View File
@@ -11983,7 +11983,7 @@ void Unit::DeleteCharmInfo()
}
CharmInfo::CharmInfo(Unit* unit)
: _unit(unit), _CommandState(COMMAND_FOLLOW), _petnumber(0), _barInit(false), _oldReactState(REACT_PASSIVE),
: _unit(unit), _CommandState(COMMAND_FOLLOW), _petnumber(0), _oldReactState(REACT_PASSIVE),
_isCommandAttack(false), _isCommandFollow(false), _isAtStay(false), _isFollowing(false), _isReturning(false),
_stayX(0.0f), _stayY(0.0f), _stayZ(0.0f)
{
@@ -13651,8 +13651,6 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (creature)
{
Loot* loot = &creature->loot;
if (creature->loot.loot_type == LOOT_PICKPOCKETING)
creature->ResetPickPocketRefillTimer();
loot->clear();
if (uint32 lootid = creature->GetCreatureTemplate()->lootid)
+9 -10
View File
@@ -1211,7 +1211,6 @@ struct CharmInfo
CharmSpellInfo _charmspells[4];
CommandStates _CommandState;
uint32 _petnumber;
bool _barInit;
//for restoration after charmed
ReactStates _oldReactState;
@@ -1302,8 +1301,8 @@ class Unit : public WorldObject
UnitAI* GetAI() { return i_AI; }
void SetAI(UnitAI* newAI) { i_AI = newAI; }
void AddToWorld();
void RemoveFromWorld();
void AddToWorld() override;
void RemoveFromWorld() override;
void CleanupBeforeRemoveFromMap(bool finalCleanup);
void CleanupsBeforeDelete(bool finalCleanup = true) override; // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units)
@@ -1318,7 +1317,7 @@ class Unit : public WorldObject
float GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const;
float GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const;
virtual void Update(uint32 time);
virtual void Update(uint32 time) override;
void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; }
void resetAttackTimer(WeaponAttackType type = BASE_ATTACK);
@@ -1374,7 +1373,7 @@ class Unit : public WorldObject
bool IsVehicle() const { return (m_unitTypeMask & UNIT_MASK_VEHICLE) != 0; }
uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
uint8 getLevelForTarget(WorldObject const* /*target*/) const { return getLevel(); }
uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return getLevel(); }
void SetLevel(uint8 lvl);
uint8 getRace() const { return GetByteValue(UNIT_FIELD_BYTES_0, 0); }
uint32 getRaceMask() const { return 1 << (getRace()-1); }
@@ -1929,7 +1928,7 @@ class Unit : public WorldObject
// common function for visibility checks for player/creatures with detection code
void SetInPhase(uint32 id, bool update, bool apply);
void UpdateObjectVisibility(bool forced = true);
void UpdateObjectVisibility(bool forced = true) override;
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];
uint32 m_lastSanctuaryTime;
@@ -2114,7 +2113,7 @@ class Unit : public WorldObject
bool IsOnVehicle(const Unit* vehicle) const;
Unit* GetVehicleBase() const;
Creature* GetVehicleCreatureBase() const;
uint64 GetTransGUID() const;
uint64 GetTransGUID() const override;
/// Returns the transport this unit is on directly (if on vehicle and transport, return vehicle)
TransportBase* GetDirectTransport() const;
@@ -2170,7 +2169,7 @@ class Unit : public WorldObject
protected:
explicit Unit (bool isWorldObject);
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const;
void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const override;
UnitAI* i_AI, *i_disabledAI;
@@ -2239,8 +2238,8 @@ class Unit : public WorldObject
uint32 m_unitTypeMask;
LiquidTypeEntry const* _lastLiquid;
bool IsAlwaysVisibleFor(WorldObject const* seer) const;
bool IsAlwaysDetectableFor(WorldObject const* seer) const;
bool IsAlwaysVisibleFor(WorldObject const* seer) const override;
bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
void DisableSpline();
private:
+4 -4
View File
@@ -89,7 +89,7 @@ class Vehicle : public TransportBase
void InitMovementInfoForBase();
/// This method transforms supplied transport offsets into global coordinates
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const override
{
TransportBase::CalculatePassengerPosition(x, y, z, o,
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
@@ -97,7 +97,7 @@ class Vehicle : public TransportBase
}
/// This method transforms supplied global coordinates into local offsets
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const override
{
TransportBase::CalculatePassengerOffset(x, y, z, o,
GetBase()->GetPositionX(), GetBase()->GetPositionY(),
@@ -126,8 +126,8 @@ class VehicleJoinEvent : public BasicEvent
protected:
VehicleJoinEvent(Vehicle* v, Unit* u) : Target(v), Passenger(u), Seat(Target->Seats.end()) { }
~VehicleJoinEvent();
bool Execute(uint64, uint32);
void Abort(uint64);
bool Execute(uint64, uint32) override;
void Abort(uint64) override;
Vehicle* Target;
Unit* Passenger;
+4 -4
View File
@@ -34,24 +34,24 @@ class GridState
class InvalidState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class ActiveState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class IdleState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
class RemovalState : public GridState
{
public:
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const;
void Update(Map &, NGridType &, GridInfo &, uint32 t_diff) const override;
};
#endif
+1 -1
View File
@@ -133,7 +133,7 @@ class Roll : public LootValidatorRef
~Roll();
void setLoot(Loot* pLoot);
Loot* getLoot();
void targetObjectBuildLink();
void targetObjectBuildLink() override;
uint64 itemGUID;
uint32 itemid;
+3 -3
View File
@@ -28,9 +28,9 @@ class GroupReference : public Reference<Group, Player>
{
protected:
uint8 iSubGroup;
void targetObjectBuildLink();
void targetObjectDestroyLink();
void sourceObjectDestroyLink();
void targetObjectBuildLink() override;
void targetObjectDestroyLink() override;
void sourceObjectDestroyLink() override;
public:
GroupReference() : Reference<Group, Player>(), iSubGroup(0) { }
~GroupReference() { unlink(); }
+19 -19
View File
@@ -458,8 +458,8 @@ private:
~EventLogEntry() { }
void SaveToDB(SQLTransaction& trans) const;
void WritePacket(WorldPacket& data, ByteBuffer& content) const;
void SaveToDB(SQLTransaction& trans) const override;
void WritePacket(WorldPacket& data, ByteBuffer& content) const override;
private:
GuildEventLogTypes m_eventType;
@@ -496,8 +496,8 @@ private:
~BankEventLogEntry() { }
void SaveToDB(SQLTransaction& trans) const;
void WritePacket(WorldPacket& data, ByteBuffer& content) const;
void SaveToDB(SQLTransaction& trans) const override;
void WritePacket(WorldPacket& data, ByteBuffer& content) const override;
private:
GuildBankEventLogTypes m_eventType;
@@ -711,13 +711,13 @@ private:
PlayerMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) :
MoveItemData(guild, player, container, slotId) { }
bool IsBank() const { return false; }
bool InitItem();
void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount = 0);
Item* StoreItem(SQLTransaction& trans, Item* pItem);
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const;
bool IsBank() const override { return false; }
bool InitItem() override;
void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount = 0) override;
Item* StoreItem(SQLTransaction& trans, Item* pItem) override;
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const override;
protected:
InventoryResult CanStore(Item* pItem, bool swap);
InventoryResult CanStore(Item* pItem, bool swap) override;
};
class BankMoveItemData : public MoveItemData
@@ -726,17 +726,17 @@ private:
BankMoveItemData(Guild* guild, Player* player, uint8 container, uint8 slotId) :
MoveItemData(guild, player, container, slotId) { }
bool IsBank() const { return true; }
bool InitItem();
bool HasStoreRights(MoveItemData* pOther) const;
bool HasWithdrawRights(MoveItemData* pOther) const;
void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount);
Item* StoreItem(SQLTransaction& trans, Item* pItem);
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const;
void LogAction(MoveItemData* pFrom) const;
bool IsBank() const override { return true; }
bool InitItem() override;
bool HasStoreRights(MoveItemData* pOther) const override;
bool HasWithdrawRights(MoveItemData* pOther) const override;
void RemoveItem(SQLTransaction& trans, MoveItemData* pOther, uint32 splitedAmount) override;
Item* StoreItem(SQLTransaction& trans, Item* pItem) override;
void LogBankEvent(SQLTransaction& trans, MoveItemData* pFrom, uint32 count) const override;
void LogAction(MoveItemData* pFrom) const override;
protected:
InventoryResult CanStore(Item* pItem, bool swap);
InventoryResult CanStore(Item* pItem, bool swap) override;
private:
Item* _StoreItem(SQLTransaction& trans, BankTab* pTab, Item* pItem, ItemPosCount& pos, bool clone) const;
+21 -8
View File
@@ -83,10 +83,9 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recvData)
Creature* creature = GetPlayer()->GetMap()->GetCreature(lguid);
bool lootAllowed = creature && creature->IsAlive() == (player->getClass() == CLASS_ROGUE && creature->loot.loot_type == LOOT_PICKPOCKETING);
if (!lootAllowed || !creature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
{
player->SendLootRelease(lguid);
player->SendLootError(lguid, lootAllowed ? LOOT_ERROR_TOO_FAR : LOOT_ERROR_DIDNT_KILL);
return;
}
@@ -156,6 +155,8 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket& /*recvData*/)
if (creature->IsAlive())
shareMoney = false;
}
else
player->SendLootError(guid, lootAllowed ? LOOT_ERROR_TOO_FAR : LOOT_ERROR_DIDNT_KILL);
break;
}
default:
@@ -403,21 +404,28 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
if (!_player->GetGroup() || _player->GetGroup()->GetMasterLooterGuid() != _player->GetGUID() || _player->GetGroup()->GetLootMethod() != MASTER_LOOT)
{
_player->SendLootRelease(GetPlayer()->GetLootGUID());
_player->SendLootError(lootguid, LOOT_ERROR_DIDNT_KILL);
return;
}
Player* target = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(target_playerguid, 0, HIGHGUID_PLAYER));
if (!target)
{
_player->SendLootError(lootguid, LOOT_ERROR_PLAYER_NOT_FOUND);
return;
}
TC_LOG_DEBUG("network", "WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName().c_str());
if (_player->GetLootGUID() != lootguid)
{
_player->SendLootError(lootguid, LOOT_ERROR_DIDNT_KILL);
return;
}
if (!_player->IsInRaidWith(target) || !_player->IsInMap(target))
{
_player->SendLootError(lootguid, LOOT_ERROR_MASTER_OTHER);
TC_LOG_INFO("loot", "MasterLootItem: Player %s tried to give an item to ineligible player %s !", GetPlayer()->GetName().c_str(), target->GetName().c_str());
return;
}
@@ -459,16 +467,21 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
msg = EQUIP_ERR_CANT_EQUIP_EVER;
if (msg != EQUIP_ERR_OK)
{
if (msg == EQUIP_ERR_ITEM_MAX_COUNT)
_player->SendLootError(lootguid, LOOT_ERROR_MASTER_UNIQUE_ITEM);
else if (msg == EQUIP_ERR_INV_FULL)
_player->SendLootError(lootguid, LOOT_ERROR_MASTER_INV_FULL);
else
_player->SendLootError(lootguid, LOOT_ERROR_MASTER_OTHER);
target->SendEquipError(msg, NULL, NULL, item.itemid);
// send duplicate of error massage to master looter
_player->SendEquipError(msg, NULL, NULL, item.itemid);
return;
}
// list of players allowed to receive this item in trade
AllowedLooterSet looters = item.GetAllowedLooters();
// not move item from loot to target inventory
// now move item from loot to target inventory
Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomPropertyId, looters);
target->SendNewItem(newitem, uint32(item.count), false, false, true);
target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, item.itemid, item.count);
@@ -476,8 +489,8 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket& recvData)
target->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM, item.itemid, item.count);
// mark as looted
item.count=0;
item.is_looted=true;
item.count = 0;
item.is_looted = true;
loot->NotifyItemRemoved(slotid);
--loot->unlootedCount;
+1 -1
View File
@@ -578,7 +578,7 @@ void WorldSession::HandleSelfResOpcode(WorldPacket& /*recvData*/)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL));
if (spellInfo)
_player->CastSpell(_player, spellInfo, false, 0);
_player->CastSpell(_player, spellInfo, false, nullptr);
_player->SetUInt32Value(PLAYER_SELF_RES_SPELL, 0);
}
+119 -91
View File
@@ -30,43 +30,50 @@
#include "Language.h"
#include "AccountMgr.h"
void WorldSession::SendTradeStatus(TradeStatus status, int8 clearSlot)
void WorldSession::SendTradeStatus(TradeStatusInfo const& info)
{
WorldPacket data;
Player* trader = GetPlayer()->GetTrader();
data.Initialize(SMSG_TRADE_STATUS, 1+4+4);
WorldPacket data(SMSG_TRADE_STATUS, 13);
data.WriteBit(trader ? (trader->GetSession()->GetBattlenetAccountId() == GetBattlenetAccountId()) : 0); // IsSameBnetAccount, used for trading heirlooms and other battle.net bound items with your other accounts
data.WriteBits(status, 5);
data.WriteBits(info.Status, 5);
switch (status)
switch (info.Status)
{
case TRADE_STATUS_BEGIN_TRADE:
data.WriteBits(0, 8); // Trader Guid
data.FlushBits();
data.WriteBit(info.TraderGuid[2]);
data.WriteBit(info.TraderGuid[4]);
data.WriteBit(info.TraderGuid[6]);
data.WriteBit(info.TraderGuid[0]);
data.WriteBit(info.TraderGuid[1]);
data.WriteBit(info.TraderGuid[3]);
data.WriteBit(info.TraderGuid[7]);
data.WriteBit(info.TraderGuid[5]);
data.WriteByteSeq(info.TraderGuid[4]);
data.WriteByteSeq(info.TraderGuid[1]);
data.WriteByteSeq(info.TraderGuid[2]);
data.WriteByteSeq(info.TraderGuid[3]);
data.WriteByteSeq(info.TraderGuid[0]);
data.WriteByteSeq(info.TraderGuid[7]);
data.WriteByteSeq(info.TraderGuid[6]);
data.WriteByteSeq(info.TraderGuid[5]);
break;
case TRADE_STATUS_OPEN_WINDOW:
data.FlushBits();
data << uint32(0); // Trade Id
data << uint32(0); // CGTradeInfo::m_tradeID
break;
case TRADE_STATUS_CLOSE_WINDOW:
data.WriteBit(0); // Error bool (0 = Target, 1 = Self)
data.FlushBits();
data << uint32(0); // Error Item (Relevant item to the error)
data << uint32(0); // InventoryResult
data.WriteBit(info.IsTargetResult); // bool isTargetError; used for: EQUIP_ERR_BAG_FULL, EQUIP_ERR_CANT_CARRY_MORE_OF_THIS, EQUIP_ERR_MISSING_REAGENT, EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED
data << uint32(info.Result); // InventoryResult
data << uint32(info.ItemLimitCategoryId); // ItemLimitCategory.dbc entry
break;
case TRADE_STATUS_ONLY_CONJURED: // Not Implemented
case TRADE_STATUS_NOT_ELIGIBLE:
// Used when trading loot soulbound items with people that are not eligible (TRADE_STATUS_NOT_ELIGIBLE),
// and when trying to trade items with players in other realms when in a cross realm BG, you can only trade conjured goods with them (TRADE_STATUS_ONLY_CONJURED)
data.FlushBits();
data << int8(clearSlot); // Trade slot to clear, -1 = Clear the money amount
case TRADE_STATUS_WRONG_REALM:
case TRADE_STATUS_NOT_ON_TAPLIST:
data << uint8(info.Slot); // Trade slot; -1 here clears CGTradeInfo::m_tradeMoney
break;
case TRADE_STATUS_CURRENCY: // Not implemented
case TRADE_STATUS_CURRENCY_NOT_TRADABLE: // Not implemented
// Blizzard never implemented these, you can only trade currency with the field9 & 1 in CurrencyTypes.DBC, and only two test currencies have that flag
data.FlushBits();
data << uint32(0); // Trading Currency Id
data << uint32(0); // Trading Currency Amount
default:
@@ -99,7 +106,7 @@ void WorldSession::SendUpdateTrade(bool trader_data /*= true*/)
++count;
WorldPacket data(SMSG_TRADE_STATUS_EXTENDED, 4*6 + 8 + 1 + 3 + count * 70);
data << uint32(0); // this value must be equal to value from TRADE_STATUS_OPEN_WINDOW status packet (different value for different players to block multiple trades?)
data << uint32(0); // CGTradeInfo::m_tradeID
data << uint32(0); // unk 2
data << uint64(view_trade->GetMoney()); // trader gold
data << uint32(view_trade->GetSpell()); // spell casted on lowest slot item
@@ -337,14 +344,15 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
Item* myItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
Item* hisItems[TRADE_SLOT_TRADED_COUNT] = { NULL, NULL, NULL, NULL, NULL, NULL };
bool myCanCompleteTrade = true, hisCanCompleteTrade = true;
// set before checks for propertly undo at problems (it already set in to client)
my_trade->SetAccepted(true);
TradeStatusInfo info;
if (!_player->IsWithinDistInMap(trader, TRADE_DISTANCE, false))
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
info.Status = TRADE_STATUS_TARGET_TO_FAR;
SendTradeStatus(info);
my_trade->SetAccepted(false);
return;
}
@@ -352,7 +360,9 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
// not accept case incorrect money amount
if (!_player->HasEnoughMoney(my_trade->GetMoney()))
{
SendNotification(LANG_NOT_ENOUGH_GOLD);
info.Status = TRADE_STATUS_CLOSE_WINDOW;
info.Result = EQUIP_ERR_NOT_ENOUGH_MONEY;
SendTradeStatus(info);
my_trade->SetAccepted(false, true);
return;
}
@@ -360,21 +370,27 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
// not accept case incorrect money amount
if (!trader->HasEnoughMoney(his_trade->GetMoney()))
{
trader->GetSession()->SendNotification(LANG_NOT_ENOUGH_GOLD);
info.Status = TRADE_STATUS_CLOSE_WINDOW;
info.Result = EQUIP_ERR_NOT_ENOUGH_MONEY;
trader->GetSession()->SendTradeStatus(info);
his_trade->SetAccepted(false, true);
return;
}
if (_player->GetMoney() >= uint64(MAX_MONEY_AMOUNT) - his_trade->GetMoney())
{
_player->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, NULL);
info.Status = TRADE_STATUS_CLOSE_WINDOW;
info.Result = EQUIP_ERR_TOO_MUCH_GOLD;
SendTradeStatus(info);
my_trade->SetAccepted(false, true);
return;
}
if (trader->GetMoney() >= uint64(MAX_MONEY_AMOUNT) - my_trade->GetMoney())
{
trader->SendEquipError(EQUIP_ERR_TOO_MUCH_GOLD, NULL, NULL);
info.Status = TRADE_STATUS_CLOSE_WINDOW;
info.Result = EQUIP_ERR_TOO_MUCH_GOLD;
trader->GetSession()->SendTradeStatus(info);
his_trade->SetAccepted(false, true);
return;
}
@@ -386,14 +402,16 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
if (!item->CanBeTraded(false, true))
{
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
info.Status = TRADE_STATUS_TRADE_CANCELED;
SendTradeStatus(info);
return;
}
if (item->IsBindedNotWith(trader))
{
SendTradeStatus(TRADE_STATUS_NOT_ELIGIBLE);
SendTradeStatus(TRADE_STATUS_CLOSE_WINDOW/*TRADE_STATUS_TRADE_CANCELED*/);
info.Status = TRADE_STATUS_CLOSE_WINDOW;
info.Result = EQUIP_ERR_TRADE_BOUND_ITEM;
SendTradeStatus(info);
return;
}
}
@@ -402,7 +420,8 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
if (!item->CanBeTraded(false, true))
{
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
info.Status = TRADE_STATUS_TRADE_CANCELED;
SendTradeStatus(info);
return;
}
//if (item->IsBindedNotWith(_player)) // dont mark as invalid when his item isnt good (not exploitable because if item is invalid trade will fail anyway later on the same check)
@@ -497,31 +516,37 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
}
// inform partner client
trader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
info.Status = TRADE_STATUS_TRADE_ACCEPT;
trader->GetSession()->SendTradeStatus(info);
// test if item will fit in each inventory
hisCanCompleteTrade = (trader->CanStoreItems(myItems, TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK);
myCanCompleteTrade = (_player->CanStoreItems(hisItems, TRADE_SLOT_TRADED_COUNT) == EQUIP_ERR_OK);
TradeStatusInfo myCanCompleteInfo, hisCanCompleteInfo;
hisCanCompleteInfo.Result = trader->CanStoreItems(myItems, TRADE_SLOT_TRADED_COUNT, &hisCanCompleteInfo.ItemLimitCategoryId);
myCanCompleteInfo.Result = _player->CanStoreItems(hisItems, TRADE_SLOT_TRADED_COUNT, &myCanCompleteInfo.ItemLimitCategoryId);
clearAcceptTradeMode(myItems, hisItems);
// in case of missing space report error
if (!myCanCompleteTrade)
if (myCanCompleteInfo.Result != EQUIP_ERR_OK)
{
clearAcceptTradeMode(my_trade, his_trade);
SendNotification(LANG_NOT_FREE_TRADE_SLOTS);
trader->GetSession()->SendNotification(LANG_NOT_PARTNER_FREE_TRADE_SLOTS);
myCanCompleteInfo.Status = TRADE_STATUS_CLOSE_WINDOW;
trader->GetSession()->SendTradeStatus(myCanCompleteInfo);
myCanCompleteInfo.IsTargetResult = true;
SendTradeStatus(myCanCompleteInfo);
my_trade->SetAccepted(false);
his_trade->SetAccepted(false);
return;
}
else if (!hisCanCompleteTrade)
else if (hisCanCompleteInfo.Result != EQUIP_ERR_OK)
{
clearAcceptTradeMode(my_trade, his_trade);
SendNotification(LANG_NOT_PARTNER_FREE_TRADE_SLOTS);
trader->GetSession()->SendNotification(LANG_NOT_FREE_TRADE_SLOTS);
hisCanCompleteInfo.Status = TRADE_STATUS_CLOSE_WINDOW;
SendTradeStatus(hisCanCompleteInfo);
hisCanCompleteInfo.IsTargetResult = true;
trader->GetSession()->SendTradeStatus(hisCanCompleteInfo);
my_trade->SetAccepted(false);
his_trade->SetAccepted(false);
return;
@@ -590,12 +615,14 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
trader->SaveInventoryAndGoldToDB(trans);
CharacterDatabase.CommitTransaction(trans);
trader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_COMPLETE);
SendTradeStatus(TRADE_STATUS_TRADE_COMPLETE);
info.Status = TRADE_STATUS_TRADE_COMPLETE;
trader->GetSession()->SendTradeStatus(info);
SendTradeStatus(info);
}
else
{
trader->GetSession()->SendTradeStatus(TRADE_STATUS_TRADE_ACCEPT);
info.Status = TRADE_STATUS_TRADE_ACCEPT;
trader->GetSession()->SendTradeStatus(info);
}
}
@@ -614,8 +641,10 @@ void WorldSession::HandleBeginTradeOpcode(WorldPacket& /*recvPacket*/)
if (!my_trade)
return;
my_trade->GetTrader()->GetSession()->SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
SendTradeStatus(TRADE_STATUS_OPEN_WINDOW);
TradeStatusInfo info;
info.Status = TRADE_STATUS_OPEN_WINDOW;
my_trade->GetTrader()->GetSession()->SendTradeStatus(info);
SendTradeStatus(info);
}
void WorldSession::SendCancelTrade()
@@ -623,7 +652,9 @@ void WorldSession::SendCancelTrade()
if (PlayerRecentlyLoggedOut() || PlayerLogout())
return;
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
TradeStatusInfo info;
info.Status = TRADE_STATUS_TRADE_CANCELED;
SendTradeStatus(info);
}
void WorldSession::HandleCancelTradeOpcode(WorldPacket& /*recvPacket*/)
@@ -658,27 +689,32 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
if (GetPlayer()->m_trade)
return;
TradeStatusInfo info;
if (!GetPlayer()->IsAlive())
{
SendTradeStatus(TRADE_STATUS_YOU_DEAD);
info.Status = TRADE_STATUS_YOU_DEAD;
SendTradeStatus(info);
return;
}
if (GetPlayer()->HasUnitState(UNIT_STATE_STUNNED))
{
SendTradeStatus(TRADE_STATUS_YOU_STUNNED);
info.Status = TRADE_STATUS_YOU_STUNNED;
SendTradeStatus(info);
return;
}
if (isLogingOut())
{
SendTradeStatus(TRADE_STATUS_YOU_LOGOUT);
info.Status = TRADE_STATUS_YOU_LOGOUT;
SendTradeStatus(info);
return;
}
if (GetPlayer()->IsInFlight())
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
info.Status = TRADE_STATUS_TARGET_TO_FAR;
SendTradeStatus(info);
return;
}
@@ -692,55 +728,64 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
if (!pOther)
{
SendTradeStatus(TRADE_STATUS_NO_TARGET);
info.Status = TRADE_STATUS_NO_TARGET;
SendTradeStatus(info);
return;
}
if (pOther == GetPlayer() || pOther->m_trade)
{
SendTradeStatus(TRADE_STATUS_BUSY);
info.Status = TRADE_STATUS_BUSY;
SendTradeStatus(info);
return;
}
if (!pOther->IsAlive())
{
SendTradeStatus(TRADE_STATUS_TARGET_DEAD);
info.Status = TRADE_STATUS_TARGET_DEAD;
SendTradeStatus(info);
return;
}
if (pOther->IsInFlight())
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
info.Status = TRADE_STATUS_TARGET_TO_FAR;
SendTradeStatus(info);
return;
}
if (pOther->HasUnitState(UNIT_STATE_STUNNED))
{
SendTradeStatus(TRADE_STATUS_TARGET_STUNNED);
info.Status = TRADE_STATUS_TARGET_STUNNED;
SendTradeStatus(info);
return;
}
if (pOther->GetSession()->isLogingOut())
{
SendTradeStatus(TRADE_STATUS_TARGET_LOGOUT);
info.Status = TRADE_STATUS_TARGET_LOGOUT;
SendTradeStatus(info);
return;
}
if (pOther->GetSocial()->HasIgnore(GetPlayer()->GetGUIDLow()))
{
SendTradeStatus(TRADE_STATUS_IGNORE_YOU);
info.Status = TRADE_STATUS_IGNORE_YOU;
SendTradeStatus(info);
return;
}
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && pOther->GetTeam() !=_player->GetTeam())
{
SendTradeStatus(TRADE_STATUS_WRONG_FACTION);
info.Status = TRADE_STATUS_WRONG_FACTION;
SendTradeStatus(info);
return;
}
if (!pOther->IsWithinDistInMap(_player, TRADE_DISTANCE, false))
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
info.Status = TRADE_STATUS_TARGET_TO_FAR;
SendTradeStatus(info);
return;
}
@@ -754,31 +799,9 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
_player->m_trade = new TradeData(_player, pOther);
pOther->m_trade = new TradeData(pOther, _player);
WorldPacket data(SMSG_TRADE_STATUS, 2+7);
data.WriteBit(0); // unk bit, usually 0
data.WriteBits(TRADE_STATUS_BEGIN_TRADE, 5);
ObjectGuid playerGuid = _player->GetGUID();
// WTB StartBitStream...
data.WriteBit(playerGuid[2]);
data.WriteBit(playerGuid[4]);
data.WriteBit(playerGuid[6]);
data.WriteBit(playerGuid[0]);
data.WriteBit(playerGuid[1]);
data.WriteBit(playerGuid[3]);
data.WriteBit(playerGuid[7]);
data.WriteBit(playerGuid[5]);
data.WriteByteSeq(playerGuid[4]);
data.WriteByteSeq(playerGuid[1]);
data.WriteByteSeq(playerGuid[2]);
data.WriteByteSeq(playerGuid[3]);
data.WriteByteSeq(playerGuid[0]);
data.WriteByteSeq(playerGuid[7]);
data.WriteByteSeq(playerGuid[6]);
data.WriteByteSeq(playerGuid[5]);
pOther->GetSession()->SendPacket(&data);
info.Status = TRADE_STATUS_BEGIN_TRADE;
info.TraderGuid = _player->GetGUID();
pOther->GetSession()->SendTradeStatus(info);
}
void WorldSession::HandleSetTradeGoldOpcode(WorldPacket& recvPacket)
@@ -808,10 +831,12 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
if (!my_trade)
return;
TradeStatusInfo info;
// invalid slot number
if (tradeSlot >= TRADE_SLOT_COUNT)
{
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
info.Status = TRADE_STATUS_TRADE_CANCELED;
SendTradeStatus(info);
return;
}
@@ -819,7 +844,8 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
Item* item = _player->GetItemByPos(bag, slot);
if (!item || (tradeSlot != TRADE_SLOT_NONTRADED && !item->CanBeTraded(false, true)))
{
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
info.Status = TRADE_STATUS_TRADE_CANCELED;
SendTradeStatus(info);
return;
}
@@ -829,14 +855,16 @@ void WorldSession::HandleSetTradeItemOpcode(WorldPacket& recvPacket)
if (my_trade->HasItem(iGUID))
{
// cheating attempt
SendTradeStatus(TRADE_STATUS_TRADE_CANCELED);
info.Status = TRADE_STATUS_TRADE_CANCELED;
SendTradeStatus(info);
return;
}
if (item->IsBindedNotWith(GetPlayer()->GetTrader()))
if (slot != TRADE_SLOT_NONTRADED && item->IsBindedNotWith(my_trade->GetTrader()))
{
// The item is BOP tradeable but the trader wasn't eligible to get it.
SendTradeStatus(TRADE_STATUS_NOT_ELIGIBLE, tradeSlot);
info.Status = TRADE_STATUS_NOT_ON_TAPLIST;
info.Slot = tradeSlot;
SendTradeStatus(info);
return;
}
+19 -2
View File
@@ -92,6 +92,23 @@ enum LootType
LOOT_FISHING_JUNK = 22 // unsupported by client, sending LOOT_FISHING instead
};
enum LootError
{
LOOT_ERROR_DIDNT_KILL = 0, // You don't have permission to loot that corpse.
LOOT_ERROR_TOO_FAR = 4, // You are too far away to loot that corpse.
LOOT_ERROR_BAD_FACING = 5, // You must be facing the corpse to loot it.
LOOT_ERROR_LOCKED = 6, // Someone is already looting that corpse.
LOOT_ERROR_NOTSTANDING = 8, // You need to be standing up to loot something!
LOOT_ERROR_STUNNED = 9, // You can't loot anything while stunned!
LOOT_ERROR_PLAYER_NOT_FOUND = 10, // Player not found
LOOT_ERROR_PLAY_TIME_EXCEEDED = 11, // Maximum play time exceeded
LOOT_ERROR_MASTER_INV_FULL = 12, // That player's inventory is full
LOOT_ERROR_MASTER_UNIQUE_ITEM = 13, // Player has too many of that item already
LOOT_ERROR_MASTER_OTHER = 14, // Can't assign item to that player
LOOT_ERROR_ALREADY_PICKPOCKETED = 15, // Your target has already had its pockets picked
LOOT_ERROR_NOT_WHILE_SHAPESHIFTED = 16 // You can't do that while shapeshifted.
};
// type of Loot Item in Loot View
enum LootSlotType
{
@@ -263,8 +280,8 @@ class LootValidatorRef : public Reference<Loot, LootValidatorRef>
{
public:
LootValidatorRef() { }
void targetObjectDestroyLink() { }
void sourceObjectDestroyLink() { }
void targetObjectDestroyLink() override { }
void sourceObjectDestroyLink() override { }
};
//=====================================================
Loaded 100 of 234 files, more files were not shown because too many files have changed in this diff. Show more