Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/authserver/Server/AuthSocket.cpp src/server/game/Achievements/AchievementMgr.cpp src/server/game/Chat/Chat.h src/server/game/Chat/Commands/Level1.cpp src/server/game/Chat/Commands/Level2.cpp src/server/game/Chat/Commands/Level3.cpp src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Object/Updates/UpdateData.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Guilds/Guild.cpp src/server/game/Guilds/GuildMgr.cpp src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Handlers/MiscHandler.cpp src/server/game/Handlers/MovementHandler.cpp src/server/game/Handlers/PetHandler.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/VehicleHandler.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/Spells/SpellMgr.cpp src/server/game/World/World.cpp src/server/scripts/Commands/cs_debug.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_reload.cpp src/server/scripts/Kalimdor/azuremyst_isle.cpp src/server/shared/Logging/Log.cpp src/server/shared/Logging/Log.h src/server/worldserver/worldserver.conf.dist
This commit is contained in:
commit
d82266bc0e
684 files changed
+11732
-9491
No files matched your search
@@ -1175,7 +1175,7 @@ CREATE TABLE `characters` (
|
||||
`yesterdayKills` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`chosenTitle` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`watchedFaction` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`drunk` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`drunk` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`health` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`power1` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`power2` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `logs` ADD COLUMN `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0 AFTER `type`;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
UPDATE characters SET drunk = (drunk / 256) & 0xFF;
|
||||
ALTER TABLE characters CHANGE drunk drunk tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=-32379;
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(-32379,'spell_pri_shadow_word_death');
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Faction change item conversion for Reins of the Traveler's Tundra Mammoth
|
||||
DELETE FROM `player_factionchange_items` WHERE `alliance_id`=44235;
|
||||
INSERT INTO `player_factionchange_items` (`race_A`, `alliance_id`, `commentA`, `race_H`, `horde_id`, `commentH`) VALUES
|
||||
(0,44235,'Reins of the Traveler''s Tundra Mammoth',0,44234,'Reins of the Traveler''s Tundra Mammoth');
|
||||
|
||||
-- Faction change spell conversion for Reins of the Traveler's Tundra Mammoth
|
||||
DELETE FROM `player_factionchange_spells` WHERE `alliance_id`=61425;
|
||||
INSERT INTO `player_factionchange_spells` (`alliance_id`,`horde_id`) VALUES
|
||||
(61425,61447);
|
||||
@@ -0,0 +1,34 @@
|
||||
SET @pool_id := 356;
|
||||
|
||||
DELETE FROM `pool_template` WHERE `entry` IN (@pool_id, @pool_id+1);
|
||||
INSERT INTO `pool_template` (`entry`,`max_limit`,`description`) VALUES
|
||||
(@pool_id,1,'Wind Trader Zhareem - Daily Quests'),
|
||||
(@pool_id+1,1,'Nether-Stalker Mah''duun - Daily Quests');
|
||||
|
||||
DELETE FROM `pool_quest` WHERE `entry` IN (11369,11384,11382,11363,11362,11375,11354,11386,11373,11378,11374,11372,11368,11388,11499,11370) AND `pool_entry` = @pool_id;
|
||||
DELETE FROM `pool_quest` WHERE `entry` IN (11389,11371,11376,11383,11364,11500,11385,11387) AND `pool_entry` = @pool_id+1;
|
||||
INSERT INTO `pool_quest` (`entry`,`pool_entry`,`description`) VALUES
|
||||
(11369,@pool_id,'Wanted: A Black Stalker Egg'),
|
||||
(11384,@pool_id,'Wanted: A Warp Splinter Clipping'),
|
||||
(11382,@pool_id,'Wanted: Aeonus''s Hourglass'),
|
||||
(11363,@pool_id,'Wanted: Bladefist''s Seal'),
|
||||
(11362,@pool_id,'Wanted: Keli''dan''s Feathered Stave'),
|
||||
(11375,@pool_id,'Wanted: Murmur''s Whisper'),
|
||||
(11354,@pool_id,'Wanted: Nazan''s Riding Crop'),
|
||||
(11386,@pool_id,'Wanted: Pathaleon''s Projector'),
|
||||
(11373,@pool_id,'Wanted: Shaffar''s Wondrous Pendant'),
|
||||
(11378,@pool_id,'Wanted: The Epoch Hunter''s Head'),
|
||||
(11374,@pool_id,'Wanted: The Exarch''s Soul Gem'),
|
||||
(11372,@pool_id,'Wanted: The Headfeathers of Ikiss'),
|
||||
(11368,@pool_id,'Wanted: The Heart of Quagmirran'),
|
||||
(11388,@pool_id,'Wanted: The Scroll of Skyriss'),
|
||||
(11499,@pool_id,'Wanted: The Signet Ring of Prince Kael''thas'),
|
||||
(11370,@pool_id,'Wanted: The Warlord''s Treatise'),
|
||||
(11389,@pool_id+1,'Wanted: Arcatraz Sentinels'),
|
||||
(11371,@pool_id+1,'Wanted: Coilfang Myrmidons'),
|
||||
(11376,@pool_id+1,'Wanted: Malicious Instructors'),
|
||||
(11383,@pool_id+1,'Wanted: Rift Lords'),
|
||||
(11364,@pool_id+1,'Wanted: Shattered Hand Centurions'),
|
||||
(11500,@pool_id+1,'Wanted: Sisters of Torment'),
|
||||
(11385,@pool_id+1,'Wanted: Sunseeker Channelers'),
|
||||
(11387,@pool_id+1,'Wanted: Tempest-Forge Destroyers');
|
||||
@@ -0,0 +1,28 @@
|
||||
SET @Gossip :=9640;
|
||||
SET @NPCText :=13047;
|
||||
|
||||
DELETE FROM `gossip_menu` WHERE `entry` = @Gossip;
|
||||
INSERT INTO `gossip_menu` VALUES
|
||||
(@Gossip,@NPCText);
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id` = @Gossip;
|
||||
INSERT INTO `gossip_menu_option` VALUES
|
||||
(@Gossip,0,0,"Soldier, you have new orders. You're to pull back and report to the sergeant!",1,1,0,0,0,0,NULL);
|
||||
|
||||
UPDATE `creature_template` SET `gossip_menu_id` = @Gossip, AIName = 'SmartAI', `npcflag` = `npcflag`|1 WHERE `entry` = 28041;
|
||||
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 28041;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 28041 AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 28041*100 AND `source_type` = 9;
|
||||
INSERT INTO `smart_scripts` VALUES
|
||||
(28041,0,0,0,0,0,100,0,8000,10000,8000,12000,11,50370,0,0,0,0,0,2,0,0,0,0,0,0,0,'Argent Soldier - Combat - Cast Sunder Armor'),
|
||||
(28041,0,1,2,62,0,100,0,@Gossip,0,0,0,33,28041,0,0,0,0,0,7,0,0,0,0,0,0,0,'Argent Soldier - On Gossip - Credit'),
|
||||
(28041,0,2,3,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Argent Soldier - Event Linked - Close Gossip'),
|
||||
(28041,0,3,4,61,0,100,0,0,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Argent Soldier - Event Linked - NpcFlag Remove'),
|
||||
(28041,0,4,0,61,0,100,0,0,0,0,0,80,2804100,0,2,0,0,0,1,0,0,0,0,0,0,0,'Argent Soldier - Event Linked - Run Script'),
|
||||
(28041*100,9,0,0,0,0,100,0,6000,6000,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Argent Soldier - Script 6 Seconds - Unseen'),
|
||||
(28041*100,9,1,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Argent Soldier - Script - Despawn');
|
||||
|
||||
DELETE FROM `conditions` WHERE SourceTypeOrReferenceId= 15 AND SourceGroup=@Gossip;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15, @Gossip, 0, 0, 0, 9, 0, 12504, 0, 0, 0, 0, '', NULL);
|
||||
@@ -0,0 +1,7 @@
|
||||
-- [Q] Truce (11989)
|
||||
SET @ENTRY := 26423; -- Drakuru
|
||||
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, 1, 62, 0, 100, 0, 9615, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Drakuru - On Gossip Select - Close Gossip'),
|
||||
(@ENTRY, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 85, 50016, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Drakuru - On Gossip Select - Give kill credit');
|
||||
@@ -0,0 +1,17 @@
|
||||
UPDATE `creature` SET `spawntimesecs`=180 WHERE `id`=23689;
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (23689,24170);
|
||||
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=23689;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (23689,24170) 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
|
||||
(23689,0,1,2,65,0,100,0,0,0,0,0,11,36809,2,0,0,0,0,1,0,0,0,0,0,0,0,'Proto-Drake - Reach Target - Cast Spell (36809)'),
|
||||
(23689,0,2,0,61,0,100,0,0,0,0,0,33,24170,0,0,0,0,0,18,35,0,0,0,0,0,0,'Draconis Gastritis Bunny - On Death - Quest Reward'),
|
||||
(23689,0,3,5,1,0,100,0,10000,10000,10000,10000,29,0,0,24170,1,1,0,19,24170,75,0,0,0,0,0,'Proto-Drake - Find Target - Follow'),
|
||||
(23689,0,4,0,65,0,100,0,0,0,0,0,51,0,0,0,0,0,0,19,24170,5,0,0,0,0,0,'Proto-Drake - Reach Target - Kill Dummy'),
|
||||
(23689,0,5,3,61,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Proto-Drake - On Find Target - Set Phase 1'),
|
||||
(23689,0,6,0,1,1,100,0,45000,45000,45000,45000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Proto-Drake - Idle on Ground(Phase 1) - Despawn'),
|
||||
(24170,0,0,0,54,0,100,0,0,0,0,0,50,186598,60000,0,0,0,0,1,0,0,0,0,0,0,0,'Draconis Gastritis Bunny - On Create - Spawn GO'),
|
||||
(24170,0,1,0,6,0,100,0,0,0,0,0,33,24170,0,0,0,0,0,18,20,0,0,0,0,0,0,'Draconis Gastritis Bunny - On Death - Quest Reward'),
|
||||
(24170,0,2,0,54,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Draconis Gastritis Bunny - On Create - Hide'),
|
||||
(24170,0,3,0,6,0,100,0,0,0,0,0,41,0,0,0,0,0,0,15,186598,5,0,0,0,0,0,'Draconis Gastritis Bunny - On Death - Remove Gobjects');
|
||||
@@ -0,0 +1,34 @@
|
||||
-- Life or Death (12296)
|
||||
|
||||
SET @ENTRY := 27482; -- Wounded Westfall Infantry npc
|
||||
SET @SOURCETYPE := 0;
|
||||
SET @CREDIT := 27466; -- Kill Credit Bunny - Wounded Skirmishers npc
|
||||
SET @ITEM := 37576; -- Renewing Bandage item
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceEntry`=@ITEM;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(18,0,@ITEM,0,24,1,@ENTRY,0,0,'', "Item Renewing Bandage target Wounded Westfall Infantry");
|
||||
|
||||
-- Wounded Westfall Infantry SAI
|
||||
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,@SOURCETYPE,0,0,8,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"On creature spellhit - Set phasemask 1 - self"),
|
||||
(@ENTRY,@SOURCETYPE,1,0,1,1,100,0,0,0,3000,3000,1,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"On OOC - Talk - Self"),
|
||||
(@ENTRY,@SOURCETYPE,2,3,1,1,100,0,2000,2000,2000,2000,53,1,@ENTRY,0,12296,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"On OOC Update 2 sec - Start WP 1 - Self"),
|
||||
(@ENTRY,@SOURCETYPE,3,4,61,1,100,0,0,0,0,0,18,128,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Link - Set unit_flag 128 - Self"),
|
||||
(@ENTRY,@SOURCETYPE,4,5,61,1,100,0,0,0,0,0,33,@CREDIT,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"Link - Give credit - Invoker"),
|
||||
(@ENTRY,@SOURCETYPE,5,0,61,1,100,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"Link - Set phasemask 2 - Self"),
|
||||
(@ENTRY,@SOURCETYPE,6,0,40,2,100,0,2,@ENTRY,0,0,41,0,0,0,0,0,0,1,0,0,0,0.0,0.0,0.0,0.0,"On WP 2 - Force despawn - Self");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@ENTRY,0,0,"I'd nearly given up.You've given me new life!",12,0,50,0,0,0,"Wounded Westfall Infantry say text"),
|
||||
(@ENTRY,0,1,"Bless you, friend.I nearly expired....",12,0,50,0,0,0,"Wounded Westfall Infantry say text"),
|
||||
(@ENTRY,0,2,"Without your help, I surely would have died....",12,0,50,0,0,0,"Wounded Westfall Infantry say text"),
|
||||
(@ENTRY,0,3,"Thank you $r.",12,0,50,0,0,0,"Wounded Westfall Infantry say text");
|
||||
|
||||
DELETE FROM `waypoints` WHERE `entry`=@ENTRY;
|
||||
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
|
||||
(@ENTRY,1,4105.278809,-2917.963867,280.320129,'Wounded Westfall Infantry'),
|
||||
(@ENTRY,2,4048.682861,-2936.736572,275.191681,'Wounded Westfall Infantry');
|
||||
@@ -0,0 +1,43 @@
|
||||
-- Remove previous fix
|
||||
DELETE FROM `gossip_menu` WHERE `entry` = 9640;
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id` = 9640;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 28041 AND `source_type` = 0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 28041*100 AND `source_type` = 9;
|
||||
DELETE FROM `conditions` WHERE SourceTypeOrReferenceId= 15 AND SourceGroup = 9640;
|
||||
|
||||
-- Argent Crusade, We Are Leaving! (12504)
|
||||
|
||||
SET @ENTRY := 28041; -- Argent Soldier
|
||||
SET @SOURCETYPE := 0;
|
||||
SET @CREDIT := 50289; -- Argent Crusade, We Are Leaving!: Argent Soldier Quest Credit
|
||||
SET @MENUID := 9640;
|
||||
SET @OPTION := 0;
|
||||
|
||||
UPDATE `creature_template` SET `gossip_menu_id`=@MENUID,`npcflag`=1,`AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id`=@MENUID AND `id`=@OPTION;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
|
||||
(@MENUID,@OPTION,0,"Soldier, you have new orders. You're to pull back and report to the sergeant!",1,1,0,0,0,0,'');
|
||||
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=@SOURCETYPE;
|
||||
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,@SOURCETYPE,0,0,0,0,100,0,8000,10000,8000,12000,11,50370,0,0,0,0,0,2,0,0,0,0,0,0,0,"IC - Cast Sunder Armor - Victim"),
|
||||
(@ENTRY,@SOURCETYPE,1,2,62,0,100,0,@MENUID,@OPTION,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"On gossip select - Close Gossip - Invoker"),
|
||||
(@ENTRY,@SOURCETYPE,2,3,61,0,100,0,0,0,0,0,11,@CREDIT,0,0,0,0,0,7,0,0,0,0,0,0,0,"On link - Cast credit spell - Invoker"),
|
||||
(@ENTRY,@SOURCETYPE,3,4,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,7,0,0,0,0.0,0.0,0.0,0.0,"On link - Whisper - Invoker"),
|
||||
(@ENTRY,@SOURCETYPE,4,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"On link - Despawn - Self");
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@MENUID AND `SourceEntry`=@OPTION;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(15,@MENUID,@OPTION,2,9,12504,0,0,0,'',"Show gossip option 0 if player has quest 12504 marked as taken");
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@ENTRY,0,0,"Careful here, $C. These trolls killed their own snake god!",15,0,50,0,0,0,"Argent Soldier whisper text"),
|
||||
(@ENTRY,0,1,"Watch your back. These Drakkari are a nasty lot.",15,0,50,0,0,0,"Argent Soldier whisper text"),
|
||||
(@ENTRY,0,2,"These Drakkari are just bad news. We need to leave and head back to Justice Keep!",15,0,50,0,0,0,"Argent Soldier whisper text"),
|
||||
(@ENTRY,0,3,"See you around.",15,0,50,0,0,0,"Argent Soldier whisper text"),
|
||||
(@ENTRY,0,4,"I wonder where we're headed to. And who's going to deal with these guys?",15,0,50,0,0,0,"Argent Soldier whisper text"),
|
||||
(@ENTRY,0,5,"Right. I'd better get back to the sergeant then.",15,0,50,0,0,0,"Argent Soldier whisper text"),
|
||||
(@ENTRY,0,6,"Are you $N? I heard you were dead.",15,0,50,0,0,0,"Argent Soldier whisper text");
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=181758 AND `source_type`=1;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(181758, 1, 0, 0, 20, 0, 100, 0, 9561, 0, 0, 0, 56, 23846, 1, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Add Nolkais Box after finishing quest: Nolkais Words');
|
||||
UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=181758;
|
||||
@@ -0,0 +1,36 @@
|
||||
-- Meeting at the Blackwing Coven quest fix
|
||||
|
||||
-- Variables
|
||||
SET @QUEST := 10722;
|
||||
SET @ENTRY := 22019;
|
||||
SET @SPELL1:= 37704; -- Whirlwind
|
||||
SET @SPELL2:= 8599; -- Enrage
|
||||
|
||||
-- Add SmartAI for Kolphis Darkscale
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,62,0,100,0,8439,0,0,0,15,@QUEST,0,0,0,0,0,7,0,0,0,0,0,0,0,'Kolphis Darkscale - On Gossip Select - Quest Credit'),
|
||||
(@ENTRY,0,1,0,0,0,50,0,3000,3000,8000,8000,11,@SPELL1,0,0,0,0,0,2,0,0,0,0,0,0,0,'Kolphis Darkscale - Combat - Whirlwind'),
|
||||
(@ENTRY,0,2,3,2,0,100,1,0,25,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kolphis Darkscale - On Health level - Emote when below 25% HP'),
|
||||
(@ENTRY,0,3,0,61,0,100,1,0,0,0,0,11,@SPELL2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Kolphis Darkscale - On Health level - Cast Enrage when below 25% HP');
|
||||
|
||||
-- add missing text to Kolphis Darkscale from sniff
|
||||
DELETE FROM `npc_text` WHERE `ID`=10540;
|
||||
INSERT INTO `npc_text` (`ID`,`prob0`,`text0_0`,`text0_1`,`WDBVerified`) VALUES
|
||||
(10540,1,"Begone, overseer! We've already spoken.$B$BStop dragging your feet and execute your orders at Ruuan Weald!",'',1);
|
||||
|
||||
-- Kolphis Darkscale emote
|
||||
DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@ENTRY,0,0,'%s becomes enraged!',16,0,100,0,0,0,'Kolphis Darkscale');
|
||||
|
||||
-- Gossip menu insert from sniff
|
||||
DELETE FROM `gossip_menu` WHERE `entry`=8436 AND `text_id`=10540;
|
||||
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (8436,10540);
|
||||
|
||||
-- Add gossip_menu conditions
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=8436;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15,8436,0,0,0,9,0,@QUEST,0,0,0,0,'','Kolphis Darkscale - Show Gossip Option 0 - If on Quest Meeting at the Blackwing Coven'),
|
||||
(14,8436,10540,0,0,28,0,@QUEST,0,0,0,0,'','Kolphis Darkscale - Show Gossip Menu - If Quest Meeting at the Blackwing Coven is Completed');
|
||||
@@ -0,0 +1,12 @@
|
||||
UPDATE `gossip_menu_option` SET
|
||||
`npc_option_npcflag` = 65536,
|
||||
`option_icon` = 5
|
||||
WHERE
|
||||
`menu_id` = 1293 AND
|
||||
`id` = 1;
|
||||
|
||||
UPDATE `gossip_menu_option` SET
|
||||
`npc_option_npcflag` = 128
|
||||
WHERE
|
||||
`menu_id` = 1293 AND
|
||||
`id` = 2;
|
||||
@@ -0,0 +1,23 @@
|
||||
-- [Q] Measuring Warp Energies
|
||||
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN(20333,20336,20337,20338);
|
||||
UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry` IN (20333,20336,20337,20338);
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (20333,20336,20337,20338);
|
||||
INSERT INTO `smart_scripts` VALUES
|
||||
(20333,0,0,0,8,0,100,0,35113,0,0,0,33,20333,0,0,0,0,0,7,0,0,0,0,0,0,0,"Northern Pipe Credit Marker - Spellhit - Credit"),
|
||||
(20336,0,0,0,8,0,100,0,35113,0,0,0,33,20336,0,0,0,0,0,7,0,0,0,0,0,0,0,"Eastern Pipe Credit Marker - Spellhit - Credit"),
|
||||
(20337,0,0,0,8,0,100,0,35113,0,0,0,33,20337,0,0,0,0,0,7,0,0,0,0,0,0,0,"Southern Pipe Credit Marker - Spellhit - Credit"),
|
||||
(20338,0,0,0,8,0,100,0,35113,0,0,0,33,20338,0,0,0,0,0,7,0,0,0,0,0,0,0,"Western Pipe Credit Marker - Spellhit - Credit");
|
||||
|
||||
-- Conditions
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=35113;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 35113, 0, 0, 31, 0, 3, 20333, 0, 0, 0, '', "Spell Search NPC 20333"),
|
||||
(13, 1, 35113, 0, 1, 31, 0, 3, 20336, 0, 0, 0, '', "Spell Search NPC 20336"),
|
||||
(13, 1, 35113, 0, 2, 31, 0, 3, 20337, 0, 0, 0, '', "Spell Search NPC 20337"),
|
||||
(13, 1, 35113, 0, 3, 31, 0, 3, 20338, 0, 0, 0, '', "Spell Search NPC 20338");
|
||||
|
||||
UPDATE `creature` SET `position_x`=3214.92, `position_y`=4065.25, `position_z`=106.16 WHERE `id`=20333;
|
||||
UPDATE `creature` SET `position_x`=2755.55, `position_y`=3863.32, `position_z`=142.27 WHERE `id`=20336;
|
||||
UPDATE `creature` SET `position_x`=2819.01, `position_y`=4351.10, `position_z`=144.97 WHERE `id`=20337;
|
||||
UPDATE `creature` SET `position_x`=2947.31, `position_y`=4327.47, `position_z`=154.02 WHERE `id`=20338;
|
||||
@@ -0,0 +1,41 @@
|
||||
-- Fix [Qs] Words of Power /11640/11942/{A/H}
|
||||
-- 10x to Subv for giving me idea how to fix it
|
||||
SET @BEAM := 47848;
|
||||
SET @NECRO := 25378;
|
||||
SET @NECROguid := 300100;
|
||||
SET @NAFERSET := 26076;
|
||||
SET @Blast := 15587;
|
||||
SET @Renew:= 11640;
|
||||
SET @Corruption := 32063;
|
||||
SET @Shadow := 9613;
|
||||
-- Add spawns for the three necromancers
|
||||
DELETE FROM `creature` WHERE `guid` IN (@NECROguid,@NECROguid+1,@NECROguid+2);
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `MovementType`) VALUES
|
||||
(@NECROguid, 25378, 571, 1, 3, 4101.931641, 3761.125000, 92.664742, 4.909590, 180, 0, 0, 0),
|
||||
(@NECROguid+1, 25378, 571, 1, 3, 4133.339355, 3743.313721, 92.670166, 3.474295, 180, 0, 0, 0),
|
||||
(@NECROguid+2, 25378, 571, 1, 3, 4121.242676, 3708.384766, 92.665283, 1.864472, 180, 0, 0, 0);
|
||||
-- Add SAI for En"kilah Necromancer
|
||||
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NECRO;
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NECRO;
|
||||
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NECRO;
|
||||
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
|
||||
(@NECRO,0,0,0,1,0,100,0,10000,20000,180000,200000,11,@BEAM,0,0,0,0,0,11,@NAFERSET,30,0,0,0,0,0,' En"kilah Necromancer - OOC - Cast spell Purple Beam on Naferset'),
|
||||
(@NECRO,0,1,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,11,@NAFERSET,50,0,0,0,0,0,' En"kilah Necromancer - on death - Data set 0 1 on Hight Priest Nafarset'),
|
||||
(@NECRO,0,2,0,0,0,100,0,2000,3000,15000,16000,11,@Corruption,0,0,0,0,0,2,0,0,0,0,0,0,0,' En"kilah Necromancer - IC - Corruption'),
|
||||
(@NECRO,0,3,0,0,0,100,0,4000,6000,2000,6500,11,@Shadow,32,0,0,0,0,2,0,0,0,0,0,0,0, 'En"kilah Necromancer - Ic - Shadow Bolt');
|
||||
-- Add SAI for Hight Priest Naferset
|
||||
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@NAFERSET;
|
||||
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@NAFERSET;
|
||||
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
|
||||
(@NAFERSET,0,0,0,38,0,100,0,0,1,0,0,23,1,0,0,0,0,0,1,0,0,0,0,0,0,0,' Hight Priest Nafarset - On Data set 0 1 - Increment event phase by 1'),
|
||||
(@NAFERSET,0,1,2,60,4,100,1,1000,2000,1000,2000,1,0,1000,0,0,0,0,1,0,0,0,0,0,0,0, 'Hight Priest Nafarset - On Event update /in event phase 3/ - Say text 0'),
|
||||
(@NAFERSET,0,2,3,61,4,100,0,0,0,0,0,19,33555200,0,0,0,0,0,1,0,0,0,0,0,0,0,' Hight Priest Nafarset - Linked with event 1 - Set field flags to 0'),
|
||||
(@NAFERSET,0,3,0,61,4,100,0,0,0,0,0,49,0,0,0,0,0,0,21,20,0,0,0,0,0,0,' Hight Priest Nafarset - Linked with event 2 - Attack start on closest player'),
|
||||
(@NAFERSET,0,4,0,0,4,100,0,4000,6000,5000,8000,11,@Blast,0,0,0,0,0,2,0,0,0,0,0,0,0,' Hight Priest Nafarset - IC - Cast spell Mind Blast'),
|
||||
(@NAFERSET,0,5,0,0,4,100,0,8000,12000,10000,15000,11,@Renew,0,0,0,0,0,1,0,0,0,0,0,0,0,' Hight Priest Nafarset - IC - Cast spell Renew on self'),
|
||||
(@NAFERSET,0,6,7,6,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,' Hight Priest Nafarset - On death - Data set 0 0'),
|
||||
(@NAFERSET,0,7,0,61,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,' Hight Priest Nafarset - Linked with event 6 - Reset');
|
||||
-- Hight Priest Naferset's Text
|
||||
DELETE FROM `creature_text` WHERE `entry`=@NAFERSET;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(@NAFERSET,0,0,'What is the meaning of this?! I have not yet finished my feast!',14,0,100,1,1000,0,'Nafarset on activation');
|
||||
@@ -0,0 +1,9 @@
|
||||
SET @NECROguid := 300100;
|
||||
SET @NEWNECROguid := 42877;
|
||||
|
||||
DELETE FROM `creature` WHERE `guid` IN (@NECROguid,@NECROguid+1,@NECROguid+2);
|
||||
DELETE FROM `creature` WHERE `guid` IN (@NEWNECROguid,@NEWNECROguid+1,@NEWNECROguid+2);
|
||||
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `MovementType`) VALUES
|
||||
(@NEWNECROguid, 25378, 571, 1, 3, 4101.931641, 3761.125000, 92.664742, 4.909590, 180, 0, 0, 0),
|
||||
(@NEWNECROguid+1, 25378, 571, 1, 3, 4133.339355, 3743.313721, 92.670166, 3.474295, 180, 0, 0, 0),
|
||||
(@NEWNECROguid+2, 25378, 571, 1, 3, 4121.242676, 3708.384766, 92.665283, 1.864472, 180, 0, 0, 0);
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Add quest item "Bleeding Hollow Torch" to "Bleeding Hollow Peon" loot template
|
||||
DELETE FROM `creature_loot_template` WHERE `entry`=16907 and `item`=31347;
|
||||
INSERT INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
|
||||
(16907,31347,-50,1,0,1,1);
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=-603;
|
||||
INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
|
||||
(-603,'spell_warl_curse_of_doom');
|
||||
@@ -0,0 +1,219 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (73,108,241,242,259,326,327,352,390,406,462,490,497,534,548,612,636,740,774,796,797,798,799,800,801,802,803,810,811,814,820,839,856,859,904,946,987,988,989,1128,1129,1155,1156,1157,1158,1161,1162,1163,1165,1263,1272,1277,1278,1279,1280,1281,1283,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1390,1397,1441,1443,1460,1461,1533,1537,1538,1659,1660,1662,1663,1664,2020,2971,3023,3064,3241,3383,3401,3403,3404,3405,3422,3423,3424,3425,3515,3516,3529,3530,3531,3622,3623,3624,3885,3910,4323,4541,4905,5053,5205,5207,5208,5209,5303,5304,5506,5512,5516,5520,5523,5532,5653,5659,5664,5665,5666,5667,5668,5669,5670,5671,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,5699,5700,5701,5702,5703,5704,5705,5706,5707,5708,5709,5710,5711,5712,6003,6165,6202,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6841,6842,7069,7904,8002,8244,8245,8247,8248,8337,8339,8340,8444,8445,8448,8449,8450,8451,8452,8453,8454,8458,8459,8571,9031,9306,9307,9445,9596,9597,9599,9679,9745,10370,10402,10616,10743,10890,11127);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,73,0,'','','Deprecated quest: <TXT> No Reward'),
|
||||
(1,108,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,241,0,'','','Deprecated quest: <TEST> HEY MISTER WILSON!'),
|
||||
(1,242,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,259,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,326,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,327,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,352,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,390,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,406,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,462,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,490,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,497,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,534,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,548,0,'','','Deprecated quest: <NYI> <TXT> Bloodstone Pendant'),
|
||||
(1,612,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,636,0,'','','Deprecated quest: Legends of the Earth <NYI>'),
|
||||
(1,740,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,774,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,796,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,797,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,798,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,799,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,800,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,801,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,802,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,803,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,810,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,811,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,814,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,820,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,839,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,856,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,859,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,904,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,946,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,987,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,988,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,989,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1128,0,'','','Deprecated quest: <NYI> The Gnome Pit Crew is Thirsty'),
|
||||
(1,1129,0,'','','Deprecated quest: <NYI> The Goblin Pit Crew is Thirsty'),
|
||||
(1,1155,0,'','','Deprecated quest: <NYI> <TXT> bug crystal side quest'),
|
||||
(1,1156,0,'','','Deprecated quest: <NYI> <TXT> speak to alchemist pestlezugg'),
|
||||
(1,1157,0,'','','Deprecated quest: <NYI> <TXT> pestlezugg needs items'),
|
||||
(1,1158,0,'','','Deprecated quest: <NYI> <TXT> speak to rabine saturna'),
|
||||
(1,1161,0,'','','Deprecated quest: <NYI> <TXT> gossip shade of ambermoon'),
|
||||
(1,1162,0,'','','Deprecated quest: <NYI> <TXT> speak to hamuul runetotem'),
|
||||
(1,1163,0,'','','Deprecated quest: <NYI> <TXT> speak to tyrande whisperwind'),
|
||||
(1,1165,0,'','','Deprecated quest: <NYI> Ore for the Races'),
|
||||
(1,1263,0,'','','Deprecated quest: The Burning Inn <CHANGE TO GOSSIP>'),
|
||||
(1,1272,0,'','','Deprecated quest: Finding Reethe <CHANGE INTO GOSSIP>'),
|
||||
(1,1277,0,'','','Deprecated quest: <nyi> <TXT> The Centaur Hoofprints'),
|
||||
(1,1278,0,'','','Deprecated quest: <nyi> <TXT> The Grim Totem Clan'),
|
||||
(1,1279,0,'','','Deprecated quest: <nyi> <TXT>The Centaur Hoofprints'),
|
||||
(1,1280,0,'','','Deprecated quest: <nyi> <TXT>The Centaur Hoofprints'),
|
||||
(1,1281,0,'','','Deprecated quest: Jim''s Song <CHANGE TO GOSSIP>'),
|
||||
(1,1283,0,'','','Deprecated quest: Fire at the Shady Rest <CHANGE TO GOSSIP>'),
|
||||
(1,1289,0,'','','Deprecated quest: <nyi> Vimes''s Report'),
|
||||
(1,1290,0,'','','Deprecated quest: <nyi> Investigating Mosarn'),
|
||||
(1,1291,0,'','','Deprecated quest: <nyi> <TXT> Centaur Hoofprints'),
|
||||
(1,1292,0,'','','Deprecated quest: <nyi><TXT> Centaur Hoofprints'),
|
||||
(1,1293,0,'','','Deprecated quest: <nyi> <TXT> Centaur Hoofprints'),
|
||||
(1,1294,0,'','','Deprecated quest: <nyi> <TXT>Centaur Sympathies'),
|
||||
(1,1295,0,'','','Deprecated quest: <nyi> <TXT> Course of Action'),
|
||||
(1,1296,0,'','','Deprecated quest: <nyi> <TXT> Course of Action'),
|
||||
(1,1297,0,'','','Deprecated quest: <nyi> <TXT> Course of Action'),
|
||||
(1,1298,0,'','','Deprecated quest: <nyi> <TXT> Thrall''s Dirty Work'),
|
||||
(1,1299,0,'','','Deprecated quest: <nyi> <TXT> Thrall''s Dirty Work'),
|
||||
(1,1300,0,'','','Deprecated quest: <nyi> <TXT> Lorn Grim Totem'),
|
||||
(1,1390,0,'','','Deprecated quest: <nyi> Oops, We Killed Them Again.'),
|
||||
(1,1397,0,'','','Deprecated quest: <nyi> Saved!'),
|
||||
(1,1441,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1443,0,'','','Deprecated quest: <nyi> The Shakedown'),
|
||||
(1,1460,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1461,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1533,0,'','','Deprecated quest: <NYI> Call of Air'),
|
||||
(1,1537,0,'','','Deprecated quest: <NYI> Call of Air'),
|
||||
(1,1538,0,'','','Deprecated quest: <NYI> Call of Air'),
|
||||
(1,1659,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1660,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1662,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1663,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,1664,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,2020,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,2971,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3023,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3064,0,'','','Deprecated quest: <NYI> <TXT> Pirate Hats'),
|
||||
(1,3241,0,'','','Deprecated quest: <NYI> <TXT><redux> Dreadmist Peak'),
|
||||
(1,3383,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3401,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3403,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3404,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3405,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3422,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3423,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3424,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3425,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3515,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3516,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3529,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3530,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3531,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3622,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3623,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3624,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,3885,0,'','','Deprecated quest: <NYI> <TXT> The Gadgetzan Run'),
|
||||
(1,3910,0,'','','Deprecated quest: <NYI> <TXT> The Un''Goro Run'),
|
||||
(1,4323,0,'','','Deprecated quest: <NYI> <TXT> Get those Hyenas!!!'),
|
||||
(1,4541,0,'','','Deprecated quest: <NYI> <TXT>'),
|
||||
(1,4905,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5053,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5205,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5207,0,'','','Deprecated quest: <NYI> <TXT> The True Summoner'),
|
||||
(1,5208,0,'','','Deprecated quest: <NYI> <TXT> The Blessing of Evil'),
|
||||
(1,5209,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5303,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5304,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5506,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5512,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5516,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5520,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5523,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5532,0,'','','Deprecated quest: <NYI> <TXT> Ring of the Dawn'),
|
||||
(1,5653,0,'','','Deprecated quest: <NYI> Hex of Weakness'),
|
||||
(1,5659,0,'','','Deprecated quest: <NYI> Touch of Weakness'),
|
||||
(1,5664,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5665,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5666,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5667,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5668,0,'','','Deprecated quest: <NYI> A Blessing of Light'),
|
||||
(1,5669,0,'','','Deprecated quest: <NYI> A Blessing of Light'),
|
||||
(1,5670,0,'','','Deprecated quest: <NYI> A Blessing of Light'),
|
||||
(1,5671,0,'','','Deprecated quest: <NYI> A Blessing of Light'),
|
||||
(1,5681,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5682,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5683,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5684,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5685,0,'','','Deprecated quest: <NYI> <TXT> The Light Protects You'),
|
||||
(1,5686,0,'','','Deprecated quest: <NYI> The Light Protects You'),
|
||||
(1,5687,0,'','','Deprecated quest: <NYI> The Light Protects You'),
|
||||
(1,5688,0,'','','Deprecated quest: <NYI> <TXT> A Touch of Voodoo'),
|
||||
(1,5689,0,'','','Deprecated quest: <NYI> A Touch of Voodoo'),
|
||||
(1,5690,0,'','','Deprecated quest: <NYI> <TXT> A Touch of Voodoo'),
|
||||
(1,5691,0,'','','Deprecated quest: <NYI> <TXT> In the Dark it was Created'),
|
||||
(1,5692,0,'','','Deprecated quest: <NYI> In the Dark It was Created'),
|
||||
(1,5693,0,'','','Deprecated quest: <NYI> In the Dark It was Created'),
|
||||
(1,5694,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5695,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5696,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5697,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,5698,0,'','','Deprecated quest: <NYI> <TXT> A Small Amount of Hope'),
|
||||
(1,5699,0,'','','Deprecated quest: <NYI> A Small Amount of Hope'),
|
||||
(1,5700,0,'','','Deprecated quest: <NYI> A Small Amount of Hope'),
|
||||
(1,5701,0,'','','Deprecated quest: <NYI> <TXT> The Rites of Old'),
|
||||
(1,5702,0,'','','Deprecated quest: <NYI> The Rites of Old'),
|
||||
(1,5703,0,'','','Deprecated quest: <NYI> The Rites of Old'),
|
||||
(1,5704,0,'','','Deprecated quest: <NYI> <TXT> Undead Priest Robe'),
|
||||
(1,5705,0,'','','Deprecated quest: <NYI> No Longer a Shadow'),
|
||||
(1,5706,0,'','','Deprecated quest: <NYI> No Longer a Shadow'),
|
||||
(1,5707,0,'','','Deprecated quest: <NYI> <TXT> Flirting With Darkness'),
|
||||
(1,5708,0,'','','Deprecated quest: <NYI> Flirting With Darkness'),
|
||||
(1,5709,0,'','','Deprecated quest: <NYI> Flirting With Darkness'),
|
||||
(1,5710,0,'','','Deprecated quest: <NYI> <TXT> Troll Priest Robe'),
|
||||
(1,5711,0,'','','Deprecated quest: <NYI> The Lost Ways'),
|
||||
(1,5712,0,'','','Deprecated quest: <NYI> The Lost Ways'),
|
||||
(1,6003,0,'','','Deprecated quest: <nyi> <txt> Green With Envy'),
|
||||
(1,6165,0,'','','Deprecated quest: <NYI> <TXT> Archmage Timolain''s Remains'),
|
||||
(1,6202,0,'','','Deprecated quest: <UNUSED> Good and Evil'),
|
||||
(1,6702,0,'','','Deprecated quest: <TXT> SF,RFK,GNOMER,BF'),
|
||||
(1,6703,0,'','','Deprecated quest: <TXT> SF,RFK,GNOMER,BF - Repeatable'),
|
||||
(1,6704,0,'','','Deprecated quest: <TXT> SM,RFD,ULD'),
|
||||
(1,6705,0,'','','Deprecated quest: <TXT> SM,RFD,ULD - Repeatable'),
|
||||
(1,6706,0,'','','Deprecated quest: <TXT> ZUL,ST,MAR'),
|
||||
(1,6707,0,'','','Deprecated quest: <TXT> ZUL,ST,MAR - Repeatable'),
|
||||
(1,6708,0,'','','Deprecated quest: <TXT> BRD,DM,BRS'),
|
||||
(1,6709,0,'','','Deprecated quest: <TXT> BRD,DM,BRS - Repeatable'),
|
||||
(1,6710,0,'','','Deprecated quest: <TXT> UBRS,STRATH,SCHOL'),
|
||||
(1,6711,0,'','','Deprecated quest: <TXT> UBRS,STRATH,SCHOL - Repeatable'),
|
||||
(1,6841,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,6842,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,7069,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,7904,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8002,0,'','','Deprecated quest: Silverwing Sentinels <NYI> <TXT>'),
|
||||
(1,8244,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8245,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8247,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8248,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8337,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8339,0,'','','Deprecated quest: Royalty of the Council <NYI> <TXT> UNUSED'),
|
||||
(1,8340,0,'','','Deprecated quest: Twilight Signet Ring <NYI> <TXT>'),
|
||||
(1,8444,0,'','','Deprecated quest: <NYI> <TXT> gossip shade of ambermoon'),
|
||||
(1,8445,0,'','','Deprecated quest: <NYI> <TXT> gossip shade of ambermoon'),
|
||||
(1,8448,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8449,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8450,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8451,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8452,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8453,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8454,0,'','','Deprecated quest: <TXT> Mystery Reward'),
|
||||
(1,8458,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8459,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,8571,0,'','','Deprecated quest: <UNUSED> Armor Kits'),
|
||||
(1,9031,0,'','','Deprecated quest: <TXT>Anthion''s Parting Words'),
|
||||
(1,9306,0,'','','Deprecated quest: <DEPRECATED>Speak with Vindicator Aldar'),
|
||||
(1,9307,0,'','','Deprecated quest: <DEPRECATED>Compassion'),
|
||||
(1,9445,0,'','','Deprecated quest: <NYI><TXT>Placeholder: A Worthy Offering'),
|
||||
(1,9596,0,'','','Deprecated quest: <DEPRECATED>Control'),
|
||||
(1,9597,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,9599,0,'','','Deprecated quest: <UNUSED>'),
|
||||
(1,9679,0,'','','Deprecated quest: <NYI>Return to Knight-Lord Bloodvalor'),
|
||||
(1,9745,0,'','','Deprecated quest: <DEPRECATED>Suppressing the Flame'),
|
||||
(1,10370,0,'','','Deprecated quest: Nazgrel''s Command <TXT>'),
|
||||
(1,10402,0,'','','Deprecated quest: <TXT>'),
|
||||
(1,10616,0,'','','Deprecated quest: <nyi>Breadcrumb'),
|
||||
(1,10743,0,'','','Deprecated quest: [DEPRECATED]<txt>Hero of the Mok''Nathal'),
|
||||
(1,10890,0,'','','Deprecated quest: [UNUSED] <NYI> '),
|
||||
(1,11127,0,'','','Deprecated quest: <NYI>Thunderbrew Secrets');
|
||||
@@ -0,0 +1,50 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (3631,4487,4488,4489,4490,4183,4184,4185,4186,4223,4224,402,550,620,785,908,909,9662,11179,11461,12087,12103,12108,12156,12426,12682,12764,12765,24222,24227,10452,10453,11125,11179,11437,11438,11444,11445,11974,12179,12228,12233,12590,14119,14147,14148,14149,14150);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1, 402,0,'','','Deprecated quest: Sirra is Busy'),
|
||||
(1, 550,0,'','','Deprecated quest: Battle of Hillsbrad'),
|
||||
(1, 620,0,'','','Deprecated quest: The Monogrammed Sash'),
|
||||
(1, 785,0,'','','Deprecated quest: A Strategic Alliance'),
|
||||
(1, 908,0,'','','Deprecated quest: A Strategic Alliance'),
|
||||
(1, 909,0,'','','Deprecated quest: A Strategic Alliance'),
|
||||
(1,3631,0,'','','Deprecated quest: Summon Felsteed'),
|
||||
(1,4487,0,'','','Deprecated quest: Summon Felsteed'),
|
||||
(1,4488,0,'','','Deprecated quest: Summon Felsteed'),
|
||||
(1,4489,0,'','','Deprecated quest: Summon Felsteed'),
|
||||
(1,4490,0,'','','Deprecated quest: Summon Felsteed'),
|
||||
(1,4183,0,'','','Deprecated quest: The True Masters'),
|
||||
(1,4184,0,'','','Deprecated quest: The True Masters'),
|
||||
(1,4185,0,'','','Deprecated quest: The True Masters'),
|
||||
(1,4186,0,'','','Deprecated quest: The True Masters'),
|
||||
(1,4223,0,'','','Deprecated quest: The True Masters'),
|
||||
(1,4224,0,'','','Deprecated quest: The True Masters'),
|
||||
-- some random ones:
|
||||
(1, 9662,0,'','','Deprecated quest:Deprecated: Keanna''s Freedom'),
|
||||
(1,11179,0,'','','Deprecated quest:[Temporarily Deprecated Awaiting a New Mob]Finlay Is Gutless'),
|
||||
(1,11461,0,'','','Deprecated quest:DEPRECATED'),
|
||||
(1,12087,0,'','','Deprecated quest:A Little Help Here? DEPRECATED'),
|
||||
(1,12103,0,'','','Deprecated quest:DEPRECATED'),
|
||||
(1,12108,0,'','','Deprecated quest:DEPRECATED'),
|
||||
(1,12156,0,'','','Deprecated quest:DEPRECAED'),
|
||||
(1,12426,0,'','','Deprecated quest:DEPRECATED'),
|
||||
(1,12682,0,'','','Deprecated quest:Uncharted Territory (DEPRECATED)'),
|
||||
(1,12764,0,'','','Deprecated quest:The Secret to Kungaloosh (DEPRECATED)'),
|
||||
(1,12765,0,'','','Deprecated quest:Kungaloosh (DEPRECATED)'),
|
||||
(1,24222,0,'','','Deprecated quest:Call to Arms: Eye of the Storm DEPRECATED'),
|
||||
(1,24227,0,'','','Deprecated quest:DEPRECATED'),
|
||||
(1,10452,0,'','','Deprecated quest:DON''T USE [PH] Fel Orc 1'),
|
||||
(1,10453,0,'','','Deprecated quest:DON''T USE [PH] Fel Orc bread'),
|
||||
(1,11125,0,'','','Deprecated quest:[PH] New Hinterlands Quest'),
|
||||
(1,11437,0,'','','Deprecated quest:[PH] Beer Garden A'),
|
||||
(1,11438,0,'','','Deprecated quest:[PH] Beer Garden B'),
|
||||
(1,11444,0,'','','Deprecated quest:[PH] Beer Garden A'),
|
||||
(1,11445,0,'','','Deprecated quest:[PH] Beer Garden B'),
|
||||
(1,11974,0,'','','Deprecated quest:[ph] Now, When I Grow Up...'),
|
||||
(1,12179,0,'','','Deprecated quest:Specialization 1 [PH]'),
|
||||
(1,12228,0,'','','Deprecated quest:Reacquiring the Magic [PH]'),
|
||||
(1,12233,0,'','','Deprecated quest:[Depricated]Sewing Your Seed'),
|
||||
(1,12590,0,'','','Deprecated quest:Blahblah[PH]'),
|
||||
(1,14119,0,'','','Deprecated quest:Blank [PH]'),
|
||||
(1,14147,0,'','','Deprecated quest:Blank [PH]'),
|
||||
(1,14148,0,'','','Deprecated quest:Blank [PH]'),
|
||||
(1,14149,0,'','','Deprecated quest:Blank [PH]'),
|
||||
(1,14150,0,'','','Deprecated quest:Blank [PH]');
|
||||
@@ -0,0 +1,23 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (7790,8152,8237,8971,8972,8973,8974,8975,8976,9296,9750,10145,10207,10549,11493,11588,11589,11997,12313,13840,24797);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,7790,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8152,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8237,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8971,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8972,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8973,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8974,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8975,0,'','','Deprecated quest: REUSE'),
|
||||
(1,8976,0,'','','Deprecated quest: REUSE'),
|
||||
(1,9296,0,'','','Deprecated quest: reuse'),
|
||||
(1,9750,0,'','','Deprecated quest: UNUSED Urgent Delivery'),
|
||||
(1,10145,0,'','','Deprecated quest: Mission: Sever the Tie UNUSED'),
|
||||
(1,10207,0,'','','Deprecated quest: Forward Base: Reaver''s Fall REUSE'),
|
||||
(1,10549,0,'','','Deprecated quest: REUSE'),
|
||||
(1,11493,0,'','','Deprecated quest: UNUSED'),
|
||||
(1,11588,0,'','','Deprecated quest: REUSE'),
|
||||
(1,11589,0,'','','Deprecated quest: REUSE'),
|
||||
(1,11997,0,'','','Deprecated quest: REUSE'),
|
||||
(1,12313,0,'','','Deprecated quest: UNUSED Save Brewfest!'),
|
||||
(1,13840,0,'','','Deprecated quest: REUSE'),
|
||||
(1,24797,0,'','','Deprecated quest: REUSE');
|
||||
@@ -0,0 +1,38 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (9754,9755,10215,11522,12445,12731,12923,13541);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,9754,0,'','','Deprecated quest: '),
|
||||
(1,9755,0,'','','Deprecated quest: '),
|
||||
(1,10215,0,'','','Deprecated quest: '),
|
||||
(1,11522,0,'','','Deprecated quest: '),
|
||||
(1,12445,0,'','','Deprecated quest: '),
|
||||
(1,12731,0,'','','Deprecated quest: '),
|
||||
(1,12923,0,'','','Deprecated quest: '),
|
||||
(1,13541,0,'','','Deprecated quest: '),
|
||||
-- some others that contain a -
|
||||
(1,7797,0,'','','Deprecated quest: Dimensional Ripper - Everlook'),
|
||||
(1,7869,0,'','','Deprecated quest: test quest - do not use'),
|
||||
(1,7870,0,'','','Deprecated quest: test quest2 - do not use'),
|
||||
(1,7906,0,'','','Deprecated quest: Darkmoon Cards - Beasts'),
|
||||
(1,9378,0,'','','Deprecated quest: DND FLAG The Dread Citadel - Naxxramas'),
|
||||
(1,9611,0,'','','Deprecated quest: Azuremyst: aa - A - Quest Flag 000'),
|
||||
(1,9880,0,'','','Deprecated quest: Hellfire Penninsula: -pn - A - ToWoW - Hellfire Turnin Cap'),
|
||||
(1,9881,0,'','','Deprecated quest: Hellfire Penninsula: -pn - H - ToWoW - Hellfire Turnin Cap'),
|
||||
(1,9908,0,'','','Deprecated quest: Hellfire Penninsula: -pn - A - ToWoW - Hellfire Turnin'),
|
||||
(1,9909,0,'','','Deprecated quest: Hellfire Penninsula: -pn - H - ToWoW - Hellfire Turnin'),
|
||||
(1,9949,0,'','','Deprecated quest: A Bird''s-Eye View'),
|
||||
(1,9950,0,'','','Deprecated quest: A Bird''s-Eye View'),
|
||||
(1,10088,0,'','','Deprecated quest: When This Mine''s a-Rockin'''),
|
||||
(1,10181,0,'','','Deprecated quest: Collector''s Edition: -pn - E - FLAG'),
|
||||
(1,10214,0,'','','Deprecated quest: When This Mine''s a-Rockin'''),
|
||||
(1,10454,0,'','','Deprecated quest: FLAG - OFF THE RAILS'),
|
||||
(1,11197,0,'','','Deprecated quest: ZZOLD Upper Deck Promo - Ghost Wolf Mount OLD'),
|
||||
(1,11226,0,'','','Deprecated quest: Upper Deck Promo - Spectral Tiger Mount'),
|
||||
(1,11577,0,'','','Deprecated quest: WoW Collector''s Edition: - DEM - E - FLAG'),
|
||||
(1,11874,0,'','','Deprecated quest: Upper Deck Promo - Rocket Mount'),
|
||||
(1,11937,0,'','','Deprecated quest: FLAG - all torch return quests are complete'),
|
||||
(1,12485,0,'','','Deprecated quest: Howling Fjord: aa - A - LK FLAG'),
|
||||
(1,12600,0,'','','Deprecated quest: Upper Deck Promo - Bear Mount'),
|
||||
(1,13123,0,'','','Deprecated quest: WotLK Collector''s Edition: - DEM - E - FLAG'),
|
||||
(1,13210,0,'','','Deprecated quest: Blizzard Account: - DEM - E - FLAG'),
|
||||
(1,13317,0,'','','Deprecated quest: ----'),
|
||||
(1,13990,0,'','','Deprecated quest: Upper Deck Promo - Chicken Mount');
|
||||
@@ -0,0 +1,34 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (11335,11336,11337,11338,11339,11340,11341,11342,13405,13407,13427,13428,14163,14164,14178,14179,14180,14181,14182,14183,24216,24217,24218,24219,24220,24221,24223,24224,24225,24226,24426,24427);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,11335,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,11336,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
|
||||
(1,11337,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
|
||||
(1,11338,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,11339,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,11340,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
|
||||
(1,11341,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
|
||||
(1,11342,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,13405,0,'','','Deprecated quest: Call to Arms: Strand of the Ancients'),
|
||||
(1,13407,0,'','','Deprecated quest: Call to Arms: Strand of the Ancients'),
|
||||
(1,13427,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
|
||||
(1,13428,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
|
||||
(1,14163,0,'','','Deprecated quest: Call to Arms: Isle of Conquest'),
|
||||
(1,14164,0,'','','Deprecated quest: Call to Arms: Isle of Conquest'),
|
||||
(1,14178,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,14179,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
|
||||
(1,14180,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,14181,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,14182,0,'','','Deprecated quest: Call to Arms: Eye of the Storm'),
|
||||
(1,14183,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24216,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24217,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24218,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24219,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24220,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,24221,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,24223,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,24224,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24225,0,'','','Deprecated quest: Call to Arms: Warsong Gulch'),
|
||||
(1,24226,0,'','','Deprecated quest: Call to Arms: Arathi Basin'),
|
||||
(1,24426,0,'','','Deprecated quest: Call to Arms: Alterac Valley'),
|
||||
(1,24427,0,'','','Deprecated quest: Call to Arms: Alterac Valley');
|
||||
@@ -0,0 +1,28 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (8384,8386,8389,8390,8391,8392,8397,8398,8404,8405,8406,8407,8408,8431,8432,8433,8434,8435,8440,8441,8442,8443,8567,8568,8569,8570);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,8384,0,'','','Deprecated quest: Claiming Arathi Basin'),
|
||||
(1,8386,0,'','','Deprecated quest: Fight for Warsong Gulch'),
|
||||
(1,8389,0,'','','Deprecated quest: Battle of Warsong Gulch'),
|
||||
(1,8390,0,'','','Deprecated quest: Conquering Arathi Basin'),
|
||||
(1,8391,0,'','','Deprecated quest: Claiming Arathi Basin'),
|
||||
(1,8392,0,'','','Deprecated quest: Claiming Arathi Basin'),
|
||||
(1,8397,0,'','','Deprecated quest: Claiming Arathi Basin'),
|
||||
(1,8398,0,'','','Deprecated quest: Claiming Arathi Basin'),
|
||||
(1,8404,0,'','','Deprecated quest: Fight for Warsong Gulch'),
|
||||
(1,8405,0,'','','Deprecated quest: Fight for Warsong Gulch'),
|
||||
(1,8406,0,'','','Deprecated quest: Fight for Warsong Gulch'),
|
||||
(1,8407,0,'','','Deprecated quest: Fight for Warsong Gulch'),
|
||||
(1,8408,0,'','','Deprecated quest: Fight for Warsong Gulch'),
|
||||
(1,8431,0,'','','Deprecated quest: Battle of Warsong Gulch'),
|
||||
(1,8432,0,'','','Deprecated quest: Battle of Warsong Gulch'),
|
||||
(1,8433,0,'','','Deprecated quest: Battle of Warsong Gulch'),
|
||||
(1,8434,0,'','','Deprecated quest: Battle of Warsong Gulch'),
|
||||
(1,8435,0,'','','Deprecated quest: Battle of Warsong Gulch'),
|
||||
(1,8440,0,'','','Deprecated quest: Conquering Arathi Basin'),
|
||||
(1,8441,0,'','','Deprecated quest: Conquering Arathi Basin'),
|
||||
(1,8442,0,'','','Deprecated quest: Conquering Arathi Basin'),
|
||||
(1,8443,0,'','','Deprecated quest: Conquering Arathi Basin'),
|
||||
(1,8567,0,'','','Deprecated quest: Past Victories in Warsong Gulch'),
|
||||
(1,8568,0,'','','Deprecated quest: Past Victories in Warsong Gulch'),
|
||||
(1,8569,0,'','','Deprecated quest: Past Efforts in Warsong Gulch'),
|
||||
(1,8570,0,'','','Deprecated quest: Past Efforts in Warsong Gulch');
|
||||
@@ -0,0 +1,10 @@
|
||||
UPDATE `quest_template` SET `specialflags`= `specialflags`|8 WHERE `id` IN (
|
||||
24889, -- Classic Random 5-15 (Nth)
|
||||
24890, -- Classic Random 15-25 (Nth)
|
||||
24891, -- Classic Random 24-34 (Nth)
|
||||
24892, -- Classic Random 35-45 (Nth)
|
||||
24893, -- Classic Random 46-55 (Nth)
|
||||
24894, -- Classic Random 56-60 (Nth)
|
||||
24895, -- Classic Random 60-64 (Nth)
|
||||
24896); -- Classic Random 65-70 (Nth)
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
-- Hordes's Honor the Flame
|
||||
-- Add missing creature_quesrelation and involvedrealation that were blocking quests
|
||||
DELETE FROM `game_event_creature_quest` WHERE `quest` IN (11846,11845,11852,11839,11859,11841,11851,11855,11835,11858,11863,13500,13493,13494,13495,13496,13497,13498,13499,11850,11848,11853,11857,11837,11844,11860,11584,11862,11842,11840);
|
||||
INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`, `quest`) VALUES
|
||||
-- Flame Keeper of Eastern Kingdom? {Achievement=1025}
|
||||
(1,25933, 11850), -- Ghostland
|
||||
(1,25931, 11848), -- Eversong woods
|
||||
(1,25935, 11853), -- Hillsbrad Foothills
|
||||
(1,25941, 11857), -- Swamp of sorrows
|
||||
(1,25920, 11837), -- Cape of Stranglethorn
|
||||
(1,25927, 11844), -- Burning Steppes
|
||||
(1,25944, 11860), -- The Hinterlands
|
||||
(1,25939, 11584), -- Silverpine Forest
|
||||
(1,25946, 11862), -- Tirisfal Glades
|
||||
(1,25925, 11842), -- Badlands
|
||||
(1,25923, 11840), -- Arathi Highlands
|
||||
-- The Flame Keeper of Kalimdore - {Achievement=1026}
|
||||
(1,25929, 11846), -- Durotar
|
||||
(1,25928, 11845), -- Desolace
|
||||
(1,25936, 11852), -- Mulgore
|
||||
(1,25922, 11839), -- Winterspring
|
||||
(1,25943, 11859), -- Barrens
|
||||
(1,25884, 11841), -- Ashenvale
|
||||
-- The Flame Keeper of Outland - {Achievement=1027}
|
||||
(1,25934, 11851), -- Hellfire Peninsula
|
||||
(1,25938, 11855), -- Shadowmoon Valley
|
||||
(1,25918, 11835), -- Netherstorm
|
||||
(1,25942, 11858), -- Terokkar
|
||||
(1,25947, 11863), -- Terokkar
|
||||
-- Flame Keeper of Northrend - {Achievement=6009}
|
||||
(1,32816, 13500), -- Zul'Drak
|
||||
(1,32809, 13493), -- Borean Tundra
|
||||
(1,32810, 13494), -- Sholazar Basin
|
||||
(1,32811, 13495), -- Dragonblight
|
||||
(1,32815, 13499), -- Crystalsong Forest
|
||||
(1,32814, 13498), -- Storm Peaks
|
||||
(1,32813, 13497), -- Grizzly Hills
|
||||
(1,32812, 13496); -- Howling Fjords
|
||||
-- add missing quest-involved relations
|
||||
DELETE FROM `creature_involvedrelation` WHERE `quest` IN (11846,11845,11852,11839,11859,11841,11851,11855,11835,11858,11863,13500,13493,13494,13495,13496,13497,13498,13499,11850,11848,11853,11857,11837,11844,11860,11584,11862,11842,11840);
|
||||
INSERT INTO `creature_involvedrelation` (`id`, `quest`) VALUES
|
||||
(25929, 11846), -- Durotar
|
||||
(25928, 11845), -- Desolace
|
||||
(25936, 11852), -- Mulgore
|
||||
(25922, 11839), -- Winterspring
|
||||
(25943, 11859), -- Barrens
|
||||
(25884, 11841), -- Ashenvale
|
||||
(25934, 11851), -- Hellfire Peninsula
|
||||
(25938, 11855), -- Shadowmoon Valley
|
||||
(25918, 11835), -- Netherstorm
|
||||
(25942, 11858), -- Terokkar
|
||||
(25947, 11863), -- Terokkar
|
||||
(32816, 13500), -- Zul'Drak
|
||||
(32809, 13493), -- Borean Tundra
|
||||
(32810, 13494), -- Sholazar Basin
|
||||
(32811, 13495), -- Dragonblight
|
||||
(32815, 13499), -- Crystalsong Forest
|
||||
(32814, 13498), -- Storm Peaks
|
||||
(32813, 13497), -- Grizzly Hills
|
||||
(32812, 13496), -- Howling Fjords
|
||||
(25933, 11850), -- Ghostland
|
||||
(25931, 11848), -- Eversong woods
|
||||
(25935, 11853), -- Hillsbrad Foothills
|
||||
(25941, 11857), -- Swamp of sorrows
|
||||
(25920, 11837), -- Cape of Stranglethorn
|
||||
(25927, 11844), -- Burning Steppes
|
||||
(25944, 11860), -- The Hinterlands
|
||||
(25939, 11584), -- Silverpine Forest
|
||||
(25946, 11862), -- Tirisfal Glades
|
||||
(25925, 11842), -- Badlands
|
||||
(25923, 11840); -- Arathi Highlands
|
||||
-- update quest texts and rewardcash
|
||||
UPDATE `quest_template` SET `RewardOrRequiredMoney`=37000,`RewardMoneyMaxLevel`=66300, `OfferRewardText`='Honor the Durotar flame!' WHERE `Id`=11846;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Mulgore flame!' WHERE `Id`=11852;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Barrens flame!',`RewardOrRequiredMoney`=37000, `RewardMoneyMaxLevel`=66300 WHERE `Id`=11859; -- Barrens
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Tanaris flame!',`RequestItemsText`='' WHERE `Id`=11838 LIMIT 1;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Ashenvale flame!' WHERE `Id`=11841;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Winterspring flame!' WHERE `Id`=11839;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Desolace flame!' WHERE `Id`=11845;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Thousand Needles flame!' WHERE `Id`=11861;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Feralas flame!' WHERE `Id`=11849;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Dustwallow Marsh flame!' WHERE `Id`=11847;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Silithus flame!' WHERE `Id`=11836;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Stonetalon Mountains flame!' WHERE `Id`=11856;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Hellfire Peninsula flame!' WHERE `Id`=11851;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Shadowmoon Valley flame!' WHERE `Id`=11855;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Nagrand flame!', `RequestItemsText`='' WHERE `Id`=11821;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Netherstorm flame!' WHERE `Id`=11835;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Blades Edge Mountains flame! ', `RequestItemsText`='' WHERE `Id`=11843;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Terokkar flame!' WHERE `Id`=11858;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Zangarmarsh flame!' WHERE `Id`=11863;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Zul''Drak flame!' WHERE `Id`=13500;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Borean Tundra flame!' WHERE `Id`=13493;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Sholazar Basin flame!' WHERE `Id`=13494;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Dragonblight flame!' WHERE `Id`=13495;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Crystalsong Forest flame!' WHERE `Id`=13499;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Storm Peaks flame!' WHERE `Id`=13498;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Grizzly Hills flame!' WHERE `Id`=13497;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Howling Fjords flame!' WHERE `Id`=13496;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Ghostland flame!' WHERE `Id`=11850;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Eversong woods flame!' WHERE `Id`=11848;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Hillsbrad Foothills flame!' WHERE `Id`=11853;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Swamp of sorrows flame!' WHERE `Id`=11857;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Cape of Stranglethorn flame!' WHERE `Id`=11837;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Burning Steppes flame!' WHERE `Id`=11844;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Hinterlands flame!' WHERE `Id`=11860;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Silverpine Forest flame!' WHERE `Id`=11584;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Tirisfal Glades flame!' WHERE `Id`=11862;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Badlands flame!' WHERE `Id`=11842;
|
||||
UPDATE `quest_template` SET `OfferRewardText`='Honor the Arathi Highlands flame!' WHERE `Id`=11840;
|
||||
@@ -0,0 +1,65 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (9034,9036,9037,9038,9039,9040,9041,9042,9043,9044,9046,9047,9048,9049,9050,9054,9055,9056,9057,9058,9059,9060,9061,9068,9069,9070,9071,9072,9073,9074,9075,9077,9078,9079,9080,9081,9082,9083,9084,9086,9087,9088,9089,9090,9091,9092,9093,9095,9096,9097,9098,9099,9100,9101,9102,9103,9104,9105,9106,9107,9108,9109,9110);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,9034,0,'','','Deprecated quest: Dreadnaught Breastplate'),
|
||||
(1,9036,0,'','','Deprecated quest: Dreadnaught Legplates'),
|
||||
(1,9037,0,'','','Deprecated quest: Dreadnaught Helmet'),
|
||||
(1,9038,0,'','','Deprecated quest: Dreadnaught Pauldrons'),
|
||||
(1,9039,0,'','','Deprecated quest: Dreadnaught Sabatons'),
|
||||
(1,9040,0,'','','Deprecated quest: Dreadnaught Gauntlets'),
|
||||
(1,9041,0,'','','Deprecated quest: Dreadnaught Waistguard'),
|
||||
(1,9042,0,'','','Deprecated quest: Dreadnaught Bracers'),
|
||||
(1,9043,0,'','','Deprecated quest: Redemption Tunic'),
|
||||
(1,9044,0,'','','Deprecated quest: Redemption Legguards'),
|
||||
(1,9046,0,'','','Deprecated quest: Redemption Spaulders'),
|
||||
(1,9047,0,'','','Deprecated quest: Redemption Boots'),
|
||||
(1,9048,0,'','','Deprecated quest: Redemption Handguards'),
|
||||
(1,9049,0,'','','Deprecated quest: Redemption Girdle'),
|
||||
(1,9050,0,'','','Deprecated quest: Redemption Wristguards'),
|
||||
(1,9054,0,'','','Deprecated quest: Cryptstalker Tunic'),
|
||||
(1,9055,0,'','','Deprecated quest: Cryptstalker Legguards'),
|
||||
(1,9056,0,'','','Deprecated quest: Cryptstalker Headpiece'),
|
||||
(1,9057,0,'','','Deprecated quest: Cryptstalker Spaulders'),
|
||||
(1,9058,0,'','','Deprecated quest: Cryptstalker Boots'),
|
||||
(1,9059,0,'','','Deprecated quest: Cryptstalker Handguards'),
|
||||
(1,9060,0,'','','Deprecated quest: Cryptstalker Girdle'),
|
||||
(1,9061,0,'','','Deprecated quest: Cryptstalker Wristguards'),
|
||||
(1,9068,0,'','','Deprecated quest: Earthshatter Tunic'),
|
||||
(1,9069,0,'','','Deprecated quest: Earthshatter Legguards'),
|
||||
(1,9070,0,'','','Deprecated quest: Earthshatter Headpiece'),
|
||||
(1,9071,0,'','','Deprecated quest: Earthshatter Spaulders'),
|
||||
(1,9072,0,'','','Deprecated quest: Earthshatter Boots'),
|
||||
(1,9073,0,'','','Deprecated quest: Earthshatter Handguards'),
|
||||
(1,9074,0,'','','Deprecated quest: Earthshatter Girdle'),
|
||||
(1,9075,0,'','','Deprecated quest: Earthshatter Wristguards'),
|
||||
(1,9077,0,'','','Deprecated quest: Bonescythe Breastplate'),
|
||||
(1,9078,0,'','','Deprecated quest: Bonescythe Legplates'),
|
||||
(1,9079,0,'','','Deprecated quest: Bonescythe Helmet'),
|
||||
(1,9080,0,'','','Deprecated quest: Bonescythe Pauldrons'),
|
||||
(1,9081,0,'','','Deprecated quest: Bonescythe Sabatons'),
|
||||
(1,9082,0,'','','Deprecated quest: Bonescythe Gauntlets'),
|
||||
(1,9083,0,'','','Deprecated quest: Bonescythe Waistguard'),
|
||||
(1,9084,0,'','','Deprecated quest: Bonescythe Bracers'),
|
||||
(1,9086,0,'','','Deprecated quest: Dreamwalker Tunic'),
|
||||
(1,9087,0,'','','Deprecated quest: Dreamwalker Legguards'),
|
||||
(1,9088,0,'','','Deprecated quest: Dreamwalker Headpiece'),
|
||||
(1,9089,0,'','','Deprecated quest: Dreamwalker Spaulders'),
|
||||
(1,9090,0,'','','Deprecated quest: Dreamwalker Boots'),
|
||||
(1,9091,0,'','','Deprecated quest: Dreamwalker Handguards'),
|
||||
(1,9092,0,'','','Deprecated quest: Dreamwalker Girdle'),
|
||||
(1,9093,0,'','','Deprecated quest: Dreamwalker Wristguards'),
|
||||
(1,9095,0,'','','Deprecated quest: Frostfire Robe'),
|
||||
(1,9096,0,'','','Deprecated quest: Frostfire Leggings'),
|
||||
(1,9097,0,'','','Deprecated quest: Frostfire Circlet'),
|
||||
(1,9098,0,'','','Deprecated quest: Frostfire Shoulderpads'),
|
||||
(1,9099,0,'','','Deprecated quest: Frostfire Sandals'),
|
||||
(1,9100,0,'','','Deprecated quest: Frostfire Gloves'),
|
||||
(1,9101,0,'','','Deprecated quest: Frostfire Belt'),
|
||||
(1,9102,0,'','','Deprecated quest: Frostfire Bindings'),
|
||||
(1,9103,0,'','','Deprecated quest: Plagueheart Robe'),
|
||||
(1,9104,0,'','','Deprecated quest: Plagueheart Leggings'),
|
||||
(1,9105,0,'','','Deprecated quest: Plagueheart Circlet'),
|
||||
(1,9106,0,'','','Deprecated quest: Plagueheart Shoulderpads'),
|
||||
(1,9107,0,'','','Deprecated quest: Plagueheart Sandals'),
|
||||
(1,9108,0,'','','Deprecated quest: Plagueheart Gloves'),
|
||||
(1,9109,0,'','','Deprecated quest: Plagueheart Belt'),
|
||||
(1,9110,0,'','','Deprecated quest: Plagueheart Bindings');
|
||||
@@ -0,0 +1,10 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (9111,9112,9113,9114,9115,9116,9117,9118);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
(1,9111,0,'','','Deprecated quest: Robe of Faith'),
|
||||
(1,9112,0,'','','Deprecated quest: Leggings of Faith'),
|
||||
(1,9113,0,'','','Deprecated quest: Circlet of Faith'),
|
||||
(1,9114,0,'','','Deprecated quest: Shoulderpads of Faith'),
|
||||
(1,9115,0,'','','Deprecated quest: Sandals of Faith'),
|
||||
(1,9116,0,'','','Deprecated quest: Gloves of Faith'),
|
||||
(1,9117,0,'','','Deprecated quest: Belt of Faith'),
|
||||
(1,9118,0,'','','Deprecated quest: Bindings of Faith');
|
||||
@@ -0,0 +1,43 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (2018,5101,7681,7682,8230,8270,8274,9284,9285,9286,9577,9583,11121,11994,12015,12493,12911,13649,14106,9713,9926,11087,11115,11116,11353,11518,12186,12187,12494,12845,13807,14185,14186,14187,24808,24809,24810,24811,25238);
|
||||
INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`params_0`,`params_1`,`comment`) VALUES
|
||||
-- containing "test"
|
||||
(1,2018,0,'','','Deprecated quest: Rokar''s Test'),
|
||||
(1,5101,0,'','','Deprecated quest: Lee''s Ultimate Test Quest... of Doom!'),
|
||||
(1,7681,0,'','','Deprecated quest: Hunter test quest'),
|
||||
(1,7682,0,'','','Deprecated quest: Hunter test quest2'),
|
||||
(1,8230,0,'','','Deprecated quest: Collin''s Test Quest'),
|
||||
(1,8270,0,'','','Deprecated quest: test copy quest'),
|
||||
(1,8274,0,'','','Deprecated quest: Test Kill Quest'),
|
||||
(1,9284,0,'','','Deprecated quest: Aldor Faction Test'),
|
||||
(1,9285,0,'','','Deprecated quest: Consortium Faction Test'),
|
||||
(1,9286,0,'','','Deprecated quest: Scryers Faction Test'),
|
||||
(1,9577,0,'','','Deprecated quest: DAILY TEST QUEST (PVP)'),
|
||||
(1,9583,0,'','','Deprecated quest: Omar''s Test Quest'),
|
||||
(1,11121,0,'','','Deprecated quest: DAILY TEST QUEST (RAID)'),
|
||||
(1,11994,0,'','','Deprecated quest: Juno''s Flag Tester'),
|
||||
(1,12015,0,'','','Deprecated quest: Test Quest for Craig'),
|
||||
(1,12493,0,'','','Deprecated quest: PvP Test'),
|
||||
(1,12911,0,'','','Deprecated quest: Kill Credit Test'),
|
||||
(1,13649,0,'','','Deprecated quest: Justin''s Fun Test'),
|
||||
(1,14106,0,'','','Deprecated quest: Na Kada''s Quest Test'),
|
||||
-- containing "flag"
|
||||
(1,9713,0,'','','Deprecated quest: Glowcap Harvesting Enabling Flag'),
|
||||
(1,9926,0,'','','Deprecated quest: FLAG Shadow Council/Warmaul Questline'),
|
||||
(1,11087,0,'','','Deprecated quest: HYJAL FLAG'),
|
||||
(1,11115,0,'','','Deprecated quest: The Mark of Vashj (FLAG ONLY)'),
|
||||
(1,11116,0,'','','Deprecated quest: Trial of the Naaru: (QUEST FLAG)'),
|
||||
(1,11353,0,'','','Deprecated quest: FLAG: Got the work shirt'),
|
||||
(1,11518,0,'','','Deprecated quest: Sunwell Daily Portal Flag'),
|
||||
(1,12186,0,'','','Deprecated quest: FLAG: Winner'),
|
||||
(1,12187,0,'','','Deprecated quest: FLAG: Participant'),
|
||||
(1,12494,0,'','','Deprecated quest: FLAG: Riding Trainer Advertisement (20)'),
|
||||
(1,12845,0,'','','Deprecated quest: Dalaran Teleport Crystal Flag'),
|
||||
(1,13807,0,'','','Deprecated quest: FLAG: Tournament Invitation'),
|
||||
(1,14185,0,'','','Deprecated quest: FLAG: Riding Trainer Advertisement (40)'),
|
||||
(1,14186,0,'','','Deprecated quest: FLAG: Riding Trainer Advertisement (60)'),
|
||||
(1,14187,0,'','','Deprecated quest: FLAG: Riding Trainer Advertisement (70)'),
|
||||
(1,24808,0,'','','Deprecated quest: Tank Ring Flag'),
|
||||
(1,24809,0,'','','Deprecated quest: Healer Ring Flag'),
|
||||
(1,24810,0,'','','Deprecated quest: Melee Ring Flag'),
|
||||
(1,24811,0,'','','Deprecated quest: Caster Ring Flag'),
|
||||
(1,25238,0,'','','Deprecated quest: Strength Ring Flag');
|
||||
@@ -0,0 +1,365 @@
|
||||
-- Add all quests connected with Midsummer Fire Festival that are to be reseted on each next year to game_event_seasonal_questrelation, so players can complete them on and on... /as of different festivals/.
|
||||
DELETE FROM `game_event_seasonal_questrelation` WHERE `questId` IN (11846,11845,11852,11839,11859,11841,11849,11861,11847,11836,11838,11856,11850,11848,11853,11857,11837,11844,11860,11584,11862,11842,11840,11851,11855,11835,11858,11863,11821,11854,11843,13500,13493,13494,13495,13496,13497,13498,13499,11805,11812,11815,11834,11833,11831,11817,11811,11806,11809,11826,11824,11826,11827,11819,11583,11828,11816,11810,11808,11804,11832,11813,11814,11820,11822,11823,11821,11830,11818,11825,11807,11829,13485,13487,13489,13488,13490,13486,13491,13492,11770,11769,11777,11803,11783,11773,11765,11771,11785,11800,11780,11802,11774,11772,11776,11781,11801,11768,11784,11580,11786,11766,11764,11775,11779,11799,11782,11787,11767,11778,13458,13441,13450,13451,13457,13455,13454,13453,11734,11741,11744,11763,11762,11760,11746,11740,11735,11738,11753,11755,11756,11748,11581,11757,11745,11739,11737,11732,11761,11742,11743,11749,11751,11752,11750,11759,11747,11754,11736,11758,13440,13443,13445,13444,13449,13446,13442,13447,13431,9324,11935,9326,9325,9332,9331,9330,11933,11972);
|
||||
INSERT INTO `game_event_seasonal_questrelation` (`questId`, `eventEntry`) VALUES
|
||||
(11846,1), -- Durotar // Honor the Flame (Horde) - Kalimdor
|
||||
(11845,1), -- Desolace
|
||||
(11852,1), -- Mulgore
|
||||
(11839,1), -- Winterspring
|
||||
(11859,1), -- Barrens
|
||||
(11849,1), -- Feralas
|
||||
(11841,1), -- Ashenvale
|
||||
(11847,1), -- Dustwallow marsh
|
||||
(11861,1), -- Thousand Needles
|
||||
(11856,1), -- Stonetalon Mountains
|
||||
(11836,1), -- Silithus
|
||||
(11838,1), -- Tanaris
|
||||
(11850,1), -- Ghostland // Honor the Flame (Horde) - Eeastern Kingdoms
|
||||
(11848,1), -- Eversong woods
|
||||
(11853,1), -- Hillsbrad Foothills
|
||||
(11857,1), -- Swamp of sorrows
|
||||
(11837,1), -- Cape of Stranglethorn
|
||||
(11844,1), -- Burning Steppes
|
||||
(11860,1), -- The Hinterlands
|
||||
(11584,1), -- Silverpine Forest
|
||||
(11862,1), -- Tirisfal Glades
|
||||
(11842,1), -- Badlands
|
||||
(11840,1), -- Arathi Highlands
|
||||
(11851,1), -- Hellfire Peninsula // Honor the Flame (Horde) - Outland
|
||||
(11855,1), -- Shadowmoon Valley
|
||||
(11835,1), -- Netherstorm
|
||||
(11858,1), -- Terokkar
|
||||
(11863,1), -- Zangarmarsh
|
||||
(11854,1), -- Nagrand
|
||||
(11843,1), -- Blade''s Edge Mountains
|
||||
(13500,1), -- Zul'Drak // Honor the Flame (Horde) - Northrend
|
||||
(13493,1), -- Borean Tundra
|
||||
(13494,1), -- Sholazar Basin
|
||||
(13495,1), -- Dragonblight
|
||||
(13499,1), -- Crystalsong Forest
|
||||
(13498,1), -- Storm Peaks
|
||||
(13497,1), -- Grizzly Hills
|
||||
(13496,1), -- Howling Fjords
|
||||
(11805,1), -- Ashenvale // Honor the Flame (Alliance) - Kalimdor
|
||||
(11812,1), -- Desolace
|
||||
(11815,1), -- Dustwallow Marsh
|
||||
(11834,1), -- Winterspring
|
||||
(11833,1), -- Tanaris
|
||||
(11831,1), -- Silithus
|
||||
(11817,1), -- Feralas
|
||||
(11811,1), -- Darkshore
|
||||
(11806,1), -- Azuremyst Isle
|
||||
(11809,1), -- Bloodmyst Isle
|
||||
(11824,1), -- Teldrassil
|
||||
(11826,1), -- The Hinterlands // Honor the Flame (Alliance) - Eeastern Kingdoms
|
||||
(11827,1), -- The Western Plaguelands
|
||||
(11819,1), -- Hillsbrad Foothills
|
||||
(11583,1), -- Westfall
|
||||
(11828,1), -- Wetlands
|
||||
(11816,1), -- Elwynn Forest
|
||||
(11810,1), -- Burning Steppes
|
||||
(11808,1), -- Blasted Lands
|
||||
(11804,1), -- Arathi Highlands
|
||||
(11832,1), -- Cape of Stranglethorn
|
||||
(11813,1), -- Dun Morogh
|
||||
(11814,1), -- Duskwood
|
||||
(11820,1), -- Loch Modan
|
||||
(11822,1), -- Redridge Mountains
|
||||
(11823,1), -- Shadowmoon Valley // Honor the Flame (Alliance) - Outland
|
||||
(11821,1), -- Nagrand
|
||||
(11830,1), -- Netherstorm
|
||||
(11818,1), -- Hellfire Peninsula
|
||||
(11825,1), -- Terokkar
|
||||
(11807,1), -- Blade's Edge
|
||||
(11829,1), -- Zangarmarsh
|
||||
(13485,1), -- Borean Tundra // Honor the Flame (Alliance) - Northrend
|
||||
(13487,1), -- Dragonblight
|
||||
(13489,1), -- Grizzly Hills
|
||||
(13488,1), -- Howling Fjord
|
||||
(13492,1), -- Zul'Drak
|
||||
(13490,1), -- The Storm Peaks
|
||||
(13486,1), -- Sholazar Basin
|
||||
(13491,1), -- Crystalsong Forest
|
||||
(11770,1), -- Durotar // Desecrate the Flame (Alliance) - Kalimdor
|
||||
(11769,1), -- Desolace
|
||||
(11777,1), -- Mulgore
|
||||
(11803,1), -- Winterspring
|
||||
(11783,1), -- Barrens
|
||||
(11773,1), -- Feralas
|
||||
(11765,1), -- Ashenvale
|
||||
(11771,1), -- Dustwallow marsh
|
||||
(11785,1), -- Thousand Needles
|
||||
(11800,1), -- Silithus
|
||||
(11780,1), -- Stonetalon Mountains
|
||||
(11802,1), -- Tanaris
|
||||
(11774,1), -- Ghostland // Desecrate the Flame (Alliance) - Eastern Kingdoms
|
||||
(11772,1), -- Eversong woods
|
||||
(11776,1), -- Hillsbrad Foothills
|
||||
(11781,1), -- Swamp of sorrows
|
||||
(11801,1), -- Cape of Stranglethorn
|
||||
(11768,1), -- Burning Steppes
|
||||
(11784,1), -- The Hinterlands
|
||||
(11580,1), -- Silverpine Forest
|
||||
(11786,1), -- Tirisfal Glades
|
||||
(11766,1), -- Badlands
|
||||
(11764,1), -- Arathi Highlands
|
||||
(11775,1), -- Hellfire Peninsula // Desecrate the Flame (Alliance) - Outland
|
||||
(11779,1), -- Shadowmoon Valley
|
||||
(11799,1), -- Netherstorm
|
||||
(11782,1), -- Terokkar
|
||||
(11787,1), -- Zangarmarsh
|
||||
(11767,1), -- Blade' Edge
|
||||
(11778,1), -- Nagrand
|
||||
(13458,1), -- Zul'Drak // Desecrate the Flame (Alliance) - Northrend
|
||||
(13441,1), -- Borean Tundra
|
||||
(13450,1), -- Sholazar Basin
|
||||
(13451,1), -- Dragonblight
|
||||
(13457,1), -- Crystalsong Forest
|
||||
(13455,1), -- Storm Peaks
|
||||
(13454,1), -- Grizzly Hills
|
||||
(13453,1), -- Howling Fjords
|
||||
(11734,1), -- Ashenvale // Desecrate the Flame (Horde) - Kalimdor
|
||||
(11741,1), -- Desolace
|
||||
(11744,1), -- Dustwallow Marsh
|
||||
(11763,1), -- Winterspring
|
||||
(11762,1), -- Tanaris
|
||||
(11760,1), -- Silithus
|
||||
(11746,1), -- Feralas
|
||||
(11740,1), -- Darkshore
|
||||
(11735,1), -- Azuremyst Isle
|
||||
(11738,1), -- Bloodmyst Isle
|
||||
(11753,1), -- Teldrassil
|
||||
(11755,1), -- The Hinterlands // Desecrate the Flame (Horde) - Eastern Kingdoms
|
||||
(11756,1), -- The Western Plaguelands
|
||||
(11748,1), -- Hillsbrad Foothills
|
||||
(11581,1), -- Westfall
|
||||
(11757,1), -- Wetlands
|
||||
(11745,1), -- Elwynn Forest
|
||||
(11739,1), -- Burning Steppes
|
||||
(11737,1), -- Blasted Lands
|
||||
(11732,1), -- Arathi Highlands
|
||||
(11761,1), -- Cape of Stranglethorn
|
||||
(11742,1), -- Dun Morogh
|
||||
(11743,1), -- Duskwood
|
||||
(11749,1), -- Loch Modan
|
||||
(11751,1), -- Redridge Mountains
|
||||
(11752,1), -- Shadowmoon Valley // Desecrate the Flame (Horde) - Outland
|
||||
(11750,1), -- Nagrand
|
||||
(11759,1), -- Netherstorm
|
||||
(11747,1), -- Hellfire Peninsula
|
||||
(11754,1), -- Terokkar
|
||||
(11736,1), -- Blade's Edge
|
||||
(11758,1), -- Zangarmarsh
|
||||
(13440,1), -- Borean Tundra // Desecrate the Flame (Horde) - Northrend
|
||||
(13443,1), -- Dragonblight
|
||||
(13445,1), -- Grizzly
|
||||
(13444,1), -- Howling Fjord
|
||||
(13449,1), -- Zul'Drak
|
||||
(13446,1), -- The Storm Peaks
|
||||
(13442,1), -- Sholazar Basin
|
||||
(13447,1), -- Crystalsong Forest
|
||||
(11972,1), -- Shards of Ahune
|
||||
(9324,1), -- Stealing Orgrimmar''s Flame
|
||||
(11935,1), -- Stealing Silvermoon''s Flame
|
||||
(9326,1), -- Stealing the Undercity''s Flame
|
||||
(9325,1), -- Stealing Thunder Bluff''s Flame
|
||||
(9332,1), -- Stealing Darnassus''s Flame
|
||||
(9331,1), -- Stealing Ironforge''s Flame
|
||||
(9330,1), -- Stealing Stormwind''s Flame
|
||||
(11933,1); -- Stealing the Exodar''s Flame
|
||||
-- Add quest relations to game_event_gameobject_quest and game_event_creature_quest
|
||||
DELETE FROM `game_event_creature_quest` WHERE `quest` IN (11846,11845,11852,11839,11859,11841,11849,11861,11847,11836,11838,11856,11850,11848,11853,11857,11837,11844,11860,11584,11862,11842,11840,11851,11855,11835,11858,11863,11821,11854,11843,13500,13493,13494,13495,13496,13497,13498,13499,11805,11812,11815,11834,11833,11831,11817,11811,11806,11809,11826,11824,11826,11827,11819,11583,11828,11816,11810,11808,11804,11832,11813,11814,11820,11822,11823,11821,11830,11818,11825,11807,11829,13485,13487,13489,13488,13490,13486,13491,13492,11805,11812,11815,11834,11833,11831,11817,11811,11806,11809,11824,11826,11827,11819,11583,11828,11816,11810,11808,11804,11832,11813,11814,11820,11822,13485,13487,13489,13488,13490,13486,13491,13490,11823,11821,11830,11818,11825,11807,11829,11775,11917,11947,11948,11952,11953,11954,11886,11891,12012,11955,11696,11691,11971,11970,11966,11964,11922,11923,11926,11925,11731,11657,11921,11924,9339,9365);
|
||||
INSERT INTO `game_event_creature_quest` (`eventEntry`,`id`, `quest`) VALUES
|
||||
(1,25929, 11846), -- Durotar // Honor the Flame (Horde) - Kalimdor
|
||||
(1,25928, 11845), -- Desolace
|
||||
(1,25936, 11852), -- Mulgore
|
||||
(1,25922, 11839), -- Winterspring
|
||||
(1,25943, 11859), -- Barrens
|
||||
(1,25932, 11849), -- Feralas
|
||||
(1,25884, 11841), -- Ashenvale
|
||||
(1,25930, 11847), -- Dustwallow marsh
|
||||
(1,25945, 11861), -- Thousand Needles
|
||||
(1,25919, 11836), -- Silithus
|
||||
(1,25921, 11838), -- Tanaris
|
||||
(1,25940, 11856), -- Stonetalon Mountains
|
||||
(1,25934, 11851), -- Hellfire Peninsula // Honor the Flame (Horde) - Outland
|
||||
(1,25938, 11855), -- Shadowmoon Valley
|
||||
(1,25918, 11835), -- Netherstorm
|
||||
(1,25942, 11858), -- Terokkar
|
||||
(1,25947, 11863), -- Zangarmarsh
|
||||
(1,25937, 11854), -- Nagrand
|
||||
(1,25926, 11843), -- Blade''s Edge Mountains
|
||||
(1,32816, 13500), -- Zul'Drak // Honor the Flame (Horde) - Northrend
|
||||
(1,32809, 13493), -- Borean Tundra
|
||||
(1,32810, 13494), -- Sholazar Basin
|
||||
(1,32811, 13495), -- Dragonblight
|
||||
(1,32815, 13499), -- Crystalsong Forest
|
||||
(1,32814, 13498), -- Storm Peaks
|
||||
(1,32813, 13497), -- Grizzly Hills
|
||||
(1,32812, 13496), -- Howling Fjords
|
||||
(1,25933, 11850), -- Ghostland // Honor the Flame (Horde) - Eastern Kingdoms
|
||||
(1,25931, 11848), -- Eversong woods
|
||||
(1,25935, 11853), -- Hillsbrad Foothills
|
||||
(1,25941, 11857), -- Swamp of sorrows
|
||||
(1,25920, 11837), -- Cape of Stranglethorn
|
||||
(1,25927, 11844), -- Burning Steppes
|
||||
(1,25944, 11860), -- The Hinterlands
|
||||
(1,25939, 11584), -- Silverpine Forest
|
||||
(1,25946, 11862), -- Tirisfal Glades
|
||||
(1,25925, 11842), -- Badlands
|
||||
(1,25923, 11840), -- Arathi Highlands
|
||||
(1,25883, 11805), -- Ashenvale // Honor the Flame (Alliance) - Kalimdor
|
||||
(1,25894, 11812), -- Desolace
|
||||
(1,25897, 11815), -- Dustwallow Marsh
|
||||
(1,25917, 11834), -- Winterspring
|
||||
(1,25916, 11833), -- Tanaris
|
||||
(1,25914, 11831), -- Silithus
|
||||
(1,25899, 11817), -- Feralas
|
||||
(1,25893, 11811), -- Darkshore
|
||||
(1,25888, 11806), -- Azuremyst Isle
|
||||
(1,25891, 11809), -- Bloodmyst Isle
|
||||
(1,25906, 11824), -- Teldrassil
|
||||
(1,25908, 11826), -- The Hinterlands // Honor the Flame (Alliance) - Eeastern Kingdoms
|
||||
(1,25909, 11827), -- The Western Plaguelands
|
||||
(1,25901, 11819), -- Hillsbrad Foothills
|
||||
(1,25910, 11583), -- Westfall
|
||||
(1,25911, 11828), -- Wetlands
|
||||
(1,25898, 11816), -- Elwynn Forest
|
||||
(1,25892, 11810), -- Burning Steppes
|
||||
(1,25890, 11808), -- Blasted Lands
|
||||
(1,25887, 11804), -- Arathi Highlands
|
||||
(1,25915, 11832), -- Cape of Stranglethorn
|
||||
(1,25895, 11813), -- Dun Morogh
|
||||
(1,25896, 11814), -- Duskwood
|
||||
(1,25902, 11820), -- Loch Modan
|
||||
(1,25904, 11822), -- Redridge Mountains
|
||||
(1,32801, 13485), -- Borean Tundra // Honor the Flame (Alliance) - Northrend
|
||||
(1,32803, 13487), -- Dragonblight
|
||||
(1,32805, 13489), -- Grizzly
|
||||
(1,32804, 13488), -- Howling Fjord
|
||||
(1,32808, 13492), -- Zul'Drak
|
||||
(1,32806, 13490), -- The Storm Peaks
|
||||
(1,32802, 13486), -- Sholazar Basin
|
||||
(1,32807, 13491), -- Crystalsong Forest
|
||||
(1,25905, 11823), -- Shadowmoon Valley // Honor the Flame (Alliance) - Outland
|
||||
(1,25903, 11821), -- Nagrand
|
||||
(1,25913, 11830), -- Netherstorm
|
||||
(1,25900, 11818), -- Hellfire Peninsula
|
||||
(1,25907, 11825), -- Terokkar
|
||||
(1,25889, 11807), -- Blade's Edge
|
||||
(1,25912, 11829), -- Zangarmarsh
|
||||
(1,26221, 11917), -- Striking Back
|
||||
(1,26221, 11947), -- Striking Back
|
||||
(1,26221, 11948), -- Striking Back
|
||||
(1,26221, 11952), -- Striking Back
|
||||
(1,26221, 11953), -- Striking Back
|
||||
(1,26221, 11954), -- Striking Back
|
||||
(1,26221, 11886), -- Unusual Activity
|
||||
(1,25324, 11891), -- An Innocent Disguise
|
||||
(1,25324, 12012), -- Inform the Elder
|
||||
(1,26221, 11955), -- Ahune, the Frost Lord
|
||||
(1,25710, 11696), -- Ahune is Here!
|
||||
(1,25697, 11691), -- Summon Ahune
|
||||
(1,19169, 11971), -- The Spinner of Summer Tales /Horde/
|
||||
(1,19178, 11971), -- The Spinner of Summer Tales
|
||||
(1,19175, 11971), -- The Spinner of Summer Tales
|
||||
(1,19176, 11971), -- The Spinner of Summer Tales
|
||||
(1,19177, 11971), -- The Spinner of Summer Tales
|
||||
(1,20102, 11971), -- The Spinner of Summer Tales
|
||||
(1,19171, 11970), -- The Master of Summer Lore /Alliance/
|
||||
(1,19148, 11970), -- The Master of Summer Lore
|
||||
(1,19172, 11970), -- The Master of Summer Lore
|
||||
(1,18927, 11970), -- The Master of Summer Lore
|
||||
(1,19173, 11970), -- The Master of Summer Lore
|
||||
(1,20102, 11970), -- The Master of Summer Lore
|
||||
(1,16818, 11966), -- Incense for the Festival Scorchlings
|
||||
(1,16817, 11964), -- Incense for the Summer Scorchlings
|
||||
(1,26113, 11922), -- Torch Tossing /H/
|
||||
(1,26113, 11923), -- Torch Catching /H/
|
||||
(1,26113, 11926), -- More Torch Tossing /H/
|
||||
(1,26113, 11925), -- More Torch Catching /H/
|
||||
(1,25975, 11731), -- Torch Tossing /A/
|
||||
(1,25975, 11657), -- Torch Catching /A/
|
||||
(1,25975, 11921), -- More Torch Tossing /A/
|
||||
(1,25975, 11924), -- More Torch Catching /A/
|
||||
(1,16818, 9339), -- A Thief''s Reward /H/
|
||||
(1,16817, 9365); -- A Thief''s Reward /A/
|
||||
DELETE FROM `game_event_gameobject_quest` WHERE `quest` IN (11767,11778,11787,11782,11799,11779,11775,11734,11741,11744,11763,11762,11760,11746,11740,11735,11738,11753,11755,11756,11748,11581,11757,11745,11739,11737,11732,11761,11742,11743,11749,11751,13440,13443,13445,13444,13449,13446,13442,13447,11752,11750,11759,11747,11754,11736,11758,11770,11769,11777,11803,11783,11773,11765,11771,11785,11800,11780,11802,11774,11772,11776,11781,11801,11768,11784,11580,11786,11766,11764,13458,13441,13450,13451,13457,13455,13454,13453);
|
||||
INSERT INTO `game_event_gameobject_quest` (`eventEntry`,`id`, `quest`) VALUES
|
||||
(1,187916, 11734), -- Ashenvale // Desecrate the Flame (Horde) - Kalimdor
|
||||
(1,187924, 11741), -- Desolace
|
||||
(1,187927, 11744), -- Dustwallow Marsh
|
||||
(1,187946, 11763), -- Winterspring
|
||||
(1,187945, 11762), -- Tanaris
|
||||
(1,187943, 11760), -- Silithus
|
||||
(1,187929, 11746), -- Feralas
|
||||
(1,187923, 11740), -- Darkshore
|
||||
(1,187917, 11735), -- Azuremyst Isle
|
||||
(1,187921, 11738), -- Bloodmyst Isle
|
||||
(1,187936, 11753), -- Teldrassil
|
||||
(1,187938, 11755), -- The Hinterlands // Desecrate the Flame (Horde) - Eeastern Kingdoms
|
||||
(1,187939, 11756), -- The Western Plaguelands
|
||||
(1,187931, 11748), -- Hillsbrad Foothills
|
||||
(1,187564, 11581), -- Westfall
|
||||
(1,187940, 11757), -- Wetlands
|
||||
(1,187928, 11745), -- Elwynn Forest
|
||||
(1,187922, 11739), -- Burning Steppes
|
||||
(1,187920, 11737), -- Blasted Lands
|
||||
(1,187914, 11732), -- Arathi Highlands
|
||||
(1,187944, 11761), -- Cape of Stranglethorn
|
||||
(1,187925, 11742), -- Dun Morogh
|
||||
(1,187926, 11743), -- Duskwood
|
||||
(1,187932, 11749), -- Loch Modan
|
||||
(1,187934, 11751), -- Redridge Mountains
|
||||
(1,194032, 13440), -- Borean Tundra // Desecrate the Flame (Horde) - Northrend
|
||||
(1,194036, 13443), -- Dragonblight
|
||||
(1,194040, 13445), -- Grizzly
|
||||
(1,194038, 13444), -- Howling Fjord
|
||||
(1,194049, 13449), -- Zul'Drak
|
||||
(1,194044, 13446), -- The Storm Peaks
|
||||
(1,194035, 13442), -- Sholazar Basin
|
||||
(1,194045, 13447), -- Crystalsong Forest
|
||||
(1,187935, 11752), -- Shadowmoon Valley // Desecrate the Flame (Horde) - Outland
|
||||
(1,187933, 11750), -- Nagrand
|
||||
(1,187942, 11759), -- Netherstorm
|
||||
(1,187930, 11747), -- Hellfire Peninsula
|
||||
(1,187937, 11754), -- Terokkar
|
||||
(1,187919, 11736), -- Blade's Edge
|
||||
(1,187941, 11758), -- Zangarmarsh
|
||||
(1,187958, 11770), -- Durotar // Desecrate the Flame (Alliance) - Kalimdor
|
||||
(1,187957, 11769), -- Desolace
|
||||
(1,187965, 11777), -- Mulgore
|
||||
(1,187953, 11803), -- Winterspring
|
||||
(1,187971, 11783), -- Barrens
|
||||
(1,187961, 11773), -- Feralas
|
||||
(1,187948, 11765), -- Ashenvale
|
||||
(1,187959, 11771), -- Dustwallow marsh
|
||||
(1,187973, 11785), -- Thousand Needles
|
||||
(1,187950, 11800), -- Silithus
|
||||
(1,187968, 11780), -- Stonetalon Mountains
|
||||
(1,187952, 11802), -- Tanaris
|
||||
(1,187962, 11774), -- Ghostland // Desecrate the Flame (Alliance) - Eeastern Kingdoms
|
||||
(1,187960, 11772), -- Eversong woods
|
||||
(1,187964, 11776), -- Hillsbrad Foothills
|
||||
(1,187969, 11781), -- Swamp of sorrows
|
||||
(1,187951, 11801), -- Cape of Stranglethorn
|
||||
(1,187956, 11768), -- Burning Steppes
|
||||
(1,187972, 11784), -- The Hinterlands
|
||||
(1,187559, 11580), -- Silverpine Forest
|
||||
(1,187974, 11786), -- Tirisfal Glades
|
||||
(1,187954, 11766), -- Badlands
|
||||
(1,187947, 11764), -- Arathi Highlands
|
||||
(1,187963, 11775), -- Hellfire Peninsula // Desecrate the Flame (Alliance) - Outland
|
||||
(1,187967, 11779), -- Shadowmoon Valley
|
||||
(1,187949, 11799), -- Netherstorm
|
||||
(1,187970, 11782), -- Terokkar
|
||||
(1,187975, 11787), -- Zangarmarsh
|
||||
(1,187955, 11767), -- Blade' Edge
|
||||
(1,187966, 11778), -- Nagrand
|
||||
(1,194048, 13458), -- Zul'Drak // Desecrate the Flame (Alliance) - Northend
|
||||
(1,194033, 13441), -- Borean Tundra
|
||||
(1,194034, 13450), -- Sholazar Basin
|
||||
(1,194037, 13451), -- Dragonblight
|
||||
(1,194046, 13457), -- Crystalsong Forest
|
||||
(1,194043, 13455), -- Storm Peaks
|
||||
(1,194042, 13454), -- Grizzly Hills
|
||||
(1,194039, 13453); -- Howling Fjords
|
||||
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `trinity_string` WHERE `entry` IN (5032,5033,5034);
|
||||
INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) VALUES
|
||||
(5032,'No battleground found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5033,'No achievement criteria found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5034,'No outdoor PvP found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
@@ -0,0 +1,19 @@
|
||||
DELETE FROM `command` WHERE `name` IN (
|
||||
'disable add quest','disable add map','disable add battleground','disable add achievement_criteria','disable add spell','disable add outdoorpvp','disable add vmap',
|
||||
'disable remove quest','disable remove map','disable remove battleground','disable remove achievement_criteria','disable remove spell','disable remove outdoorpvp','disable remove vmap'
|
||||
);
|
||||
INSERT INTO `command` (`name`,`security`,`help`) VALUES
|
||||
('disable add quest',3,'Syntax: .disable add quest $entry $flag $comment'),
|
||||
('disable add map',3,'Syntax: .disable add map $entry $flag $comment'),
|
||||
('disable add battleground',3,'Syntax: .disable add battleground $entry $flag $comment'),
|
||||
('disable add achievement_criteria',3,'Syntax: .disable add achievement_criteria $entry $flag $comment'),
|
||||
('disable add spell',3,'Syntax: .disable add spell $entry $flag $comment'),
|
||||
('disable add outdoorpvp',3,'Syntax: .disable add outdoorpvp $entry $flag $comment'),
|
||||
('disable add vmap',3,'Syntax: .disable add vmap $entry $flag $comment'),
|
||||
('disable remove quest',3,'Syntax: .disable remove quest $entry'),
|
||||
('disable remove map',3,'Syntax: .disable remove map $entry'),
|
||||
('disable remove battleground',3,'Syntax: .disable remove battleground $entry'),
|
||||
('disable remove achievement_criteria',3,'Syntax: .disable remove achievement_criteria $entry'),
|
||||
('disable remove spell',3,'Syntax: .disable remove spell $entry'),
|
||||
('disable remove outdoorpvp',3,'Syntax: .disable remove outdoorpvp $entry'),
|
||||
('disable remove vmap',3,'Syntax: .disable remove vmap $entry');
|
||||
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `command` WHERE `name` IN ('server togglequerylog', 'server set loglevel');
|
||||
|
||||
INSERT INTO `command` (`name`,`security`,`help`) VALUES
|
||||
('server set loglevel',4,'Syntax: .server set loglevel $facility $name $loglevel. $facility can take the values: appender (a) or logger (l). $loglevel can take the values: disabled (0), trace (1), debug (2), info (3), warn (4), error (5) or fatal (6)');
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
/// Print out the usage string for this program on the console.
|
||||
void usage(const char *prog)
|
||||
{
|
||||
sLog->outString("Usage: \n %s [<options>]\n"
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Usage: \n %s [<options>]\n"
|
||||
" -c config_file use config_file as configuration file\n\r",
|
||||
prog);
|
||||
}
|
||||
@@ -71,7 +71,6 @@ void usage(const char *prog)
|
||||
// Launch the auth server
|
||||
extern int main(int argc, char **argv)
|
||||
{
|
||||
sLog->SetLogDB(false);
|
||||
// Command line parsing to get the configuration file name
|
||||
char const* cfg_file = _TRINITY_REALM_CONFIG;
|
||||
int c = 1;
|
||||
@@ -81,7 +80,7 @@ extern int main(int argc, char **argv)
|
||||
{
|
||||
if (++c >= argc)
|
||||
{
|
||||
sLog->outError("Runtime-Error: -c option requires an input argument");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Runtime-Error: -c option requires an input argument");
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
@@ -93,17 +92,16 @@ extern int main(int argc, char **argv)
|
||||
|
||||
if (!ConfigMgr::Load(cfg_file))
|
||||
{
|
||||
sLog->outError("Invalid or missing configuration file : %s", cfg_file);
|
||||
sLog->outError("Verify that the file exists and has \'[authserver]\' written in the top of the file!");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Invalid or missing configuration file : %s", cfg_file);
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Verify that the file exists and has \'[authserver]\' written in the top of the file!");
|
||||
return 1;
|
||||
}
|
||||
sLog->Initialize();
|
||||
|
||||
sLog->outString("%s (authserver)", _FULLVERSION);
|
||||
sLog->outString("<Ctrl-C> to stop.\n");
|
||||
sLog->outString("Using configuration file %s.", cfg_file);
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "%s (authserver)", _FULLVERSION);
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "<Ctrl-C> to stop.\n");
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Using configuration file %s.", cfg_file);
|
||||
|
||||
sLog->outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||
sLog->outWarn(LOG_FILTER_AUTHSERVER, "%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
|
||||
|
||||
#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
|
||||
ACE_Reactor::instance(new ACE_Reactor(new ACE_Dev_Poll_Reactor(ACE::max_handles(), 1), 1), true);
|
||||
@@ -111,7 +109,7 @@ extern int main(int argc, char **argv)
|
||||
ACE_Reactor::instance(new ACE_Reactor(new ACE_TP_Reactor(), true), true);
|
||||
#endif
|
||||
|
||||
sLog->outBasic("Max allowed open files is %d", ACE::max_handles());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Max allowed open files is %d", ACE::max_handles());
|
||||
|
||||
// authserver PID file creation
|
||||
std::string pidfile = ConfigMgr::GetStringDefault("PidFile", "");
|
||||
@@ -120,27 +118,23 @@ extern int main(int argc, char **argv)
|
||||
uint32 pid = CreatePIDFile(pidfile);
|
||||
if (!pid)
|
||||
{
|
||||
sLog->outError("Cannot create PID file %s.\n", pidfile.c_str());
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Cannot create PID file %s.\n", pidfile.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
sLog->outString("Daemon PID: %u\n", pid);
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Daemon PID: %u\n", pid);
|
||||
}
|
||||
|
||||
// Initialize the database connection
|
||||
if (!StartDB())
|
||||
return 1;
|
||||
|
||||
// Initialize the log database
|
||||
sLog->SetLogDBLater(ConfigMgr::GetBoolDefault("EnableLogDB", false)); // set var to enable DB logging once startup finished.
|
||||
sLog->SetLogDB(false);
|
||||
sLog->SetRealmID(0); // ensure we've set realm to 0 (authserver realmid)
|
||||
|
||||
// Get the list of realms for the server
|
||||
sRealmList->Initialize(ConfigMgr::GetIntDefault("RealmsStateUpdateDelay", 20));
|
||||
if (sRealmList->size() == 0)
|
||||
{
|
||||
sLog->outError("No valid realms specified.");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "No valid realms specified.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -154,7 +148,7 @@ extern int main(int argc, char **argv)
|
||||
|
||||
if (acceptor.open(bind_addr, ACE_Reactor::instance(), ACE_NONBLOCK) == -1)
|
||||
{
|
||||
sLog->outError("Auth server can not bind to %s:%d", bind_ip.c_str(), rmport);
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Auth server can not bind to %s:%d", bind_ip.c_str(), rmport);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -182,13 +176,13 @@ extern int main(int argc, char **argv)
|
||||
ULONG_PTR curAff = Aff & appAff; // remove non accessible processors
|
||||
|
||||
if (!curAff)
|
||||
sLog->outError("Processors marked in UseProcessors bitmask (hex) %x not accessible for authserver. Accessible processors bitmask (hex): %x", Aff, appAff);
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Processors marked in UseProcessors bitmask (hex) %x not accessible for authserver. Accessible processors bitmask (hex): %x", Aff, appAff);
|
||||
else if (SetProcessAffinityMask(hProcess, curAff))
|
||||
sLog->outString("Using processors (bitmask, hex): %x", curAff);
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Using processors (bitmask, hex): %x", curAff);
|
||||
else
|
||||
sLog->outError("Can't set used processors (hex): %x", curAff);
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x", curAff);
|
||||
}
|
||||
sLog->outString();
|
||||
|
||||
}
|
||||
|
||||
bool Prio = ConfigMgr::GetBoolDefault("ProcessPriority", false);
|
||||
@@ -196,10 +190,10 @@ extern int main(int argc, char **argv)
|
||||
if (Prio)
|
||||
{
|
||||
if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
|
||||
sLog->outString("The auth server process priority class has been set to HIGH");
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "The auth server process priority class has been set to HIGH");
|
||||
else
|
||||
sLog->outError("Can't set auth server process priority class.");
|
||||
sLog->outString();
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Can't set auth server process priority class.");
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -208,17 +202,6 @@ extern int main(int argc, char **argv)
|
||||
uint32 numLoops = (ConfigMgr::GetIntDefault("MaxPingTime", 30) * (MINUTE * 1000000 / 100000));
|
||||
uint32 loopCounter = 0;
|
||||
|
||||
// possibly enable db logging; avoid massive startup spam by doing it here.
|
||||
if (sLog->GetLogDBLater())
|
||||
{
|
||||
sLog->outString("Enabling database logging...");
|
||||
sLog->SetLogDBLater(false);
|
||||
// login db needs thread for logging
|
||||
sLog->SetLogDB(true);
|
||||
}
|
||||
else
|
||||
sLog->SetLogDB(false);
|
||||
|
||||
// Wait for termination signal
|
||||
while (!stopEvent)
|
||||
{
|
||||
@@ -231,7 +214,7 @@ extern int main(int argc, char **argv)
|
||||
if ((++loopCounter) == numLoops)
|
||||
{
|
||||
loopCounter = 0;
|
||||
sLog->outDetail("Ping MySQL to keep connection alive");
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Ping MySQL to keep connection alive");
|
||||
LoginDatabase.KeepAlive();
|
||||
}
|
||||
}
|
||||
@@ -239,7 +222,7 @@ extern int main(int argc, char **argv)
|
||||
// Close the Database Pool and library
|
||||
StopDB();
|
||||
|
||||
sLog->outString("Halting process...");
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Halting process...");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -251,31 +234,33 @@ bool StartDB()
|
||||
std::string dbstring = ConfigMgr::GetStringDefault("LoginDatabaseInfo", "");
|
||||
if (dbstring.empty())
|
||||
{
|
||||
sLog->outError("Database not specified");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Database not specified");
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8 worker_threads = ConfigMgr::GetIntDefault("LoginDatabase.WorkerThreads", 1);
|
||||
if (worker_threads < 1 || worker_threads > 32)
|
||||
{
|
||||
sLog->outError("Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1.");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1.");
|
||||
worker_threads = 1;
|
||||
}
|
||||
|
||||
uint8 synch_threads = ConfigMgr::GetIntDefault("LoginDatabase.SynchThreads", 1);
|
||||
if (synch_threads < 1 || synch_threads > 32)
|
||||
{
|
||||
sLog->outError("Improper value specified for LoginDatabase.SynchThreads, defaulting to 1.");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1.");
|
||||
synch_threads = 1;
|
||||
}
|
||||
|
||||
// NOTE: While authserver is singlethreaded you should keep synch_threads == 1. Increasing it is just silly since only 1 will be used ever.
|
||||
if (!LoginDatabase.Open(dbstring.c_str(), worker_threads, synch_threads))
|
||||
{
|
||||
sLog->outError("Cannot connect to database");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Cannot connect to database");
|
||||
return false;
|
||||
}
|
||||
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Started auth database connection pool.");
|
||||
sLog->EnableDBAppenders();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void RealmList::UpdateIfNeed()
|
||||
|
||||
void RealmList::UpdateRealms(bool init)
|
||||
{
|
||||
sLog->outDetail("Updating Realm List...");
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Updating Realm List...");
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST);
|
||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||
@@ -93,7 +93,7 @@ void RealmList::UpdateRealms(bool init)
|
||||
UpdateRealm(realmId, name, address, port, icon, flag, timezone, (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build);
|
||||
|
||||
if (init)
|
||||
sLog->outString("Added realm \"%s\".", fields[1].GetCString());
|
||||
sLog->outInfo(LOG_FILTER_AUTHSERVER, "Added realm \"%s\".", fields[1].GetCString());
|
||||
}
|
||||
while (result->NextRow());
|
||||
}
|
||||
|
||||
Executable → Regular
+38
-38
@@ -210,12 +210,12 @@ AuthSocket::~AuthSocket(void) {}
|
||||
// Accept the connection and set the s random value for SRP6
|
||||
void AuthSocket::OnAccept(void)
|
||||
{
|
||||
sLog->outBasic("'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' Accepting connection", socket().getRemoteAddress().c_str(), socket().getRemotePort());
|
||||
}
|
||||
|
||||
void AuthSocket::OnClose(void)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "AuthSocket::OnClose");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "AuthSocket::OnClose");
|
||||
}
|
||||
|
||||
// Read the packet from the client
|
||||
@@ -234,11 +234,11 @@ void AuthSocket::OnRead()
|
||||
{
|
||||
if ((uint8)table[i].cmd == _cmd && (table[i].status == STATUS_CONNECTED || (_authed && table[i].status == STATUS_AUTHED)))
|
||||
{
|
||||
sLog->outStaticDebug("[Auth] got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Got data for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
|
||||
|
||||
if (!(*this.*table[i].handler)())
|
||||
{
|
||||
sLog->outStaticDebug("Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Command handler failed for cmd %u recv length %u", (uint32)_cmd, (uint32)socket().recv_len());
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -248,7 +248,7 @@ void AuthSocket::OnRead()
|
||||
// Report unknown packets in the error log
|
||||
if (i == AUTH_TOTAL_COMMANDS)
|
||||
{
|
||||
sLog->outError("[Auth] got unknown packet from '%s'", socket().getRemoteAddress().c_str());
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Got unknown packet from '%s'", socket().getRemoteAddress().c_str());
|
||||
socket().shutdown();
|
||||
return;
|
||||
}
|
||||
@@ -297,7 +297,7 @@ void AuthSocket::_SetVSFields(const std::string& rI)
|
||||
// Logon Challenge command handler
|
||||
bool AuthSocket::_HandleLogonChallenge()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleLogonChallenge");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleLogonChallenge");
|
||||
if (socket().recv_len() < sizeof(sAuthLogonChallenge_C))
|
||||
return false;
|
||||
|
||||
@@ -312,7 +312,7 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
#endif
|
||||
|
||||
uint16 remaining = ((sAuthLogonChallenge_C *)&buf[0])->size;
|
||||
sLog->outStaticDebug("[AuthChallenge] got header, body is %#04x bytes", remaining);
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] got header, body is %#04x bytes", remaining);
|
||||
|
||||
if ((remaining < sizeof(sAuthLogonChallenge_C) - buf.size()) || (socket().recv_len() < remaining))
|
||||
return false;
|
||||
@@ -324,8 +324,8 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
|
||||
// Read the remaining of the packet
|
||||
socket().recv((char *)&buf[4], remaining);
|
||||
sLog->outStaticDebug("[AuthChallenge] got full packet, %#04x bytes", ch->size);
|
||||
sLog->outStaticDebug("[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I);
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] got full packet, %#04x bytes", ch->size);
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] name(%d): '%s'", ch->I_len, ch->I);
|
||||
|
||||
// BigEndian code, nop in little endian case
|
||||
// size already converted
|
||||
@@ -364,7 +364,7 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
if (result)
|
||||
{
|
||||
pkt << (uint8)WOW_FAIL_BANNED;
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned ip tries to login!",socket().getRemoteAddress().c_str(), socket().getRemotePort());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -382,20 +382,20 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
bool locked = false;
|
||||
if (fields[2].GetUInt8() == 1) // if ip is locked
|
||||
{
|
||||
sLog->outStaticDebug("[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[3].GetCString());
|
||||
sLog->outStaticDebug("[AuthChallenge] Player address is '%s'", ip_address.c_str());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[3].GetCString());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Player address is '%s'", ip_address.c_str());
|
||||
|
||||
if (strcmp(fields[3].GetCString(), ip_address.c_str()))
|
||||
{
|
||||
sLog->outStaticDebug("[AuthChallenge] Account IP differs");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account IP differs");
|
||||
pkt << uint8(WOW_FAIL_SUSPENDED);
|
||||
locked = true;
|
||||
}
|
||||
else
|
||||
sLog->outStaticDebug("[AuthChallenge] Account IP matches");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account IP matches");
|
||||
}
|
||||
else
|
||||
sLog->outStaticDebug("[AuthChallenge] Account '%s' is not locked to ip", _login.c_str());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str());
|
||||
|
||||
if (!locked)
|
||||
{
|
||||
@@ -411,12 +411,12 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
if ((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64())
|
||||
{
|
||||
pkt << (uint8)WOW_FAIL_BANNED;
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
|
||||
}
|
||||
else
|
||||
{
|
||||
pkt << (uint8)WOW_FAIL_SUSPENDED;
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -491,7 +491,7 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
for (int i = 0; i < 4; ++i)
|
||||
_localizationName[i] = ch->country[4-i-1];
|
||||
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(),
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", socket().getRemoteAddress().c_str(), socket().getRemotePort(),
|
||||
_login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName)
|
||||
);
|
||||
}
|
||||
@@ -508,7 +508,7 @@ bool AuthSocket::_HandleLogonChallenge()
|
||||
// Logon Proof command handler
|
||||
bool AuthSocket::_HandleLogonProof()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleLogonProof");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleLogonProof");
|
||||
// Read the packet
|
||||
sAuthLogonProof_C lp;
|
||||
|
||||
@@ -594,7 +594,7 @@ bool AuthSocket::_HandleLogonProof()
|
||||
// Check if SRP6 results match (password is correct), else send an error
|
||||
if (!memcmp(M.AsByteArray(), lp.M1, 20))
|
||||
{
|
||||
sLog->outBasic("'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' User '%s' successfully authenticated", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
|
||||
// Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account
|
||||
// No SQL injection (escaped user name) and IP address as received by socket
|
||||
@@ -631,7 +631,7 @@ bool AuthSocket::_HandleLogonProof()
|
||||
char data[4] = { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0 };
|
||||
socket().send(data, sizeof(data));
|
||||
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str ());
|
||||
|
||||
uint32 MaxWrongPassCount = ConfigMgr::GetIntDefault("WrongPass.MaxCount", 0);
|
||||
if (MaxWrongPassCount > 0)
|
||||
@@ -661,7 +661,7 @@ bool AuthSocket::_HandleLogonProof()
|
||||
stmt->setUInt32(1, WrongPassBanTime);
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
|
||||
socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins);
|
||||
}
|
||||
else
|
||||
@@ -671,7 +671,7 @@ bool AuthSocket::_HandleLogonProof()
|
||||
stmt->setUInt32(1, WrongPassBanTime);
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
sLog->outBasic("'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "'%s:%d' [AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
|
||||
socket().getRemoteAddress().c_str(), socket().getRemotePort(), socket().getRemoteAddress().c_str(), WrongPassBanTime, _login.c_str(), failed_logins);
|
||||
}
|
||||
}
|
||||
@@ -685,7 +685,7 @@ bool AuthSocket::_HandleLogonProof()
|
||||
// Reconnect Challenge command handler
|
||||
bool AuthSocket::_HandleReconnectChallenge()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleReconnectChallenge");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectChallenge");
|
||||
if (socket().recv_len() < sizeof(sAuthLogonChallenge_C))
|
||||
return false;
|
||||
|
||||
@@ -700,7 +700,7 @@ bool AuthSocket::_HandleReconnectChallenge()
|
||||
#endif
|
||||
|
||||
uint16 remaining = ((sAuthLogonChallenge_C *)&buf[0])->size;
|
||||
sLog->outStaticDebug("[ReconnectChallenge] got header, body is %#04x bytes", remaining);
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] got header, body is %#04x bytes", remaining);
|
||||
|
||||
if ((remaining < sizeof(sAuthLogonChallenge_C) - buf.size()) || (socket().recv_len() < remaining))
|
||||
return false;
|
||||
@@ -712,8 +712,8 @@ bool AuthSocket::_HandleReconnectChallenge()
|
||||
|
||||
// Read the remaining of the packet
|
||||
socket().recv((char *)&buf[4], remaining);
|
||||
sLog->outStaticDebug("[ReconnectChallenge] got full packet, %#04x bytes", ch->size);
|
||||
sLog->outStaticDebug("[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I);
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] got full packet, %#04x bytes", ch->size);
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "[ReconnectChallenge] name(%d): '%s'", ch->I_len, ch->I);
|
||||
|
||||
_login = (const char*)ch->I;
|
||||
|
||||
@@ -724,7 +724,7 @@ bool AuthSocket::_HandleReconnectChallenge()
|
||||
// Stop if the account is not found
|
||||
if (!result)
|
||||
{
|
||||
sLog->outError("'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
socket().shutdown();
|
||||
return false;
|
||||
}
|
||||
@@ -759,7 +759,7 @@ bool AuthSocket::_HandleReconnectChallenge()
|
||||
// Reconnect Proof command handler
|
||||
bool AuthSocket::_HandleReconnectProof()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleReconnectProof");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleReconnectProof");
|
||||
// Read the packet
|
||||
sAuthReconnectProof_C lp;
|
||||
if (!socket().recv((char *)&lp, sizeof(sAuthReconnectProof_C)))
|
||||
@@ -790,7 +790,7 @@ bool AuthSocket::_HandleReconnectProof()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login, but session is invalid.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
socket().shutdown();
|
||||
return false;
|
||||
}
|
||||
@@ -799,7 +799,7 @@ bool AuthSocket::_HandleReconnectProof()
|
||||
// Realm List command handler
|
||||
bool AuthSocket::_HandleRealmList()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleRealmList");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleRealmList");
|
||||
if (socket().recv_len() < 5)
|
||||
return false;
|
||||
|
||||
@@ -812,7 +812,7 @@ bool AuthSocket::_HandleRealmList()
|
||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||
if (!result)
|
||||
{
|
||||
sLog->outError("'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", socket().getRemoteAddress().c_str(), socket().getRemotePort(), _login.c_str());
|
||||
socket().shutdown();
|
||||
return false;
|
||||
}
|
||||
@@ -892,11 +892,11 @@ bool AuthSocket::_HandleRealmList()
|
||||
// Resume patch transfer
|
||||
bool AuthSocket::_HandleXferResume()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleXferResume");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleXferResume");
|
||||
// Check packet length and patch existence
|
||||
if (socket().recv_len() < 9 || !pPatch)
|
||||
{
|
||||
sLog->outError("Error while resuming patch transfer (wrong packet)");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Error while resuming patch transfer (wrong packet)");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@ bool AuthSocket::_HandleXferResume()
|
||||
// Cancel patch transfer
|
||||
bool AuthSocket::_HandleXferCancel()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleXferCancel");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleXferCancel");
|
||||
|
||||
// Close and delete the socket
|
||||
socket().recv_skip(1); //clear input buffer
|
||||
@@ -925,12 +925,12 @@ bool AuthSocket::_HandleXferCancel()
|
||||
// Accept patch transfer
|
||||
bool AuthSocket::_HandleXferAccept()
|
||||
{
|
||||
sLog->outStaticDebug("Entering _HandleXferAccept");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Entering _HandleXferAccept");
|
||||
|
||||
// Check packet length and patch existence
|
||||
if (!pPatch)
|
||||
{
|
||||
sLog->outError("Error while accepting patch transfer (wrong packet)");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Error while accepting patch transfer (wrong packet)");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ void Patcher::LoadPatchMD5(char *szFileName)
|
||||
|
||||
if (!pPatch)
|
||||
{
|
||||
sLog->outError("Error loading patch %s\n", path.c_str());
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Error loading patch %s\n", path.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ protected:
|
||||
|
||||
virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/)
|
||||
{
|
||||
sLog->outBasic("Resuming acceptor");
|
||||
sLog->outDebug(LOG_FILTER_AUTHSERVER, "Resuming acceptor");
|
||||
reactor()->cancel_timer(this, 1);
|
||||
return reactor()->register_handler(this, ACE_Event_Handler::ACCEPT_MASK);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ protected:
|
||||
#if defined(ENFILE) && defined(EMFILE)
|
||||
if (errno == ENFILE || errno == EMFILE)
|
||||
{
|
||||
sLog->outError("Out of file descriptors, suspending incoming connections for 10 seconds");
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Out of file descriptors, suspending incoming connections for 10 seconds");
|
||||
reactor()->remove_handler(this, ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL);
|
||||
reactor()->schedule_timer(this, NULL, ACE_Time_Value(10));
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ int RealmSocket::open(void * arg)
|
||||
|
||||
if (peer().get_remote_addr(addr) == -1)
|
||||
{
|
||||
sLog->outError("Error %s while opening realm socket!", ACE_OS::strerror(errno));
|
||||
sLog->outError(LOG_FILTER_AUTHSERVER, "Error %s while opening realm socket!", ACE_OS::strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,116 +68,6 @@ BindIP = "0.0.0.0"
|
||||
|
||||
PidFile = ""
|
||||
|
||||
#
|
||||
# LogLevel
|
||||
# Description: Server console level of logging
|
||||
# Default: 0 - (Minimum)
|
||||
# 1 - (Basic)
|
||||
# 2 - (Detail)
|
||||
# 3 - (Full/Debug)
|
||||
|
||||
LogLevel = 0
|
||||
|
||||
#
|
||||
# LogFile
|
||||
# Description: Log file for main server log.
|
||||
# Default: "Auth.log" - (Enabled)
|
||||
# "" - (Disabled)
|
||||
|
||||
LogFile = "Auth.log"
|
||||
|
||||
#
|
||||
# Debug Log Mask
|
||||
# Description: Bitmask that determines which debug log output (level 3)
|
||||
# will be logged.
|
||||
# Possible flags:
|
||||
#
|
||||
# 64 - Anything related to network input/output,
|
||||
# such as packet handlers and netcode logs
|
||||
#
|
||||
# Simply add the values together to create a bitmask.
|
||||
# For more info see enum DebugLogFilters in Log.h
|
||||
#
|
||||
# Default: 0 (nothing)
|
||||
|
||||
DebugLogMask = 64
|
||||
|
||||
#
|
||||
# SQLDriverLogFile
|
||||
# Description: Log file for SQL driver events.
|
||||
# Example: "SQLDriver.log" - (Enabled)
|
||||
# Default: "" - (Disabled)
|
||||
|
||||
SQLDriverLogFile = ""
|
||||
|
||||
#
|
||||
# SQLDriverQueryLogging
|
||||
# Description: Log SQL queries to the SQLDriverLogFile and console.
|
||||
# Default: 0 - (Disabled, Query errors only)
|
||||
# 1 - (Enabled, Full query logging - may have performance impact)
|
||||
|
||||
SQLDriverQueryLogging = 0
|
||||
|
||||
#
|
||||
# LogTimestamp
|
||||
# Description: Append timestamp to the server log file name.
|
||||
# Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
LogTimestamp = 0
|
||||
|
||||
#
|
||||
# LogFileLevel
|
||||
# Description: Server file level of logging
|
||||
# Default: 0 - (Minimum)
|
||||
# 1 - (Basic)
|
||||
# 2 - (Detail)
|
||||
# 3 - (Full/Debug)
|
||||
|
||||
LogFileLevel = 0
|
||||
|
||||
#
|
||||
# LogColors
|
||||
# Description: Colors for log messages (Format: "normal basic detail debug").
|
||||
# Colors: 0 - Black
|
||||
# 1 - Red
|
||||
# 2 - Green
|
||||
# 3 - Brown
|
||||
# 4 - Blue
|
||||
# 5 - Magenta
|
||||
# 6 - Cyan
|
||||
# 7 - Grey
|
||||
# 8 - Yellow
|
||||
# 9 - Lred
|
||||
# 10 - Lgreen
|
||||
# 11 - Lblue
|
||||
# 12 - Lmagenta
|
||||
# 13 - Lcyan
|
||||
# 14 - White
|
||||
# Example: "13 11 9 5" - (Enabled)
|
||||
# Default: "" - (Disabled)
|
||||
|
||||
LogColors = ""
|
||||
|
||||
#
|
||||
# EnableLogDB
|
||||
# Description: Write log messages to database (LogDatabaseInfo).
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
EnableLogDB = 0
|
||||
|
||||
#
|
||||
# DBLogLevel
|
||||
# Description: Log level of databases logging.
|
||||
# Default: 1 - (Basic)
|
||||
# 0 - (Minimum)
|
||||
# 2 - (Detail)
|
||||
# 3 - (Full/Debug)
|
||||
|
||||
DBLogLevel = 1
|
||||
|
||||
#
|
||||
# UseProcessors
|
||||
# Description: Processors mask for Windows based multi-processor systems.
|
||||
@@ -255,3 +145,105 @@ LoginDatabase.WorkerThreads = 1
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
###################################################################################################
|
||||
#
|
||||
# Logging system options.
|
||||
#
|
||||
# Appender config values: Given a appender "name"
|
||||
# Appender.name
|
||||
# Description: Defines 'where to log'
|
||||
# Format: Type,LogLevel,Flags,optional1,optional2
|
||||
#
|
||||
# Type
|
||||
# 0 - (None)
|
||||
# 1 - (Console)
|
||||
# 2 - (File)
|
||||
# 3 - (DB)
|
||||
#
|
||||
# LogLevel
|
||||
# 0 - (Disabled)
|
||||
# 1 - (Trace)
|
||||
# 2 - (Debug)
|
||||
# 3 - (Info)
|
||||
# 4 - (Warn)
|
||||
# 5 - (Error)
|
||||
# 6 - (Fatal)
|
||||
#
|
||||
# Flags: Default Console = 6, File = 7, DB = 0
|
||||
# 0 - None
|
||||
# 1 - Prefix Timestamp to the text
|
||||
# 2 - Prefix Log Level to the text
|
||||
# 4 - Prefix Log Filter type to the text
|
||||
# 8 - Append timestamp to the log file name. Format: YYYY-MM-DD_HH-MM-SS (Only used with Type = 2)
|
||||
# 16 - Make a backup of existing file before overwrite (Only used with Mode = w)
|
||||
#
|
||||
# Colors (read as optional1 if Type = Console)
|
||||
# Format: "fatal error warn info debug trace"
|
||||
# 0 - BLACK
|
||||
# 1 - RED
|
||||
# 2 - GREEN
|
||||
# 3 - BROWN
|
||||
# 4 - BLUE
|
||||
# 5 - MAGENTA
|
||||
# 6 - CYAN
|
||||
# 7 - GREY
|
||||
# 8 - YELLOW
|
||||
# 9 - LRED
|
||||
# 10 - LGREEN
|
||||
# 11 - LBLUE
|
||||
# 12 - LMAGENTA
|
||||
# 13 - LCYAN
|
||||
# 14 - WHITE
|
||||
# Example: "13 11 9 5 3 1"
|
||||
#
|
||||
# File: Name of the file (read as optional1 if Type = File)
|
||||
# Allows to use one "%u" to create dynamic files
|
||||
#
|
||||
# Mode: Mode to open the file (read as optional2 if Type = File)
|
||||
# a - (Append)
|
||||
# w - (Overwrite)
|
||||
#
|
||||
|
||||
Appender.Console=1,2,6
|
||||
Appender.Auth=2,2,7,Auth.log,w
|
||||
|
||||
# Logger config values: Given a logger "name"
|
||||
# Logger.name
|
||||
# Description: Defines 'What to log'
|
||||
# Format: Type,LogLevel,AppenderList
|
||||
# Type
|
||||
# 0 - Default. Each type that has no config will
|
||||
# rely on this one. Core will create this logger
|
||||
# (disabled) if it's not configured
|
||||
# 7 - Network input/output,
|
||||
# 30 - Authserver
|
||||
|
||||
Logger.Root=0,3,Console Auth
|
||||
|
||||
# LogLevel
|
||||
# 0 - (Disabled)
|
||||
# 1 - (Trace)
|
||||
# 2 - (Debug)
|
||||
# 3 - (Info)
|
||||
# 4 - (Warn)
|
||||
# 5 - (Error)
|
||||
# 6 - (Fatal)
|
||||
#
|
||||
# AppenderList: List of appenders linked to logger
|
||||
# (Using spaces as separator).
|
||||
#
|
||||
# Appenders
|
||||
# Description: List of Appenders to read from config
|
||||
# (Using spaces as separator).
|
||||
# Default: "Console Server"
|
||||
|
||||
Appenders=Console Auth
|
||||
|
||||
#
|
||||
# Loggers
|
||||
# Description: List of Loggers to read from config
|
||||
# (Using spaces as separator).
|
||||
# Default: "root"
|
||||
|
||||
Loggers=Root
|
||||
@@ -257,7 +257,7 @@ namespace VMAP
|
||||
WorldModel* worldmodel = new WorldModel();
|
||||
if (!worldmodel->readFile(basepath + filename + ".vmo"))
|
||||
{
|
||||
sLog->outError("VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str());
|
||||
delete worldmodel;
|
||||
return NULL;
|
||||
}
|
||||
@@ -277,7 +277,7 @@ namespace VMAP
|
||||
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
|
||||
if (model == iLoadedModelFiles.end())
|
||||
{
|
||||
sLog->outError("VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str());
|
||||
return;
|
||||
}
|
||||
if (model->second.decRefCount() == 0)
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace VMAP
|
||||
else
|
||||
{
|
||||
success = false;
|
||||
sLog->outError("StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace VMAP
|
||||
}
|
||||
if (!iTreeValues)
|
||||
{
|
||||
sLog->outError("StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY);
|
||||
return false;
|
||||
}
|
||||
bool result = true;
|
||||
@@ -382,7 +382,7 @@ namespace VMAP
|
||||
// acquire model instance
|
||||
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
|
||||
if (!model)
|
||||
sLog->outError("StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY);
|
||||
|
||||
// update tree
|
||||
uint32 referencedVal;
|
||||
@@ -432,7 +432,7 @@ namespace VMAP
|
||||
loadedTileMap::iterator tile = iLoadedTiles.find(tileID);
|
||||
if (tile == iLoadedTiles.end())
|
||||
{
|
||||
sLog->outError("StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY);
|
||||
return;
|
||||
}
|
||||
if (tile->second) // file associated with tile
|
||||
@@ -466,7 +466,7 @@ namespace VMAP
|
||||
else
|
||||
{
|
||||
if (!iLoadedSpawns.count(referencedNode))
|
||||
sLog->outError("StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID);
|
||||
else if (--iLoadedSpawns[referencedNode] == 0)
|
||||
{
|
||||
iTreeValues[referencedNode].setUnloaded();
|
||||
|
||||
@@ -53,7 +53,7 @@ void LoadGameObjectModelList()
|
||||
FILE* model_list_file = fopen((sWorld->GetDataPath() + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb");
|
||||
if (!model_list_file)
|
||||
{
|
||||
sLog->outError("Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void LoadGameObjectModelList()
|
||||
|| fread(&v1, sizeof(Vector3), 1, model_list_file) != 1
|
||||
|| fread(&v2, sizeof(Vector3), 1, model_list_file) != 1)
|
||||
{
|
||||
sLog->outError("File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ void LoadGameObjectModelList()
|
||||
}
|
||||
|
||||
fclose(model_list_file);
|
||||
sLog->outString(">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
GameObjectModel::~GameObjectModel()
|
||||
@@ -103,7 +103,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn
|
||||
// ignore models with no bounds
|
||||
if (mdl_box == G3D::AABox::zero())
|
||||
{
|
||||
sLog->outError("GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void CasterAI::UpdateAI(const uint32 diff)
|
||||
ArcherAI::ArcherAI(Creature* c) : CreatureAI(c)
|
||||
{
|
||||
if (!me->m_spells[0])
|
||||
sLog->outError("ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "ArcherAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->m_spells[0]);
|
||||
m_minRange = spellInfo ? spellInfo->GetMinRange(false) : 0;
|
||||
@@ -231,7 +231,7 @@ void ArcherAI::UpdateAI(const uint32 /*diff*/)
|
||||
TurretAI::TurretAI(Creature* c) : CreatureAI(c)
|
||||
{
|
||||
if (!me->m_spells[0])
|
||||
sLog->outError("TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "TurretAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->m_spells[0]);
|
||||
m_minRange = spellInfo ? spellInfo->GetMinRange(false) : 0;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#define TRINITY_PASSIVEAI_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
//#include "CreatureAIImpl.h"
|
||||
|
||||
class PassiveAI : public CreatureAI
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ void PetAI::_stopAttack()
|
||||
{
|
||||
if (!me->isAlive())
|
||||
{
|
||||
sLog->outStaticDebug("Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_GENERAL, "Creature stoped attacking cuz his dead [guid=%u]", me->GetGUIDLow());
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->CombatStop();
|
||||
@@ -100,7 +100,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
||||
|
||||
if (_needToStop())
|
||||
{
|
||||
sLog->outStaticDebug("Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_GENERAL, "Pet AI stopped attacking [guid=%u]", me->GetGUIDLow());
|
||||
_stopAttack();
|
||||
return;
|
||||
}
|
||||
@@ -430,7 +430,6 @@ void PetAI::HandleReturnMovement()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PetAI::DoAttack(Unit* target, bool chase)
|
||||
|
||||
@@ -130,7 +130,7 @@ void UnitAI::DoCastToAllHostilePlayers(uint32 spellid, bool triggered)
|
||||
void UnitAI::DoCast(uint32 spellId)
|
||||
{
|
||||
Unit* target = NULL;
|
||||
//sLog->outError("aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target);
|
||||
//sLog->outError(LOG_FILTER_GENERAL, "aggre %u %u", spellId, (uint32)AISpellInfo[spellId].target);
|
||||
switch (AISpellInfo[spellId].target)
|
||||
{
|
||||
default:
|
||||
|
||||
@@ -54,7 +54,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
|
||||
Map* map = creature->GetMap();
|
||||
if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
|
||||
{
|
||||
sLog->outError("DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? creature->ToCreature()->GetEntry() : 0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN
|
||||
|
||||
if (!creature->HasReactState(REACT_PASSIVE) && !creature->getVictim())
|
||||
{
|
||||
sLog->outError("DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "CreatureAIFactory.h"
|
||||
#include "SmartAI.h"
|
||||
|
||||
//#include "CreatureAIImpl.h"
|
||||
namespace AIRegistry
|
||||
{
|
||||
void Initialize()
|
||||
|
||||
@@ -125,7 +125,6 @@ namespace FactorySelector
|
||||
}*/
|
||||
|
||||
return (mv_factory == NULL ? NULL : mv_factory->Create(creature));
|
||||
|
||||
}
|
||||
|
||||
GameObjectAI* SelectGameObjectAI(GameObject* go)
|
||||
|
||||
@@ -40,7 +40,7 @@ bool CreatureEventAIHolder::UpdateRepeatTimer(Creature* creature, uint32 repeatM
|
||||
Time = urand(repeatMin, repeatMax);
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", creature->GetEntry(), Event.event_id, Event.event_type);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using Event %u (Type = %u) has RandomMax < RandomMin. Event repeating disabled.", creature->GetEntry(), Event.event_id, Event.event_type);
|
||||
Enabled = false;
|
||||
return false;
|
||||
}
|
||||
@@ -64,7 +64,6 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c)
|
||||
std::vector<CreatureEventAI_Event>::const_iterator i;
|
||||
for (i = (*CreatureEvents).second.begin(); i != (*CreatureEvents).second.end(); ++i)
|
||||
{
|
||||
|
||||
//Debug check
|
||||
#ifndef TRINITY_DEBUG
|
||||
if ((*i).event_flags & EFLAG_DEBUG_ONLY)
|
||||
@@ -83,10 +82,10 @@ CreatureEventAI::CreatureEventAI(Creature* c) : CreatureAI(c)
|
||||
}
|
||||
//EventMap had events but they were not added because they must be for instance
|
||||
if (m_CreatureEventAIList.empty())
|
||||
sLog->outError("CreatureEventAI: Creature %u has events but no events added to list because of instance flags.", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "CreatureEventAI: Creature %u has events but no events added to list because of instance flags.", me->GetEntry());
|
||||
}
|
||||
else
|
||||
sLog->outError("CreatureEventAI: EventMap for Creature %u is empty but creature is using CreatureEventAI.", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "CreatureEventAI: EventMap for Creature %u is empty but creature is using CreatureEventAI.", me->GetEntry());
|
||||
|
||||
m_bEmptyList = m_CreatureEventAIList.empty();
|
||||
m_Phase = 0;
|
||||
@@ -319,7 +318,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& holder, Unit* actionIn
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", me->GetEntry(), holder.Event.event_id, holder.Event.event_type);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using Event %u has invalid Event Type(%u), missing from ProcessEvent() Switch.", me->GetEntry(), holder.Event.event_id, holder.Event.event_type);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -492,10 +491,9 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
|
||||
caster->CastSpell(target, action.cast.spellId, (action.cast.castFlags & CAST_TRIGGERED));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
sLog->outErrorDb("CreatureEventAI: event %d creature %d attempt to cast spell that doesn't exist %d", eventId, me->GetEntry(), action.cast.spellId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: event %d creature %d attempt to cast spell that doesn't exist %d", eventId, me->GetEntry(), action.cast.spellId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -511,7 +509,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
creature = me->SummonCreature(action.summon.creatureId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
|
||||
|
||||
if (!creature)
|
||||
sLog->outErrorDb("CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatureId, eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. Spawn event %d is on creature %d", action.summon.creatureId, eventId, me->GetEntry());
|
||||
else if (action.summon.target != TARGET_T_SELF && target)
|
||||
creature->AI()->AttackStart(target);
|
||||
break;
|
||||
@@ -607,12 +605,12 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
int32 new_phase = int32(m_Phase)+action.set_inc_phase.step;
|
||||
if (new_phase < 0)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d decrease m_Phase under 0. CreatureEntry = %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d decrease m_Phase under 0. CreatureEntry = %d", eventId, me->GetEntry());
|
||||
m_Phase = 0;
|
||||
}
|
||||
else if (new_phase >= MAX_PHASE)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d incremented m_Phase above %u. m_Phase mask cannot be used with phases past %u. CreatureEntry = %d", eventId, MAX_PHASE-1, MAX_PHASE-1, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d incremented m_Phase above %u. m_Phase mask cannot be used with phases past %u. CreatureEntry = %d", eventId, MAX_PHASE-1, MAX_PHASE-1, me->GetEntry());
|
||||
m_Phase = MAX_PHASE-1;
|
||||
}
|
||||
else
|
||||
@@ -663,7 +661,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
if (action.random_phase_range.phaseMin <= action.random_phase_range.phaseMax)
|
||||
m_Phase = urand(action.random_phase_range.phaseMin, action.random_phase_range.phaseMax);
|
||||
else
|
||||
sLog->outErrorDb("CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: ACTION_T_RANDOM_PHASE_RANGE cannot have Param2 < Param1. Event = %d. CreatureEntry = %d", eventId, me->GetEntry());
|
||||
break;
|
||||
case ACTION_T_SUMMON_ID:
|
||||
{
|
||||
@@ -672,7 +670,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
CreatureEventAI_Summon_Map::const_iterator i = sEventAIMgr->GetCreatureEventAISummonMap().find(action.summon_id.spawnId);
|
||||
if (i == sEventAIMgr->GetCreatureEventAISummonMap().end())
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. Summon map index %u does not exist. EventID %d. CreatureID %d", action.summon_id.creatureId, action.summon_id.spawnId, eventId, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -683,7 +681,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
creature = me->SummonCreature(action.summon_id.creatureId, (*i).second.position_x, (*i).second.position_y, (*i).second.position_z, (*i).second.orientation, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0);
|
||||
|
||||
if (!creature)
|
||||
sLog->outErrorDb("CreatureEventAI: failed to spawn creature %u. EventId %d.Creature %d", action.summon_id.creatureId, eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: failed to spawn creature %u. EventId %d.Creature %d", action.summon_id.creatureId, eventId, me->GetEntry());
|
||||
else if (action.summon_id.target != TARGET_T_SELF && target)
|
||||
creature->AI()->AttackStart(target);
|
||||
|
||||
@@ -703,10 +701,10 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
break;
|
||||
case ACTION_T_SET_INST_DATA:
|
||||
{
|
||||
InstanceScript* instance = (InstanceScript*)me->GetInstanceScript();
|
||||
InstanceScript* instance = me->GetInstanceScript();
|
||||
if (!instance)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d attempt to set instance data without instance script. Creature %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data without instance script. Creature %d", eventId, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -718,14 +716,14 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
Unit* target = GetTargetByType(action.set_inst_data64.target, actionInvoker);
|
||||
if (!target)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d attempt to set instance data64 but Target == NULL. Creature %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data64 but Target == NULL. Creature %d", eventId, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
InstanceScript* instance = (InstanceScript*)me->GetInstanceScript();
|
||||
InstanceScript* instance = me->GetInstanceScript();
|
||||
if (!instance)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d attempt to set instance data64 without instance script. Creature %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d attempt to set instance data64 without instance script. Creature %d", eventId, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -735,8 +733,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
case ACTION_T_UPDATE_TEMPLATE:
|
||||
if (me->GetEntry() == action.update_template.creatureId)
|
||||
{
|
||||
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d ACTION_T_UPDATE_TEMPLATE call with param1 == current entry. Creature %d", eventId, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -745,8 +742,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
case ACTION_T_DIE:
|
||||
if (me->isDead())
|
||||
{
|
||||
|
||||
sLog->outErrorDb("CreatureEventAI: Event %d ACTION_T_DIE on dead creature. Creature %d", eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %d ACTION_T_DIE on dead creature. Creature %d", eventId, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
me->Kill(me);
|
||||
@@ -798,7 +794,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
object = me->SummonGameObject(action.raw.param1, x, y, z, 0, 0, 0, 0, 0, action.raw.param2);
|
||||
if (!object)
|
||||
{
|
||||
sLog->outErrorDb("TSCR: EventAI failed to spawn object %u. Spawn event %d is on creature %d", action.raw.param1, eventId, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_TSCR, "EventAI failed to spawn object %u. Spawn event %d is on creature %d", action.raw.param1, eventId, me->GetEntry());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -843,6 +839,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1048,7 +1046,6 @@ void CreatureEventAI::MoveInLineOfSight(Unit* who)
|
||||
|
||||
void CreatureEventAI::SpellHit(Unit* unit, const SpellInfo* spell)
|
||||
{
|
||||
|
||||
if (m_bEmptyList)
|
||||
return;
|
||||
|
||||
@@ -1111,6 +1108,8 @@ void CreatureEventAI::UpdateAI(const uint32 diff)
|
||||
if (me->IsInRange(me->getVictim(), (float)(*i).Event.range.minDist, (float)(*i).Event.range.maxDist))
|
||||
ProcessEvent(*i);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1230,13 +1229,13 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
|
||||
{
|
||||
if (!source)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i, invalid Source pointer.", textEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i, invalid Source pointer.", textEntry);
|
||||
return;
|
||||
}
|
||||
|
||||
if (textEntry >= 0)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1244,7 +1243,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
|
||||
|
||||
if (i == sEventAIMgr->GetCreatureEventAITextMap().end())
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", source->GetEntry(), source->GetTypeId(), source->GetGUIDLow(), textEntry);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1255,7 +1254,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
|
||||
if (sSoundEntriesStore.LookupEntry((*i).second.SoundId))
|
||||
source->PlayDirectSound((*i).second.SoundId);
|
||||
else
|
||||
sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i tried to process invalid sound id %u.", textEntry, (*i).second.SoundId);
|
||||
}
|
||||
|
||||
if ((*i).second.Emote)
|
||||
@@ -1265,7 +1264,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
|
||||
((Unit*)source)->HandleEmoteCommand((*i).second.Emote);
|
||||
}
|
||||
else
|
||||
sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId());
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", textEntry, source->GetTypeId());
|
||||
}
|
||||
|
||||
switch ((*i).second.Type)
|
||||
@@ -1286,13 +1285,13 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* source, Unit* t
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
source->MonsterWhisper(textEntry, target->GetGUID());
|
||||
else sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
|
||||
else sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
|
||||
}break;
|
||||
case CHAT_TYPE_BOSS_WHISPER:
|
||||
{
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
source->MonsterWhisper(textEntry, target->GetGUID(), true);
|
||||
else sLog->outErrorDb("CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
|
||||
else sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", textEntry);
|
||||
}break;
|
||||
case CHAT_TYPE_ZONE_YELL:
|
||||
source->MonsterYellToZone(textEntry, (*i).second.Language, target ? target->GetGUID() : 0);
|
||||
|
||||
@@ -589,7 +589,6 @@ struct CreatureEventAIHolder
|
||||
|
||||
class CreatureEventAI : public CreatureAI
|
||||
{
|
||||
|
||||
public:
|
||||
explicit CreatureEventAI(Creature* c);
|
||||
~CreatureEventAI()
|
||||
|
||||
@@ -38,13 +38,13 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
|
||||
// Load EventAI Text
|
||||
sObjectMgr->LoadTrinityStrings("creature_ai_texts", MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID);
|
||||
|
||||
// Gather Additional data from EventAI Texts 0 1 2 3 4
|
||||
// Gather Additional data from EventAI Texts 0 1 2 3 4
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM creature_ai_texts");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 additional CreatureEventAI Texts data. DB table `creature_ai_texts` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,33 +64,33 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
|
||||
// range negative
|
||||
if (i > MIN_CREATURE_AI_TEXT_STRING_ID || i <= MAX_CREATURE_AI_TEXT_STRING_ID)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` is not in valid range(%d-%d)", i, MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` is not in valid range(%d-%d)", i, MIN_CREATURE_AI_TEXT_STRING_ID, MAX_CREATURE_AI_TEXT_STRING_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
// range negative (must not happen, loaded from same table)
|
||||
if (!sObjectMgr->GetTrinityStringLocale(i))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` not found", i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` not found", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (temp.SoundId)
|
||||
{
|
||||
if (!sSoundEntriesStore.LookupEntry(temp.SoundId))
|
||||
sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` has Sound %u but sound does not exist.", i, temp.SoundId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Sound %u but sound does not exist.", i, temp.SoundId);
|
||||
}
|
||||
|
||||
if (!GetLanguageDescByID(temp.Language))
|
||||
sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.", i, temp.Language);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` using Language %u but Language does not exist.", i, temp.Language);
|
||||
|
||||
if (temp.Type > CHAT_TYPE_ZONE_YELL)
|
||||
sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.", i, temp.Type);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Type %u but this Chat Type does not exist.", i, temp.Type);
|
||||
|
||||
if (temp.Emote)
|
||||
{
|
||||
if (!sEmotesStore.LookupEntry(temp.Emote))
|
||||
sLog->outErrorDb("CreatureEventAI: Entry %i in table `creature_ai_texts` has Emote %u but emote does not exist.", i, temp.Emote);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Entry %i in table `creature_ai_texts` has Emote %u but emote does not exist.", i, temp.Emote);
|
||||
}
|
||||
|
||||
m_CreatureEventAI_TextMap[i] = temp;
|
||||
@@ -98,11 +98,10 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u additional CreatureEventAI Texts data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
// -------------------
|
||||
void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
@@ -115,8 +114,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 CreatureEventAI Summon definitions. DB table `creature_ai_summons` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 CreatureEventAI Summon definitions. DB table `creature_ai_summons` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,7 +136,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
|
||||
|
||||
if (!Trinity::IsValidMapCoord(temp.position_x, temp.position_y, temp.position_z, temp.orientation))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Summon id %u have wrong coordinates (%f, %f, %f, %f), skipping.", i, temp.position_x, temp.position_y, temp.position_z, temp.orientation);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Summon id %u have wrong coordinates (%f, %f, %f, %f), skipping.", i, temp.position_x, temp.position_y, temp.position_z, temp.orientation);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -147,11 +146,10 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u CreatureEventAI summon definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u CreatureEventAI summon definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
// -------------------
|
||||
void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
@@ -169,8 +167,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 CreatureEventAI scripts. DB table `creature_ai_scripts` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -191,7 +189,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
//Report any errors in event
|
||||
if (e_type >= EVENT_T_END)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u have wrong type (%u), skipping.", i, e_type);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u have wrong type (%u), skipping.", i, e_type);
|
||||
continue;
|
||||
}
|
||||
temp.event_type = EventAI_Type(e_type);
|
||||
@@ -208,21 +206,21 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
//Creature does not exist in database
|
||||
if (!cInfo)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u has script for non-existing creature entry (%u), skipping.", i, creature_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Only on the first script
|
||||
if (cInfo->AIName != "EventAI" && m_CreatureEventAI_Event_Map[creature_id].empty())
|
||||
sLog->outErrorDb("Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id);
|
||||
sLog->outError(LOG_FILTER_SQL, "Creature entry %u has EventAI scripts, but its AIName is not 'EventAI' - possible AI-mismatch?", temp.creature_id);
|
||||
|
||||
//No chance of this event occuring
|
||||
if (temp.event_chance == 0)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u has 0 percent chance. Event will never trigger!", i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u has 0 percent chance. Event will never trigger!", i);
|
||||
//Chance above 100, force it to be 100
|
||||
else if (temp.event_chance > 100)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event %u with more than 100 percent chance. Adjusting to 100 percent.", temp.creature_id, i);
|
||||
temp.event_chance = 100;
|
||||
}
|
||||
|
||||
@@ -232,23 +230,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
case EVENT_T_TIMER:
|
||||
case EVENT_T_TIMER_OOC:
|
||||
if (temp.timer.initialMax < temp.timer.initialMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using timed event(%u) with param2 < param1 (InitialMax < InitialMin). Event will never repeat.", temp.creature_id, i);
|
||||
if (temp.timer.repeatMax < temp.timer.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_HP:
|
||||
case EVENT_T_MANA:
|
||||
case EVENT_T_TARGET_HP:
|
||||
case EVENT_T_TARGET_MANA:
|
||||
if (temp.percent_range.percentMax > 100)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using percentage event(%u) with param2 (MinPercent) > 100. Event will never trigger! ", temp.creature_id, i);
|
||||
|
||||
if (temp.percent_range.percentMax <= temp.percent_range.percentMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using percentage event(%u) with param1 <= param2 (MaxPercent <= MinPercent). Event will never trigger! ", temp.creature_id, i);
|
||||
|
||||
if (temp.event_flags & EFLAG_REPEATABLE && !temp.percent_range.repeatMin && !temp.percent_range.repeatMax)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has param3 and param4=0 (RepeatMin/RepeatMax) but cannot be repeatable without timers. Removing EFLAG_REPEATABLE for event %u.", temp.creature_id, i);
|
||||
temp.event_flags &= ~EFLAG_REPEATABLE;
|
||||
}
|
||||
break;
|
||||
@@ -258,29 +256,29 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.spell_hit.spellId);
|
||||
if (!spell)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((temp.spell_hit.schoolMask & spell->SchoolMask) != spell->SchoolMask)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.spell_hit.schoolMask, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has param1(spellId %u) but param2 is not -1 and not equal to spell's school mask. Event %u can never trigger.", temp.creature_id, temp.spell_hit.schoolMask, i);
|
||||
}
|
||||
|
||||
if (!temp.spell_hit.schoolMask)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.spell_hit.schoolMask, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u is using invalid SpellSchoolMask(%u) defined in event %u.", temp.creature_id, temp.spell_hit.schoolMask, i);
|
||||
|
||||
if (temp.spell_hit.repeatMax < temp.spell_hit.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_RANGE:
|
||||
if (temp.range.maxDist < temp.range.minDist)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (MaxDist < MinDist). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (MaxDist < MinDist). Event will never repeat.", temp.creature_id, i);
|
||||
if (temp.range.repeatMax < temp.range.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_OOC_LOS:
|
||||
if (temp.ooc_los.repeatMax < temp.ooc_los.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_SPAWNED:
|
||||
switch (temp.spawned.condition)
|
||||
@@ -289,55 +287,55 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
break;
|
||||
case SPAWNED_EVENT_MAP:
|
||||
if (!sMapStore.LookupEntry(temp.spawned.conditionValue1))
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1);
|
||||
break;
|
||||
case SPAWNED_EVENT_ZONE:
|
||||
if (!GetAreaEntryByAreaID(temp.spawned.conditionValue1))
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1);
|
||||
default:
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case EVENT_T_FRIENDLY_HP:
|
||||
if (temp.friendly_hp.repeatMax < temp.friendly_hp.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_FRIENDLY_IS_CC:
|
||||
if (temp.friendly_is_cc.repeatMax < temp.friendly_is_cc.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_FRIENDLY_MISSING_BUFF:
|
||||
{
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.spell_hit.spellId);
|
||||
if (!spell)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
|
||||
continue;
|
||||
}
|
||||
if (temp.friendly_buff.repeatMax < temp.friendly_buff.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
}
|
||||
case EVENT_T_KILL:
|
||||
if (temp.kill.repeatMax < temp.kill.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_TARGET_CASTING:
|
||||
if (temp.target_casting.repeatMax < temp.target_casting.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_SUMMONED_UNIT:
|
||||
if (!sObjectMgr->GetCreatureTemplate(temp.summon_unit.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with not existed creature template id (%u) in param1, skipped.", temp.creature_id, i, temp.summon_unit.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with not existed creature template id (%u) in param1, skipped.", temp.creature_id, i, temp.summon_unit.creatureId);
|
||||
if (temp.summon_unit.repeatMax < temp.summon_unit.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with param2 < param1 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
case EVENT_T_QUEST_ACCEPT:
|
||||
case EVENT_T_QUEST_COMPLETE:
|
||||
if (!sObjectMgr->GetQuestTemplate(temp.quest.questId))
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId);
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using event(%u) with not existed qyest id (%u) in param1, skipped.", temp.creature_id, i, temp.quest.questId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using not implemented event (%u) in event %u.", temp.creature_id, temp.event_id, i);
|
||||
continue;
|
||||
|
||||
case EVENT_T_AGGRO:
|
||||
@@ -347,7 +345,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (temp.event_flags & EFLAG_REPEATABLE)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has EFLAG_REPEATABLE set. Event can never be repeatable. Removing flag for event %u.", temp.creature_id, i);
|
||||
temp.event_flags &= ~EFLAG_REPEATABLE;
|
||||
}
|
||||
|
||||
@@ -358,7 +356,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (!sEmotesTextStore.LookupEntry(temp.receive_emote.emoteId))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: param1 (EmoteTextId: %u) are not valid.", temp.creature_id, i, temp.receive_emote.emoteId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: param1 (EmoteTextId: %u) are not valid.", temp.creature_id, i, temp.receive_emote.emoteId);
|
||||
continue;
|
||||
}
|
||||
if (temp.receive_emote.condition)
|
||||
@@ -369,14 +367,14 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
cond.ConditionValue2 = temp.receive_emote.conditionValue2;
|
||||
if (!sConditionMgr->isConditionTypeValid(&cond))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: param2 (Condition: %u) are not valid.", temp.creature_id, i, temp.receive_emote.condition);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(temp.event_flags & EFLAG_REPEATABLE))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using event %u: EFLAG_REPEATABLE not set. Event must always be repeatable. Flag applied.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using event %u: EFLAG_REPEATABLE not set. Event must always be repeatable. Flag applied.", temp.creature_id, i);
|
||||
temp.event_flags |= EFLAG_REPEATABLE;
|
||||
}
|
||||
|
||||
@@ -389,16 +387,16 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(temp.buffed.spellId);
|
||||
if (!spell)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u has non-existant SpellID(%u) defined in event %u.", temp.creature_id, temp.spell_hit.spellId, i);
|
||||
continue;
|
||||
}
|
||||
if (temp.buffed.repeatMax < temp.buffed.repeatMin)
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
sLog->outErrorDb("CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Creature %u using not checked at load event (%u) in event %u. Need check code update?", temp.creature_id, temp.event_id, i);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -407,7 +405,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
uint16 action_type = fields[10+(j*4)].GetUInt8();
|
||||
if (action_type >= ACTION_T_END)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u has incorrect action type (%u), replace by ACTION_T_NONE.", i, j+1, action_type);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has incorrect action type (%u), replace by ACTION_T_NONE.", i, j+1, action_type);
|
||||
temp.action[j].type = ACTION_T_NONE;
|
||||
continue;
|
||||
}
|
||||
@@ -429,30 +427,30 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
if (action.text.TextId1 < 0)
|
||||
{
|
||||
if (m_CreatureEventAI_TextMap.find(action.text.TextId1) == m_CreatureEventAI_TextMap.end())
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 refrences non-existing entry in texts table.", i, j+1);
|
||||
}
|
||||
if (action.text.TextId2 < 0)
|
||||
{
|
||||
if (m_CreatureEventAI_TextMap.find(action.text.TextId2) == m_CreatureEventAI_TextMap.end())
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 refrences non-existing entry in texts table.", i, j+1);
|
||||
|
||||
if (!action.text.TextId1)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has param2, but param1 is not set. Required for randomized text.", i, j+1);
|
||||
}
|
||||
if (action.text.TextId3 < 0)
|
||||
{
|
||||
if (m_CreatureEventAI_TextMap.find(action.text.TextId3) == m_CreatureEventAI_TextMap.end())
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 refrences non-existing entry in texts table.", i, j+1);
|
||||
|
||||
if (!action.text.TextId1 || !action.text.TextId2)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u has param3, but param1 and/or param2 is not set. Required for randomized text.", i, j+1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ACTION_T_SET_FACTION:
|
||||
if (action.set_faction.factionId !=0 && !sFactionStore.LookupEntry(action.set_faction.factionId))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent FactionId %u.", i, j+1, action.set_faction.factionId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent FactionId %u.", i, j+1, action.set_faction.factionId);
|
||||
action.set_faction.factionId = 0;
|
||||
}
|
||||
break;
|
||||
@@ -461,7 +459,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (action.morph.creatureId && !sObjectMgr->GetCreatureTemplate(action.morph.creatureId))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant Creature entry %u.", i, j+1, action.morph.creatureId);
|
||||
action.morph.creatureId = 0;
|
||||
}
|
||||
|
||||
@@ -469,12 +467,12 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (action.morph.creatureId)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId, action.morph.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.morph.modelId, action.morph.creatureId);
|
||||
action.morph.modelId = 0;
|
||||
}
|
||||
else if (!sCreatureDisplayInfoStore.LookupEntry(action.morph.modelId))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant ModelId %u.", i, j+1, action.morph.modelId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant ModelId %u.", i, j+1, action.morph.modelId);
|
||||
action.morph.modelId = 0;
|
||||
}
|
||||
}
|
||||
@@ -482,33 +480,33 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
break;
|
||||
case ACTION_T_SOUND:
|
||||
if (!sSoundEntriesStore.LookupEntry(action.sound.soundId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId);
|
||||
break;
|
||||
case ACTION_T_EMOTE:
|
||||
if (!sEmotesStore.LookupEntry(action.emote.emoteId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.emote.emoteId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.emote.emoteId);
|
||||
break;
|
||||
case ACTION_T_RANDOM_SOUND:
|
||||
if (!sSoundEntriesStore.LookupEntry(action.random_sound.soundId1))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId1);
|
||||
if (action.random_sound.soundId2 >= 0 && !sSoundEntriesStore.LookupEntry(action.random_sound.soundId2))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId2);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId2);
|
||||
if (action.random_sound.soundId3 >= 0 && !sSoundEntriesStore.LookupEntry(action.random_sound.soundId3))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId3);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 uses non-existant SoundID %u.", i, j+1, action.random_sound.soundId3);
|
||||
break;
|
||||
case ACTION_T_RANDOM_EMOTE:
|
||||
if (!sEmotesStore.LookupEntry(action.random_emote.emoteId1))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId1);
|
||||
if (action.random_emote.emoteId2 >= 0 && !sEmotesStore.LookupEntry(action.random_emote.emoteId2))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param2 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId2);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param2 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId2);
|
||||
if (action.random_emote.emoteId3 >= 0 && !sEmotesStore.LookupEntry(action.random_emote.emoteId3))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param3 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId3);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param3 (EmoteId: %u) are not valid.", i, j+1, action.random_emote.emoteId3);
|
||||
break;
|
||||
case ACTION_T_CAST:
|
||||
{
|
||||
const SpellInfo* spell = sSpellMgr->GetSpellInfo(action.cast.spellId);
|
||||
if (!spell)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast.spellId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast.spellId);
|
||||
/* FIXME: temp.raw.param3 not have event tipes with recovery time in it....
|
||||
else
|
||||
{
|
||||
@@ -516,7 +514,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
//output as debug for now, also because there's no general rule all spells have RecoveryTime
|
||||
if (temp.event_param3 < spell->RecoveryTime)
|
||||
sLog->outDebug("CreatureEventAI: Event %u Action %u uses SpellID %u but cooldown is longer(%u) than minumum defined in event param3(%u).", i, j+1, action.cast.spellId, spell->RecoveryTime, temp.event_param3);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CreatureEventAI: Event %u Action %u uses SpellID %u but cooldown is longer(%u) than minumum defined in event param3(%u).", i, j+1, action.cast.spellId, spell->RecoveryTime, temp.event_param3);
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -526,143 +524,143 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
action.cast.castFlags |= CAST_TRIGGERED;
|
||||
|
||||
if (action.cast.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
}
|
||||
case ACTION_T_SUMMON:
|
||||
if (!sObjectMgr->GetCreatureTemplate(action.summon.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.summon.creatureId);
|
||||
|
||||
if (action.summon.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_THREAT_SINGLE_PCT:
|
||||
if (std::abs(action.threat_single_pct.percent) > 100)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_single_pct.percent);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_single_pct.percent);
|
||||
if (action.threat_single_pct.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_THREAT_ALL_PCT:
|
||||
if (std::abs(action.threat_all_pct.percent) > 100)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses invalid percent value %u.", i, j+1, action.threat_all_pct.percent);
|
||||
break;
|
||||
case ACTION_T_QUEST_EVENT:
|
||||
if (Quest const* qid = sObjectMgr->GetQuestTemplate(action.quest_event.questId))
|
||||
{
|
||||
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event.questId);
|
||||
}
|
||||
else
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event.questId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event.questId);
|
||||
|
||||
if (action.quest_event.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
|
||||
break;
|
||||
case ACTION_T_CAST_EVENT:
|
||||
if (!sObjectMgr->GetCreatureTemplate(action.cast_event.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event.creatureId);
|
||||
if (!sSpellMgr->GetSpellInfo(action.cast_event.spellId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event.spellId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event.spellId);
|
||||
if (action.cast_event.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_SET_UNIT_FIELD:
|
||||
if (action.set_unit_field.field < OBJECT_END || action.set_unit_field.field >= UNIT_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u param1 (UNIT_FIELD*). Index out of range for intended use.", i, j+1);
|
||||
if (action.set_unit_field.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_SET_UNIT_FLAG:
|
||||
case ACTION_T_REMOVE_UNIT_FLAG:
|
||||
if (action.unit_flag.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_SET_PHASE:
|
||||
if (action.set_phase.phase >= MAX_PHASE)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
break;
|
||||
case ACTION_T_INC_PHASE:
|
||||
if (action.set_inc_phase.step == 0)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u is incrementing phase by 0. Was this intended?", i, j+1);
|
||||
else if (std::abs(action.set_inc_phase.step) > MAX_PHASE-1)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u is change phase by too large for any use %i.", i, j+1, action.set_inc_phase.step);
|
||||
break;
|
||||
case ACTION_T_QUEST_EVENT_ALL:
|
||||
if (Quest const* qid = sObjectMgr->GetQuestTemplate(action.quest_event_all.questId))
|
||||
{
|
||||
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. SpecialFlags for quest entry %u does not include |2, Action will not have any effect.", i, j+1, action.quest_event_all.questId);
|
||||
}
|
||||
else
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event_all.questId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent Quest entry %u.", i, j+1, action.quest_event_all.questId);
|
||||
break;
|
||||
case ACTION_T_CAST_EVENT_ALL:
|
||||
if (!sObjectMgr->GetCreatureTemplate(action.cast_event_all.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event_all.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent creature entry %u.", i, j+1, action.cast_event_all.creatureId);
|
||||
if (!sSpellMgr->GetSpellInfo(action.cast_event_all.spellId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event_all.spellId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.cast_event_all.spellId);
|
||||
break;
|
||||
case ACTION_T_REMOVEAURASFROMSPELL:
|
||||
if (!sSpellMgr->GetSpellInfo(action.remove_aura.spellId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.remove_aura.spellId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existent SpellID %u.", i, j+1, action.remove_aura.spellId);
|
||||
if (action.remove_aura.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_RANDOM_PHASE: //PhaseId1, PhaseId2, PhaseId3
|
||||
if (action.random_phase.phase1 >= MAX_PHASE)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase1 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase1 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
if (action.random_phase.phase2 >= MAX_PHASE)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase2 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase2 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
if (action.random_phase.phase3 >= MAX_PHASE)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phase3 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phase3 >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
break;
|
||||
case ACTION_T_RANDOM_PHASE_RANGE: //PhaseMin, PhaseMax
|
||||
if (action.random_phase_range.phaseMin >= MAX_PHASE)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phaseMin >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMin >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
if (action.random_phase_range.phaseMin >= MAX_PHASE)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phaseMax >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMax >= %u. Phase mask cannot be used past phase %u.", i, j+1, MAX_PHASE, MAX_PHASE-1);
|
||||
if (action.random_phase_range.phaseMin >= action.random_phase_range.phaseMax)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set phaseMax <= phaseMin.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set phaseMax <= phaseMin.", i, j+1);
|
||||
std::swap(action.random_phase_range.phaseMin, action.random_phase_range.phaseMax);
|
||||
// equal case processed at call
|
||||
}
|
||||
break;
|
||||
case ACTION_T_SUMMON_ID:
|
||||
if (!sObjectMgr->GetCreatureTemplate(action.summon_id.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.summon_id.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.summon_id.creatureId);
|
||||
if (action.summon_id.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
if (m_CreatureEventAI_Summon_Map.find(action.summon_id.spawnId) == m_CreatureEventAI_Summon_Map.end())
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u summons missing CreatureEventAI_Summon %u", i, j+1, action.summon_id.spawnId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u summons missing CreatureEventAI_Summon %u", i, j+1, action.summon_id.spawnId);
|
||||
break;
|
||||
case ACTION_T_KILLED_MONSTER:
|
||||
if (!sObjectMgr->GetCreatureTemplate(action.killed_monster.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.killed_monster.creatureId);
|
||||
if (action.killed_monster.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_SET_INST_DATA:
|
||||
if (!(temp.event_flags & EFLAG_DIFFICULTY_ALL))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
|
||||
if (action.set_inst_data.value > 4/*SPECIAL*/)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u attempts to set instance data above encounter state 4. Custom case?", i, j+1);
|
||||
break;
|
||||
case ACTION_T_SET_INST_DATA64:
|
||||
if (!(temp.event_flags & EFLAG_DIFFICULTY_ALL))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u. Cannot set instance data without difficulty event flags.", i, j+1);
|
||||
if (action.set_inst_data64.target >= TARGET_T_END)
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses incorrect Target type", i, j+1);
|
||||
break;
|
||||
case ACTION_T_UPDATE_TEMPLATE:
|
||||
if (!sObjectMgr->GetCreatureTemplate(action.update_template.creatureId))
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId);
|
||||
break;
|
||||
case ACTION_T_SET_SHEATH:
|
||||
if (action.set_sheath.sheath >= MAX_SHEATH_STATE)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses wrong sheath state %u.", i, j+1, action.set_sheath.sheath);
|
||||
action.set_sheath.sheath = SHEATH_STATE_UNARMED;
|
||||
}
|
||||
break;
|
||||
@@ -671,7 +669,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (action.invincibility_hp_level.hp_level > 100)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level);
|
||||
action.invincibility_hp_level.hp_level = 100;
|
||||
}
|
||||
}
|
||||
@@ -681,7 +679,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (action.mount.creatureId && !sObjectMgr->GetCreatureTemplate(action.mount.creatureId))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses nonexistent Creature entry %u.", i, j+1, action.mount.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses nonexistent Creature entry %u.", i, j+1, action.mount.creatureId);
|
||||
action.morph.creatureId = 0;
|
||||
}
|
||||
|
||||
@@ -689,12 +687,12 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
{
|
||||
if (action.mount.creatureId)
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.mount.modelId, action.mount.creatureId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have unused ModelId %u with also set creature id %u.", i, j+1, action.mount.modelId, action.mount.creatureId);
|
||||
action.mount.modelId = 0;
|
||||
}
|
||||
else if (!sCreatureDisplayInfoStore.LookupEntry(action.mount.modelId))
|
||||
{
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u uses nonexistent ModelId %u.", i, j+1, action.mount.modelId);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u uses nonexistent ModelId %u.", i, j+1, action.mount.modelId);
|
||||
action.mount.modelId = 0;
|
||||
}
|
||||
}
|
||||
@@ -714,7 +712,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
case ACTION_T_RANDOM_SAY:
|
||||
case ACTION_T_RANDOM_YELL:
|
||||
case ACTION_T_RANDOM_TEXTEMOTE:
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u currently unused ACTION type. Did you forget to update database?", i, j+1);
|
||||
break;
|
||||
|
||||
case ACTION_T_MOVE_RANDOM_POINT:
|
||||
@@ -728,7 +726,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
break;
|
||||
|
||||
default:
|
||||
sLog->outErrorDb("CreatureEventAI: Event %u Action %u have currently not checked at load action type (%u). Need check code update?", i, j+1, action.type);
|
||||
sLog->outError(LOG_FILTER_SQL, "CreatureEventAI: Event %u Action %u have currently not checked at load action type (%u). Need check code update?", i, j+1, action.type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -740,6 +738,6 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u CreatureEventAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u CreatureEventAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
@@ -5,9 +5,13 @@
|
||||
* This program is free software licensed under GPL version 2
|
||||
* Please see the included DOCS/LICENSE.TXT for more information */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Item.h"
|
||||
#include "Spell.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
@@ -153,7 +157,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* source, uint32 soundId)
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundId))
|
||||
{
|
||||
sLog->outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow());
|
||||
sLog->outError(LOG_FILTER_TSCR, "Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", soundId, source->GetTypeId(), source->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -246,7 +250,7 @@ void ScriptedAI::DoResetThreat()
|
||||
{
|
||||
if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty())
|
||||
{
|
||||
sLog->outError("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_TSCR, "DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -295,7 +299,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* unit, float x, float y, float z, float o
|
||||
if (Player* player = unit->ToPlayer())
|
||||
player->TeleportTo(unit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
else
|
||||
sLog->outError("TSCR: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), unit->GetTypeId(), unit->GetGUID(), x, y, z, o);
|
||||
sLog->outError(LOG_FILTER_TSCR, "Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), unit->GetTypeId(), unit->GetGUID(), x, y, z, o);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
|
||||
@@ -427,7 +431,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(uint32 const diff)
|
||||
return false;
|
||||
break;
|
||||
default: // For most of creatures that certain area is their home area.
|
||||
sLog->outDetail("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry());
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition. Using the default one.", me->GetEntry());
|
||||
uint32 homeAreaId = me->GetMap()->GetAreaId(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY(), me->GetHomePosition().GetPositionZ());
|
||||
if (me->GetAreaId() == homeAreaId)
|
||||
return false;
|
||||
|
||||
@@ -9,7 +9,7 @@ SDComment:
|
||||
SDCategory: Npc
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Group.h"
|
||||
|
||||
@@ -175,7 +175,7 @@ void npc_escortAI::EnterEvadeMode()
|
||||
{
|
||||
AddEscortState(STATE_ESCORT_RETURNING);
|
||||
ReturnToLastPoint();
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has left combat and is now returning to last point");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI has left combat and is now returning to last point");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,7 +216,7 @@ void npc_escortAI::UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (DespawnAtEnd)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI reached end of waypoints");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI reached end of waypoints");
|
||||
|
||||
if (m_bCanReturnToStart)
|
||||
{
|
||||
@@ -227,7 +227,7 @@ void npc_escortAI::UpdateAI(uint32 const diff)
|
||||
|
||||
m_uiWPWaitTimer = 0;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ void npc_escortAI::UpdateAI(uint32 const diff)
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI reached end of waypoints with Despawn off");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI reached end of waypoints with Despawn off");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ void npc_escortAI::UpdateAI(uint32 const diff)
|
||||
if (!HasEscortState(STATE_ESCORT_PAUSED))
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z);
|
||||
|
||||
WaypointStart(CurrentWP->id);
|
||||
|
||||
@@ -270,7 +270,7 @@ void npc_escortAI::UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (DespawnAtFar && !IsPlayerOrGroupInRange())
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI failed because player/group was to far away or not found");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI failed because player/group was to far away or not found");
|
||||
|
||||
if (m_bCanInstantRespawn)
|
||||
{
|
||||
@@ -308,7 +308,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
|
||||
//Combat start position reached, continue waypoint movement
|
||||
if (pointId == POINT_LAST_POINT)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has returned to original position before combat");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI has returned to original position before combat");
|
||||
|
||||
me->SetWalk(!m_bIsRunning);
|
||||
RemoveEscortState(STATE_ESCORT_RETURNING);
|
||||
@@ -318,7 +318,7 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
|
||||
}
|
||||
else if (pointId == POINT_HOME)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI has returned to original home location and will continue from beginning of waypoint list.");
|
||||
|
||||
CurrentWP = WaypointList.begin();
|
||||
m_uiWPWaitTimer = 1;
|
||||
@@ -328,11 +328,11 @@ void npc_escortAI::MovementInform(uint32 moveType, uint32 pointId)
|
||||
//Make sure that we are still on the right waypoint
|
||||
if (CurrentWP->id != pointId)
|
||||
{
|
||||
sLog->outError("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", pointId, CurrentWP->id, me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", pointId, CurrentWP->id, me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI Waypoint %u reached", CurrentWP->id);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI Waypoint %u reached", CurrentWP->id);
|
||||
|
||||
//Call WP function
|
||||
WaypointReached(CurrentWP->id);
|
||||
@@ -401,14 +401,14 @@ void npc_escortAI::SetRun(bool on)
|
||||
if (!m_bIsRunning)
|
||||
me->SetWalk(false);
|
||||
else
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI attempt to set run mode, but is already running.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI attempt to set run mode, but is already running.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_bIsRunning)
|
||||
me->SetWalk(true);
|
||||
else
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI attempt to set walk mode, but is already walking.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI attempt to set walk mode, but is already walking.");
|
||||
}
|
||||
|
||||
m_bIsRunning = on;
|
||||
@@ -419,13 +419,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
|
||||
{
|
||||
if (me->getVictim())
|
||||
{
|
||||
sLog->outError("TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "TSCR ERROR: EscortAI (script: %s, creature entry: %u) attempts to Start while in combat", me->GetScriptName().c_str(), me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
sLog->outError("TSCR: EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_TSCR, "EscortAI (script: %s, creature entry: %u) attempts to Start while already escorting", me->GetScriptName().c_str(), me->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
|
||||
|
||||
if (WaypointList.empty())
|
||||
{
|
||||
sLog->outErrorDb("TSCR: EscortAI (script: %s, creature entry: %u) starts with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).",
|
||||
sLog->outError(LOG_FILTER_SQL, "TSCR: EscortAI (script: %s, creature entry: %u) starts with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).",
|
||||
me->GetScriptName().c_str(), me->GetEntry(), quest ? quest->GetQuestId() : 0);
|
||||
return;
|
||||
}
|
||||
@@ -454,13 +454,13 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
|
||||
m_bCanReturnToStart = canLoopPath;
|
||||
|
||||
if (m_bCanReturnToStart && m_bCanInstantRespawn)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.");
|
||||
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
|
||||
{
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
|
||||
}
|
||||
|
||||
//disable npcflags
|
||||
@@ -471,7 +471,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
|
||||
|
||||
CurrentWP = WaypointList.begin();
|
||||
|
||||
|
||||
@@ -123,4 +123,3 @@ struct npc_escortAI : public ScriptedAI
|
||||
bool HasImmuneToNPCFlags;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,7 @@ SDComment: This AI is under development
|
||||
SDCategory: Npc
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedFollowerAI.h"
|
||||
#include "Group.h"
|
||||
|
||||
@@ -165,7 +165,7 @@ void FollowerAI::EnterEvadeMode()
|
||||
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI left combat, returning to CombatStartPosition.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI left combat, returning to CombatStartPosition.");
|
||||
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
|
||||
{
|
||||
@@ -191,7 +191,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is set completed, despawns.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI is set completed, despawns.");
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (HasFollowState(STATE_FOLLOW_RETURNING))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is returning to leader.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI is returning to leader.");
|
||||
|
||||
RemoveFollowState(STATE_FOLLOW_RETURNING);
|
||||
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
@@ -231,7 +231,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff)
|
||||
|
||||
if (bIsMaxRangeExceeded)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI failed because player/group was to far away or not found");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI failed because player/group was to far away or not found");
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
@@ -274,13 +274,13 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
|
||||
{
|
||||
if (me->getVictim())
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI attempt to StartFollow while in combat.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while in combat.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS))
|
||||
{
|
||||
sLog->outError("TSCR: FollowerAI attempt to StartFollow while already following.");
|
||||
sLog->outError(LOG_FILTER_TSCR, "FollowerAI attempt to StartFollow while already following.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle.");
|
||||
}
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
@@ -305,7 +305,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
|
||||
|
||||
me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName(), m_uiLeaderGUID);
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName(), m_uiLeaderGUID);
|
||||
}
|
||||
|
||||
Player* FollowerAI::GetLeaderForFollower()
|
||||
@@ -324,7 +324,7 @@ Player* FollowerAI::GetLeaderForFollower()
|
||||
|
||||
if (member && member->isAlive() && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader changed and returned new leader.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI GetLeader changed and returned new leader.");
|
||||
m_uiLeaderGUID = member->GetGUID();
|
||||
return member;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ Player* FollowerAI::GetLeaderForFollower()
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader can not find suitable leader.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "FollowerAI GetLeader can not find suitable leader.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,8 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Group.h"
|
||||
|
||||
#include "SmartAI.h"
|
||||
#include "ScriptPCH.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
||||
{
|
||||
@@ -108,7 +107,7 @@ WayPoint* SmartAI::GetNextWayPoint()
|
||||
mLastWP = (*itr).second;
|
||||
if (mLastWP->id != mCurrentWPID)
|
||||
{
|
||||
sLog->outError("SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "SmartAI::GetNextWayPoint: Got not expected waypoint id %u, expected %u", mLastWP->id, mCurrentWPID);
|
||||
}
|
||||
return (*itr).second;
|
||||
}
|
||||
@@ -119,7 +118,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/)
|
||||
{
|
||||
if (me->isInCombat())// no wp movement in combat
|
||||
{
|
||||
sLog->outError("SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to start waypoint movement while in combat, ignoring.", me->GetEntry());
|
||||
return;
|
||||
}
|
||||
if (HasEscortState(SMART_ESCORT_ESCORTING))
|
||||
@@ -135,8 +134,7 @@ void SmartAI::StartPath(bool run, uint32 path, bool repeat, Unit* /*invoker*/)
|
||||
|
||||
SetRun(run);
|
||||
|
||||
WayPoint* wp = GetNextWayPoint();
|
||||
if (wp)
|
||||
if (WayPoint* wp = GetNextWayPoint())
|
||||
{
|
||||
me->GetPosition(&mLastOOCPos);
|
||||
me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z);
|
||||
@@ -164,7 +162,7 @@ void SmartAI::PausePath(uint32 delay, bool forced)
|
||||
return;
|
||||
if (HasEscortState(SMART_ESCORT_PAUSED))
|
||||
{
|
||||
sLog->outError("SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "SmartAI::StartPath: Creature entry %u wanted to pause waypoint movement while already paused, ignoring.", me->GetEntry());
|
||||
return;
|
||||
}
|
||||
mForcedPaused = forced;
|
||||
@@ -302,7 +300,6 @@ void SmartAI::UpdatePath(const uint32 diff)
|
||||
mWPPauseTimer = 0;
|
||||
} else {
|
||||
mWPPauseTimer -= diff;
|
||||
|
||||
}
|
||||
}
|
||||
if (HasEscortState(SMART_ESCORT_RETURNING))
|
||||
@@ -324,15 +321,12 @@ void SmartAI::UpdatePath(const uint32 diff)
|
||||
if (mCurrentWPID == GetWPCount())
|
||||
{
|
||||
EndPath();
|
||||
} else {
|
||||
WayPoint* wp = GetNextWayPoint();
|
||||
if (wp)
|
||||
{
|
||||
SetRun(mRun);
|
||||
me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z);
|
||||
}
|
||||
}
|
||||
|
||||
else if (WayPoint* wp = GetNextWayPoint())
|
||||
{
|
||||
SetRun(mRun);
|
||||
me->GetMotionMaster()->MovePoint(wp->id, wp->x, wp->y, wp->z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -910,7 +910,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
InstanceScript* instance = obj->GetInstanceScript();
|
||||
if (!instance)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -931,7 +931,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
InstanceScript* instance = obj->GetInstanceScript();
|
||||
if (!instance)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Event %u attempt to set instance data without instance script. EntryOrGuid %d", e.GetEventType(), e.entryOrGuid);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1438,7 +1438,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
EquipmentInfo const* einfo = sObjectMgr->GetEquipmentInfo(e.action.equip.entry);
|
||||
if (!einfo)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info entry %u", e.action.equip.entry);
|
||||
return;
|
||||
}
|
||||
npc->SetCurrentEquipmentId(e.action.equip.entry);
|
||||
@@ -1563,7 +1563,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (e.GetTargetType() == SMART_TARGET_NONE)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1687,7 +1687,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
uint32 id = temp[urand(0, count)];
|
||||
if (e.GetTargetType() == SMART_TARGET_NONE)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1717,7 +1717,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
uint32 id = urand(e.action.randTimedActionList.entry1, e.action.randTimedActionList.entry2);
|
||||
if (e.GetTargetType() == SMART_TARGET_NONE)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %d SourceType %u Event %u Action %u is using TARGET_NONE(0) for Script9 target. Please correct target_type in database.", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1782,7 +1782,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsUnit(*itr))
|
||||
(*itr)->ToUnit()->SetByteFlag(UNIT_FIELD_BYTES_1, 0, e.action.setunitByte.byte1);
|
||||
(*itr)->ToUnit()->SetByteFlag(UNIT_FIELD_BYTES_1, e.action.setunitByte.type, e.action.setunitByte.byte1);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -1795,7 +1795,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
if (IsUnit(*itr))
|
||||
(*itr)->ToUnit()->RemoveByteFlag(UNIT_FIELD_BYTES_1, 0, e.action.delunitByte.byte1);
|
||||
(*itr)->ToUnit()->RemoveByteFlag(UNIT_FIELD_BYTES_1, e.action.delunitByte.type, e.action.delunitByte.byte1);
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -1909,14 +1909,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (SmartAI* ai = CAST_AI(SmartAI, (*itr)->ToCreature()->AI()))
|
||||
ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list
|
||||
else
|
||||
sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartAI, skipping");
|
||||
}
|
||||
else if (IsGameObject(*itr))
|
||||
{
|
||||
if (SmartGameObjectAI* ai = CAST_AI(SmartGameObjectAI, (*itr)->ToGameObject()->AI()))
|
||||
ai->GetScript()->StoreTargetList(new ObjectList(*storedTargets), e.action.sendTargetToTarget.id); // store a copy of target list
|
||||
else
|
||||
sLog->outErrorDb("SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target for SMART_ACTION_SEND_TARGET_TO_TARGET is not using SmartGameObjectAI, skipping");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1950,7 +1950,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1960,7 +1960,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK)
|
||||
ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
|
||||
else
|
||||
sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1970,7 +1970,7 @@ void SmartScript::InstallTemplate(SmartScriptHolder const& e)
|
||||
return;
|
||||
if (mTemplate)
|
||||
{
|
||||
sLog->outErrorDb("SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript::InstallTemplate: Entry %d SourceType %u AI Template can not be set more then once, skipped.", e.entryOrGuid, e.GetScriptType());
|
||||
return;
|
||||
}
|
||||
mTemplate = (SMARTAI_TEMPLATE)e.action.installTtemplate.id;
|
||||
@@ -2227,7 +2227,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
{
|
||||
if (!trigger && !GetBaseObject())
|
||||
{
|
||||
sLog->outErrorDb("SMART_TARGET_CREATURE_GUID can not be used without invoker and without entry");
|
||||
sLog->outError(LOG_FILTER_SQL, "SMART_TARGET_CREATURE_GUID can not be used without invoker and without entry");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2250,7 +2250,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
{
|
||||
if (!trigger && !GetBaseObject())
|
||||
{
|
||||
sLog->outErrorDb("SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker and without entry");
|
||||
sLog->outError(LOG_FILTER_SQL, "SMART_TARGET_GAMEOBJECT_GUID can not be used without invoker and without entry");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2787,7 +2787,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
break;
|
||||
}
|
||||
default:
|
||||
sLog->outErrorDb("SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2984,9 +2984,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn
|
||||
mEvents.push_back((*i));//NOTE: 'world(0)' events still get processed in ANY instance mode
|
||||
}
|
||||
if (mEvents.empty() && obj)
|
||||
sLog->outErrorDb("SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Entry %u has events but no events added to list because of instance flags.", obj->GetEntry());
|
||||
if (mEvents.empty() && at)
|
||||
sLog->outErrorDb("SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: AreaTrigger %u has events but no events added to list because of instance flags. NOTE: triggers can not handle any instance flags.", at->id);
|
||||
}
|
||||
|
||||
void SmartScript::GetScript()
|
||||
@@ -3030,7 +3030,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry());
|
||||
break;
|
||||
default:
|
||||
sLog->outError("SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
|
||||
sLog->outError(LOG_FILTER_GENERAL, "SmartScript::OnInitialize: Unhandled TypeID !WARNING!");
|
||||
return;
|
||||
}
|
||||
} else if (at)
|
||||
@@ -3041,7 +3041,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at)
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
|
||||
sLog->outError(LOG_FILTER_GENERAL, "SmartScript::OnInitialize: !WARNING! Initialized objects are NULL.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class SmartScript
|
||||
smart = false;
|
||||
|
||||
if (!smart)
|
||||
sLog->outErrorDb("SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetEntry() : (me ? me->GetEntry() : 0));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetEntry() : (me ? me->GetEntry() : 0));
|
||||
|
||||
return smart;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ class SmartScript
|
||||
if (!go || go->GetAIName() != "SmartGameObjectAI")
|
||||
smart = false;
|
||||
if (!smart)
|
||||
sLog->outErrorDb("SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetEntry() : (go ? go->GetEntry() : 0));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetEntry() : (go ? go->GetEntry() : 0));
|
||||
|
||||
return smart;
|
||||
}
|
||||
@@ -254,7 +254,6 @@ class SmartScript
|
||||
mStoredEvents.erase(i);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,7 +267,6 @@ class SmartScript
|
||||
{
|
||||
return (*i);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
SmartScriptHolder s;
|
||||
|
||||
@@ -50,8 +50,8 @@ void SmartWaypointMgr::LoadFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 SmartAI Waypoint Paths. DB table `waypoints` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void SmartWaypointMgr::LoadFromDB()
|
||||
}
|
||||
|
||||
if (last_id != id)
|
||||
sLog->outErrorDb("SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
|
||||
|
||||
last_id++;
|
||||
(*waypoint_map[entry])[id] = new WayPoint(id, x, y, z);
|
||||
@@ -88,8 +88,8 @@ void SmartWaypointMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u SmartAI waypoint paths (total %u waypoints) in %u ms", count, total, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
SmartWaypointMgr::~SmartWaypointMgr()
|
||||
@@ -117,8 +117,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt8();
|
||||
if (source_type >= SMART_SCRIPT_TYPE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: invalid source_type (%u), skipped loading.", uint32(source_type));
|
||||
continue;
|
||||
}
|
||||
if (temp.entryOrGuid >= 0)
|
||||
@@ -145,7 +145,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
{
|
||||
if (!sObjectMgr->GetCreatureTemplate((uint32)temp.entryOrGuid))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -154,7 +154,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
{
|
||||
if (!sObjectMgr->GetGameObjectTemplate((uint32)temp.entryOrGuid))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -163,7 +163,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
{
|
||||
if (!sAreaTriggerStore.LookupEntry((uint32)temp.entryOrGuid))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry (%u) does not exist, skipped loading.", uint32(temp.entryOrGuid));
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -171,7 +171,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
case SMART_SCRIPT_TYPE_TIMED_ACTIONLIST:
|
||||
break;//nothing to check, really
|
||||
default:
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type %u", (uint32)source_type);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
{
|
||||
if (!sObjectMgr->GetCreatureData(uint32(abs(temp.entryOrGuid))))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr::LoadSmartAIFromDB: Creature guid (%u) does not exist, skipped loading.", uint32(abs(temp.entryOrGuid)));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -234,8 +234,8 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u SmartAI scripts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
@@ -249,7 +249,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
{
|
||||
if (e.target.unitDistance.creature && !sObjectMgr->GetCreatureTemplate(e.target.unitDistance.creature))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.unitDistance.creature);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -259,7 +259,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
{
|
||||
if (e.target.goDistance.entry && !sObjectMgr->GetGameObjectTemplate(e.target.goDistance.entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.target.goDistance.entry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -281,7 +281,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
{
|
||||
if (e.target.playerDistance.dist == 0)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has maxDist 0 as target_param1, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -305,7 +305,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
case SMART_TARGET_STORED:
|
||||
break;
|
||||
default:
|
||||
sLog->outErrorDb("SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -315,28 +315,28 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.event.type >= SMART_EVENT_END)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetEventType());
|
||||
return false;
|
||||
}
|
||||
// in SMART_SCRIPT_TYPE_TIMED_ACTIONLIST all event types are overriden by core
|
||||
if (e.GetScriptType() != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST && !(SmartAIEventMask[e.event.type][1] & SmartAITypeMask[e.GetScriptType()][1]))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d, event type %u can not be used for Script type %u", e.entryOrGuid, e.GetEventType(), e.GetScriptType());
|
||||
return false;
|
||||
}
|
||||
if (e.action.type <= 0 || e.action.type >= SMART_ACTION_END)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid action type (%u), skipped.", e.entryOrGuid, e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
if (e.event.event_phase_mask > SMART_EVENT_PHASE_ALL)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid phase mask (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_phase_mask);
|
||||
return false;
|
||||
}
|
||||
if (e.event.event_flags > SMART_EVENT_FLAGS_ALL)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: EntryOrGuid %d using event(%u) has invalid event flags (%u), skipped.", e.entryOrGuid, e.event_id, e.event.event_flags);
|
||||
return false;
|
||||
}
|
||||
if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST)
|
||||
@@ -377,12 +377,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.event.spellHit.spell);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
|
||||
return false;
|
||||
}
|
||||
if (e.event.spellHit.school && (e.event.spellHit.school & spellInfo->SchoolMask) != spellInfo->SchoolMask)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses Spell entry %u with invalid school mask, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.spellHit.spell);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -397,12 +397,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_EVENT_RESPAWN:
|
||||
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_MAP && !sMapStore.LookupEntry(e.event.respawn.map))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.map);
|
||||
return false;
|
||||
}
|
||||
if (e.event.respawn.type == SMART_SCRIPT_RESPAWN_CONDITION_AREA && !GetAreaEntryByAreaID(e.event.respawn.area))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Area entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.respawn.area);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -484,7 +484,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.event.movementInform.type > NULL_MOTION_TYPE)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -508,7 +508,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.link && e.link == e.event_id)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u, Event %u, Link Event is linking self (infinite loop), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -540,7 +540,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.event.doAction.eventId > EVENT_CHARGE)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid event id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.doAction.eventId);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid event id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.doAction.eventId);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -580,7 +580,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_EVENT_ON_SPELLCLICK:
|
||||
break;
|
||||
default:
|
||||
sLog->outErrorDb("SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled event_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -590,7 +590,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_SET_FACTION:
|
||||
if (e.action.faction.factionID && !sFactionTemplateStore.LookupEntry(e.action.faction.factionID))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Faction %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.faction.factionID);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -600,7 +600,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.action.morphOrMount.creature > 0 && !sObjectMgr->GetCreatureTemplate(e.action.morphOrMount.creature))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.creature);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -608,12 +608,12 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.action.morphOrMount.creature)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has ModelID set with also set CreatureId, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
else if (!sCreatureDisplayInfoStore.LookupEntry(e.action.morphOrMount.model))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Model id %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.morphOrMount.model);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -624,7 +624,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
return false;
|
||||
if (e.action.sound.range > TEXT_RANGE_WORLD)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -642,7 +642,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (!sTaxiPathStore.LookupEntry(e.action.taxi.id))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Taxi path ID %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.taxi.id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -678,13 +678,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (!qid->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u SpecialFlags for Quest entry %u does not include FLAGS_EXPLORATION_OR_EVENT(2), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.quest.quest);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -695,24 +695,22 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
if (!IsSpellValid(e, e.action.castCreatureOrGO.spell))
|
||||
return false;
|
||||
break;
|
||||
|
||||
|
||||
case SMART_ACTION_SET_EVENT_PHASE:
|
||||
if (e.action.setEventPhase.phase >= SMART_EVENT_PHASE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set phase %u. Phase mask cannot be used past phase %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setEventPhase.phase, SMART_EVENT_PHASE_MAX-1);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_ACTION_INC_EVENT_PHASE:
|
||||
if (!e.action.incEventPhase.inc && !e.action.incEventPhase.dec)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is incrementing phase by 0, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
else if (e.action.incEventPhase.inc > SMART_EVENT_PHASE_MAX || e.action.incEventPhase.dec > SMART_EVENT_PHASE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to increment phase by too large value, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -736,7 +734,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
e.action.randomPhase.phase5 >= SMART_EVENT_PHASE_MAX ||
|
||||
e.action.randomPhase.phase6 >= SMART_EVENT_PHASE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -746,7 +744,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
if (e.action.randomPhaseRange.phaseMin >= SMART_EVENT_PHASE_MAX ||
|
||||
e.action.randomPhaseRange.phaseMax >= SMART_EVENT_PHASE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u attempts to set invalid phase, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
if (!IsMinMaxValid(e, e.action.randomPhaseRange.phaseMin, e.action.randomPhaseRange.phaseMax))
|
||||
@@ -758,7 +756,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
return false;
|
||||
if (e.action.summonCreature.type < TEMPSUMMON_TIMED_OR_DEAD_DESPAWN || e.action.summonCreature.type > TEMPSUMMON_MANUAL_DESPAWN)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect TempSummonType %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.summonCreature.type);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -773,7 +771,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_SET_SHEATH:
|
||||
if (e.action.setSheath.sheath && e.action.setSheath.sheath >= MAX_SHEATH_STATE)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses incorrect Sheath state %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setSheath.sheath);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -781,7 +779,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (e.action.react.state > REACT_AGGRESSIVE)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.react.state);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -801,14 +799,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_TELEPORT:
|
||||
if (!sMapStore.LookupEntry(e.action.teleport.mapID))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Map entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.teleport.mapID);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_ACTION_INSTALL_AI_TEMPLATE:
|
||||
if (e.action.installTtemplate.id >= SMARTAI_TEMPLATE_END)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses non-existent AI template id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.installTtemplate.id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -820,14 +818,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
{
|
||||
if (!sSmartWaypointMgr->GetPath(e.action.wpStart.pathID))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses non-existent WaypointPath id %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.pathID);
|
||||
return false;
|
||||
}
|
||||
if (e.action.wpStart.quest && !IsQuestValid(e, e.action.wpStart.quest))
|
||||
return false;
|
||||
if (e.action.wpStart.reactState > REACT_AGGRESSIVE)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Creature %d Event %u Action %u uses invalid React State %u, skipped.", e.entryOrGuid, e.event_id, e.GetActionType(), e.action.wpStart.reactState);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -908,7 +906,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_ACTION_SEND_TARGET_TO_TARGET:
|
||||
break;
|
||||
default:
|
||||
sLog->outErrorDb("SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Not handled action_type(%u), event_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -926,7 +924,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id)
|
||||
CreatureData const* data = sObjectMgr->GetCreatureData(entry);
|
||||
if (!data)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Creature guid %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -936,7 +934,7 @@ bool SmartAIMgr::IsTextValid(SmartScriptHolder const& e, uint32 id)
|
||||
error = true;
|
||||
if (error)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u using non-existent Text id %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.source_type, e.GetActionType(), id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -535,7 +535,6 @@ struct SmartAction
|
||||
|
||||
struct
|
||||
{
|
||||
|
||||
uint32 emote1;
|
||||
uint32 emote2;
|
||||
uint32 emote3;
|
||||
@@ -828,11 +827,13 @@ struct SmartAction
|
||||
struct
|
||||
{
|
||||
uint32 byte1;
|
||||
uint32 type;
|
||||
} setunitByte;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 byte1;
|
||||
uint32 type;
|
||||
} delunitByte;
|
||||
|
||||
struct
|
||||
@@ -1244,7 +1245,6 @@ struct SmartScriptHolder
|
||||
bool active;
|
||||
bool runOnce;
|
||||
bool enableTimed;
|
||||
|
||||
};
|
||||
|
||||
typedef UNORDERED_MAP<uint32, WayPoint*> WPPath;
|
||||
@@ -1311,7 +1311,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (target < SMART_TARGET_NONE || target >= SMART_TARGET_END)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Target type %d, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), target);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1321,7 +1321,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (max < min)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses min/max params wrong (%u/%u), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), min, max);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1331,7 +1331,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (pct < -100 || pct > 100)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invalid Percent set (%d), skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), pct);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1341,7 +1341,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!data)
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u Parameter can not be NULL, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1351,7 +1351,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sObjectMgr->GetCreatureTemplate(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Creature entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1361,7 +1361,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sObjectMgr->GetQuestTemplate(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Quest entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1371,7 +1371,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sObjectMgr->GetGameObjectTemplate(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent GameObject entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1381,7 +1381,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Spell entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1391,7 +1391,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sItemStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Item entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1401,7 +1401,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sEmotesTextStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Text Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1411,7 +1411,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sEmotesStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Emote entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1421,7 +1421,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sAreaTriggerStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent AreaTrigger entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1431,7 +1431,7 @@ class SmartAIMgr
|
||||
{
|
||||
if (!sSoundEntriesStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Sound entry %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), entry);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Executable → Regular
+66
-67
@@ -76,7 +76,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
{
|
||||
if (dataType >= MAX_ACHIEVEMENT_CRITERIA_DATA_TYPE)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` for criteria (Entry: %u) has wrong data type (%u), ignored.", criteria->ID, dataType);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` for criteria (Entry: %u) has wrong data type (%u), ignored.", criteria->ID, dataType);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
default:
|
||||
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->requiredType);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` has data for non-supported criteria type (Entry: %u Type: %u), ignored.", criteria->ID, criteria->requiredType);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -123,7 +123,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_CREATURE:
|
||||
if (!creature.id || !sObjectMgr->GetCreatureTemplate(creature.id))
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_CREATURE (%u) has non-existing creature id in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, creature.id);
|
||||
return false;
|
||||
}
|
||||
@@ -131,19 +131,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE:
|
||||
if (!classRace.class_id && !classRace.race_id)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType);
|
||||
return false;
|
||||
}
|
||||
if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, classRace.class_id);
|
||||
return false;
|
||||
}
|
||||
if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, classRace.race_id);
|
||||
return false;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_LESS_HEALTH:
|
||||
if (health.percent < 1 || health.percent > 100)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) has wrong percent value in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_PLAYER_LESS_HEALTH (%u) has wrong percent value in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, health.percent);
|
||||
return false;
|
||||
}
|
||||
@@ -162,19 +162,19 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(aura.spell_id);
|
||||
if (!spellEntry)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell id in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell id in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id);
|
||||
return false;
|
||||
}
|
||||
if (aura.effect_idx >= 3)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell effect index in value2 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has wrong spell effect index in value2 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.effect_idx);
|
||||
return false;
|
||||
}
|
||||
if (!spellEntry->Effects[aura.effect_idx].ApplyAuraName)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has non-aura spell effect (ID: %u Effect: %u), ignores.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) has non-aura spell effect (ID: %u Effect: %u), ignores.",
|
||||
criteria->ID, criteria->requiredType, (dataType == ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA?"ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA":"ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA"), dataType, aura.spell_id, aura.effect_idx);
|
||||
return false;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL:
|
||||
if (level.minlevel > STRONG_MAX_LEVEL)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) has wrong minlevel in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_LEVEL (%u) has wrong minlevel in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, level.minlevel);
|
||||
return false;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER:
|
||||
if (gender.gender > GENDER_NONE)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) has wrong gender in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_GENDER (%u) has wrong gender in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, gender.gender);
|
||||
return false;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT:
|
||||
if (!ScriptId)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have ScriptName set, ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT (%u) does not have ScriptName set, ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType);
|
||||
return false;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT:
|
||||
if (map_players.maxcount <= 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) has wrong max players count in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_MAP_PLAYER_COUNT (%u) has wrong max players count in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, map_players.maxcount);
|
||||
return false;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM:
|
||||
if (team.team != ALLIANCE && team.team != HORDE)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) has unknown team in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_TEAM (%u) has unknown team in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, team.team);
|
||||
return false;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK:
|
||||
if (drunk.state >= MAX_DRUNKEN)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) has unknown drunken state in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_DRUNK (%u) has unknown drunken state in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, drunk.state);
|
||||
return false;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY:
|
||||
if (!sHolidaysStore.LookupEntry(holiday.id))
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) has unknown holiday in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_HOLIDAY (%u) has unknown holiday in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, holiday.id);
|
||||
return false;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_EQUIPED_ITEM:
|
||||
if (equipped_item.item_quality >= MAX_ITEM_QUALITY)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) has unknown quality state in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_requirement` (Entry: %u Type: %u) for requirement ACHIEVEMENT_CRITERIA_REQUIRE_S_EQUIPED_ITEM (%u) has unknown quality state in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, equipped_item.item_quality);
|
||||
return false;
|
||||
}
|
||||
@@ -249,25 +249,25 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE:
|
||||
if (!classRace.class_id && !classRace.race_id)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) must not have 0 in either value field, ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType);
|
||||
return false;
|
||||
}
|
||||
if (classRace.class_id && ((1 << (classRace.class_id-1)) & CLASSMASK_ALL_PLAYABLE) == 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing class in value1 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, classRace.class_id);
|
||||
return false;
|
||||
}
|
||||
if (classRace.race_id && ((1 << (classRace.race_id-1)) & RACEMASK_ALL_PLAYABLE) == 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_S_PLAYER_CLASS_RACE (%u) has non-existing race in value2 (%u), ignored.",
|
||||
criteria->ID, criteria->requiredType, dataType, classRace.race_id);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` (Entry: %u Type: %u) has data for non-supported data type (%u), ignored.", criteria->ID, criteria->requiredType, dataType);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -342,14 +342,14 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
|
||||
Map* map = source->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
{
|
||||
sLog->outErrorDb("Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for non-dungeon/non-raid map %u",
|
||||
sLog->outError(LOG_FILTER_SQL, "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for non-dungeon/non-raid map %u",
|
||||
ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT, criteria_id, map->GetId());
|
||||
return false;
|
||||
}
|
||||
InstanceScript* instance = ((InstanceMap*)map)->GetInstanceScript();
|
||||
if (!instance)
|
||||
{
|
||||
sLog->outErrorDb("Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for map %u but map does not have a instance script",
|
||||
sLog->outError(LOG_FILTER_SQL, "Achievement system call ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT (%u) for achievement criteria %u for map %u but map does not have a instance script",
|
||||
ACHIEVEMENT_CRITERIA_DATA_INSTANCE_SCRIPT, criteria_id, map->GetId());
|
||||
return false;
|
||||
}
|
||||
@@ -734,7 +734,7 @@ void AchievementMgr<Player>::LoadFromDB(PreparedQueryResult achievementResult, P
|
||||
if (!criteria)
|
||||
{
|
||||
// we will remove not existed criteria for all characters
|
||||
sLog->outError("Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id);
|
||||
sLog->outError(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement criteria %u data removed from table `character_achievement_progress`.", id);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA);
|
||||
stmt->setUInt16(0, uint16(id));
|
||||
@@ -795,7 +795,7 @@ void AchievementMgr<Guild>::LoadFromDB(PreparedQueryResult achievementResult, Pr
|
||||
if (!criteria)
|
||||
{
|
||||
// we will remove not existed criteria for all guilds
|
||||
sLog->outError("Non-existing achievement criteria %u data removed from table `guild_achievement_progress`.", id);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Non-existing achievement criteria %u data removed from table `guild_achievement_progress`.", id);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEV_PROGRESS_CRITERIA);
|
||||
stmt->setUInt16(0, uint16(id));
|
||||
@@ -2239,7 +2239,7 @@ void AchievementMgr<T>::RemoveTimedAchievement(AchievementCriteriaTimedTypes typ
|
||||
template<class T>
|
||||
void AchievementMgr<T>::CompletedAchievement(AchievementEntry const* achievement, Player* referencePlayer)
|
||||
{
|
||||
sLog->outDetail("AchievementMgr::CompletedAchievement(%u)", achievement->ID);
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::CompletedAchievement(%u)", achievement->ID);
|
||||
|
||||
// disable for gamemasters with GM-mode enabled
|
||||
if (_owner->isGameMaster())
|
||||
@@ -2318,7 +2318,7 @@ void AchievementMgr<T>::CompletedAchievement(AchievementEntry const* achievement
|
||||
template<>
|
||||
void AchievementMgr<Guild>::CompletedAchievement(AchievementEntry const* achievement, Player* referencePlayer)
|
||||
{
|
||||
sLog->outDetail("AchievementMgr<Guild>::CompletedAchievement(%u)", achievement->ID);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "AchievementMgr<Guild>::CompletedAchievement(%u)", achievement->ID);
|
||||
|
||||
if (achievement->flags & ACHIEVEMENT_FLAG_COUNTER || HasAchieved(achievement->ID))
|
||||
return;
|
||||
@@ -2800,8 +2800,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
||||
|
||||
if (sAchievementCriteriaStore.GetNumRows() == 0)
|
||||
{
|
||||
sLog->outErrorDb(">> Loaded 0 achievement criteria.");
|
||||
sLog->outString();
|
||||
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement criteria.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2826,8 +2826,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
||||
m_AchievementCriteriasByTimedType[criteria->timedCriteriaStartType].push_back(criteria);
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded %u achievement criteria and %u guild achievement crieteria in %u ms", criterias, guildCriterias, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement criteria and %u guild achievement crieteria in %u ms", criterias, guildCriterias, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::LoadAchievementReferenceList()
|
||||
@@ -2836,8 +2835,8 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
|
||||
|
||||
if (sAchievementStore.GetNumRows() == 0)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 achievement references.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement references.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2857,8 +2856,8 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
|
||||
if (AchievementEntry const* achievement = sAchievementStore.LookupEntry(4539))
|
||||
const_cast<AchievementEntry*>(achievement)->mapID = 631; // Correct map requirement (currently has Ulduar)
|
||||
|
||||
sLog->outString(">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement references in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::LoadAchievementCriteriaData()
|
||||
@@ -2871,8 +2870,8 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 additional achievement criteria data. DB table `achievement_criteria_data` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2887,7 +2886,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
|
||||
|
||||
if (!criteria)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` has data for non-existing criteria (Entry: %u), ignore.", criteria_id);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` has data for non-existing criteria (Entry: %u), ignore.", criteria_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2897,7 +2896,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
|
||||
if (strcmp(scriptName, "")) // not empty
|
||||
{
|
||||
if (dataType != ACHIEVEMENT_CRITERIA_DATA_TYPE_SCRIPT)
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` has ScriptName set for non-scripted data type (Entry: %u, type %u), useless data.", criteria_id, dataType);
|
||||
else
|
||||
scriptId = sObjectMgr->GetScriptId(scriptName);
|
||||
}
|
||||
@@ -3000,11 +2999,11 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData()
|
||||
}
|
||||
|
||||
if (!GetCriteriaDataSet(criteria) && !DisableMgr::IsDisabledFor(DISABLE_TYPE_ACHIEVEMENT_CRITERIA, entryId, NULL))
|
||||
sLog->outErrorDb("Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_criteria_data` does not have expected data for criteria (Entry: %u Type: %u) for achievement %u.", criteria->ID, criteria->requiredType, criteria->referredAchievement);
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u additional achievement criteria data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
@@ -3015,8 +3014,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 completed achievements. DB table `character_achievement` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3029,7 +3028,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
if (!achievement)
|
||||
{
|
||||
// Remove non existent achievements from all characters
|
||||
sLog->outError("Non-existing achievement %u data removed from table `character_achievement`.", achievementId);
|
||||
sLog->outError(LOG_FILTER_ACHIEVEMENTSYS, "Non-existing achievement %u data removed from table `character_achievement`.", achievementId);
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INVALID_ACHIEVMENT);
|
||||
|
||||
@@ -3043,8 +3042,8 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
|
||||
m_allCompletedAchievements.insert(achievementId);
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu completed achievements in %u ms", (unsigned long)m_allCompletedAchievements.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::LoadRewards()
|
||||
@@ -3058,8 +3057,8 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outErrorDb(">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 achievement rewards. DB table `achievement_reward` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3072,7 +3071,7 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
const AchievementEntry* pAchievement = sAchievementStore.LookupEntry(entry);
|
||||
if (!pAchievement)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_reward` has wrong achievement (Entry: %u), ignore", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` has wrong achievement (Entry: %u), ignore", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3087,19 +3086,19 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
// must be title or mail at least
|
||||
if (!reward.titleId[0] && !reward.titleId[1] && !reward.sender)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) not have title or item reward data, ignore.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) not have title or item reward data, ignore.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pAchievement->requiredFaction == ACHIEVEMENT_FACTION_ANY && ((reward.titleId[0] == 0) != (reward.titleId[1] == 0)))
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has title (A: %u H: %u) for only one team.", entry, reward.titleId[0], reward.titleId[1]);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has title (A: %u H: %u) for only one team.", entry, reward.titleId[0], reward.titleId[1]);
|
||||
|
||||
if (reward.titleId[0])
|
||||
{
|
||||
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(reward.titleId[0]);
|
||||
if (!titleEntry)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_A`, set to 0", entry, reward.titleId[0]);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_A`, set to 0", entry, reward.titleId[0]);
|
||||
reward.titleId[0] = 0;
|
||||
}
|
||||
}
|
||||
@@ -3109,7 +3108,7 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(reward.titleId[1]);
|
||||
if (!titleEntry)
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_H`, set to 0", entry, reward.titleId[1]);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid title id (%u) in `title_H`, set to 0", entry, reward.titleId[1]);
|
||||
reward.titleId[1] = 0;
|
||||
}
|
||||
}
|
||||
@@ -3119,27 +3118,27 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
{
|
||||
if (!sObjectMgr->GetCreatureTemplate(reward.sender))
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid creature entry %u as sender, mail reward skipped.", entry, reward.sender);
|
||||
reward.sender = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (reward.itemId)
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) does not have sender data but has item reward, item will not be rewarded.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has item reward, item will not be rewarded.", entry);
|
||||
|
||||
if (!reward.subject.empty())
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) does not have sender data but has mail subject.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has mail subject.", entry);
|
||||
|
||||
if (!reward.text.empty())
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) does not have sender data but has mail text.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) does not have sender data but has mail text.", entry);
|
||||
}
|
||||
|
||||
if (reward.itemId)
|
||||
{
|
||||
if (!sObjectMgr->GetItemTemplate(reward.itemId))
|
||||
{
|
||||
sLog->outErrorDb("Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `achievement_reward` (Entry: %u) has invalid item id %u, reward mail will not contain item.", entry, reward.itemId);
|
||||
reward.itemId = 0;
|
||||
}
|
||||
}
|
||||
@@ -3150,8 +3149,8 @@ void AchievementGlobalMgr::LoadRewards()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void AchievementGlobalMgr::LoadRewardLocales()
|
||||
@@ -3166,8 +3165,8 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded 0 achievement reward locale strings. DB table `locales_achievement_reward` is empty");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3179,7 +3178,7 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
||||
|
||||
if (m_achievementRewards.find(entry) == m_achievementRewards.end())
|
||||
{
|
||||
sLog->outErrorDb("Table `locales_achievement_reward` (Entry: %u) has locale strings for non-existing achievement reward.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `locales_achievement_reward` (Entry: %u) has locale strings for non-existing achievement reward.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3193,6 +3192,6 @@ void AchievementGlobalMgr::LoadRewardLocales()
|
||||
}
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_ACHIEVEMENTSYS, ">> Loaded %lu achievement reward locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
@@ -43,8 +43,8 @@ void LoadFromDB()
|
||||
QueryResult result = CharacterDatabase.Query("SELECT name, crc FROM addons");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 known addons. DB table `addons` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 known addons. DB table `addons` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ void LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void SaveAddon(AddonInfo const& addon)
|
||||
|
||||
@@ -263,8 +263,8 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 auction items. DB table `auctionhouse` or `item_instance` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,6 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint32 item_guid = fields[11].GetUInt32();
|
||||
@@ -281,7 +280,7 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item_template);
|
||||
if (!proto)
|
||||
{
|
||||
sLog->outError("AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "AuctionHouseMgr::LoadAuctionItems: Unknown item (GUID: %u id: #%u) in auction, skipped.", item_guid, item_template);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -297,8 +296,8 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u auction items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void AuctionHouseMgr::LoadAuctions()
|
||||
@@ -310,8 +309,8 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 auctions. DB table `auctionhouse` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -336,8 +335,8 @@ void AuctionHouseMgr::LoadAuctions()
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
sLog->outString(">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u auctions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void AuctionHouseMgr::AddAItem(Item* it)
|
||||
@@ -605,7 +604,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
|
||||
Item* item = sAuctionMgr->GetAItem(item_guidlow);
|
||||
if (!item)
|
||||
{
|
||||
sLog->outError("AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, item_guidlow);
|
||||
return false;
|
||||
}
|
||||
data << uint32(Id);
|
||||
@@ -688,14 +687,14 @@ bool AuctionEntry::LoadFromDB(Field* fields)
|
||||
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer);
|
||||
if (!auctioneerData)
|
||||
{
|
||||
sLog->outError("Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id);
|
||||
if (!auctioneerInfo)
|
||||
{
|
||||
sLog->outError("Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -703,7 +702,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
|
||||
auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(factionTemplateId);
|
||||
if (!auctionHouseEntry)
|
||||
{
|
||||
sLog->outError("Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -711,7 +710,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
|
||||
// and item_template in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
|
||||
if (!sAuctionMgr->GetAItem(item_guidlow))
|
||||
{
|
||||
sLog->outError("Auction %u has not a existing item : %u", Id, item_guidlow);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Auction %u has not a existing item : %u", Id, item_guidlow);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -735,8 +734,8 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup()
|
||||
|
||||
if (!expAuctions)
|
||||
{
|
||||
sLog->outString(">> No expired auctions to delete");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> No expired auctions to delete");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -783,8 +782,8 @@ void AuctionHouseMgr::DeleteExpiredAuctionsAtStartup()
|
||||
|
||||
} while (expAuctions->NextRow());
|
||||
|
||||
sLog->outString(">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Deleted %u expired auctions in %u ms", expirecount, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -810,14 +809,14 @@ bool AuctionEntry::LoadFromFieldList(Field* fields)
|
||||
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer);
|
||||
if (!auctioneerData)
|
||||
{
|
||||
sLog->outError("AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id);
|
||||
if (!auctioneerInfo)
|
||||
{
|
||||
sLog->outError("AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -826,7 +825,7 @@ bool AuctionEntry::LoadFromFieldList(Field* fields)
|
||||
|
||||
if (!auctionHouseEntry)
|
||||
{
|
||||
sLog->outError("AuctionEntry::LoadFromFieldList() - Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "AuctionEntry::LoadFromFieldList() - Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint8 type, std::string teamName, uin
|
||||
// Add captain as member
|
||||
AddMember(CaptainGuid);
|
||||
|
||||
sLog->outArena("New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid);
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "New ArenaTeam created [Id: %u] [Type: %u] [Captain low GUID: %u]", GetId(), GetType(), captainLowGuid);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
|
||||
// Check if player is already in a similar arena team
|
||||
if ((player && player->GetArenaTeamId(GetSlot())) || Player::GetArenaTeamIdFromDB(playerGuid, GetType()) != 0)
|
||||
{
|
||||
sLog->outError("Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
|
||||
sLog->outDebug(LOG_FILTER_ARENAS, "Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ bool ArenaTeam::AddMember(uint64 playerGuid)
|
||||
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
|
||||
}
|
||||
|
||||
sLog->outArena("Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId());
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -250,8 +250,8 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
// Delete member if character information is missing
|
||||
if (newMember.Name.empty())
|
||||
{
|
||||
sLog->outErrorDb("ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid));
|
||||
this->DelMember(newMember.Guid, true);
|
||||
sLog->outError(LOG_FILTER_SQL, "ArenaTeam %u has member with empty name - probably player %u doesn't exist, deleting him from memberlist!", arenaTeamId, GUID_LOPART(newMember.Guid));
|
||||
DelMember(newMember.Guid, true);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
if (Empty() || !captainPresentInTeam)
|
||||
{
|
||||
// Arena team is empty or captain is not in team, delete from db
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
|
||||
sLog->outDebug(LOG_FILTER_ARENAS, "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ void ArenaTeam::SetCaptain(uint64 guid)
|
||||
newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
|
||||
char const* oldCaptainName = oldCaptain ? oldCaptain->GetName() : "";
|
||||
uint32 oldCaptainLowGuid = oldCaptain ? oldCaptain->GetGUIDLow() : 0;
|
||||
sLog->outArena("Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].",
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] promoted player: %s [GUID: %u] to leader of arena team [Id: %u] [Type: %u].",
|
||||
oldCaptainName, oldCaptainLowGuid, newCaptain->GetName(), newCaptain->GetGUIDLow(), GetId(), GetType());
|
||||
}
|
||||
}
|
||||
@@ -321,7 +321,7 @@ void ArenaTeam::DelMember(uint64 guid, bool cleanDb)
|
||||
// delete all info regarding this team
|
||||
for (uint32 i = 0; i < ARENA_TEAM_END; ++i)
|
||||
player->SetArenaTeamInfoField(GetSlot(), ArenaTeamInfoType(i), 0);
|
||||
sLog->outArena("Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] left arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
}
|
||||
|
||||
// Only used for single member deletion, for arena team disband we use a single query for more efficiency
|
||||
@@ -346,7 +346,7 @@ void ArenaTeam::Disband(WorldSession* session)
|
||||
BroadcastEvent(ERR_ARENA_TEAM_DISBANDED_S, 0, 2, session->GetPlayerName(), GetName(), "");
|
||||
|
||||
if (Player* player = session->GetPlayer())
|
||||
sLog->outArena("Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
sLog->outInfo(LOG_FILTER_ARENAS, "Player: %s [GUID: %u] disbanded arena team type: %u [Id: %u].", player->GetName(), player->GetGUIDLow(), GetType(), GetId());
|
||||
}
|
||||
|
||||
// Update database
|
||||
@@ -507,7 +507,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun
|
||||
data << str1 << str2 << str3;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
|
||||
sLog->outError(LOG_FILTER_ARENAS, "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
sLog->outError("FATAL: Unknown arena team type %u for some arena team", type);
|
||||
sLog->outError(LOG_FILTER_ARENAS, "FATAL: Unknown arena team type %u for some arena team", type);
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ uint32 ArenaTeamMgr::GenerateArenaTeamId()
|
||||
{
|
||||
if (NextArenaTeamId >= 0xFFFFFFFE)
|
||||
{
|
||||
sLog->outError("Arena team ids overflow!! Can't continue, shutting down server. ");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Arena team ids overflow!! Can't continue, shutting down server. ");
|
||||
World::StopNow(ERROR_EXIT_CODE);
|
||||
}
|
||||
return NextArenaTeamId++;
|
||||
@@ -101,8 +101,8 @@ void ArenaTeamMgr::LoadArenaTeams()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 arena teams. DB table `arena_team` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 arena teams. DB table `arena_team` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -132,8 +132,8 @@ void ArenaTeamMgr::LoadArenaTeams()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void ArenaTeamMgr::DistributeArenaPoints()
|
||||
|
||||
@@ -442,7 +442,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
|
||||
if (!FindBgMap())
|
||||
{
|
||||
sLog->outError("Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
|
||||
EndNow();
|
||||
return;
|
||||
}
|
||||
@@ -552,7 +552,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
|
||||
if (dist >= maxDist)
|
||||
{
|
||||
sLog->outError("BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", plr->GetName(), GetMapId());
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", plr->GetName(), GetMapId());
|
||||
plr->TeleportTo(GetMapId(), x, y, z, o);
|
||||
}
|
||||
}
|
||||
@@ -590,7 +590,7 @@ inline Player* Battleground::_GetPlayer(uint64 guid, bool offlineRemove, const c
|
||||
{
|
||||
player = ObjectAccessor::FindPlayer(guid);
|
||||
if (!player)
|
||||
sLog->outError("Battleground::%s: player (GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::%s: player (GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
context, GUID_LOPART(guid), m_MapId, m_InstanceID);
|
||||
}
|
||||
return player;
|
||||
@@ -773,17 +773,17 @@ void Battleground::EndBattleground(uint32 winner)
|
||||
winner_matchmaker_rating = GetArenaMatchmakerRating(winner);
|
||||
winner_matchmaker_change = winner_arena_team->WonAgainst(winner_matchmaker_rating, loser_matchmaker_rating, winner_change);
|
||||
loser_matchmaker_change = loser_arena_team->LostAgainst(loser_matchmaker_rating, winner_matchmaker_rating, loser_change);
|
||||
sLog->outArena("match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winner_team_rating, winner_change, winner_matchmaker_rating,
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "match Type: %u --- Winner: old rating: %u, rating gain: %d, old MMR: %u, MMR gain: %d --- Loser: old rating: %u, rating loss: %d, old MMR: %u, MMR loss: %d ---", m_ArenaType, winner_team_rating, winner_change, winner_matchmaker_rating,
|
||||
winner_matchmaker_change, loser_team_rating, loser_change, loser_matchmaker_rating, loser_matchmaker_change);
|
||||
SetArenaMatchmakerRating(winner, winner_matchmaker_rating + winner_matchmaker_change);
|
||||
SetArenaMatchmakerRating(GetOtherTeam(winner), loser_matchmaker_rating + loser_matchmaker_change);
|
||||
SetArenaTeamRatingChangeForTeam(winner, winner_change);
|
||||
SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change);
|
||||
sLog->outArena("Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE], winner_arena_team->GetId(), winner_change, loser_change);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Arena match Type: %u for Team1Id: %u - Team2Id: %u ended. WinnerTeamId: %u. Winner rating: +%d, Loser rating: %d", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE], winner_arena_team->GetId(), winner_change, loser_change);
|
||||
if (sWorld->getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO))
|
||||
for (Battleground::BattlegroundScoreMap::const_iterator itr = GetPlayerScoresBegin(); itr != GetPlayerScoresEnd(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(itr->first))
|
||||
sLog->outArena("Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows", m_ArenaType, player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Statistics match Type: %u for %s (GUID: " UI64FMTD ", Team: %d, IP: %s): %u damage, %u healing, %u killing blows", m_ArenaType, player->GetName(), itr->first, player->GetArenaTeamId(m_ArenaType == 5 ? 2 : m_ArenaType == 3), player->GetSession()->GetRemoteAddress().c_str(), itr->second->DamageDone, itr->second->HealingDone, itr->second->KillingBlows);
|
||||
}
|
||||
// Deduct 16 points from each teams arena-rating if there are no winners after 45+2 minutes
|
||||
else
|
||||
@@ -1072,7 +1072,7 @@ void Battleground::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
|
||||
if (Transport)
|
||||
player->TeleportToBGEntryPoint();
|
||||
|
||||
sLog->outDetail("BATTLEGROUND: Removed player %s from Battleground.", player->GetName());
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Removed player %s from Battleground.", player->GetName());
|
||||
}
|
||||
|
||||
//battleground object will be deleted next Battleground::Update() call
|
||||
@@ -1092,7 +1092,7 @@ void Battleground::Reset()
|
||||
m_Events = 0;
|
||||
|
||||
if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
|
||||
sLog->outError("Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!",
|
||||
m_InvitedAlliance, m_InvitedHorde, m_MapId, m_InstanceID);
|
||||
|
||||
m_InvitedAlliance = 0;
|
||||
@@ -1120,7 +1120,7 @@ void Battleground::StartBattleground()
|
||||
// and it doesn't matter if we call StartBattleground() more times, because m_Battlegrounds is a map and instance id never changes
|
||||
sBattlegroundMgr->AddBattleground(GetInstanceID(), GetTypeID(), this);
|
||||
if (m_IsRated)
|
||||
sLog->outArena("Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE]);
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Arena match type: %u for Team1Id: %u - Team2Id: %u started.", m_ArenaType, m_ArenaTeamIds[BG_TEAM_ALLIANCE], m_ArenaTeamIds[BG_TEAM_HORDE]);
|
||||
}
|
||||
|
||||
void Battleground::AddPlayer(Player* player)
|
||||
@@ -1211,7 +1211,7 @@ void Battleground::AddPlayer(Player* player)
|
||||
AddOrSetPlayerToCorrectBgGroup(player, team);
|
||||
|
||||
// Log
|
||||
sLog->outDetail("BATTLEGROUND: Player %s joined the battle.", player->GetName());
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Player %s joined the battle.", player->GetName());
|
||||
}
|
||||
|
||||
// this method adds player to his team's bg group, or sets his correct group if player is already in bg group
|
||||
@@ -1409,7 +1409,7 @@ void Battleground::UpdatePlayerScore(Player* Source, uint32 type, uint32 value,
|
||||
itr->second->HealingDone += value;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
|
||||
type, m_MapId, m_InstanceID);
|
||||
break;
|
||||
}
|
||||
@@ -1458,9 +1458,9 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, GetBgMap(),
|
||||
PHASEMASK_NORMAL, x, y, z, o, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY))
|
||||
{
|
||||
sLog->outErrorDb("Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_SQL, "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
sLog->outError("Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
delete go;
|
||||
return false;
|
||||
@@ -1511,7 +1511,7 @@ void Battleground::DoorClose(uint32 type)
|
||||
}
|
||||
}
|
||||
else
|
||||
sLog->outError("Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DoorClose: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
|
||||
}
|
||||
|
||||
@@ -1523,7 +1523,7 @@ void Battleground::DoorOpen(uint32 type)
|
||||
obj->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
else
|
||||
sLog->outError("Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DoorOpen: door gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
|
||||
}
|
||||
|
||||
@@ -1531,7 +1531,7 @@ GameObject* Battleground::GetBGObject(uint32 type)
|
||||
{
|
||||
GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]);
|
||||
if (!obj)
|
||||
sLog->outError("Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
|
||||
return obj;
|
||||
}
|
||||
@@ -1540,7 +1540,7 @@ Creature* Battleground::GetBGCreature(uint32 type)
|
||||
{
|
||||
Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]);
|
||||
if (!creature)
|
||||
sLog->outError("Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
|
||||
return creature;
|
||||
}
|
||||
@@ -1573,7 +1573,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
|
||||
Creature* creature = new Creature;
|
||||
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, 0, teamval, x, y, z, o))
|
||||
{
|
||||
sLog->outError("Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
delete creature;
|
||||
return NULL;
|
||||
@@ -1584,7 +1584,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
|
||||
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (!cinfo)
|
||||
{
|
||||
sLog->outError("Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
delete creature;
|
||||
return NULL;
|
||||
@@ -1619,7 +1619,7 @@ bool Battleground::DelCreature(uint32 type)
|
||||
return true;
|
||||
}
|
||||
|
||||
sLog->outError("Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DelCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
|
||||
BgCreatures[type] = 0;
|
||||
return false;
|
||||
@@ -1637,7 +1637,7 @@ bool Battleground::DelObject(uint32 type)
|
||||
BgObjects[type] = 0;
|
||||
return true;
|
||||
}
|
||||
sLog->outError("Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::DelObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
|
||||
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
|
||||
BgObjects[type] = 0;
|
||||
return false;
|
||||
@@ -1664,7 +1664,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
|
||||
//creature->CastSpell(creature, SPELL_SPIRIT_HEAL_CHANNEL, true);
|
||||
return true;
|
||||
}
|
||||
sLog->outError("Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
type, entry, m_MapId, m_InstanceID);
|
||||
EndNow();
|
||||
return false;
|
||||
@@ -1765,7 +1765,7 @@ void Battleground::HandleTriggerBuff(uint64 go_guid)
|
||||
index--;
|
||||
if (index < 0)
|
||||
{
|
||||
sLog->outError("Battleground::HandleTriggerBuff: cannot find buff gameobject (GUID: %u, entry: %u, type: %u) in internal data for BG (map: %u, instance id: %u)!",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::HandleTriggerBuff: cannot find buff gameobject (GUID: %u, entry: %u, type: %u) in internal data for BG (map: %u, instance id: %u)!",
|
||||
GUID_LOPART(go_guid), obj->GetEntry(), obj->GetGoType(), m_MapId, m_InstanceID);
|
||||
return;
|
||||
}
|
||||
@@ -1889,7 +1889,7 @@ int32 Battleground::GetObjectType(uint64 guid)
|
||||
for (uint32 i = 0; i < BgObjects.size(); ++i)
|
||||
if (BgObjects[i] == guid)
|
||||
return i;
|
||||
sLog->outError("Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground::GetObjectType: player used gameobject (GUID: %u) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
|
||||
GUID_LOPART(guid), m_MapId, m_InstanceID);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battlegro
|
||||
*data << uint8(uiFrame);
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Unknown BG status!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Unknown BG status!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
itr2 = itr++;
|
||||
if (!bg->IsPlayerInBattleground(itr2->first))
|
||||
{
|
||||
sLog->outError("Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Player " UI64FMTD " has scoreboard entry for battleground %u but is not in battleground!", itr->first, bg->GetTypeID(true));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
// should never happen
|
||||
if (++scoreCount >= bg->GetMaxPlayers() && itr != bg->GetPlayerScoresEnd())
|
||||
{
|
||||
sLog->outError("Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bg->GetTypeID(true), bg->GetPlayerScoresSize(), bg->GetMaxPlayers());
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bg->GetTypeID(true), bg->GetPlayerScoresSize(), bg->GetMaxPlayers());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -508,7 +508,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId
|
||||
|
||||
if (!bg_template)
|
||||
{
|
||||
sLog->outError("Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
|
||||
return NULL;
|
||||
}
|
||||
bool isRandom = false;
|
||||
@@ -550,7 +550,7 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeId
|
||||
bg_template = GetBattlegroundTemplate(bgTypeId);
|
||||
if (!bg_template)
|
||||
{
|
||||
sLog->outError("Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -683,8 +683,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outErrorDb(">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
|
||||
sLog->outString();
|
||||
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
bl = sBattlemasterListStore.LookupEntry(bgTypeID_);
|
||||
if (!bl)
|
||||
{
|
||||
sLog->outError("Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeID_);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeID_);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -717,14 +717,14 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
// check values from DB
|
||||
if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
|
||||
{
|
||||
sLog->outErrorDb("Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
|
||||
data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax)
|
||||
{
|
||||
sLog->outErrorDb("Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
|
||||
data.bgTypeId, data.LevelMin, data.LevelMax);
|
||||
continue;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -767,7 +767,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `battleground_template` for id %u have non-existed WorldSafeLocs.dbc id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -793,8 +793,8 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void BattlegroundMgr::InitAutomaticArenaPointDistribution()
|
||||
@@ -891,12 +891,12 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt
|
||||
team = player->GetTeam();
|
||||
bg->GetTeamStartLoc(team, x, y, z, O);
|
||||
|
||||
sLog->outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", player->GetName(), mapid, x, y, z, O);
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, "BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", player->GetName(), mapid, x, y, z, O);
|
||||
player->TeleportTo(mapid, x, y, z, O);
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("player %u is trying to port to non-existent bg instance %u", player->GetGUIDLow(), instanceId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "player %u is trying to port to non-existent bg instance %u", player->GetGUIDLow(), instanceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1078,8 +1078,8 @@ void BattlegroundMgr::LoadBattleMastersEntry()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1095,7 +1095,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
|
||||
uint32 bgTypeId = fields[1].GetUInt32();
|
||||
if (!sBattlemasterListStore.LookupEntry(bgTypeId))
|
||||
{
|
||||
sLog->outErrorDb("Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1103,8 +1103,8 @@ void BattlegroundMgr::LoadBattleMastersEntry()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_BATTLEGROUND, ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId)
|
||||
@@ -1138,4 +1138,4 @@ BattlegroundTypeId BattlegroundMgr::WeekendHolidayIdToBGType(HolidayIds holiday)
|
||||
bool BattlegroundMgr::IsBGWeekend(BattlegroundTypeId bgTypeId)
|
||||
{
|
||||
return IsHolidayActive(BGTypeToWeekendHolidayId(bgTypeId));
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
|
||||
itr = m_QueuedPlayers.find(guid);
|
||||
if (itr == m_QueuedPlayers.end())
|
||||
{
|
||||
sLog->outError("BattlegroundQueue: couldn't find player to remove GUID: %u", GUID_LOPART(guid));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: couldn't find player to remove GUID: %u", GUID_LOPART(guid));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ void BattlegroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount)
|
||||
//player can't be in queue without group, but just in case
|
||||
if (bracket_id == -1)
|
||||
{
|
||||
sLog->outError("BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid));
|
||||
return;
|
||||
}
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id);
|
||||
@@ -780,14 +780,14 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
|
||||
Battleground* bg_template = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
|
||||
if (!bg_template)
|
||||
{
|
||||
sLog->outError("Battleground: Update: bg template not found for %u", bgTypeId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: Update: bg template not found for %u", bgTypeId);
|
||||
return;
|
||||
}
|
||||
|
||||
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id);
|
||||
if (!bracketEntry)
|
||||
{
|
||||
sLog->outError("Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -838,7 +838,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
|
||||
Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, 0, false);
|
||||
if (!bg2)
|
||||
{
|
||||
sLog->outError("BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
|
||||
return;
|
||||
}
|
||||
//invite those selection pools
|
||||
@@ -864,7 +864,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
|
||||
Battleground* bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, false);
|
||||
if (!bg2)
|
||||
{
|
||||
sLog->outError("BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
|
||||
Battleground* arena = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, true);
|
||||
if (!arena)
|
||||
{
|
||||
sLog->outError("BattlegroundQueue::Update couldn't create arena instance for rated arena match!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue::Update couldn't create arena instance for rated arena match!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ void BattlegroundAB::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
case 4021: // Unk2
|
||||
//break;
|
||||
default:
|
||||
//sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
//sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
//Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -356,7 +356,7 @@ void BattlegroundAB::_SendNodeUpdate(uint8 node)
|
||||
void BattlegroundAB::_NodeOccupied(uint8 node, Team team)
|
||||
{
|
||||
if (!AddSpiritGuide(node, BG_AB_SpiritGuidePos[node][0], BG_AB_SpiritGuidePos[node][1], BG_AB_SpiritGuidePos[node][2], BG_AB_SpiritGuidePos[node][3], team))
|
||||
sLog->outError("Failed to spawn spirit guide! point: %u, team: %u, ", node, team);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Failed to spawn spirit guide! point: %u, team: %u, ", node, team);
|
||||
|
||||
uint8 capturedNodes = 0;
|
||||
for (uint8 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
|
||||
@@ -561,7 +561,7 @@ bool BattlegroundAB::SetupBattleground()
|
||||
|| !AddObject(BG_AB_OBJECT_AURA_CONTESTED + 8*i, BG_AB_OBJECTID_AURA_C, BG_AB_NodePositions[i][0], BG_AB_NodePositions[i][1], BG_AB_NodePositions[i][2], BG_AB_NodePositions[i][3], 0, 0, sin(BG_AB_NodePositions[i][3]/2), cos(BG_AB_NodePositions[i][3]/2), RESPAWN_ONE_DAY)
|
||||
)
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundAB: Failed to spawn some object Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn some object Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -569,7 +569,7 @@ bool BattlegroundAB::SetupBattleground()
|
||||
|| !AddObject(BG_AB_OBJECT_GATE_H, BG_AB_OBJECTID_GATE_H, BG_AB_DoorPositions[1][0], BG_AB_DoorPositions[1][1], BG_AB_DoorPositions[1][2], BG_AB_DoorPositions[1][3], BG_AB_DoorPositions[1][4], BG_AB_DoorPositions[1][5], BG_AB_DoorPositions[1][6], BG_AB_DoorPositions[1][7], RESPAWN_IMMEDIATELY)
|
||||
)
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundAB: Failed to spawn door object Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn door object Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
//buffs
|
||||
@@ -579,7 +579,7 @@ bool BattlegroundAB::SetupBattleground()
|
||||
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 1, Buff_Entries[1], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3]/2), cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3]/2), cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
|
||||
)
|
||||
sLog->outErrorDb("BatteGroundAB: Failed to spawn buff object!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundAB: Failed to spawn buff object!");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -93,7 +93,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
|
||||
{
|
||||
if (!m_CaptainAlive[0])
|
||||
{
|
||||
sLog->outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
|
||||
return;
|
||||
}
|
||||
m_CaptainAlive[0]=false;
|
||||
@@ -112,7 +112,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
|
||||
{
|
||||
if (!m_CaptainAlive[1])
|
||||
{
|
||||
sLog->outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
|
||||
return;
|
||||
}
|
||||
m_CaptainAlive[1]=false;
|
||||
@@ -480,7 +480,7 @@ void BattlegroundAV::RemovePlayer(Player* player, uint64 /*guid*/, uint32 /*team
|
||||
{
|
||||
if (!player)
|
||||
{
|
||||
sLog->outError("bg_AV no player at remove");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "bg_AV no player at remove");
|
||||
return;
|
||||
}
|
||||
//TODO search more buffs
|
||||
@@ -588,7 +588,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
|
||||
if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
|
||||
DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp);
|
||||
else
|
||||
sLog->outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
|
||||
//spawn destroyed aura
|
||||
for (uint8 i=0; i <= 9; i++)
|
||||
SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10), RESPAWN_IMMEDIATELY);
|
||||
@@ -753,7 +753,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
|
||||
if (BgCreatures[node])
|
||||
DelCreature(node);
|
||||
if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], owner))
|
||||
sLog->outError("AV: couldn't spawn spiritguide at node %i", node);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "AV: couldn't spawn spiritguide at node %i", node);
|
||||
|
||||
}
|
||||
for (uint8 i=0; i<4; i++)
|
||||
@@ -811,7 +811,7 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
return BG_AV_Nodes(object - 29);
|
||||
if (object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE)
|
||||
return BG_AV_NODES_SNOWFALL_GRAVE;
|
||||
sLog->outError("BattlegroundAV: ERROR! GetPlace got a wrong object :(");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundAV: ERROR! GetPlace got a wrong object :(");
|
||||
ASSERT(false);
|
||||
return BG_AV_Nodes(0);
|
||||
}
|
||||
@@ -849,7 +849,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
|
||||
}
|
||||
else if (m_Nodes[node].Owner == AV_NEUTRAL_TEAM)
|
||||
return BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE;
|
||||
sLog->outError("BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
|
||||
ASSERT(false);
|
||||
return 0;
|
||||
}
|
||||
@@ -903,7 +903,7 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "player defends point object: %i node: %i", object, node);
|
||||
if (m_Nodes[node].PrevOwner != team)
|
||||
{
|
||||
sLog->outError("BG_AV: player defends point which doesn't belong to his team %i", node);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_AV: player defends point which doesn't belong to his team %i", node);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1124,7 +1124,7 @@ uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used
|
||||
if (state == POINT_ASSAULTED)
|
||||
return 3;
|
||||
}
|
||||
sLog->outError("BG_AV: should update a strange worldstate state:%i team:%i", state, team);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_AV: should update a strange worldstate state:%i team:%i", state, team);
|
||||
return 5; //this will crash the game, but i want to know if something is wrong here
|
||||
}
|
||||
|
||||
@@ -1203,7 +1203,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
// horde gates
|
||||
|| !AddObject(BG_AV_OBJECT_DOOR_H, BG_AV_OBJECTID_GATE_H, BG_AV_DoorPositons[1][0], BG_AV_DoorPositons[1][1], BG_AV_DoorPositons[1][2], BG_AV_DoorPositons[1][3], 0, 0, sin(BG_AV_DoorPositons[1][3]/2), cos(BG_AV_DoorPositons[1][3]/2), RESPAWN_IMMEDIATELY))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundAV: Failed to spawn some object Battleground not created!1");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundAV: Failed to spawn some object Battleground not created!1");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1221,7 +1221,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
|| !AddObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+i*3, BG_AV_OBJECTID_AURA_A, BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3]/2), cos(BG_AV_ObjectPos[i][3]/2), RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_AV_OBJECT_AURA_H_FIRSTAID_STATION+i*3, BG_AV_OBJECTID_AURA_H, BG_AV_ObjectPos[i][0], BG_AV_ObjectPos[i][1], BG_AV_ObjectPos[i][2], BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3]/2), cos(BG_AV_ObjectPos[i][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!2");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!2");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
|| !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_A, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_PH, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!3");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!3");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1249,7 +1249,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
|| !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_PA, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)), BG_AV_OBJECTID_TOWER_BANNER_H, BG_AV_ObjectPos[i+8][0], BG_AV_ObjectPos[i+8][1], BG_AV_ObjectPos[i+8][2], BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!4");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!4");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1257,7 +1257,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1271,7 +1271,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+(i*10)+j, BG_AV_OBJECTID_SMOKE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1279,7 +1279,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+(i*10)+j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1289,7 +1289,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN+i, BG_AV_OBJECTID_MINE_N, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1297,14 +1297,14 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN+i, BG_AV_OBJECTID_MINE_S, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!AddObject(BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE, BG_AV_OBJECTID_BANNER_SNOWFALL_N, BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][0], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][1], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][2], BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3], 0, 0, sin(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!8");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!8");
|
||||
return false;
|
||||
}
|
||||
for (uint8 i = 0; i < 4; i++)
|
||||
@@ -1314,7 +1314,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H+i, BG_AV_OBJECTID_SNOWFALL_CANDY_H, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH, BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1402,7 +1402,7 @@ const char* BattlegroundAV::GetNodeName(BG_AV_Nodes node)
|
||||
case BG_AV_NODES_FROSTWOLF_WTOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_FROST_W);
|
||||
case BG_AV_NODES_FROSTWOLF_HUT: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_FROST_HUT);
|
||||
default:
|
||||
sLog->outError("tried to get name for node %u", node);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "tried to get name for node %u", node);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1413,22 +1413,22 @@ void BattlegroundAV::AssaultNode(BG_AV_Nodes node, uint16 team)
|
||||
{
|
||||
if (m_Nodes[node].TotalOwner == team)
|
||||
{
|
||||
sLog->outCrash("Assaulting team is TotalOwner of node");
|
||||
sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Assaulting team is TotalOwner of node");
|
||||
ASSERT (false);
|
||||
}
|
||||
if (m_Nodes[node].Owner == team)
|
||||
{
|
||||
sLog->outCrash("Assaulting team is owner of node");
|
||||
sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Assaulting team is owner of node");
|
||||
ASSERT (false);
|
||||
}
|
||||
if (m_Nodes[node].State == POINT_DESTROYED)
|
||||
{
|
||||
sLog->outCrash("Destroyed node is being assaulted");
|
||||
sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Destroyed node is being assaulted");
|
||||
ASSERT (false);
|
||||
}
|
||||
if (m_Nodes[node].State == POINT_ASSAULTED && m_Nodes[node].TotalOwner) //only assault an assaulted node if no totalowner exists
|
||||
{
|
||||
sLog->outCrash("Assault on an not assaulted node with total owner");
|
||||
sLog->outFatal(LOG_FILTER_BATTLEGROUND, "Assault on an not assaulted node with total owner");
|
||||
ASSERT (false);
|
||||
}
|
||||
//the timer gets another time, if the previous owner was 0 == Neutral
|
||||
|
||||
@@ -89,7 +89,7 @@ void BattlegroundBE::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
if (!killer)
|
||||
{
|
||||
sLog->outError("Killer player not found");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Killer player not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ void BattlegroundBE::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
//buff_guid = BgObjects[BG_BE_OBJECT_BUFF_2];
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ bool BattlegroundBE::SetupBattleground()
|
||||
|| !AddObject(BG_BE_OBJECT_BUFF_1, BG_BE_OBJECT_TYPE_BUFF_1, 6249.042f, 275.3239f, 11.22033f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|
||||
|| !AddObject(BG_BE_OBJECT_BUFF_2, BG_BE_OBJECT_TYPE_BUFF_2, 6228.26f, 249.566f, 11.21812f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundBE: Failed to spawn some object!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundBE: Failed to spawn some object!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
if (!killer)
|
||||
{
|
||||
sLog->outError("BattlegroundDS: Killer player not found");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundDS: Killer player not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ void BattlegroundDS::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
setPipeKnockBackCount(0);
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ bool BattlegroundDS::SetupBattleground()
|
||||
|| !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_1, 0, 1369.977f, 817.2882f, 16.08718f, 3.106686f, RESPAWN_IMMEDIATELY)
|
||||
|| !AddCreature(BG_DS_NPC_TYPE_WATER_SPOUT, BG_DS_NPC_PIPE_KNOCKBACK_2, 0, 1212.833f, 765.3871f, 16.09484f, 0.0f, RESPAWN_IMMEDIATELY))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundDS: Failed to spawn some object!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundDS: Failed to spawn some object!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
|
||||
Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
|
||||
if (!player)
|
||||
{
|
||||
sLog->outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
|
||||
++j;
|
||||
continue;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
|
||||
Player* player = ObjectAccessor::FindPlayer(m_PlayersNearPoint[i][j]);
|
||||
if (!player)
|
||||
{
|
||||
sLog->outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
|
||||
//move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
|
||||
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);
|
||||
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
|
||||
@@ -411,7 +411,7 @@ void BattlegroundEY::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
case 5866:
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -474,7 +474,7 @@ bool BattlegroundEY::SetupBattleground()
|
||||
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER, BG_OBJECT_HU_TOWER_CAP_EY_ENTRY, 2282.121582f, 1760.006958f, 1189.707153f, 1.919862f, 0, 0, 0.819152f, 0.573576f, RESPAWN_ONE_DAY)
|
||||
)
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundEY: Failed to spawn some object Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn some object Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -484,28 +484,28 @@ bool BattlegroundEY::SetupBattleground()
|
||||
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(m_Points_Trigger[i]);
|
||||
if (!at)
|
||||
{
|
||||
sLog->outError("BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
|
||||
continue;
|
||||
}
|
||||
if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|
||||
)
|
||||
sLog->outError("BattlegroundEY: Cannot spawn buff");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Cannot spawn buff");
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* sg = NULL;
|
||||
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE);
|
||||
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
|
||||
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_HORDE);
|
||||
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@ void BattlegroundEY::RespawnFlagAfterDrop()
|
||||
if (obj)
|
||||
obj->Delete();
|
||||
else
|
||||
sLog->outError("BattlegroundEY: Unknown dropped flag guid: %u", GUID_LOPART(GetDroppedFlagGUID()));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Unknown dropped flag guid: %u", GUID_LOPART(GetDroppedFlagGUID()));
|
||||
|
||||
SetDroppedFlagGUID(0);
|
||||
}
|
||||
@@ -742,7 +742,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* Source, uint32 Point)
|
||||
WorldSafeLocsEntry const* sg = NULL;
|
||||
sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
|
||||
if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team))
|
||||
sLog->outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
|
||||
Point, Team, m_CapturingPointTypes[Point].GraveYardId);
|
||||
|
||||
// SpawnBGCreature(Point, RESPAWN_IMMEDIATELY);
|
||||
@@ -894,7 +894,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player)
|
||||
|
||||
if (!entry)
|
||||
{
|
||||
sLog->outError("BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -911,7 +911,7 @@ WorldSafeLocsEntry const* BattlegroundEY::GetClosestGraveYard(Player* player)
|
||||
{
|
||||
entry = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[i].GraveYardId);
|
||||
if (!entry)
|
||||
sLog->outError("BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundEY: Not found graveyard: %u", m_CapturingPointTypes[i].GraveYardId);
|
||||
else
|
||||
{
|
||||
distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z);
|
||||
|
||||
@@ -275,7 +275,7 @@ void BattlegroundIC::StartingEventOpenDoors()
|
||||
BG_IC_Teleporters[i].x, BG_IC_Teleporters[i].y,
|
||||
BG_IC_Teleporters[i].z, BG_IC_Teleporters[i].o,
|
||||
0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
sLog->outError("Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
BG_IC_ObjSpawnlocs[i].z, BG_IC_ObjSpawnlocs[i].o,
|
||||
0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -384,7 +384,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
BG_IC_NpcSpawnlocs[i].z, BG_IC_NpcSpawnlocs[i].o,
|
||||
RESPAWN_ONE_DAY))
|
||||
{
|
||||
sLog->outError("Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -394,7 +394,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
|| !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+3, BG_IC_SpiritGuidePos[7][0], BG_IC_SpiritGuidePos[7][1], BG_IC_SpiritGuidePos[7][2], BG_IC_SpiritGuidePos[7][3], ALLIANCE)
|
||||
|| !AddSpiritGuide(BG_IC_NPC_SPIRIT_GUIDE_1+4, BG_IC_SpiritGuidePos[8][0], BG_IC_SpiritGuidePos[8][1], BG_IC_SpiritGuidePos[8][2], BG_IC_SpiritGuidePos[8][3], HORDE))
|
||||
{
|
||||
sLog->outError("Isle of Conquest: Failed to spawn initial spirit guide!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: Failed to spawn initial spirit guide!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
|
||||
if (!gunshipAlliance || !gunshipHorde)
|
||||
{
|
||||
sLog->outError("Isle of Conquest: There was an error creating gunships!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: There was an error creating gunships!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ uint32 BattlegroundIC::GetNextBanner(ICNodePoint* nodePoint, uint32 team, bool r
|
||||
return nodePoint->last_entry;
|
||||
|
||||
// we should never be here...
|
||||
sLog->outError("Isle Of Conquest: Unexpected return in GetNextBanner function");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle Of Conquest: Unexpected return in GetNextBanner function");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -639,7 +639,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
BG_IC_SpiritGuidePos[nodePoint->nodeType][0], BG_IC_SpiritGuidePos[nodePoint->nodeType][1],
|
||||
BG_IC_SpiritGuidePos[nodePoint->nodeType][2], BG_IC_SpiritGuidePos[nodePoint->nodeType][3],
|
||||
(nodePoint->faction == TEAM_ALLIANCE ? ALLIANCE : HORDE)))
|
||||
sLog->outError("Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
|
||||
}
|
||||
|
||||
switch (nodePoint->gameobject_type)
|
||||
@@ -658,7 +658,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
}
|
||||
|
||||
//sLog->outError("BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction);
|
||||
//sLog->outError(LOG_FILTER_BATTLEGROUND, "BG_IC_GO_HANGAR_BANNER CAPTURED Faction: %u", nodePoint->faction);
|
||||
|
||||
(nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->BuildStartMovePacket(GetBgMap());
|
||||
(nodePoint->faction == TEAM_ALLIANCE ? gunshipHorde : gunshipAlliance)->BuildStopMovePacket(GetBgMap());
|
||||
@@ -908,7 +908,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period)
|
||||
|
||||
if (!goinfo)
|
||||
{
|
||||
sLog->outErrorDb("Transport ID: %u will not be loaded, gameobject_template missing", goEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Transport ID: %u will not be loaded, gameobject_template missing", goEntry);
|
||||
delete t;
|
||||
return NULL;
|
||||
}
|
||||
@@ -918,7 +918,7 @@ Transport* BattlegroundIC::CreateTransport(uint32 goEntry, uint32 period)
|
||||
if (!t->GenerateWaypoints(goinfo->moTransport.taxiPathId, mapsUsed))
|
||||
// skip transports with empty waypoints list
|
||||
{
|
||||
sLog->outErrorDb("Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Transport (path id %u) path size = 0. Transport ignored, check DBC files or transport GO data0 field.", goinfo->moTransport.taxiPathId);
|
||||
delete t;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ void BattlegroundNA::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
if (!killer)
|
||||
{
|
||||
sLog->outError("BattlegroundNA: Killer player not found");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundNA: Killer player not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ void BattlegroundNA::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
case 4537: // buff trigger?
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ bool BattlegroundNA::SetupBattleground()
|
||||
|| !AddObject(BG_NA_OBJECT_BUFF_1, BG_NA_OBJECT_TYPE_BUFF_1, 4009.189941f, 2895.250000f, 13.052700f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|
||||
|| !AddObject(BG_NA_OBJECT_BUFF_2, BG_NA_OBJECT_TYPE_BUFF_2, 4103.330078f, 2946.350098f, 13.051300f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundNA: Failed to spawn some object!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundNA: Failed to spawn some object!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ void BattlegroundRL::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
if (!killer)
|
||||
{
|
||||
sLog->outError("Killer player not found");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "Killer player not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void BattlegroundRL::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
case 4697: // buff trigger?
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ bool BattlegroundRL::SetupBattleground()
|
||||
|| !AddObject(BG_RL_OBJECT_BUFF_1, BG_RL_OBJECT_TYPE_BUFF_1, 1328.719971f, 1632.719971f, 36.730400f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|
||||
|| !AddObject(BG_RL_OBJECT_BUFF_2, BG_RL_OBJECT_TYPE_BUFF_2, 1243.300049f, 1699.170044f, 34.872601f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundRL: Failed to spawn some object!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundRL: Failed to spawn some object!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ void BattlegroundRV::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
if (!killer)
|
||||
{
|
||||
sLog->outError("BattlegroundRV: Killer player not found");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundRV: Killer player not found");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ void BattlegroundRV::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
case 5474:
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ bool BattlegroundRV::SetupBattleground()
|
||||
|
||||
)
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundRV: Failed to spawn some object!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundRV: Failed to spawn some object!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -162,7 +162,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
|
||||
if (!sg)
|
||||
{
|
||||
sLog->outError("SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
{
|
||||
GraveyardStatus[i] = ((Attackers == TEAM_HORDE)? TEAM_ALLIANCE : TEAM_HORDE);
|
||||
if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((Attackers == TEAM_HORDE)? ALLIANCE : HORDE)))
|
||||
sLog->outError("SOTA: couldn't spawn GY: %u", i);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "SOTA: couldn't spawn GY: %u", i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -725,7 +725,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
|
||||
WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
|
||||
if (!sg)
|
||||
{
|
||||
sLog->outError("BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
|
||||
if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team)))
|
||||
obj->Delete();
|
||||
else
|
||||
sLog->outError("unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team)));
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "unknown droped flag bg, guid: %u", GUID_LOPART(GetDroppedFlagGUID(team)));
|
||||
|
||||
SetDroppedFlagGUID(0, team);
|
||||
_bothFlagsKept = false;
|
||||
@@ -557,7 +557,7 @@ void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
|
||||
{
|
||||
if (!player)
|
||||
{
|
||||
sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundWS: Removing offline player who has the FLAG!!");
|
||||
this->SetAllianceFlagPicker(0);
|
||||
this->RespawnFlag(ALLIANCE, false);
|
||||
}
|
||||
@@ -568,7 +568,7 @@ void BattlegroundWS::RemovePlayer(Player* player, uint64 guid, uint32 /*team*/)
|
||||
{
|
||||
if (!player)
|
||||
{
|
||||
sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!");
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "BattlegroundWS: Removing offline player who has the FLAG!!");
|
||||
this->SetHordeFlagPicker(0);
|
||||
this->RespawnFlag(HORDE, false);
|
||||
}
|
||||
@@ -637,7 +637,7 @@ void BattlegroundWS::HandleAreaTrigger(Player* Source, uint32 Trigger)
|
||||
case 4629: // unk4
|
||||
break;
|
||||
default:
|
||||
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
sLog->outError(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
|
||||
break;
|
||||
}
|
||||
@@ -672,21 +672,21 @@ bool BattlegroundWS::SetupBattleground()
|
||||
|| !AddObject(BG_WS_OBJECT_DOOR_H_4, BG_OBJECT_DOOR_H_4_WS_ENTRY, 950.7952f, 1459.583f, 342.1523f, 0.05235988f, 0, 0, 0.02617695f, 0.9996573f, RESPAWN_IMMEDIATELY)
|
||||
)
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundWS: Failed to spawn some object Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn some object Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
|
||||
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
|
||||
sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE);
|
||||
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
|
||||
{
|
||||
sLog->outErrorDb("BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
|
||||
sLog->outError(LOG_FILTER_SQL, "BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,6 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Calendar
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Chat
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Chat/Channels
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Chat/Commands
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Combat
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Conditions
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/DataStores
|
||||
|
||||
@@ -99,7 +99,7 @@ CalendarInvite* CalendarMgr::GetInvite(uint64 inviteId)
|
||||
if (itr != _invites.end())
|
||||
return &(itr->second);
|
||||
|
||||
sLog->outError("CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::GetInvite: [" UI64FMTD "] not found!", inviteId);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ CalendarEvent* CalendarMgr::GetEvent(uint64 eventId)
|
||||
if (itr != _events.end())
|
||||
return &(itr->second);
|
||||
|
||||
sLog->outError("CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::GetEvent: [" UI64FMTD "] not found!", eventId);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ void CalendarMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u calendar events", count);
|
||||
sLog->outInfo(LOG_FILTER_CALENDAR, ">> Loaded %u calendar events", count);
|
||||
count = 0;
|
||||
|
||||
// 0 1 2 3 4 5 6 7
|
||||
@@ -176,7 +176,7 @@ void CalendarMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u calendar Invites", count);
|
||||
sLog->outInfo(LOG_FILTER_CALENDAR, ">> Loaded %u calendar Invites", count);
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ bool CalendarMgr::AddEvent(CalendarEvent const& newEvent)
|
||||
uint64 eventId = newEvent.GetEventId();
|
||||
if (_events.find(eventId) != _events.end())
|
||||
{
|
||||
sLog->outError("CalendarMgr::AddEvent: Event [" UI64FMTD "] exists", eventId);
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddEvent: Event [" UI64FMTD "] exists", eventId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ bool CalendarMgr::RemoveEvent(uint64 eventId)
|
||||
CalendarEventMap::iterator itr = _events.find(eventId);
|
||||
if (itr == _events.end())
|
||||
{
|
||||
sLog->outError("CalendarMgr::RemoveEvent: Event [" UI64FMTD "] does not exist", eventId);
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::RemoveEvent: Event [" UI64FMTD "] does not exist", eventId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -494,13 +494,13 @@ bool CalendarMgr::AddInvite(CalendarInvite const& newInvite)
|
||||
uint64 inviteId = newInvite.GetInviteId();
|
||||
if (!inviteId)
|
||||
{
|
||||
sLog->outError("CalendarMgr::AddInvite: Cant add Invite 0");
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddInvite: Cant add Invite 0");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (_invites.find(inviteId) != _invites.end())
|
||||
{
|
||||
sLog->outError("CalendarMgr::AddInvite: Invite [" UI64FMTD "] exists", inviteId);
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::AddInvite: Invite [" UI64FMTD "] exists", inviteId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -516,7 +516,7 @@ uint64 CalendarMgr::RemoveInvite(uint64 inviteId)
|
||||
CalendarInviteMap::iterator itr = _invites.find(inviteId);
|
||||
if (itr == _invites.end())
|
||||
{
|
||||
sLog->outError("CalendarMgr::RemoveInvite: Invite [" UI64FMTD "] does not exist", inviteId);
|
||||
sLog->outError(LOG_FILTER_CALENDAR, "CalendarMgr::RemoveInvite: Invite [" UI64FMTD "] does not exist", inviteId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
|
||||
|
||||
m_flags |= CHANNEL_FLAG_GENERAL; // for all built-in channels
|
||||
|
||||
if (ch->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel
|
||||
if (ch->flags & CHANNEL_DBC_FLAG_TRADE) // for trade channel
|
||||
m_flags |= CHANNEL_FLAG_TRADE;
|
||||
|
||||
if (ch->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels
|
||||
if (ch->flags & CHANNEL_DBC_FLAG_CITY_ONLY2) // for city only channels
|
||||
m_flags |= CHANNEL_FLAG_CITY;
|
||||
|
||||
if (ch->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel
|
||||
if (ch->flags & CHANNEL_DBC_FLAG_LFG) // for LFG channel
|
||||
m_flags |= CHANNEL_FLAG_LFG;
|
||||
else // for all other channels
|
||||
m_flags |= CHANNEL_FLAG_NOT_LFG;
|
||||
|
||||
@@ -49,4 +49,3 @@ class HordeChannelMgr : public ChannelMgr {};
|
||||
ChannelMgr* channelMgr(uint32 team);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,13 +38,6 @@
|
||||
|
||||
bool ChatHandler::load_command_table = true;
|
||||
|
||||
// wrapper for old-style handlers
|
||||
template<bool (ChatHandler::*F)(const char*)>
|
||||
bool OldHandler(ChatHandler* chatHandler, const char* args)
|
||||
{
|
||||
return (chatHandler->*F)(args);
|
||||
}
|
||||
|
||||
// get number of commands in table
|
||||
static size_t getCommandTableSize(const ChatCommand* commands)
|
||||
{
|
||||
@@ -67,124 +60,6 @@ static size_t appendCommandTable(ChatCommand* target, const ChatCommand* source)
|
||||
|
||||
ChatCommand* ChatHandler::getCommandTable()
|
||||
{
|
||||
static ChatCommand channelSetCommandTable[] =
|
||||
{
|
||||
{ "ownership", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleChannelSetOwnership>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand channelCommandTable[] =
|
||||
{
|
||||
{ "set", SEC_ADMINISTRATOR, true, NULL, "", channelSetCommandTable },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand groupCommandTable[] =
|
||||
{
|
||||
{ "leader", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleGroupLeaderCommand>, "", NULL },
|
||||
{ "disband", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleGroupDisbandCommand>, "", NULL },
|
||||
{ "remove", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleGroupRemoveCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand petCommandTable[] =
|
||||
{
|
||||
{ "create", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleCreatePetCommand>, "", NULL },
|
||||
{ "learn", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandlePetLearnCommand>, "", NULL },
|
||||
{ "unlearn", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandlePetUnlearnCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand pdumpCommandTable[] =
|
||||
{
|
||||
{ "load", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandlePDumpLoadCommand>, "", NULL },
|
||||
{ "write", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandlePDumpWriteCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand sendCommandTable[] =
|
||||
{
|
||||
{ "items", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleSendItemsCommand>, "", NULL },
|
||||
{ "mail", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleSendMailCommand>, "", NULL },
|
||||
{ "message", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleSendMessageCommand>, "", NULL },
|
||||
{ "money", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleSendMoneyCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand commandTable[] =
|
||||
{
|
||||
{ "pdump", SEC_ADMINISTRATOR, true, NULL, "", pdumpCommandTable },
|
||||
{ "group", SEC_ADMINISTRATOR, false, NULL, "", groupCommandTable },
|
||||
|
||||
{ "channel", SEC_ADMINISTRATOR, true, NULL, "", channelCommandTable },
|
||||
|
||||
{ "pet", SEC_GAMEMASTER, false, NULL, "", petCommandTable },
|
||||
|
||||
{ "aura", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleAuraCommand>, "", NULL },
|
||||
{ "unaura", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleUnAuraCommand>, "", NULL },
|
||||
{ "nameannounce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleNameAnnounceCommand>, "", NULL },
|
||||
{ "gmnameannounce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMNameAnnounceCommand>, "", NULL },
|
||||
{ "announce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleAnnounceCommand>, "", NULL },
|
||||
{ "gmannounce", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMAnnounceCommand>, "", NULL },
|
||||
{ "notify", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleNotifyCommand>, "", NULL },
|
||||
{ "gmnotify", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleGMNotifyCommand>, "", NULL },
|
||||
{ "appear", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleAppearCommand>, "", NULL },
|
||||
{ "summon", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleSummonCommand>, "", NULL },
|
||||
{ "groupsummon", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleGroupSummonCommand>, "", NULL },
|
||||
{ "commands", SEC_PLAYER, true, OldHandler<&ChatHandler::HandleCommandsCommand>, "", NULL },
|
||||
{ "die", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDieCommand>, "", NULL },
|
||||
{ "revive", SEC_ADMINISTRATOR, true, OldHandler<&ChatHandler::HandleReviveCommand>, "", NULL },
|
||||
{ "dismount", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleDismountCommand>, "", NULL },
|
||||
{ "guid", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleGUIDCommand>, "", NULL },
|
||||
{ "help", SEC_PLAYER, true, OldHandler<&ChatHandler::HandleHelpCommand>, "", NULL },
|
||||
{ "itemmove", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleItemMoveCommand>, "", NULL },
|
||||
{ "cooldown", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleCooldownCommand>, "", NULL },
|
||||
{ "unlearn", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleUnLearnCommand>, "", NULL },
|
||||
{ "distance", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleGetDistanceCommand>, "", NULL },
|
||||
{ "recall", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleRecallCommand>, "", NULL },
|
||||
{ "save", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleSaveCommand>, "", NULL },
|
||||
{ "saveall", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleSaveAllCommand>, "", NULL },
|
||||
{ "kick", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleKickPlayerCommand>, "", NULL },
|
||||
{ "start", SEC_PLAYER, false, OldHandler<&ChatHandler::HandleStartCommand>, "", NULL },
|
||||
{ "taxicheat", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleTaxiCheatCommand>, "", NULL },
|
||||
{ "linkgrave", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLinkGraveCommand>, "", NULL },
|
||||
{ "neargrave", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleNearGraveCommand>, "", NULL },
|
||||
{ "explorecheat", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleExploreCheatCommand>, "", NULL },
|
||||
{ "levelup", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleLevelUpCommand>, "", NULL },
|
||||
{ "showarea", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleShowAreaCommand>, "", NULL },
|
||||
{ "hidearea", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleHideAreaCommand>, "", NULL },
|
||||
{ "additem", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleAddItemCommand>, "", NULL },
|
||||
{ "additemset", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleAddItemSetCommand>, "", NULL },
|
||||
{ "bank", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleBankCommand>, "", NULL },
|
||||
{ "wchange", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleChangeWeather>, "", NULL },
|
||||
{ "maxskill", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleMaxSkillCommand>, "", NULL },
|
||||
{ "setskill", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleSetSkillCommand>, "", NULL },
|
||||
{ "whispers", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleWhispersCommand>, "", NULL },
|
||||
{ "pinfo", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandlePInfoCommand>, "", NULL },
|
||||
{ "respawn", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleRespawnCommand>, "", NULL },
|
||||
{ "send", SEC_MODERATOR, true, NULL, "", sendCommandTable },
|
||||
{ "mute", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleMuteCommand>, "", NULL },
|
||||
{ "unmute", SEC_MODERATOR, true, OldHandler<&ChatHandler::HandleUnmuteCommand>, "", NULL },
|
||||
{ "movegens", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleMovegensCommand>, "", NULL },
|
||||
{ "cometome", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleComeToMeCommand>, "", NULL },
|
||||
{ "damage", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleDamageCommand>, "", NULL },
|
||||
{ "combatstop", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleCombatStopCommand>, "", NULL },
|
||||
{ "flusharenapoints", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleFlushArenaPointsCommand>, "", NULL },
|
||||
{ "repairitems", SEC_GAMEMASTER, true, OldHandler<&ChatHandler::HandleRepairitemsCommand>, "", NULL },
|
||||
{ "waterwalk", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandleWaterwalkCommand>, "", NULL },
|
||||
|
||||
{ "freeze", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleFreezeCommand>, "", NULL },
|
||||
{ "unfreeze", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleUnFreezeCommand>, "", NULL },
|
||||
{ "listfreeze", SEC_MODERATOR, false, OldHandler<&ChatHandler::HandleListFreezeCommand>, "", NULL },
|
||||
|
||||
{ "possess", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandlePossessCommand>, "", NULL },
|
||||
{ "unpossess", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleUnPossessCommand>, "", NULL },
|
||||
{ "bindsight", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleBindSightCommand>, "", NULL },
|
||||
{ "unbindsight", SEC_ADMINISTRATOR, false, OldHandler<&ChatHandler::HandleUnbindSightCommand>, "", NULL },
|
||||
{ "playall", SEC_GAMEMASTER, false, OldHandler<&ChatHandler::HandlePlayAllCommand>, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
// cache for commands, needed because some commands are loaded dynamically through ScriptMgr
|
||||
// cache is never freed and will show as a memory leak in diagnostic tools
|
||||
// can't use vector as vector storage is implementation-dependent, eg, there can be alignment gaps between elements
|
||||
@@ -196,25 +71,23 @@ ChatCommand* ChatHandler::getCommandTable()
|
||||
|
||||
{
|
||||
// count total number of top-level commands
|
||||
size_t total = getCommandTableSize(commandTable);
|
||||
size_t total = 0;
|
||||
std::vector<ChatCommand*> const& dynamic = sScriptMgr->GetChatCommands();
|
||||
for (std::vector<ChatCommand*>::const_iterator it = dynamic.begin(); it != dynamic.end(); ++it)
|
||||
total += getCommandTableSize(*it);
|
||||
total += 1; // ending zero
|
||||
|
||||
// cache top-level commands
|
||||
size_t added = 0;
|
||||
commandTableCache = (ChatCommand*)malloc(sizeof(ChatCommand) * total);
|
||||
memset(commandTableCache, 0, sizeof(ChatCommand) * total);
|
||||
ACE_ASSERT(commandTableCache);
|
||||
size_t added = appendCommandTable(commandTableCache, commandTable);
|
||||
for (std::vector<ChatCommand*>::const_iterator it = dynamic.begin(); it != dynamic.end(); ++it)
|
||||
added += appendCommandTable(commandTableCache + added, *it);
|
||||
}
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_COMMANDS);
|
||||
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
{
|
||||
do
|
||||
@@ -224,7 +97,8 @@ ChatCommand* ChatHandler::getCommandTable()
|
||||
|
||||
SetDataForCommandInTable(commandTableCache, name.c_str(), fields[1].GetUInt8(), fields[2].GetString(), name);
|
||||
|
||||
} while (result->NextRow());
|
||||
}
|
||||
while (result->NextRow());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,12 +401,12 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, const char* text,
|
||||
// expected subcommand by full name DB content
|
||||
else if (*text)
|
||||
{
|
||||
sLog->outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str());
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `command` have unexpected subcommand '%s' in command '%s', skip.", text, fullcommand.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (table[i].SecurityLevel != security)
|
||||
sLog->outDetail("Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security);
|
||||
|
||||
table[i].SecurityLevel = security;
|
||||
table[i].Help = help;
|
||||
@@ -543,9 +417,9 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand* table, const char* text,
|
||||
if (!cmd.empty())
|
||||
{
|
||||
if (table == getCommandTable())
|
||||
sLog->outErrorDb("Table `command` have not existed command '%s', skip.", cmd.c_str());
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `command` have not existed command '%s', skip.", cmd.c_str());
|
||||
else
|
||||
sLog->outErrorDb("Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str());
|
||||
sLog->outError(LOG_FILTER_SQL, "Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Executable → Regular
+1
-108
@@ -124,120 +124,13 @@ class ChatHandler
|
||||
static bool LoadCommandTable() { return load_command_table; }
|
||||
static void SetLoadCommandTable(bool val) { load_command_table = val; }
|
||||
|
||||
// cs_character
|
||||
void HandleCharacterLevel(Player* player, uint64 playerGuid, uint32 oldLevel, uint32 newLevel);
|
||||
|
||||
bool ShowHelpForCommand(ChatCommand* table, const char* cmd);
|
||||
protected:
|
||||
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
|
||||
static bool SetDataForCommandInTable(ChatCommand* table, const char* text, uint32 security, std::string const& help, std::string const& fullcommand);
|
||||
bool ExecuteCommandInTable(ChatCommand* table, const char* text, const std::string& fullcmd);
|
||||
bool ShowHelpForCommand(ChatCommand* table, const char* cmd);
|
||||
bool ShowHelpForSubCommands(ChatCommand* table, char const* cmd, char const* subcmd);
|
||||
|
||||
bool HandleNameAnnounceCommand(const char* args);
|
||||
bool HandleGMNameAnnounceCommand(const char* args);
|
||||
bool HandleGMAnnounceCommand(const char* args);
|
||||
bool HandleGMNotifyCommand(const char* args);
|
||||
|
||||
bool HandleChannelSetOwnership(const char *args);
|
||||
|
||||
bool HandlePossessCommand(const char* args);
|
||||
bool HandleUnPossessCommand(const char* args);
|
||||
bool HandleBindSightCommand(const char* args);
|
||||
bool HandleUnbindSightCommand(const char* args);
|
||||
|
||||
bool HandlePDumpLoadCommand(const char *args);
|
||||
bool HandlePDumpWriteCommand(const char *args);
|
||||
|
||||
bool HandleSendItemsCommand(const char* args);
|
||||
bool HandleSendMailCommand(const char* args);
|
||||
bool HandleSendMessageCommand(const char * args);
|
||||
bool HandleSendMoneyCommand(const char* args);
|
||||
|
||||
bool HandleHelpCommand(const char* args);
|
||||
bool HandleCommandsCommand(const char* args);
|
||||
bool HandleStartCommand(const char* args);
|
||||
bool HandleDismountCommand(const char* args);
|
||||
bool HandleSaveCommand(const char* args);
|
||||
|
||||
bool HandleSummonCommand(const char* args);
|
||||
bool HandleAppearCommand(const char* args);
|
||||
bool HandleGroupSummonCommand(const char* args);
|
||||
bool HandleRecallCommand(const char* args);
|
||||
bool HandleAnnounceCommand(const char* args);
|
||||
bool HandleNotifyCommand(const char* args);
|
||||
bool HandleTaxiCheatCommand(const char* args);
|
||||
bool HandleWhispersCommand(const char* args);
|
||||
|
||||
bool HandleGUIDCommand(const char* args);
|
||||
bool HandleItemMoveCommand(const char* args);
|
||||
bool HandleDeMorphCommand(const char* args);
|
||||
bool HandlePInfoCommand(const char* args);
|
||||
bool HandleMuteCommand(const char* args);
|
||||
bool HandleUnmuteCommand(const char* args);
|
||||
bool HandleMovegensCommand(const char* args);
|
||||
bool HandleFreezeCommand(const char *args);
|
||||
bool HandleUnFreezeCommand(const char *args);
|
||||
bool HandleListFreezeCommand(const char* args);
|
||||
|
||||
bool HandleCooldownCommand(const char* args);
|
||||
bool HandleUnLearnCommand(const char* args);
|
||||
bool HandleGetDistanceCommand(const char* args);
|
||||
bool HandleDieCommand(const char* args);
|
||||
bool HandleDamageCommand(const char *args);
|
||||
bool HandleReviveCommand(const char* args);
|
||||
bool HandleAuraCommand(const char* args);
|
||||
bool HandleUnAuraCommand(const char* args);
|
||||
bool HandleLinkGraveCommand(const char* args);
|
||||
bool HandleNearGraveCommand(const char* args);
|
||||
bool HandleActivateObjectCommand(const char* args);
|
||||
bool HandleSpawnTransportCommand(const char* args);
|
||||
bool HandleExploreCheatCommand(const char* args);
|
||||
bool HandleWaterwalkCommand(const char* args);
|
||||
bool HandleLevelUpCommand(const char* args);
|
||||
bool HandleShowAreaCommand(const char* args);
|
||||
bool HandleHideAreaCommand(const char* args);
|
||||
bool HandleAddItemCommand(const char* args);
|
||||
bool HandleAddItemSetCommand(const char* args);
|
||||
bool HandlePetUnlearnCommand(const char* args);
|
||||
bool HandlePetLearnCommand(const char* args);
|
||||
bool HandleCreatePetCommand(const char* args);
|
||||
|
||||
bool HandleGroupLeaderCommand(const char* args);
|
||||
bool HandleGroupDisbandCommand(const char* args);
|
||||
bool HandleGroupRemoveCommand(const char* args);
|
||||
|
||||
bool HandleBankCommand(const char* args);
|
||||
bool HandleChangeWeather(const char* args);
|
||||
bool HandleKickPlayerCommand(const char * args);
|
||||
|
||||
bool HandleMaxSkillCommand(const char* args);
|
||||
bool HandleSetSkillCommand(const char* args);
|
||||
bool HandleRespawnCommand(const char* args);
|
||||
bool HandleComeToMeCommand(const char *args);
|
||||
bool HandleCombatStopCommand(const char *args);
|
||||
|
||||
/*bool HandleCharDeleteCommand(const char *args);
|
||||
bool HandleSendMessageCommand(const char * args);*/
|
||||
|
||||
bool HandleFlushArenaPointsCommand(const char *args);
|
||||
bool HandlePlayAllCommand(const char* args);
|
||||
bool HandleRepairitemsCommand(const char* args);
|
||||
|
||||
bool HandleTempGameObjectCommand(const char* args);
|
||||
|
||||
//! Development Commands
|
||||
|
||||
/*bool HandleQuestAdd(const char * args);
|
||||
bool HandleQuestRemove(const char * args);
|
||||
bool HandleQuestComplete(const char * args);*/
|
||||
|
||||
//bool HandleSet32Bit(const char* args);
|
||||
bool HandleSaveAllCommand(const char* args);
|
||||
|
||||
// Utility methods for commands
|
||||
void HandleLearnSkillRecipesHelper(Player* player, uint32 skill_id);
|
||||
|
||||
private:
|
||||
WorldSession* m_session; // != NULL for chat command call and NULL for CLI command
|
||||
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "World.h"
|
||||
#include "Player.h"
|
||||
#include "Chat.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Language.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "SystemConfig.h"
|
||||
#include "revision.h"
|
||||
#include "Util.h"
|
||||
|
||||
bool ChatHandler::HandleHelpCommand(const char* args)
|
||||
{
|
||||
char* cmd = strtok((char*)args, " ");
|
||||
if (!cmd)
|
||||
{
|
||||
ShowHelpForCommand(getCommandTable(), "help");
|
||||
ShowHelpForCommand(getCommandTable(), "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ShowHelpForCommand(getCommandTable(), cmd))
|
||||
SendSysMessage(LANG_NO_HELP_CMD);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleCommandsCommand(const char* /*args*/)
|
||||
{
|
||||
ShowHelpForCommand(getCommandTable(), "");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleStartCommand(const char* /*args*/)
|
||||
{
|
||||
Player* player = m_session->GetPlayer();
|
||||
|
||||
if (player->isInFlight())
|
||||
{
|
||||
SendSysMessage(LANG_YOU_IN_FLIGHT);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player->isInCombat())
|
||||
{
|
||||
SendSysMessage(LANG_YOU_IN_COMBAT);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player->isDead() || player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
|
||||
{
|
||||
// if player is dead and stuck, send ghost to graveyard
|
||||
player->RepopAtGraveyard();
|
||||
return true;
|
||||
}
|
||||
|
||||
// cast spell Stuck
|
||||
player->CastSpell(player, 7355, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleDismountCommand(const char* /*args*/)
|
||||
{
|
||||
Player* player = m_session->GetPlayer();
|
||||
|
||||
//If player is not mounted, so go out :)
|
||||
if (!player->IsMounted())
|
||||
{
|
||||
SendSysMessage(LANG_CHAR_NON_MOUNTED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player->isInFlight())
|
||||
{
|
||||
SendSysMessage(LANG_YOU_IN_FLIGHT);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
player->Dismount();
|
||||
player->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleSaveCommand(const char* /*args*/)
|
||||
{
|
||||
Player* player = m_session->GetPlayer();
|
||||
|
||||
// save GM account without delay and output message
|
||||
if (!AccountMgr::IsPlayerAccount(m_session->GetSecurity()))
|
||||
{
|
||||
if (Player* target = getSelectedPlayer())
|
||||
target->SaveToDB();
|
||||
else
|
||||
player->SaveToDB();
|
||||
SendSysMessage(LANG_PLAYER_SAVED);
|
||||
return true;
|
||||
}
|
||||
|
||||
// save if the player has last been saved over 20 seconds ago
|
||||
uint32 save_interval = sWorld->getIntConfig(CONFIG_INTERVAL_SAVE);
|
||||
if (save_interval == 0 || (save_interval > 20 * IN_MILLISECONDS && player->GetSaveTimer() <= save_interval - 20 * IN_MILLISECONDS))
|
||||
player->SaveToDB();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,633 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "TicketMgr.h"
|
||||
#include "Player.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Chat.h"
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Language.h"
|
||||
#include "CellImpl.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "Util.h"
|
||||
#include "Group.h"
|
||||
|
||||
#ifdef _DEBUG_VMAPS
|
||||
#include "VMapFactory.h"
|
||||
#endif
|
||||
|
||||
bool ChatHandler::HandleNameAnnounceCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
std::string name("Console");
|
||||
if (WorldSession* session = GetSession())
|
||||
name = session->GetPlayer()->GetName();
|
||||
|
||||
sWorld->SendWorldText(LANG_ANNOUNCE_COLOR, name.c_str(), args);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGMNameAnnounceCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
std::string name("Console");
|
||||
if (WorldSession* session = GetSession())
|
||||
name = session->GetPlayer()->GetName();
|
||||
|
||||
sWorld->SendGMText(LANG_GM_ANNOUNCE_COLOR, name.c_str(), args);
|
||||
return true;
|
||||
}
|
||||
|
||||
// global announce
|
||||
bool ChatHandler::HandleAnnounceCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char buff[2048];
|
||||
sprintf(buff, GetTrinityString(LANG_SYSTEMMESSAGE), args);
|
||||
sWorld->SendServerMessage(SERVER_MSG_STRING, buff);
|
||||
return true;
|
||||
}
|
||||
|
||||
// announce to logged in GMs
|
||||
bool ChatHandler::HandleGMAnnounceCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
sWorld->SendGMText(LANG_GM_BROADCAST, args);
|
||||
return true;
|
||||
}
|
||||
|
||||
//notification player at the screen
|
||||
bool ChatHandler::HandleNotifyCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
std::string str = GetTrinityString(LANG_GLOBAL_NOTIFY);
|
||||
str += args;
|
||||
|
||||
WorldPacket data(SMSG_NOTIFICATION, 2 + str.length());
|
||||
data.WriteBits(str.length(), 13);
|
||||
data.FlushBits();
|
||||
data.append(str.c_str(), str.length());
|
||||
sWorld->SendGlobalMessage(&data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//notification GM at the screen
|
||||
bool ChatHandler::HandleGMNotifyCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
std::string str = GetTrinityString(LANG_GM_NOTIFY);
|
||||
str += args;
|
||||
|
||||
WorldPacket data(SMSG_NOTIFICATION, 2 + str.length());
|
||||
data.WriteBits(str.length(), 13);
|
||||
data.FlushBits();
|
||||
data.append(str.c_str(), str.length());
|
||||
sWorld->SendGlobalGMMessage(&data);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//Summon Player
|
||||
bool ChatHandler::HandleSummonCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
Player* _player = m_session->GetPlayer();
|
||||
if (target == _player || target_guid == _player->GetGUID())
|
||||
{
|
||||
PSendSysMessage(LANG_CANT_TELEPORT_SELF);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target)
|
||||
{
|
||||
std::string nameLink = playerLink(target_name);
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
if (target->IsBeingTeleported())
|
||||
{
|
||||
PSendSysMessage(LANG_IS_TELEPORTED, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Map* map = m_session->GetPlayer()->GetMap();
|
||||
|
||||
if (map->IsBattlegroundOrArena())
|
||||
{
|
||||
// only allow if gm mode is on
|
||||
if (!_player->isGameMaster())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
// if both players are in different bgs
|
||||
else if (target->GetBattlegroundId() && m_session->GetPlayer()->GetBattlegroundId() != target->GetBattlegroundId())
|
||||
target->LeaveBattleground(false); // Note: should be changed so target gets no Deserter debuff
|
||||
|
||||
// all's well, set bg id
|
||||
// when porting out from the bg, it will be reset to 0
|
||||
target->SetBattlegroundId(m_session->GetPlayer()->GetBattlegroundId(), m_session->GetPlayer()->GetBattlegroundTypeId());
|
||||
// remember current position as entry point for return at bg end teleportation
|
||||
if (!target->GetMap()->IsBattlegroundOrArena())
|
||||
target->SetBattlegroundEntryPoint();
|
||||
}
|
||||
else if (map->IsDungeon())
|
||||
{
|
||||
Map* cMap = target->GetMap();
|
||||
|
||||
if (cMap->Instanceable() && cMap->GetInstanceId() != map->GetInstanceId())
|
||||
target->UnbindInstance(map->GetInstanceId(), target->GetDungeonDifficulty(), true);
|
||||
|
||||
// we are in instance, and can summon only player in our group with us as lead
|
||||
if (!m_session->GetPlayer()->GetGroup() || !target->GetGroup() ||
|
||||
(target->GetGroup()->GetLeaderGUID() != m_session->GetPlayer()->GetGUID()) ||
|
||||
(m_session->GetPlayer()->GetGroup()->GetLeaderGUID() != m_session->GetPlayer()->GetGUID()))
|
||||
// the last check is a bit excessive, but let it be, just in case
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
|
||||
if (needReportToTarget(target))
|
||||
ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, playerLink(_player->GetName()).c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (target->isInFlight())
|
||||
{
|
||||
target->GetMotionMaster()->MovementExpired();
|
||||
target->CleanupAfterTaxiFlight();
|
||||
}
|
||||
// save only in non-flight case
|
||||
else
|
||||
target->SaveRecallPosition();
|
||||
|
||||
// before GM
|
||||
float x, y, z;
|
||||
m_session->GetPlayer()->GetClosePoint(x, y, z, target->GetObjectSize());
|
||||
target->TeleportTo(m_session->GetPlayer()->GetMapId(), x, y, z, target->GetOrientation());
|
||||
target->SetPhaseMask(m_session->GetPlayer()->GetPhaseMask(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// check offline security
|
||||
if (HasLowerSecurity(NULL, target_guid))
|
||||
return false;
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), GetTrinityString(LANG_OFFLINE));
|
||||
|
||||
// in point where GM stay
|
||||
Player::SavePositionInDB(m_session->GetPlayer()->GetMapId(),
|
||||
m_session->GetPlayer()->GetPositionX(),
|
||||
m_session->GetPlayer()->GetPositionY(),
|
||||
m_session->GetPlayer()->GetPositionZ(),
|
||||
m_session->GetPlayer()->GetOrientation(),
|
||||
m_session->GetPlayer()->GetZoneId(),
|
||||
target_guid);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//Teleport to Player
|
||||
bool ChatHandler::HandleAppearCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
Player* _player = m_session->GetPlayer();
|
||||
if (target == _player || target_guid == _player->GetGUID())
|
||||
{
|
||||
SendSysMessage(LANG_CANT_TELEPORT_SELF);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target)
|
||||
{
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
std::string chrNameLink = playerLink(target_name);
|
||||
|
||||
Map* cMap = target->GetMap();
|
||||
if (cMap->IsBattlegroundOrArena())
|
||||
{
|
||||
// only allow if gm mode is on
|
||||
if (!_player->isGameMaster())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
// if both players are in different bgs
|
||||
else if (_player->GetBattlegroundId() && _player->GetBattlegroundId() != target->GetBattlegroundId())
|
||||
_player->LeaveBattleground(false); // Note: should be changed so _player gets no Deserter debuff
|
||||
|
||||
// all's well, set bg id
|
||||
// when porting out from the bg, it will be reset to 0
|
||||
_player->SetBattlegroundId(target->GetBattlegroundId(), target->GetBattlegroundTypeId());
|
||||
// remember current position as entry point for return at bg end teleportation
|
||||
if (!_player->GetMap()->IsBattlegroundOrArena())
|
||||
_player->SetBattlegroundEntryPoint();
|
||||
}
|
||||
else if (cMap->IsDungeon())
|
||||
{
|
||||
// we have to go to instance, and can go to player only if:
|
||||
// 1) we are in his group (either as leader or as member)
|
||||
// 2) we are not bound to any group and have GM mode on
|
||||
if (_player->GetGroup())
|
||||
{
|
||||
// we are in group, we can go only if we are in the player group
|
||||
if (_player->GetGroup() != target->GetGroup())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_INST_PARTY, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// we are not in group, let's verify our GM mode
|
||||
if (!_player->isGameMaster())
|
||||
{
|
||||
PSendSysMessage(LANG_CANNOT_GO_TO_INST_GM, chrNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if the player or the player's group is bound to another instance
|
||||
// the player will not be bound to another one
|
||||
InstancePlayerBind* pBind = _player->GetBoundInstance(target->GetMapId(), target->GetDifficulty(cMap->IsRaid()));
|
||||
if (!pBind)
|
||||
{
|
||||
Group* group = _player->GetGroup();
|
||||
// if no bind exists, create a solo bind
|
||||
InstanceGroupBind* gBind = group ? group->GetBoundInstance(target) : NULL; // if no bind exists, create a solo bind
|
||||
if (!gBind)
|
||||
if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(target->GetInstanceId()))
|
||||
_player->BindToInstance(save, !save->CanReset());
|
||||
}
|
||||
|
||||
if (cMap->IsRaid())
|
||||
_player->SetRaidDifficulty(target->GetRaidDifficulty());
|
||||
else
|
||||
_player->SetDungeonDifficulty(target->GetDungeonDifficulty());
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_APPEARING_AT, chrNameLink.c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (_player->isInFlight())
|
||||
{
|
||||
_player->GetMotionMaster()->MovementExpired();
|
||||
_player->CleanupAfterTaxiFlight();
|
||||
}
|
||||
// save only in non-flight case
|
||||
else
|
||||
_player->SaveRecallPosition();
|
||||
|
||||
// to point to see at target with same orientation
|
||||
float x, y, z;
|
||||
target->GetContactPoint(_player, x, y, z);
|
||||
|
||||
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE);
|
||||
_player->SetPhaseMask(target->GetPhaseMask(), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// check offline security
|
||||
if (HasLowerSecurity(NULL, target_guid))
|
||||
return false;
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str());
|
||||
|
||||
// to point where player stay (if loaded)
|
||||
float x, y, z, o;
|
||||
uint32 map;
|
||||
bool in_flight;
|
||||
if (!Player::LoadPositionFromDB(map, x, y, z, o, in_flight, target_guid))
|
||||
return false;
|
||||
|
||||
// stop flight if need
|
||||
if (_player->isInFlight())
|
||||
{
|
||||
_player->GetMotionMaster()->MovementExpired();
|
||||
_player->CleanupAfterTaxiFlight();
|
||||
}
|
||||
// save only in non-flight case
|
||||
else
|
||||
_player->SaveRecallPosition();
|
||||
|
||||
_player->TeleportTo(map, x, y, z, _player->GetOrientation());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Teleport player to last position
|
||||
bool ChatHandler::HandleRecallCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
if (!extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
if (target->IsBeingTeleported())
|
||||
{
|
||||
PSendSysMessage(LANG_IS_TELEPORTED, GetNameLink(target).c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// stop flight if need
|
||||
if (target->isInFlight())
|
||||
{
|
||||
target->GetMotionMaster()->MovementExpired();
|
||||
target->CleanupAfterTaxiFlight();
|
||||
}
|
||||
|
||||
target->TeleportTo(target->m_recallMap, target->m_recallX, target->m_recallY, target->m_recallZ, target->m_recallO);
|
||||
return true;
|
||||
}
|
||||
|
||||
//Enable On\OFF all taxi paths
|
||||
bool ChatHandler::HandleTaxiCheatCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string argstr = (char*)args;
|
||||
|
||||
Player* chr = getSelectedPlayer();
|
||||
|
||||
if (!chr)
|
||||
chr = m_session->GetPlayer();
|
||||
else if (HasLowerSecurity(chr, 0)) // check online security
|
||||
return false;
|
||||
|
||||
if (argstr == "on")
|
||||
{
|
||||
chr->SetTaxiCheater(true);
|
||||
PSendSysMessage(LANG_YOU_GIVE_TAXIS, GetNameLink(chr).c_str());
|
||||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, GetNameLink().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argstr == "off")
|
||||
{
|
||||
chr->SetTaxiCheater(false);
|
||||
PSendSysMessage(LANG_YOU_REMOVE_TAXIS, GetNameLink(chr).c_str());
|
||||
if (needReportToTarget(chr))
|
||||
ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, GetNameLink().c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Enable\Dissable accept whispers (for GM)
|
||||
bool ChatHandler::HandleWhispersCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_WHISPERACCEPTING, m_session->GetPlayer()->isAcceptWhispers() ? GetTrinityString(LANG_ON) : GetTrinityString(LANG_OFF));
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string argstr = (char*)args;
|
||||
// whisper on
|
||||
if (argstr == "on")
|
||||
{
|
||||
m_session->GetPlayer()->SetAcceptWhispers(true);
|
||||
SendSysMessage(LANG_COMMAND_WHISPERON);
|
||||
return true;
|
||||
}
|
||||
|
||||
// whisper off
|
||||
if (argstr == "off")
|
||||
{
|
||||
// Remove all players from the Gamemaster's whisper whitelist
|
||||
m_session->GetPlayer()->ClearWhisperWhiteList();
|
||||
m_session->GetPlayer()->SetAcceptWhispers(false);
|
||||
SendSysMessage(LANG_COMMAND_WHISPEROFF);
|
||||
return true;
|
||||
}
|
||||
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Save all players in the world
|
||||
bool ChatHandler::HandleSaveAllCommand(const char* /*args*/)
|
||||
{
|
||||
sObjectAccessor->SaveAllPlayers();
|
||||
SendSysMessage(LANG_PLAYERS_SAVED);
|
||||
return true;
|
||||
}
|
||||
|
||||
//Send mail by command
|
||||
bool ChatHandler::HandleSendMailCommand(const char* args)
|
||||
{
|
||||
// format: name "subject text" "mail text"
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
char* tail1 = strtok(NULL, "");
|
||||
if (!tail1)
|
||||
return false;
|
||||
|
||||
char* msgSubject = extractQuotedArg(tail1);
|
||||
if (!msgSubject)
|
||||
return false;
|
||||
|
||||
char* tail2 = strtok(NULL, "");
|
||||
if (!tail2)
|
||||
return false;
|
||||
|
||||
char* msgText = extractQuotedArg(tail2);
|
||||
if (!msgText)
|
||||
return false;
|
||||
|
||||
// msgSubject, msgText isn't NUL after prev. check
|
||||
std::string subject = msgSubject;
|
||||
std::string text = msgText;
|
||||
|
||||
// from console show not existed sender
|
||||
MailSender sender(MAIL_NORMAL, m_session ? m_session->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM);
|
||||
|
||||
//- TODO: Fix poor design
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
MailDraft(subject, text)
|
||||
.SendMailTo(trans, MailReceiver(target, GUID_LOPART(target_guid)), sender);
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
PSendSysMessage(LANG_MAIL_SENT, nameLink.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
//Summon group of player
|
||||
bool ChatHandler::HandleGroupSummonCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
if (!extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
Group* grp = target->GetGroup();
|
||||
|
||||
std::string nameLink = GetNameLink(target);
|
||||
|
||||
if (!grp)
|
||||
{
|
||||
PSendSysMessage(LANG_NOT_IN_GROUP, nameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Map* gmMap = m_session->GetPlayer()->GetMap();
|
||||
bool to_instance = gmMap->Instanceable();
|
||||
|
||||
// we are in instance, and can summon only player in our group with us as lead
|
||||
if (to_instance && (
|
||||
!m_session->GetPlayer()->GetGroup() || (grp->GetLeaderGUID() != m_session->GetPlayer()->GetGUID()) ||
|
||||
(m_session->GetPlayer()->GetGroup()->GetLeaderGUID() != m_session->GetPlayer()->GetGUID())))
|
||||
// the last check is a bit excessive, but let it be, just in case
|
||||
{
|
||||
SendSysMessage(LANG_CANNOT_SUMMON_TO_INST);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player* player = itr->getSource();
|
||||
|
||||
if (!player || player == m_session->GetPlayer() || !player->GetSession())
|
||||
continue;
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(player, 0))
|
||||
return false;
|
||||
|
||||
std::string plNameLink = GetNameLink(player);
|
||||
|
||||
if (player->IsBeingTeleported() == true)
|
||||
{
|
||||
PSendSysMessage(LANG_IS_TELEPORTED, plNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (to_instance)
|
||||
{
|
||||
Map* plMap = player->GetMap();
|
||||
|
||||
if (plMap->Instanceable() && plMap->GetInstanceId() != gmMap->GetInstanceId())
|
||||
{
|
||||
// cannot summon from instance to instance
|
||||
PSendSysMessage(LANG_CANNOT_SUMMON_TO_INST, plNameLink.c_str());
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
|
||||
if (needReportToTarget(player))
|
||||
ChatHandler(player).PSendSysMessage(LANG_SUMMONED_BY, GetNameLink().c_str());
|
||||
|
||||
// stop flight if need
|
||||
if (player->isInFlight())
|
||||
{
|
||||
player->GetMotionMaster()->MovementExpired();
|
||||
player->CleanupAfterTaxiFlight();
|
||||
}
|
||||
// save only in non-flight case
|
||||
else
|
||||
player->SaveRecallPosition();
|
||||
|
||||
// before GM
|
||||
float x, y, z;
|
||||
m_session->GetPlayer()->GetClosePoint(x, y, z, player->GetObjectSize());
|
||||
player->TeleportTo(m_session->GetPlayer()->GetMapId(), x, y, z, player->GetOrientation());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1,681 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DBCStores.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "Item.h"
|
||||
#include "GameObject.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Chat.h"
|
||||
#include "MapManager.h"
|
||||
#include "Language.h"
|
||||
#include "World.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "WaypointManager.h"
|
||||
#include "Util.h"
|
||||
#include <cctype>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Transport.h"
|
||||
#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand
|
||||
#include "CreatureGroups.h"
|
||||
#include "ace/INET_Addr.h"
|
||||
|
||||
//mute player for some times
|
||||
bool ChatHandler::HandleMuteCommand(const char* args)
|
||||
{
|
||||
char* nameStr;
|
||||
char* delayStr;
|
||||
extractOptFirstArg((char*)args, &nameStr, &delayStr);
|
||||
if (!delayStr)
|
||||
return false;
|
||||
|
||||
char *mutereason = strtok(NULL, "\r");
|
||||
std::string mutereasonstr = "No reason";
|
||||
if (mutereason != NULL)
|
||||
mutereasonstr = mutereason;
|
||||
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
if (!extractPlayerTarget(nameStr, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
uint32 accountId = target ? target->GetSession()->GetAccountId() : sObjectMgr->GetPlayerAccountIdByGUID(target_guid);
|
||||
|
||||
// find only player from same account if any
|
||||
if (!target)
|
||||
if (WorldSession* session = sWorld->FindSession(accountId))
|
||||
target = session->GetPlayer();
|
||||
|
||||
uint32 notspeaktime = (uint32) atoi(delayStr);
|
||||
|
||||
// must have strong lesser security level
|
||||
if (HasLowerSecurity (target, target_guid, true))
|
||||
return false;
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME);
|
||||
|
||||
if (target)
|
||||
{
|
||||
// Target is online, mute will be in effect right away.
|
||||
int64 muteTime = time(NULL) + notspeaktime * MINUTE;
|
||||
target->GetSession()->m_muteTime = muteTime;
|
||||
|
||||
stmt->setInt64(0, muteTime);
|
||||
|
||||
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notspeaktime, mutereasonstr.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Target is offline, mute will be in effect starting from the next login.
|
||||
int32 muteTime = -int32(notspeaktime * MINUTE);
|
||||
|
||||
stmt->setInt64(0, muteTime);
|
||||
}
|
||||
|
||||
stmt->setUInt32(1, accountId);
|
||||
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(target ? LANG_YOU_DISABLE_CHAT : LANG_COMMAND_DISABLE_CHAT_DELAYED, nameLink.c_str(), notspeaktime, mutereasonstr.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//unmute player
|
||||
bool ChatHandler::HandleUnmuteCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
uint32 accountId = target ? target->GetSession()->GetAccountId() : sObjectMgr->GetPlayerAccountIdByGUID(target_guid);
|
||||
|
||||
// find only player from same account if any
|
||||
if (!target)
|
||||
if (WorldSession* session = sWorld->FindSession(accountId))
|
||||
target = session->GetPlayer();
|
||||
|
||||
// must have strong lesser security level
|
||||
if (HasLowerSecurity (target, target_guid, true))
|
||||
return false;
|
||||
|
||||
if (target)
|
||||
{
|
||||
if (target->CanSpeak())
|
||||
{
|
||||
SendSysMessage(LANG_CHAT_ALREADY_ENABLED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
target->GetSession()->m_muteTime = 0;
|
||||
}
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME);
|
||||
|
||||
stmt->setInt64(0, 0);
|
||||
stmt->setUInt32(1, accountId);
|
||||
|
||||
LoginDatabase.Execute(stmt);
|
||||
|
||||
if (target)
|
||||
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_YOU_ENABLE_CHAT, nameLink.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGUIDCommand(const char* /*args*/)
|
||||
{
|
||||
uint64 guid = m_session->GetPlayer()->GetSelection();
|
||||
|
||||
if (guid == 0)
|
||||
{
|
||||
SendSysMessage(LANG_NO_SELECTION);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_OBJECT_GUID, GUID_LOPART(guid), GUID_HIPART(guid));
|
||||
return true;
|
||||
}
|
||||
|
||||
//move item to other slot
|
||||
bool ChatHandler::HandleItemMoveCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
char* pParam1 = strtok((char*)args, " ");
|
||||
if (!pParam1)
|
||||
return false;
|
||||
|
||||
char* pParam2 = strtok(NULL, " ");
|
||||
if (!pParam2)
|
||||
return false;
|
||||
|
||||
uint8 srcslot = (uint8)atoi(pParam1);
|
||||
uint8 dstslot = (uint8)atoi(pParam2);
|
||||
|
||||
if (srcslot == dstslot)
|
||||
return true;
|
||||
|
||||
if (!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0, srcslot, true))
|
||||
return false;
|
||||
|
||||
if (!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0, dstslot, false))
|
||||
return false;
|
||||
|
||||
uint16 src = ((INVENTORY_SLOT_BAG_0 << 8) | srcslot);
|
||||
uint16 dst = ((INVENTORY_SLOT_BAG_0 << 8) | dstslot);
|
||||
|
||||
m_session->GetPlayer()->SwapItem(src, dst);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//kick player
|
||||
bool ChatHandler::HandleKickPlayerCommand(const char *args)
|
||||
{
|
||||
Player* target = NULL;
|
||||
std::string playerName;
|
||||
if (!extractPlayerTarget((char*)args, &target, NULL, &playerName))
|
||||
return false;
|
||||
|
||||
if (m_session && target == m_session->GetPlayer())
|
||||
{
|
||||
SendSysMessage(LANG_COMMAND_KICKSELF);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_SHOW_KICK_IN_WORLD))
|
||||
sWorld->SendWorldText(LANG_COMMAND_KICKMESSAGE, playerName.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_COMMAND_KICKMESSAGE, playerName.c_str());
|
||||
|
||||
target->GetSession()->KickPlayer();
|
||||
return true;
|
||||
}
|
||||
|
||||
//show info of player
|
||||
bool ChatHandler::HandlePInfoCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
std::string target_name;
|
||||
|
||||
uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER);
|
||||
|
||||
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, target_name))
|
||||
{
|
||||
target = sObjectMgr->GetPlayerByLowGUID(parseGUID);
|
||||
target_guid = parseGUID;
|
||||
}
|
||||
else if (!extractPlayerTarget((char*)args, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
|
||||
uint32 accId = 0;
|
||||
uint64 money = 0;
|
||||
uint32 total_player_time = 0;
|
||||
uint8 level = 0;
|
||||
uint32 latency = 0;
|
||||
uint8 race;
|
||||
uint8 Class;
|
||||
int64 muteTime = 0;
|
||||
int64 banTime = -1;
|
||||
uint32 mapId;
|
||||
uint32 areaId;
|
||||
uint32 phase = 0;
|
||||
|
||||
// get additional information from Player object
|
||||
if (target)
|
||||
{
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
accId = target->GetSession()->GetAccountId();
|
||||
money = target->GetMoney();
|
||||
total_player_time = target->GetTotalPlayedTime();
|
||||
level = target->getLevel();
|
||||
latency = target->GetSession()->GetLatency();
|
||||
race = target->getRace();
|
||||
Class = target->getClass();
|
||||
muteTime = target->GetSession()->m_muteTime;
|
||||
mapId = target->GetMapId();
|
||||
areaId = target->GetAreaId();
|
||||
phase = target->GetPhaseMask();
|
||||
}
|
||||
// get additional information from DB
|
||||
else
|
||||
{
|
||||
// check offline security
|
||||
if (HasLowerSecurity(NULL, target_guid))
|
||||
return false;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_PINFO);
|
||||
stmt->setUInt32(0, GUID_LOPART(target_guid));
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (!result)
|
||||
return false;
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
total_player_time = fields[0].GetUInt32();
|
||||
level = fields[1].GetUInt8();
|
||||
money = fields[2].GetUInt64();
|
||||
accId = fields[3].GetUInt32();
|
||||
race = fields[4].GetUInt8();
|
||||
Class = fields[5].GetUInt8();
|
||||
mapId = fields[6].GetUInt16();
|
||||
areaId = fields[7].GetUInt16();
|
||||
}
|
||||
|
||||
std::string username = GetTrinityString(LANG_ERROR);
|
||||
std::string email = GetTrinityString(LANG_ERROR);
|
||||
std::string last_ip = GetTrinityString(LANG_ERROR);
|
||||
uint32 security = 0;
|
||||
std::string last_login = GetTrinityString(LANG_ERROR);
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_PINFO);
|
||||
stmt->setInt32(0, int32(realmID));
|
||||
stmt->setUInt32(1, accId);
|
||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
username = fields[0].GetString();
|
||||
security = fields[1].GetUInt8();
|
||||
email = fields[2].GetString();
|
||||
muteTime = fields[5].GetUInt64();
|
||||
|
||||
if (email.empty())
|
||||
email = "-";
|
||||
|
||||
if (!m_session || m_session->GetSecurity() >= AccountTypes(security))
|
||||
{
|
||||
last_ip = fields[3].GetString();
|
||||
last_login = fields[4].GetString();
|
||||
|
||||
uint32 ip = inet_addr(last_ip.c_str());
|
||||
#if TRINITY_ENDIAN == BIGENDIAN
|
||||
EndianConvertReverse(ip);
|
||||
#endif
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_IP2NATION_COUNTRY);
|
||||
|
||||
stmt->setUInt32(0, ip);
|
||||
|
||||
PreparedQueryResult result2 = WorldDatabase.Query(stmt);
|
||||
|
||||
if (result2)
|
||||
{
|
||||
Field* fields2 = result2->Fetch();
|
||||
last_ip.append(" (");
|
||||
last_ip.append(fields2[0].GetString());
|
||||
last_ip.append(")");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
last_ip = "-";
|
||||
last_login = "-";
|
||||
}
|
||||
}
|
||||
|
||||
std::string nameLink = playerLink(target_name);
|
||||
|
||||
PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetTrinityString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, email.c_str(), security, last_ip.c_str(), last_login.c_str(), latency);
|
||||
|
||||
std::string bannedby = "unknown";
|
||||
std::string banreason = "";
|
||||
|
||||
stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_PINFO_BANS);
|
||||
stmt->setUInt32(0, accId);
|
||||
PreparedQueryResult result2 = LoginDatabase.Query(stmt);
|
||||
if (!result2)
|
||||
{
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PINFO_BANS);
|
||||
stmt->setUInt32(0, GUID_LOPART(target_guid));
|
||||
result2 = CharacterDatabase.Query(stmt);
|
||||
}
|
||||
|
||||
if (result2)
|
||||
{
|
||||
Field* fields = result2->Fetch();
|
||||
banTime = int64(fields[1].GetBool() ? 0 : fields[0].GetUInt32());
|
||||
bannedby = fields[2].GetString();
|
||||
banreason = fields[3].GetString();
|
||||
}
|
||||
|
||||
if (muteTime > 0)
|
||||
PSendSysMessage(LANG_PINFO_MUTE, secsToTimeString(muteTime - time(NULL), true).c_str());
|
||||
|
||||
if (banTime >= 0)
|
||||
PSendSysMessage(LANG_PINFO_BAN, banTime > 0 ? secsToTimeString(banTime - time(NULL), true).c_str() : "permanently", bannedby.c_str(), banreason.c_str());
|
||||
|
||||
std::string race_s, Class_s;
|
||||
switch (race)
|
||||
{
|
||||
case RACE_HUMAN: race_s = "Human"; break;
|
||||
case RACE_ORC: race_s = "Orc"; break;
|
||||
case RACE_DWARF: race_s = "Dwarf"; break;
|
||||
case RACE_NIGHTELF: race_s = "Night Elf"; break;
|
||||
case RACE_UNDEAD_PLAYER: race_s = "Undead"; break;
|
||||
case RACE_TAUREN: race_s = "Tauren"; break;
|
||||
case RACE_GNOME: race_s = "Gnome"; break;
|
||||
case RACE_TROLL: race_s = "Troll"; break;
|
||||
case RACE_BLOODELF: race_s = "Blood Elf"; break;
|
||||
case RACE_DRAENEI: race_s = "Draenei"; break;
|
||||
case RACE_GOBLIN: race_s = "Goblin"; break;
|
||||
case RACE_WORGEN: race_s = "Worgen"; break;
|
||||
}
|
||||
switch (Class)
|
||||
{
|
||||
case CLASS_WARRIOR: Class_s = "Warrior"; break;
|
||||
case CLASS_PALADIN: Class_s = "Paladin"; break;
|
||||
case CLASS_HUNTER: Class_s = "Hunter"; break;
|
||||
case CLASS_ROGUE: Class_s = "Rogue"; break;
|
||||
case CLASS_PRIEST: Class_s = "Priest"; break;
|
||||
case CLASS_DEATH_KNIGHT: Class_s = "Death Knight"; break;
|
||||
case CLASS_SHAMAN: Class_s = "Shaman"; break;
|
||||
case CLASS_MAGE: Class_s = "Mage"; break;
|
||||
case CLASS_WARLOCK: Class_s = "Warlock"; break;
|
||||
case CLASS_DRUID: Class_s = "Druid"; break;
|
||||
}
|
||||
|
||||
std::string timeStr = secsToTimeString(total_player_time, true, true);
|
||||
uint64 gold = money / GOLD;
|
||||
uint64 silv = (money % GOLD) / SILVER;
|
||||
uint64 copp = (money % GOLD) % SILVER;
|
||||
PSendSysMessage(LANG_PINFO_LEVEL, race_s.c_str(), Class_s.c_str(), timeStr.c_str(), level, gold, silv, copp);
|
||||
|
||||
// Add map, zone, subzone and phase to output
|
||||
int locale = GetSessionDbcLocale();
|
||||
std::string areaName = "<unknown>";
|
||||
std::string zoneName = "";
|
||||
|
||||
MapEntry const* map = sMapStore.LookupEntry(mapId);
|
||||
|
||||
AreaTableEntry const* area = GetAreaEntryByAreaID(areaId);
|
||||
if (area)
|
||||
{
|
||||
areaName = area->area_name[locale];
|
||||
|
||||
AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone);
|
||||
|
||||
if (zone)
|
||||
zoneName = zone->area_name[locale];
|
||||
}
|
||||
|
||||
if (target)
|
||||
{
|
||||
if (!zoneName.empty())
|
||||
PSendSysMessage(LANG_PINFO_MAP_ONLINE, map->name[locale], zoneName.c_str(), areaName.c_str(), phase);
|
||||
else
|
||||
PSendSysMessage(LANG_PINFO_MAP_ONLINE, map->name[locale], areaName.c_str(), "<unknown>", phase);
|
||||
}
|
||||
else
|
||||
PSendSysMessage(LANG_PINFO_MAP_OFFLINE, map->name[locale], areaName.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleCombatStopCommand(const char* args)
|
||||
{
|
||||
Player* target = NULL;
|
||||
|
||||
if (args && strlen(args) > 0)
|
||||
{
|
||||
target = sObjectAccessor->FindPlayerByName(args);
|
||||
if (!target)
|
||||
{
|
||||
SendSysMessage(LANG_PLAYER_NOT_FOUND);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!target)
|
||||
if (!extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
target->CombatStop();
|
||||
target->getHostileRefManager().deleteReferences();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ChatHandler::HandleRepairitemsCommand(const char* args)
|
||||
{
|
||||
Player* target;
|
||||
if (!extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
// Repair items
|
||||
target->DurabilityRepairAll(false, 0, false);
|
||||
|
||||
PSendSysMessage(LANG_YOU_REPAIR_ITEMS, GetNameLink(target).c_str());
|
||||
if (needReportToTarget(target))
|
||||
ChatHandler(target).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, GetNameLink().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleWaterwalkCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player* player = getSelectedPlayer();
|
||||
|
||||
if (!player)
|
||||
{
|
||||
PSendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (HasLowerSecurity(player, 0))
|
||||
return false;
|
||||
|
||||
if (strncmp(args, "on", 3) == 0)
|
||||
player->SendMovementSetWaterWalking(true); // ON
|
||||
else if (strncmp(args, "off", 4) == 0)
|
||||
player->SendMovementSetWaterWalking(false); // OFF
|
||||
else
|
||||
{
|
||||
SendSysMessage(LANG_USE_BOL);
|
||||
return false;
|
||||
}
|
||||
|
||||
PSendSysMessage(LANG_YOU_SET_WATERWALK, args, GetNameLink(player).c_str());
|
||||
if (needReportToTarget(player))
|
||||
ChatHandler(player).PSendSysMessage(LANG_YOUR_WATERWALK_SET, args, GetNameLink().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleCreatePetCommand(const char* /*args*/)
|
||||
{
|
||||
Player* player = m_session->GetPlayer();
|
||||
Creature* creatureTarget = getSelectedCreature();
|
||||
|
||||
if (!creatureTarget || creatureTarget->isPet() || creatureTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
PSendSysMessage(LANG_SELECT_CREATURE);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creatureTarget->GetEntry());
|
||||
// Creatures with family 0 crashes the server
|
||||
if (cInfo->family == 0)
|
||||
{
|
||||
PSendSysMessage("This creature cannot be tamed. (family id: 0).");
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player->GetPetGUID())
|
||||
{
|
||||
PSendSysMessage("You already have a pet");
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Everything looks OK, create new pet
|
||||
Pet* pet = new Pet(player, HUNTER_PET);
|
||||
if (!pet->CreateBaseAtCreature(creatureTarget))
|
||||
{
|
||||
delete pet;
|
||||
PSendSysMessage("Error 1");
|
||||
return false;
|
||||
}
|
||||
|
||||
creatureTarget->setDeathState(JUST_DIED);
|
||||
creatureTarget->RemoveCorpse();
|
||||
creatureTarget->SetHealth(0); // just for nice GM-mode view
|
||||
|
||||
pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, player->GetGUID());
|
||||
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, player->getFaction());
|
||||
|
||||
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
|
||||
{
|
||||
sLog->outError("InitStatsForLevel() in EffectTameCreature failed! Pet deleted.");
|
||||
PSendSysMessage("Error 2");
|
||||
delete pet;
|
||||
return false;
|
||||
}
|
||||
|
||||
// prepare visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel()-1);
|
||||
|
||||
pet->GetCharmInfo()->SetPetNumber(sObjectMgr->GeneratePetNumber(), true);
|
||||
// this enables pet details window (Shift+P)
|
||||
pet->InitPetCreateSpells();
|
||||
pet->SetFullHealth();
|
||||
|
||||
pet->GetMap()->AddToMap(pet->ToCreature());
|
||||
|
||||
// visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, creatureTarget->getLevel());
|
||||
|
||||
player->SetMinion(pet, true);
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
player->PetSpellInitialize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandlePetLearnCommand(const char* args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player* player = m_session->GetPlayer();
|
||||
Pet* pet = player->GetPet();
|
||||
|
||||
if (!pet)
|
||||
{
|
||||
PSendSysMessage("You have no pet");
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 spellId = extractSpellIdFromLink((char*)args);
|
||||
|
||||
if (!spellId || !sSpellMgr->GetSpellInfo(spellId))
|
||||
return false;
|
||||
|
||||
// Check if pet already has it
|
||||
if (pet->HasSpell(spellId))
|
||||
{
|
||||
PSendSysMessage("Pet already has spell: %u", spellId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if spell is valid
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo))
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spellId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
pet->learnSpell(spellId);
|
||||
|
||||
PSendSysMessage("Pet has learned spell %u", spellId);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandlePetUnlearnCommand(const char *args)
|
||||
{
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
Player* player = m_session->GetPlayer();
|
||||
Pet* pet = player->GetPet();
|
||||
|
||||
if (!pet)
|
||||
{
|
||||
PSendSysMessage("You have no pet");
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 spellId = extractSpellIdFromLink((char*)args);
|
||||
|
||||
if (pet->HasSpell(spellId))
|
||||
pet->removeSpell(spellId, false);
|
||||
else
|
||||
PSendSysMessage("Pet doesn't have that spell");
|
||||
|
||||
return true;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -71,4 +71,3 @@ class HostileRefManager : public RefManager<Unit, ThreatManager>
|
||||
};
|
||||
//=================================================
|
||||
#endif
|
||||
|
||||
@@ -194,7 +194,6 @@ void HostileReference::updateOnlineStatus()
|
||||
}
|
||||
else
|
||||
accessible = true;
|
||||
|
||||
}
|
||||
setAccessibleState(accessible);
|
||||
setOnlineOfflineState(online);
|
||||
|
||||
@@ -77,7 +77,6 @@ class UnitBaseEvent
|
||||
bool matchesTypeMask(uint32 pMask) const { return iType & pMask; }
|
||||
|
||||
void setType(uint32 pType) { iType = pType; }
|
||||
|
||||
};
|
||||
|
||||
//==============================================================
|
||||
@@ -134,4 +133,3 @@ class ThreatManagerEvent : public ThreatRefStatusChangeEvent
|
||||
|
||||
//==============================================================
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "Player.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellMgr.h"
|
||||
@@ -686,7 +685,7 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
//must clear all custom handled cases (groupped types) before reload
|
||||
if (isReload)
|
||||
{
|
||||
sLog->outString("Reseting Loot Conditions...");
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Reseting Loot Conditions...");
|
||||
LootTemplates_Creature.ResetConditions();
|
||||
LootTemplates_Fishing.ResetConditions();
|
||||
LootTemplates_Gameobject.ResetConditions();
|
||||
@@ -700,10 +699,10 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
LootTemplates_Prospecting.ResetConditions();
|
||||
LootTemplates_Spell.ResetConditions();
|
||||
|
||||
sLog->outString("Re-Loading `gossip_menu` Table for Conditions!");
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu` Table for Conditions!");
|
||||
sObjectMgr->LoadGossipMenu();
|
||||
|
||||
sLog->outString("Re-Loading `gossip_menu_option` Table for Conditions!");
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading `gossip_menu_option` Table for Conditions!");
|
||||
sObjectMgr->LoadGossipMenuItems();
|
||||
sSpellMgr->UnloadSpellInfoImplicitTargetConditionLists();
|
||||
}
|
||||
@@ -713,8 +712,8 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outErrorDb(">> Loaded 0 conditions. DB table `conditions` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 conditions. DB table `conditions` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -722,7 +721,6 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
Condition* cond = new Condition();
|
||||
@@ -750,7 +748,7 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
{
|
||||
if (iConditionTypeOrReference == iSourceTypeOrReferenceId)//self referencing, skip
|
||||
{
|
||||
sLog->outErrorDb("Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition reference %i is referencing self, skipped", iSourceTypeOrReferenceId);
|
||||
delete cond;
|
||||
continue;
|
||||
}
|
||||
@@ -761,19 +759,19 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
rowType = "reference";
|
||||
//check for useless data
|
||||
if (cond->ConditionTarget)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in ConditionTarget (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionTarget);
|
||||
if (cond->ConditionValue1)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in value1 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue1);
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in value2 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in value3 (%u)!", rowType, iSourceTypeOrReferenceId, cond->ConditionValue3);
|
||||
if (cond->NegativeCondition)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in NegativeCondition (%u)!", rowType, iSourceTypeOrReferenceId, cond->NegativeCondition);
|
||||
if (cond->SourceGroup && iSourceTypeOrReferenceId < 0)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in SourceGroup (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceGroup);
|
||||
if (cond->SourceEntry && iSourceTypeOrReferenceId < 0)
|
||||
sLog->outErrorDb("Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition %s %i has useless data in SourceEntry (%u)!", rowType, iSourceTypeOrReferenceId, cond->SourceEntry);
|
||||
}
|
||||
else if (!isConditionTypeValid(cond))//doesn't have reference, validate ConditionType
|
||||
{
|
||||
@@ -804,13 +802,13 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
//Grouping is only allowed for some types (loot templates, gossip menus, gossip items)
|
||||
if (cond->SourceGroup && !CanHaveSourceGroupSet(cond->SourceType))
|
||||
{
|
||||
sLog->outErrorDb("Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition type %u has not allowed value of SourceGroup = %u!", uint32(cond->SourceType), cond->SourceGroup);
|
||||
delete cond;
|
||||
continue;
|
||||
}
|
||||
if (cond->SourceId && !CanHaveSourceIdSet(cond->SourceType))
|
||||
{
|
||||
sLog->outErrorDb("Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Condition type %u has not allowed value of SourceId = %u!", uint32(cond->SourceType), cond->SourceId);
|
||||
delete cond;
|
||||
continue;
|
||||
}
|
||||
@@ -896,7 +894,7 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
sLog->outErrorDb("Not handled grouped condition, SourceGroup %u", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "Not handled grouped condition, SourceGroup %u", cond->SourceGroup);
|
||||
delete cond;
|
||||
}
|
||||
else
|
||||
@@ -928,22 +926,22 @@ void ConditionMgr::LoadConditions(bool isReload)
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
bool ConditionMgr::addToLootTemplate(Condition* cond, LootTemplate* loot)
|
||||
{
|
||||
if (!loot)
|
||||
{
|
||||
sLog->outErrorDb("ConditionMgr: LootTemplate %u not found", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "ConditionMgr: LootTemplate %u not found", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (loot->addConditionItem(cond))
|
||||
return true;
|
||||
|
||||
sLog->outErrorDb("ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "ConditionMgr: Item %u not found in LootTemplate %u", cond->SourceEntry, cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -963,7 +961,7 @@ bool ConditionMgr::addToGossipMenus(Condition* cond)
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outErrorDb("addToGossipMenus: GossipMenu %u not found", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "addToGossipMenus: GossipMenu %u not found", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -982,7 +980,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outErrorDb("addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "addToGossipMenuItems: GossipMenuId %u Item %u not found", cond->SourceGroup, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1037,7 +1035,7 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
|
||||
// we have overlapping masks in db
|
||||
if (conditionEffMask != *itr)
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - "
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set - "
|
||||
"effect masks are overlapping (all SourceGroup values having given bit set must be equal) - ignoring.", cond->SourceEntry, cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
@@ -1062,7 +1060,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (cond->SourceType == CONDITION_SOURCE_TYPE_NONE || cond->SourceType >= CONDITION_SOURCE_TYPE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType));
|
||||
sLog->outError(LOG_FILTER_SQL, "Invalid ConditionSourceType %u in `condition` table, ignoring.", uint32(cond->SourceType));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1072,7 +1070,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Creature.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `creature_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1080,7 +1078,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1089,7 +1087,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Disenchant.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `disenchant_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1097,7 +1095,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1106,7 +1104,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Fishing.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `fishing_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1114,7 +1112,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1123,7 +1121,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Gameobject.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `gameobject_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1131,7 +1129,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1140,7 +1138,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Item.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `item_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1148,7 +1146,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1157,7 +1155,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Mail.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `mail_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1165,7 +1163,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1174,7 +1172,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Milling.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `milling_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1182,7 +1180,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1191,7 +1189,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Pickpocketing.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `pickpocketing_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1199,7 +1197,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1208,7 +1206,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Prospecting.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `prospecting_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1216,7 +1214,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1225,7 +1223,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Reference.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `reference_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1233,7 +1231,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1242,7 +1240,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Skinning.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `skinning_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1250,7 +1248,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1259,7 +1257,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!LootTemplates_Spell.HaveLootFor(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceGroup %u in `condition` table, does not exist in `spell_loot_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1267,7 +1265,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
ItemTemplate const* pItemProto = sObjectMgr->GetItemTemplate(cond->SourceEntry);
|
||||
if (!pItemProto && !loot->isReference(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, does not exist in `item_template`, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1277,13 +1275,13 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(cond->SourceEntry);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((cond->SourceGroup > MAX_EFFECT_MASK) || !cond->SourceGroup)
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set , ignoring.", cond->SourceEntry, cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, has incorrect SourceGroup %u (spell effectMask) set , ignoring.", cond->SourceEntry, cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1314,7 +1312,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
break;
|
||||
}
|
||||
|
||||
sLog->outErrorDb("SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(i));
|
||||
cond->SourceGroup &= ~(1<<i);
|
||||
}
|
||||
// all effects were removed, no need to add the condition at all
|
||||
@@ -1326,7 +1324,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
{
|
||||
if (!sObjectMgr->GetCreatureTemplate(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1336,7 +1334,7 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
SpellInfo const* spellProto = sSpellMgr->GetSpellInfo(cond->SourceEntry);
|
||||
if (!spellProto)
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1344,40 +1342,40 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
|
||||
case CONDITION_SOURCE_TYPE_QUEST_ACCEPT:
|
||||
if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_QUEST_ACCEPT specifies non-existing quest (%u), skipped", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK:
|
||||
if (!sObjectMgr->GetQuestTemplate(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK specifies non-existing quest (%u), skipped", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CONDITION_SOURCE_TYPE_VEHICLE_SPELL:
|
||||
if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case CONDITION_SOURCE_TYPE_SPELL_CLICK_EVENT:
|
||||
if (!sObjectMgr->GetCreatureTemplate(cond->SourceGroup))
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `creature_template`, ignoring.", cond->SourceGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sSpellMgr->GetSpellInfo(cond->SourceEntry))
|
||||
{
|
||||
sLog->outErrorDb("SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceEntry %u in `condition` table, does not exist in `spell.dbc`, ignoring.", cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1395,13 +1393,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
{
|
||||
if (cond->ConditionType == CONDITION_NONE || cond->ConditionType >= CONDITION_MAX)
|
||||
{
|
||||
sLog->outErrorDb("Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Invalid ConditionType %u at SourceEntry %u in `condition` table, ignoring.", uint32(cond->ConditionType), cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionTarget >= cond->GetMaxAvailableConditionTargets())
|
||||
{
|
||||
sLog->outErrorDb("SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
sLog->outError(LOG_FILTER_SQL, "SourceType %u, SourceEntry %u in `condition` table, has incorrect ConditionTarget set, ignoring.", cond->SourceType, cond->SourceEntry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1411,17 +1409,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
|
||||
{
|
||||
sLog->outErrorDb("Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Aura condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2 > EFFECT_2)
|
||||
{
|
||||
sLog->outErrorDb("Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Aura condition has non existing effect index (%u) (must be 0..2), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Aura condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Aura condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_ITEM:
|
||||
@@ -1429,13 +1427,13 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
|
||||
if (!proto)
|
||||
{
|
||||
sLog->outErrorDb("Item condition has non existing item (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Item condition has non existing item (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!cond->ConditionValue2)
|
||||
{
|
||||
sLog->outErrorDb("Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Item condition has 0 set for item count in value2 (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1445,14 +1443,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(cond->ConditionValue1);
|
||||
if (!proto)
|
||||
{
|
||||
sLog->outErrorDb("ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ItemEquipped condition has non existing item (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "ItemEquipped condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "ItemEquipped condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_ZONEID:
|
||||
@@ -1460,20 +1458,20 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(cond->ConditionValue1);
|
||||
if (!areaEntry)
|
||||
{
|
||||
sLog->outErrorDb("ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ZoneID condition has non existing area (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (areaEntry->zone != 0)
|
||||
{
|
||||
sLog->outErrorDb("ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ZoneID condition requires to be in area (%u) which is a subzone but zone expected, skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "ZoneID condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "ZoneID condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_REPUTATION_RANK:
|
||||
@@ -1481,25 +1479,25 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(cond->ConditionValue1);
|
||||
if (!factionEntry)
|
||||
{
|
||||
sLog->outErrorDb("Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Reputation condition has non existing faction (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Reputation condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_TEAM:
|
||||
{
|
||||
if (cond->ConditionValue1 != ALLIANCE && cond->ConditionValue1 != HORDE)
|
||||
{
|
||||
sLog->outErrorDb("Team condition specifies unknown team (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Team condition specifies unknown team (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Team condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Team condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Team condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Team condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_SKILL:
|
||||
@@ -1507,17 +1505,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(cond->ConditionValue1);
|
||||
if (!pSkill)
|
||||
{
|
||||
sLog->outErrorDb("Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Skill condition specifies non-existing skill (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2 < 1 || cond->ConditionValue2 > sWorld->GetConfigMaxSkillValue())
|
||||
{
|
||||
sLog->outErrorDb("Skill condition specifies invalid skill value (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Skill condition specifies invalid skill value (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Skill condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Skill condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_QUESTREWARDED:
|
||||
@@ -1527,14 +1525,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
{
|
||||
if (!sObjectMgr->GetQuestTemplate(cond->ConditionValue1))
|
||||
{
|
||||
sLog->outErrorDb("Quest condition specifies non-existing quest (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Quest condition specifies non-existing quest (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2 > 1)
|
||||
sLog->outErrorDb("Quest condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Quest condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Quest condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Quest condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_ACTIVE_EVENT:
|
||||
@@ -1542,14 +1540,14 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr->GetEventMap();
|
||||
if (cond->ConditionValue1 >=events.size() || !events[cond->ConditionValue1].isValid())
|
||||
{
|
||||
sLog->outErrorDb("ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ActiveEvent condition has non existing event id (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "ActiveEvent condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "ActiveEvent condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_ACHIEVEMENT:
|
||||
@@ -1557,42 +1555,42 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
AchievementEntry const* achievement = sAchievementStore.LookupEntry(cond->ConditionValue1);
|
||||
if (!achievement)
|
||||
{
|
||||
sLog->outErrorDb("Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Achivement condition has non existing achivement id (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Achivement condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Achivement condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_CLASS:
|
||||
{
|
||||
if (!(cond->ConditionValue1 & CLASSMASK_ALL_PLAYABLE))
|
||||
{
|
||||
sLog->outErrorDb("Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
|
||||
sLog->outError(LOG_FILTER_SQL, "Class condition has non existing classmask (%u), skipped", cond->ConditionValue1 & ~CLASSMASK_ALL_PLAYABLE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Class condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Class condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Class condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Class condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_RACE:
|
||||
{
|
||||
if (!(cond->ConditionValue1 & RACEMASK_ALL_PLAYABLE))
|
||||
{
|
||||
sLog->outErrorDb("Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
|
||||
sLog->outError(LOG_FILTER_SQL, "Race condition has non existing racemask (%u), skipped", cond->ConditionValue1 & ~RACEMASK_ALL_PLAYABLE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Race condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Race condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Race condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_MAPID:
|
||||
@@ -1600,77 +1598,77 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
MapEntry const* me = sMapStore.LookupEntry(cond->ConditionValue1);
|
||||
if (!me)
|
||||
{
|
||||
sLog->outErrorDb("Map condition has non existing map (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Map condition has non existing map (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Map condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Map condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Map condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Map condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_SPELL:
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(cond->ConditionValue1))
|
||||
{
|
||||
sLog->outErrorDb("Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Spell condition has non existing spell (Id: %d), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Spell condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Spell condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Spell condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Spell condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_LEVEL:
|
||||
{
|
||||
if (cond->ConditionValue2 >= COMP_TYPE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("Level condition has invalid option (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Level condition has invalid option (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Level condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Level condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_DRUNKENSTATE:
|
||||
{
|
||||
if (cond->ConditionValue1 > DRUNKEN_SMASHED)
|
||||
{
|
||||
sLog->outErrorDb("DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "DrunkState condition has invalid state (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue2)
|
||||
{
|
||||
sLog->outErrorDb("DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "DrunkState condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "DrunkState condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_NEAR_CREATURE:
|
||||
{
|
||||
if (!sObjectMgr->GetCreatureTemplate(cond->ConditionValue1))
|
||||
{
|
||||
sLog->outErrorDb("NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "NearCreature condition has non existing creature template entry (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "NearCreature condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_NEAR_GAMEOBJECT:
|
||||
{
|
||||
if (!sObjectMgr->GetGameObjectTemplate(cond->ConditionValue1))
|
||||
{
|
||||
sLog->outErrorDb("NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "NearGameObject condition has non existing gameobject template entry (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "NearGameObject condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_OBJECT_ENTRY:
|
||||
@@ -1680,79 +1678,79 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
case TYPEID_UNIT:
|
||||
if (cond->ConditionValue2 && !sObjectMgr->GetCreatureTemplate(cond->ConditionValue2))
|
||||
{
|
||||
sLog->outErrorDb("ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has non existing creature template entry (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case TYPEID_GAMEOBJECT:
|
||||
if (cond->ConditionValue2 && !sObjectMgr->GetGameObjectTemplate(cond->ConditionValue2))
|
||||
{
|
||||
sLog->outErrorDb("ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has non existing game object template entry (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case TYPEID_PLAYER:
|
||||
case TYPEID_CORPSE:
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
break;
|
||||
default:
|
||||
sLog->outErrorDb("ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has wrong typeid set (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "ObjectEntry condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_TYPE_MASK:
|
||||
{
|
||||
if (!cond->ConditionValue1 || (cond->ConditionValue1 & ~(TYPEMASK_UNIT | TYPEMASK_PLAYER | TYPEMASK_GAMEOBJECT | TYPEMASK_CORPSE)))
|
||||
{
|
||||
sLog->outErrorDb("TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "TypeMask condition has invalid typemask set (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "TypeMask condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "TypeMask condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_RELATION_TO:
|
||||
{
|
||||
if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
|
||||
{
|
||||
sLog->outErrorDb("RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "RelationTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue1 == cond->ConditionTarget)
|
||||
{
|
||||
sLog->outErrorDb("RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "RelationTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue2 >= RELATION_MAX)
|
||||
{
|
||||
sLog->outErrorDb("RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "RelationTo condition has invalid ConditionValue2(RelationType) (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "RelationTo condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_REACTION_TO:
|
||||
{
|
||||
if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
|
||||
{
|
||||
sLog->outErrorDb("ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ReactionTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue1 == cond->ConditionTarget)
|
||||
{
|
||||
sLog->outErrorDb("ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "ReactionTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (!cond->ConditionValue2)
|
||||
{
|
||||
sLog->outErrorDb("mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "mConditionValue2 condition has invalid ConditionValue2(rankMask) (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1761,17 +1759,17 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
{
|
||||
if (cond->ConditionValue1 >= cond->GetMaxAvailableConditionTargets())
|
||||
{
|
||||
sLog->outErrorDb("DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "DistanceTo condition has invalid ConditionValue1(ConditionTarget selection) (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue1 == cond->ConditionTarget)
|
||||
{
|
||||
sLog->outErrorDb("DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "DistanceTo condition has ConditionValue1(ConditionTarget selection) set to self (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3 >= COMP_TYPE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "DistanceTo condition has invalid ComparisionType (%u), skipped", cond->ConditionValue3);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -1779,38 +1777,38 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
case CONDITION_ALIVE:
|
||||
{
|
||||
if (cond->ConditionValue1)
|
||||
sLog->outErrorDb("Alive condition has useless data in value1 (%u)!", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Alive condition has useless data in value1 (%u)!", cond->ConditionValue1);
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Alive condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Alive condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Alive condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Alive condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_HP_VAL:
|
||||
{
|
||||
if (cond->ConditionValue2 >= COMP_TYPE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "HpVal condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "HpVal condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_HP_PCT:
|
||||
{
|
||||
if (cond->ConditionValue1 > 100)
|
||||
{
|
||||
sLog->outErrorDb("HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "HpPct condition has too big percent value (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue2 >= COMP_TYPE_MAX)
|
||||
{
|
||||
sLog->outErrorDb("HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "HpPct condition has invalid ComparisionType (%u), skipped", cond->ConditionValue2);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "HpPct condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_AREAID:
|
||||
@@ -1820,19 +1818,19 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
{
|
||||
if (!sWorld->getWorldState(cond->ConditionValue1))
|
||||
{
|
||||
sLog->outErrorDb("World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "World state condition has non existing world state in value1 (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("World state condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "World state condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_PHASEMASK:
|
||||
{
|
||||
if (cond->ConditionValue2)
|
||||
sLog->outErrorDb("Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
sLog->outError(LOG_FILTER_SQL, "Phasemask condition has useless data in value2 (%u)!", cond->ConditionValue2);
|
||||
if (cond->ConditionValue3)
|
||||
sLog->outErrorDb("Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
sLog->outError(LOG_FILTER_SQL, "Phasemask condition has useless data in value3 (%u)!", cond->ConditionValue3);
|
||||
break;
|
||||
}
|
||||
case CONDITION_TITLE:
|
||||
@@ -1840,22 +1838,22 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(cond->ConditionValue1);
|
||||
if (!titleEntry)
|
||||
{
|
||||
sLog->outErrorDb("Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "Title condition has non existing title in value1 (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONDITION_UNUSED_19:
|
||||
sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_19 in `conditions` table - ignoring");
|
||||
sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_19 in `conditions` table - ignoring");
|
||||
return false;
|
||||
case CONDITION_UNUSED_20:
|
||||
sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring");
|
||||
sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_20 in `conditions` table - ignoring");
|
||||
return false;
|
||||
case CONDITION_UNUSED_21:
|
||||
sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring");
|
||||
sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_21 in `conditions` table - ignoring");
|
||||
return false;
|
||||
case CONDITION_UNUSED_24:
|
||||
sLog->outErrorDb("Found ConditionTypeOrReference = CONDITION_UNUSED_24 in `conditions` table - ignoring");
|
||||
sLog->outError(LOG_FILTER_SQL, "Found ConditionTypeOrReference = CONDITION_UNUSED_24 in `conditions` table - ignoring");
|
||||
return false;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -59,8 +59,8 @@ void LoadDisables()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 disables. DB table `disables` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded 0 disables. DB table `disables` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void LoadDisables()
|
||||
DisableType type = DisableType(fields[0].GetUInt32());
|
||||
if (type >= MAX_DISABLE_TYPES)
|
||||
{
|
||||
sLog->outErrorDb("Invalid type %u specified in `disables` table, skipped.", type);
|
||||
sLog->outError(LOG_FILTER_SQL, "Invalid type %u specified in `disables` table, skipped.", type);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -88,13 +88,13 @@ void LoadDisables()
|
||||
case DISABLE_TYPE_SPELL:
|
||||
if (!(sSpellMgr->GetSpellInfo(entry) || flags & SPELL_DISABLE_DEPRECATED_SPELL))
|
||||
{
|
||||
sLog->outErrorDb("Spell entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Spell entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!flags || flags > MAX_SPELL_DISABLE_TYPE)
|
||||
{
|
||||
sLog->outErrorDb("Disable flags for spell %u are invalid, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Disable flags for spell %u are invalid, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ void LoadDisables()
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
|
||||
if (!mapEntry)
|
||||
{
|
||||
sLog->outErrorDb("Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
bool isFlagInvalid = false;
|
||||
@@ -142,12 +142,12 @@ void LoadDisables()
|
||||
break;
|
||||
case MAP_BATTLEGROUND:
|
||||
case MAP_ARENA:
|
||||
sLog->outErrorDb("Battleground map %u specified to be disabled in map case, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Battleground map %u specified to be disabled in map case, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
if (isFlagInvalid)
|
||||
{
|
||||
sLog->outErrorDb("Disable flags for map %u are invalid, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Disable flags for map %u are invalid, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -155,64 +155,64 @@ void LoadDisables()
|
||||
case DISABLE_TYPE_BATTLEGROUND:
|
||||
if (!sBattlemasterListStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("Battleground entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Battleground entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
if (flags)
|
||||
sLog->outErrorDb("Disable flags specified for battleground %u, useless data.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Disable flags specified for battleground %u, useless data.", entry);
|
||||
break;
|
||||
case DISABLE_TYPE_OUTDOORPVP:
|
||||
if (entry > MAX_OUTDOORPVP_TYPES)
|
||||
{
|
||||
sLog->outErrorDb("OutdoorPvPTypes value %u from `disables` is invalid, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "OutdoorPvPTypes value %u from `disables` is invalid, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
if (flags)
|
||||
sLog->outErrorDb("Disable flags specified for outdoor PvP %u, useless data.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Disable flags specified for outdoor PvP %u, useless data.", entry);
|
||||
break;
|
||||
case DISABLE_TYPE_ACHIEVEMENT_CRITERIA:
|
||||
if (!sAchievementCriteriaStore.LookupEntry(entry))
|
||||
{
|
||||
sLog->outErrorDb("Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Achievement Criteria entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
if (flags)
|
||||
sLog->outErrorDb("Disable flags specified for Achievement Criteria %u, useless data.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Disable flags specified for Achievement Criteria %u, useless data.", entry);
|
||||
break;
|
||||
case DISABLE_TYPE_VMAP:
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
|
||||
if (!mapEntry)
|
||||
{
|
||||
sLog->outErrorDb("Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Map entry %u from `disables` doesn't exist in dbc, skipped.", entry);
|
||||
continue;
|
||||
}
|
||||
switch (mapEntry->map_type)
|
||||
{
|
||||
case MAP_COMMON:
|
||||
if (flags & VMAP_DISABLE_AREAFLAG)
|
||||
sLog->outString("Areaflag disabled for world map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Areaflag disabled for world map %u.", entry);
|
||||
if (flags & VMAP_DISABLE_LIQUIDSTATUS)
|
||||
sLog->outString("Liquid status disabled for world map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Liquid status disabled for world map %u.", entry);
|
||||
break;
|
||||
case MAP_INSTANCE:
|
||||
case MAP_RAID:
|
||||
if (flags & VMAP_DISABLE_HEIGHT)
|
||||
sLog->outString("Height disabled for instance map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Height disabled for instance map %u.", entry);
|
||||
if (flags & VMAP_DISABLE_LOS)
|
||||
sLog->outString("LoS disabled for instance map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "LoS disabled for instance map %u.", entry);
|
||||
break;
|
||||
case MAP_BATTLEGROUND:
|
||||
if (flags & VMAP_DISABLE_HEIGHT)
|
||||
sLog->outString("Height disabled for battleground map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Height disabled for battleground map %u.", entry);
|
||||
if (flags & VMAP_DISABLE_LOS)
|
||||
sLog->outString("LoS disabled for battleground map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "LoS disabled for battleground map %u.", entry);
|
||||
break;
|
||||
case MAP_ARENA:
|
||||
if (flags & VMAP_DISABLE_HEIGHT)
|
||||
sLog->outString("Height disabled for arena map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Height disabled for arena map %u.", entry);
|
||||
if (flags & VMAP_DISABLE_LOS)
|
||||
sLog->outString("LoS disabled for arena map %u.", entry);
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "LoS disabled for arena map %u.", entry);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -228,8 +228,8 @@ void LoadDisables()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Loaded %u disables in %u ms", total_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void CheckQuestDisables()
|
||||
@@ -239,8 +239,8 @@ void CheckQuestDisables()
|
||||
uint32 count = m_DisableMap[DISABLE_TYPE_QUEST].size();
|
||||
if (!count)
|
||||
{
|
||||
sLog->outString(">> Checked 0 quest disables.");
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Checked 0 quest disables.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,17 +250,17 @@ void CheckQuestDisables()
|
||||
const uint32 entry = itr->first;
|
||||
if (!sObjectMgr->GetQuestTemplate(entry))
|
||||
{
|
||||
sLog->outErrorDb("Quest entry %u from `disables` doesn't exist, skipped.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Quest entry %u from `disables` doesn't exist, skipped.", entry);
|
||||
m_DisableMap[DISABLE_TYPE_QUEST].erase(itr++);
|
||||
continue;
|
||||
}
|
||||
if (itr->second.flags)
|
||||
sLog->outErrorDb("Disable flags specified for quest %u, useless data.", entry);
|
||||
sLog->outError(LOG_FILTER_SQL, "Disable flags specified for quest %u, useless data.", entry);
|
||||
++itr;
|
||||
}
|
||||
|
||||
sLog->outString(">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Checked %u quest disables in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags)
|
||||
|
||||
@@ -34,7 +34,7 @@ uint32 DB2FilesCount = 0;
|
||||
|
||||
static bool LoadDB2_assert_print(uint32 fsize,uint32 rsize, const std::string& filename)
|
||||
{
|
||||
sLog->outError("Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
|
||||
|
||||
// ASSERT must fail after function call
|
||||
return false;
|
||||
@@ -87,7 +87,7 @@ void LoadDB2Stores(const std::string& dataPath)
|
||||
// error checks
|
||||
if (bad_db2_files.size() >= DB2FilesCount)
|
||||
{
|
||||
sLog->outError("\nIncorrect DataDir value in worldserver.conf or ALL required *.db2 files (%d) not found by path: %sdb2", DB2FilesCount, dataPath.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "\nIncorrect DataDir value in worldserver.conf or ALL required *.db2 files (%d) not found by path: %sdb2", DB2FilesCount, dataPath.c_str());
|
||||
exit(1);
|
||||
}
|
||||
else if (!bad_db2_files.empty())
|
||||
@@ -96,7 +96,7 @@ void LoadDB2Stores(const std::string& dataPath)
|
||||
for (std::list<std::string>::iterator i = bad_db2_files.begin(); i != bad_db2_files.end(); ++i)
|
||||
str += *i + "\n";
|
||||
|
||||
sLog->outError("\nSome required *.db2 files (%u from %d) not found or not compatible:\n%s", (uint32)bad_db2_files.size(), DB2FilesCount,str.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "\nSome required *.db2 files (%u from %d) not found or not compatible:\n%s", (uint32)bad_db2_files.size(), DB2FilesCount,str.c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -104,11 +104,9 @@ void LoadDB2Stores(const std::string& dataPath)
|
||||
if (!sItemStore.LookupEntry(83086) || // last item added in 4.3.4 (15595)
|
||||
!sItemExtendedCostStore.LookupEntry(3872) ) // last item extended cost added in 4.3.4 (15595)
|
||||
{
|
||||
sLog->outString();
|
||||
sLog->outError("Please extract correct db2 files from client 4.3.4 15595.");
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Please extract correct db2 files from client 4.3.4 15595.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sLog->outString(">> Initialized %d DB2 data stores.", DB2FilesCount);
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Initialized %d DB2 data stores.", DB2FilesCount);
|
||||
}
|
||||
Executable → Regular
+6
-7
@@ -252,7 +252,7 @@ uint32 DBCFileCount = 0;
|
||||
|
||||
static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
|
||||
{
|
||||
sLog->outError("Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
|
||||
|
||||
// ASSERT must fail after function call
|
||||
return false;
|
||||
@@ -570,7 +570,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
if (spellDiff->SpellID[x] <= 0 || !sSpellStore.LookupEntry(spellDiff->SpellID[x]))
|
||||
{
|
||||
if (spellDiff->SpellID[x] > 0)//don't show error if spell is <= 0, not all modes have spells and there are unknown negative values
|
||||
sLog->outErrorDb("spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x);
|
||||
sLog->outError(LOG_FILTER_SQL, "spelldifficulty_dbc: spell %i at field id:%u at spellid%i does not exist in SpellStore (spell.dbc), loaded as 0", spellDiff->SpellID[x], spellDiff->ID, x);
|
||||
newEntry.SpellID[x] = 0;//spell was <= 0 or invalid, set to 0
|
||||
}
|
||||
else
|
||||
@@ -727,7 +727,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
// error checks
|
||||
if (bad_dbc_files.size() >= DBCFileCount)
|
||||
{
|
||||
sLog->outError("Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
|
||||
exit(1);
|
||||
}
|
||||
else if (!bad_dbc_files.empty())
|
||||
@@ -736,7 +736,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
|
||||
str += *i + "\n";
|
||||
|
||||
sLog->outError("Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -747,12 +747,11 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
!sMapStore.LookupEntry(980) || // last map added in 4.3.4 (15595)
|
||||
!sSpellStore.LookupEntry(121820) ) // last spell added in 4.3.4 (15595)
|
||||
{
|
||||
sLog->outError("You have _outdated_ DBC files. Please extract correct versions from current using client.");
|
||||
sLog->outError(LOG_FILTER_GENERAL, "You have _outdated_ DBC files. Please extract correct versions from current using client.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sLog->outString(">> Initialized %d DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, ">> Initialized %d DBC data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
const std::string* GetRandomCharacterName(uint8 race, uint8 gender)
|
||||
|
||||
Executable → Regular
+3
-3
@@ -1129,7 +1129,7 @@ struct GtOCTBaseMPByClassEntry
|
||||
/* no used
|
||||
struct HolidayDescriptionsEntry
|
||||
{
|
||||
uint32 ID; // 0, this is NOT holiday id
|
||||
uint32 ID; // 0, m_holidayDescriptionID
|
||||
//char* name // 1 m_name_lang
|
||||
};
|
||||
*/
|
||||
@@ -1137,7 +1137,7 @@ struct HolidayDescriptionsEntry
|
||||
/* no used
|
||||
struct HolidayNamesEntry
|
||||
{
|
||||
uint32 ID; // 0, this is NOT holiday id
|
||||
uint32 ID; // 0, m_holidayNameID
|
||||
//char* name // 1 m_name_lang
|
||||
};
|
||||
*/
|
||||
@@ -1335,7 +1335,7 @@ struct ItemSetEntry
|
||||
struct LFGDungeonEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
//char* name[16]; // 1-17 Name lang
|
||||
//char* name; // 1
|
||||
uint32 minlevel; // 2
|
||||
uint32 maxlevel; // 3
|
||||
uint32 reclevel; // 4
|
||||
|
||||
@@ -135,8 +135,8 @@ void LFGMgr::LoadRewards()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outErrorDb(">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
|
||||
sLog->outString();
|
||||
sLog->outError(LOG_FILTER_SQL, ">> Loaded 0 lfg dungeon rewards. DB table `lfg_dungeon_rewards` is empty!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -157,25 +157,25 @@ void LFGMgr::LoadRewards()
|
||||
|
||||
if (!sLFGDungeonStore.LookupEntry(dungeonId))
|
||||
{
|
||||
sLog->outErrorDb("Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Dungeon %u specified in table `lfg_dungeon_rewards` does not exist!", dungeonId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!maxLevel || maxLevel > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
sLog->outErrorDb("Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Level %u specified for dungeon %u in table `lfg_dungeon_rewards` can never be reached!", maxLevel, dungeonId);
|
||||
maxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL);
|
||||
}
|
||||
|
||||
if (firstQuestId && !sObjectMgr->GetQuestTemplate(firstQuestId))
|
||||
{
|
||||
sLog->outErrorDb("First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId);
|
||||
sLog->outError(LOG_FILTER_SQL, "First quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", firstQuestId, dungeonId);
|
||||
firstQuestId = 0;
|
||||
}
|
||||
|
||||
if (otherQuestId && !sObjectMgr->GetQuestTemplate(otherQuestId))
|
||||
{
|
||||
sLog->outErrorDb("Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId);
|
||||
sLog->outError(LOG_FILTER_SQL, "Other quest %u specified for dungeon %u in table `lfg_dungeon_rewards` does not exist!", otherQuestId, dungeonId);
|
||||
otherQuestId = 0;
|
||||
}
|
||||
|
||||
@@ -183,8 +183,8 @@ void LFGMgr::LoadRewards()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
sLog->outInfo(LOG_FILTER_LFG, ">> Loaded %u lfg dungeon rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
|
||||
void LFGMgr::Update(uint32 diff)
|
||||
@@ -310,7 +310,7 @@ void LFGMgr::Update(uint32 diff)
|
||||
LfgQueueInfo* queue = itQueue->second;
|
||||
if (!queue)
|
||||
{
|
||||
sLog->outError("LFGMgr::Update: [" UI64FMTD "] queued with null queue info!", itQueue->first);
|
||||
sLog->outError(LOG_FILTER_LFG, "LFGMgr::Update: [" UI64FMTD "] queued with null queue info!", itQueue->first);
|
||||
continue;
|
||||
}
|
||||
uint32 dungeonId = (*queue->dungeons.begin());
|
||||
@@ -863,7 +863,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal)
|
||||
LfgQueueInfoMap::iterator itQueue = m_QueueInfoMap.find(guid);
|
||||
if (itQueue == m_QueueInfoMap.end() || GetState(guid) != LFG_STATE_QUEUED)
|
||||
{
|
||||
sLog->outError("LFGMgr::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", (*it));
|
||||
sLog->outError(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: [" UI64FMTD "] is not queued but listed as queued!", (*it));
|
||||
RemoveFromQueue(guid);
|
||||
return false;
|
||||
}
|
||||
@@ -1404,13 +1404,13 @@ void LFGMgr::UpdateProposal(uint32 proposalId, uint64 guid, bool accept)
|
||||
LfgProposalPlayer* player = pProposal->players[(*it)->GetGUID()];
|
||||
uint32 lowgroupguid = (*it)->GetGroup() ? (*it)->GetGroup()->GetLowGUID() : 0;
|
||||
if (player->groupLowGuid != lowgroupguid)
|
||||
sLog->outError("LFGMgr::UpdateProposal: [" UI64FMTD "] group mismatch: actual (%u) - queued (%u)", (*it)->GetGUID(), lowgroupguid, player->groupLowGuid);
|
||||
sLog->outError(LOG_FILTER_LFG, "LFGMgr::UpdateProposal: [" UI64FMTD "] group mismatch: actual (%u) - queued (%u)", (*it)->GetGUID(), lowgroupguid, player->groupLowGuid);
|
||||
|
||||
uint64 guid2 = player->groupLowGuid ? MAKE_NEW_GUID(player->groupLowGuid, 0, HIGHGUID_GROUP) : (*it)->GetGUID();
|
||||
LfgQueueInfoMap::iterator itQueue = m_QueueInfoMap.find(guid2);
|
||||
if (itQueue == m_QueueInfoMap.end())
|
||||
{
|
||||
sLog->outError("LFGMgr::UpdateProposal: Queue info for guid [" UI64FMTD "] not found!", guid);
|
||||
sLog->outError(LOG_FILTER_LFG, "LFGMgr::UpdateProposal: Queue info for guid [" UI64FMTD "] not found!", guid);
|
||||
waitTimesMap[(*it)->GetGUID()] = -1;
|
||||
}
|
||||
else
|
||||
@@ -1813,7 +1813,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
|
||||
AreaTrigger const* at = sObjectMgr->GetMapEntranceTrigger(dungeon->map);
|
||||
if (!at)
|
||||
{
|
||||
sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty);
|
||||
sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "]: No areatrigger found for map: %u difficulty: %u", player->GetGUID(), dungeon->map, dungeon->difficulty);
|
||||
error = LFG_TELEPORTERROR_INVALID_LOCATION;
|
||||
}
|
||||
else
|
||||
@@ -1843,7 +1843,7 @@ void LFGMgr::TeleportPlayer(Player* player, bool out, bool fromOpcode /*= false*
|
||||
else
|
||||
{
|
||||
error = LFG_TELEPORTERROR_INVALID_LOCATION;
|
||||
sLog->outError("LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", player->GetGUID(), mapid);
|
||||
sLog->outError(LOG_FILTER_LFG, "LfgMgr::TeleportPlayer: Failed to teleport [" UI64FMTD "] to map %u: ", player->GetGUID(), mapid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loaded 100 of 684 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user