From 9feb2308dfcd268c2a00ac53d836fc9b36b8ca16 Mon Sep 17 00:00:00 2001 From: Ovalord <1Don7H4v3@m41L.com> Date: Thu, 18 Jan 2018 14:59:10 +0100 Subject: [PATCH 01/52] Core/Reputation: make sure that we check all reputation fields for a valid repuation value before returning 0. Fixes some issues with ally-auras that require cataclysm repuation states --- src/server/game/Reputation/ReputationMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index 4eec4876623..a50f4fdf5d1 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -93,7 +93,8 @@ int32 ReputationMgr::GetBaseReputation(FactionEntry const* factionEntry) const (factionEntry->BaseRepRaceMask[i] == 0 && factionEntry->BaseRepClassMask[i] != 0)) && (factionEntry->BaseRepClassMask[i] & classMask || - factionEntry->BaseRepClassMask[i] == 0)) + factionEntry->BaseRepClassMask[i] == 0 && + factionEntry->BaseRepValue[i] > 0)) return factionEntry->BaseRepValue[i]; } From 06e50dfb38f3f9aceeb5110833094b7f61ff7fe4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 20 Jan 2018 10:09:16 +0100 Subject: [PATCH 02/52] DB/Quest: add Burning Blade Spellscroll loot By offl --- sql/updates/world/4.3.4/2018_01_20_00_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_01_20_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_20_00_world.sql b/sql/updates/world/4.3.4/2018_01_20_00_world.sql new file mode 100644 index 00000000000..743752c0f69 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_20_00_world.sql @@ -0,0 +1,4 @@ +-- Quest: The Burning Blade +DELETE FROM `creature_loot_template` WHERE `Item`= 52564; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Chance`,`QuestRequired`,`MinCount`,`MaxCount`) VALUES +(3196,52564,86,1,1,1),(3199,52564,64,1,1,1),(3195,52564,43,1,1,1); From eca82e2b65988cec7b317587316c7ec7ba6a98f6 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 20 Jan 2018 15:25:06 +0000 Subject: [PATCH 03/52] Update custom_2018_01_15_01_world.sql --- .../{custom_2018_01_15_01_world.sql => 2018_01_15_01_world.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/4.3.4/{custom_2018_01_15_01_world.sql => 2018_01_15_01_world.sql} (100%) diff --git a/sql/updates/world/4.3.4/custom_2018_01_15_01_world.sql b/sql/updates/world/4.3.4/2018_01_15_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/custom_2018_01_15_01_world.sql rename to sql/updates/world/4.3.4/2018_01_15_01_world.sql From e9d10676c53c4d490650d2e34a47961e4bf42d67 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 20 Jan 2018 16:34:41 +0100 Subject: [PATCH 04/52] DB/Misc: Some Westfall Fixes By danaton --- .../world/4.3.4/2018_01_20_01_world.sql | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_01_20_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_20_01_world.sql b/sql/updates/world/4.3.4/2018_01_20_01_world.sql new file mode 100644 index 00000000000..bc1536de57d --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_20_01_world.sql @@ -0,0 +1,63 @@ +/* creature */ +SET @CGUID := 251569; -- Set necessary +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(@CGUID+0,42560,0,40,109,1,1,169,0,0,0,-9855.52,1277.67,40.8733,5.64321,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+1,42403,0,40,109,1,1,169,0,0,0,-9854.61,1277.01,40.8672,5.54896,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+2,42386,0,40,109,1,1,169,0,32826,0,-9859.24,1279.61,41.0337,5.58039,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+3,42384,0,40,109,1,1,169,0,32819,0,-9861.03,1276.97,40.7707,0.110977,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+4,42384,0,40,109,1,1,169,0,32818,0,-9851.09,1273.94,41.0974,2.4279,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+5,42559,0,40,109,1,1,169,0,0,0,-9852.11,1274.83,41.0164,5.54593,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+6,42559,0,40,109,1,1,169,0,0,0,-9859.83,1276.11,40.7818,2.44651,120,0,0,0,0,0,0,0,0,'',18019), +(@CGUID+7,42558,0,40,109,1,1,169,0,0,0,-9854.99,1275.83,40.9068,1.43605,120,0,0,2865,0,0,0,0,0,'',18019); + +UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276241; +UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276239; +UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276262; +UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276256; + +/* creature addon */ +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7; +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `auras`) VALUES +(@CGUID+0,0,0,65536,0,0,0,0,0,29266), +(@CGUID+2,0,0,0,0,430,0,0,0,NULL), +(@CGUID+3,0,0,0,0,430,0,0,0,NULL), +(@CGUID+4,0,0,0,0,430,0,0,0,NULL), +(@CGUID+7,0,0,8,0,0,0,0,0,NULL); + +DELETE FROM `creature_addon` WHERE `guid` IN (349939, 349940, 349978, 349979, 349980, 349981, 349982, 349983); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `auras`) VALUES +(349939,0,0,0,1,333,0,0,0,NULL), +(349940,0,0,0,1,333,0,0,0,NULL), +(349978,0,0,0,1,333,0,0,0,NULL), +(349979,0,0,0,1,333,0,0,0,NULL), +(349980,0,0,0,1,333,0,0,0,NULL), +(349981,0,0,0,1,333,0,0,0,NULL), +(349982,0,0,0,1,333,0,0,0,NULL), +(349983,0,0,0,1,333,0,0,0,NULL); + +/* quest template addon */ +DELETE FROM `quest_template_addon` WHERE `ID` IN (26209, 26213, 26214, 26215, 26229, 26230, 26241, 26270, 26237, 26286, 26289, 26292, 26287, 26236, 26266); +INSERT INTO `quest_template_addon` (`ID`, `MaxLevel`, `AllowableClasses`, `SourceSpellID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `RewardMailTemplateID`, `RewardMailDelay`, `RequiredSkillID`, `RequiredSkillPoints`, `RequiredMinRepFaction`, `RequiredMaxRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepValue`, `ProvidedItemCount`, `SpecialFlags`) VALUES +(26209,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), +(26215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), +(26213,0,0,0,26209,26215,-26213,0,0,0,0,0,0,0,0,0,0), +(26214,0,0,0,26209,26215,-26213,0,0,0,0,0,0,0,0,0,0), +(26229,0,0,0,26215,0,0,0,0,0,0,0,0,0,0,0,0), +(26230,0,0,0,26215,0,0,0,0,0,0,0,0,0,0,0,0), +(26241,0,0,0,26236,0,0,0,0,0,0,0,0,0,0,0,0), +(26270,0,0,0,26241,0,0,0,0,0,0,0,0,0,0,0,0), +(26237,0,0,0,26236,0,0,0,0,0,0,0,0,0,0,0,0), +(26286,0,0,0,26266,0,0,0,0,0,0,0,0,0,0,0,0), +(26289,0,0,0,26286,0,0,0,0,0,0,0,0,0,0,0,0), +(26292,0,0,0,26291,0,0,0,0,0,0,0,0,0,0,0,0), +(26287,0,0,0,26266,0,0,0,0,0,0,0,0,0,0,0,0), +(26236,0,0,0,26232,0,0,0,0,0,0,0,0,0,0,0,0), +(26266,0,0,0,26270,0,0,0,0,0,0,0,0,0,0,1,0); + +/* creature loot template */ +DELETE FROM `creature_loot_template` WHERE `Entry`=114 AND `Item`=57935; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(114,57935,0,8.75,0,1,0,1,1,NULL); +UPDATE `creature_loot_template` SET `QuestRequired` = 1 WHERE `Entry` = 42677 AND `Item` = 58118; + From 079f2002acde5df4d2864ab7ee243b8b97e837fc Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 21 Jan 2018 12:34:54 +0100 Subject: [PATCH 05/52] Core/SAI: Extended SMART_TARGET_VEHICLE_PASSENGER to allow specifying seat mask instead of single seat index (can now target all passengers) --- sql/updates/world/3.3.5/2018_01_16_00_world.sql | 3 +++ src/server/game/AI/SmartScripts/SmartScript.cpp | 10 +++++----- src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 2 +- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 sql/updates/world/3.3.5/2018_01_16_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_16_00_world.sql b/sql/updates/world/3.3.5/2018_01_16_00_world.sql new file mode 100644 index 00000000000..81d9eb5ec7d --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_16_00_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `target_param1`=(1 << `target_param1`) WHERE `target_type`=29; +-- diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 866efa6c96f..412fb638afc 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3135,13 +3135,13 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /* } break; } - case SMART_TARGET_VEHICLE_ACCESSORY: + case SMART_TARGET_VEHICLE_PASSENGER: { if (me && me->IsVehicle()) - { - if (Unit* target = me->GetVehicleKit()->GetPassenger(e.target.vehicle.seat)) - l->push_back(target); - } + for (auto seatItr = me->GetVehicleKit()->Seats.begin(); seatItr != me->GetVehicleKit()->Seats.end(); ++seatItr) + if (!e.target.vehicle.seatMask || (e.target.vehicle.seatMask & (1 << seatItr->first))) + if (Unit* u = ObjectAccessor::GetUnit(*me, seatItr->second.Passenger.Guid)) + l->push_back(u); break; } case SMART_TARGET_POSITION: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index f4da44901ff..988c12403fc 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -454,7 +454,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) case SMART_TARGET_STORED: case SMART_TARGET_LOOT_RECIPIENTS: case SMART_TARGET_FARTHEST: - case SMART_TARGET_VEHICLE_ACCESSORY: + case SMART_TARGET_VEHICLE_PASSENGER: break; default: TC_LOG_ERROR("sql.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()); diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 9778f824f67..756449a72a5 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1217,7 +1217,7 @@ enum SMARTAI_TARGETS SMART_TARGET_CLOSEST_FRIENDLY = 26, // maxDist, playerOnly SMART_TARGET_LOOT_RECIPIENTS = 27, // all players that have tagged this creature (for kill credit) SMART_TARGET_FARTHEST = 28, // maxDist, playerOnly, isInLos - SMART_TARGET_VEHICLE_ACCESSORY = 29, // seat number (vehicle can target it's own accessory) + SMART_TARGET_VEHICLE_PASSENGER = 29, // seatMask (0 - all seats) SMART_TARGET_END = 30 }; @@ -1345,7 +1345,7 @@ struct SmartTarget struct { - uint32 seat; + uint32 seatMask; } vehicle; }; }; From ca4b8d98816d653dfec2eb81b8ea329eb8f321fe Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 21 Jan 2018 12:39:02 +0100 Subject: [PATCH 06/52] Scripts/Pit of Saron: Fixed Tyrannus not working after evade --- .../FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index 06e53a95f59..902f78e8096 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -545,12 +545,12 @@ class spell_tyrannus_rimefang_icy_blast : public SpellScriptLoader } }; -class at_tyrannus_event_starter : public OnlyOnceAreaTriggerScript +class at_tyrannus_event_starter : public AreaTriggerScript { public: - at_tyrannus_event_starter() : OnlyOnceAreaTriggerScript("at_tyrannus_event_starter") { } + at_tyrannus_event_starter() : AreaTriggerScript("at_tyrannus_event_starter") { } - bool _OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) override + bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) override { InstanceScript* instance = player->GetInstanceScript(); if (player->IsGameMaster() || !instance) From 2eb11c7b7c8dfd50486f881789652d1ae3cf7e72 Mon Sep 17 00:00:00 2001 From: Keader Date: Tue, 16 Jan 2018 20:38:38 -0200 Subject: [PATCH 07/52] Scripts/Pit of Saron: Tyrannus followup fix new issue caused by 947cb6a453892c6002738b424d66ca19c102a533 --- .../FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp index 902f78e8096..920017b48b1 100644 --- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_scourgelord_tyrannus.cpp @@ -556,7 +556,7 @@ class at_tyrannus_event_starter : public AreaTriggerScript if (player->IsGameMaster() || !instance) return false; - if (instance->GetBossState(DATA_TYRANNUS) != DONE) + if (instance->GetBossState(DATA_TYRANNUS) != IN_PROGRESS && instance->GetBossState(DATA_TYRANNUS) != DONE) if (Creature* tyrannus = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_TYRANNUS))) { tyrannus->AI()->DoAction(ACTION_START_INTRO); From 49c861d064bcb5d31a0c06867a9eb7f6f618ad86 Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 16 Jan 2018 20:49:39 -0300 Subject: [PATCH 08/52] Core/Unit: check remaining instead of full duration for Bounced by DR auras --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f6d6b047aaf..a805a71869b 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4487,7 +4487,7 @@ bool Unit::HasStrongerAuraWithDR(SpellInfo const* auraSpellInfo, Unit* caster, b if (spellInfo->GetDiminishingReturnsGroupForSpell(triggered) != diminishGroup) continue; - int32 existingDuration = itr->second->GetBase()->GetMaxDuration(); + int32 existingDuration = itr->second->GetBase()->GetDuration(); int32 newDuration = auraSpellInfo->GetMaxDuration(); ApplyDiminishingToDuration(auraSpellInfo, triggered, newDuration, caster, level); if (newDuration > 0 && newDuration < existingDuration) From 3b5f3c2ebf69b0c9ace4a89f2f47880a6d0f5f90 Mon Sep 17 00:00:00 2001 From: sirikfoll Date: Wed, 17 Jan 2018 00:12:41 -0200 Subject: [PATCH 09/52] Scripts/Scarlet Enclave: Quest The Endless Hunger will work correctly after Unworthy Initiate Respawn Due to dynamic spawns, we need to be able to update the Npc GUID after the respawn, otherwise the quest can only be completed by the first player --- src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 72f59624564..2c014f5cbd4 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -307,8 +307,7 @@ public: void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { - if (!prisonerGUID) - prisonerGUID = guid; + prisonerGUID = guid; } ObjectGuid GetGUID(int32 /*id*/) const override From 13295bb20062f0b2e957bf377ef3367034be740b Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 21 Jan 2018 12:54:46 +0100 Subject: [PATCH 10/52] Core/CombatAI: Npcs with TurretAI will be able to attack again --- src/server/game/AI/CoreAI/CombatAI.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 2e42e186605..c6cdf4aea4e 100644 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -232,11 +232,11 @@ TurretAI::TurretAI(Creature* c) : CreatureAI(c) me->m_SightDistance = me->m_CombatDistance; } -bool TurretAI::CanAIAttack(const Unit* /*who*/) const +bool TurretAI::CanAIAttack(Unit const* who) const { /// @todo use one function to replace it - if (!me->IsWithinCombatRange(me->GetVictim(), me->m_CombatDistance) - || (m_minRange && me->IsWithinCombatRange(me->GetVictim(), m_minRange))) + if (!me->IsWithinCombatRange(who, me->m_CombatDistance) + || (m_minRange && me->IsWithinCombatRange(who, m_minRange))) return false; return true; } From d58ac3881cfccaf6ba84d12d0780fe9de61a0369 Mon Sep 17 00:00:00 2001 From: Moein Date: Thu, 18 Jan 2018 02:25:05 +0330 Subject: [PATCH 11/52] Scripts/Spells: quest "That's Abominable" (#21253) - scripted spell "Burst At The Seams" (59576) - added Pet Bar Closes #10876 --- .../world/3.3.5/2018_01_17_01_world.sql | 5 ++ src/server/scripts/Spells/spell_quest.cpp | 87 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_17_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_17_01_world.sql b/sql/updates/world/3.3.5/2018_01_17_01_world.sql new file mode 100644 index 00000000000..ccbcb0a4502 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_17_01_world.sql @@ -0,0 +1,5 @@ +-- Reanimated Abomination Abilities +UPDATE `creature_template` SET `spell1` = 59564, `spell2` = 59576 WHERE `entry` = 31692; +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_q13264_thats_abominable'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(59576, 'spell_q13264_thats_abominable'); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 664dfbc20a2..2e02e896e83 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1953,6 +1953,92 @@ class spell_q13086_cannons_target : public SpellScriptLoader } }; +enum ThatsAbominable +{ + QUEST_THATS_ABOMINABLE = 13264, + + NPC_ICY_GHOUL = 31142, + NPC_RISEN_ALLIANCE_SOLDIERS = 31205, + NPC_VICIOUS_GEIST = 31147, + NPC_RENIMATED_ABOMINATION = 31692, + + SPELL_ICY_GHOUL_CREDIT = 59591, // Credit for Icy Ghoul + SPELL_VICIOUS_GEISTS_CREDIT = 60042, // Credit for Vicious Geists + SPELL_RISEN_ALLIANCE_SOLDIERS_CREDIT = 60040, // Credit for Risen Alliance Soldiers +}; + +class spell_q13264_thats_abominable : public SpellScriptLoader +{ + public: + spell_q13264_thats_abominable() : SpellScriptLoader("spell_q13264_thats_abominable") { } + + class spell_q13264_thats_abominable_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q13264_thats_abominable_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo( + { + SPELL_ICY_GHOUL_CREDIT, + SPELL_VICIOUS_GEISTS_CREDIT, + SPELL_RISEN_ALLIANCE_SOLDIERS_CREDIT, + }); + } + + void HandleKnockBack(SpellEffIndex effIndex) + { + PreventHitDefaultEffect(effIndex); + + if (Creature* creature = GetHitCreature()) + if (Unit* charmer = GetCaster()->GetCharmerOrOwner()) + if (Player* player = charmer->ToPlayer()) + if (player->GetQuestStatus(QUEST_THATS_ABOMINABLE) == QUEST_STATUS_INCOMPLETE) + if (GiveCreditIfValid(player, creature)) + creature->KillSelf(); + } + + bool GiveCreditIfValid(Player* player, Creature* creature) + { + uint32 entry = creature->GetEntry(); + + switch(entry) + { + case NPC_ICY_GHOUL: + player->CastSpell(player, SPELL_ICY_GHOUL_CREDIT, true); + return true; + case NPC_VICIOUS_GEIST: + player->CastSpell(player, SPELL_VICIOUS_GEISTS_CREDIT, true); + return true; + case NPC_RISEN_ALLIANCE_SOLDIERS: + player->CastSpell(player, SPELL_RISEN_ALLIANCE_SOLDIERS_CREDIT, true); + return true; + } + + return false; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Creature* creature = GetCaster()->ToCreature()) { + creature->KillSelf(); + creature->DespawnOrUnsummon(); + } + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_q13264_thats_abominable_SpellScript::HandleKnockBack, EFFECT_1, SPELL_EFFECT_KNOCK_BACK); + OnEffectHitTarget += SpellEffectFn(spell_q13264_thats_abominable_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_q13264_thats_abominable_SpellScript(); + } +}; + enum BurstAtTheSeams { NPC_DRAKKARI_CHIEFTAINK = 29099, @@ -2836,6 +2922,7 @@ void AddSC_quest_spell_scripts() new spell_q12847_summon_soul_moveto_bunny(); new spell_q13011_bear_flank_master(); new spell_q13086_cannons_target(); + new spell_q13264_thats_abominable(); new spell_q12690_burst_at_the_seams(); new spell_q12308_escape_from_silverbrook_summon_worgen(); new spell_q12308_escape_from_silverbrook(); From ae8616bd52dc2d4c1ed38ddcbed0f0d285d85521 Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 18 Jan 2018 16:29:50 +0100 Subject: [PATCH 12/52] DB/Quest: Allow starting Amphitheater of Anguish (12932) without having completed The Champion's Call (12974) --- sql/updates/world/3.3.5/2018_01_18_01_world.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_18_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_18_01_world.sql b/sql/updates/world/3.3.5/2018_01_18_01_world.sql new file mode 100644 index 00000000000..70b72d77908 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_18_01_world.sql @@ -0,0 +1,3 @@ +-- amphitheater of anguish (12932) should be startable without completing "The Champion's Call!" (12974) +UPDATE `quest_template` SET `RewardNextQuest`=12932 WHERE `ID`=12974; +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=12932; From 7997bebf9e65a542d1faab7a9fd3cf37cc217b3f Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 18 Jan 2018 16:47:31 +0100 Subject: [PATCH 13/52] Scripts/AzjolNerub: Missing nullptr check in Hadronox. Closes #21258. --- .../scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index dcddc1f2e65..bf3cb0a41d4 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -366,7 +366,7 @@ public: // Safeguard to prevent Hadronox dying to NPCs void DamageTaken(Unit* who, uint32& damage) override { - if (!who->IsControlledByPlayer() && me->HealthBelowPct(70)) + if ((!who || !who->IsControlledByPlayer()) && me->HealthBelowPct(70)) { if (me->HealthBelowPctDamaged(5, damage)) damage = 0; From f2a3a356bec298198caaedb4281e5f443e22b26f Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 18 Jan 2018 16:08:24 -0300 Subject: [PATCH 14/52] Core/Auras: define and implement attribute SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK Closes #20148 --- src/server/game/Miscellaneous/SharedDefines.h | 2 +- src/server/game/Spells/Auras/SpellAuras.cpp | 48 +++++++++++-------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 1d83a13e8de..92792c951ea 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -438,7 +438,7 @@ enum SpellAttr2 enum SpellAttr3 { SPELL_ATTR3_UNK0 = 0x00000001, // 0 - SPELL_ATTR3_UNK1 = 0x00000002, // 1 + SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK = 0x00000002, // 1 Ignores subclass mask check when checking proc SPELL_ATTR3_UNK2 = 0x00000004, // 2 SPELL_ATTR3_BLOCKABLE_SPELL = 0x00000008, // 3 Only dmg class melee in 3.1.3 SPELL_ATTR3_IGNORE_RESURRECTION_TIMER = 0x00000010, // 4 you don't have to wait to be resurrected with these spells diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 0786250b726..04f4f4f91d5 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1803,31 +1803,37 @@ uint8 Aura::GetProcEffectMask(AuraApplication* aurApp, ProcEventInfo& eventInfo, Unit* target = aurApp->GetTarget(); if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER) { - if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_WEAPON) + if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK)) { - if (target->ToPlayer()->IsInFeralForm()) - return 0; - - if (DamageInfo* damageInfo = eventInfo.GetDamageInfo()) + Item* item = nullptr; + if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_WEAPON) { - WeaponAttackType attType = damageInfo->GetAttackType(); - Item* item = nullptr; - if (attType == BASE_ATTACK) - item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); - else if (attType == OFF_ATTACK) - item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); - else - item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED); - - if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_WEAPON || !((1 << item->GetTemplate()->SubClass) & GetSpellInfo()->EquippedItemSubClassMask)) + if (target->ToPlayer()->IsInFeralForm()) return 0; + + if (DamageInfo const* damageInfo = eventInfo.GetDamageInfo()) + { + switch (damageInfo->GetAttackType()) + { + case BASE_ATTACK: + item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); + break; + case OFF_ATTACK: + item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + break; + default: + item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED); + break; + } + } } - } - else if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_ARMOR) - { - // Check if player is wearing shield - Item* item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); - if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_ARMOR || !((1 << item->GetTemplate()->SubClass) & GetSpellInfo()->EquippedItemSubClassMask)) + else if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_ARMOR) + { + // Check if player is wearing shield + item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + } + + if (!item || item->IsBroken() || !item->IsFitToSpellRequirements(GetSpellInfo())) return 0; } } From c7a62f99d3fb75b198215158f542489776e8ed8f Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 18 Jan 2018 16:09:34 -0300 Subject: [PATCH 15/52] Core/Auras: Don't remove shield only dependant auras on disarm Closes #19782 --- src/server/game/Entities/Player/Player.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e096c0302d5..56cecdd2248 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -24130,22 +24130,32 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons } case ITEM_CLASS_ARMOR: { + // most used check: shield only + if (spellInfo->EquippedItemSubClassMask & ((1 << ITEM_SUBCLASS_ARMOR_BUCKLER) | (1 << ITEM_SUBCLASS_ARMOR_SHIELD))) + { + if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND)) + if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) + return true; + + // special check to filter things like Shield Wall, the aura is not permanent and must stay even without required item + if (!spellInfo->IsPassive()) + { + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (spellInfo->Effects[i].IsAura()) + return true; + } + } + // tabard not have dependent spells for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_MAINHAND; ++i) if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i)) if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) return true; - // shields can be equipped to offhand slot - if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND)) - if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) - return true; - // ranged slot can have some armor subclasses if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED)) if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo)) return true; - break; } default: From cbb321a55e1c0643f30a52e700773bef2c4c3169 Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 18 Jan 2018 18:34:37 -0300 Subject: [PATCH 16/52] DB/Spell: Magma Totem shouldn't generate threat By Jildor, closes #21178 --- sql/updates/world/3.3.5/2018_01_18_02_world_335.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_18_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_18_02_world_335.sql b/sql/updates/world/3.3.5/2018_01_18_02_world_335.sql new file mode 100644 index 00000000000..3c801f0959d --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_18_02_world_335.sql @@ -0,0 +1,9 @@ +DELETE FROM `spell_custom_attr` WHERE `entry` IN (8187,10579,10580,10581,25550,58732,58735); +INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES +(8187, 0x10), +(10579,0x10), +(10580,0x10), +(10581,0x10), +(25550,0x10), +(58732,0x10), +(58735,0x10); From fd92fa7451aaec6e037f3f4abc3a3545ac59b3b8 Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 18 Jan 2018 19:14:09 -0300 Subject: [PATCH 17/52] Core/Auras: fixed EquippedItemClass check follow-up to 29c3b7d8f60c18e52ec22fec6de9abc3dc468166 --- src/server/game/Spells/Auras/SpellAuras.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 04f4f4f91d5..0ac87771766 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1801,7 +1801,7 @@ uint8 Aura::GetProcEffectMask(AuraApplication* aurApp, ProcEventInfo& eventInfo, // do that only for passive spells /// @todo this needs to be unified for all kinds of auras Unit* target = aurApp->GetTarget(); - if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER) + if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER && GetSpellInfo()->EquippedItemClass != -1) { if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK)) { From 0ebfa28623dbcc3ef5064570039501ff9f19ae48 Mon Sep 17 00:00:00 2001 From: tje3d Date: Sat, 20 Jan 2018 18:00:50 +0100 Subject: [PATCH 18/52] DB/Quest: A Rough Ride & The Black Knight's Orders Closes #21248 Closes #21249 --- sql/updates/world/3.3.5/2018_01_20_00_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_20_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_20_00_world.sql b/sql/updates/world/3.3.5/2018_01_20_00_world.sql new file mode 100644 index 00000000000..e65560f3b01 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_20_00_world.sql @@ -0,0 +1,4 @@ +-- A Rough Ride +UPDATE `smart_scripts` SET `target_type` = 23 WHERE `entryorguid` = 28308 and `id` IN (2,3); +-- Black Knights Order +UPDATE `smart_scripts` SET `target_type` = 23 WHERE `entryorguid` = 33519 and `id` IN (1,2); From 3ac066856b9f6f19d2f005996cb6a7e203d23cd2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 21 Jan 2018 13:23:38 +0100 Subject: [PATCH 19/52] Rename files --- .../2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql} | 0 .../2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql} | 0 .../2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql} | 0 ...018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql} | 2 ++ .../2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql} | 0 5 files changed, 2 insertions(+) rename sql/updates/world/{3.3.5/2018_01_16_00_world.sql => 4.3.4/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_01_17_01_world.sql => 4.3.4/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_01_18_01_world.sql => 4.3.4/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_01_18_02_world_335.sql => 4.3.4/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql} (97%) rename sql/updates/world/{3.3.5/2018_01_20_00_world.sql => 4.3.4/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_01_16_00_world.sql b/sql/updates/world/4.3.4/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_16_00_world.sql rename to sql/updates/world/4.3.4/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_17_01_world.sql b/sql/updates/world/4.3.4/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_17_01_world.sql rename to sql/updates/world/4.3.4/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_18_01_world.sql b/sql/updates/world/4.3.4/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_18_01_world.sql rename to sql/updates/world/4.3.4/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_18_02_world_335.sql b/sql/updates/world/4.3.4/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql similarity index 97% rename from sql/updates/world/3.3.5/2018_01_18_02_world_335.sql rename to sql/updates/world/4.3.4/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql index 3c801f0959d..dbb5bcf79ae 100644 --- a/sql/updates/world/3.3.5/2018_01_18_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql @@ -1,3 +1,4 @@ +/* DELETE FROM `spell_custom_attr` WHERE `entry` IN (8187,10579,10580,10581,25550,58732,58735); INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES (8187, 0x10), @@ -7,3 +8,4 @@ INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES (25550,0x10), (58732,0x10), (58735,0x10); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_20_00_world.sql b/sql/updates/world/4.3.4/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_20_00_world.sql rename to sql/updates/world/4.3.4/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql From 7be63043066f0fb3d1fa316cdbfc10a62790e7c8 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 12:28:42 +0100 Subject: [PATCH 20/52] Core/Spells: Removed outdated mechanic (spell downranking coef penalty) --- src/server/game/Entities/Unit/Unit.cpp | 32 ++--------- src/server/game/Entities/Unit/Unit.h | 1 - src/server/game/Texts/ChatTextBuilder.cpp | 59 +++++++++++++++++++++ src/server/scripts/Spells/spell_warlock.cpp | 1 - 4 files changed, 63 insertions(+), 30 deletions(-) create mode 100644 src/server/game/Texts/ChatTextBuilder.cpp diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a805a71869b..f440472f54a 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2262,22 +2262,6 @@ uint32 Unit::CalculateDamage(WeaponAttackType attType, bool normalized, bool add return urand(uint32(minDamage), uint32(maxDamage)); } -float Unit::CalculateLevelPenalty(SpellInfo const* spellProto) const -{ - if (spellProto->SpellLevel <= 0 || spellProto->SpellLevel >= spellProto->MaxLevel) - return 1.0f; - - float LvlPenalty = 0.0f; - - if (spellProto->SpellLevel < 20) - LvlPenalty = (20.0f - spellProto->SpellLevel) * 3.75f; - float LvlFactor = (float(spellProto->SpellLevel) + 6.0f) / float(getLevel()); - if (LvlFactor > 1.0f) - LvlFactor = 1.0f; - - return AddPct(LvlFactor, -LvlPenalty); -} - void Unit::SendMeleeAttackStart(Unit* victim) { WorldPacket data(SMSG_ATTACKSTART, 8 + 8); @@ -6545,15 +6529,13 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin if (!bonus || coeff < 0) coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack); - float factorMod = CalculateLevelPenalty(spellProto) * stack; - if (Player* modOwner = GetSpellModOwner()) { coeff *= 100.0f; modOwner->ApplySpellMod(spellProto->Id, coeff); coeff /= 100.0f; } - DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod); + DoneTotal += int32(DoneAdvertisedBenefit * coeff * stack); } float tmpDamage = (int32(pdamage) + DoneTotal); @@ -6839,7 +6821,6 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui if (!bonus || coeff < 0) coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack); - float factorMod = CalculateLevelPenalty(spellProto) * stack; // level penalty still applied on Taken bonus - is it blizzlike? if (Player* modOwner = GetSpellModOwner()) { @@ -6847,7 +6828,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui modOwner->ApplySpellMod(spellProto->Id, coeff); coeff /= 100.0f; } - TakenTotal += int32(TakenAdvertisedBenefit * coeff * factorMod); + TakenTotal += int32(TakenAdvertisedBenefit * coeff * stack); } } @@ -7263,7 +7244,6 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui // Check for table values SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id); float coeff = 0; - float factorMod = 1.0f; if (bonus) { if (damagetype == DOT) @@ -7294,8 +7274,6 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui if (!bonus || coeff < 0) coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack) * 1.88f; // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells) - factorMod *= CalculateLevelPenalty(spellProto) * stack; - if (Player* modOwner = GetSpellModOwner()) { coeff *= 100.0f; @@ -7303,7 +7281,7 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui coeff /= 100.0f; } - DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod); + DoneTotal += int32(DoneAdvertisedBenefit * coeff * stack); } for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -7454,7 +7432,6 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u // Check for table values SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id); float coeff = 0; - float factorMod = 1.0f; if (bonus) coeff = (damagetype == DOT) ? bonus->dot_damage : bonus->direct_damage; else @@ -7473,7 +7450,6 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u if (!bonus || coeff < 0) coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack) * 1.88f; // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells) - factorMod *= CalculateLevelPenalty(spellProto) * int32(stack); if (Player* modOwner = GetSpellModOwner()) { coeff *= 100.0f; @@ -7481,7 +7457,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u coeff /= 100.0f; } - TakenTotal += int32(TakenAdvertisedBenefit * coeff * factorMod); + TakenTotal += int32(TakenAdvertisedBenefit * coeff * stack); } AuraEffectList const& mHealingGet= GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_RECEIVED); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 408fb5743c1..e8ab2baa4fc 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2090,7 +2090,6 @@ class TC_GAME_API Unit : public WorldObject int32 ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive, uint32 effectMask); void ModSpellCastTime(SpellInfo const* spellProto, int32& castTime, Spell* spell = NULL); void ModSpellDurationTime(SpellInfo const* spellProto, int32& castTime, Spell* spell = NULL); - float CalculateLevelPenalty(SpellInfo const* spellProto) const; void addFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); } void removeFollower(FollowerReference* /*pRef*/) { /* nothing to do yet */ } diff --git a/src/server/game/Texts/ChatTextBuilder.cpp b/src/server/game/Texts/ChatTextBuilder.cpp new file mode 100644 index 00000000000..8d989c9c281 --- /dev/null +++ b/src/server/game/Texts/ChatTextBuilder.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * 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 . + */ + +#include "ChatTextBuilder.h" +#include "Chat.h" +#include "ObjectMgr.h" +#include + +void Trinity::BroadcastTextBuilder::operator()(WorldPacket& data, LocaleConstant locale) const +{ + BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId); + ChatHandler::BuildChatPacket(data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _gender) : "", _achievementId, "", locale); +} + +size_t Trinity::BroadcastTextBuilder::operator()(WorldPacket* data, LocaleConstant locale) const +{ + BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId); + return ChatHandler::BuildChatPacket(*data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _gender) : "", _achievementId, "", locale); +} + +void Trinity::CustomChatTextBuilder::operator()(WorldPacket& data, LocaleConstant locale) const +{ + ChatHandler::BuildChatPacket(data, _msgType, _language, _source, _target, _text, 0, "", locale); +} + +void Trinity::TrinityStringChatBuilder::operator()(WorldPacket& data, LocaleConstant locale) const +{ + char const* text = sObjectMgr->GetTrinityString(_textId, locale); + + if (_args) + { + // we need copy va_list before use or original va_list will corrupted + va_list ap; + va_copy(ap, *_args); + + static size_t const BufferSize = 2048; + char strBuffer[BufferSize]; + vsnprintf(strBuffer, BufferSize, text, ap); + va_end(ap); + + ChatHandler::BuildChatPacket(data, _msgType, LANG_UNIVERSAL, _source, _target, strBuffer, 0, "", locale); + } + else + ChatHandler::BuildChatPacket(data, _msgType, LANG_UNIVERSAL, _source, _target, text, 0, "", locale); +} diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 80715de7834..bc26f2e37d5 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1109,7 +1109,6 @@ class spell_warl_shadow_ward : public SpellScriptLoader float bonus = 0.8068f; bonus *= caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()); - bonus *= caster->CalculateLevelPenalty(GetSpellInfo()); amount += int32(bonus); } From aa1032bd1739b514bef3fbc4c840a74cfa2669ef Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 13:07:51 +0100 Subject: [PATCH 21/52] missing part --- src/server/scripts/Spells/spell_mage.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 57af21af003..0ac73c90ffd 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -495,7 +495,6 @@ class spell_mage_fire_frost_ward : public SpellScriptLoader float bonus = 0.8068f; bonus *= caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()); - bonus *= caster->CalculateLevelPenalty(GetSpellInfo()); amount += int32(bonus); } From a6835c5872e603e8aa3e7800c6781d77bb79b994 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 13:12:31 +0100 Subject: [PATCH 22/52] missing part --- src/server/scripts/Spells/spell_priest.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index d8f6ad43143..6b44155e25b 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -920,7 +920,6 @@ class spell_pri_power_word_shield : public SpellScriptLoader // Improved PW: Shield: its weird having a SPELLMOD_ALL_EFFECTS here but its blizzards doing :) // Improved PW: Shield is only applied at the spell healing bonus because it was already applied to the base value in CalculateSpellDamage bonus = caster->ApplyEffectModifiers(GetSpellInfo(), aurEff->GetEffIndex(), bonus); - bonus *= caster->CalculateLevelPenalty(GetSpellInfo()); amount += int32(bonus); From 615a99703580fb6af241697477474d59c2c4cdd2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 13:49:25 +0100 Subject: [PATCH 23/52] Warnings fix --- src/server/game/Reputation/ReputationMgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index a50f4fdf5d1..b54045f810e 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -91,10 +91,10 @@ int32 ReputationMgr::GetBaseReputation(FactionEntry const* factionEntry) const { if ((factionEntry->BaseRepRaceMask[i] & raceMask || (factionEntry->BaseRepRaceMask[i] == 0 && - factionEntry->BaseRepClassMask[i] != 0)) && + factionEntry->BaseRepClassMask[i] != 0)) && (factionEntry->BaseRepClassMask[i] & classMask || - factionEntry->BaseRepClassMask[i] == 0 && - factionEntry->BaseRepValue[i] > 0)) + (factionEntry->BaseRepClassMask[i] == 0 && + factionEntry->BaseRepValue[i] > 0))) return factionEntry->BaseRepValue[i]; } From 836511923517eaffc8079f9db42a224c7ea0c775 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 16:00:38 +0100 Subject: [PATCH 24/52] Core/Battleground: Dropped battleground texts from trinity_string and replaced them with proper BroadcastText --- .../world/4.3.4/2018_01_27_00_world.sql | 5 + .../game/AI/SmartScripts/SmartScript.cpp | 4 +- .../game/Achievements/AchievementMgr.cpp | 4 +- src/server/game/Battlegrounds/Arena.cpp | 9 +- src/server/game/Battlegrounds/Arena.h | 8 + .../game/Battlegrounds/Battleground.cpp | 166 +++++------------- src/server/game/Battlegrounds/Battleground.h | 19 +- .../game/Battlegrounds/BattlegroundMgr.cpp | 1 + .../Battlegrounds/Zones/BattlegroundAB.cpp | 64 ++----- .../game/Battlegrounds/Zones/BattlegroundAB.h | 30 +++- .../Battlegrounds/Zones/BattlegroundAV.cpp | 13 +- .../game/Battlegrounds/Zones/BattlegroundAV.h | 10 ++ .../Battlegrounds/Zones/BattlegroundEY.cpp | 54 ++---- .../game/Battlegrounds/Zones/BattlegroundEY.h | 46 ++++- .../Battlegrounds/Zones/BattlegroundIC.cpp | 60 ++++--- .../game/Battlegrounds/Zones/BattlegroundIC.h | 49 ++++-- .../Battlegrounds/Zones/BattlegroundSA.cpp | 14 +- .../game/Battlegrounds/Zones/BattlegroundSA.h | 9 + .../Battlegrounds/Zones/BattlegroundWS.cpp | 51 ++---- .../game/Battlegrounds/Zones/BattlegroundWS.h | 17 ++ src/server/game/Entities/Unit/Unit.cpp | 5 +- src/server/game/Handlers/PetitionsHandler.cpp | 3 +- src/server/game/Miscellaneous/Language.h | 131 +------------- src/server/game/Texts/ChatTextBuilder.h | 49 +++--- 24 files changed, 351 insertions(+), 470 deletions(-) create mode 100644 sql/updates/world/4.3.4/2018_01_27_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_00_world.sql b/sql/updates/world/4.3.4/2018_01_27_00_world.sql new file mode 100644 index 00000000000..adb43a5478d --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_27_00_world.sql @@ -0,0 +1,5 @@ +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 600 AND 704; +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 724 AND 726; +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 753 AND 755; +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 1205 AND 1333; +DELETE FROM `trinity_string` WHERE `entry` BETWEEN 10056 AND 10066; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 412fb638afc..bc53b0dcf98 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -787,7 +787,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.action.fleeAssist.withEmote) { - Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_FLEE_FOR_ASSIST); + Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_FLEE_FOR_ASSIST, me->getGender()); sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE); } TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUID().GetCounter()); @@ -1074,7 +1074,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u (*itr)->ToCreature()->CallForHelp((float)e.action.callHelp.range); if (e.action.callHelp.withEmote) { - Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_CALL_FOR_HELP); + Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_CALL_FOR_HELP, me->getGender()); sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE); } TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u, target: %u", me->GetGUID().GetCounter(), (*itr)->GetGUID().GetCounter()); diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 652a36c9bd1..2f14432b574 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -869,7 +869,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievemen if (Guild* guild = sGuildMgr->GetGuildById(GetOwner()->GetGuildId())) { - Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner(), achievement->ID); + Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->getGender(), _owner, achievement->ID); Trinity::LocalizedPacketDo _localizer(_builder); guild->BroadcastWorker(_localizer, GetOwner()); } @@ -887,7 +887,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievemen // if player is in world he can tell his friends about new achievement else if (GetOwner()->IsInWorld()) { - Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner(), achievement->ID); + Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->getGender(), _owner, achievement->ID); Trinity::LocalizedPacketDo _localizer(_builder); Trinity::PlayerDistWorker> _worker(GetOwner(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), _localizer); Cell::VisitWorldObjects(GetOwner(), _worker, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY)); diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp index a739507d4b2..40f345806e7 100644 --- a/src/server/game/Battlegrounds/Arena.cpp +++ b/src/server/game/Battlegrounds/Arena.cpp @@ -20,7 +20,6 @@ #include "ArenaTeamMgr.h" #include "GuildMgr.h" #include "Guild.h" -#include "Language.h" #include "ObjectAccessor.h" #include "Player.h" #include "World.h" @@ -33,10 +32,10 @@ Arena::Arena() StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S; StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN; + StartMessageIds[BG_STARTING_EVENT_FIRST] = ARENA_TEXT_START_ONE_MINUTE; + StartMessageIds[BG_STARTING_EVENT_SECOND] = ARENA_TEXT_START_THIRTY_SECONDS; + StartMessageIds[BG_STARTING_EVENT_THIRD] = ARENA_TEXT_START_FIFTEEN_SECONDS; + StartMessageIds[BG_STARTING_EVENT_FOURTH] = ARENA_TEXT_START_BATTLE_HAS_BEGUN; } void Arena::AddPlayer(Player* player) diff --git a/src/server/game/Battlegrounds/Arena.h b/src/server/game/Battlegrounds/Arena.h index dc4dc662bd2..3e09c0158ee 100644 --- a/src/server/game/Battlegrounds/Arena.h +++ b/src/server/game/Battlegrounds/Arena.h @@ -20,6 +20,14 @@ #include "Battleground.h" +enum ArenaBroadcastTexts +{ + ARENA_TEXT_START_ONE_MINUTE = 15740, + ARENA_TEXT_START_THIRTY_SECONDS = 15741, + ARENA_TEXT_START_FIFTEEN_SECONDS = 15739, + ARENA_TEXT_START_BATTLE_HAS_BEGUN = 15742, +}; + enum ArenaSpellIds { SPELL_ALLIANCE_GOLD_FLAG = 32724, diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index f79aeec0761..c3c7eb6a0d2 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -22,7 +22,7 @@ #include "BattlegroundScore.h" #include "Creature.h" #include "CreatureTextMgr.h" -#include "Chat.h" +#include "ChatTextBuilder.h" #include "Formulas.h" #include "GridNotifiersImpl.h" #include "Group.h" @@ -38,72 +38,6 @@ #include "Transport.h" #include "GameTime.h" -namespace Trinity -{ - class BattlegroundChatBuilder - { - public: - BattlegroundChatBuilder(ChatMsg msgtype, uint32 textId, Player const* source, va_list* args = NULL) - : _msgtype(msgtype), _textId(textId), _source(source), _args(args) { } - - void operator()(WorldPacket& data, LocaleConstant loc_idx) - { - char const* text = sObjectMgr->GetTrinityString(_textId, loc_idx); - if (_args) - { - // we need copy va_list before use or original va_list will corrupted - va_list ap; - va_copy(ap, *_args); - - char str[2048]; - vsnprintf(str, 2048, text, ap); - va_end(ap); - - do_helper(data, &str[0]); - } - else - do_helper(data, text); - } - - private: - void do_helper(WorldPacket& data, char const* text) - { - ChatHandler::BuildChatPacket(data, _msgtype, LANG_UNIVERSAL, _source, _source, text); - } - - ChatMsg _msgtype; - uint32 _textId; - Player const* _source; - va_list* _args; - }; - - class Battleground2ChatBuilder - { - public: - Battleground2ChatBuilder(ChatMsg msgtype, uint32 textId, Player const* source, uint32 arg1, uint32 arg2) - : _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) { } - - void operator()(WorldPacket& data, LocaleConstant loc_idx) - { - char const* text = sObjectMgr->GetTrinityString(_textId, loc_idx); - char const* arg1str = _arg1 ? sObjectMgr->GetTrinityString(_arg1, loc_idx) : ""; - char const* arg2str = _arg2 ? sObjectMgr->GetTrinityString(_arg2, loc_idx) : ""; - - char str[2048]; - snprintf(str, 2048, text, arg1str, arg2str); - - ChatHandler::BuildChatPacket(data, _msgtype, LANG_UNIVERSAL, _source, _source, str); - } - - private: - ChatMsg _msgtype; - uint32 _textId; - Player const* _source; - uint32 _arg1; - uint32 _arg2; - }; -} // namespace Trinity - template void Battleground::BroadcastWorker(Do& _do) { @@ -175,11 +109,11 @@ Battleground::Battleground() StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_1M; StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_30S; StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE; - //we must set to some default existing values - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; + + StartMessageIds[BG_STARTING_EVENT_FIRST] = BG_TEXT_START_TWO_MINUTES; + StartMessageIds[BG_STARTING_EVENT_SECOND] = BG_TEXT_START_ONE_MINUTE; + StartMessageIds[BG_STARTING_EVENT_THIRD] = BG_TEXT_START_HALF_MINUTE; + StartMessageIds[BG_STARTING_EVENT_FOURTH] = BG_TEXT_BATTLE_HAS_BEGUN; } Battleground::~Battleground() @@ -498,19 +432,22 @@ inline void Battleground::_ProcessJoin(uint32 diff) StartingEventCloseDoors(); SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FIRST]); // First start warning - 2 or 1 minute - SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL); + if (StartMessageIds[BG_STARTING_EVENT_FIRST]) + SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL); } // After 1 minute or 30 seconds, warning is signaled else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2)) { m_Events |= BG_STARTING_EVENT_2; - SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL); + if (StartMessageIds[BG_STARTING_EVENT_SECOND]) + SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL); } // After 30 or 15 seconds, warning is signaled else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3)) { m_Events |= BG_STARTING_EVENT_3; - SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL); + if (StartMessageIds[BG_STARTING_EVENT_THIRD]) + SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL); } // Delay expired (after 2 or 1 minute) else if (GetStartDelayTime() <= 0 && !(m_Events & BG_STARTING_EVENT_4)) @@ -519,7 +456,8 @@ inline void Battleground::_ProcessJoin(uint32 diff) StartingEventOpenDoors(); - SendWarningToAll(StartMessageIds[BG_STARTING_EVENT_FOURTH]); + if (StartMessageIds[BG_STARTING_EVENT_FOURTH]) + SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_FOURTH], CHAT_MSG_BG_SYSTEM_NEUTRAL); SetStatus(STATUS_IN_PROGRESS); SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FOURTH]); @@ -666,10 +604,23 @@ void Battleground::SendChatMessage(Creature* source, uint8 textId, WorldObject* sCreatureTextMgr->SendChat(source, textId, target); } -void Battleground::PlaySoundToAll(uint32 SoundID) +void Battleground::SendBroadcastText(uint32 id, ChatMsg msgType, WorldObject const* target) +{ + if (!sObjectMgr->GetBroadcastText(id)) + { + TC_LOG_ERROR("bg.battleground", "Battleground::SendBroadcastText: `broadcast_text` (ID: %u) was not found", id); + return; + } + + Trinity::BroadcastTextBuilder builder(nullptr, msgType, id, GENDER_MALE, target); + Trinity::LocalizedPacketDo localizer(builder); + BroadcastWorker(localizer); +} + +void Battleground::PlaySoundToAll(uint32 soundID) { WorldPacket data; - sBattlegroundMgr->BuildPlaySoundPacket(&data, SoundID); + sBattlegroundMgr->BuildPlaySoundPacket(&data, soundID); SendPacketToAll(&data); } @@ -742,12 +693,12 @@ void Battleground::EndBattleground(uint32 winner) { RemoveFromBGFreeSlotQueue(); - int32 winmsg_id = 0; bool guildAwarded = false; if (winner == ALLIANCE) { - winmsg_id = isBattleground() ? LANG_BG_A_WINS : LANG_ARENA_GOLD_WINS; + if (isBattleground()) + SendBroadcastText(BG_TEXT_ALLIANCE_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound @@ -755,7 +706,8 @@ void Battleground::EndBattleground(uint32 winner) } else if (winner == HORDE) { - winmsg_id = isBattleground() ? LANG_BG_H_WINS : LANG_ARENA_GREEN_WINS; + if (isBattleground()) + SendBroadcastText(BG_TEXT_HORDE_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound @@ -896,9 +848,6 @@ void Battleground::EndBattleground(uint32 winner) player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1); } - - if (winmsg_id) - SendMessageToAll(winmsg_id, CHAT_MSG_BG_SYSTEM_NEUTRAL); } uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const @@ -1700,17 +1649,17 @@ bool Battleground::AddSpiritGuide(uint32 type, Position const& pos, TeamId teamI return AddSpiritGuide(type, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teamId); } -void Battleground::SendMessageToAll(uint32 entry, ChatMsg type, Player const* source) +void Battleground::SendMessageToAll(uint32 entry, ChatMsg msgType, Player const* source) { if (!entry) return; - Trinity::BattlegroundChatBuilder bg_builder(type, entry, source); - Trinity::LocalizedPacketDo bg_do(bg_builder); - BroadcastWorker(bg_do); + Trinity::TrinityStringChatBuilder builder(nullptr, msgType, entry, source); + Trinity::LocalizedPacketDo localizer(builder); + BroadcastWorker(localizer); } -void Battleground::PSendMessageToAll(uint32 entry, ChatMsg type, Player const* source, ...) +void Battleground::PSendMessageToAll(uint32 entry, ChatMsg msgType, Player const* source, ...) { if (!entry) return; @@ -1718,46 +1667,13 @@ void Battleground::PSendMessageToAll(uint32 entry, ChatMsg type, Player const* s va_list ap; va_start(ap, source); - Trinity::BattlegroundChatBuilder bg_builder(type, entry, source, &ap); - Trinity::LocalizedPacketDo bg_do(bg_builder); - BroadcastWorker(bg_do); + Trinity::TrinityStringChatBuilder builder(nullptr, msgType, entry, source, &ap); + Trinity::LocalizedPacketDo localizer(builder); + BroadcastWorker(localizer); va_end(ap); } -void Battleground::SendWarningToAll(uint32 entry, ...) -{ - if (!entry) - return; - - std::map localizedPackets; - for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) - if (Player* player = _GetPlayer(itr, "SendWarningToAll")) - { - if (localizedPackets.find(player->GetSession()->GetSessionDbLocaleIndex()) == localizedPackets.end()) - { - char const* format = sObjectMgr->GetTrinityString(entry, player->GetSession()->GetSessionDbLocaleIndex()); - - char str[1024]; - va_list ap; - va_start(ap, entry); - vsnprintf(str, 1024, format, ap); - va_end(ap); - - ChatHandler::BuildChatPacket(localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()], CHAT_MSG_RAID_BOSS_EMOTE, LANG_UNIVERSAL, NULL, NULL, str); - } - - player->SendDirectMessage(&localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()]); - } -} - -void Battleground::SendMessage2ToAll(uint32 entry, ChatMsg type, Player const* source, uint32 arg1, uint32 arg2) -{ - Trinity::Battleground2ChatBuilder bg_builder(type, entry, source, arg1, arg2); - Trinity::LocalizedPacketDo bg_do(bg_builder); - BroadcastWorker(bg_do); -} - void Battleground::EndNow() { RemoveFromBGFreeSlotQueue(); diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 382b775c9a4..d8daaf8050a 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -59,6 +59,17 @@ enum BattlegroundCriteriaId BG_CRITERIA_CHECK_NOT_EVEN_A_SCRATCH, }; +enum BattlegroundBroadcastTexts +{ + BG_TEXT_ALLIANCE_WINS = 10633, + BG_TEXT_HORDE_WINS = 10634, + + BG_TEXT_START_TWO_MINUTES = 18193, + BG_TEXT_START_ONE_MINUTE = 18194, + BG_TEXT_START_HALF_MINUTE = 18195, + BG_TEXT_BATTLE_HAS_BEGUN = 18196, +}; + enum BattlegroundSounds { SOUND_HORDE_WINS = 8454, @@ -357,10 +368,11 @@ class TC_GAME_API Battleground // Packet Transfer // method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!) virtual void FillInitialWorldStates(WorldPacket& /*data*/) { } - void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true); + void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = nullptr, bool self = true); void SendPacketToAll(WorldPacket* packet); - void SendChatMessage(Creature* source, uint8 textId, WorldObject* target = NULL); + void SendChatMessage(Creature* source, uint8 textId, WorldObject* target = nullptr); + void SendBroadcastText(uint32 id, ChatMsg msgType, WorldObject const* target = nullptr); template void BroadcastWorker(Do& _do); @@ -380,9 +392,6 @@ class TC_GAME_API Battleground void SendMessageToAll(uint32 entry, ChatMsg type, Player const* source = NULL); void PSendMessageToAll(uint32 entry, ChatMsg type, Player const* source, ...); - // specialized version with 2 string id args - void SendMessage2ToAll(uint32 entry, ChatMsg type, Player const* source, uint32 strId1 = 0, uint32 strId2 = 0); - // Raid Group Group* GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[TEAM_ALLIANCE] : m_BgRaids[TEAM_HORDE]; } void SetBgRaid(uint32 TeamID, Group* bg_raid); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 182218af93c..3087e7be708 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -37,6 +37,7 @@ #include "BattlegroundTP.h" #include "BattlegroundBFG.h" #include "Chat.h" +#include "Language.h" #include "Map.h" #include "MapManager.h" #include "Player.h" diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index c9669271da5..36f6e19c68a 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -20,7 +20,6 @@ #include "WorldPacket.h" #include "BattlegroundMgr.h" #include "Creature.h" -#include "Language.h" #include "Player.h" #include "Util.h" #include "WorldSession.h" @@ -52,11 +51,6 @@ BattlegroundAB::BattlegroundAB() m_HonorTics = 0; m_ReputationTics = 0; - - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AB_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AB_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AB_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN; } BattlegroundAB::~BattlegroundAB() { } @@ -98,19 +92,17 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff) // create new occupied banner _CreateBanner(node, BG_AB_NODE_TYPE_OCCUPIED, teamIndex, true); _SendNodeUpdate(node); - _NodeOccupied(node, (teamIndex == 0) ? ALLIANCE:HORDE); + _NodeOccupied(node, (teamIndex == TEAM_ALLIANCE) ? ALLIANCE : HORDE); // Message to chatlog - if (teamIndex == 0) + if (teamIndex == TEAM_ALLIANCE) { - // FIXME: team and node names not localized - SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextAllianceTaken, CHAT_MSG_BG_SYSTEM_ALLIANCE); PlaySoundToAll(BG_AB_SOUND_NODE_CAPTURED_ALLIANCE); } else { - // FIXME: team and node names not localized - SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextHordeTaken, CHAT_MSG_BG_SYSTEM_HORDE); PlaySoundToAll(BG_AB_SOUND_NODE_CAPTURED_HORDE); } } @@ -152,9 +144,9 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff) if (!m_IsInformedNearVictory && m_TeamScores[team] > BG_AB_WARNING_NEAR_VICTORY_SCORE) { if (team == TEAM_ALLIANCE) - SendMessageToAll(LANG_BG_AB_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_AB_TEXT_ALLIANCE_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); else - SendMessageToAll(LANG_BG_AB_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_AB_TEXT_HORDE_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_AB_SOUND_NEAR_VICTORY); m_IsInformedNearVictory = true; } @@ -299,21 +291,6 @@ void BattlegroundAB::_DelBanner(uint8 node, uint8 type, uint8 teamIndex) SpawnBGObject(obj, RESPAWN_ONE_DAY); } -int32 BattlegroundAB::_GetNodeNameId(uint8 node) -{ - switch (node) - { - case BG_AB_NODE_STABLES: return LANG_BG_AB_NODE_STABLES; - case BG_AB_NODE_BLACKSMITH: return LANG_BG_AB_NODE_BLACKSMITH; - case BG_AB_NODE_FARM: return LANG_BG_AB_NODE_FARM; - case BG_AB_NODE_LUMBER_MILL:return LANG_BG_AB_NODE_LUMBER_MILL; - case BG_AB_NODE_GOLD_MINE: return LANG_BG_AB_NODE_GOLD_MINE; - default: - ABORT(); - } - return 0; -} - void BattlegroundAB::FillInitialWorldStates(WorldPacket& data) { const uint8 plusArray[] = {0, 2, 3, 0, 1}; @@ -461,11 +438,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ _SendNodeUpdate(node); m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME; - // FIXME: team and node names not localized - if (teamIndex == 0) - SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node), LANG_BG_AB_ALLY); + if (teamIndex == TEAM_ALLIANCE) + SendBroadcastText(ABNodes[node].TextAllianceClaims, CHAT_MSG_BG_SYSTEM_ALLIANCE, source); else - SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node), LANG_BG_AB_HORDE); + SendBroadcastText(ABNodes[node].TextHordeClaims, CHAT_MSG_BG_SYSTEM_HORDE, source); sound = BG_AB_SOUND_NODE_CLAIMED; } @@ -485,11 +461,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ _SendNodeUpdate(node); m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME; - // FIXME: node names not localized if (teamIndex == TEAM_ALLIANCE) - SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextAllianceAssaulted, CHAT_MSG_BG_SYSTEM_ALLIANCE, source); else - SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextHordeAssaulted, CHAT_MSG_BG_SYSTEM_HORDE, source); } // If contested, change back to occupied else @@ -503,13 +478,12 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ _CreateBanner(node, BG_AB_NODE_TYPE_OCCUPIED, teamIndex, true); _SendNodeUpdate(node); m_NodeTimers[node] = 0; - _NodeOccupied(node, (teamIndex == TEAM_ALLIANCE) ? ALLIANCE:HORDE); + _NodeOccupied(node, (teamIndex == TEAM_ALLIANCE) ? ALLIANCE : HORDE); - // FIXME: node names not localized if (teamIndex == TEAM_ALLIANCE) - SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextAllianceDefended, CHAT_MSG_BG_SYSTEM_ALLIANCE, source); else - SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextHordeDefended, CHAT_MSG_BG_SYSTEM_HORDE, source); } sound = (teamIndex == TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; } @@ -527,11 +501,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ _NodeDeOccupied(node); m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME; - // FIXME: node names not localized if (teamIndex == TEAM_ALLIANCE) - SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextAllianceAssaulted, CHAT_MSG_BG_SYSTEM_ALLIANCE, source); else - SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextHordeAssaulted, CHAT_MSG_BG_SYSTEM_HORDE, source); sound = (teamIndex == TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; } @@ -539,11 +512,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ // If node is occupied again, send "X has taken the Y" msg. if (m_Nodes[node] >= BG_AB_NODE_TYPE_OCCUPIED) { - // FIXME: team and node names not localized if (teamIndex == TEAM_ALLIANCE) - SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextAllianceTaken, CHAT_MSG_BG_SYSTEM_ALLIANCE); else - SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node)); + SendBroadcastText(ABNodes[node].TextHordeTaken, CHAT_MSG_BG_SYSTEM_HORDE); } PlaySoundToAll(sound); } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h index 7587f3fda83..05f589d475e 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h @@ -152,6 +152,34 @@ enum BG_AB_BattlegroundNodes BG_AB_ALL_NODES_COUNT = 7 // all nodes (dynamic and static) }; +enum BG_AB_BroadcastTexts +{ + BG_AB_TEXT_ALLIANCE_NEAR_VICTORY = 10598, + BG_AB_TEXT_HORDE_NEAR_VICTORY = 10599, +}; + +struct ABNodeInfo +{ + uint32 NodeId; + uint32 TextAllianceAssaulted; + uint32 TextHordeAssaulted; + uint32 TextAllianceTaken; + uint32 TextHordeTaken; + uint32 TextAllianceDefended; + uint32 TextHordeDefended; + uint32 TextAllianceClaims; + uint32 TextHordeClaims; +}; + +ABNodeInfo const ABNodes[BG_AB_DYNAMIC_NODES_COUNT] = +{ + { BG_AB_NODE_STABLES, 10199, 10200, 10203, 10204, 10201, 10202, 10286, 10287 }, + { BG_AB_NODE_BLACKSMITH, 10211, 10212, 10213, 10214, 10215, 10216, 10290, 10291 }, + { BG_AB_NODE_FARM, 10217, 10218, 10219, 10220, 10221, 10222, 10288, 10289 }, + { BG_AB_NODE_LUMBER_MILL, 10224, 10225, 10226, 10227, 10228, 10229, 10284, 10285 }, + { BG_AB_NODE_GOLD_MINE, 10230, 10231, 10232, 10233, 10234, 10235, 10282, 10283 } +}; + enum BG_AB_NodeStatus { BG_AB_NODE_TYPE_NEUTRAL = 0, @@ -315,8 +343,6 @@ class BattlegroundAB : public Battleground void _NodeOccupied(uint8 node, Team team); void _NodeDeOccupied(uint8 node); - int32 _GetNodeNameId(uint8 node); - /* Nodes info: 0: neutral 1: ally contested diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 30ca2f94a66..d6bf87e4584 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -22,7 +22,6 @@ #include "WorldPacket.h" #include "GameObject.h" -#include "Language.h" #include "Player.h" #include "ScriptedCreature.h" #include "WorldSession.h" @@ -50,10 +49,9 @@ BattlegroundAV::BattlegroundAV() for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i) InitNode(i, 0, false); - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AV_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AV_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AV_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AV_HAS_BEGUN; + StartMessageIds[BG_STARTING_EVENT_SECOND] = BG_AV_TEXT_START_ONE_MINUTE; + StartMessageIds[BG_STARTING_EVENT_THIRD] = BG_AV_TEXT_START_HALF_MINUTE; + StartMessageIds[BG_STARTING_EVENT_FOURTH] = BG_AV_TEXT_BATTLE_HAS_BEGUN; } BattlegroundAV::~BattlegroundAV() { } @@ -263,7 +261,10 @@ void BattlegroundAV::UpdateScore(uint16 team, int16 points) } else if (!m_IsInformedNearVictory[teamindex] && m_Team_Scores[teamindex] < SEND_MSG_NEAR_LOSE) { - SendMessageToAll(teamindex == TEAM_HORDE?LANG_BG_AV_H_NEAR_LOSE:LANG_BG_AV_A_NEAR_LOSE, teamindex == TEAM_HORDE ? CHAT_MSG_BG_SYSTEM_HORDE : CHAT_MSG_BG_SYSTEM_ALLIANCE); + if (teamindex == TEAM_ALLIANCE) + SendBroadcastText(BG_AV_TEXT_ALLIANCE_NEAR_LOSE, CHAT_MSG_BG_SYSTEM_ALLIANCE); + else + SendBroadcastText(BG_AV_TEXT_HORDE_NEAR_LOSE, CHAT_MSG_BG_SYSTEM_HORDE); PlaySoundToAll(AV_SOUND_NEAR_VICTORY); m_IsInformedNearVictory[teamindex] = true; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h index 6e54a5b3ede..c63f5447821 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h @@ -55,6 +55,16 @@ enum SharedActions ACTION_BUFF_YELL = -30001 }; +enum BG_AV_BroadcastTexts +{ + BG_AV_TEXT_START_ONE_MINUTE = 10638, + BG_AV_TEXT_START_HALF_MINUTE = 10639, + BG_AV_TEXT_BATTLE_HAS_BEGUN = 10640, + + BG_AV_TEXT_ALLIANCE_NEAR_LOSE = 23210, + BG_AV_TEXT_HORDE_NEAR_LOSE = 23211 +}; + enum BG_AV_Sounds { /// @todo: get out if there comes a sound when neutral team captures mine diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index b7a72e26f9d..03e0a4e58c0 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -20,7 +20,6 @@ #include "WorldPacket.h" #include "BattlegroundMgr.h" #include "Creature.h" -#include "Language.h" #include "Player.h" #include "Util.h" #include "ObjectAccessor.h" @@ -63,11 +62,6 @@ BattlegroundEY::BattlegroundEY() for (uint8 i = 0; i < 2 * EY_POINTS_MAX; ++i) m_CurrentPointPlayersCount[i] = 0; - - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_EY_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN; } BattlegroundEY::~BattlegroundEY() { } @@ -292,16 +286,6 @@ void BattlegroundEY::UpdatePointStatuses() void BattlegroundEY::UpdateTeamScore(uint32 Team) { uint32 score = GetTeamScore(Team); - /// @todo there should be some sound played when one team is near victory!! - and define variables - /*if (!m_IsInformedNearVictory && score >= BG_EY_WARNING_NEAR_VICTORY_SCORE) - { - if (Team == ALLIANCE) - SendMessageToAll(LANG_BG_EY_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); - else - SendMessageToAll(LANG_BG_EY_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL); - PlaySoundToAll(BG_EY_SOUND_NEAR_VICTORY); - m_IsInformedNearVictory = true; - }*/ if (score >= BG_EY_MAX_TEAM_SCORE) { @@ -578,7 +562,7 @@ void BattlegroundEY::RespawnFlag(bool send_message) if (send_message) { - SendMessageToAll(LANG_BG_EY_RESETED_FLAG, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_EY_TEXT_FLAG_RESET, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound... } @@ -639,9 +623,9 @@ void BattlegroundEY::EventPlayerDroppedFlag(Player* player) UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_WAIT_RESPAWN); if (player->GetTeam() == ALLIANCE) - SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL); + SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_ALLIANCE); else - SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL); + SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_HORDE); } void BattlegroundEY::EventPlayerClickedOnFlag(Player* player, GameObject* target_obj) @@ -671,9 +655,9 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player* player, GameObject* target player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); if (player->GetTeam() == ALLIANCE) - PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, player->GetName().c_str()); + SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); else - PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL, player->GetName().c_str()); + SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player); } void BattlegroundEY::EventTeamLostPoint(Player* player, uint32 Point) @@ -712,10 +696,9 @@ void BattlegroundEY::EventTeamLostPoint(Player* player, uint32 Point) m_PointState[Point] = EY_POINT_NO_OWNER; if (Team == ALLIANCE) - SendMessageToAll(m_LosingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); + SendBroadcastText(m_LosingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); else - SendMessageToAll(m_LosingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player); - + SendBroadcastText(m_LosingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player); UpdatePointsIcons(Team, Point); UpdatePointsCount(Team); @@ -755,9 +738,9 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point) m_PointState[Point] = EY_POINT_UNDER_CONTROL; if (Team == ALLIANCE) - SendMessageToAll(m_CapturingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); + SendBroadcastText(m_CapturingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); else - SendMessageToAll(m_CapturingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player); + SendBroadcastText(m_CapturingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player); if (BgCreatures[Point]) DelCreature(Point); @@ -798,27 +781,22 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player* player, uint32 BgObjectType player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); if (player->GetTeam() == ALLIANCE) + { + SendBroadcastText(BG_EY_TEXT_ALLIANCE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE); + } else + { + SendBroadcastText(BG_EY_TEXT_HORDE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player); PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_HORDE); + } SpawnBGObject(BgObjectType, RESPAWN_IMMEDIATELY); m_FlagsTimer = BG_EY_FLAG_RESPAWN_TIME; m_FlagCapturedBgObjectType = BgObjectType; - uint8 team_id = 0; - if (player->GetTeam() == ALLIANCE) - { - team_id = TEAM_ALLIANCE; - SendMessageToAll(LANG_BG_EY_CAPTURED_FLAG_A, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); - } - else - { - team_id = TEAM_HORDE; - SendMessageToAll(LANG_BG_EY_CAPTURED_FLAG_H, CHAT_MSG_BG_SYSTEM_HORDE, player); - } - + uint8 team_id = player->GetTeam() == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE; if (m_TeamPointsCount[team_id] > 0) AddPoints(player->GetTeam(), BG_EY_FlagPoints[m_TeamPointsCount[team_id] - 1]); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h index 100d4560804..0e14db82c89 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.h @@ -21,7 +21,6 @@ #include "Battleground.h" #include "BattlegroundScore.h" -#include "Language.h" #include "Object.h" enum BG_EY_Misc @@ -248,6 +247,35 @@ enum BG_EY_Objectives EY_OBJECTIVE_CAPTURE_FLAG = 183 }; +enum BG_EY_BroadcastTexts +{ + BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS = 17828, + BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS = 17829, + BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS = 17835, + BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS = 17836, + + BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER = 17819, + BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER = 17823, + BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER = 17831, + BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER = 17832, + + BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS = 17826, + BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS = 17827, + BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS = 17833, + BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS = 17834, + + BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER = 17824, + BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER = 17825, + BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER = 17837, + BG_EY_TEXT_HORDE_LOST_MAGE_TOWER = 17838, + + BG_EY_TEXT_TAKEN_FLAG = 18359, + BG_EY_TEXT_FLAG_DROPPED = 18361, + BG_EY_TEXT_FLAG_RESET = 18364, + BG_EY_TEXT_ALLIANCE_CAPTURED_FLAG = 18375, + BG_EY_TEXT_HORDE_CAPTURED_FLAG = 18384, +}; + struct BattlegroundEYPointIconsStruct { BattlegroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex) @@ -310,17 +338,17 @@ const BattlegroundEYPointIconsStruct m_PointsIconStruct[EY_POINTS_MAX] = }; const BattlegroundEYLosingPointStruct m_LosingPointTypes[EY_POINTS_MAX] = { - BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_LOST_A_F_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_LOST_H_F_RUINS), - BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_LOST_A_B_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_LOST_H_B_TOWER), - BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_LOST_A_D_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_LOST_H_D_RUINS), - BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_LOST_A_M_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_LOST_H_M_TOWER) + BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS), + BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER), + BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS), + BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_HORDE_LOST_MAGE_TOWER) }; const BattlegroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX] = { - BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_TAKEN_A_F_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_TAKEN_H_F_RUINS, EY_GRAVEYARD_FEL_REAVER), - BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_TAKEN_A_B_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_TAKEN_H_B_TOWER, EY_GRAVEYARD_BLOOD_ELF), - BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_TAKEN_A_D_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_TAKEN_H_D_RUINS, EY_GRAVEYARD_DRAENEI_RUINS), - BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_TAKEN_A_M_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_TAKEN_H_M_TOWER, EY_GRAVEYARD_MAGE_TOWER) + BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS, EY_GRAVEYARD_FEL_REAVER), + BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER, EY_GRAVEYARD_BLOOD_ELF), + BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS, EY_GRAVEYARD_DRAENEI_RUINS), + BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER, EY_GRAVEYARD_MAGE_TOWER) }; struct BattlegroundEYScore final : public BattlegroundScore diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 6db5c73a4f4..075377d4e6d 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -19,7 +19,6 @@ #include "Player.h" #include "Battleground.h" #include "BattlegroundIC.h" -#include "Language.h" #include "WorldPacket.h" #include "GameObject.h" #include "ObjectMgr.h" @@ -32,11 +31,6 @@ BattlegroundIC::BattlegroundIC() BgObjects.resize(MAX_NORMAL_GAMEOBJECTS_SPAWNS + MAX_AIRSHIPS_SPAWNS + MAX_HANGAR_TELEPORTERS_SPAWNS + MAX_FORTRESS_TELEPORTERS_SPAWNS + MAX_HANGAR_TELEPORTER_EFFECTS_SPAWNS + MAX_FORTRESS_TELEPORTER_EFFECTS_SPAWNS); BgCreatures.resize(MAX_NORMAL_NPCS_SPAWNS + MAX_WORKSHOP_SPAWNS + MAX_DOCKS_SPAWNS + MAX_SPIRIT_GUIDES_SPAWNS + MAX_HANGAR_NPCS_SPAWNS); - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_IC_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_IC_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_IC_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_IC_HAS_BEGUN; - for (uint8 i = 0; i < 2; ++i) factionReinforcements[i] = MAX_REINFORCEMENTS; @@ -192,7 +186,10 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff) UpdateNodeWorldState(&nodePoint[i]); HandleCapturedNodes(&nodePoint[i], false); - SendMessage2ToAll(LANG_BG_IC_TEAM_HAS_TAKEN_NODE, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (nodePoint[i].faction == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE), nodePoint[i].string); + if (nodePoint[i].faction == TEAM_ALLIANCE) + SendBroadcastText(ICNodes[i].TextAllianceTaken, CHAT_MSG_BG_SYSTEM_ALLIANCE); + else + SendBroadcastText(ICNodes[i].TextHordeTaken, CHAT_MSG_BG_SYSTEM_HORDE); nodePoint[i].needChange = false; nodePoint[i].timer = BANNER_STATE_CHANGE_TIME; @@ -414,13 +411,6 @@ void BattlegroundIC::HandleKillPlayer(Player* player, Player* killer) EndBattleground(killer->GetTeam()); } -void BattlegroundIC::EndBattleground(uint32 winner) -{ - SendMessage2ToAll(LANG_BG_IC_TEAM_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (winner == ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE)); - - Battleground::EndBattleground(winner); -} - void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target_obj) { if (GetStatus() != STATUS_IN_PROGRESS) @@ -458,15 +448,23 @@ void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target UpdatePlayerScore(player, SCORE_BASES_ASSAULTED, 1); - SendMessage2ToAll(LANG_BG_IC_TEAM_ASSAULTED_NODE_1, CHAT_MSG_BG_SYSTEM_NEUTRAL, player, nodePoint[i].string); - SendMessage2ToAll(LANG_BG_IC_TEAM_ASSAULTED_NODE_2, CHAT_MSG_BG_SYSTEM_NEUTRAL, player, nodePoint[i].string, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE)); + if (nodePoint[i].faction == TEAM_ALLIANCE) + SendBroadcastText(ICNodes[i].TextAssaulted, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); + else + SendBroadcastText(ICNodes[i].TextAssaulted, CHAT_MSG_BG_SYSTEM_HORDE, player); + HandleContestedNodes(&nodePoint[i]); } else if (nextBanner == nodePoint[i].banners[BANNER_A_CONTROLLED] || nextBanner == nodePoint[i].banners[BANNER_H_CONTROLLED]) // if we are going to spawn the definitve faction banner, we dont need the timer anymore { nodePoint[i].timer = BANNER_STATE_CHANGE_TIME; nodePoint[i].needChange = false; - SendMessage2ToAll(LANG_BG_IC_TEAM_DEFENDED_NODE, CHAT_MSG_BG_SYSTEM_NEUTRAL, player, nodePoint[i].string); + + if (nodePoint[i].faction == TEAM_ALLIANCE) + SendBroadcastText(ICNodes[i].TextDefended, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); + else + SendBroadcastText(ICNodes[i].TextDefended, CHAT_MSG_BG_SYSTEM_HORDE, player); + HandleCapturedNodes(&nodePoint[i], true); UpdatePlayerScore(player, SCORE_BASES_DEFENDED, 1); } @@ -809,26 +807,36 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) GetBGObject(BG_IC_GO_ALLIANCE_BANNER)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); } - uint32 lang_entry = 0; - + uint32 textId; + ChatMsg msgType; switch (go->GetEntry()) { case GO_HORDE_GATE_1: - lang_entry = LANG_BG_IC_NORTH_GATE_DESTROYED; + textId = BG_IC_TEXT_FRONT_GATE_HORDE_DESTROYED; + msgType = CHAT_MSG_BG_SYSTEM_ALLIANCE; break; case GO_HORDE_GATE_2: - case GO_ALLIANCE_GATE_1: - lang_entry = LANG_BG_IC_WEST_GATE_DESTROYED; + textId = BG_IC_TEXT_WEST_GATE_HORDE_DESTROYED; + msgType = CHAT_MSG_BG_SYSTEM_ALLIANCE; break; case GO_HORDE_GATE_3: + textId = BG_IC_TEXT_EAST_GATE_HORDE_DESTROYED; + msgType = CHAT_MSG_BG_SYSTEM_ALLIANCE; + break; + case GO_ALLIANCE_GATE_1: + textId = BG_IC_TEXT_WEST_GATE_ALLIANCE_DESTROYED; + msgType = CHAT_MSG_BG_SYSTEM_HORDE; + break; case GO_ALLIANCE_GATE_2: - lang_entry = LANG_BG_IC_EAST_GATE_DESTROYED; + textId = BG_IC_TEXT_EAST_GATE_ALLIANCE_DESTROYED; + msgType = CHAT_MSG_BG_SYSTEM_HORDE; break; case GO_ALLIANCE_GATE_3: - lang_entry = LANG_BG_IC_SOUTH_GATE_DESTROYED; + textId = BG_IC_TEXT_FRONT_GATE_ALLIANCE_DESTROYED; + msgType = CHAT_MSG_BG_SYSTEM_HORDE; break; default: - break; + return; } if (go->GetEntry() == GO_HORDE_GATE_1 || go->GetEntry() == GO_HORDE_GATE_2 || go->GetEntry() == GO_HORDE_GATE_3) @@ -842,7 +850,7 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go) TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry); } - SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP)); + SendBroadcastText(textId, msgType); } WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveYard(Player* player) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h index bab8035788c..c30847282fb 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.h @@ -21,7 +21,6 @@ #include "Battleground.h" #include "BattlegroundScore.h" -#include "Language.h" #include "Object.h" const uint32 BG_IC_Factions[2] = @@ -847,6 +846,36 @@ Position const BG_IC_SpiritGuidePos[MAX_NODE_TYPES+2] = {1148.65f, -1250.98f, 16.60f, 1.74f}, // last resort horde }; +enum ICBroadcastTexts +{ + BG_IC_TEXT_FRONT_GATE_HORDE_DESTROYED = 35409, + BG_IC_TEXT_FRONT_GATE_ALLIANCE_DESTROYED = 35410, + BG_IC_TEXT_WEST_GATE_HORDE_DESTROYED = 35411, + BG_IC_TEXT_WEST_GATE_ALLIANCE_DESTROYED = 35412, + BG_IC_TEXT_EAST_GATE_HORDE_DESTROYED = 35413, + BG_IC_TEXT_EAST_GATE_ALLIANCE_DESTROYED = 35414 +}; + +struct ICNodeInfo +{ + uint32 NodeId; + uint32 TextAssaulted; + uint32 TextDefended; + uint32 TextAllianceTaken; + uint32 TextHordeTaken; +}; + +ICNodeInfo const ICNodes[MAX_NODE_TYPES] = +{ + { NODE_TYPE_REFINERY, 35377, 35378, 35379, 35380 }, + { NODE_TYPE_QUARRY, 35373, 35374, 35375, 35376 }, + { NODE_TYPE_DOCKS, 35365, 35366, 35367, 35368 }, + { NODE_TYPE_HANGAR, 35369, 35370, 35371, 35372 }, + { NODE_TYPE_WORKSHOP, 35278, 35286, 35279, 35280 }, + { NODE_TYPE_GRAVEYARD_A, 35461, 35459, 35463, 35466 }, + { NODE_TYPE_GRAVEYARD_H, 35462, 35460, 35464, 35465 } +}; + // I.E: Hangar, Quarry, Graveyards .. etc struct ICNodePoint { @@ -860,18 +889,17 @@ struct ICNodePoint uint32 last_entry; // the last gameobject_entry uint32 worldStates[5]; // the worldstates that represent the node in the map ICNodeState nodeState; - uint32 string; }; -const ICNodePoint nodePointInitial[7] = +const ICNodePoint nodePointInitial[MAX_NODE_TYPES] = { - {BG_IC_GO_REFINERY_BANNER, GO_REFINERY_BANNER, TEAM_NEUTRAL, NODE_TYPE_REFINERY, {GO_ALLIANCE_BANNER_REFINERY, GO_ALLIANCE_BANNER_REFINERY_CONT, GO_HORDE_BANNER_REFINERY, GO_HORDE_BANNER_REFINERY_CONT}, false, 0, 0, {BG_IC_REFINERY_UNCONTROLLED, BG_IC_REFINERY_CONFLICT_A, BG_IC_REFINERY_CONFLICT_H, BG_IC_REFINERY_CONTROLLED_A, BG_IC_REFINERY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_REFINERY}, - {BG_IC_GO_QUARRY_BANNER, GO_QUARRY_BANNER, TEAM_NEUTRAL, NODE_TYPE_QUARRY, {GO_ALLIANCE_BANNER_QUARRY, GO_ALLIANCE_BANNER_QUARRY_CONT, GO_HORDE_BANNER_QUARRY, GO_HORDE_BANNER_QUARRY_CONT}, false, 0, 0, {BG_IC_QUARRY_UNCONTROLLED, BG_IC_QUARRY_CONFLICT_A, BG_IC_QUARRY_CONFLICT_H, BG_IC_QUARRY_CONTROLLED_A, BG_IC_QUARRY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_QUARRY}, - {BG_IC_GO_DOCKS_BANNER, GO_DOCKS_BANNER, TEAM_NEUTRAL, NODE_TYPE_DOCKS, {GO_ALLIANCE_BANNER_DOCK, GO_ALLIANCE_BANNER_DOCK_CONT, GO_HORDE_BANNER_DOCK, GO_HORDE_BANNER_DOCK_CONT}, false, 0, 0, {BG_IC_DOCKS_UNCONTROLLED, BG_IC_DOCKS_CONFLICT_A, BG_IC_DOCKS_CONFLICT_H, BG_IC_DOCKS_CONTROLLED_A, BG_IC_DOCKS_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_DOCKS}, - {BG_IC_GO_HANGAR_BANNER, GO_HANGAR_BANNER, TEAM_NEUTRAL, NODE_TYPE_HANGAR, {GO_ALLIANCE_BANNER_HANGAR, GO_ALLIANCE_BANNER_HANGAR_CONT, GO_HORDE_BANNER_HANGAR, GO_HORDE_BANNER_HANGAR_CONT}, false, 0, 0, {BG_IC_HANGAR_UNCONTROLLED, BG_IC_HANGAR_CONFLICT_A, BG_IC_HANGAR_CONFLICT_H, BG_IC_HANGAR_CONTROLLED_A, BG_IC_HANGAR_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_HANGAR}, - {BG_IC_GO_WORKSHOP_BANNER, GO_WORKSHOP_BANNER, TEAM_NEUTRAL, NODE_TYPE_WORKSHOP, {GO_ALLIANCE_BANNER_WORKSHOP, GO_ALLIANCE_BANNER_WORKSHOP_CONT, GO_HORDE_BANNER_WORKSHOP, GO_HORDE_BANNER_WORKSHOP_CONT}, false, 0, 0, {BG_IC_WORKSHOP_UNCONTROLLED, BG_IC_WORKSHOP_CONFLICT_A, BG_IC_WORKSHOP_CONFLICT_H, BG_IC_WORKSHOP_CONTROLLED_A, BG_IC_WORKSHOP_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_WORKSHOP}, - {BG_IC_GO_ALLIANCE_BANNER, GO_ALLIANCE_BANNER, TEAM_ALLIANCE, NODE_TYPE_GRAVEYARD_A, {GO_ALLIANCE_BANNER_GRAVEYARD_A, GO_ALLIANCE_BANNER_GRAVEYARD_A_CONT, GO_HORDE_BANNER_GRAVEYARD_A, GO_HORDE_BANNER_GRAVEYARD_A_CONT}, false, 0, 0, {BG_IC_ALLIANCE_KEEP_UNCONTROLLED, BG_IC_ALLIANCE_KEEP_CONFLICT_A, BG_IC_ALLIANCE_KEEP_CONFLICT_H, BG_IC_ALLIANCE_KEEP_CONTROLLED_A, BG_IC_ALLIANCE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_A, LANG_BG_IC_ALLIANCE_KEEP}, - {BG_IC_GO_HORDE_BANNER, GO_HORDE_BANNER, TEAM_HORDE, NODE_TYPE_GRAVEYARD_H, {GO_ALLIANCE_BANNER_GRAVEYARD_H, GO_ALLIANCE_BANNER_GRAVEYARD_H_CONT, GO_HORDE_BANNER_GRAVEYARD_H, GO_HORDE_BANNER_GRAVEYARD_H_CONT}, false, 0, 0, {BG_IC_HORDE_KEEP_UNCONTROLLED, BG_IC_HORDE_KEEP_CONFLICT_A, BG_IC_HORDE_KEEP_CONFLICT_H, BG_IC_HORDE_KEEP_CONTROLLED_A, BG_IC_HORDE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_H, LANG_BG_IC_HORDE_KEEP} + {BG_IC_GO_REFINERY_BANNER, GO_REFINERY_BANNER, TEAM_NEUTRAL, NODE_TYPE_REFINERY, {GO_ALLIANCE_BANNER_REFINERY, GO_ALLIANCE_BANNER_REFINERY_CONT, GO_HORDE_BANNER_REFINERY, GO_HORDE_BANNER_REFINERY_CONT}, false, 0, 0, {BG_IC_REFINERY_UNCONTROLLED, BG_IC_REFINERY_CONFLICT_A, BG_IC_REFINERY_CONFLICT_H, BG_IC_REFINERY_CONTROLLED_A, BG_IC_REFINERY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED}, + {BG_IC_GO_QUARRY_BANNER, GO_QUARRY_BANNER, TEAM_NEUTRAL, NODE_TYPE_QUARRY, {GO_ALLIANCE_BANNER_QUARRY, GO_ALLIANCE_BANNER_QUARRY_CONT, GO_HORDE_BANNER_QUARRY, GO_HORDE_BANNER_QUARRY_CONT}, false, 0, 0, {BG_IC_QUARRY_UNCONTROLLED, BG_IC_QUARRY_CONFLICT_A, BG_IC_QUARRY_CONFLICT_H, BG_IC_QUARRY_CONTROLLED_A, BG_IC_QUARRY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED}, + {BG_IC_GO_DOCKS_BANNER, GO_DOCKS_BANNER, TEAM_NEUTRAL, NODE_TYPE_DOCKS, {GO_ALLIANCE_BANNER_DOCK, GO_ALLIANCE_BANNER_DOCK_CONT, GO_HORDE_BANNER_DOCK, GO_HORDE_BANNER_DOCK_CONT}, false, 0, 0, {BG_IC_DOCKS_UNCONTROLLED, BG_IC_DOCKS_CONFLICT_A, BG_IC_DOCKS_CONFLICT_H, BG_IC_DOCKS_CONTROLLED_A, BG_IC_DOCKS_CONTROLLED_H}, NODE_STATE_UNCONTROLLED}, + {BG_IC_GO_HANGAR_BANNER, GO_HANGAR_BANNER, TEAM_NEUTRAL, NODE_TYPE_HANGAR, {GO_ALLIANCE_BANNER_HANGAR, GO_ALLIANCE_BANNER_HANGAR_CONT, GO_HORDE_BANNER_HANGAR, GO_HORDE_BANNER_HANGAR_CONT}, false, 0, 0, {BG_IC_HANGAR_UNCONTROLLED, BG_IC_HANGAR_CONFLICT_A, BG_IC_HANGAR_CONFLICT_H, BG_IC_HANGAR_CONTROLLED_A, BG_IC_HANGAR_CONTROLLED_H}, NODE_STATE_UNCONTROLLED}, + {BG_IC_GO_WORKSHOP_BANNER, GO_WORKSHOP_BANNER, TEAM_NEUTRAL, NODE_TYPE_WORKSHOP, {GO_ALLIANCE_BANNER_WORKSHOP, GO_ALLIANCE_BANNER_WORKSHOP_CONT, GO_HORDE_BANNER_WORKSHOP, GO_HORDE_BANNER_WORKSHOP_CONT}, false, 0, 0, {BG_IC_WORKSHOP_UNCONTROLLED, BG_IC_WORKSHOP_CONFLICT_A, BG_IC_WORKSHOP_CONFLICT_H, BG_IC_WORKSHOP_CONTROLLED_A, BG_IC_WORKSHOP_CONTROLLED_H}, NODE_STATE_UNCONTROLLED}, + {BG_IC_GO_ALLIANCE_BANNER, GO_ALLIANCE_BANNER, TEAM_ALLIANCE, NODE_TYPE_GRAVEYARD_A, {GO_ALLIANCE_BANNER_GRAVEYARD_A, GO_ALLIANCE_BANNER_GRAVEYARD_A_CONT, GO_HORDE_BANNER_GRAVEYARD_A, GO_HORDE_BANNER_GRAVEYARD_A_CONT}, false, 0, 0, {BG_IC_ALLIANCE_KEEP_UNCONTROLLED, BG_IC_ALLIANCE_KEEP_CONFLICT_A, BG_IC_ALLIANCE_KEEP_CONFLICT_H, BG_IC_ALLIANCE_KEEP_CONTROLLED_A, BG_IC_ALLIANCE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_A}, + {BG_IC_GO_HORDE_BANNER, GO_HORDE_BANNER, TEAM_HORDE, NODE_TYPE_GRAVEYARD_H, {GO_ALLIANCE_BANNER_GRAVEYARD_H, GO_ALLIANCE_BANNER_GRAVEYARD_H_CONT, GO_HORDE_BANNER_GRAVEYARD_H, GO_HORDE_BANNER_GRAVEYARD_H_CONT}, false, 0, 0, {BG_IC_HORDE_KEEP_UNCONTROLLED, BG_IC_HORDE_KEEP_CONFLICT_A, BG_IC_HORDE_KEEP_CONFLICT_H, BG_IC_HORDE_KEEP_CONTROLLED_A, BG_IC_HORDE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_H} }; enum HonorRewards @@ -935,7 +963,6 @@ class BattlegroundIC : public Battleground void SpawnLeader(uint32 teamid); void HandleKillUnit(Creature* unit, Player* killer) override; void HandleKillPlayer(Player* player, Player* killer) override; - void EndBattleground(uint32 winner) override; void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/) override; void DestroyGate(Player* player, GameObject* go) override; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index a52235a7230..1abd3211dd2 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -19,7 +19,6 @@ #include "BattlegroundSA.h" #include "GameObject.h" #include "GameTime.h" -#include "Language.h" #include "ObjectMgr.h" #include "Player.h" #include "ScriptedCreature.h" @@ -27,10 +26,7 @@ BattlegroundSA::BattlegroundSA() { - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_SA_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_SA_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_SA_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = 0; + StartMessageIds[BG_STARTING_EVENT_FOURTH] = 0; // handle by Kanrethad BgObjects.resize(BG_SA_MAXOBJ); BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY); @@ -320,7 +316,7 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { SignaledRoundTwo = true; InitSecondRound = false; - SendMessageToAll(LANG_BG_SA_ROUND_TWO_ONE_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_SA_TEXT_ROUND_TWO_START_ONE_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL); } } else @@ -377,7 +373,7 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) if (!SignaledRoundTwoHalfMin) { SignaledRoundTwoHalfMin = true; - SendMessageToAll(LANG_BG_SA_ROUND_TWO_START_HALF_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_SA_TEXT_ROUND_TWO_START_HALF_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL); } } StartShips(); @@ -894,9 +890,9 @@ void BattlegroundSA::TitanRelicActivated(Player* clicker) if (clicker->GetTeamId() == Attackers) { if (clicker->GetTeamId() == TEAM_ALLIANCE) - SendMessageToAll(LANG_BG_SA_ALLIANCE_CAPTURED_RELIC, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_SA_TEXT_ALLIANCE_CAPTURED_TITAN_PORTAL, CHAT_MSG_BG_SYSTEM_ALLIANCE); else - SendMessageToAll(LANG_BG_SA_HORDE_CAPTURED_RELIC, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_SA_TEXT_HORDE_CAPTURED_TITAN_PORTAL, CHAT_MSG_BG_SYSTEM_HORDE); if (Status == BG_SA_ROUND_ONE) { diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index 7d72a697f70..fc26bc2115d 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -482,6 +482,15 @@ float const BG_SA_GYOrientation[BG_SA_MAX_GY] = 6.148f, // defender last GY }; +enum BG_SA_BroadcastTexts +{ + BG_SA_TEXT_ALLIANCE_CAPTURED_TITAN_PORTAL = 28944, + BG_SA_TEXT_HORDE_CAPTURED_TITAN_PORTAL = 28945, + + BG_SA_TEXT_ROUND_TWO_START_ONE_MINUTE = 29448, + BG_SA_TEXT_ROUND_TWO_START_HALF_MINUTE = 29449 +}; + struct GateInfo { uint8 GateId; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index 94f8094fe60..405d6c7ba2f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -18,7 +18,6 @@ #include "BattlegroundWS.h" #include "GameObject.h" -#include "Language.h" #include "Object.h" #include "BattlegroundMgr.h" #include "Player.h" @@ -45,10 +44,10 @@ BattlegroundWS::BattlegroundWS() BgObjects.resize(BG_WS_OBJECT_MAX); BgCreatures.resize(BG_CREATURES_MAX_WS); - StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES; - StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE; - StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE; - StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; + StartMessageIds[BG_STARTING_EVENT_SECOND] = BG_WS_TEXT_START_ONE_MINUTE; + StartMessageIds[BG_STARTING_EVENT_THIRD] = BG_WS_TEXT_START_HALF_MINUTE; + StartMessageIds[BG_STARTING_EVENT_FOURTH] = BG_WS_TEXT_BATTLE_HAS_BEGUN; + _flagSpellForceTimer = 0; _bothFlagsKept = false; _flagDebuffState = 0; @@ -248,7 +247,7 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured) //when map_update will be allowed for battlegrounds this code will be useless SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY); SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(LANG_BG_WS_F_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL); + SendBroadcastText(BG_WS_TEXT_FLAGS_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); // flag respawned sound... } _bothFlagsKept = false; @@ -261,16 +260,11 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team) RespawnFlag(team, false); if (team == ALLIANCE) - { SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED, CHAT_MSG_BG_SYSTEM_NEUTRAL); - } else - { SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY); - SendMessageToAll(LANG_BG_WS_HORDE_FLAG_RESPAWNED, CHAT_MSG_BG_SYSTEM_NEUTRAL); - } + SendBroadcastText(BG_WS_TEXT_FLAGS_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL); PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team))) @@ -335,9 +329,9 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* player) SpawnBGObject(BG_WS_OBJECT_A_FLAG, BG_WS_FLAG_RESPAWN_TIME); if (player->GetTeam() == ALLIANCE) - SendMessageToAll(LANG_BG_WS_CAPTURED_HF, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); + SendBroadcastText(BG_WS_TEXT_CAPTURED_HORDE_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); else - SendMessageToAll(LANG_BG_WS_CAPTURED_AF, CHAT_MSG_BG_SYSTEM_HORDE, player); + SendBroadcastText(BG_WS_TEXT_CAPTURED_ALLIANCE_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player); UpdateFlagState(player->GetTeam(), 1); // flag state none UpdateTeamScore(player->GetTeamId()); @@ -445,12 +439,12 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* player) if (player->GetTeam() == ALLIANCE) { - SendMessageToAll(LANG_BG_WS_DROPPED_HF, CHAT_MSG_BG_SYSTEM_HORDE, player); + SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_HORDE, player); UpdateWorldState(BG_WS_FLAG_UNK_HORDE, uint32(-1)); } else { - SendMessageToAll(LANG_BG_WS_DROPPED_AF, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); + SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, uint32(-1)); } @@ -463,15 +457,11 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target if (GetStatus() != STATUS_IN_PROGRESS) return; - int32 message_id = 0; - ChatMsg type = CHAT_MSG_BG_SYSTEM_NEUTRAL; - //alliance flag picked up from base if (player->GetTeam() == HORDE && GetFlagState(ALLIANCE) == BG_WS_FLAG_STATE_ON_BASE && BgObjects[BG_WS_OBJECT_A_FLAG] == target_obj->GetGUID()) { - message_id = LANG_BG_WS_PICKEDUP_AF; - type = CHAT_MSG_BG_SYSTEM_HORDE; + SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_HORDE, player); PlaySoundToAll(BG_WS_SOUND_ALLIANCE_FLAG_PICKED_UP); SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_ONE_DAY); SetAllianceFlagPicker(player->GetGUID()); @@ -489,8 +479,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target if (player->GetTeam() == ALLIANCE && GetFlagState(HORDE) == BG_WS_FLAG_STATE_ON_BASE && BgObjects[BG_WS_OBJECT_H_FLAG] == target_obj->GetGUID()) { - message_id = LANG_BG_WS_PICKEDUP_HF; - type = CHAT_MSG_BG_SYSTEM_ALLIANCE; + SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); PlaySoundToAll(BG_WS_SOUND_HORDE_FLAG_PICKED_UP); SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_ONE_DAY); SetHordeFlagPicker(player->GetGUID()); @@ -510,8 +499,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target { if (player->GetTeam() == ALLIANCE) { - message_id = LANG_BG_WS_RETURNED_AF; - type = CHAT_MSG_BG_SYSTEM_ALLIANCE; + SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_RETURNED, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); UpdateFlagState(HORDE, BG_WS_FLAG_STATE_WAIT_RESPAWN); RespawnFlag(ALLIANCE, false); SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY); @@ -521,8 +509,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target } else { - message_id = LANG_BG_WS_PICKEDUP_AF; - type = CHAT_MSG_BG_SYSTEM_HORDE; + SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_HORDE, player); PlaySoundToAll(BG_WS_SOUND_ALLIANCE_FLAG_PICKED_UP); SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_ONE_DAY); SetAllianceFlagPicker(player->GetGUID()); @@ -545,8 +532,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target { if (player->GetTeam() == HORDE) { - message_id = LANG_BG_WS_RETURNED_HF; - type = CHAT_MSG_BG_SYSTEM_HORDE; + SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_RETURNED, CHAT_MSG_BG_SYSTEM_HORDE, player); UpdateFlagState(ALLIANCE, BG_WS_FLAG_STATE_WAIT_RESPAWN); RespawnFlag(HORDE, false); SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY); @@ -556,8 +542,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target } else { - message_id = LANG_BG_WS_PICKEDUP_HF; - type = CHAT_MSG_BG_SYSTEM_ALLIANCE; + SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_ALLIANCE, player); PlaySoundToAll(BG_WS_SOUND_HORDE_FLAG_PICKED_UP); SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_ONE_DAY); SetHordeFlagPicker(player->GetGUID()); @@ -574,10 +559,6 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target //target_obj->Delete(); } - if (!message_id) - return; - - SendMessageToAll(message_id, type, player); player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h index 589179047b7..88bc385456b 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.h @@ -31,6 +31,23 @@ enum BG_WS_TimerOrScore BG_WS_SPELL_BRUTAL_TIME = 900000 }; +enum BG_WS_BroadcastTexts +{ + BG_WS_TEXT_START_ONE_MINUTE = 10015, + BG_WS_TEXT_START_HALF_MINUTE = 10016, + BG_WS_TEXT_BATTLE_HAS_BEGUN = 10014, + + BG_WS_TEXT_CAPTURED_HORDE_FLAG = 9801, + BG_WS_TEXT_CAPTURED_ALLIANCE_FLAG = 9802, + BG_WS_TEXT_FLAGS_PLACED = 9803, + BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP = 9804, + BG_WS_TEXT_ALLIANCE_FLAG_DROPPED = 9805, + BG_WS_TEXT_HORDE_FLAG_PICKED_UP = 9807, + BG_WS_TEXT_HORDE_FLAG_DROPPED = 9806, + BG_WS_TEXT_ALLIANCE_FLAG_RETURNED = 9808, + BG_WS_TEXT_HORDE_FLAG_RETURNED = 9809, +}; + enum BG_WS_Sound { BG_WS_SOUND_FLAG_CAPTURED_ALLIANCE = 8173, diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f440472f54a..8fd3df2a7cb 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -24,6 +24,7 @@ #include "Battleground.h" #include "BattlegroundScore.h" #include "CellImpl.h" +#include "Chat.h" #include "ChatTextBuilder.h" #include "ConditionMgr.h" #include "CreatureAI.h" @@ -14512,11 +14513,11 @@ void Unit::Talk(uint32 textId, ChatMsg msgType, float textRange, WorldObject con { if (!sObjectMgr->GetBroadcastText(textId)) { - TC_LOG_ERROR("entities.unit", "WorldObject::MonsterText: `broadcast_text` was not %u found", textId); + TC_LOG_ERROR("entities.unit", "WorldObject::MonsterText: `broadcast_text` (ID: %u) was not found", textId); return; } - Trinity::BroadcastTextBuilder builder(this, msgType, textId, target); + Trinity::BroadcastTextBuilder builder(this, msgType, textId, getGender(), target); Trinity::LocalizedPacketDo localizer(builder); Trinity::PlayerDistWorker > worker(this, textRange, localizer); Cell::VisitWorldObjects(this, worker, textRange); diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp index 05153d7b69e..f0837c517a7 100644 --- a/src/server/game/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Handlers/PetitionsHandler.cpp @@ -17,7 +17,6 @@ */ #include "Common.h" -#include "Language.h" #include "WorldPacket.h" #include "WorldSession.h" #include "World.h" @@ -105,7 +104,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData) /// @todo find correct opcode if (_player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { - SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)); + SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S); return; } diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 88a00419c57..75f0fbacb53 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -635,80 +635,7 @@ enum TrinityStrings // End Level 3 list, continued at 1100 - // Battleground - LANG_BG_A_WINS = 600, - LANG_BG_H_WINS = 601, - - LANG_BG_WS_START_TWO_MINUTES = 753, - LANG_BG_WS_START_ONE_MINUTE = 602, - LANG_BG_WS_START_HALF_MINUTE = 603, - LANG_BG_WS_HAS_BEGUN = 604, - - LANG_BG_WS_CAPTURED_HF = 605, - LANG_BG_WS_CAPTURED_AF = 606, - LANG_BG_WS_DROPPED_HF = 607, - LANG_BG_WS_DROPPED_AF = 608, - LANG_BG_WS_RETURNED_AF = 609, - LANG_BG_WS_RETURNED_HF = 610, - LANG_BG_WS_PICKEDUP_HF = 611, - LANG_BG_WS_PICKEDUP_AF = 612, - LANG_BG_WS_F_PLACED = 613, - LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED = 614, - LANG_BG_WS_HORDE_FLAG_RESPAWNED = 615, - - LANG_BG_EY_START_TWO_MINUTES = 755, - LANG_BG_EY_START_ONE_MINUTE = 636, - LANG_BG_EY_START_HALF_MINUTE = 637, - LANG_BG_EY_HAS_BEGUN = 638, - - LANG_BG_AB_ALLY = 650, - LANG_BG_AB_HORDE = 651, - LANG_BG_AB_NODE_STABLES = 652, - LANG_BG_AB_NODE_BLACKSMITH = 653, - LANG_BG_AB_NODE_FARM = 654, - LANG_BG_AB_NODE_LUMBER_MILL = 655, - LANG_BG_AB_NODE_GOLD_MINE = 656, - LANG_BG_AB_NODE_TAKEN = 657, - LANG_BG_AB_NODE_DEFENDED = 658, - LANG_BG_AB_NODE_ASSAULTED = 659, - LANG_BG_AB_NODE_CLAIMED = 660, - - LANG_BG_AB_START_TWO_MINUTES = 754, - LANG_BG_AB_START_ONE_MINUTE = 661, - LANG_BG_AB_START_HALF_MINUTE = 662, - LANG_BG_AB_HAS_BEGUN = 663, - LANG_BG_AB_A_NEAR_VICTORY = 664, - LANG_BG_AB_H_NEAR_VICTORY = 665, - LANG_BG_MARK_BY_MAIL = 666, - - LANG_BG_EY_HAS_TAKEN_A_M_TOWER = 667, - LANG_BG_EY_HAS_TAKEN_H_M_TOWER = 668, - LANG_BG_EY_HAS_TAKEN_A_D_RUINS = 669, - LANG_BG_EY_HAS_TAKEN_H_D_RUINS = 670, - LANG_BG_EY_HAS_TAKEN_A_B_TOWER = 671, - LANG_BG_EY_HAS_TAKEN_H_B_TOWER = 672, - LANG_BG_EY_HAS_TAKEN_A_F_RUINS = 673, - LANG_BG_EY_HAS_TAKEN_H_F_RUINS = 674, - LANG_BG_EY_HAS_LOST_A_M_TOWER = 675, - LANG_BG_EY_HAS_LOST_H_M_TOWER = 676, - LANG_BG_EY_HAS_LOST_A_D_RUINS = 677, - LANG_BG_EY_HAS_LOST_H_D_RUINS = 678, - LANG_BG_EY_HAS_LOST_A_B_TOWER = 679, - LANG_BG_EY_HAS_LOST_H_B_TOWER = 680, - LANG_BG_EY_HAS_LOST_A_F_RUINS = 681, - LANG_BG_EY_HAS_LOST_H_F_RUINS = 682, - LANG_BG_EY_HAS_TAKEN_FLAG = 683, - LANG_BG_EY_CAPTURED_FLAG_A = 684, - LANG_BG_EY_CAPTURED_FLAG_H = 685, - LANG_BG_EY_DROPPED_FLAG = 686, - LANG_BG_EY_RESETED_FLAG = 687, - - LANG_ARENA_ONE_TOOLOW = 700, - LANG_ARENA_ONE_MINUTE = 701, - LANG_ARENA_THIRTY_SECONDS = 702, - LANG_ARENA_FIFTEEN_SECONDS = 703, - LANG_ARENA_HAS_BEGUN = 704, - + // 600-704 - free LANG_WAIT_BEFORE_SPEAKING = 705, LANG_NOT_EQUIPPED_ITEM = 706, LANG_PLAYER_DND = 707, @@ -730,9 +657,7 @@ enum TrinityStrings LANG_ARENA_GROUP_TOO_LARGE = 721, // "Your group is too large for this arena. Please regroup to join." LANG_ARENA_YOUR_TEAM_ONLY = 722, // "Your group has members not in your arena team. Please regroup to join." LANG_ARENA_NOT_ENOUGH_PLAYERS = 723, // "Your group does not have enough players to join this match." - LANG_ARENA_GOLD_WINS = 724, // "The Gold Team wins!" - LANG_ARENA_GREEN_WINS = 725, // "The Green Team wins!" -// = 726, not used + // 724-726 - free LANG_BG_GROUP_OFFLINE_MEMBER = 727, // "Your group has an offline member. Please remove him before joining." LANG_BG_GROUP_MIXED_FACTION = 728, // "Your group has players from the opposing faction. You can't join the battleground as a group." LANG_BG_GROUP_MIXED_LEVELS = 729, // "Your group has players from different battleground brakets. You can't join as group." @@ -760,14 +685,12 @@ enum TrinityStrings LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING = 750, // "Not enough players. This game will close in %u mins." LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS = 751, // "Not enough players. This game will close in %u seconds." // = 752, see LANG_PINFO_ACC_IP -// LANG_BG_WS_START_TWO_MINUTES = 753, - defined above -// LANG_BG_AB_START_TWO_MINUTES = 754, - defined above -// LANG_BG_EY_START_TWO_MINUTES = 755, - defined above - // Room for BG/ARENA = 773-784, 788-799 not used + // Room for BG/ARENA = 773-784 LANG_ARENA_TESTING = 785, LANG_AUTO_ANN = 786, LANG_ANNOUNCE_COLOR = 787, + // 788-799 - free // in game strings LANG_PET_INVALID_NAME = 800, @@ -1010,42 +933,7 @@ enum TrinityStrings LANG_DEBUG_AREATRIGGER_OFF = 1203, LANG_DEBUG_AREATRIGGER_REACHED = 1204, - // Isle of Conquest - LANG_BG_IC_START_TWO_MINUTES = 1205, - LANG_BG_IC_START_ONE_MINUTE = 1206, - LANG_BG_IC_START_HALF_MINUTE = 1207, - LANG_BG_IC_HAS_BEGUN = 1208, - LANG_BG_IC_ALLIANCE_KEEP = 1209, - LANG_BG_IC_HORDE_KEEP = 1210, - LANG_BG_IC_TEAM_WINS = 1211, - LANG_BG_IC_WEST_GATE_DESTROYED = 1212, - LANG_BG_IC_EAST_GATE_DESTROYED = 1213, - LANG_BG_IC_SOUTH_GATE_DESTROYED = 1214, - LANG_BG_IC_NORTH_GATE_DESTROYED = 1215, - LANG_BG_IC_TEAM_ASSAULTED_NODE_1 = 1216, - LANG_BG_IC_TEAM_DEFENDED_NODE = 1217, - LANG_BG_IC_TEAM_ASSAULTED_NODE_2 = 1218, - LANG_BG_IC_TEAM_HAS_TAKEN_NODE = 1219, - LANG_BG_IC_WORKSHOP = 1220, - LANG_BG_IC_DOCKS = 1221, - LANG_BG_IC_REFINERY = 1222, - LANG_BG_IC_QUARRY = 1223, - LANG_BG_IC_HANGAR = 1224, - // 1225-1299 - LANG_BG_IC_ALLIANCE = 1300, - LANG_BG_IC_HORDE = 1301, - - // 1302-1325 - // AV - LANG_BG_AV_START_ONE_MINUTE = 1326, - LANG_BG_AV_START_HALF_MINUTE = 1327, - LANG_BG_AV_HAS_BEGUN = 1328, - LANG_BG_AV_A_NEAR_LOSE = 1329, - LANG_BG_AV_H_NEAR_LOSE = 1330, - // 1331-1332 - LANG_BG_AV_START_TWO_MINUTES = 1333, - // FREE IDS 1334-1999 - + // 1205-1999 - free // Ticket Strings 2000-2030 LANG_COMMAND_TICKETNEW = 2000, LANG_COMMAND_TICKETUPDATED = 2001, @@ -1204,14 +1092,7 @@ enum TrinityStrings LANG_OPVP_ZM_GOSSIP_ALLIANCE = 10054, LANG_OPVP_ZM_GOSSIP_HORDE = 10055, - LANG_BG_SA_START_TWO_MINUTES = 10056, - LANG_BG_SA_START_ONE_MINUTE = 10057, - LANG_BG_SA_START_HALF_MINUTE = 10058, - // unused 10059-10062 - LANG_BG_SA_ALLIANCE_CAPTURED_RELIC = 10063, //The Alliance captured the titan portal! - LANG_BG_SA_HORDE_CAPTURED_RELIC = 10064, //The Horde captured the titan portal! - LANG_BG_SA_ROUND_TWO_ONE_MINUTE = 10065, //Round 2 of the Battle for the Strand of the Ancients begins in 1 minute. - LANG_BG_SA_ROUND_TWO_START_HALF_MINUTE = 10066, //Round 2 begins in 30 seconds. Prepare yourselves! + // 10056-10066 - free // Use for custom patches 11000-11999 LANG_AUTO_BROADCAST = 11000, diff --git a/src/server/game/Texts/ChatTextBuilder.h b/src/server/game/Texts/ChatTextBuilder.h index 71c403332f8..08b80c28eeb 100644 --- a/src/server/game/Texts/ChatTextBuilder.h +++ b/src/server/game/Texts/ChatTextBuilder.h @@ -18,33 +18,29 @@ #ifndef __CHATTEXT_BUILDER_H #define __CHATTEXT_BUILDER_H -#include "Chat.h" -#include "ObjectMgr.h" +#include "Common.h" +#include "SharedDefines.h" +#include + +class WorldObject; +class WorldPacket; namespace Trinity { class BroadcastTextBuilder { public: - BroadcastTextBuilder(Unit const* obj, ChatMsg msgType, uint32 textId, WorldObject const* target = nullptr, uint32 achievementId = 0) - : _source(obj), _msgType(msgType), _textId(textId), _target(target), _achievementId(achievementId) { } + BroadcastTextBuilder(WorldObject const* obj, ChatMsg msgType, uint32 textId, uint8 gender, WorldObject const* target = nullptr, uint32 achievementId = 0) + : _source(obj), _msgType(msgType), _textId(textId), _gender(gender), _target(target), _achievementId(achievementId) { } - void operator()(WorldPacket& data, LocaleConstant locale) - { - BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId); - ChatHandler::BuildChatPacket(data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _source->getGender()) : "", _achievementId, "", locale); - } - - size_t operator()(WorldPacket* data, LocaleConstant locale) const - { - BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId); - return ChatHandler::BuildChatPacket(*data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _source->getGender()) : "", _achievementId, "", locale); - } + void operator()(WorldPacket& data, LocaleConstant locale) const; + size_t operator()(WorldPacket* data, LocaleConstant locale) const; private: - Unit const* _source; + WorldObject const* _source; ChatMsg _msgType; uint32 _textId; + uint8 _gender; WorldObject const* _target; uint32 _achievementId; }; @@ -55,10 +51,7 @@ namespace Trinity CustomChatTextBuilder(WorldObject const* obj, ChatMsg msgType, std::string const& text, Language language = LANG_UNIVERSAL, WorldObject const* target = nullptr) : _source(obj), _msgType(msgType), _text(text), _language(language), _target(target) { } - void operator()(WorldPacket& data, LocaleConstant locale) - { - ChatHandler::BuildChatPacket(data, _msgType, _language, _source, _target, _text, 0, "", locale); - } + void operator()(WorldPacket& data, LocaleConstant locale) const; private: WorldObject const* _source; @@ -67,6 +60,22 @@ namespace Trinity Language _language; WorldObject const* _target; }; + + class TrinityStringChatBuilder + { + public: + TrinityStringChatBuilder(WorldObject const* obj, ChatMsg msgType, uint32 textId, WorldObject const* target = nullptr, va_list* args = nullptr) + : _source(obj), _msgType(msgType), _textId(textId), _target(target), _args(args) { } + + void operator()(WorldPacket& data, LocaleConstant locale) const; + + private: + WorldObject const* _source; + ChatMsg _msgType; + uint32 _textId; + WorldObject const* _target; + va_list* _args; + }; } // namespace Trinity From ee54de51a8e9ef24269f709bb6ba0ebab36f0be8 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 16:13:13 +0100 Subject: [PATCH 25/52] Scripts/Outland: Fix logical error in Hellfire event in Honor Hold --- .../Outland/zone_hellfire_peninsula.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index 273fa0dc33a..5dd183dbdba 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -1044,10 +1044,11 @@ public: enum WatchCommanderLeonus { SAY_COVER = 0, - EVENT_LEONUS_TALK = 1, - EVENT_INFERNAL_RAIN_ATTACK = 2, - EVENT_FEAR_CONTROLLER_CAST = 3, - EVENT_ACTIVE_FALSE = 4, + EVENT_START = 1, + EVENT_LEONUS_TALK = 2, + EVENT_INFERNAL_RAIN_ATTACK = 3, + EVENT_FEAR_CONTROLLER_CAST = 4, + EVENT_ACTIVE_FALSE = 5, NPC_INFERNAL_RAIN = 18729, SPELL_INFERNAL_RAIN = 33814, NPC_FEAR_CONTROLLER = 19393, @@ -1061,9 +1062,7 @@ struct npc_watch_commander_leonus : public ScriptedAI void Reset() override { _events.Reset(); - _events.ScheduleEvent(EVENT_LEONUS_TALK, Minutes(2), Minutes(10)); - _events.ScheduleEvent(EVENT_INFERNAL_RAIN_ATTACK, Minutes(2), Minutes(10)); - _events.ScheduleEvent(EVENT_FEAR_CONTROLLER_CAST, Minutes(2), Minutes(10)); + _events.ScheduleEvent(EVENT_START, Minutes(2), Minutes(10)); } void SetData(uint32 /*type*/, uint32 data) override @@ -1086,6 +1085,11 @@ struct npc_watch_commander_leonus : public ScriptedAI { switch (eventId) { + case EVENT_START: + _events.ScheduleEvent(EVENT_LEONUS_TALK, Minutes(2), Minutes(10)); + _events.ScheduleEvent(EVENT_INFERNAL_RAIN_ATTACK, Minutes(2), Minutes(10)); + _events.ScheduleEvent(EVENT_FEAR_CONTROLLER_CAST, Minutes(2), Minutes(10)); + break; case EVENT_LEONUS_TALK: Talk(SAY_COVER); me->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT); From f1598e6e77a729a41978311dedbafa0e38368416 Mon Sep 17 00:00:00 2001 From: offl Date: Sun, 21 Jan 2018 22:09:30 +0100 Subject: [PATCH 26/52] DB/Creature: set correct 3.3.5a faction for Argent Guard Thaelrid - he was incorrectly set up with faction 80 (Darnassus), a Cataclysm value - he should now be able to hand out quest ID 6561, Blackfathom Villainy. by offl Closes #21287 --- sql/updates/world/3.3.5/2018_01_21_02_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_21_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_21_02_world_335.sql b/sql/updates/world/3.3.5/2018_01_21_02_world_335.sql new file mode 100644 index 00000000000..2493bb5222e --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_21_02_world_335.sql @@ -0,0 +1,2 @@ +-- Argent Guard Thaelrid +UPDATE `creature_template` SET `faction`=794 WHERE `entry`=4787; From b705a16631b1f3ad15a1ae895e3a0b48826fc045 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 16:16:51 +0100 Subject: [PATCH 27/52] Core/Misc: 2 comment corrections in Language.h --- src/server/game/Miscellaneous/Language.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 75f0fbacb53..43d34d220f7 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -923,18 +923,18 @@ enum TrinityStrings LANG_GROUP_ROLE_CHANGED = 1186, LANG_LEADER_CANNOT_BE_ASSISTANT = 1187, LANG_BAN_EXISTS = 1188, - // Room for more level 3 1189-1198 not used + // Room for more level 3 1189-1199 not used // Debug commands - LANG_GUILD_INFO_LEVEL = 1999, // LANG_DO_NOT_USE_6X_DEBUG_AREATRIGGER_LEFT -- unused on 3.3.5a LANG_CINEMATIC_NOT_EXIST = 1200, LANG_MOVIE_NOT_EXIST = 1201, LANG_DEBUG_AREATRIGGER_ON = 1202, LANG_DEBUG_AREATRIGGER_OFF = 1203, LANG_DEBUG_AREATRIGGER_REACHED = 1204, - // 1205-1999 - free + // 1205-1998 - free // Ticket Strings 2000-2030 + LANG_GUILD_INFO_LEVEL = 1999, // LANG_DO_NOT_USE_6X_DEBUG_AREATRIGGER_LEFT -- unused on 3.3.5a LANG_COMMAND_TICKETNEW = 2000, LANG_COMMAND_TICKETUPDATED = 2001, LANG_COMMAND_TICKETPLAYERABANDON = 2002, From c9048596827de87a0d0f0880a79a8b8180dad2ce Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 16:27:52 +0100 Subject: [PATCH 28/52] Core/Spells: fix Spirit of Redemption --- src/server/game/Entities/Unit/Unit.cpp | 35 +++++++------------ .../game/Spells/Auras/SpellAuraEffects.cpp | 3 -- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 8fd3df2a7cb..a7f84306a66 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11483,31 +11483,22 @@ void Unit::Kill(Unit* victim, bool durabilityLoss) if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself()) killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, 0, victim); - // if talent known but not triggered (check priest class for speedup check) + // if talent known but not triggered bool spiritOfRedemption = false; - if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST) + if (AuraEffect const* aurEff = victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 0, 0, 0x200)) { - AuraEffectList const& dummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY); - for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr) - { - if ((*itr)->GetSpellInfo()->SpellIconID == 1654) - { - AuraEffect const* aurEff = *itr; - // save value before aura remove - uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL); - if (!ressSpellId) - ressSpellId = victim->ToPlayer()->GetResurrectionSpellId(); - // Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers) - victim->RemoveAllAurasOnDeath(); - // restore for use at real death - victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId); + // save value before aura remove + uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL); + if (!ressSpellId) + ressSpellId = victim->ToPlayer()->GetResurrectionSpellId(); + // Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers) + victim->RemoveAllAurasOnDeath(); + // restore for use at real death + victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId); - // FORM_SPIRITOFREDEMPTION and related auras - victim->CastSpell(victim, 27827, true, NULL, aurEff); - spiritOfRedemption = true; - break; - } - } + // FORM_SPIRITOFREDEMPTION and related auras + victim->CastSpell(victim, 27827, aurEff); + spiritOfRedemption = true; } if (!spiritOfRedemption) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index edfa5525dcf..68c1b44ae65 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1657,9 +1657,6 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m { if (target->GetTypeId() == TYPEID_PLAYER) { - // disable breath/etc timers - target->ToPlayer()->StopMirrorTimers(); - // set stand state (expected in this form) if (!target->IsStandState()) target->SetStandState(UNIT_STAND_STATE_STAND); From 8d0647da5d8b270282d4a5bd6e24641882e65123 Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 23 Jan 2018 11:38:48 -0300 Subject: [PATCH 29/52] DB/Spell: Fix Lifebloom coefficient Closes #21297 --- sql/updates/world/3.3.5/2018_01_23_00_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_23_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_23_00_world_335.sql b/sql/updates/world/3.3.5/2018_01_23_00_world_335.sql new file mode 100644 index 00000000000..6c643caf723 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_23_00_world_335.sql @@ -0,0 +1,2 @@ +UPDATE `spell_bonus_data` SET `direct_bonus`=0 WHERE `entry`=33763; +UPDATE `spell_bonus_data` SET `direct_bonus`=0.51623296 WHERE `entry`=33778; From 36b29d3a3d59059cb3b1a3239d19140a561b17c3 Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 23 Jan 2018 23:20:09 -0300 Subject: [PATCH 30/52] DB/Spell: remove hacky, ancient serverside spell Added in a687c867e9127f816c6ffde36000f6e2474f80e7, back when proc cooldown handling was way different --- sql/updates/world/3.3.5/2018_01_24_00_world.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/3.3.5/2018_01_24_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_24_00_world.sql b/sql/updates/world/3.3.5/2018_01_24_00_world.sql new file mode 100644 index 00000000000..8c564d2d91b --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_24_00_world.sql @@ -0,0 +1 @@ +DELETE FROM `spell_dbc` WHERE `Id`=100000; From 767c52abdfd7d14c47598d60bf7587d50a51d719 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Wed, 24 Jan 2018 19:19:09 +0000 Subject: [PATCH 31/52] DB/Creature: Apothecary Keever Updating my previous script for this as my prior work was no longer working as intended, was no longer in sync with spawn of caged human and when this changed to squirrel, toad, rabbit, sheep only the name of the npc changed the the appearance never changed, deleting the permament spawn of caged human Apothecary Keever after he casts the teleport spell --- .../world/3.3.5/2018_01_24_03_world.sql | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_24_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_24_03_world.sql b/sql/updates/world/3.3.5/2018_01_24_03_world.sql new file mode 100644 index 00000000000..1603566e5f9 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_24_03_world.sql @@ -0,0 +1,51 @@ +UPDATE `smart_scripts` SET `event_param3`=240000, `event_param4`=240000 WHERE `entryorguid`=5734 AND `source_type`=0 AND `id`=0 AND `link`=0; +DELETE FROM `creature` WHERE `guid`=45218; + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=5736; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=573400 ; + +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 +(573400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 0'), +(573400, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 7794, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Cast Teleport'), +(573400, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 5736, 8, 0, 0, 0, 0, 8, 0, 0, 0, 1400.85, 363.242, -84.868, 1.11701, 'Apothecary Keever - Script - Spawn Caged Human Male'), +(573400, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 1'), +(573400, 9, 6, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 2'), +(573400, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 8, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 5736, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 1 1 on Caged Human'), +(573400, 9, 9, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 3'), +(573400, 9, 10, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 4'), +(573400, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 12, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 5'), +(573400, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 14, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 5742, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 2 2 on Caged Toad'), +(573400, 9, 15, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 6'), +(573400, 9, 16, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 7'), +(573400, 9, 17, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 18, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 8'), +(573400, 9, 19, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 20, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 5739, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 3 3 on Caged Squirrel'), +(573400, 9, 21, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 6'), +(573400, 9, 22, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 7'), +(573400, 9, 23, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 24, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 8'), +(573400, 9, 25, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 26, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 5741, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 4 4 on Caged Rabbit'), +(573400, 9, 27, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 6'), +(573400, 9, 28, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(573400, 9, 29, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 7'), +(573400, 9, 30, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Kneel'), +(573400, 9, 31, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 5743, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Set Data 5 5 on Caged Sheep'), +(573400, 9, 32, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Say Line 8'), +(573400, 9, 33, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever - Script - Stand'), +(5736, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 36, 5742, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Toad'), +(5736, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5742, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Toad'), +(5736, 0, 2, 3, 38, 0, 100, 0, 2, 2, 0, 0, 36, 5739, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 2 2 Change Entry to Caged Sqirrel'), +(5736, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5739, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Squirrel'), +(5736, 0, 4, 5, 38, 0, 100, 0, 3, 3, 0, 0, 36, 5741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 3 3 Change Entry to Caged Rabbit'), +(5736, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Rabbit'), +(5736, 0, 6, 7, 38, 0, 100, 0, 4, 4, 0, 0, 36, 5743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 4 4 Change Entry to Caged Sheep'), +(5736, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Sheep'), +(5736, 0, 8, 9, 38, 0, 100, 0, 5, 5, 0, 0, 11, 7670, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 5 5 Cast Explode'), +(5736, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 5 5 - Run Script'); From 28306add2e5c576a713be79047654461ec40e53d Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 14:57:12 +0100 Subject: [PATCH 32/52] DB/Quest: The End of the Deserters (11134) - fix quest credit cast by ZenoX92 Closes #21293 --- sql/updates/world/3.3.5/2018_01_25_02_world_335.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_02_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_02_world_335.sql new file mode 100644 index 00000000000..e52cd25de07 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_02_world_335.sql @@ -0,0 +1,12 @@ +-- Gavis Greyshield +DELETE FROM `smart_scripts` WHERE `entryorguid`= 23941 AND `source_type`= 0; +DELETE FROM `smart_scripts` WHERE `entryorguid`= 2394100 AND `source_type`= 9; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(23941, 0,0,0, 2,0,100, 1, 0, 15,0,0, 11, 42660,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Cast 'Gavis Greyshield Credit' (No Repeat)"), +(23941, 0,1,2, 2,0,100, 1, 0, 15,0,0, 80,2394100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Run Script (No Repeat)"), +(23941, 0,2,3,61,0,100,512, 0, 0,0,0, 2, 35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Set Faction 35"), +(23941, 0,3,4,61,0,100,512, 0, 0,0,0, 24, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Evade"), +(23941, 0,4,0,61,0,100,512, 0, 0,0,0,103, 1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Set Root On"), +(2394100,9,0,0, 0,0,100, 0, 1000, 1000,0,0, 1, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Say Line 0"), +(2394100,9,1,0, 0,0,100, 0, 4000, 4000,0,0, 1, 1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Say Line 1"), +(2394100,9,2,0, 0,0,100, 0,10000,10000,0,0, 41, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Despawn"); From 850b558fd967d8e4ed2d59009bee0b7950e349f0 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:41:06 +0100 Subject: [PATCH 33/52] DB/Conditions: Master Smith Burninate Closes #21298 --- sql/updates/world/3.3.5/2018_01_25_03_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_03_world.sql b/sql/updates/world/3.3.5/2018_01_25_03_world.sql new file mode 100644 index 00000000000..8a5dac2a534 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_03_world.sql @@ -0,0 +1,5 @@ +-- Master Smith Burninate --> Fix gossip conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5962; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,5962,7121,0,0,8,0,7722,0,0,0,0,0,"","Show gossip text 7121 if player has quest 'What the Flux?' rewarded"), +(14,5962,7121,0,0,5,0,59,128,0,0,0,0,"","Show gossip text 7121 if player is exalted with Thorium Brotherhood"); From 483ea2ced08aebb8431eb427dd6420019e1d014b Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:42:48 +0100 Subject: [PATCH 34/52] DB/Gossip: Call to Arms! (Gameobject) Closes #21299 --- sql/updates/world/3.3.5/2018_01_25_04_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_04_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_04_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_04_world_335.sql new file mode 100644 index 00000000000..3b228de52a0 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_04_world_335.sql @@ -0,0 +1,2 @@ +-- Call to Arms! --> Fix Gossip Text +UPDATE `gossip_menu` SET `TextID`=7274 WHERE `MenuID`=6121; From eba551f985066894387d5e815fa452b012bbae41 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:44:09 +0100 Subject: [PATCH 35/52] DB/Gossip: Primal Torntusk Closes #21300 --- sql/updates/world/3.3.5/2018_01_25_05_world_335.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_05_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_05_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_05_world_335.sql new file mode 100644 index 00000000000..dbdcd1a6e50 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_05_world_335.sql @@ -0,0 +1,6 @@ +-- Primal Torntusk --> Add Gossip Text +UPDATE `creature_template` SET `gossip_menu_id`=6084 WHERE `entry`=14736; + +DELETE FROM `gossip_menu` WHERE `MenuID`=6084; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(6084,7238,0); From 74ebc9a4de5980e082095961bd3884f957b4a23f Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:46:18 +0100 Subject: [PATCH 36/52] DB/Gossip: Fallen Hero of the Horde Closes #21301 --- .../world/3.3.5/2018_01_25_06_world_335.sql | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_06_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_06_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_06_world_335.sql new file mode 100644 index 00000000000..714f7f4455f --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_06_world_335.sql @@ -0,0 +1,20 @@ +-- Fallen Hero of the Horde --> Fix gossip texts +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=840; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,840,1451,0,1,9,0,2801,0,0,0,0,0,"","Show gossip text 1451 if player has quest 'A Tale of Sorrow' taken"); + +DELETE FROM `gossip_menu` WHERE `MenuID` IN (841, 842); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(841,1392,0), +(842,1411,0); + +UPDATE `gossip_menu_option` SET `OptionText`="Why are you here?", `OptionBroadcastTextID`=3582, `ActionMenuID`=841 WHERE `MenuID`=840 AND `OptionID`=0; +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (841, 842); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(841,0,0,"Continue with your story.",3601,1,1,842,0,0,0,"",0,0), +(842,0,0,"Tragic...",3830,1,1,0,0,0,0,"",0,0); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=7572 AND `source_type`=0 AND `id` IN (0,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 +(7572,0,0,2,62,0,100,512,842,0,0,0,26,2784,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fallen Hero of the Horde - On Gossip Option 0 Selected - Quest Credit 'Fall From Grace'"), +(7572,0,1,2,62,0,100,512,881,0,0,0,26,2801,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fallen Hero of the Horde - On Gossip Option 0 Selected - Quest Credit 'A Tale of Sorrow'"); From fc0ba8871f3cdde72eb22cb7df8f8f11f412de5a Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:49:15 +0100 Subject: [PATCH 37/52] DB/Gossip: Samuel Hawke, Rutherford Twing, Illiyana Moonblaze & Kelm Hargunth Closes #21302 --- .../world/3.3.5/2018_01_25_07_world_335.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_07_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_07_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_07_world_335.sql new file mode 100644 index 00000000000..89c3ab16187 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_07_world_335.sql @@ -0,0 +1,18 @@ +UPDATE `creature_template` SET `gossip_menu_id`=6522, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=15127; -- Samuel Hawke +UPDATE `creature_template` SET `gossip_menu_id`=6521, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=15126; -- Rutherford Twing +UPDATE `creature_template` SET `gossip_menu_id`=6142, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=14753; -- Illiyana Moonblaze +UPDATE `creature_template` SET `gossip_menu_id`=6141, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=14754; -- Kelm Hargunth + +DELETE FROM `gossip_menu` WHERE `MenuID` IN (6521,6522,6141,6142); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(6522,7724,0), -- Samuel Hawke +(6521,7723,0), -- Rutherford Twing +(6142,7295,0), -- Illiyana Moonblaze +(6141,7294,0); -- Kelm Hargunth + +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (6521,6522,6141,6142); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(6522,0,1,"What goods have I earned the right to purchase from the League of Arathor?",10625,3,128,0,0,0,0,"",0,0), -- Samuel Hawke +(6521,0,1,"What goods have I earned the right to purchase from the Defilers?",10623,3,128,0,0,0,0,"",0,0), -- Rutherford Twing +(6142,0,1,"What goods have I earned the right to purchase for use in Warsong Gulch?",10021,3,128,0,0,0,0,"",0,0), -- Illiyana Moonblaze +(6141,0,1,"What goods have I earned the right to purchase for use in Warsong Gulch?",10019,3,128,0,0,0,0,"",0,0); -- Kelm Hargunth From 0c93c2ea97198f8607813ffa8d30b852de7dbff5 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:50:37 +0100 Subject: [PATCH 38/52] DB/Conditions: Kalaran Windblade Closes #21303 --- sql/updates/world/3.3.5/2018_01_25_08_world_335.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_08_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_08_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_08_world_335.sql new file mode 100644 index 00000000000..bdf979dfa87 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_08_world_335.sql @@ -0,0 +1,2 @@ +-- Kalaran Windblade --> Fix condition +UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1323 AND `ConditionTypeOrReference`=2; From b3dfe150eb954d8273021ca9935c9a536be87cdb Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:51:41 +0100 Subject: [PATCH 39/52] DB/Quest: The Torch of Retribution Closes #21304 --- .../world/3.3.5/2018_01_25_09_world_335.sql | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_09_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_09_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_09_world_335.sql new file mode 100644 index 00000000000..35d4cba0310 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_09_world_335.sql @@ -0,0 +1,28 @@ +-- Quest "The Torch of Retribution" +DELETE FROM `smart_scripts` WHERE `entryorguid`=847900 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(847900,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Close Gossip"), +(847900,9,1,0,0,0,100,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Remove Npc Flags Gossip & Questgiver"), +(847900,9,2,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 0"), +(847900,9,3,0,0,0,100,0,0,0,0,0,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Set Emote State 69"), +(847900,9,4,0,0,0,100,0,10000,10000,0,0,11,12511,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Torch Combine'"), +(847900,9,5,0,0,0,100,0,8000,8000,0,0,11,12511,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Torch Combine'"), +(847900,9,6,0,0,0,100,0,7000,7000,0,0,11,12511,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Torch Combine'"), +(847900,9,7,0,0,0,100,0,10000,10000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 1"), +(847900,9,8,0,0,0,100,0,7000,7000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Set Emote State 0"), +(847900,9,9,0,0,0,100,0,1000,1000,0,0,11,12512,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Kalaran Conjures Torch'"), +(847900,9,10,0,0,0,100,0,1000,1000,0,0,70,180,0,0,0,0,0,14,24166,149410,0,0,0,0,0,"Kalaran Windblade - On Script - Respawn Light of Retribution"), +(847900,9,11,0,0,0,100,0,0,0,0,0,70,180,0,0,0,0,0,14,16762,149047,0,0,0,0,0,"Kalaran Windblade - On Script - Respawn Torch of Retribution"), +(847900,9,12,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 2"), +(847900,9,13,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Set Flag Standstate Kneel"), +(847900,9,14,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 3"), +(847900,9,15,0,0,0,100,0,2000,2000,0,0,15,3453,0,0,0,0,0,7,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Quest Credit 'The Torch of Retribution'"), +(847900,9,16,0,0,0,100,0,2000,2000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Remove Flag Standstate Kneel"), +(847900,9,17,0,0,0,100,0,0,0,0,0,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Add Npc Flags Gossip & Questgiver"); + +DELETE FROM `creature_text` WHERE `CreatureID`=8479; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(8479,0,0,"%s chants in an unknown tongue.",16,0,100,0,0,0,4447,0,"Kalaran Windblade"), +(8479,1,0,"Be patient, $n. The torch is almost complete.",12,0,100,1,0,0,4448,0,"Kalaran Windblade"), +(8479,2,0,"%s falls to one knee. He looks exhausted.",16,0,100,0,0,0,4449,0,"Kalaran Windblade"), +(8479,3,0,"It is done...",12,0,100,0,0,0,4450,0,"Kalaran Windblade"); From 7c401fa15dfea7d542b06502a2bd41b4d9789cfc Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:53:10 +0100 Subject: [PATCH 40/52] DB/Quest: The Key to Freedom Closes #21305 --- .../world/3.3.5/2018_01_25_10_world_335.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_10_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_10_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_10_world_335.sql new file mode 100644 index 00000000000..0709ffc34e1 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_10_world_335.sql @@ -0,0 +1,22 @@ +-- Quest "The Key to Freedom" +-- Wooden Outhouse +DELETE FROM `smart_scripts` WHERE `entryorguid`=173265 AND `source_type`=1 AND `id` IN (1,2,3); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(173265,1,1,0,20,0,100,0,4451,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Goodsteel Ledger - On Quest 'The Key to Freedom' Finished - Store Targetlist"), +(173265,1,2,0,20,0,100,0,4451,0,0,0,12,9876,3,30000,0,0,0,8,0,0,0,-7026.11,-1784.73,265.782,2.11562,"Goodsteel Ledger - On Quest 'The Key to Freedom' Finished - Summon Creature 'Locheed'"), +(173265,1,3,0,20,0,100,0,4451,0,0,0,100,1,0,0,0,0,0,19,9876,0,0,0,0,0,0,"Goodsteel Ledger - On Quest 'The Key to Freedom' Finished - Send Targetlist to Locheed"); + +-- Locheed +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9876; +DELETE FROM `smart_scripts` WHERE `entryorguid`=9876 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=987600 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(9876,0,0,0,11,0,100,0,0,0,0,0,80,987600,0,0,0,0,0,1,0,0,0,0,0,0,0,"Locheed - On Respawn - Run Script"), +(987600,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Locheed - On Respawn - Say Line 0"), +(987600,9,1,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,"Locheed - On Respawn - Say Line 1"), +(987600,9,2,0,0,0,100,0,6000,6000,0,0,69,0,0,0,0,0,0,8,0,0,0,-7165.31,-1802.59,272.783,3.01882,"Locheed - On Respawn - Move to Position"); + +DELETE FROM `creature_text` WHERE `CreatureID`=9876; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(9876,0,0,"Ach! Thank you so much, $n! I'm free! Finally!",12,0,100,4,0,0,5407,0,"Locheed"), +(9876,1,0,"You take care of yourself! I'm gettin' out o' here.",12,0,100,5,0,0,5408,0,"Locheed"); From e6bc29f77c252ab18874382d47dc93a5e4c69f4b Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:54:36 +0100 Subject: [PATCH 41/52] DB/Quest: Set Them Ablaze! Closes #21306 --- .../world/3.3.5/2018_01_25_11_world_335.sql | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_11_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_11_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_11_world_335.sql new file mode 100644 index 00000000000..4bc2045cfe2 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_11_world_335.sql @@ -0,0 +1,47 @@ +-- Quest "Set Them Ablaze!" +-- Squire Maltrake +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8509; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8509 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 +(8509,0,0,0,20,0,100,0,3463,0,0,0,45,1,1,0,0,0,0,19,8479,0,0,0,0,0,0,"Squire Maltrake - On Quest 'Set Them Ablaze!' Finished - Set Data to Kalaran Windblade"); + +-- Kalaran Windblade +DELETE FROM `smart_scripts` WHERE `entryorguid`=8479 AND `source_type`=0 AND `id` IN (7,8); +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 +(8479,0,7,0,38,0,100,0,1,1,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Data Set - Despawn"), +(8479,0,8,0,38,0,100,0,1,1,0,0,12,8480,3,68000,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Data Set - Summon Creature 'Kalaran the Deceiver'"); + +-- Kalaran the Deceiver +UPDATE `creature_template` SET `AIName`="SmartAI", `InhabitType`=7, `speed_run`=2 WHERE `entry`=8480; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8480 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=848000 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(8480,0,0,0,54,0,100,0,0,0,0,0,80,848000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - Just Summoned - Run Script"), +(848000,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 0"), +(848000,9,1,0,0,0,100,0,3000,3000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 1"), +(848000,9,2,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 2"), +(848000,9,3,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,19,8509,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 0 (Squire Maltrake)"), +(848000,9,4,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.65994,"Kalaran the Deceiver - On Script - Set Orientation"), +(848000,9,5,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 3"), +(848000,9,6,0,0,0,100,0,3000,3000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 4"), +(848000,9,7,0,0,0,100,0,9000,9000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 5"), +(848000,9,8,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,19,8509,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 1 (Squire Maltrake)"), +(848000,9,9,0,0,0,100,0,3000,3000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 6"), +(848000,9,10,0,0,0,100,0,4000,4000,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 7"), +(848000,9,11,0,0,0,100,0,5000,5000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 8"), +(848000,9,12,0,0,0,100,0,6000,6000,0,0,69,0,0,0,0,0,0,8,0,0,0,-6879.3,-1187.34,293.384,0,"Kalaran the Deceiver - On Script - Move to Position"); + +-- Texts +DELETE FROM `creature_text` WHERE `CreatureID` IN (8480, 8509); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(8480,0,0,"Glorious, indeed, Maltrake. It looks as if my plan worked perfectly. Wouldn't you say so, mortal?",12,0,100,0,0,0,4456,0,"Kalaran the Deceiver"), +(8480,1,0,"%s lets loose a reptilian laugh... at least you think it's a laugh.",16,0,100,0,0,0,4458,0,"Kalaran the Deceiver"), +(8480,2,0,"You would not have helped the legion of Blackrock had we just asked for your assistance, now would you?",12,0,100,0,0,0,4457,0,"Kalaran the Deceiver"), +(8480,3,0,"SILENCE FOOL!",12,0,100,0,0,0,4460,0,"Kalaran the Deceiver"), +(8480,4,0,"They will live, if only to see the fruits of their labor: the destruction and chaos that will surely ensue as the legion of Blackrock invade the gorge.",12,0,100,0,0,0,4461,0,"Kalaran the Deceiver"), +(8480,5,0,"I leave you now, mortals. Alive and with these trinkets. Maltrake! Present them with the trinkets!",12,0,100,0,0,0,4462,0,"Kalaran the Deceiver"), +(8480,6,0,"Oh yes, the molt - do not lose it. There are those of my kin in the Burning Steppes that would craft items that only the molt of the black Dragonflight could fortify.",12,0,100,0,0,0,4463,0,"Kalaran the Deceiver"), +(8480,7,0,"%s begins to flap his massive wings faster. He is preparing for flight.",16,0,100,0,0,0,4464,0,"Kalaran the Deceiver"), +(8480,8,0,"The legion of Blackrock comes, dwarflings! We shall scorch the earth and set fire to the heavens. None shall survive...",14,0,100,0,0,0,4465,0,"Kalaran the Deceiver"), +(8509,0,0,"What will we do with them, master? They are of no use to us anymore.",12,0,100,6,0,0,4459,0,"Squire Maltrake"), +(8509,1,0,"Right away, master!",12,0,100,2,0,0,4468,0,"Squire Maltrake"); From 92f6b8fea3f47fb10273a65ca1ae88d799c083d6 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 25 Jan 2018 18:56:22 +0100 Subject: [PATCH 42/52] DB/SAI: Searing Gorge Closes #21307 --- .../world/3.3.5/2018_01_25_12_world_335.sql | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_25_12_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_12_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_12_world_335.sql new file mode 100644 index 00000000000..550e002f4a1 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_25_12_world_335.sql @@ -0,0 +1,140 @@ +-- Glassweb Spider +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5856; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5856 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 +(5856,0,0,0,25,0,100,0,0,0,0,0,11,13299,0,0,0,0,0,1,0,0,0,0,0,0,0,"Glassweb Spider - On Reset - Cast Poison Proc"), +(5856,0,1,0,9,0,100,0,0,20,8000,11000,11,745,0,0,0,0,0,2,0,0,0,0,0,0,0,"Glassweb Spider - Within 0-20 Range - Cast Web"); + +-- Shleipnarr +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8280; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8280 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 +(8280,0,0,0,0,0,100,0,3000,4000,12000,15000,11,13321,0,0,0,0,0,5,0,0,0,0,0,0,0,"Shleipnarr - In Combat - Cast Mana Burn"), +(8280,0,1,0,0,0,100,0,8000,10000,25000,32000,11,7399,0,0,0,0,0,5,0,0,0,0,0,0,0,"Shleipnarr - In Combat - Cast Terrify"); + +-- Dark Iron Geologist +UPDATE `smart_scripts` SET `event_param3`=3000, `event_param4`=5000 WHERE `entryorguid`=5839 AND `source_type`=0 AND `id`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5839 AND `source_type`=0 AND `id`=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 +(5839,0,1,0,9,0,100,0,5,30,12000,14000,11,8858,0,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Iron Geologist - Within 5-30 Range - Cast Bomb"); + +-- Magma Elemental +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5855; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5855 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 +(5855,0,0,0,0,0,100,0,5000,9000,12000,16000,11,11970,2,0,0,0,0,2,0,0,0,0,0,0,0,"Magma Elemental - In Combat - Cast Fire Nova"); + +-- Heavy War Golem +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5854; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5854 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 +(5854,0,0,0,9,0,100,0,0,5,13000,19000,11,12612,0,0,0,0,0,1,0,0,0,0,0,0,0,"Heavy War Golem - Within 0-5 Range - Cast Stomp"), +(5854,0,1,0,0,0,100,0,5000,8000,11000,17000,11,5568,0,0,0,0,0,1,0,0,0,0,0,0,0,"Heavy War Golem - In Combat - Cast Trample"); + +-- Inferno Elemental +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5852; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5852 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 +(5852,0,0,0,0,0,100,0,6000,9000,11000,14000,11,10733,0,0,0,0,0,2,0,0,0,0,0,0,0,"Inferno Elemental - In Combat - Cast Flame Spray"); + +-- Margol the Rager +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5833; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5833 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 +(5833,0,0,0,0,0,100,0,3000,5000,8000,14000,11,15549,0,0,0,0,0,2,0,0,0,0,0,0,0,"Margol the Rager - In Combat - Cast Chained Bolt"), +(5833,0,1,0,0,0,100,0,8000,12000,16000,20000,11,8147,0,0,0,0,0,1,0,0,0,0,0,0,0,"Margol the Rager - In Combat - Cast Thunderclap"); + +-- Rekk'tilac +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8277; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8277 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 +(8277,0,0,0,0,0,100,0,7000,9000,16000,18000,11,3583,2,0,0,0,0,2,0,0,0,0,0,0,0,"Rekk'tilac - In Combat - Cast Deadly Poison"); + +-- Scald +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8281; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8281 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 +(8281,0,0,0,0,0,100,0,3000,5000,14000,16000,11,11962,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scald - In Combat - Cast Immolate"); + +-- Greater Lava Spider +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5858; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5858 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 +(5858,0,0,0,0,0,100,0,1000,5000,7000,13000,11,11985,0,0,0,0,0,2,0,0,0,0,0,0,0,"Greater Lava Spider - In Combat - Cast Fireball"); + +-- Slave Worker +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5843; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5843 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 +(5843,0,0,0,0,0,100,0,5000,7000,12000,15000,11,11971,0,0,0,0,0,2,0,0,0,0,0,0,0,"Slave Worker - In Combat - Cast Sunder Armor"), +(5843,0,1,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Slave Worker - Between 0-15% Health - Flee For Assist (No Repeat)"); + +-- Smoldar +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8278; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8278 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 +(8278,0,0,0,0,0,100,0,7000,9000,17000,19000,11,5213,0,0,0,0,0,2,0,0,0,0,0,0,0,"Smoldar - In Combat - Cast Molten Metal"); + +-- Twilight Fire Guard +UPDATE `creature_template` SET `unit_class`=2, `AIName`="SmartAI" WHERE `entry`=5861; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5861 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 +(5861,0,0,0,0,0,100,0,4000,12000,18000,22000,11,11988,0,0,0,0,0,1,0,0,0,0,0,0,0,"Twilight Fire Guard - In Combat - Cast Fireball Volley"), +(5861,0,1,0,4,0,100,0,0,0,0,0,11,18968,0,0,0,0,0,1,0,0,0,0,0,0,0,"Twilight Fire Guard - On Aggro - Cast Fire Shield"); + +-- Twilight Dark Shaman +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5860; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5860 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 +(5860,0,0,0,0,0,100,0,3000,5000,10000,14000,11,11824,0,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Dark Shaman - In Combat - Cast Shock"), +(5860,0,1,0,0,0,100,0,7000,9000,15000,25000,11,7289,32,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Dark Shaman - In Combat - Cast Shrink"), +(5860,0,2,0,14,0,100,0,700,40,16000,20000,11,11986,0,0,0,0,0,7,0,0,0,0,0,0,0,"Twilight Dark Shaman - On Aggro - Cast Healing Wave"); + +-- Twilight Geomancer +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5862; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5862 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 +(5862,0,0,0,0,0,100,0,0,0,3000,5000,11,9053,64,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Geomancer - In Combat - Cast Fireball"), +(5862,0,1,0,0,0,100,0,7000,11000,18000,24000,11,11990,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Geomancer - In Combat - Cast Rain of Fire"), +(5862,0,2,0,0,0,100,0,9000,13000,15000,19000,11,11436,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Geomancer - In Combat - Cast Slow"); + +-- Twilight Idolater +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8419; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8419 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 +(8419,0,0,0,0,0,100,0,0,0,3000,5000,11,9053,64,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Idolater - In Combat - Cast Fireball"), +(8419,0,1,0,0,0,100,0,6000,9000,18000,22000,11,11962,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Idolater - In Combat - Cast Immolate"); + +-- Highlord Mastrogonde +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8282; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8282 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 +(8282,0,0,0,0,0,100,0,0,0,3000,5000,11,9613,64,0,0,0,0,2,0,0,0,0,0,0,0,"Highlord Mastrogonde - In Combat - Cast Shadow Bolt"), +(8282,0,1,0,0,0,100,0,8000,14000,21000,25000,11,11639,0,0,0,0,0,5,0,0,0,0,0,0,0,"Highlord Mastrogonde - In Combat - Cast Shadow Word: Pain"), +(8282,0,2,0,0,0,100,0,6000,9000,15000,18000,11,13323,0,0,0,0,0,6,0,0,0,0,0,0,0,"Highlord Mastrogonde - In Combat - Cast Polymorph"), +(8282,0,3,0,2,0,100,0,0,50,50000,70000,11,11974,0,0,0,0,0,1,0,0,0,0,0,0,0,"Slave Worker - Between 0-50% Health - Cast Power Word: Shield"); + +-- Slave Master Blackheart +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8283; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8283 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 +(8283,0,0,0,0,0,100,0,0,0,2000,3000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Slave Master Blackheart - In Combat - Cast Shoot"), +(8283,0,1,0,9,0,100,0,0,20,8000,9000,11,6533,0,0,0,0,0,2,0,0,0,0,0,0,0,"Slave Master Blackheart - Within 0-20 Range - Cast Net"); + +-- Incendosaur +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9318; +DELETE FROM `smart_scripts` WHERE `entryorguid`=9318 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 +(9318,0,0,0,0,0,100,0,5000,9000,12000,16000,11,11985,0,0,0,0,0,2,0,0,0,0,0,0,0,"Incendosaur - In Combat - Cast Fireball"); + +-- Overseer Maltorius +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=14621; +DELETE FROM `smart_scripts` WHERE `entryorguid`=14621 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 +(14621,0,0,0,0,0,100,0,0,0,3000,5000,11,9613,64,0,0,0,0,2,0,0,0,0,0,0,0,"Overseer Maltorius - In Combat - Cast Shadow Bolt"), +(14621,0,1,0,0,0,100,0,4000,12000,16000,22000,11,11639,0,0,0,0,0,5,0,0,0,0,0,0,0,"Overseer Maltorius - In Combat - Cast Shadow Word: Pain"), +(14621,0,2,0,0,0,100,0,6000,9000,13000,16000,11,13323,0,0,0,0,0,6,0,0,0,0,0,0,0,"Overseer Maltorius - In Combat - Cast Polymorph"), +(14621,0,3,0,2,0,100,0,0,50,40000,60000,11,11974,0,0,0,0,0,1,0,0,0,0,0,0,0,"Overseer Maltorius - Between 0-50% Health - Cast Power Word: Shield"); + +-- Fix bytes2 for some creatures +UPDATE `creature_addon` SET `bytes2`=2 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (8283,8566)); From e6f5e5255c2e8880056bafb19a70e1963b165558 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 25 Jan 2018 20:29:32 +0100 Subject: [PATCH 43/52] DB: Rename 2018_01_25_03_world.sql --- .../{2018_01_25_03_world.sql => 2018_01_25_03_world_335.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/3.3.5/{2018_01_25_03_world.sql => 2018_01_25_03_world_335.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_01_25_03_world.sql b/sql/updates/world/3.3.5/2018_01_25_03_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_25_03_world.sql rename to sql/updates/world/3.3.5/2018_01_25_03_world_335.sql From a96b25f3d22e1e2cc8b7e4df908d5bc1f64a1785 Mon Sep 17 00:00:00 2001 From: Killyana Date: Fri, 26 Jan 2018 22:51:02 +0100 Subject: [PATCH 44/52] DB/Quest: Territorial Trespass Ref #20771 --- sql/updates/world/3.3.5/2018_01_26_00_world.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_01_26_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_26_00_world.sql b/sql/updates/world/3.3.5/2018_01_26_00_world.sql new file mode 100644 index 00000000000..4753dd2d845 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_01_26_00_world.sql @@ -0,0 +1,12 @@ +-- +DELETE FROM `event_scripts` WHERE `id` = 19714; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(19714,0,9,5272,60,0,0,0,0,0), +(19714,0,9,5273,60,0,0,0,0,0), +(19714,0,9,5274,60,0,0,0,0,0), +(19714,0,9,5271,60,0,0,0,0,0), +(19714,0,9,5275,60,0,0,0,0,0), +(19714,0,10,30461,600000,0,6947.48,-859.518,1147.6,5.67487); +UPDATE `gameobject` SET `position_z`=1066.73991 WHERE `guid`=5275; +UPDATE `gameobject` SET `position_z`=1067.04003 WHERE `guid`=5274; + From e3de814ecaedb28f6ec9f74ca61ae0786fbc6c18 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 27 Jan 2018 16:52:01 +0100 Subject: [PATCH 45/52] Rename files --- sql/updates/world/3.3.5/2018_01_21_02_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_01_23_00_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_01_25_04_world_335.sql | 2 -- sql/updates/world/3.3.5/2018_01_25_08_world_335.sql | 2 -- ...2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql | 2 ++ ...2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql | 2 ++ .../2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql} | 0 .../2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql} | 0 ...018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql} | 2 ++ ...018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql} | 2 ++ ...2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql | 2 ++ ...018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql} | 2 ++ ...018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql} | 2 ++ ...018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql} | 2 ++ ...2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql | 2 ++ ...018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql} | 2 ++ ...018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql} | 2 ++ ...018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql} | 2 ++ ...018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql} | 2 ++ .../2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql} | 0 20 files changed, 26 insertions(+), 8 deletions(-) delete mode 100644 sql/updates/world/3.3.5/2018_01_21_02_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_01_23_00_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_01_25_04_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_01_25_08_world_335.sql create mode 100644 sql/updates/world/4.3.4/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql create mode 100644 sql/updates/world/4.3.4/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql rename sql/updates/world/{3.3.5/2018_01_24_00_world.sql => 4.3.4/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_01_24_03_world.sql => 4.3.4/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_01_25_02_world_335.sql => 4.3.4/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_01_25_03_world_335.sql => 4.3.4/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql} (99%) create mode 100644 sql/updates/world/4.3.4/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql rename sql/updates/world/{3.3.5/2018_01_25_05_world_335.sql => 4.3.4/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql} (97%) rename sql/updates/world/{3.3.5/2018_01_25_06_world_335.sql => 4.3.4/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_01_25_07_world_335.sql => 4.3.4/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql} (99%) create mode 100644 sql/updates/world/4.3.4/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql rename sql/updates/world/{3.3.5/2018_01_25_09_world_335.sql => 4.3.4/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_01_25_10_world_335.sql => 4.3.4/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_01_25_11_world_335.sql => 4.3.4/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_01_25_12_world_335.sql => 4.3.4/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_01_26_00_world.sql => 4.3.4/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_01_21_02_world_335.sql b/sql/updates/world/3.3.5/2018_01_21_02_world_335.sql deleted file mode 100644 index 2493bb5222e..00000000000 --- a/sql/updates/world/3.3.5/2018_01_21_02_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Argent Guard Thaelrid -UPDATE `creature_template` SET `faction`=794 WHERE `entry`=4787; diff --git a/sql/updates/world/3.3.5/2018_01_23_00_world_335.sql b/sql/updates/world/3.3.5/2018_01_23_00_world_335.sql deleted file mode 100644 index 6c643caf723..00000000000 --- a/sql/updates/world/3.3.5/2018_01_23_00_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `spell_bonus_data` SET `direct_bonus`=0 WHERE `entry`=33763; -UPDATE `spell_bonus_data` SET `direct_bonus`=0.51623296 WHERE `entry`=33778; diff --git a/sql/updates/world/3.3.5/2018_01_25_04_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_04_world_335.sql deleted file mode 100644 index 3b228de52a0..00000000000 --- a/sql/updates/world/3.3.5/2018_01_25_04_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Call to Arms! --> Fix Gossip Text -UPDATE `gossip_menu` SET `TextID`=7274 WHERE `MenuID`=6121; diff --git a/sql/updates/world/3.3.5/2018_01_25_08_world_335.sql b/sql/updates/world/3.3.5/2018_01_25_08_world_335.sql deleted file mode 100644 index bdf979dfa87..00000000000 --- a/sql/updates/world/3.3.5/2018_01_25_08_world_335.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Kalaran Windblade --> Fix condition -UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1323 AND `ConditionTypeOrReference`=2; diff --git a/sql/updates/world/4.3.4/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql new file mode 100644 index 00000000000..3452a04b705 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql @@ -0,0 +1,2 @@ +-- Argent Guard Thaelrid +-- UPDATE `creature_template` SET `faction`=794 WHERE `entry`=4787; diff --git a/sql/updates/world/4.3.4/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql new file mode 100644 index 00000000000..8ee9b4885bc --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql @@ -0,0 +1,2 @@ +-- UPDATE `spell_bonus_data` SET `direct_bonus`=0 WHERE `entry`=33763; +-- UPDATE `spell_bonus_data` SET `direct_bonus`=0.51623296 WHERE `entry`=33778; diff --git a/sql/updates/world/3.3.5/2018_01_24_00_world.sql b/sql/updates/world/4.3.4/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_24_00_world.sql rename to sql/updates/world/4.3.4/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_24_03_world.sql b/sql/updates/world/4.3.4/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_24_03_world.sql rename to sql/updates/world/4.3.4/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_01_25_02_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_02_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql index e52cd25de07..1dd809df38c 100644 --- a/sql/updates/world/3.3.5/2018_01_25_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql @@ -1,3 +1,4 @@ +/* -- Gavis Greyshield DELETE FROM `smart_scripts` WHERE `entryorguid`= 23941 AND `source_type`= 0; DELETE FROM `smart_scripts` WHERE `entryorguid`= 2394100 AND `source_type`= 9; @@ -10,3 +11,4 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type (2394100,9,0,0, 0,0,100, 0, 1000, 1000,0,0, 1, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Say Line 0"), (2394100,9,1,0, 0,0,100, 0, 4000, 4000,0,0, 1, 1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Say Line 1"), (2394100,9,2,0, 0,0,100, 0,10000,10000,0,0, 41, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Despawn"); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_25_03_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_03_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql index 8a5dac2a534..2c11a148f50 100644 --- a/sql/updates/world/3.3.5/2018_01_25_03_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql @@ -1,5 +1,7 @@ +/* -- Master Smith Burninate --> Fix gossip conditions DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5962; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (14,5962,7121,0,0,8,0,7722,0,0,0,0,0,"","Show gossip text 7121 if player has quest 'What the Flux?' rewarded"), (14,5962,7121,0,0,5,0,59,128,0,0,0,0,"","Show gossip text 7121 if player is exalted with Thorium Brotherhood"); +*/ diff --git a/sql/updates/world/4.3.4/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql new file mode 100644 index 00000000000..fbc42a249f8 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql @@ -0,0 +1,2 @@ +-- Call to Arms! --> Fix Gossip Text +-- UPDATE `gossip_menu` SET `TextID`=7274 WHERE `MenuID`=6121; diff --git a/sql/updates/world/3.3.5/2018_01_25_05_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql similarity index 97% rename from sql/updates/world/3.3.5/2018_01_25_05_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql index dbdcd1a6e50..65efd6f6800 100644 --- a/sql/updates/world/3.3.5/2018_01_25_05_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql @@ -1,6 +1,8 @@ +/* -- Primal Torntusk --> Add Gossip Text UPDATE `creature_template` SET `gossip_menu_id`=6084 WHERE `entry`=14736; DELETE FROM `gossip_menu` WHERE `MenuID`=6084; INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES (6084,7238,0); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_25_06_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_06_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql index 714f7f4455f..bc0d4505cde 100644 --- a/sql/updates/world/3.3.5/2018_01_25_06_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql @@ -1,3 +1,4 @@ +/* -- Fallen Hero of the Horde --> Fix gossip texts DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=840; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES @@ -18,3 +19,4 @@ DELETE FROM `smart_scripts` WHERE `entryorguid`=7572 AND `source_type`=0 AND `id 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 (7572,0,0,2,62,0,100,512,842,0,0,0,26,2784,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fallen Hero of the Horde - On Gossip Option 0 Selected - Quest Credit 'Fall From Grace'"), (7572,0,1,2,62,0,100,512,881,0,0,0,26,2801,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fallen Hero of the Horde - On Gossip Option 0 Selected - Quest Credit 'A Tale of Sorrow'"); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_25_07_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_07_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql index 89c3ab16187..47fa2987877 100644 --- a/sql/updates/world/3.3.5/2018_01_25_07_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql @@ -1,3 +1,4 @@ +/* UPDATE `creature_template` SET `gossip_menu_id`=6522, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=15127; -- Samuel Hawke UPDATE `creature_template` SET `gossip_menu_id`=6521, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=15126; -- Rutherford Twing UPDATE `creature_template` SET `gossip_menu_id`=6142, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=14753; -- Illiyana Moonblaze @@ -16,3 +17,4 @@ INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionTex (6521,0,1,"What goods have I earned the right to purchase from the Defilers?",10623,3,128,0,0,0,0,"",0,0), -- Rutherford Twing (6142,0,1,"What goods have I earned the right to purchase for use in Warsong Gulch?",10021,3,128,0,0,0,0,"",0,0), -- Illiyana Moonblaze (6141,0,1,"What goods have I earned the right to purchase for use in Warsong Gulch?",10019,3,128,0,0,0,0,"",0,0); -- Kelm Hargunth +*/ diff --git a/sql/updates/world/4.3.4/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql new file mode 100644 index 00000000000..9d1772c50ad --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql @@ -0,0 +1,2 @@ +-- Kalaran Windblade --> Fix condition +-- UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1323 AND `ConditionTypeOrReference`=2; diff --git a/sql/updates/world/3.3.5/2018_01_25_09_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_09_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql index 35d4cba0310..451585d774e 100644 --- a/sql/updates/world/3.3.5/2018_01_25_09_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "The Torch of Retribution" DELETE FROM `smart_scripts` WHERE `entryorguid`=847900 AND `source_type`=9; INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES @@ -26,3 +27,4 @@ INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Lan (8479,1,0,"Be patient, $n. The torch is almost complete.",12,0,100,1,0,0,4448,0,"Kalaran Windblade"), (8479,2,0,"%s falls to one knee. He looks exhausted.",16,0,100,0,0,0,4449,0,"Kalaran Windblade"), (8479,3,0,"It is done...",12,0,100,0,0,0,4450,0,"Kalaran Windblade"); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_25_10_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_10_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql index 0709ffc34e1..7bf7f8618c0 100644 --- a/sql/updates/world/3.3.5/2018_01_25_10_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "The Key to Freedom" -- Wooden Outhouse DELETE FROM `smart_scripts` WHERE `entryorguid`=173265 AND `source_type`=1 AND `id` IN (1,2,3); @@ -20,3 +21,4 @@ DELETE FROM `creature_text` WHERE `CreatureID`=9876; INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES (9876,0,0,"Ach! Thank you so much, $n! I'm free! Finally!",12,0,100,4,0,0,5407,0,"Locheed"), (9876,1,0,"You take care of yourself! I'm gettin' out o' here.",12,0,100,5,0,0,5408,0,"Locheed"); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_25_11_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_11_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql index 4bc2045cfe2..f1b5792ab47 100644 --- a/sql/updates/world/3.3.5/2018_01_25_11_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "Set Them Ablaze!" -- Squire Maltrake UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8509; @@ -45,3 +46,4 @@ INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Lan (8480,8,0,"The legion of Blackrock comes, dwarflings! We shall scorch the earth and set fire to the heavens. None shall survive...",14,0,100,0,0,0,4465,0,"Kalaran the Deceiver"), (8509,0,0,"What will we do with them, master? They are of no use to us anymore.",12,0,100,6,0,0,4459,0,"Squire Maltrake"), (8509,1,0,"Right away, master!",12,0,100,2,0,0,4468,0,"Squire Maltrake"); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_25_12_world_335.sql b/sql/updates/world/4.3.4/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_01_25_12_world_335.sql rename to sql/updates/world/4.3.4/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql index 550e002f4a1..209000b3707 100644 --- a/sql/updates/world/3.3.5/2018_01_25_12_world_335.sql +++ b/sql/updates/world/4.3.4/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql @@ -1,3 +1,4 @@ +/* -- Glassweb Spider UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5856; DELETE FROM `smart_scripts` WHERE `entryorguid`=5856 AND `source_type`=0; @@ -138,3 +139,4 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_ -- Fix bytes2 for some creatures UPDATE `creature_addon` SET `bytes2`=2 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (8283,8566)); +*/ diff --git a/sql/updates/world/3.3.5/2018_01_26_00_world.sql b/sql/updates/world/4.3.4/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_01_26_00_world.sql rename to sql/updates/world/4.3.4/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql From fdbbc081e4ec8769823f6b74a69e03cec3747170 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Mon, 29 Jan 2018 15:47:16 +0100 Subject: [PATCH 46/52] DB/Creature: Delete incorrectly spawned Gharsul the Remorseless --- sql/updates/world/4.3.4/2018_01_29_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_01_29_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_29_00_world.sql b/sql/updates/world/4.3.4/2018_01_29_00_world.sql new file mode 100644 index 00000000000..06383902c49 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_29_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature` WHERE `guid`=86933; From bfd7dcf815f2959cabec0deea6971674038f95c9 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Mon, 29 Jan 2018 18:22:59 +0100 Subject: [PATCH 47/52] DB/Creature: Delete perm spam of temp creature --- sql/updates/world/4.3.4/2018_01_29_01_world.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_01_29_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_29_01_world.sql b/sql/updates/world/4.3.4/2018_01_29_01_world.sql new file mode 100644 index 00000000000..0f2d8b5164b --- /dev/null +++ b/sql/updates/world/4.3.4/2018_01_29_01_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature` WHERE `guid` = 326468; + From 5658af802e7f895286b558017a5db3b13261b78c Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 2 Feb 2018 22:30:33 +0100 Subject: [PATCH 48/52] DB/Misc: Some Westfall Fixes By kilyana --- .../world/4.3.4/2018_02_02_00_world.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_02_02_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_02_00_world.sql b/sql/updates/world/4.3.4/2018_02_02_00_world.sql new file mode 100644 index 00000000000..c0fc3298875 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_02_00_world.sql @@ -0,0 +1,25 @@ +-- +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=42562; +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33536 WHERE `entry` IN (42560); +DELETE FROM `creature` WHERE `id`IN (42403,42402,42401,42399); + +SET @CGUID := 251569; +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES +(@CGUID+0,42560,0,40,109,1,169,0,0,0,-9855.679, 1277.568, 40.96358,5.427974,120,0,0,0,0,0,0,0,0,'',0), +(@CGUID+1,42386,0,40,109,1,169,0,0,0,-9851.216, 1273.403, 41.19444,2.583087,120,0,0,0,0,0,0,0,0,'',0), +(@CGUID+2,42384,0,40,109,1,169,0,0,0,-9859.457, 1279.47, 41.09737,5.480334,120,0,0,0,0,0,0,0,0,'',0), +(@CGUID+3,42384,0,40,109,1,169,0,0,0,-9861.16, 1276.556, 40.83781,0.122173,120,0,0,0,0,0,0,0,0,'',0), +(@CGUID+4,42559,0,40,109,1,169,0,0,0,-9852.603, 1274.115, 41.0983,5.88176,120,0,0,0,0,0,0,0,0,'',0), +(@CGUID+5,42559,0,40,109,1,169,0,0,0,-9859.658, 1275.504, 40.86245,2.373648,120,0,0,0,0,0,0,0,0,'',0), +(@CGUID+6,42558,0,40,109,1,169,0,0,0,-9855.285, 1275.561, 40.97787,1.413717,120,0,0,0,0,0,0,0,0,'',0); + +DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7; +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `auras`) VALUES +(@CGUID+0,0,0,65536,1,0,0,0,0,'79343 79372 29266'), +(@CGUID+1,0,0,65536,1,431,0,0,0,'79343'), +(@CGUID+2,0,0,65536,1,431,0,0,0,'79343'), +(@CGUID+3,0,0,65536,1,431,0,0,0,'79343'), +(@CGUID+4,0,0,65536,1,0,0,0,0,'79343'), +(@CGUID+5,0,0,65536,1,0,0,0,0,'79343'), +(@CGUID+6,0,0,65544,1,0,0,0,0,'79343'); From ef39c181a887df568c5acb6e0650d5e41bb6439a Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 2 Feb 2018 23:34:22 +0100 Subject: [PATCH 49/52] DB/Gameobject: Spawn go for quest Livin' the life By Kilyana --- sql/updates/world/4.3.4/2018_02_02_01_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_02_02_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_02_01_world.sql b/sql/updates/world/4.3.4/2018_02_02_01_world.sql new file mode 100644 index 00000000000..6ca8a8bc872 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_02_01_world.sql @@ -0,0 +1,5 @@ +-- +SET @OGUID := 200630; +DELETE FROM `gameobject` WHERE `guid`=@OGUID; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`zoneId`,`areaId`,`spawnMask`,`PhaseId`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID,203957, 0, 40, 111, 1, 169, -9848.62, 1390.5, 38.0731, 3.92641, 0, 0, 0.92399, -0.382416, 300, 255, 1); From 61038943f8d7642d6d8b89cea56741c57efc6f95 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 4 Feb 2018 14:36:06 +0100 Subject: [PATCH 50/52] DB/Loot: Redo Prowler table and remove exploit By Teppic1 --- sql/updates/world/4.3.4/2018_02_04_00_world.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 sql/updates/world/4.3.4/2018_02_04_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_04_00_world.sql b/sql/updates/world/4.3.4/2018_02_04_00_world.sql new file mode 100644 index 00000000000..631eba4b7e0 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_04_00_world.sql @@ -0,0 +1,9 @@ +DELETE FROM `creature_loot_template` WHERE `Entry`=118; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(118, 2672, 0, 85, 0, 1, 0, 1, 1, NULL), -- Stringy wolf meat +(118, 62328, 0, 85, 0, 1, 1, 1, 1, NULL), -- Shed fur +(118, 3299, 0, 15, 0, 1, 1, 1, 1, NULL), -- Fractured canine +(118, 24073, 24073, 2, 0, 1, 2, 1, 1, NULL), -- Junk +(118, 24074, 24074, 1, 0, 1, 2, 1, 1, NULL), -- Greens ilvl 10-11 +(118, 24075, 24075, 0.5, 0, 1, 2, 1, 1, NULL), -- Greens ilvl 12-13 +(118, 11111, 11111, 0.1, 0, 1, 0, 1, 1, NULL); -- Bags From 23ff9e8d123393db396f094e2cb7e51810eb7763 Mon Sep 17 00:00:00 2001 From: Ovalord <1Don7H4v3@m41L.com> Date: Wed, 7 Feb 2018 11:13:45 +0100 Subject: [PATCH 51/52] Core/Spells: fixed a logic mistake that was interrupting channeled spells due to movement --- src/server/game/Entities/Unit/Unit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a7f84306a66..bc4c080e193 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3072,17 +3072,17 @@ int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const bool Unit::IsMovementPreventedByCasting() const { // can always move when not casting - if (!HasUnitState(UNIT_STATE_CASTING)) - return false; + if (HasUnitState(UNIT_STATE_CASTING)) + return true; // channeled spells during channel stage (after the initial cast timer) allow movement with a specific spell attribute if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL]) if (spell->getState() != SPELL_STATE_FINISHED && spell->IsChannelActive()) - if (spell->GetSpellInfo()->IsMoveAllowedChannel()) - return false; + if (!spell->GetSpellInfo()->IsMoveAllowedChannel()) + return true; // prohibit movement for all other spell casts - return true; + return false; } bool Unit::isInFrontInMap(Unit const* target, float distance, float arc) const From 3b1913a739a19300f9ef1d82f6dd5954d5add9a2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Thu, 8 Feb 2018 20:13:53 +0000 Subject: [PATCH 52/52] Revert "Core/Spells: fixed a logic mistake that was interrupting channeled spells due to movement" This reverts merge request !107 --- src/server/game/Entities/Unit/Unit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index bc4c080e193..a7f84306a66 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3072,17 +3072,17 @@ int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const bool Unit::IsMovementPreventedByCasting() const { // can always move when not casting - if (HasUnitState(UNIT_STATE_CASTING)) - return true; + if (!HasUnitState(UNIT_STATE_CASTING)) + return false; // channeled spells during channel stage (after the initial cast timer) allow movement with a specific spell attribute if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL]) if (spell->getState() != SPELL_STATE_FINISHED && spell->IsChannelActive()) - if (!spell->GetSpellInfo()->IsMoveAllowedChannel()) - return true; + if (spell->GetSpellInfo()->IsMoveAllowedChannel()) + return false; // prohibit movement for all other spell casts - return false; + return true; } bool Unit::isInFrontInMap(Unit const* target, float distance, float arc) const