From 6a6cefb512e89350850e9fae5325f35ec25d8290 Mon Sep 17 00:00:00 2001 From: IntelligentQuantum Date: Thu, 28 Dec 2023 22:45:16 +0330 Subject: [PATCH 01/33] chore(Scripts/EK): remove useless includes (#18075) * chore(Scripts/Kalimdor): remove useless includes * chore(Scripts/EK): remove useless includes --- .../BlackrockSpire/instance_blackrock_spire.cpp | 2 -- .../EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp | 1 - src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp | 1 - src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp | 1 - src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp | 1 - src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp | 1 - src/server/scripts/EasternKingdoms/zone_ghostlands.cpp | 1 - 7 files changed, 8 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index 47f66c506..fc06b6222 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -23,13 +23,11 @@ #include "GridNotifiers.h" #include "InstanceMapScript.h" #include "InstanceScript.h" -#include "ObjectDefines.h" #include "ObjectMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "SpellScriptLoader.h" #include "blackrock_spire.h" -#include "GridNotifiersImpl.h" uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN }; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp index 0ef52588e..60afcf517 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp @@ -15,7 +15,6 @@ * with this program. If not, see . */ -#include "Containers.h" #include "CreatureScript.h" #include "ObjectAccessor.h" #include "ScriptedCreature.h" diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp index 746f18d9c..ff1dede33 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter3.cpp @@ -18,7 +18,6 @@ #include "SpellInfo.h" #include "SpellScript.h" #include "SpellScriptLoader.h" -#include "Unit.h" class spell_q12779_an_end_to_all_things : public SpellScript { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 09fb2de49..89e4b1c96 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -23,7 +23,6 @@ #include "SpellScript.h" #include "SpellScriptLoader.h" #include "TaskScheduler.h" -#include "WaypointMgr.h" #include "zulgurub.h" enum Says diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp index 034698592..9ab3451f5 100644 --- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp @@ -20,7 +20,6 @@ Blasted_Lands Quest support: 3628. Teleporter to Rise of the Defiler. */ -#include "CreatureScript.h" #include "Group.h" #include "Player.h" #include "ScriptedCreature.h" diff --git a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp index 6e4c11e7d..8c89c4428 100644 --- a/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp +++ b/src/server/scripts/EasternKingdoms/zone_burning_steppes.cpp @@ -18,7 +18,6 @@ #include "CreatureScript.h" #include "Player.h" #include "ScriptedCreature.h" -#include "ScriptedGossip.h" /*###### ## NPC 9836: Maredis Firestar diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp index ca2941346..da2cb493e 100644 --- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp @@ -20,7 +20,6 @@ #include "Player.h" #include "ScriptedCreature.h" #include "ScriptedEscortAI.h" -#include "ScriptedGossip.h" /*###### ## npc_ranger_lilatha From ebe89b875f14455cfe9a479cbe75254beb1e18b2 Mon Sep 17 00:00:00 2001 From: Alexandru-Mihai Maftei Date: Sat, 30 Dec 2023 15:47:02 +0000 Subject: [PATCH 02/33] fix(Scripts/ScarletMonastery): Prevent Whitemane from dying before resurrecting Mograine (#18082) The current code only prevents Whitemane from dying before casting sleep, but the players can inflict enough DPS on her before that, that she can die before resurrecting Mograine. When this happens, the dungeon is broken and cannot progress. --- .../ScarletMonastery/instance_scarlet_monastery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 9be35e30b..87ed30423 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -538,7 +538,7 @@ public: void DamageTaken(Unit* /*doneBy*/, uint32& damage, DamageEffectType, SpellSchoolMask) override { - if (!canResurrectCheck && damage >= me->GetHealth()) + if ((!canResurrectCheck || canResurrect) && damage >= me->GetHealth()) damage = me->GetHealth() - 1; } From 09e3dbf770d7e5ccb7df654e888e755f8977e33d Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 30 Dec 2023 18:36:16 +0200 Subject: [PATCH 03/33] fix(DB/Custom): Rotting Touch should stack from different sources (#18079) --- data/sql/updates/pending_db_world/rev_1703920580435795500.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1703920580435795500.sql diff --git a/data/sql/updates/pending_db_world/rev_1703920580435795500.sql b/data/sql/updates/pending_db_world/rev_1703920580435795500.sql new file mode 100644 index 000000000..6419bd07a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1703920580435795500.sql @@ -0,0 +1,3 @@ +-- Rotting Touch +DELETE FROM `spell_custom_attr` WHERE `spell_id`=50196; +INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (50196, 4194304); From a1212a52b02aa443ce0c0939cbd46379227e9c57 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 30 Dec 2023 16:37:06 +0000 Subject: [PATCH 04/33] chore(DB): import pending files Referenced commit(s): 09e3dbf770d7e5ccb7df654e888e755f8977e33d --- .../rev_1703920580435795500.sql => db_world/2023_12_30_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1703920580435795500.sql => db_world/2023_12_30_00.sql} (78%) diff --git a/data/sql/updates/pending_db_world/rev_1703920580435795500.sql b/data/sql/updates/db_world/2023_12_30_00.sql similarity index 78% rename from data/sql/updates/pending_db_world/rev_1703920580435795500.sql rename to data/sql/updates/db_world/2023_12_30_00.sql index 6419bd07a..ea3226db9 100644 --- a/data/sql/updates/pending_db_world/rev_1703920580435795500.sql +++ b/data/sql/updates/db_world/2023_12_30_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_12_28_00 -> 2023_12_30_00 -- Rotting Touch DELETE FROM `spell_custom_attr` WHERE `spell_id`=50196; INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (50196, 4194304); From a11434b24fbf21bf092abe0fefd2e14751881302 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 1 Jan 2024 01:51:33 -0300 Subject: [PATCH 05/33] =?UTF-8?q?refactor(Core/GameObject):=20Move=20the?= =?UTF-8?q?=20GameObject=20state=20save=20handling=20to=E2=80=A6=20(#18080?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(Core/GameObject): Move the GameObject state save handling to instance level * Update GameObject.h * remove leftover * small improvements --- .../Implementation/CharacterDatabase.cpp | 6 +- .../Implementation/CharacterDatabase.h | 1 - .../game/Entities/GameObject/GameObject.cpp | 114 +++++------------- .../game/Entities/GameObject/GameObject.h | 16 +-- src/server/game/Globals/ObjectMgr.cpp | 66 ---------- src/server/game/Globals/ObjectMgr.h | 6 - src/server/game/Instances/InstanceScript.cpp | 32 +++++ src/server/game/Instances/InstanceScript.h | 8 ++ src/server/game/Maps/Map.cpp | 2 + src/server/game/World/World.cpp | 3 - .../Deadmines/instance_deadmines.cpp | 8 +- .../Gnomeregan/instance_gnomeregan.cpp | 2 +- .../Scholomance/instance_scholomance.cpp | 2 +- .../Stratholme/instance_stratholme.cpp | 26 ++-- 14 files changed, 100 insertions(+), 192 deletions(-) diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index 841ac51c5..405cf8178 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -604,9 +604,9 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_CHAR_SETTINGS, "DELETE FROM character_settings WHERE guid = ?", CONNECTION_ASYNC); // Instance saved data. Stores the states of gameobjects in instances to be loaded on server start - PrepareStatement(CHAR_SELECT_INSTANCE_SAVED_DATA, "SELECT id, guid, state FROM instance_saved_go_state_data", CONNECTION_SYNCH); - PrepareStatement(CHAR_UPDATE_INSTANCE_SAVED_DATA, "UPDATE instance_saved_go_state_data SET state = ? WHERE guid = ? AND id = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_INSERT_INSTANCE_SAVED_DATA, "INSERT INTO instance_saved_go_state_data (id, guid, state) VALUES (?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_SELECT_INSTANCE_SAVED_DATA, "SELECT guid, state FROM instance_saved_go_state_data WHERE id = ?", CONNECTION_SYNCH); + PrepareStatement(CHAR_INSERT_INSTANCE_SAVED_DATA, "INSERT INTO instance_saved_go_state_data (id, guid, state) VALUES (?, ?, ?)" + "ON DUPLICATE KEY UPDATE state = VALUES(state)", CONNECTION_ASYNC); PrepareStatement(CHAR_DELETE_INSTANCE_SAVED_DATA, "DELETE FROM instance_saved_go_state_data WHERE id = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SANITIZE_INSTANCE_SAVED_DATA, "DELETE FROM instance_saved_go_state_data WHERE id NOT IN (SELECT instance.id FROM instance)", CONNECTION_ASYNC); } diff --git a/src/server/database/Database/Implementation/CharacterDatabase.h b/src/server/database/Database/Implementation/CharacterDatabase.h index 6a85c7aba..ede962b49 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.h +++ b/src/server/database/Database/Implementation/CharacterDatabase.h @@ -517,7 +517,6 @@ enum CharacterDatabaseStatements : uint32 CHAR_DEL_CHAR_SETTINGS, CHAR_SELECT_INSTANCE_SAVED_DATA, - CHAR_UPDATE_INSTANCE_SAVED_DATA, CHAR_INSERT_INSTANCE_SAVED_DATA, CHAR_DELETE_INSTANCE_SAVED_DATA, CHAR_SANITIZE_INSTANCE_SAVED_DATA, diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 5145bd97e..a488acc93 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -335,21 +335,22 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u if (IsInstanceGameobject()) { - switch (GetStateSavedOnInstance()) + if (InstanceScript* instance = GetInstanceScript()) { - case 0: - SetGoState(GO_STATE_READY); - SwitchDoorOrButton(true); - break; - case 1: - SetGoState(GO_STATE_READY); - break; - case 2: - SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - break; - default: - SetGoState(go_state); - break; + switch (uint8 state = instance->GetStoredGameObjectState(GetSpawnId())) + { + case 0: + SetGoState(GO_STATE_READY); + SwitchDoorOrButton(true); + break; + case 1: + case 2: + SetGoState((GOState)state); + break; + default: + SetGoState(go_state); + break; + } } } else @@ -2504,21 +2505,13 @@ void GameObject::SetGoState(GOState state) * save it's state on the database to be loaded properly * on server restart or crash. */ - if (IsInstanceGameobject() && IsAbleToSaveOnDb()) + if (IsInstanceGameobject() && IsAllowedToSaveToDB()) { - // Save the gameobject state on the Database - if (!FindStateSavedOnInstance()) - { - SaveInstanceData(GameobjectStateToInt(&state)); - } - else - { - UpdateInstanceData(GameobjectStateToInt(&state)); - } + SaveStateToDB(); } } -bool GameObject::IsInstanceGameobject() +bool GameObject::IsInstanceGameobject() const { // Avoid checking for unecessary gameobjects whose // states don't matter for the dungeon progression @@ -2537,7 +2530,7 @@ bool GameObject::IsInstanceGameobject() return false; } -bool GameObject::ValidateGameobjectType() +bool GameObject::ValidateGameobjectType() const { switch (m_goInfo->type) { @@ -2552,7 +2545,7 @@ bool GameObject::ValidateGameobjectType() } } -uint8 GameObject::GameobjectStateToInt(GOState* state) +uint8 GameObject::GameobjectStateToInt(GOState* state) const { uint8 m_state = 3; @@ -2577,71 +2570,24 @@ uint8 GameObject::GameobjectStateToInt(GOState* state) return m_state; } -bool GameObject::IsAbleToSaveOnDb() -{ - return m_saveStateOnDb; -} - -void GameObject::UpdateSaveToDb(bool enable) -{ - m_saveStateOnDb = enable; - - if (enable) - { - SavingStateOnDB(); - } -} - -void GameObject::SavingStateOnDB() +void GameObject::SaveStateToDB() { if (IsInstanceGameobject()) { - GOState param = GetGoState(); - if (!FindStateSavedOnInstance()) + if (InstanceScript* instance = GetInstanceScript()) { - SaveInstanceData(GameobjectStateToInt(¶m)); + GOState param = GetGoState(); + instance->StoreGameObjectState(GetSpawnId(), GameobjectStateToInt(¶m)); + + CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INSERT_INSTANCE_SAVED_DATA); + stmt->SetData(0, GetInstanceId()); + stmt->SetData(1, GetSpawnId()); + stmt->SetData(2, GameobjectStateToInt(¶m)); + CharacterDatabase.Execute(stmt); } } } -void GameObject::SaveInstanceData(uint8 state) -{ - uint32 id = GetInstanceId(); - uint32 guid = GetSpawnId(); - - CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INSERT_INSTANCE_SAVED_DATA); - stmt->SetData(0, id); - stmt->SetData(1, guid); - stmt->SetData(2, state); - CharacterDatabase.Execute(stmt); - - sObjectMgr->NewInstanceSavedGameobjectState(id, guid, state); -} - -void GameObject::UpdateInstanceData(uint8 state) -{ - uint32 id = GetInstanceId(); - uint32 guid = GetSpawnId(); - - CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPDATE_INSTANCE_SAVED_DATA); - stmt->SetData(0, state); - stmt->SetData(1, guid); - stmt->SetData(2, id); - CharacterDatabase.Execute(stmt); - - sObjectMgr->SetInstanceSavedGameobjectState(id, guid, state); -} - -uint8 GameObject::GetStateSavedOnInstance() -{ - return sObjectMgr->GetInstanceSavedGameobjectState(GetInstanceId(), GetSpawnId()); -} - -bool GameObject::FindStateSavedOnInstance() -{ - return sObjectMgr->FindInstanceSavedGameobjectState(GetInstanceId(), GetSpawnId()); -} - void GameObject::SetDisplayId(uint32 displayid) { SetUInt32Value(GAMEOBJECT_DISPLAYID, displayid); diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index d7ba58e8f..a2e352ea8 100644 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -350,25 +350,21 @@ public: static std::unordered_map gameObjectToEventFlag; // Gameobject -> event flag - void SaveInstanceData(uint8 state); - void UpdateInstanceData(uint8 state); - bool FindStateSavedOnInstance(); - bool ValidateGameobjectType(); - uint8 GetStateSavedOnInstance(); - bool IsInstanceGameobject(); - uint8 GameobjectStateToInt(GOState* state); + [[nodiscard]] bool ValidateGameobjectType() const; + [[nodiscard]] bool IsInstanceGameobject() const; + [[nodiscard]] uint8 GameobjectStateToInt(GOState* state) const; /* A check to verify if this object is available to be saved on the DB when * a state change occurs */ - bool IsAbleToSaveOnDb(); + [[nodiscard]] bool IsAllowedToSaveToDB() const { return m_saveStateOnDb; }; /* Enable or Disable the ability to save on the database this gameobject's state * whenever it changes */ - void UpdateSaveToDb(bool enable); + void AllowSaveToDB(bool enable) { m_saveStateOnDb = enable; }; - void SavingStateOnDB(); + void SaveStateToDB(); std::string GetDebugInfo() const override; protected: diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index b182d06f0..7d09dacc2 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -10135,72 +10135,6 @@ uint32 ObjectMgr::GetQuestMoneyReward(uint8 level, uint32 questMoneyDifficulty) return 0; } -void ObjectMgr::LoadInstanceSavedGameobjectStateData() -{ - uint32 oldMSTime = getMSTime(); - - CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SELECT_INSTANCE_SAVED_DATA); - PreparedQueryResult result = CharacterDatabase.Query(stmt); - - if (!result) - { - // There's no gameobject with this GUID saved on the DB - LOG_INFO("sql.sql", ">> Loaded 0 Instance saved gameobject state data. DB table `instance_saved_go_state_data` is empty."); - return; - } - - Field* fields; - uint32 count = 0; - do - { - fields = result->Fetch(); - GameobjectInstanceSavedStateList.push_back({ fields[0].Get(), fields[1].Get(), fields[2].Get() }); - count++; - } while (result->NextRow()); - - LOG_INFO("server.loading", ">> Loaded {} instance saved gameobject state data in {} ms", count, GetMSTimeDiffToNow(oldMSTime)); - LOG_INFO("server.loading", " "); -} - -uint8 ObjectMgr::GetInstanceSavedGameobjectState(uint32 id, uint32 guid) -{ - for (auto it = GameobjectInstanceSavedStateList.begin(); it != GameobjectInstanceSavedStateList.end(); it++) - { - if (it->m_guid == guid && it->m_instance == id) - { - return it->m_state; - } - } - return 3; // Any state higher than 2 to get the default state -} - -bool ObjectMgr::FindInstanceSavedGameobjectState(uint32 id, uint32 guid) -{ - for (auto it = GameobjectInstanceSavedStateList.begin(); it != GameobjectInstanceSavedStateList.end(); it++) - { - if (it->m_guid == guid && it->m_instance == id) - { - return true; - } - } - return false; -} - -void ObjectMgr::SetInstanceSavedGameobjectState(uint32 id, uint32 guid, uint8 state) -{ - for (auto it = GameobjectInstanceSavedStateList.begin(); it != GameobjectInstanceSavedStateList.end(); it++) - { - if (it->m_guid == guid && it->m_instance == id) - { - it->m_state = state; - } - } -} -void ObjectMgr::NewInstanceSavedGameobjectState(uint32 id, uint32 guid, uint8 state) -{ - GameobjectInstanceSavedStateList.push_back({ id, guid, state }); -} - void ObjectMgr::SendServerMail(Player* player, uint32 id, uint32 reqLevel, uint32 reqPlayTime, uint32 rewardMoneyA, uint32 rewardMoneyH, uint32 rewardItemA, uint32 rewardItemCountA, uint32 rewardItemH, uint32 rewardItemCountH, std::string subject, std::string body, uint8 active) const { if (active) diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 7a0cd851d..4b70e9ffe 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -1444,12 +1444,6 @@ public: [[nodiscard]] uint32 GetQuestMoneyReward(uint8 level, uint32 questMoneyDifficulty) const; void SendServerMail(Player* player, uint32 id, uint32 reqLevel, uint32 reqPlayTime, uint32 rewardMoneyA, uint32 rewardMoneyH, uint32 rewardItemA, uint32 rewardItemCountA, uint32 rewardItemH, uint32 rewardItemCountH, std::string subject, std::string body, uint8 active) const; - - void LoadInstanceSavedGameobjectStateData(); - bool FindInstanceSavedGameobjectState(uint32 id, uint32 guid); - uint8 GetInstanceSavedGameobjectState(uint32 id, uint32 guid); - void SetInstanceSavedGameobjectState(uint32 id, uint32 guid, uint8 state); - void NewInstanceSavedGameobjectState(uint32 id, uint32 guid, uint8 state); private: // first free id for selected id type uint32 _auctionId; // pussywizard: accessed by a single thread diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 459d65929..332c1797c 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -740,6 +740,26 @@ void InstanceScript::SendEncounterUnit(uint32 type, Unit* unit /*= nullptr*/, ui instance->SendToPlayers(&data); } +void InstanceScript::LoadInstanceSavedGameobjectStateData() +{ + _objectStateMap.clear(); + + CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SELECT_INSTANCE_SAVED_DATA); + stmt->SetData(0, instance->GetInstanceId()); + + if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) + { + Field* fields; + + do + { + fields = result->Fetch(); + StoreGameObjectState(fields[0].Get(), fields[1].Get()); + + } while (result->NextRow()); + } +} + std::string InstanceScript::GetBossStateName(uint8 state) { // See enum EncounterState in InstanceScript.h @@ -762,6 +782,18 @@ std::string InstanceScript::GetBossStateName(uint8 state) } } +uint8 InstanceScript::GetStoredGameObjectState(ObjectGuid::LowType spawnId) const +{ + auto i = _objectStateMap.find(spawnId); + + if (i != _objectStateMap.end()) + { + return i->second; + } + + return 3; // Any state higher than 2 to get the default state for the object we are loading. +} + bool InstanceHasScript(WorldObject const* obj, char const* scriptName) { if (InstanceMap* instance = obj->GetMap()->ToInstanceMap()) diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index fb5553176..6fd2c9402 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -136,6 +136,7 @@ typedef std::pair Door typedef std::map MinionInfoMap; typedef std::map ObjectGuidMap; typedef std::map ObjectInfoMap; +typedef std::map ObjectStateMap; class InstanceScript : public ZoneScript { @@ -265,6 +266,12 @@ public: // Allows executing code using all creatures registered in the instance script as minions void DoForAllMinions(uint32 id, std::function exec); + // + void StoreGameObjectState(ObjectGuid::LowType spawnId, uint8 state) { _objectStateMap[spawnId] = state; }; + [[nodiscard]] uint8 GetStoredGameObjectState(ObjectGuid::LowType spawnId) const; + + void LoadInstanceSavedGameobjectStateData(); + TaskScheduler scheduler; protected: void SetHeaders(std::string const& dataHeaders); @@ -311,6 +318,7 @@ private: ObjectInfoMap _creatureInfo; ObjectInfoMap _gameObjectInfo; ObjectGuidMap _objectGuids; + ObjectStateMap _objectStateMap; uint32 completedEncounters; // completed encounter mask, bit indexes are DungeonEncounter.dbc boss numbers, used for packets std::unordered_set _activatedAreaTriggers; }; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 5f22376d5..905c6632e 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3090,6 +3090,8 @@ void InstanceMap::CreateInstanceScript(bool load, std::string data, uint32 compl if (data != "") instance_data->Load(data.c_str()); } + + instance_data->LoadInstanceSavedGameobjectStateData(); } /* diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 3e2561df6..4baf05a91 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1614,9 +1614,6 @@ void World::SetInitialWorldSettings() LOG_INFO("server.loading", "Loading Instance Template..."); sObjectMgr->LoadInstanceTemplate(); - LOG_INFO("server.loading", "Loading Instance Saved Gameobject State Data..."); - sObjectMgr->LoadInstanceSavedGameobjectStateData(); - LOG_INFO("server.loading", "Loading Character Cache..."); sCharacterCache->LoadCharacterCacheStorage(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index 3f099e499..91f1e592d 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -46,17 +46,17 @@ public: case GO_DOOR_LEVER_2: case GO_DOOR_LEVER_3: case GO_CANNON: - gameobject->UpdateSaveToDb(true); + gameobject->AllowSaveToDB(true); break; case GO_FACTORY_DOOR: - gameobject->UpdateSaveToDb(true); + gameobject->AllowSaveToDB(true); // GoState (Door opened) is restored during GO creation, but we need to set LootState to prevent Lever from closing it again if (_encounters[TYPE_RHAHK_ZOR] == DONE) gameobject->SetLootState(GO_ACTIVATED); break; case GO_IRON_CLAD_DOOR: - gameobject->UpdateSaveToDb(true); - if (gameobject->GetStateSavedOnInstance() == GO_STATE_ACTIVE) + gameobject->AllowSaveToDB(true); + if (GetStoredGameObjectState(gameobject->GetSpawnId()) == GO_STATE_ACTIVE) { gameobject->DespawnOrUnsummon(); } diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index 6302f44b5..de096a539 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -62,7 +62,7 @@ public: case GO_CAVE_IN_2: case GO_WORKSHOP_DOOR: case GO_FINAL_CHAMBER_DOOR: - gameobject->UpdateSaveToDb(true); + gameobject->AllowSaveToDB(true); break; } } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index d13d6bccb..318def2e4 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -65,7 +65,7 @@ public: GateKirtonosGUID = go->GetGUID(); break; case GO_DOOR_OPENED_WITH_KEY: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); break; case GO_GATE_GANDLING_DOWN_NORTH: GandlingGatesGUID[0] = go->GetGUID(); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 910e648d3..b5aa4153b 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -178,69 +178,69 @@ public: case GO_HALL_OF_HIGH_COMMAND: case GO_GAUNTLET_DOOR_1: case GO_GAUNTLET_DOOR_2: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); break; case GO_ZIGGURAT_DOORS1: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _zigguratDoorsGUID1 = go->GetGUID(); if (GetData(TYPE_ZIGGURAT1) >= 1) go->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOORS2: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _zigguratDoorsGUID2 = go->GetGUID(); if (GetData(TYPE_ZIGGURAT2) >= 1) go->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOORS3: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _zigguratDoorsGUID3 = go->GetGUID(); if (GetData(TYPE_ZIGGURAT3) >= 1) go->SetGoState(GO_STATE_ACTIVE); break; case GO_GAUNTLET_GATE: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _gauntletGateGUID = go->GetGUID(); if (_zigguratState1 == 2 && _zigguratState2 == 2 && _zigguratState3 == 2) go->SetGoState(GO_STATE_ACTIVE); break; case GO_SLAUGTHER_GATE: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _slaughterGateGUID = go->GetGUID(); if (_zigguratState1 == 2 && _zigguratState2 == 2 && _zigguratState3 == 2) go->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOORS4: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _zigguratDoorsGUID4 = go->GetGUID(); if (_slaughterProgress == 4) go->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOORS5: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _zigguratDoorsGUID5 = go->GetGUID(); if (_slaughterProgress == 4) go->SetGoState(GO_STATE_ACTIVE); break; case GO_SLAUGHTER_GATE_SIDE: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); if (_slaughterProgress >= 2) go->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_TRAP_GATE_1: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _trapGatesGUIDs[0] = go->GetGUID(); break; case GO_PORT_TRAP_GATE_2: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _trapGatesGUIDs[1] = go->GetGUID(); break; case GO_PORT_TRAP_GATE_3: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _trapGatesGUIDs[2] = go->GetGUID(); break; case GO_PORT_TRAP_GATE_4: - go->UpdateSaveToDb(true); + go->AllowSaveToDB(true); _trapGatesGUIDs[3] = go->GetGUID(); break; } From d80e7d5cb438d15d22a74afa83df2ecc26aede45 Mon Sep 17 00:00:00 2001 From: sudlud Date: Mon, 1 Jan 2024 11:11:27 +0100 Subject: [PATCH 06/33] fix(DB/Gameobject): Update all 'Mailbox' spawns with sniffed values (#18072) * fix(DB/Gameobject): Update 'Mailbox' spawns with sniffed values * update with additional sniffs * add last missing mailbox spawn for 185965 --- .../rev_1703711417382340800.sql | 216 ++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1703711417382340800.sql diff --git a/data/sql/updates/pending_db_world/rev_1703711417382340800.sql b/data/sql/updates/pending_db_world/rev_1703711417382340800.sql new file mode 100644 index 000000000..4492001ed --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1703711417382340800.sql @@ -0,0 +1,216 @@ +-- Update all 'Mailbox' gameobjects with sniffed values +-- updated spawns +DELETE FROM `gameobject` +WHERE (`id` IN (142075, 142089, 142093, 142094, 142095, 142102, 142103, 142109, 142110, 142111, 142117, 142119, 143981, 143982, 143983, 143984, 143985, 143986, 143987, 143988, 143989, 143990, 144011, 144112, 144125, 144126, 144127, 144128, 144129, 144130, 144131, 144179, 153578, 153716, 157637, 163313, 163645, 164618, 164840, 171556, 171699, 171752, 173047, 173221, 176319, 176324, 176404, 177044, 178864, 179895, 179896, 180451, 181236, 181380, 181381, 181639, 181883, 181980, 182356, 182357, 182359, 182360, 182361, 182362, 182363, 182364, 182365, 182391, 182567, 182939, 182946, 182948, 182949, 182950, 182955, 183037, 183038, 183039, 183040, 183042, 183047, 183167, 183856, 183857, 183858, 184085, 184133, 184134, 184135, 184136, 184137, 184138, 184139, 184140, 184147, 184148, 184490, 184652, 184944, 185102, 185472, 185473, 185477, 186230, 186435, 186506, 186629, 186687, 187113, 187260, 187268, 187316, 187322, 188123, 188241, 188256, 188355, 188486, 188531, 188534, 188541, 188604, 188618, 188682, 188710, 189328, 189329, 189969, 190914, 190915, 191228, 191521, 191832, 191946, 191947, 191948, 191949, 191950, 191951, 191952, 191953, 191954, 191955, 191956, 191957, 192952, 193030, 193043, 193044, 193045, 193071, 193791, 193972, 194016, 194027, 194147, 194492, 194788, 195218, 195467, 195468, 195528, 195529, 195530, 195554, 195555, 195556, 195557, 195558, 195559, 195560, 195561, 195562, 195603, 195604, 195606, 195607, 195608, 195609, 195610, 195611, 195612, 195613, 195614, 195615, 195616, 195617, 195618, 195619, 195624, 195625, 195626, 195627, 195628, 195629, 32349)) +AND (`guid` IN (10011, 100156, 100157, 100158, 100159, 100499, 100500, 100501, 100502, 100503, 100505, 100506, 10107, 1074, 10764, 10807, 10880, 10968, 11824, 121573, 121574, 121575, 12634, 13449, 13770, 14131, 150145, 150736, 150737, 150738, 150739, 150740, 150741, 150742, 150743, 150744, 150745, 150746, 150747, 150748, 150749, 150750, 150751, 150752, 150753, 150754, 150755, 151207, 151239, 1564, 15724, 15753, 15760, 1620, 16565, 17022, 17101, 17424, 17473, 20420, 20426, 20492, 20534, 21722, 21723, 22398, 22851, 22852, 22853, 22854, 22855, 22856, 22857, 22858, 22859, 22871, 23173, 23802, 23859, 23861, 23862, 23900, 23953, 23954, 23955, 23990, 24053, 24717, 24718, 24719, 25004, 25034, 25035, 25036, 25037, 25038, 25039, 25040, 25041, 25046, 25047, 25341, 25454, 25833, 25969, 26175, 26176, 26387, 26463, 26784, 268682, 268683, 27147, 27845, 29365, 30400, 30852, 32101, 32537, 32540, 33370, 42497, 42900, 42913, 44775, 45603, 46048, 46054, 47458, 47593, 47829, 48037, 48629, 48827, 48996, 49429, 49531, 49532, 49832, 49947, 50044, 516, 52, 55701, 55927, 55966, 55975, 56563, 56726, 56975, 57535, 57604, 57696, 58222, 59045, 59093, 59214, 59314, 59451, 59543, 59565, 59746, 60040, 60041, 60074, 60111, 60214, 60310, 60320, 60433, 60436, 60445, 60454, 60469, 60479, 60509, 60519, 60545, 60554, 60563, 60576, 60591, 60953, 61662, 61819, 62014, 62980, 63134, 66065, 66357, 66633, 7555, 7574, 7597, 866, 92053)); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(10011, 163645, 0, 0, 0, 1, 1, -12387.638671875, 145.8055572509765625, 2.519112110137939453, 4.677483558654785156, 0, 0, -0.71933937072753906, 0.694658815860748291, 120, 255, 1, "", 50172, NULL), +(100156, 195603, 0, 0, 0, 1, 1, -8815.1689453125, 652.92669677734375, 94.89659881591796875, 4.878195762634277343, 0, 0, -0.64612388610839843, 0.763232588768005371, 120, 255, 1, "", 48632, NULL), +(100157, 195604, 0, 0, 0, 1, 1, -8861.4970703125, 636.744384765625, 96.17852783203125, 1.911133170127868652, 0, 0, 0.816640853881835937, 0.577146172523498535, 120, 255, 1, "", 48632, NULL), +(100158, 195614, 0, 0, 0, 1, 1, -8811.2802734375, 838.16448974609375, 99.0288238525390625, 6.161012649536132812, 0, 0, -0.06104850769042968, 0.998134791851043701, 120, 255, 1, "", 49345, NULL), +(100159, 195615, 0, 0, 0, 1, 1, -8826.5341796875, 725.575927734375, 98.67694091796875, 5.131268978118896484, 0, 0, -0.54463863372802734, 0.838670849800109863, 120, 255, 1, "", 49345, NULL), +(100499, 195624, 0, 0, 0, 1, 1, 1483.6412353515625, 187.9666748046875, -62.2915382385253906, 5.10445404052734375, 0, 0, -0.55583381652832031, 0.831293404102325439, 120, 255, 1, "", 50063, NULL), +(100500, 195626, 0, 0, 0, 1, 1, 1547.329833984375, 276.82818603515625, -62.2802848815917968, 4.656640529632568359, 0, 0, -0.72653961181640625, 0.687124609947204589, 120, 255, 1, "", 49345, NULL), +(100501, 195628, 0, 0, 0, 1, 1, 1644.317626953125, 204.032501220703125, -62.2799644470214843, 6.13532114028930664, 0, 0, -0.07386493682861328, 0.997268259525299072, 120, 255, 1, "", 49345, NULL), +(100502, 195627, 0, 0, 0, 1, 1, 1644.8427734375, 276.180145263671875, -62.2799034118652343, 0.828394830226898193, 0, 0, 0.402455329895019531, 0.9154396653175354, 120, 255, 1, "", 49345, NULL), +(100503, 195625, 0, 0, 0, 1, 1, 1547.062255859375, 204.549346923828125, -62.2807502746582031, 0.776035070419311523, 0, 0, 0.378354072570800781, 0.925660967826843261, 120, 255, 1, "", 49345, NULL), +(100505, 195618, 0, 0, 0, 1, 1, -8572.3623046875, 552.68365478515625, 102.003875732421875, 3.665196180343627929, 0, 0, -0.96592521667480468, 0.258821308612823486, 120, 255, 1, "", 48632, NULL), +(100506, 195610, 0, 0, 0, 1, 1, -9003.4990234375, 860.5499267578125, 105.8765716552734375, 5.07018136978149414, 0, 0, -0.56999683380126953, 0.821646869182586669, 120, 255, 1, "", 49345, NULL), +(10107, 173221, 1, 0, 0, 1, 1, 1615.583740234375, -4391.6015625, 10.33495712280273437, 3.94444584846496582, 0, 0, -0.92050457000732421, 0.3907318115234375, 120, 255, 1, "", 47720, NULL), +(1074, 142102, 0, 0, 0, 1, 1, -5603.5869140625, -513.78125, 401.569244384765625, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 48632, NULL), +(10764, 144126, 0, 0, 0, 1, 1, -14417.3662109375, 517.03448486328125, 5.013153076171875, 2.504543066024780273, 0, 0, 0.949698448181152343, 0.313165903091430664, 120, 255, 1, "", 50063, NULL), +(10807, 144127, 0, 0, 0, 1, 1, -14461.9619140625, 480.032073974609375, 26.86115264892578125, 2.408554315567016601, 0, 0, 0.933580398559570312, 0.358368009328842163, 120, 255, 1, "", 50063, NULL), +(10880, 163313, 0, 0, 0, 1, 1, -6673.94775390625, -2174.3525390625, 244.159881591796875, 2.539447784423828125, 0, 0, 0.955018997192382812, 0.296544641256332397, 120, 255, 1, "", 48632, NULL), +(10968, 173047, 1, 0, 0, 1, 1, 1894.966064453125, -4553.87548828125, 29.38039779663085937, 2.155482053756713867, 0, 0, 0.880890846252441406, 0.473319470882415771, 120, 255, 1, "", 47720, NULL), +(11824, 142103, 0, 0, 0, 1, 1, -5365.62255859375, -2954.108154296875, 323.754547119140625, 3.420850038528442382, 0, 0, -0.99026775360107421, 0.139175355434417724, 120, 255, 1, "", 48632, NULL), +(121573, 195528, 1, 0, 0, 1, 1, 9734.6376953125, 2253.09033203125, 1327.3465576171875, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 120, 255, 1, "", 50172, NULL), +(121574, 195529, 1, 0, 0, 1, 1, 9850.2236328125, 2307.10595703125, 1318.53759765625, 1.553341388702392578, 0, 0, 0.700908660888671875, 0.713251054286956787, 120, 255, 1, "", 48632, NULL), +(121575, 195530, 1, 0, 0, 1, 1, 9916.2939453125, 2348.201416015625, 1330.6988525390625, 3.185266733169555664, 0, 0, -0.99976158142089843, 0.021835235878825187, 120, 255, 1, "", 48632, NULL), +(12634, 164618, 0, 0, 0, 1, 1, -10995.859375, -3387.513916015625, 62.11632156372070312, 3.010695457458496093, 0, 0, 0.997859001159667968, 0.065401896834373474, 120, 255, 1, "", 50063, NULL), +(13449, 143982, 1, 0, 0, 1, 1, -443.692169189453125, -2649.07861328125, 95.77381134033203125, 0.226890549063682556, 0, 0, 0.113202095031738281, 0.993571996688842773, 120, 255, 1, "", 49345, NULL), +(13770, 142094, 0, 0, 0, 1, 1, -3793.975830078125, -838.58160400390625, 9.54323577880859375, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 50063, NULL), +(14131, 142089, 0, 0, 0, 1, 1, -10546.4755859375, -1157.3211669921875, 27.78338050842285156, 3.23760390281677246, 0, 0, -0.99884796142578125, 0.047987140715122222, 120, 255, 1, "", 50063, NULL), +(150145, 188241, 571, 0, 0, 1, 1, 4600.57470703125, -4235.314453125, 178.6544036865234375, 2.024578809738159179, 0, 0, 0.848047256469726562, 0.529920578002929687, 120, 255, 1, "", 50664, NULL), +(150736, 195467, 0, 0, 0, 1, 1, -8291.4892578125, 1196.079833984375, 5.59665679931640625, 1.605701684951782226, 0, 0, 0.719339370727539062, 0.694658815860748291, 120, 255, 1, "", 50664, NULL), +(150737, 195606, 0, 0, 0, 1, 1, -8744.5751953125, 407.27215576171875, 98.20717620849609375, 3.412121534347534179, 0, 0, -0.99086570739746093, 0.134852290153503417, 120, 255, 1, "", 50063, NULL), +(150738, 195607, 0, 0, 0, 1, 1, -8424.0458984375, 599.5169677734375, 94.69469451904296875, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 48632, NULL), +(150739, 195608, 0, 0, 0, 1, 1, -8797.541015625, 463.5186767578125, 95.81647491455078125, 4.319690704345703125, 0, 0, -0.83146953582763671, 0.555570363998413085, 120, 255, 1, "", 48632, NULL), +(150740, 195609, 0, 0, 0, 1, 1, -8662.744140625, 774.28955078125, 97.01007080078125, 2.251473426818847656, 0, 0, 0.902585029602050781, 0.430511653423309326, 120, 255, 1, "", 49345, NULL), +(150741, 195611, 0, 0, 0, 1, 1, -8712.9296875, 1013.33984375, 96.36161041259765625, 3.874636650085449218, 0, 0, -0.9335794448852539, 0.358370482921600341, 120, 255, 1, "", 50664, NULL), +(150742, 195612, 0, 0, 0, 1, 1, -8620.947265625, 929.647216796875, 99.51955413818359375, 3.865906238555908203, 0, 0, -0.9351348876953125, 0.354291886091232299, 120, 255, 1, "", 50250, NULL), +(150743, 195613, 0, 0, 0, 1, 1, -8393.654296875, 1064.357177734375, 31.63024139404296875, 3.089183330535888671, 0, 0, 0.99965667724609375, 0.026201646775007247, 120, 255, 1, "", 50664, NULL), +(150744, 195616, 0, 0, 0, 1, 1, -8724.318359375, 773.5013427734375, 98.50853729248046875, 2.556905269622802734, 0, 0, 0.957571029663085937, 0.288197338581085205, 120, 255, 1, "", 49345, NULL), +(150745, 195617, 0, 0, 0, 1, 1, -8581.619140625, 669.0135498046875, 97.92009735107421875, 1.256635904312133789, 0, 0, 0.587784767150878906, 0.809017360210418701, 120, 255, 1, "", 49345, NULL), +(150746, 195619, 0, 0, 0, 1, 1, -8498.1767578125, 654.275634765625, 100.52685546875, 2.72271275520324707, 0, 0, 0.978147506713867187, 0.207912087440490722, 120, 255, 1, "", 48632, NULL), +(150747, 195554, 1, 0, 0, 1, 1, 1657.8717041015625, -4433.03076171875, 17.48180389404296875, 5.585053920745849609, 0, 0, -0.34202003479003906, 0.939692676067352294, 120, 255, 1, "", 47720, NULL), +(150748, 195555, 1, 0, 0, 1, 1, 1574.0245361328125, -4215.53369140625, 45.16959762573242187, 4.049163341522216796, 0, 0, -0.89879417419433593, 0.438370853662490844, 120, 255, 1, "", 49345, NULL), +(150749, 195556, 1, 0, 0, 1, 1, 2076.423828125, -4824.20556640625, 23.66915321350097656, 4.956734657287597656, 0, 0, -0.61566162109375, 0.788010656833648681, 120, 255, 1, "", 50063, NULL), +(150750, 195557, 1, 0, 0, 1, 1, 1919.0592041015625, -4359.271484375, 20.73931694030761718, 3.848456144332885742, 0, 0, -0.93819046020507812, 0.346119433641433715, 120, 255, 1, "", 47720, NULL), +(150751, 195558, 1, 0, 0, 1, 1, 1720.126953125, -4406.9765625, 35.84055709838867187, 1.256635904312133789, 0, 0, 0.587784767150878906, 0.809017360210418701, 120, 255, 1, "", 47720, NULL), +(150752, 195559, 1, 0, 0, 1, 1, 1754.653076171875, -4534.02685546875, 29.03590202331542968, 4.817109584808349609, 0, 0, -0.66913032531738281, 0.74314504861831665, 120, 255, 1, "", 47720, NULL), +(150753, 195560, 1, 0, 0, 1, 1, 1768.001953125, -4320.849609375, 6.551733016967773437, 4.40695810317993164, 0, 0, -0.80644416809082031, 0.59131026268005371, 120, 255, 1, "", 47720, NULL), +(150754, 195561, 1, 0, 0, 1, 1, 1834.3509521484375, -4407.33740234375, 5.340616226196289062, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 47720, NULL), +(150755, 195562, 1, 0, 0, 1, 1, 1607.486328125, -4374.2578125, 9.76903533935546875, 3.28996133804321289, 0, 0, -0.99724960327148437, 0.074116282165050506, 120, 255, 1, "", 47720, NULL), +(151207, 186506, 571, 0, 0, 1, 1, 2476.552001953125, -5075.70654296875, 282.771820068359375, 2.993224143981933593, 0, 0, 0.997249603271484375, 0.074116282165050506, 120, 255, 1, "", 51739, NULL), +(151239, 195468, 0, 0, 0, 1, 1, -8565.5244140625, 1195.4947509765625, 5.44072580337524414, 1.527163028717041015, 0, 0, 0.6915130615234375, 0.722363948822021484, 120, 255, 1, "", 50250, NULL), +(1564, 32349, 0, 0, 0, 1, 1, -4845.779296875, -879.300537109375, 501.614166259765625, 1.649333357810974121, 0, 0, 0.73432159423828125, 0.678801715373992919, 120, 255, 1, "", 48632, NULL), +(15724, 153578, 1, 0, 0, 1, 1, -2351.58251953125, -1944.7510986328125, 95.791107177734375, 0.427604883909225463, 0, 0, 0.212177276611328125, 0.977231204509735107, 120, 255, 1, "", 50172, NULL), +(15753, 144125, 1, 0, 0, 1, 1, -1035.10791015625, -3676.033447265625, 23.06699752807617187, 2.871063947677612304, 0, 0, 0.990865707397460937, 0.134852290153503417, 120, 255, 1, "", 49345, NULL), +(15760, 164840, 0, 0, 0, 1, 1, -927.87872314453125, -3525.539306640625, 70.87708282470703125, 1.553341388702392578, 0, 0, 0.700908660888671875, 0.713251054286956787, 120, 255, 1, "", 48632, NULL), +(1620, 143981, 1, 0, 0, 1, 1, 322.408050537109375, -4706.90087890625, 14.68337535858154296, 1.038469314575195312, 0, 0, 0.4962158203125, 0.86819922924041748, 120, 255, 1, "", 48632, NULL), +(16565, 144179, 90, 0, 0, 1, 1, -547.90301513671875, 167.2587890625, -193.804351806640625, 4.729844093322753906, 0, 0, -0.70090866088867187, 0.713251054286956787, 7200, 255, 1, "", 52237, NULL), +(17022, 143988, 0, 0, 0, 1, 1, -20.3935012817382812, -929.42156982421875, 55.46469497680664062, 2.644171714782714843, 0, 0, 0.96923065185546875, 0.246154293417930603, 120, 255, 1, "", 50063, NULL), +(17101, 176324, 1, 0, 0, 1, 1, -5464.3681640625, -2450.802001953125, 89.24736785888671875, 3.516837835311889648, 0, 0, -0.98245048522949218, 0.186523601412773132, 120, 255, 1, "", 49345, NULL), +(17424, 143987, 0, 0, 0, 1, 1, -852.20269775390625, -546.710205078125, 10.93239021301269531, 4.738570213317871093, 0, 0, -0.69779014587402343, 0.716302275657653808, 120, 255, 1, "", 50063, NULL), +(17473, 144112, 1, 0, 0, 1, 1, -7154.40087890625, -3829.517822265625, 8.750293731689453125, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 120, 255, 1, "", 49345, NULL), +(20420, 143984, 1, 0, 0, 1, 1, -2338.213623046875, -367.14251708984375, -8.52861213684082031, 2.67034769058227539, 0, 0, 0.972369194030761718, 0.233448356389999389, 120, 255, 1, "", 48632, NULL), +(20426, 143985, 1, 0, 0, 1, 1, -1263.310791015625, 44.54513931274414062, 127.5445709228515625, 4.729844093322753906, 0, 0, -0.70090866088867187, 0.713251054286956787, 120, 255, 1, "", 48632, NULL), +(20492, 182950, 530, 0, 0, 1, 1, -2046.0069580078125, -11876.2236328125, 46.57349014282226562, 2.818698406219482421, 0, 0, 0.986995697021484375, 0.160746723413467407, 120, 255, 1, "", 50063, NULL), +(20534, 183042, 530, 0, 0, 1, 1, 288.03472900390625, 6082.4990234375, 131.550689697265625, 2.923415660858154296, 0, 0, 0.994055747985839843, 0.108872212469577789, 120, 255, 1, "", 49345, NULL), +(21722, 181380, 530, 0, 0, 1, 1, -706.5538330078125, 2700.935791015625, 94.53797149658203125, 1.494295954704284667, 0, 0, 0.679549217224121093, 0.733629941940307617, 120, 255, 1, "", 49345, NULL), +(21723, 181381, 530, 0, 0, 1, 1, 172.7256927490234375, 2623.0556640625, 86.83609771728515625, 3.569828033447265625, 0, 0, -0.97716426849365234, 0.212485253810882568, 120, 255, 1, "", 50063, NULL), +(22398, 181980, 530, 0, 0, 1, 1, 8719.9267578125, -6665.38916015625, 70.2157440185546875, 2.757623195648193359, 0, 0, 0.981627464294433593, 0.190807580947875976, 120, 255, 1, "", 50664, NULL), +(22851, 182356, 530, 0, 0, 1, 1, 9548.134765625, -7263.0068359375, 14.11757087707519531, 4.694939613342285156, 0, 0, -0.71324920654296875, 0.700910508632659912, 120, 255, 1, "", 48632, NULL), +(22852, 182357, 530, 0, 0, 1, 1, 9515.6630859375, -7262.47216796875, 14.19133853912353515, 4.729841232299804687, 0, 0, -0.70090961456298828, 0.71325010061264038, 120, 255, 1, "", 48632, NULL), +(22853, 182359, 530, 0, 0, 1, 1, 9500.134765625, -6842.25, 16.40702056884765625, 1.754055619239807128, 0, 0, 0.768841743469238281, 0.639439105987548828, 120, 255, 1, "", 48632, NULL), +(22854, 182360, 530, 0, 0, 1, 1, 9624.4814453125, -7404.205078125, 13.62501907348632812, 4.712389945983886718, 0, 0, -0.70710659027099609, 0.707106947898864746, 120, 255, 1, "", 49345, NULL), +(22855, 182361, 530, 0, 0, 1, 1, 9743.9580078125, -7466.10400390625, 13.5187997817993164, 3.865906238555908203, 0, 0, -0.9351348876953125, 0.354291886091232299, 120, 255, 1, "", 49345, NULL), +(22856, 182362, 530, 0, 0, 1, 1, 9651.7392578125, -7403.69091796875, 13.62811183929443359, 4.694933891296386718, 0, 0, -0.71325111389160156, 0.700908601284027099, 120, 255, 1, "", 48632, NULL), +(22857, 182363, 530, 0, 0, 1, 1, 9918.849609375, -7226.41162109375, 30.73390007019042968, 1.867502212524414062, 0, 0, 0.803856849670410156, 0.594822824001312255, 120, 255, 1, "", 48632, NULL), +(22858, 182364, 530, 0, 0, 1, 1, 9709.3564453125, -7308.94091796875, 24.71313285827636718, 2.556905269622802734, 0, 0, 0.957571029663085937, 0.288197338581085205, 120, 255, 1, "", 48632, NULL), +(22859, 182365, 530, 0, 0, 1, 1, 9804.517578125, -7400.15283203125, 13.62031078338623046, 0.008724239654839038, 0, 0, 0.004362106323242187, 0.999990463256835937, 120, 255, 1, "", 49345, NULL), +(22871, 182391, 530, 0, 0, 1, 1, -1267.7100830078125, 7175.015625, 57.30986785888671875, 0.89884275197982788, 0, 0, 0.434444427490234375, 0.900698602199554443, 120, 255, 1, "", 50063, NULL), +(23173, 182567, 530, 0, 0, 1, 1, 258.90972900390625, 7870.71728515625, 23.01399421691894531, 5.034697532653808593, 0, 0, -0.58448410034179687, 0.811405181884765625, 120, 255, 1, "", 49345, NULL), +(23802, 182939, 530, 0, 0, 1, 1, -2929.392333984375, 4008.915771484375, -1.38916504383087158, 3.673924207687377929, 0, 0, -0.96478652954101562, 0.263034075498580932, 120, 255, 1, "", 49345, NULL), +(23859, 182946, 530, 0, 0, 1, 1, -2985.4775390625, 2567.935791015625, 76.5433502197265625, 4.267611980438232421, 0, 0, -0.84565258026123046, 0.533733725547790527, 120, 255, 1, "", 50063, NULL), +(23861, 182948, 530, 0, 0, 1, 1, -4147.99462890625, -12490.40625, 44.31752777099609375, 3.682650327682495117, 0, 0, -0.96362972259521484, 0.26724100112915039, 120, 255, 1, "", 48632, NULL), +(23862, 182949, 530, 0, 0, 1, 1, -4055.44091796875, -11904.59765625, -1.986083984375, 3.159062385559082031, 0, 0, -0.99996185302734375, 0.008734640665352344, 120, 255, 1, "", 48632, NULL), +(23900, 182955, 530, 0, 0, 1, 1, -2673.138916015625, 7288.91845703125, 36.85296630859375, 4.310963630676269531, -0.05280876159667968, 0.111169815063476562, -0.8263702392578125, 0.549513161182403564, 120, 255, 1, "", 50063, NULL), +(23953, 183037, 530, 0, 0, 1, 1, -596.53125, 4151.74853515625, 65.4322357177734375, 4.956737518310546875, 0.000751972198486328, -0.00612449645996093, -0.61563396453857421, 0.788008093833923339, 120, 255, 1, "", 50664, NULL), +(23954, 183038, 530, 0, 0, 1, 1, 195.2725677490234375, 4326.39404296875, 116.8954010009765625, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 49345, NULL), +(23955, 183040, 530, 0, 0, 1, 1, 1029.8680419921875, 7362.12939453125, 36.40353775024414062, 2.015855789184570312, 0, 0, 0.845727920532226562, 0.533614337444305419, 120, 255, 1, "", 50664, NULL), +(23990, 183047, 530, 0, 0, 1, 1, 4122.46875, 3057.693603515625, 339.356781005859375, 1.946041464805603027, 0, 0, 0.826589584350585937, 0.56280517578125, 120, 255, 1, "", 50664, NULL), +(24053, 183167, 530, 0, 0, 1, 1, -2615.288330078125, 4417.97119140625, 35.98839187622070312, 1.370081901550292968, 0, 0, 0.632704734802246093, 0.774393141269683837, 120, 255, 1, "", 50063, NULL), +(24717, 183856, 530, 0, 0, 1, 1, -3975.03759765625, -11700.0205078125, -139.257614135742187, 3.141570329666137695, -0.00587272644042968, -0.0018930435180664, 0.999980926513671875, 0, 120, 255, 1, "", 48632, NULL), +(24718, 183857, 530, 0, 0, 1, 1, -3913.078369140625, -11605.9912109375, -138.353134155273437, 4.473990917205810546, 0.005786895751953125, -0.00214099884033203, -0.78617191314697265, 0.617977082729339599, 120, 255, 1, "", 48632, NULL), +(24719, 183858, 530, 0, 0, 1, 1, -3803.274169921875, -11688.873046875, -105.384963989257812, 2.956346750259399414, -0.00567293167114257, -0.0024271011352539, 0.995696067810058593, 0.092472918331623077, 120, 255, 1, "", 48632, NULL), +(25004, 184085, 530, 0, 0, 1, 1, 3056.501708984375, 3687.03466796875, 142.7493133544921875, 3.735011100769042968, -0.00874757766723632, -0.07558345794677734, -0.95290660858154296, 0.293563634157180786, 120, 255, 1, "", 50063, NULL), +(25034, 184133, 530, 0, 0, 1, 1, -2175.96533203125, 5411.55126953125, 50.22069168090820312, 3.586656570434570312, 0, 0, -0.975341796875, 0.220699742436408996, 120, 255, 1, "", 49345, NULL), +(25035, 184134, 530, 0, 0, 1, 1, -1887.6666259765625, 5769.12060546875, 129.5399017333984375, 2.757613182067871093, 0, 0, 0.981626510620117187, 0.190812408924102783, 120, 255, 1, "", 50063, NULL), +(25036, 184135, 530, 0, 0, 1, 1, -2034.0867919921875, 5336.11279296875, -9.37981128692626953, 3.70009779930114746, 0, 0, -0.96126174926757812, 0.275637149810791015, 120, 255, 1, "", 49345, NULL), +(25037, 184136, 530, 0, 0, 1, 1, -2041.19970703125, 5350.26123046875, -9.38034439086914062, 3.490667104721069335, 0, 0, -0.98480701446533203, 0.173652306199073791, 120, 255, 1, "", 49345, NULL), +(25038, 184137, 530, 0, 0, 1, 1, -1694.7603759765625, 5522.42529296875, -9.81281185150146484, 3.752462387084960937, 0, 0, -0.95371627807617187, 0.300707906484603881, 120, 255, 1, "", 49345, NULL), +(25039, 184138, 530, 0, 0, 1, 1, -1687.7864990234375, 5508.5224609375, -9.80751228332519531, 3.447027206420898437, 0, 0, -0.98836135864257812, 0.152124300599098205, 120, 255, 1, "", 49345, NULL), +(25040, 184139, 530, 0, 0, 1, 1, -1897.9478759765625, 5158.58056640625, -40.2316780090332031, 3.874636650085449218, 0, 0, -0.9335794448852539, 0.358370482921600341, 120, 255, 1, "", 49345, NULL), +(25041, 184140, 530, 0, 0, 1, 1, -1773.6771240234375, 5171.82470703125, -40.2134323120117187, 2.242745637893676757, 0, 0, 0.900697708129882812, 0.434446364641189575, 120, 255, 1, "", 49345, NULL), +(25046, 184147, 530, 0, 0, 1, 1, 2083.6494140625, 6879.58154296875, 180.3868408203125, 3.926990509033203125, 0, 0, -0.92387962341308593, 0.382683247327804565, 120, 255, 1, "", 50063, NULL), +(25047, 184148, 530, 0, 0, 1, 1, 2392.8525390625, 5987.0625, 151.738525390625, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 50063, NULL), +(25341, 184490, 530, 0, 0, 1, 1, -3009.2431640625, 850.86981201171875, -10.5309038162231445, 3.656470775604248046, -0.01951789855957031, -0.04571723937988281, -0.96554374694824218, 0.255449146032333374, 120, 255, 1, "", 50664, NULL), +(25454, 184652, 530, 0, 0, 1, 1, -4055.28125, 2177.048583984375, 110.3008880615234375, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 50063, NULL), +(25833, 184944, 530, 0, 0, 1, 1, 1935.921875, 5544.75146484375, 266.741851806640625, 5.201082706451416015, 0, 0, -0.51503753662109375, 0.857167601585388183, 120, 255, 1, "", 50664, NULL), +(25969, 185102, 530, 0, 0, 1, 1, -4081.75341796875, 1132.140625, 43.03768539428710937, 1.413715124130249023, 0, 0, 0.649447441101074218, 0.760406434535980224, 120, 255, 1, "", 50664, NULL), +(26175, 185472, 530, 0, 0, 1, 1, 9720.4638671875, -7199.421875, 14.22868156433105468, 5.113816738128662109, 0, 0, -0.55193614959716796, 0.833886384963989257, 120, 255, 1, "", 48632, NULL), +(26176, 185473, 530, 0, 0, 1, 1, 9657.6630859375, -7116.189453125, 14.28754901885986328, 4.27606058120727539, 0, 0, -0.84339046478271484, 0.537301182746887207, 120, 255, 1, "", 51943, NULL), +(26387, 144131, 0, 0, 0, 1, 1, -8876.982421875, 652.0072021484375, 95.9927215576171875, 5.07018136978149414, 0, 0, -0.56999683380126953, 0.821646869182586669, 120, 255, 1, "", 48632, NULL), +(26463, 144128, 0, 0, 0, 1, 1, -8637.4794921875, 427.74847412109375, 102.0831451416015625, 2.251473426818847656, 0, 0, 0.902585029602050781, 0.430511653423309326, 120, 255, 1, "", 50063, NULL), +(26784, 142075, 0, 0, 0, 1, 1, -9455.9892578125, 45.82291793823242187, 56.43953323364257812, 1.404989838600158691, 0, 0, 0.646123886108398437, 0.763232588768005371, 120, 255, 1, "", 48632, NULL), +(268682, 177044, 0, 0, 0, 1, 1, 1633.0244140625, 219.280609130859375, -43.1118049621582031, 1.082102894783020019, 0, 0, 0.51503753662109375, 0.857167601585388183, 120, 255, 1, "", 49345, NULL), +(268683, 195629, 0, 0, 0, 1, 1, 1554.9732666015625, 235.1077728271484375, -43.2009544372558593, 0.252435922622680664, 0, 0, 0.125883102416992187, 0.992045104503631591, 120, 255, 1, "", 49345, NULL), +(27147, 181883, 530, 0, 0, 1, 1, 7579.02001953125, -6860.11962890625, 93.34931182861328125, 4.328416347503662109, 0, 0, -0.82903766632080078, 0.559192776679992675, 120, 255, 1, "", 48632, NULL), +(27845, 187113, 530, 0, 0, 1, 1, 12792.7744140625, -6965.97802734375, 15.40067386627197265, 2.251473426818847656, 0, 0, 0.902585029602050781, 0.430511653423309326, 120, 255, 1, "", 50063, NULL), +(29365, 157637, 0, 0, 0, 1, 1, -10464.0439453125, -3265.2587890625, 20.17782783508300781, 1.396264195442199707, 0, 0, 0.642787933349609375, 0.766044199466705322, 120, 255, 1, "", 50063, NULL), +(30400, 183039, 530, 0, 0, 1, 1, -198.708328247070312, 5507.98681640625, 22.26667213439941406, 3.43830275535583496, 0, 0, -0.98901557922363281, 0.147811368107795715, 120, 255, 1, "", 51943, NULL), +(30852, 185477, 530, 0, 0, 1, 1, 3019.47314453125, 5450.02099609375, 146.65374755859375, 3.307402372360229492, 0.033659934997558593, -0.03657913208007812, -0.99543190002441406, 0.081512629985809326, 120, 255, 1, "", 50664, NULL), +(32101, 153716, 0, 0, 0, 1, 1, -10644.5146484375, 1158.03759765625, 33.13823318481445312, 2.556905269622802734, 0, 0, 0.957571029663085937, 0.288197338581085205, 120, 255, 1, "", 49345, NULL), +(32537, 179896, 1, 0, 0, 1, 1, -1609.19970703125, 3118.862060546875, 44.829315185546875, 3.892086982727050781, 0, 0, -0.93041706085205078, 0.366502493619918823, 120, 255, 1, "", 50063, NULL), +(32540, 176319, 1, 0, 0, 1, 1, 248.11822509765625, 1291.649658203125, 190.39178466796875, 3.420850038528442382, 0, 0, -0.99026775360107421, 0.139175355434417724, 120, 255, 1, "", 50063, NULL), +(33370, 143989, 0, 0, 0, 1, 1, 503.972320556640625, 1626.9268798828125, 125.6075973510742187, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 50063, NULL), +(42497, 142093, 0, 0, 0, 1, 1, -9248.4130859375, -2144.225830078125, 63.9334259033203125, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 50063, NULL), +(42900, 144130, 0, 0, 0, 1, 1, -8797.42578125, 1083.4786376953125, 90.20792388916015625, 5.436702728271484375, 0, 0, -0.41071796417236328, 0.911762416362762451, 120, 255, 1, "", 50664, NULL), +(42913, 144129, 0, 0, 0, 1, 1, -9035.40625, 844.06689453125, 106.9599990844726562, 0.436331570148468017, 0, 0, 0.216439247131347656, 0.976296067237854003, 120, 255, 1, "", 49345, NULL), +(44775, 143990, 0, 0, 0, 1, 1, 2238.5625, 254.50347900390625, 34.00535964965820312, 2.967041015625, 0, 0, 0.996193885803222656, 0.087165042757987976, 120, 255, 1, "", 47720, NULL), +(45603, 181236, 0, 0, 0, 1, 1, 2289.5556640625, -5318.34716796875, 88.64002227783203125, 2.357861518859863281, 0, 0, 0.924198150634765625, 0.381913274526596069, 120, 255, 1, "", 48632, NULL), +(46048, 144011, 0, 0, 0, 1, 1, 293.6279296875, -2115.567626953125, 121.7698822021484375, 3.316144466400146484, 0, 0, -0.99619388580322265, 0.087165042757987976, 120, 255, 1, "", 50063, NULL), +(46054, 179895, 0, 0, 0, 1, 1, -599.54339599609375, -4610.392578125, 9.731907844543457031, 5.834193229675292968, 0, 0, -0.22261524200439453, 0.974906384944915771, 120, 255, 1, "", 48632, NULL), +(47458, 143983, 1, 0, 0, 1, 1, 925.94085693359375, 901.49163818359375, 104.9693069458007812, 1.256635904312133789, 0, 0, 0.587784767150878906, 0.809017360210418701, 120, 255, 1, "", 50063, NULL), +(47593, 181639, 1, 0, 0, 1, 1, 2681.9345703125, 1487.064697265625, 233.9166412353515625, 4.803250312805175781, 0, 0, -0.67426395416259765, 0.738490462303161621, 120, 255, 1, "", 50664, NULL), +(47829, 142117, 1, 0, 0, 1, 1, 2742.4716796875, -395.14398193359375, 108.8573837280273437, 2.775068521499633789, 0, 0, 0.983254432678222656, 0.182238012552261352, 120, 255, 1, "", 50063, NULL), +(48037, 178864, 1, 0, 0, 1, 1, 2332.56298828125, -2545.971923828125, 101.6266632080078125, 3.935721635818481445, 0, 0, -0.92220020294189453, 0.386712819337844848, 120, 255, 1, "", 49345, NULL), +(48629, 142111, 1, 0, 0, 1, 1, 6423.6181640625, 497.105377197265625, 7.670820236206054687, 2.801248550415039062, 0, 0, 0.985555648803710937, 0.169351965188980102, 120, 255, 1, "", 48632, NULL), +(48827, 187260, 1, 0, 0, 1, 1, 5103.54150390625, -360.51910400390625, 357.0400390625, 3.490667104721069335, 0, 0, -0.98480701446533203, 0.173652306199073791, 120, 255, 1, "", 51943, NULL), +(48996, 176404, 1, 0, 0, 1, 1, 6705.10498046875, -4667.3505859375, 721.59991455078125, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 49345, NULL), +(49429, 180451, 1, 0, 0, 1, 1, -6840.3046875, 734.941650390625, 42.1886749267578125, 1.27409064769744873, 0, 0, 0.594822883605957031, 0.80385679006576538, 120, 255, 1, "", 50063, NULL), +(49531, 142109, 1, 0, 0, 1, 1, 9848.27734375, 957.2960205078125, 1306.790283203125, 3.481936931610107421, 0, 0, -0.98555564880371093, 0.169351965188980102, 120, 255, 1, "", 48632, NULL), +(49532, 142110, 1, 0, 0, 1, 1, 9942.998046875, 2497.741455078125, 1317.6929931640625, 3.630291461944580078, 0, 0, -0.97029495239257812, 0.241925001144409179, 120, 255, 1, "", 48632, NULL), +(49832, 188123, 1, 0, 0, 1, 1, 10122.1181640625, 2227.40283203125, 1328.18701171875, 3.78736734390258789, 0, 0, -0.94832324981689453, 0.317305892705917358, 120, 255, 1, "", 50172, NULL), +(49947, 142119, 1, 0, 0, 1, 1, -4396.26513671875, 3269.04736328125, 11.92736625671386718, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 50063, NULL), +(50044, 143986, 1, 0, 0, 1, 1, -4405.3681640625, 237.6770782470703125, 26.76781082153320312, 2.286378860473632812, 0, 0, 0.909960746765136718, 0.414694398641586303, 120, 255, 1, "", 50063, NULL), +(516, 171556, 0, 0, 0, 1, 1, -4949.82275390625, -1277.37158203125, 501.583404541015625, 2.530723094940185546, 0, 0, 0.953716278076171875, 0.300707906484603881, 120, 255, 1, "", 48632, NULL), +(52, 171752, 0, 0, 0, 1, 1, -4828.27783203125, -1285.0472412109375, 501.80706787109375, 2.260197162628173828, 0, 0, 0.904454231262207031, 0.426570683717727661, 120, 255, 1, "", 50063, NULL), +(55701, 189969, 571, 0, 0, 1, 1, 2676.614501953125, -4381.533203125, 283.96075439453125, 2.713986396789550781, 0, 0, 0.977231025695800781, 0.212178006768226623, 120, 255, 1, "", 50664, NULL), +(55927, 193043, 571, 0, 0, 1, 1, 5462.18310546875, -2599.90966796875, 306.817169189453125, 1.48352813720703125, 0, 0, 0.675589561462402343, 0.737277925014495849, 120, 255, 1, "", 50172, NULL), +(55966, 193044, 571, 0, 0, 1, 1, 5417.15478515625, -2620.260498046875, 307.008758544921875, 6.19592142105102539, 0, 0, -0.04361820220947265, 0.999048292636871337, 120, 255, 1, "", 50172, NULL), +(55975, 193045, 571, 0, 0, 1, 1, 5483.01416015625, -2644.76220703125, 307.0357666015625, 6.265731334686279296, 0, 0, -0.00872707366943359, 0.999961912631988525, 120, 255, 1, "", 50172, NULL), +(56563, 191521, 571, 0, 0, 1, 1, 6126.4755859375, -1070.9478759765625, 403.10333251953125, 4.502951622009277343, 0, 0, -0.7771453857421875, 0.629321098327636718, 120, 255, 1, "", 50172, NULL), +(56726, 188710, 571, 0, 0, 1, 1, 442.130218505859375, -4555.77587890625, 245.471466064453125, 3.342307567596435546, 0, 0, -0.99496841430664062, 0.100189015269279479, 120, 255, 1, "", 47720, NULL), +(56975, 193071, 571, 0, 0, 1, 1, 5812.95556640625, 508.35467529296875, 657.38323974609375, 4.677483558654785156, 0, 0, -0.71933937072753906, 0.694658815860748291, 120, 255, 1, "", 48632, NULL), +(57535, 186687, 571, 0, 0, 1, 1, 1887.1007080078125, -6172.91650390625, 23.70248794555664062, 1.073378324508666992, 0, 0, 0.511293411254882812, 0.859406232833862304, 120, 255, 1, "", 50664, NULL), +(57604, 186435, 571, 0, 0, 1, 1, 1419.09033203125, -3265.8125, 165.23553466796875, 2.548179388046264648, 0, 0, 0.956304550170898437, 0.292372345924377441, 120, 255, 1, "", 50664, NULL), +(57696, 188486, 571, 0, 0, 1, 1, 570.65802001953125, -4935.9462890625, 18.43669700622558593, 5.497788906097412109, 0, 0, -0.38268280029296875, 0.923879802227020263, 120, 255, 1, "", 50664, NULL), +(58222, 188256, 571, 0, 0, 1, 1, 3862.33154296875, -4548.84033203125, 209.4533233642578125, 2.888511419296264648, 0, 0, 0.99200439453125, 0.126203224062919616, 120, 255, 1, "", 50664, NULL), +(59045, 188531, 571, 0, 0, 1, 1, 3225.0634765625, -690.50518798828125, 167.1182403564453125, 0.069813184440135955, 0.004359722137451171, -0.00019073486328125, 0.034900665283203125, 0.999381244182586669, 120, 255, 1, "", 50664, NULL), +(59093, 188534, 571, 0, 0, 1, 1, 3474.537353515625, 2005.07470703125, 64.8327178955078125, 2.391098499298095703, 0, 0, 0.930417060852050781, 0.366502493619918823, 120, 255, 1, "", 49345, NULL), +(59214, 188541, 571, 0, 0, 1, 1, 3400.859130859375, -2811.433349609375, 200.4548797607421875, 4.424411773681640625, 0, 0, -0.80125331878662109, 0.598325252532958984, 120, 255, 1, "", 50172, NULL), +(59314, 187268, 571, 0, 0, 1, 1, 4166.265625, 5286.08349609375, 26.35922050476074218, 0.305430829524993896, 0, 0, 0.15212249755859375, 0.988361656665802001, 120, 255, 1, "", 50664, NULL), +(59451, 194492, 571, 0, 0, 1, 1, 8592.5283203125, 693.717041015625, 547.2921142578125, 2.382372379302978515, 0, 0, 0.928809165954589843, 0.370558410882949829, 120, 255, 1, "", 50172, NULL), +(59543, 189328, 571, 0, 0, 1, 1, 737.453125, -2920.482666015625, 7.280445098876953125, 5.6897735595703125, 0, 0, -0.29237174987792968, 0.956304728984832763, 120, 255, 1, "", 47720, NULL), +(59565, 189329, 571, 0, 0, 1, 1, 4502.22314453125, 5716.38037109375, 81.48361968994140625, 3.307414531707763671, 0, 0, -0.99656486511230468, 0.082815870642662048, 120, 255, 1, "", 47720, NULL), +(59746, 194788, 571, 0, 0, 1, 1, 8452.8173828125, 683.8055419921875, 547.28314208984375, 3.804818391799926757, 0, 0, -0.94551849365234375, 0.325568377971649169, 120, 255, 1, "", 50172, NULL), +(60040, 187316, 571, 0, 0, 1, 1, 2262.991455078125, 5196.11572265625, 12.07118797302246093, 1.213003993034362792, 0, 0, 0.569996833801269531, 0.821646869182586669, 120, 255, 1, "", 50664, NULL), +(60041, 193972, 571, 0, 0, 1, 1, 8440.736328125, -329.427093505859375, 906.50616455078125, 0.715582847595214843, 0, 0, 0.350206375122070312, 0.936672568321228027, 120, 255, 1, "", 50664, NULL), +(60074, 192952, 571, 0, 0, 1, 1, 5563.18603515625, 5759.63134765625, -75.2276840209960937, 4.712389945983886718, 0, 0, -0.70710659027099609, 0.707106947898864746, 120, 255, 1, "", 49345, NULL), +(60111, 187322, 571, 0, 0, 1, 1, 3458.64404296875, 4132.48876953125, 15.04328441619873046, 1.562069892883300781, 0, 0, 0.704014778137207031, 0.71018528938293457, 120, 255, 1, "", 47720, NULL), +(60214, 188604, 571, 0, 0, 1, 1, 2790.482666015625, 917.82464599609375, 22.41530799865722656, 5.12254190444946289, 0, 0, -0.54829311370849609, 0.83628624677658081, 120, 255, 1, "", 51739, NULL), +(60310, 188355, 571, 0, 0, 1, 1, 3827.8056640625, 1533.657958984375, 89.6991729736328125, 1.640609622001647949, 0, 0, 0.731353759765625, 0.681998312473297119, 120, 255, 1, "", 50172, NULL), +(60320, 194147, 571, 0, 0, 1, 1, 5763.82275390625, 726.92926025390625, 618.58465576171875, 0.087265998125076293, 0, 0, 0.043619155883789062, 0.999048233032226562, 120, 255, 1, "", 48632, NULL), +(60433, 188618, 571, 0, 0, 1, 1, 3240.612060546875, -2236.583251953125, 115.105987548828125, 3.159062385559082031, 0, 0, -0.99996185302734375, 0.008734640665352344, 120, 255, 1, "", 50172, NULL), +(60436, 191946, 571, 0, 0, 1, 1, 5853.01953125, 669.45123291015625, 644.25738525390625, 4.398232460021972656, 0, 0, -0.80901622772216796, 0.587786316871643066, 120, 255, 1, "", 48632, NULL), +(60445, 191947, 571, 0, 0, 1, 1, 5862.66650390625, 638.68426513671875, 647.15972900390625, 5.916666030883789062, 0, 0, -0.1822357177734375, 0.983254849910736083, 120, 255, 1, "", 48632, NULL), +(60454, 191948, 571, 0, 0, 1, 1, 5917.0400390625, 616.7635498046875, 646.29388427734375, 5.820673465728759765, 0, 0, -0.22920036315917968, 0.973379254341125488, 120, 255, 1, "", 48632, NULL), +(60469, 191949, 571, 0, 0, 1, 1, 5927.66796875, 644.7076416015625, 645.5087890625, 5.986480236053466796, 0, 0, -0.14780902862548828, 0.989015936851501464, 120, 255, 1, "", 48632, NULL), +(60479, 191950, 571, 0, 0, 1, 1, 5893.23486328125, 528.2362060546875, 641.39501953125, 5.017822265625, 0, 0, -0.5913095474243164, 0.806444704532623291, 120, 255, 1, "", 48632, NULL), +(60509, 191951, 571, 0, 0, 1, 1, 5690.9208984375, 681.9393310546875, 646.130859375, 5.742133140563964843, 0, 0, -0.26723861694335937, 0.963630378246307373, 120, 255, 1, "", 48632, NULL), +(60519, 191952, 571, 0, 0, 1, 1, 5740.30419921875, 680.889404296875, 644.65704345703125, 5.785767555236816406, 0, 0, -0.24615287780761718, 0.969231009483337402, 120, 255, 1, "", 48632, NULL), +(60545, 191953, 571, 0, 0, 1, 1, 5734.775390625, 744.04644775390625, 641.73516845703125, 0.881391823291778564, 0, 0, 0.426568984985351562, 0.904455006122589111, 120, 255, 1, "", 48632, NULL), +(60554, 191954, 571, 0, 0, 1, 1, 5743.07763671875, 626.9576416015625, 648.4044189453125, 0.27925160527229309, 0, 0, 0.139172554016113281, 0.990268170833587646, 120, 255, 1, "", 48632, NULL), +(60563, 191955, 571, 0, 0, 1, 1, 5886.2646484375, 716.32843017578125, 640.5423583984375, 0.349065244197845458, 0, 0, 0.173647880554199218, 0.984807789325714111, 120, 255, 1, "", 48632, NULL), +(60576, 191956, 571, 0, 0, 1, 1, 5800.7392578125, 731.10186767578125, 640.4296875, 4.721115589141845703, 0, 0, -0.70401477813720703, 0.71018528938293457, 120, 255, 1, "", 48632, NULL), +(60591, 191957, 571, 0, 0, 1, 1, 5797.9052734375, 558.436279296875, 650.71917724609375, 4.363324165344238281, 0, 0, -0.81915187835693359, 0.573576688766479492, 120, 255, 1, "", 48632, NULL), +(60953, 194016, 571, 0, 0, 1, 1, 6677.02587890625, -202.756942749023437, 951.6678466796875, 5.131268978118896484, 0, 0, -0.54463863372802734, 0.838670849800109863, 120, 255, 1, "", 50664, NULL), +(61662, 191228, 571, 0, 0, 1, 1, 3000.864501953125, 4067.616455078125, 26.89543533325195312, 1.239183306694030761, 0, 0, 0.580702781677246093, 0.814115643501281738, 120, 255, 1, "", 49345, NULL), +(61819, 193791, 571, 0, 0, 1, 1, 7809.5849609375, -2956.826416015625, 1257.4970703125, 0.942478775978088378, 0, 0, 0.453990936279296875, 0.891006350517272949, 120, 255, 1, "", 50664, NULL), +(62014, 193030, 571, 0, 0, 1, 1, 6402.078125, 457.835845947265625, 511.9805908203125, 4.398232460021972656, 0, 0, -0.80901622772216796, 0.587786316871643066, 120, 255, 1, "", 50172, NULL), +(62980, 194027, 571, 0, 0, 1, 1, 8415.34765625, 2696.229248046875, 655.0931396484375, 1.796540141105651855, 0, 0, 0.782250404357910156, 0.622964143753051757, 120, 255, 1, "", 50664, NULL), +(63134, 191832, 571, 0, 0, 1, 1, 2789.627685546875, 6148.1201171875, 84.58600616455078125, 0.724311470985412597, 0, 0, 0.354290962219238281, 0.935135245323181152, 120, 255, 1, "", 47720, NULL), +(66065, 190914, 609, 0, 0, 1, 1, 2113.5400390625, -5796.0625, 99.71340179443359375, 0.671950221061706542, -0.0012969970703125, 0.0041656494140625, 0.329686164855957031, 0.944080471992492675, 120, 255, 1, "", 50664, NULL), +(66357, 190915, 609, 0, 0, 1, 4, 2113.588623046875, -5796.01904296875, 99.69663238525390625, 3.883359670639038085, 0.014132976531982421, -0.00137233734130859, -0.93194293975830078, 0.362326800823211669, 120, 255, 1, "", 50664, NULL), +(66633, 188682, 571, 0, 0, 1, 1, 3668.736083984375, -703.61456298828125, 214.52703857421875, 4.616398334503173828, -0.00070858001708984, -0.00169086456298828, -0.74021530151367187, 0.672367453575134277, 120, 255, 1, "", 50664, NULL), +(7555, 142095, 1, 0, 0, 1, 1, -3618.420166015625, -4437.94091796875, 13.45739459991455078, 3.141592741012573242, 0, 0, -1, 0, 120, 255, 1, "", 49345, NULL), +(7574, 186629, 1, 0, 0, 1, 1, -3158.546630859375, -2894.1171875, 33.67470169067382812, 2.827429771423339843, 0, 0, 0.987688064575195312, 0.156436234712600708, 120, 255, 1, "", 50172, NULL), +(7597, 186230, 1, 0, 0, 1, 1, -4599.271484375, -3178.7314453125, 34.8251190185546875, 0.078540004789829254, 0, 0, 0.039259910583496093, 0.999229073524475097, 120, 255, 1, "", 50172, NULL), +(866, 171699, 0, 0, 0, 1, 1, -4910.3818359375, -976.211669921875, 501.40789794921875, 2.268925428390502929, 0, 0, 0.906307220458984375, 0.422619491815567016, 120, 255, 1, "", 48632, NULL), +(92053, 195218, 1, 0, 0, 1, 1, 8008.7421875, -2668.053955078125, 512.06414794921875, 2.757613182067871093, 0, 0, 0.981626510620117187, 0.190812408924102783, 120, 255, 1, "", 50664, NULL); + +-- new spawns +DELETE FROM `gameobject` WHERE (`id` IN (185965, 188132, 195219, 195605, 195620)) AND (`guid` BETWEEN 929 AND 933); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES +(929, 185965, 530, 0, 0, 1, 1, 2511.02783203125, 7346.34130859375, 380.741790771484375, 3.586656570434570312, 0, 0, -0.975341796875, 0.220699742436408996, 120, 255, 1, "", 52237, NULL), +(930, 188132, 530, 0, 0, 1, 1, 2209.026123046875, 4735.65625, 159.667083740234375, 3.586656570434570312, 0, 0, -0.975341796875, 0.220699742436408996, 120, 255, 1, "", 50664, NULL), +(931, 195219, 1, 0, 0, 1, 1, 7867.26904296875, -2575.546875, 486.91259765625, 3.24634718894958496, 0, 0, -0.99862861633300781, 0.052353221923112869, 120, 255, 1, "", 49345, NULL), +(932, 195605, 0, 0, 0, 1, 1, -8559.0166015625, 457.105499267578125, 104.6490020751953125, 1.946041464805603027, 0, 0, 0.826589584350585937, 0.56280517578125, 120, 255, 1, "", 48632, NULL), +(933, 195620, 0, 0, 0, 1, 1, -8753.294921875, 565.23223876953125, 97.53444671630859375, 2.373644113540649414, 0, 0, 0.927183151245117187, 0.37460830807685852, 120, 255, 1, "", 48632, NULL); + +-- remove duplicate / invalid spawns +DELETE FROM `gameobject` WHERE (`id` IN (173221, 177044, 185471)) AND (`guid` IN (31694, 268684, 268687, 268685, 268686, 26174)); +DELETE FROM `gameobject_addon` WHERE (`guid` IN (31694, 268684, 268687, 268685, 268686, 26174)); +DELETE FROM `game_event_gameobject` WHERE (`guid` IN (31694, 268684, 268687, 268685, 268686, 26174)); From 88beea55e0fa96417903efd8103382515c1c1d3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jan 2024 10:12:22 +0000 Subject: [PATCH 07/33] chore(DB): import pending files Referenced commit(s): d80e7d5cb438d15d22a74afa83df2ecc26aede45 --- .../rev_1703711417382340800.sql => db_world/2024_01_01_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1703711417382340800.sql => db_world/2024_01_01_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/rev_1703711417382340800.sql b/data/sql/updates/db_world/2024_01_01_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/rev_1703711417382340800.sql rename to data/sql/updates/db_world/2024_01_01_00.sql index 4492001ed..de97da0cb 100644 --- a/data/sql/updates/pending_db_world/rev_1703711417382340800.sql +++ b/data/sql/updates/db_world/2024_01_01_00.sql @@ -1,3 +1,4 @@ +-- DB update 2023_12_30_00 -> 2024_01_01_00 -- Update all 'Mailbox' gameobjects with sniffed values -- updated spawns DELETE FROM `gameobject` From b2fcc1babf11a767db55c254d64b2dae2a3f913a Mon Sep 17 00:00:00 2001 From: Alethrion <54462221+Alethrion@users.noreply.github.com> Date: Mon, 1 Jan 2024 05:59:23 -0500 Subject: [PATCH 08/33] fix(Core/Unit): Remove delay for Conflagrate aura state (#18068) Removes ConflagrateAuraStateDelayEvent Cherry-picked from: https://github.com/TrinityCore/TrinityCore/commit/e27c385b48fce359a168d602dabae8c55fa85563 Co-authored-by: Ariel Silva --- src/server/game/Entities/Unit/Unit.cpp | 43 +++++++++++-------------- src/server/game/Entities/Unit/Unit.h | 11 ------- src/server/game/Spells/SpellEffects.cpp | 4 --- 3 files changed, 18 insertions(+), 40 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f0e5beb99..219d0ff20 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4468,19 +4468,12 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask) SpellInfo const* spellInfo = aura->GetSpellInfo(); if (AuraStateType aState = spellInfo->GetAuraState()) { - if (aState != AURA_STATE_CONFLAGRATE) - { - // Sting (hunter's pet ability), Faerie Fire (druid versions) - if (aState == AURA_STATE_FAERIE_FIRE) - aurApp->GetTarget()->RemoveAurasByType(SPELL_AURA_MOD_STEALTH); - + uint32 aStateMask = (1 << (aState - 1)); + // force update so the new caster registers it + if ((aStateMask & PER_CASTER_AURA_STATE_MASK) && HasFlag(UNIT_FIELD_AURASTATE, aStateMask)) + ForceValuesUpdateAtIndex(UNIT_FIELD_AURASTATE); + else ModifyAuraState(aState, true); - } - else if (caster) - { - ConflagrateAuraStateDelayEvent* pEvent = new ConflagrateAuraStateDelayEvent(this, caster->GetGUID()); - m_Events.AddEvent(pEvent, m_Events.CalculateTime(700)); // intended 700ms delay before allowing to cast conflagrate - } } if (aurApp->GetRemoveMode()) @@ -4575,9 +4568,19 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator& i, AuraRemoveMode removeMo ToTotem()->setDeathState(DeathState::JustDied); } - // Remove aurastates only if were not found - if (!auraStateFound) - ModifyAuraState(auraState, false); + // Remove aurastates only if needed and were not found + if (auraState) + { + if (!auraStateFound) + ModifyAuraState(auraState, false); + else + { + // update for casters, some shouldn't 'see' the aura state + uint32 aStateMask = (1 << (auraState - 1)); + if ((aStateMask & PER_CASTER_AURA_STATE_MASK) != 0) + ForceValuesUpdateAtIndex(UNIT_FIELD_AURASTATE); + } + } aura->HandleAuraSpecificMods(aurApp, caster, false, false); @@ -20731,16 +20734,6 @@ int32 Unit::CalculateAOEDamageReduction(int32 damage, uint32 schoolMask, Unit* c return damage; } -bool ConflagrateAuraStateDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) -{ - if (m_owner->IsInWorld()) - if (m_owner->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0x4, 0, 0, m_casterGUID) || // immolate - m_owner->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0, 0, 0x2, m_casterGUID)) // shadowflame - m_owner->ModifyAuraState(AURA_STATE_CONFLAGRATE, true); - - return true; -} - void Unit::ExecuteDelayedUnitRelocationEvent() { this->RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED); diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 8488193f0..bf70798d9 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -2668,17 +2668,6 @@ namespace Acore }; } -class ConflagrateAuraStateDelayEvent : public BasicEvent -{ -public: - ConflagrateAuraStateDelayEvent(Unit* owner, ObjectGuid casterGUID) : BasicEvent(), m_owner(owner), m_casterGUID(casterGUID) { } - bool Execute(uint64 e_time, uint32 p_time) override; - -private: - Unit* m_owner; - ObjectGuid m_casterGUID; -}; - class RedirectSpellEvent : public BasicEvent { public: diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 2edb149eb..990901cf3 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -385,10 +385,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex) damage += damage / 4; } } - // Immolate - hidden delay for conflagrate - else if (m_spellInfo->SpellFamilyFlags[0] & 0x4) - { - } // Conflagrate - consumes Immolate or Shadowflame else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE) { From 9cf67f1e5c24b40fa406195af0c306275ab2d795 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Mon, 1 Jan 2024 12:00:08 +0100 Subject: [PATCH 09/33] fix(DB/SAI): add sniffed abilities to Zarakh (#18092) * initial * sloppiness * Update zarakh.sql --- data/sql/updates/pending_db_world/zarakh.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/sql/updates/pending_db_world/zarakh.sql diff --git a/data/sql/updates/pending_db_world/zarakh.sql b/data/sql/updates/pending_db_world/zarakh.sql new file mode 100644 index 000000000..97659bf96 --- /dev/null +++ b/data/sql/updates/pending_db_world/zarakh.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17683; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 17683 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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17683, 0, 0, 0, 0, 0, 100, 0, 22650, 46000, 24260, 65400, 0, 0, 11, 744, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Zarakh - In Combat - Cast \'Poison\''), +(17683, 0, 1, 0, 0, 0, 100, 0, 1600, 19790, 17720, 40430, 0, 0, 11, 745, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Zarakh - In Combat - Cast \'Web\''); From dcd60f02719a41b49adf9745935739e47e063b39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jan 2024 11:00:23 +0000 Subject: [PATCH 10/33] chore(DB): import pending files Referenced commit(s): b2fcc1babf11a767db55c254d64b2dae2a3f913a --- .../{pending_db_world/zarakh.sql => db_world/2024_01_01_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/zarakh.sql => db_world/2024_01_01_01.sql} (95%) diff --git a/data/sql/updates/pending_db_world/zarakh.sql b/data/sql/updates/db_world/2024_01_01_01.sql similarity index 95% rename from data/sql/updates/pending_db_world/zarakh.sql rename to data/sql/updates/db_world/2024_01_01_01.sql index 97659bf96..3507cf819 100644 --- a/data/sql/updates/pending_db_world/zarakh.sql +++ b/data/sql/updates/db_world/2024_01_01_01.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_01_00 -> 2024_01_01_01 -- UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17683; From dc830932f791396fdd189005ec3f6454ebe6b50c Mon Sep 17 00:00:00 2001 From: Anton Popovichenko Date: Mon, 1 Jan 2024 12:01:22 +0100 Subject: [PATCH 11/33] fix(Core): Fix item disappearing on selling item on auction (#18090) --- src/server/game/Handlers/AuctionHouseHandler.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp index d4c05d3a5..dcba85fe6 100644 --- a/src/server/game/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Handlers/AuctionHouseHandler.cpp @@ -371,10 +371,6 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData) item2->SetState(ITEM_CHANGED, _player); _player->ItemRemovedQuestCheck(item2->GetEntry(), count[j]); item2->SendUpdateToPlayer(_player); - - CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction(); - item2->SaveToDB(trans); - CharacterDatabase.CommitTransaction(trans); } } From 51b38b5ee6f820fe5df99fb3657442698deee45e Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Mon, 1 Jan 2024 12:19:59 +0100 Subject: [PATCH 12/33] fix(DB/BloodmystIsle): add sniffed abilities to Sunhawk Spy (#18093) * initial * Update sunhawk-spy.sql --- data/sql/updates/pending_db_world/sunhawk-spy.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/sunhawk-spy.sql diff --git a/data/sql/updates/pending_db_world/sunhawk-spy.sql b/data/sql/updates/pending_db_world/sunhawk-spy.sql new file mode 100644 index 000000000..7b74d13a0 --- /dev/null +++ b/data/sql/updates/pending_db_world/sunhawk-spy.sql @@ -0,0 +1,8 @@ +-- +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17604; + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 17604 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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(17604, 0, 0, 0, 26, 0, 100, 1, 0, 10, 0, 1, 0, 0, 11, 31734, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Spy - In Combat LOS 10 yards - Cast \'31734\' (No Repeat)'), +(17604, 0, 1, 0, 0, 0, 100, 0, 4800, 29700, 16140, 25110, 0, 0, 11, 13730, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Spy - In Combat - Cast \'Demoralizing Shout\''), +(17604, 0, 2, 0, 0, 0, 100, 0, 6450, 9380, 9700, 21250, 0, 0, 11, 31827, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunhawk Spy - In Combat - Cast \'Heroic Strike\''); From 0cebbabbfb39f6f3a2c66b18f20ae8512c68e7aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jan 2024 11:20:50 +0000 Subject: [PATCH 13/33] chore(DB): import pending files Referenced commit(s): 51b38b5ee6f820fe5df99fb3657442698deee45e --- .../sunhawk-spy.sql => db_world/2024_01_01_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/sunhawk-spy.sql => db_world/2024_01_01_02.sql} (96%) diff --git a/data/sql/updates/pending_db_world/sunhawk-spy.sql b/data/sql/updates/db_world/2024_01_01_02.sql similarity index 96% rename from data/sql/updates/pending_db_world/sunhawk-spy.sql rename to data/sql/updates/db_world/2024_01_01_02.sql index 7b74d13a0..c6bd7d93b 100644 --- a/data/sql/updates/pending_db_world/sunhawk-spy.sql +++ b/data/sql/updates/db_world/2024_01_01_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_01_01 -> 2024_01_01_02 -- UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 17604; From 0818fa3f2729aef7f16c1625934a43dfc7cc3cd0 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Mon, 1 Jan 2024 12:48:17 +0100 Subject: [PATCH 14/33] fix(DB/Creature): change Morogrim's combat reach and model bounds based on sniffs (#18094) initial --- data/sql/updates/pending_db_world/morogrim-reach.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 data/sql/updates/pending_db_world/morogrim-reach.sql diff --git a/data/sql/updates/pending_db_world/morogrim-reach.sql b/data/sql/updates/pending_db_world/morogrim-reach.sql new file mode 100644 index 000000000..133c3e784 --- /dev/null +++ b/data/sql/updates/pending_db_world/morogrim-reach.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_model_info` SET `BoundingRadius`=6.315000057220458984, `CombatReach`=6 WHERE `DisplayID`=20739; From 2484eec7ed2b99d19be778149efea2fe81d92846 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jan 2024 11:49:09 +0000 Subject: [PATCH 15/33] chore(DB): import pending files Referenced commit(s): 0818fa3f2729aef7f16c1625934a43dfc7cc3cd0 --- .../morogrim-reach.sql => db_world/2024_01_01_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/morogrim-reach.sql => db_world/2024_01_01_03.sql} (72%) diff --git a/data/sql/updates/pending_db_world/morogrim-reach.sql b/data/sql/updates/db_world/2024_01_01_03.sql similarity index 72% rename from data/sql/updates/pending_db_world/morogrim-reach.sql rename to data/sql/updates/db_world/2024_01_01_03.sql index 133c3e784..02b1d5b07 100644 --- a/data/sql/updates/pending_db_world/morogrim-reach.sql +++ b/data/sql/updates/db_world/2024_01_01_03.sql @@ -1,2 +1,3 @@ +-- DB update 2024_01_01_02 -> 2024_01_01_03 -- UPDATE `creature_model_info` SET `BoundingRadius`=6.315000057220458984, `CombatReach`=6 WHERE `DisplayID`=20739; From 87c34212625c9ce0ce60d49a1f45f0a59130d494 Mon Sep 17 00:00:00 2001 From: sudlud Date: Mon, 1 Jan 2024 13:06:54 +0100 Subject: [PATCH 16/33] fix(Scripts/Midsummer): Improve Torch Catching based on sniffs (#18071) - Update creature 26188 '[PH] Torch Catching Target Bunny' with sniffed values - correctly randomize torch target positions --- .../rev_1703680658578159100.sql | 21 +++++++ src/server/scripts/Events/midsummer.cpp | 57 +++++++------------ 2 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1703680658578159100.sql diff --git a/data/sql/updates/pending_db_world/rev_1703680658578159100.sql b/data/sql/updates/pending_db_world/rev_1703680658578159100.sql new file mode 100644 index 000000000..9b4280725 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1703680658578159100.sql @@ -0,0 +1,21 @@ +-- Update creature 26188 '[PH] Torch Catching Target Bunny' with sniffed values +-- updated spawns +DELETE FROM `creature` WHERE (`id1` = 26188) AND (`guid` IN (245595, 245600, 245604, 245606, 245610, 245614, 245635, 245640)); +INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(245595, 26188, 1, 1, 1, 0, 8687.6015625, 971.4619140625, 11.0921945571899414, 3.351032257080078125, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL), +(245600, 26188, 1, 1, 1, 0, -1026.82470703125, 284.664947509765625, 135.8292694091796875, 5.113814830780029296, 120, 0, 0, 0, 0, 0, "", 50172, 1, NULL), +(245604, 26188, 1, 1, 1, 0, 1930.842041015625, -4341.5693359375, 19.84100914001464843, 5.445427417755126953, 120, 0, 0, 0, 0, 0, "", 50172, 1, NULL), +(245606, 26188, 0, 1, 1, 0, 1826.7586669921875, 254.811309814453125, 59.9133148193359375, 0.680678427219390869, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL), +(245610, 26188, 0, 1, 1, 0, -4716.79296875, -1203.8480224609375, 501.74273681640625, 3.019419670104980468, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL), +(245614, 26188, 0, 1, 1, 0, -8814.5283203125, 876.83599853515625, 98.82147216796875, 3.96189737319946289, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL), +(245635, 26188, 530, 1, 1, 0, 9816.404296875, -7269.10205078125, 26.31508064270019531, 4.485496044158935546, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL), +(245640, 26188, 530, 1, 1, 0, -3769, -11506.2119140625, -134.381103515625, 3.333578824996948242, 120, 0, 0, 0, 0, 0, "", 50063, 1, NULL); + +-- remove duplicate spawns +DELETE FROM `creature` WHERE (`id1` = 26188) AND (`guid` IN (245611, 245609, 245612, 245594, 245615, 245613, 245608, 245607, 245601, 245598, 245599, 245602, 245605, 245603, 245596, 245597, 245639, 245641, 245638, 245636, 245637, 245634)); +DELETE FROM `creature_addon` WHERE (`guid` IN (245611, 245609, 245612, 245594, 245615, 245613, 245608, 245607, 245601, 245598, 245599, 245602, 245605, 245603, 245596, 245597, 245639, 245641, 245638, 245636, 245637, 245634)); +DELETE FROM `game_event_creature` WHERE (`guid` IN (245611, 245609, 245612, 245594, 245615, 245613, 245608, 245607, 245601, 245598, 245599, 245602, 245605, 245603, 245596, 245597, 245639, 245641, 245638, 245636, 245637, 245634)); + +-- enable all spawns for eventEntry 1 +DELETE FROM `game_event_creature` WHERE (`eventEntry` = 1) AND (`guid` IN (SELECT `guid` FROM `creature` WHERE `id1` = 26188)); +INSERT INTO `game_event_creature` (SELECT 1, `guid` FROM `creature` WHERE `id1` = 26188); diff --git a/src/server/scripts/Events/midsummer.cpp b/src/server/scripts/Events/midsummer.cpp index 80739ec21..64ba84c21 100644 --- a/src/server/scripts/Events/midsummer.cpp +++ b/src/server/scripts/Events/midsummer.cpp @@ -1014,44 +1014,29 @@ class spell_midsummer_fling_torch : public SpellScript bool handled; bool Load() override { handled = false; return true; } - SpellCastResult CheckCast() - { - GetCaster()->GetCreaturesWithEntryInRange(_crList, 100.0f, NPC_TORCH_TARGET); - if (_crList.empty()) - { - return SPELL_FAILED_NOT_HERE; - } - - return SPELL_CAST_OK; - } - void ThrowNextTorch(Unit* caster) { - uint8 rand = urand(0, _crList.size() - 1); - Position pos; - pos.Relocate(0.0f, 0.0f, 0.0f); - for (std::list::const_iterator itr = _crList.begin(); itr != _crList.end(); ++itr, --rand) - { - if (caster->GetDistance(*itr) < 5) - { - if (!rand) - rand++; - continue; - } + Creature* bunny = caster->FindNearestCreature(NPC_TORCH_TARGET, 100.0f); - if (!rand) - { - pos.Relocate(*itr); - break; - } - } + if (!bunny) + return; - // we have any pos - if (pos.GetPositionX()) - { - caster->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_FLING_TORCH, true); - caster->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_TORCH_SHADOW, true); - } + // targets are located on a circle with fixed radius around the target bunny + // first target is chosen randomly anywhere on the circle + // next target is chosen on the opposite half of the circle + // so a minimum flight duration of the torch is guaranteed + float angle = 0.0f; + if (GetSpellInfo()->Id == SPELL_FLING_TORCH_DUMMY) + angle = frand(-1.0f * M_PI, 1.0f * M_PI); // full circle + else + angle = frand(-0.5f * M_PI, 0.5f * M_PI); // half circle + + Position pos = bunny->GetPosition(); + pos.SetOrientation(caster->GetPosition().GetAbsoluteAngle(pos)); + pos.RelocatePolarOffset(angle, 8.0f); // radius is sniffed value + + caster->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_FLING_TORCH, true); + caster->CastSpell(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), SPELL_TORCH_SHADOW, true); } void HandleFinish() @@ -1108,15 +1093,11 @@ class spell_midsummer_fling_torch : public SpellScript void Register() override { AfterCast += SpellCastFn(spell_midsummer_fling_torch::HandleFinish); - OnCheckCast += SpellCheckCastFn(spell_midsummer_fling_torch::CheckCast); if (m_scriptSpellId == SPELL_JUGGLE_TORCH) { OnEffectHitTarget += SpellEffectFn(spell_midsummer_fling_torch::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } } - -private: - std::list _crList; }; enum eJuggle From adccad849995d415fc22f3d934f12af52a4f6c65 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jan 2024 12:07:43 +0000 Subject: [PATCH 17/33] chore(DB): import pending files Referenced commit(s): 87c34212625c9ce0ce60d49a1f45f0a59130d494 --- .../rev_1703680658578159100.sql => db_world/2024_01_01_04.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1703680658578159100.sql => db_world/2024_01_01_04.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1703680658578159100.sql b/data/sql/updates/db_world/2024_01_01_04.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1703680658578159100.sql rename to data/sql/updates/db_world/2024_01_01_04.sql index 9b4280725..db1cfc7c1 100644 --- a/data/sql/updates/pending_db_world/rev_1703680658578159100.sql +++ b/data/sql/updates/db_world/2024_01_01_04.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_01_03 -> 2024_01_01_04 -- Update creature 26188 '[PH] Torch Catching Target Bunny' with sniffed values -- updated spawns DELETE FROM `creature` WHERE (`id1` = 26188) AND (`guid` IN (245595, 245600, 245604, 245606, 245610, 245614, 245635, 245640)); From e3fd42f3d41cddd841d6d4e66f1e05a7887b9ed3 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:57:57 -0300 Subject: [PATCH 18/33] =?UTF-8?q?feat(Core/World):=20Implement=20DoForAllP?= =?UTF-8?q?layers()=20helper=20for=20all=20online=20p=E2=80=A6=20(#18060)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(Core/World): Implement DoForAllPlayers() helper for all online players * Update src/server/game/World/World.cpp Co-authored-by: Winfidonarleyan * Update src/server/game/World/World.cpp Co-authored-by: Winfidonarleyan * rename * Update WorldMock.h * Update WorldMock.h --------- Co-authored-by: Winfidonarleyan --- src/server/game/World/IWorld.h | 1 + src/server/game/World/World.cpp | 17 +++++++++++++++++ src/server/game/World/World.h | 2 ++ src/server/scripts/Commands/cs_reset.cpp | 7 +++---- src/test/mocks/WorldMock.h | 1 + 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/server/game/World/IWorld.h b/src/server/game/World/IWorld.h index 3989daac7..227bba687 100644 --- a/src/server/game/World/IWorld.h +++ b/src/server/game/World/IWorld.h @@ -608,6 +608,7 @@ public: [[nodiscard]] virtual std::string const& GetRealmName() const = 0; virtual void SetRealmName(std::string name) = 0; virtual void RemoveOldCorpses() = 0; + virtual void DoForAllOnlinePlayers(std::function exec) = 0; }; #endif //AZEROTHCORE_IWORLD_H diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 4baf05a91..68a8e5075 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -3253,6 +3253,23 @@ void World::RemoveOldCorpses() _timers[WUPDATE_CORPSES].SetCurrent(_timers[WUPDATE_CORPSES].GetInterval()); } +void World::DoForAllOnlinePlayers(std::function exec) +{ + std::shared_lock lock(*HashMapHolder::GetLock()); + for (auto const& it : ObjectAccessor::GetPlayers()) + { + if (Player* player = it.second) + { + if (!player->IsInWorld()) + { + continue; + } + + exec(player); + } + } +} + bool World::IsPvPRealm() const { return getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP || getIntConfig(CONFIG_GAME_TYPE) == REALM_TYPE_FFA_PVP; diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index eaf17a08e..375562a74 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -349,6 +349,8 @@ public: void RemoveOldCorpses() override; + void DoForAllOnlinePlayers(std::function exec) override; + protected: void _UpdateGameTime(); // callback for UpdateRealmCharacters diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index bd3ffeaa3..3a2ba01ac 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -290,10 +290,9 @@ public: stmt->SetData(0, uint16(atLogin)); CharacterDatabase.Execute(stmt); - std::shared_lock lock(*HashMapHolder::GetLock()); - HashMapHolder::MapType const& plist = ObjectAccessor::GetPlayers(); - for (auto itr = plist.begin(); itr != plist.end(); ++itr) - itr->second->SetAtLoginFlag(atLogin); + sWorld->DoForAllOnlinePlayers([&] (Player* player){ + player->SetAtLoginFlag(atLogin); + }); return true; } diff --git a/src/test/mocks/WorldMock.h b/src/test/mocks/WorldMock.h index acc3c1747..26a29463b 100644 --- a/src/test/mocks/WorldMock.h +++ b/src/test/mocks/WorldMock.h @@ -120,6 +120,7 @@ public: MOCK_METHOD(std::string const&, GetRealmName, (), (const)); MOCK_METHOD(void, SetRealmName, (std::string name), ()); MOCK_METHOD(void, RemoveOldCorpses, ()); + MOCK_METHOD(void, DoForAllOnlinePlayers, (std::function exec)); }; #pragma GCC diagnostic pop From c4a7ef2eb0d2255a6c427e35bba8e9dd5cacd0d5 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:00:33 -0300 Subject: [PATCH 19/33] =?UTF-8?q?refactor(Scripts/TheEye):=20Update=20Astr?= =?UTF-8?q?omancer's=20spellscripts=20to=20new=20re=E2=80=A6=20(#18058)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactor(Scripts/TheEye): Update Astromancer's spellscripts to new register method --- .../TempestKeep/Eye/boss_astromancer.cpp | 87 ++++++------------- 1 file changed, 27 insertions(+), 60 deletions(-) diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 05d7a2049..bbceb7b97 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -59,19 +59,12 @@ enum Misc struct boss_high_astromancer_solarian : public BossAI { - boss_high_astromancer_solarian(Creature* creature) : BossAI(creature, DATA_ASTROMANCER) - { - scheduler.SetValidator([this] - { - return !me->HasUnitState(UNIT_STATE_CASTING); - }); - } + boss_high_astromancer_solarian(Creature* creature) : BossAI(creature, DATA_ASTROMANCER) { } void Reset() override { BossAI::Reset(); me->SetModelVisible(true); - _visible = true; ScheduleHealthCheckEvent(20, [&]{ scheduler.CancelAll(); @@ -131,7 +124,6 @@ struct boss_high_astromancer_solarian : public BossAI context.Repeat(33900ms, 48100ms); }).Schedule(52100ms, [this](TaskContext context) { - _visible = false; me->SetReactState(REACT_PASSIVE); me->SetModelVisible(false); scheduler.DelayAll(21s); @@ -158,7 +150,6 @@ struct boss_high_astromancer_solarian : public BossAI }); }).Schedule(20s, [this](TaskContext) { - _visible = true; me->SetReactState(REACT_AGGRESSIVE); Talk(SAY_SUMMON2); summons.DoForAllSummons([&](WorldObject* summon) @@ -204,7 +195,7 @@ struct boss_high_astromancer_solarian : public BossAI scheduler.Update(diff); - if (_visible) + if (me->GetReactState() == REACT_AGGRESSIVE) { DoMeleeAttackIfReady(); } @@ -223,76 +214,52 @@ struct boss_high_astromancer_solarian : public BossAI { return me->GetDistance2d(432.59f, -371.93f) > 105.0f; } -private: - bool _visible; }; -class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader +class spell_astromancer_wrath_of_the_astromancer : public AuraScript { -public: - spell_astromancer_wrath_of_the_astromancer() : SpellScriptLoader("spell_astromancer_wrath_of_the_astromancer") { } + PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer); - class spell_astromancer_wrath_of_the_astromancer_AuraScript : public AuraScript + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript); + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; - void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) - return; + Unit* target = GetUnitOwner(); + target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false); + } - Unit* target = GetUnitOwner(); - target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), false); - } - - void Register() override - { - AfterEffectRemove += AuraEffectRemoveFn(spell_astromancer_wrath_of_the_astromancer_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); - } - }; - - AuraScript* GetAuraScript() const override + void Register() override { - return new spell_astromancer_wrath_of_the_astromancer_AuraScript(); + AfterEffectRemove += AuraEffectRemoveFn(spell_astromancer_wrath_of_the_astromancer::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); } }; -class spell_astromancer_solarian_transform : public SpellScriptLoader +class spell_astromancer_solarian_transform : public AuraScript { -public: - spell_astromancer_solarian_transform() : SpellScriptLoader("spell_astromancer_solarian_transform") { } + PrepareAuraScript(spell_astromancer_solarian_transform); - class spell_astromancer_solarian_transform_AuraScript : public AuraScript + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - PrepareAuraScript(spell_astromancer_solarian_transform_AuraScript); + GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, true); + } - void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, true); - } - - void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) - { - GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, false); - } - - void Register() override - { - OnEffectApply += AuraEffectApplyFn(spell_astromancer_solarian_transform_AuraScript::OnApply, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL); - OnEffectRemove += AuraEffectRemoveFn(spell_astromancer_solarian_transform_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL); - } - }; - - AuraScript* GetAuraScript() const override + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - return new spell_astromancer_solarian_transform_AuraScript(); + GetUnitOwner()->HandleStatModifier(UnitMods(UNIT_MOD_ARMOR), TOTAL_PCT, 400.0f, false); + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_astromancer_solarian_transform::OnApply, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_astromancer_solarian_transform::OnRemove, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL); } }; void AddSC_boss_high_astromancer_solarian() { RegisterTheEyeAI(boss_high_astromancer_solarian); - new spell_astromancer_wrath_of_the_astromancer(); - new spell_astromancer_solarian_transform(); + RegisterSpellScript(spell_astromancer_wrath_of_the_astromancer); + RegisterSpellScript(spell_astromancer_solarian_transform); } From 413cde96dde2d7f74a8c2982aedacef915ae727a Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:01:16 -0300 Subject: [PATCH 20/33] refactor(Scripts/Areatrigger): Move Scholazar Waygate script to SAI (#18054) * refactor(Scripts/Areatrigger): Move Scholazar Waygate script to SAI * Update rev_1703449890835634600.sql --- .../rev_1703449890835634600.sql | 28 ++++++++++++ .../scripts/World/areatrigger_scripts.cpp | 44 ------------------- 2 files changed, 28 insertions(+), 44 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1703449890835634600.sql diff --git a/data/sql/updates/pending_db_world/rev_1703449890835634600.sql b/data/sql/updates/pending_db_world/rev_1703449890835634600.sql new file mode 100644 index 000000000..e7ce97baf --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1703449890835634600.sql @@ -0,0 +1,28 @@ +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5046, 5047); +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(5046, 'SmartTrigger'), +(5047, 'SmartTrigger'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5046) AND (`source_type` = 2) AND (`id` IN (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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5046, 2, 0, 0, 46, 0, 100, 0, 5046, 0, 0, 0, 0, 0, 134, 52056, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast \'Sholazar to Un`goro Teleport\''); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5047) AND (`source_type` = 2) AND (`id` IN (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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5047, 2, 0, 0, 46, 0, 100, 0, 5047, 0, 0, 0, 0, 0, 134, 52057, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Cast \'Un`goro to Sholazar Teleport\''); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=1 AND `SourceEntry` IN (5046, 5047) AND `SourceId`=2; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 5046, 2, 0, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'), +(22, 1, 5046, 2, 0, 14, 0, 13956, 0, 0, 1, 0, 0, '', 'Cast Teleport to Un\'goro if Meeting a Great One (13956) status is not none.'), +(22, 1, 5046, 2, 1, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'), +(22, 1, 5046, 2, 1, 8, 0, 12613, 0, 0, 0, 0, 0, '', 'Cast Teleport to Un\'goro if The Makers Overlook (12613) has been rewarded.'), +(22, 1, 5046, 2, 1, 8, 0, 12559, 0, 0, 0, 0, 0, '', 'Cast Teleport to Un\'goro if The Makers Perch (12559) has been rewarded.'); + +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 5047, 2, 0, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'), +(22, 1, 5047, 2, 0, 14, 0, 13956, 0, 0, 1, 0, 0, '', 'Cast Teleport to Sholazar if Meeting a Great One (13956) status is not none.'), +(22, 1, 5047, 2, 1, 36, 0, 0, 0, 0, 0, 0, 0, '', 'Player must be alive'), +(22, 1, 5047, 2, 1, 8, 0, 12613, 0, 0, 0, 0, 0, '', 'Cast Teleport to Sholazar if The Makers Overlook (12613) has been rewarded.'), +(22, 1, 5047, 2, 1, 8, 0, 12559, 0, 0, 0, 0, 0, '', 'Cast Teleport to Sholazar if The Makers Perch (12559) has been rewarded.'); diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index bb835c607..d6c79ad49 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -245,49 +245,6 @@ public: } }; -/*###### -## at_sholazar_waygate -######*/ - -enum Waygate -{ - SPELL_SHOLAZAR_TO_UNGORO_TELEPORT = 52056, - SPELL_UNGORO_TO_SHOLAZAR_TELEPORT = 52057, - - AT_SHOLAZAR = 5046, - AT_UNGORO = 5047, - - QUEST_THE_MAKERS_OVERLOOK = 12613, - QUEST_THE_MAKERS_PERCH = 12559, - QUEST_MEETING_A_GREAT_ONE = 13956, -}; - -class AreaTrigger_at_sholazar_waygate : public AreaTriggerScript -{ -public: - AreaTrigger_at_sholazar_waygate() : AreaTriggerScript("at_sholazar_waygate") { } - - bool OnTrigger(Player* player, AreaTrigger const* trigger) override - { - if (!player->isDead() && (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) != QUEST_STATUS_NONE || - (player->GetQuestStatus(QUEST_THE_MAKERS_OVERLOOK) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_THE_MAKERS_PERCH) == QUEST_STATUS_REWARDED))) - { - switch (trigger->entry) - { - case AT_SHOLAZAR: - player->CastSpell(player, SPELL_SHOLAZAR_TO_UNGORO_TELEPORT, true); - break; - - case AT_UNGORO: - player->CastSpell(player, SPELL_UNGORO_TO_SHOLAZAR_TELEPORT, true); - break; - } - } - - return false; - } -}; - /*###### ## at_nats_landing ######*/ @@ -490,7 +447,6 @@ void AddSC_areatrigger_scripts() new AreaTrigger_at_stormwright_shelf(); new AreaTrigger_at_scent_larkorwi(); new AreaTrigger_at_last_rites(); - new AreaTrigger_at_sholazar_waygate(); new AreaTrigger_at_nats_landing(); new AreaTrigger_at_sentry_point(); new AreaTrigger_at_brewfest(); From c48066bf35526e5f973c2b82d6ab12559fdf075f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 1 Jan 2024 13:01:22 +0000 Subject: [PATCH 21/33] chore(DB): import pending files Referenced commit(s): c4a7ef2eb0d2255a6c427e35bba8e9dd5cacd0d5 --- .../rev_1703449890835634600.sql => db_world/2024_01_01_05.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1703449890835634600.sql => db_world/2024_01_01_05.sql} (98%) diff --git a/data/sql/updates/pending_db_world/rev_1703449890835634600.sql b/data/sql/updates/db_world/2024_01_01_05.sql similarity index 98% rename from data/sql/updates/pending_db_world/rev_1703449890835634600.sql rename to data/sql/updates/db_world/2024_01_01_05.sql index e7ce97baf..c285de236 100644 --- a/data/sql/updates/pending_db_world/rev_1703449890835634600.sql +++ b/data/sql/updates/db_world/2024_01_01_05.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_01_04 -> 2024_01_01_05 -- DELETE FROM `areatrigger_scripts` WHERE `entry` IN (5046, 5047); INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES From f9f71fff36de7ee374c463de2494e16b35dbf6ec Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:56:32 -0300 Subject: [PATCH 22/33] =?UTF-8?q?fix(Core/Player):=20Check=20if=20the=20pl?= =?UTF-8?q?ayer=20can=20summon=20the=20warlock=20pet=20on=20B=E2=80=A6=20(?= =?UTF-8?q?#18064)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Core/Player): Check if the player can summon the warlock pet on BG ress --- src/server/game/Entities/Pet/Pet.cpp | 8 ++++++ src/server/game/Entities/Player/Player.cpp | 29 ++++++++++------------ 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 5e10ef17e..f58797ac4 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -105,6 +105,14 @@ void Pet::AddToWorld() if (GetOwnerGUID().IsPlayer()) { + if (Player* owner = GetOwner()) + { + if (getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK) + { + owner->SetLastPetSpell(GetUInt32Value(UNIT_CREATED_BY_SPELL)); + } + } + sScriptMgr->OnPetAddToWorld(this); } } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index f5d16be4e..a04616cbe 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -14164,24 +14164,21 @@ void Player::ResummonPetTemporaryUnSummonedIfAny() bool Player::CanResummonPet(uint32 spellid) { - switch (getClass()) + if (getClass() == CLASS_DEATH_KNIGHT) { - case CLASS_DEATH_KNIGHT: - if (CanSeeDKPet()) - return true; - else if (spellid == 52150) //Raise Dead - return false; - break; - case CLASS_MAGE: - if (HasSpell(31687) && HasAura(70937)) //Has [Summon Water Elemental] spell and [Glyph of Eternal Water]. - return true; - break; - case CLASS_HUNTER: - case CLASS_WARLOCK: + if (CanSeeDKPet()) return true; - break; - default: - break; + else if (spellid == 52150) // Raise Dead + return false; + } + else if (getClass() == CLASS_MAGE) + { + if (HasSpell(31687) && HasAura(70937)) //Has [Summon Water Elemental] spell and [Glyph of Eternal Water]. + return true; + } + else if (getClass() == CLASS_HUNTER) + { + return true; } return HasSpell(spellid); From 5a52f3a9a8e45e056962664373a23d44e8e5224d Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 2 Jan 2024 07:16:05 +0100 Subject: [PATCH 23/33] fix(DB/Nagrand): script Gava'xi OOC rp with sniffs (#18089) * initial * codestyle * override with Unix EOL --- .../pending_db_world/gava_xi_ooc_rp.sql | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql diff --git a/data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql b/data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql new file mode 100644 index 000000000..3c17667f5 --- /dev/null +++ b/data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql @@ -0,0 +1,48 @@ +-- +DELETE FROM `waypoints` WHERE `entry` IN (1829800, 1829801); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(1829800, 1, -2672.9744, 7931.336, -27.176205, NULL, 0, 'Gava\'xi'), +(1829800, 2, -2684.0105, 7918.5903, -31.449396, NULL, 0, 'Gava\'xi'), +(1829800, 3, -2709.6504, 7895.3516, -40.8449, NULL, 0, 'Gava\'xi'), +(1829800, 4, -2722.3762, 7894.163, -41.931747, NULL, 0, 'Gava\'xi'), +(1829800, 5, -2732.9348, 7900.942, -41.43452, NULL, 0, 'Gava\'xi'), +(1829800, 6, -2738.069, 7909.868, -41.615604, NULL, 0, 'Gava\'xi'), +(1829800, 7, -2731.4773, 7926.874, -40.430233, NULL, 0, 'Gava\'xi'), +(1829800, 8, -2706.214, 7966.6875, -44.424637, NULL, 0, 'Gava\'xi'), +(1829800, 9, -2678.335, 7982.9517, -46.47888, NULL, 0, 'Gava\'xi'), +(1829800, 10, -2664.7808, 7981.76, -47.284157, NULL, 0, 'Gava\'xi'), +(1829800, 11, -2643.7148, 7983.618, -47.950817, NULL, 0, 'Gava\'xi'), +(1829800, 12, -2627.47, 7988.2173, -48.725338, NULL, 0, 'Gava\'xi'), +(1829800, 13, -2608.5688, 7992.2085, -49.956314, NULL, 0, 'Gava\'xi'), +(1829800, 14, -2591.1943, 7998.155, -51.645016, NULL, 0, 'Gava\'xi'), +(1829800, 15, -2587.0571, 8000.884, -51.988026, NULL, 0, 'Gava\'xi'), +(1829801, 1, -2595.9915, 7978.7476, -51.318558, NULL, 0, 'Gava\'xi'), +(1829801, 2, -2606.409, 7970.6963, -50.899216, NULL, 0, 'Gava\'xi'), +(1829801, 3, -2618.4011, 7955.8125, -51.952393, NULL, 0, 'Gava\'xi'), +(1829801, 4, -2631.3743, 7933.137, -52.171066, NULL, 0, 'Gava\'xi'), +(1829801, 5, -2629.679, 7916.777, -53.126976, NULL, 0, 'Gava\'xi'), +(1829801, 6, -2638.3762, 7903.308, -51.517876, NULL, 0, 'Gava\'xi'), +(1829801, 7, -2654.426, 7890.7925, -49.859486, NULL, 0, 'Gava\'xi'), +(1829801, 8, -2675.7644, 7878.1504, -45.659203, NULL, 0, 'Gava\'xi'), +(1829801, 9, -2694.0188, 7872.3525, -44.287346, NULL, 0, 'Gava\'xi'), +(1829801, 10, -2705.9536, 7878.065, -43.997498, NULL, 0, 'Gava\'xi'), +(1829801, 11, -2707.866, 7888.1953, -41.754112, NULL, 0, 'Gava\'xi'), +(1829801, 12, -2702.4153, 7895.1562, -39.975098, NULL, 0, 'Gava\'xi'), +(1829801, 13, -2694.282, 7903.423, -37.312958, NULL, 0, 'Gava\'xi'), +(1829801, 14, -2675.754, 7928.2773, -28.246132, NULL, 0, 'Gava\'xi'), +(1829801, 15, -2670.222, 7942.9243, -23.193773, NULL, 0, 'Gava\'xi'), +(1829801, 16, -2665.6055, 7953.998, -18.960806, NULL, 0, 'Gava\'xi'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` = 18298 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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18298, 0, 0, 0, 0, 0, 100, 0, 2500, 4000, 9500, 12000, 0, 0, 11, 14873, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - In Combat - Cast \'Sinister Strike\''), +(18298, 0, 1, 0, 2, 0, 100, 1, 20, 80, 0, 0, 0, 0, 11, 12540, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - Between 20-80% Health - Cast \'Gouge\' (No Repeat)'), +(18298, 0, 2, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 1, 1829800, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - Respawn - Start waypoint movement'), +(18298, 0, 3, 4, 40, 0, 100, 0, 15, 1829800, 0, 0, 0, 0, 89, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - WP reached - Start wander movement (10yds)'), +(18298, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 1, 15000, 15000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - WP reached - Do timed event 1'), +(18298, 0, 5, 0, 59, 0, 100, 0, 1, 0, 0, 0, 0, 0, 53, 0, 1829801, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - On timed event triggered - Start waypoint movement'), +(18298, 0, 6, 7, 40, 0, 100, 0, 16, 1829801, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - WP reached - Start wander movement (0yds)'), +(18298, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 2, 4000, 4000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - WP reached - Do timed event 2'), +(18298, 0, 8, 9, 59, 0, 100, 0, 2, 0, 0, 0, 0, 0, 5, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - On timed event triggered - Do emote \'ONESHOT_ROAR\''), +(18298, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 3, 22000, 22000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - On timed event triggered - Do timed event 3'), +(18298, 0, 10, 0, 59, 0, 100, 0, 3, 0, 0, 0, 0, 0, 53, 1, 1829800, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Gava\'xi - On timed event triggered - Start waypoint movement'); From 623ee56509f24845cb27139de1747c1e47c84983 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 2 Jan 2024 06:16:57 +0000 Subject: [PATCH 24/33] chore(DB): import pending files Referenced commit(s): 5a52f3a9a8e45e056962664373a23d44e8e5224d --- .../gava_xi_ooc_rp.sql => db_world/2024_01_02_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/gava_xi_ooc_rp.sql => db_world/2024_01_02_00.sql} (99%) diff --git a/data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql b/data/sql/updates/db_world/2024_01_02_00.sql similarity index 99% rename from data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql rename to data/sql/updates/db_world/2024_01_02_00.sql index 3c17667f5..b674110d7 100644 --- a/data/sql/updates/pending_db_world/gava_xi_ooc_rp.sql +++ b/data/sql/updates/db_world/2024_01_02_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_01_05 -> 2024_01_02_00 -- DELETE FROM `waypoints` WHERE `entry` IN (1829800, 1829801); INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES From 8f127f9e2135a70cdb5573d052f50304d1b3875c Mon Sep 17 00:00:00 2001 From: AG <43139552+AGandrup@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:56:24 +0100 Subject: [PATCH 25/33] Fix combat movement (#18026) * Improve combat movement - Removed a bunch of logic related to another attempt at fixing combat movement. - Removed SMART_ACTION_SET_CASTER_COMBAT_DIST and updated smarts scripts accordingly. - Cherry-picked https://github.com/TrinityCore/TrinityCore/commit/7fb74326205acbc5c0fa6b2aa9731d891e788d64 - Cherry-picked https://github.com/TrinityCore/TrinityCore/commit/63a6e1e0480df659e773a3df5e1acc2027ebcf15 Co-Authored-By: Ludovic Barbier Co-Authored-By: Giacomo Pozzoni * Some more cleanup + fix sql * More fixes to caster chase/combat movement + some cherry picks because why not - Fix casters always trying to chase to melee range - Fix casters another case of casters sometimes walking back instead of stopping - Cleaned up some code - Cherry picked https://github.com/TrinityCore/TrinityCore/commit/ca25e8d0199730c0976ebc37317e9407aceccc34 - Cherry picked https://github.com/TrinityCore/TrinityCore/commit/96b289cadbf304e427ddbd281d1a6f592af612a7 Co-Authored-By: Giacomo Pozzoni * Added parentheses * Fixed caster combat movement when target is rooted - Made a few adjustments to chase range and stuff, but nothing set in stone. * convert uint to int --------- Co-authored-by: Ludovic Barbier Co-authored-by: Giacomo Pozzoni --- .../pending_db_world/2023_12_14_00.sql | 32 +++ src/server/game/AI/SmartScripts/SmartAI.cpp | 56 +++-- src/server/game/AI/SmartScripts/SmartAI.h | 4 +- .../game/AI/SmartScripts/SmartScript.cpp | 209 +++++++++++------- src/server/game/AI/SmartScripts/SmartScript.h | 28 +-- .../game/AI/SmartScripts/SmartScriptMgr.cpp | 2 - .../game/AI/SmartScripts/SmartScriptMgr.h | 19 +- .../TargetedMovementGenerator.cpp | 16 +- 8 files changed, 224 insertions(+), 142 deletions(-) create mode 100644 data/sql/updates/pending_db_world/2023_12_14_00.sql diff --git a/data/sql/updates/pending_db_world/2023_12_14_00.sql b/data/sql/updates/pending_db_world/2023_12_14_00.sql new file mode 100644 index 000000000..56dc8d506 --- /dev/null +++ b/data/sql/updates/pending_db_world/2023_12_14_00.sql @@ -0,0 +1,32 @@ +# Lord Cobrahn +DELETE FROM `smart_scripts` WHERE `entryorguid`=3669 AND `source_type`=0 AND `id`=6 AND `link`=7; +UPDATE `smart_scripts` SET `id`=6 WHERE `entryorguid`=3669 AND `source_type`=0 AND `id`=7 AND `link`=0; +UPDATE `smart_scripts` SET `id`=7 WHERE `entryorguid`=3669 AND `source_type`=0 AND `id`=8 AND `link`=0; + +# Druid of the Fang +DELETE FROM `smart_scripts` WHERE `entryorguid`=3840 AND `source_type`=0 AND `id`=4 AND `link`=0; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=3840 AND `source_type`=0 AND `id`=3 AND `link`=4; +UPDATE `smart_scripts` SET `id`=4, `link`=5 WHERE `entryorguid`=3840 AND `source_type`=0 AND `id`=5 AND `link`=6; +UPDATE `smart_scripts` SET `id`=5 WHERE `entryorguid`=3840 AND `source_type`=0 AND `id`=6 AND `link`=0; +UPDATE `smart_scripts` SET `id`=6 WHERE `entryorguid`=3840 AND `source_type`=0 AND `id`=7 AND `link`=0; + +# Phantom Guest +DELETE FROM `smart_scripts` WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=6 AND `link`=0; +UPDATE `smart_scripts` SET `id`=6 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=7 AND `link`=0; +UPDATE `smart_scripts` SET `id`=7 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=8 AND `link`=0; +UPDATE `smart_scripts` SET `id`=8 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=9 AND `link`=0; +UPDATE `smart_scripts` SET `id`=9 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=10 AND `link`=0; +UPDATE `smart_scripts` SET `id`=10 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=11 AND `link`=0; +UPDATE `smart_scripts` SET `id`=11 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=12 AND `link`=0; +UPDATE `smart_scripts` SET `id`=12 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=13 AND `link`=0; +UPDATE `smart_scripts` SET `id`=13 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=14 AND `link`=0; +UPDATE `smart_scripts` SET `id`=14 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=15 AND `link`=0; +UPDATE `smart_scripts` SET `id`=15 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=20 AND `link`=0; +UPDATE `smart_scripts` SET `id`=16 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=21 AND `link`=0; +UPDATE `smart_scripts` SET `id`=17 WHERE `entryorguid`=16409 AND `source_type`=0 AND `id`=22 AND `link`=0; + +# Maiev Shadowsong +DELETE FROM `smart_scripts` WHERE `entryorguid`=23197 AND `source_type`=0 AND `id`=7 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=23197 AND `source_type`=0 AND `id`=8 AND `link`=0; +UPDATE `smart_scripts` SET `id`=7 WHERE `entryorguid`=23197 AND `source_type`=0 AND `id`=9 AND `link`=0; +UPDATE `smart_scripts` SET `id`=8 WHERE `entryorguid`=23197 AND `source_type`=0 AND `id`=10 AND `link`=0; diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index c1210c836..84b726ab5 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -500,6 +500,7 @@ void SmartAI::CheckConditions(const uint32 diff) void SmartAI::UpdateAI(uint32 diff) { + bool hasVictim = UpdateVictim(); CheckConditions(diff); GetScript()->OnUpdate(diff); UpdatePath(diff); @@ -535,7 +536,7 @@ void SmartAI::UpdateAI(uint32 diff) return; } - if (!UpdateVictim()) + if (!hasVictim) return; if (mCanAutoAttack) @@ -827,14 +828,14 @@ void SmartAI::AttackStart(Unit* who) // xinef: dont allow charmed npcs to act on their own if (me->HasUnitFlag(UNIT_FLAG_POSSESSED)) { - if (who && mCanAutoAttack) - me->Attack(who, true); + if (who) + me->Attack(who, mCanAutoAttack); return; } if (who && me->Attack(who, me->IsWithinMeleeRange(who))) { - if (mCanCombatMove || GetScript()->GetMaxCombatDist()) + if (mCanCombatMove) { SetRun(mRun); MovementGeneratorType type = me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE); @@ -843,8 +844,8 @@ void SmartAI::AttackStart(Unit* who) me->GetMotionMaster()->MovementExpired(); me->StopMoving(); } - float range = GetScript()->GetCasterActualDist() > 0.f ? GetScript()->GetCasterActualDist() : GetScript()->GetActualCombatDist(); - me->GetMotionMaster()->MoveChase(who, range > 0.f ? ChaseRange(range) : std::optional()); + + me->GetMotionMaster()->MoveChase(who); } } } @@ -1019,21 +1020,8 @@ void SmartAI::sQuestReward(Player* player, Quest const* quest, uint32 opt) GetScript()->ProcessEventsFor(SMART_EVENT_REWARD_QUEST, player, quest->GetQuestId(), opt); } -void SmartAI::SetForcedCombatMove(float dist) +void SmartAI::SetCombatMove(bool on, float chaseRange) { - if (!me->GetVictim()) - return; - - SetRun(mRun); - me->GetMotionMaster()->MoveChase(me->GetVictim(), dist); -} - -void SmartAI::SetCombatMove(bool on) -{ - // Xinef: Fix Combat Movement - if (GetScript()->GetMaxCombatDist()/* || GetScript()->GetCasterMaxDist()*/) // Xinef: we only need this hack for old caster movement system - return; - if (mCanCombatMove == on) return; @@ -1049,7 +1037,7 @@ void SmartAI::SetCombatMove(bool on) if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) { SetRun(mRun); - me->GetMotionMaster()->MoveChase(me->GetVictim()); + me->GetMotionMaster()->MoveChase(me->GetVictim(), chaseRange); me->CastStop(); } } @@ -1115,6 +1103,32 @@ void SmartAI::StopFollow(bool complete) GetScript()->ProcessEventsFor(SMART_EVENT_FOLLOW_COMPLETED, player); } +void SmartAI::MoveAway(float distance) +{ + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + return; + + mCanCombatMove = false; + + if (!IsAIControlled()) + return; + + if (!HasEscortState(SMART_ESCORT_ESCORTING)) + { + if (me->GetVictim()) + { + me->StopMoving(); + if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) + me->GetMotionMaster()->Clear(false); + + float x, y, z; + me->GetClosePoint(x, y, z, me->GetObjectSize(), distance, M_PI); + if (me->GetVictim()->IsWithinLOS(x, y, z)) + me->GetMotionMaster()->MovePoint(SMART_RANDOM_POINT, x, y, z); + } + } +} + void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker) { if (invoker) diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index 5723822f5..79d72c807 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -64,10 +64,11 @@ public: bool IsEscorted() override { return (mEscortState & SMART_ESCORT_ESCORTING); } void RemoveEscortState(uint32 uiEscortState) { mEscortState &= ~uiEscortState; } void SetAutoAttack(bool on) { mCanAutoAttack = on; } - void SetCombatMove(bool on); + void SetCombatMove(bool on, float chaseRange = 0.0f); bool CanCombatMove() { return mCanCombatMove; } void SetFollow(Unit* target, float dist = 0.0f, float angle = 0.0f, uint32 credit = 0, uint32 end = 0, uint32 creditType = 0, bool aliveState = true); void StopFollow(bool complete); + void MoveAway(float distance); void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker); SmartScript* GetScript() { return &mScript; } @@ -205,7 +206,6 @@ public: // Xinef void SetWPPauseTimer(uint32 time) { mWPPauseTimer = time; } - void SetForcedCombatMove(float dist); private: bool mIsCharmed; diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 41e3f9ce3..8ccdf9830 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -56,15 +56,8 @@ SmartScript::SmartScript() mTemplate = SMARTAI_TEMPLATE_BASIC; mScriptType = SMART_SCRIPT_TYPE_CREATURE; isProcessingTimedActionList = false; - - // Xinef: Fix Combat Movement - mActualCombatDist = 0; - mMaxCombatDist = 0; - - smartCasterActualDist = 0.0f; - smartCasterMaxDist = 0.0f; - smartCasterPowerType = POWER_MANA; - + mCurrentPriority = 0; + mEventSortingRequired = false; _allowPhaseReset = true; } @@ -87,14 +80,16 @@ void SmartScript::OnReset() InitTimer((*i)); (*i).runOnce = false; } + + if ((*i).priority != SmartScriptHolder::DEFAULT_PRIORITY) + { + (*i).priority = SmartScriptHolder::DEFAULT_PRIORITY; + mEventSortingRequired = true; + } } ProcessEventsFor(SMART_EVENT_RESET); mLastInvoker.Clear(); mCounterList.clear(); - - // Xinef: Fix Combat Movement - RestoreMaxCombatDist(); - RestoreCasterMaxDist(); } void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob) @@ -118,14 +113,18 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3 void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob) { + e.runOnce = true;//used for repeat check + //calc random - if (e.event.event_chance < 100 && e.event.event_chance) + if (e.event.event_chance < 100 && e.event.event_chance && !(e.event.event_flags & SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL)) { uint32 rnd = urand(1, 100); if (e.event.event_chance <= rnd) return; } - e.runOnce = true;//used for repeat check + + // Remove SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL flag after processing roll chances as it's not needed anymore + e.event.event_flags &= ~SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL; if (unit) mLastInvoker = unit->GetGUID(); @@ -589,6 +588,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.action.cast.targetsLimit) Acore::Containers::RandomResize(targets, e.action.cast.targetsLimit); + bool failedSpellCast = false, successfulSpellCast = false; + for (WorldObject* target : targets) { // may be nullptr @@ -621,23 +622,40 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.action.cast.castFlags & SMARTCAST_INTERRUPT_PREVIOUS) me->InterruptNonMeleeSpells(false); - // Flag usable only if caster has max dist set. - if ((e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE) && GetCasterMaxDist() > 0.0f && me->GetMaxPower(GetCasterPowerType()) > 0) - { - // Check mana case only and operate movement accordingly, LoS and range is checked in targetet movement generator. - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.action.cast.spell); - int32 currentPower = me->GetPower(GetCasterPowerType()); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.action.cast.spell); + float distanceToTarget = me->GetDistance(target->ToUnit()); + float spellMaxRange = me->GetSpellMaxRangeForTarget(target->ToUnit(), spellInfo); + float spellMinRange = me->GetSpellMinRangeForTarget(target->ToUnit(), spellInfo); + float meleeRange = me->GetMeleeRange(target->ToUnit()); - if ((spellInfo && (currentPower < spellInfo->CalcPowerCost(me, spellInfo->GetSchoolMask()) || me->IsSpellProhibited(spellInfo->GetSchoolMask()))) || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) - { - SetCasterActualDist(0); - CAST_AI(SmartAI, me->AI())->SetForcedCombatMove(0); - } - else if (GetCasterActualDist() == 0.0f && me->GetPowerPct(GetCasterPowerType()) > 30.0f) - { - RestoreCasterMaxDist(); - CAST_AI(SmartAI, me->AI())->SetForcedCombatMove(GetCasterActualDist()); - } + bool isWithinLOSInMap = me->IsWithinLOSInMap(target->ToUnit()); + bool isWithinMeleeRange = distanceToTarget <= meleeRange; + bool isRangedAttack = spellMaxRange > NOMINAL_MELEE_RANGE; + bool isTargetRooted = target->ToUnit()->HasUnitState(UNIT_STATE_ROOT); + // To prevent running back and forth when OOM, we must have more than 10% mana. + bool canCastSpell = me->GetPowerPct(POWER_MANA) > 10.0f && spellInfo->CalcPowerCost(me, spellInfo->GetSchoolMask()) < (int32)me->GetPower(POWER_MANA) && !me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED); + + // If target is rooted we move out of melee range before casting, but not further than spell max range. + if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell) + { + failedSpellCast = true; // Mark spellcast as failed so we can retry it later + float minDistance = std::max(meleeRange, spellMinRange) - distanceToTarget + NOMINAL_MELEE_RANGE; + CAST_AI(SmartAI, me->AI())->MoveAway(std::min(minDistance, spellMaxRange)); + continue; + } + + // Let us not try to cast spell if we know it is going to fail anyway. Stick to chasing and continue. + if (distanceToTarget > spellMaxRange && isWithinLOSInMap) + { + failedSpellCast = true; + CAST_AI(SmartAI, me->AI())->SetCombatMove(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f)); + continue; + } + else if (distanceToTarget < spellMinRange || !isWithinLOSInMap) + { + failedSpellCast = true; + CAST_AI(SmartAI, me->AI())->SetCombatMove(true); + continue; } TriggerCastFlags triggerFlags = TRIGGERED_NONE; @@ -649,11 +667,38 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u triggerFlags = TRIGGERED_FULL_MASK; } - me->CastSpell(target->ToUnit(), e.action.cast.spell, triggerFlags); + SpellCastResult result = me->CastSpell(target->ToUnit(), e.action.cast.spell, triggerFlags); + bool spellCastFailed = (result != SPELL_CAST_OK && result != SPELL_FAILED_SPELL_IN_PROGRESS); + + if (e.action.cast.castFlags & SMARTCAST_COMBAT_MOVE) + { + // If cast flag SMARTCAST_COMBAT_MOVE is set combat movement will not be allowed unless target is outside spell range, out of mana, or LOS. + if (result == SPELL_FAILED_OUT_OF_RANGE) + // if we are just out of range, we only chase until we are back in spell range. + CAST_AI(SmartAI, me->AI())->SetCombatMove(true, std::max(spellMaxRange - NOMINAL_MELEE_RANGE, 0.0f)); + else + // if spell fail for any other reason, we chase to melee range, or stay where we are if spellcast was successful. + CAST_AI(SmartAI, me->AI())->SetCombatMove(spellCastFailed); + } + + if (spellCastFailed) + failedSpellCast = true; + else + successfulSpellCast = true; + LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_CAST: Unit {} casts spell {} on target {} with castflags {}", me->GetGUID().ToString(), e.action.cast.spell, target->GetGUID().ToString(), e.action.cast.castFlags); } } + + // If there is at least 1 failed cast and no successful casts at all, retry again on next loop + if (failedSpellCast && !successfulSpellCast) + { + RetryLater(e, true); + // Don't execute linked events + return; + } + break; } case SMART_ACTION_SELF_CAST: @@ -864,15 +909,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!IsSmart()) break; - // Xinef: Fix Combat Movement bool move = e.action.combatMove.move; - if (move && GetMaxCombatDist() && e.GetEventType() == SMART_EVENT_MANA_PCT) - { - SetActualCombatDist(0); - CAST_AI(SmartAI, me->AI())->SetForcedCombatMove(0); - } - else - CAST_AI(SmartAI, me->AI())->SetCombatMove(move); + CAST_AI(SmartAI, me->AI())->SetCombatMove(move); LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ALLOW_COMBAT_MOVEMENT: Creature {} bool on = {}", me->GetGUID().ToString(), e.action.combatMove.move); break; @@ -2425,17 +2463,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u break; } - case SMART_ACTION_SET_CASTER_COMBAT_DIST: - { - if (e.action.casterDistance.reset) - RestoreCasterMaxDist(); - else - SetCasterActualDist(e.action.casterDistance.dist); - - if (me->GetVictim() && me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - me->GetMotionMaster()->MoveChase(me->GetVictim(), GetCasterActualDist()); - break; - } case SMART_ACTION_SET_SIGHT_DIST: { for (WorldObject* const target : targets) @@ -4577,7 +4604,7 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff) { if (me && me->HasUnitState(UNIT_STATE_CASTING)) { - e.timer = 1200; + RaisePriority(e); return; } } @@ -4635,6 +4662,18 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff) break; } } + + if (e.priority != SmartScriptHolder::DEFAULT_PRIORITY) + { + // Reset priority to default one only if the event hasn't been rescheduled again to next loop + if (e.timer > 1) + { + // Re-sort events if this was moved to the top of the queue + mEventSortingRequired = true; + // Reset priority to default one + e.priority = SmartScriptHolder::DEFAULT_PRIORITY; + } + } } else e.timer -= diff; @@ -4663,6 +4702,12 @@ void SmartScript::OnUpdate(uint32 const diff) InstallEvents();//before UpdateTimers + if (mEventSortingRequired) + { + SortEvents(mEvents); + mEventSortingRequired = false; + } + for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i) UpdateTimer(*i, diff); @@ -4718,6 +4763,33 @@ void SmartScript::OnUpdate(uint32 const diff) } } +void SmartScript::SortEvents(SmartAIEventList& events) +{ + std::sort(events.begin(), events.end()); +} + +void SmartScript::RaisePriority(SmartScriptHolder& e) +{ + e.timer = 1200; + // Change priority only if it's set to default, otherwise keep the current order of events + if (e.priority == SmartScriptHolder::DEFAULT_PRIORITY) + { + e.priority = mCurrentPriority++; + mEventSortingRequired = true; + } +} + +void SmartScript::RetryLater(SmartScriptHolder& e, bool ignoreChanceRoll) +{ + RaisePriority(e); + + // This allows to retry the action later without rolling again the chance roll (which might fail and end up not executing the action) + if (ignoreChanceRoll) + e.event.event_flags |= SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL; + + e.runOnce = false; +} + void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTrigger const* at) { (void)at; // ensure that the variable is referenced even if extra logs are disabled in order to pass compiler checks @@ -4822,37 +4894,8 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTrigger const* at) GetScript();//load copy of script - uint32 maxDisableDist = 0; - uint32 minEnableDist = 0; - for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i) - { - InitTimer((*i));//calculate timers for first time use - if (i->GetEventType() == SMART_EVENT_RANGE && i->GetActionType() == SMART_ACTION_ALLOW_COMBAT_MOVEMENT) - { - if (i->action.combatMove.move == 1 && i->event.minMaxRepeat.rangeMin > minEnableDist) - minEnableDist = i->event.minMaxRepeat.rangeMin; - else if (i->action.combatMove.move == 0 && (i->event.minMaxRepeat.rangeMax < maxDisableDist || maxDisableDist == 0)) - maxDisableDist = i->event.minMaxRepeat.rangeMax; - } - - // Xinef: if smartcast combat move flag is present - if (i->GetActionType() == SMART_ACTION_CAST && (i->action.cast.castFlags & SMARTCAST_COMBAT_MOVE)) - { - if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i->action.cast.spell)) - { - float maxRange = spellInfo->GetMaxRange(spellInfo->IsPositive()); - float minRange = spellInfo->GetMinRange(spellInfo->IsPositive()); - - if (maxRange > 0 && minRange <= maxRange) - { - smartCasterMaxDist = minRange + ((maxRange - minRange) * 0.65f); - smartCasterPowerType = (Powers)spellInfo->PowerType; - } - } - } - } - if (maxDisableDist > 0 && minEnableDist >= maxDisableDist) - mMaxCombatDist = uint32(maxDisableDist + ((minEnableDist - maxDisableDist) / 2)); + for (SmartScriptHolder& event : mEvents) + InitTimer(event);//calculate timers for first time use ProcessEventsFor(SMART_EVENT_AI_INIT); InstallEvents(); diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 61a1d7efa..b9ab57327 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -216,19 +216,6 @@ public: typedef std::unordered_map CounterMap; CounterMap mCounterList; - // Xinef: Fix Combat Movement - void SetActualCombatDist(uint32 dist) { mActualCombatDist = dist; } - void RestoreMaxCombatDist() { mActualCombatDist = mMaxCombatDist; } - uint32 GetActualCombatDist() const { return mActualCombatDist; } - uint32 GetMaxCombatDist() const { return mMaxCombatDist; } - - // Xinef: SmartCasterAI, replace above - void SetCasterActualDist(float dist) { smartCasterActualDist = dist; } - void RestoreCasterMaxDist() { smartCasterActualDist = smartCasterMaxDist; } - Powers GetCasterPowerType() const { return smartCasterPowerType; } - float GetCasterActualDist() const { return smartCasterActualDist; } - float GetCasterMaxDist() const { return smartCasterMaxDist; } - bool AllowPhaseReset() const { return _allowPhaseReset; } void SetPhaseReset(bool allow) { _allowPhaseReset = allow; } @@ -241,6 +228,10 @@ private: void SetPhase(uint32 p); bool IsInPhase(uint32 p) const; + void SortEvents(SmartAIEventList& events); + void RaisePriority(SmartScriptHolder& e); + void RetryLater(SmartScriptHolder& e, bool ignoreChanceRoll = false); + SmartAIEventList mEvents; SmartAIEventList mInstallEvents; SmartAIEventList mTimedActionList; @@ -262,15 +253,8 @@ private: uint32 mLastTextID; uint32 mTalkerEntry; bool mUseTextTimer; - - // Xinef: Fix Combat Movement - uint32 mActualCombatDist; - uint32 mMaxCombatDist; - - // Xinef: SmartCasterAI, replace above in future - uint32 smartCasterActualDist; - uint32 smartCasterMaxDist; - Powers smartCasterPowerType; + uint32 mCurrentPriority; + bool mEventSortingRequired; // Xinef: misc bool _allowPhaseReset; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 2ce60090a..7a7bf270f 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -755,7 +755,6 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e) case SMART_ACTION_EXIT_VEHICLE: return NO_PARAMS; case SMART_ACTION_SET_UNIT_MOVEMENT_FLAGS: return sizeof(SmartAction::movementFlag); case SMART_ACTION_SET_COMBAT_DISTANCE: return sizeof(SmartAction::combatDistance); - case SMART_ACTION_SET_CASTER_COMBAT_DIST: return sizeof(SmartAction::casterDistance); case SMART_ACTION_FALL: return NO_PARAMS; case SMART_ACTION_SET_EVENT_FLAG_RESET: return sizeof(SmartAction::setActive); case SMART_ACTION_STOP_MOTION: return sizeof(SmartAction::stopMotion); @@ -1918,7 +1917,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_EXIT_VEHICLE: case SMART_ACTION_SET_UNIT_MOVEMENT_FLAGS: case SMART_ACTION_SET_COMBAT_DISTANCE: - case SMART_ACTION_SET_CASTER_COMBAT_DIST: case SMART_ACTION_SET_SIGHT_DIST: case SMART_ACTION_FLEE: case SMART_ACTION_ADD_THREAT: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index a9530daed..73f5a8973 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -26,6 +26,7 @@ #include "Spell.h" #include "SpellMgr.h" #include "Unit.h" +#include typedef uint32 SAIBool; @@ -686,7 +687,7 @@ enum SMART_ACTION SMART_ACTION_EXIT_VEHICLE = 203, // none SMART_ACTION_SET_UNIT_MOVEMENT_FLAGS = 204, // flags SMART_ACTION_SET_COMBAT_DISTANCE = 205, // combatDistance - SMART_ACTION_SET_CASTER_COMBAT_DIST = 206, // followDistance, resetToMax + // UNUSED = 206, SMART_ACTION_SET_HOVER = 207, // 0/1 SMART_ACTION_ADD_IMMUNITY = 208, // type, id, value SMART_ACTION_REMOVE_IMMUNITY = 209, // type, id, value @@ -1859,7 +1860,10 @@ enum SmartEventFlags SMART_EVENT_FLAG_WHILE_CHARMED = 0x200, // Event occurs even if AI owner is charmed SMART_EVENT_FLAG_DIFFICULTY_ALL = (SMART_EVENT_FLAG_DIFFICULTY_0 | SMART_EVENT_FLAG_DIFFICULTY_1 | SMART_EVENT_FLAG_DIFFICULTY_2 | SMART_EVENT_FLAG_DIFFICULTY_3), - SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE | SMART_EVENT_FLAG_DIFFICULTY_ALL | SMART_EVENT_FLAG_RESERVED_5 | SMART_EVENT_FLAG_RESERVED_6 | SMART_EVENT_FLAG_DEBUG_ONLY | SMART_EVENT_FLAG_DONT_RESET | SMART_EVENT_FLAG_WHILE_CHARMED) + SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE | SMART_EVENT_FLAG_DIFFICULTY_ALL | SMART_EVENT_FLAG_RESERVED_5 | SMART_EVENT_FLAG_RESERVED_6 | SMART_EVENT_FLAG_DEBUG_ONLY | SMART_EVENT_FLAG_DONT_RESET | SMART_EVENT_FLAG_WHILE_CHARMED), + + // Temp flags, used only at runtime, never stored in DB + SMART_EVENT_FLAG_TEMP_IGNORE_CHANCE_ROLL = 0x40000000, //Event occurs no matter what roll_chance_i(e.event.event_chance) returns. }; enum SmartCastFlags @@ -1889,7 +1893,7 @@ enum SmartFollowType struct SmartScriptHolder { SmartScriptHolder() : entryOrGuid(0), source_type(SMART_SCRIPT_TYPE_CREATURE) - , event_id(0), link(0), event(), action(), target(), timer(0), active(false), runOnce(false) + , event_id(0), link(0), event(), action(), target(), timer(0), priority(DEFAULT_PRIORITY), active(false), runOnce(false) , enableTimed(false) {} int32 entryOrGuid; @@ -1908,9 +1912,18 @@ public: uint32 GetTargetType() const { return (uint32)target.type; } uint32 timer; + uint32 priority; bool active; bool runOnce; bool enableTimed; + + // Default comparision operator using priority field as first ordering field + bool operator<(SmartScriptHolder const& other) const + { + return std::tie(priority, entryOrGuid, source_type, event_id, link) < std::tie(other.priority, other.entryOrGuid, other.source_type, other.event_id, other.link); + } + + static constexpr uint32 DEFAULT_PRIORITY = std::numeric_limits::max(); }; typedef std::unordered_map WPPath; diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp index a864ac507..568079503 100644 --- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp @@ -107,7 +107,7 @@ bool ChaseMovementGenerator::DoUpdate(T* owner, uint32 time_diff) if (i_recalculateTravel && PositionOkay(owner, target, _movingTowards ? maxTarget : Optional(), angle)) { - if (owner->HasUnitState(UNIT_STATE_CHASE_MOVE) && !target->isMoving() && !mutualChase) + if ((owner->HasUnitState(UNIT_STATE_CHASE_MOVE) && !target->isMoving() && !mutualChase) || _range) { i_recalculateTravel = false; i_path = nullptr; @@ -134,11 +134,11 @@ bool ChaseMovementGenerator::DoUpdate(T* owner, uint32 time_diff) } // if the target moved, we have to consider whether to adjust - if (!_lastTargetPosition || target->GetPosition() != _lastTargetPosition.value() || mutualChase != _mutualChase) + if (!_lastTargetPosition || target->GetPosition() != _lastTargetPosition.value() || mutualChase != _mutualChase || !owner->IsWithinLOSInMap(target)) { _lastTargetPosition = target->GetPosition(); _mutualChase = mutualChase; - if (owner->HasUnitState(UNIT_STATE_CHASE_MOVE) || !PositionOkay(owner, target, target->isMoving() ? maxTarget : maxRange, angle)) + if (owner->HasUnitState(UNIT_STATE_CHASE_MOVE) || !PositionOkay(owner, target, maxTarget, angle)) { // can we get to the target? if (cOwner && !target->isInAccessiblePlaceFor(cOwner)) @@ -150,10 +150,10 @@ bool ChaseMovementGenerator::DoUpdate(T* owner, uint32 time_diff) } // figure out which way we want to move - float tarX, tarY, tarZ; - target->GetPosition(tarX, tarY, tarZ); + float x, y, z; + target->GetPosition(x, y, z); bool withinRange = owner->IsInDist(target, maxRange); - bool withinLOS = owner->IsWithinLOS(tarX, tarY, tarZ); + bool withinLOS = owner->IsWithinLOS(x, y, z); bool moveToward = !(withinRange && withinLOS); // make a new path if we have to... @@ -181,14 +181,12 @@ bool ChaseMovementGenerator::DoUpdate(T* owner, uint32 time_diff) additionalRange = owner->GetExactDistSq(target) < G3D::square(speed) ? 0 : speed; } - float x, y, z; bool shortenPath; // if we want to move toward the target and there's no fixed angle... if (moveToward && !angle) { // ...we'll pathfind to the center, then shorten the path - target->GetPosition(x, y, z); shortenPath = true; } else @@ -214,7 +212,7 @@ bool ChaseMovementGenerator::DoUpdate(T* owner, uint32 time_diff) } if (shortenPath) - i_path->ShortenPathUntilDist(G3D::Vector3(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()), maxTarget); + i_path->ShortenPathUntilDist(G3D::Vector3(x, y, z), maxTarget); if (cOwner) { From 9a80b7e1f9fcfc99f2c1e9cca516bf410246182b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 08:57:43 +0000 Subject: [PATCH 26/33] chore(DB): import pending files Referenced commit(s): 8f127f9e2135a70cdb5573d052f50304d1b3875c --- .../2023_12_14_00.sql => db_world/2024_01_03_00.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/2023_12_14_00.sql => db_world/2024_01_03_00.sql} (98%) diff --git a/data/sql/updates/pending_db_world/2023_12_14_00.sql b/data/sql/updates/db_world/2024_01_03_00.sql similarity index 98% rename from data/sql/updates/pending_db_world/2023_12_14_00.sql rename to data/sql/updates/db_world/2024_01_03_00.sql index 56dc8d506..a4c8b40c8 100644 --- a/data/sql/updates/pending_db_world/2023_12_14_00.sql +++ b/data/sql/updates/db_world/2024_01_03_00.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_02_00 -> 2024_01_03_00 # Lord Cobrahn DELETE FROM `smart_scripts` WHERE `entryorguid`=3669 AND `source_type`=0 AND `id`=6 AND `link`=7; UPDATE `smart_scripts` SET `id`=6 WHERE `entryorguid`=3669 AND `source_type`=0 AND `id`=7 AND `link`=0; From 78e761854b299b916975c1a6e2743d75c417472b Mon Sep 17 00:00:00 2001 From: Grimgravy Date: Wed, 3 Jan 2024 05:58:58 -0300 Subject: [PATCH 27/33] fix(DB/Conditions): Quest Sniffing Out the Perpetrator (#18098) fix(DB/Condition): Quest Sniffing Out the Perpetrator --- .../updates/pending_db_world/rev_1704198878008192900.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 data/sql/updates/pending_db_world/rev_1704198878008192900.sql diff --git a/data/sql/updates/pending_db_world/rev_1704198878008192900.sql b/data/sql/updates/pending_db_world/rev_1704198878008192900.sql new file mode 100644 index 000000000..3d3492cf3 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1704198878008192900.sql @@ -0,0 +1,8 @@ +-- +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceGroup` = 29857) AND (`SourceEntry` = 55460) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 9) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 12910) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(18, 29857, 55460, 0, 0, 9, 0, 12910, 0, 0, 0, 0, 0, '', 'Ride Frostbite (Khaliisi\'s Pet) Spellclick requires Active (taken) quest \'Sniffing Out the Perpetrator\'.'); + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 54997) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 29696) AND (`ConditionValue3` = 0); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 54997, 0, 0, 31, 1, 3, 29696, 0, 0, 0, 0, '', 'Immobilizes a Stormforged Pursuer.'); From da6ff31056d46c046ab570bd335cd1e81242cd96 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 09:00:22 +0000 Subject: [PATCH 28/33] chore(DB): import pending files Referenced commit(s): 78e761854b299b916975c1a6e2743d75c417472b --- .../rev_1704198878008192900.sql => db_world/2024_01_03_01.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/rev_1704198878008192900.sql => db_world/2024_01_03_01.sql} (97%) diff --git a/data/sql/updates/pending_db_world/rev_1704198878008192900.sql b/data/sql/updates/db_world/2024_01_03_01.sql similarity index 97% rename from data/sql/updates/pending_db_world/rev_1704198878008192900.sql rename to data/sql/updates/db_world/2024_01_03_01.sql index 3d3492cf3..994a45085 100644 --- a/data/sql/updates/pending_db_world/rev_1704198878008192900.sql +++ b/data/sql/updates/db_world/2024_01_03_01.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_03_00 -> 2024_01_03_01 -- DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 18) AND (`SourceGroup` = 29857) AND (`SourceEntry` = 55460) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 9) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 12910) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES From 6202835cff40a47658d14a15d6ebb33e2159b1a4 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 3 Jan 2024 19:47:26 +0100 Subject: [PATCH 29/33] fix(Core/LFG): Hide XP from max players (#18103) * Cherry-pick Player::IsMaxLevel from TrinityCore * Correctly hide XP reward for max level players in LFG * Closes #18101 --- src/server/game/Entities/Player/Player.cpp | 5 +++++ src/server/game/Entities/Player/Player.h | 1 + src/server/game/Entities/Player/PlayerQuest.cpp | 2 +- src/server/game/Handlers/LFGHandler.cpp | 5 ++++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index a04616cbe..5364e98d2 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -2524,6 +2524,11 @@ void Player::GiveLevel(uint8 level) sScriptMgr->OnPlayerLevelChanged(this, oldLevel); } +bool Player::IsMaxLevel() const +{ + return GetLevel() >= GetUInt32Value(PLAYER_FIELD_MAX_LEVEL); +} + void Player::InitTalentForLevel() { uint32 talentPointsForLevel = CalculateTalentsPoints(); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index e5606b037..48474ce99 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1686,6 +1686,7 @@ public: void SetFreeTalentPoints(uint32 points); bool resetTalents(bool noResetCost = false); [[nodiscard]] uint32 resetTalentsCost() const; + bool IsMaxLevel() const; void InitTalentForLevel(); void BuildPlayerTalentsInfoData(WorldPacket* data); void BuildPetTalentsInfoData(WorldPacket* data); diff --git a/src/server/game/Entities/Player/PlayerQuest.cpp b/src/server/game/Entities/Player/PlayerQuest.cpp index 659e84c72..ea7a0b2a9 100644 --- a/src/server/game/Entities/Player/PlayerQuest.cpp +++ b/src/server/game/Entities/Player/PlayerQuest.cpp @@ -2348,7 +2348,7 @@ void Player::SendQuestReward(Quest const* quest, uint32 XP) WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4 + 4 + 4 + 4 + 4)); data << uint32(questid); - if (GetLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) + if (!IsMaxLevel()) { data << uint32(XP); data << uint32(quest->GetRewOrReqMoney(GetLevel())); diff --git a/src/server/game/Handlers/LFGHandler.cpp b/src/server/game/Handlers/LFGHandler.cpp index a78b88644..4599347f8 100644 --- a/src/server/game/Handlers/LFGHandler.cpp +++ b/src/server/game/Handlers/LFGHandler.cpp @@ -188,7 +188,10 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData* uint8 playerLevel = GetPlayer() ? GetPlayer()->GetLevel() : 0; data << uint8(done); data << uint32(quest->GetRewOrReqMoney(playerLevel)); - data << uint32(quest->XPValue(playerLevel)); + if (!GetPlayer()->IsMaxLevel()) + data << uint32(quest->XPValue(playerLevel)); + else + data << uint32(0); data << uint32(0); data << uint32(0); data << uint8(quest->GetRewItemsCount()); From 5287570ea1a3fe6e1ce425ac0069b18c813d8bf8 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:53:00 +0100 Subject: [PATCH 30/33] fix(DB/TerokkarForest): add patrol movement to Ironjaw (#18086) * initial * changed position based on point in waypoints in order to not make him fly true spawnpoint still not sniffed --- data/sql/updates/pending_db_world/ironjaw.sql | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 data/sql/updates/pending_db_world/ironjaw.sql diff --git a/data/sql/updates/pending_db_world/ironjaw.sql b/data/sql/updates/pending_db_world/ironjaw.sql new file mode 100644 index 000000000..9508aeb68 --- /dev/null +++ b/data/sql/updates/pending_db_world/ironjaw.sql @@ -0,0 +1,53 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` = 18670 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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(18670, 0, 0, 0, 0, 0, 100, 0, 2000, 4000, 30000, 35000, 0, 0, 11, 32918, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironjaw - In Combat - Cast \'Chilling Howl\''), +(18670, 0, 1, 0, 0, 0, 100, 0, 4000, 6000, 4000, 6000, 0, 0, 11, 32919, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironjaw - In Combat - Cast \'Snarl\''), +(18670, 0, 2, 0, 0, 0, 100, 0, 8000, 11000, 9000, 11000, 0, 0, 11, 32962, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironjaw - In Combat - Cast \'Iron Bite\''), +(18670, 0, 3, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 53, 0, 1867000, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ironjaw - Respawn - Start waypoint movement'); + +DELETE FROM `creature` WHERE `guid` = 66940 and `id1` = 18670; +INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +(66940, 18670, 0, 0, 530, 0, 0, 1, 1, 0, -2255.6384, 3470.4573, -23.312017, 1.83568, 300, 0, 0, 5715, 0, 0, 0, 0, 0, '', 0, 0, NULL); + +DELETE FROM `waypoints` WHERE `entry` = 1867000; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(1867000, 1, -2254.9797, 3456.6707, -22.450056, NULL, 0, 'Ironjaw'), +(1867000, 2, -2260.0933, 3436.6528, -19.26712, NULL, 0, 'Ironjaw'), +(1867000, 3, -2269.3323, 3417.3464, -18.036856, NULL, 0, 'Ironjaw'), +(1867000, 4, -2261.3965, 3401.6484, -19.311249, NULL, 0, 'Ironjaw'), +(1867000, 5, -2241.924, 3399.447, -20.934261, NULL, 0, 'Ironjaw'), +(1867000, 6, -2223.0876, 3399.6868, -22.344685, NULL, 0, 'Ironjaw'), +(1867000, 7, -2212.784, 3398.4434, -25.655071, NULL, 0, 'Ironjaw'), +(1867000, 8, -2203.8513, 3393.8677, -29.047827, NULL, 0, 'Ironjaw'), +(1867000, 9, -2193.1848, 3385.0598, -31.713863, NULL, 0, 'Ironjaw'), +(1867000, 10, -2187.9397, 3375.0015, -31.811998, NULL, 0, 'Ironjaw'), +(1867000, 11, -2188.9473, 3363.0488, -31.13889, NULL, 0, 'Ironjaw'), +(1867000, 12, -2190.2373, 3350.6533, -31.041891, NULL, 0, 'Ironjaw'), +(1867000, 13, -2188.941, 3363.031, -31.168343, NULL, 0, 'Ironjaw'), +(1867000, 14, -2187.9397, 3375.0015, -31.811998, NULL, 0, 'Ironjaw'), +(1867000, 15, -2193.1848, 3385.0598, -31.713863, NULL, 0, 'Ironjaw'), +(1867000, 16, -2203.8513, 3393.8677, -29.047827, NULL, 0, 'Ironjaw'), +(1867000, 17, -2223.0876, 3399.6868, -22.344685, NULL, 0, 'Ironjaw'), +(1867000, 18, -2241.924, 3399.447, -20.934261, NULL, 0, 'Ironjaw'), +(1867000, 19, -2261.3965, 3401.6484, -19.311249, NULL, 0, 'Ironjaw'), +(1867000, 20, -2269.3323, 3417.3464, -18.036856, NULL, 0, 'Ironjaw'), +(1867000, 21, -2260.0933, 3436.6528, -19.26712, NULL, 0, 'Ironjaw'), +(1867000, 22, -2254.9797, 3456.6707, -22.450056, NULL, 0, 'Ironjaw'), +(1867000, 23, -2255.6384, 3470.4573, -23.312017, NULL, 0, 'Ironjaw'), +(1867000, 24, -2264.9858, 3485.0881, -24.062012, NULL, 0, 'Ironjaw'), +(1867000, 25, -2261.0608, 3496.8245, -23.882532, NULL, 0, 'Ironjaw'), +(1867000, 26, -2254.7573, 3518.5947, -25.678585, NULL, 0, 'Ironjaw'), +(1867000, 27, -2256.2546, 3543.88, -22.95422, NULL, 0, 'Ironjaw'), +(1867000, 28, -2260.6467, 3560.1096, -16.475277, NULL, 0, 'Ironjaw'), +(1867000, 29, -2264.5212, 3586.5452, -18.401897, NULL, 0, 'Ironjaw'), +(1867000, 30, -2273.019, 3609.3972, -15.251651, NULL, 0, 'Ironjaw'), +(1867000, 31, -2271.3945, 3641.3662, -9.791668, NULL, 0, 'Ironjaw'), +(1867000, 32, -2273.019, 3609.3972, -15.251651, NULL, 0, 'Ironjaw'), +(1867000, 33, -2264.5212, 3586.5452, -18.401897, NULL, 0, 'Ironjaw'), +(1867000, 34, -2260.6467, 3560.1096, -16.475277, NULL, 0, 'Ironjaw'), +(1867000, 35, -2256.2546, 3543.88, -22.95422, NULL, 0, 'Ironjaw'), +(1867000, 36, -2254.7573, 3518.5947, -25.678585, NULL, 0, 'Ironjaw'), +(1867000, 37, -2261.0608, 3496.8245, -23.882532, NULL, 0, 'Ironjaw'), +(1867000, 38, -2264.9858, 3485.0881, -24.062012, NULL, 0, 'Ironjaw'), +(1867000, 39, -2255.6384, 3470.4573, -23.312017, NULL, 0, 'Ironjaw'); From 23937f59e015997274659b9a710eebbf58afe823 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 19:54:01 +0000 Subject: [PATCH 31/33] chore(DB): import pending files Referenced commit(s): 5287570ea1a3fe6e1ce425ac0069b18c813d8bf8 --- .../{pending_db_world/ironjaw.sql => db_world/2024_01_03_02.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/ironjaw.sql => db_world/2024_01_03_02.sql} (99%) diff --git a/data/sql/updates/pending_db_world/ironjaw.sql b/data/sql/updates/db_world/2024_01_03_02.sql similarity index 99% rename from data/sql/updates/pending_db_world/ironjaw.sql rename to data/sql/updates/db_world/2024_01_03_02.sql index 9508aeb68..37c789ddc 100644 --- a/data/sql/updates/pending_db_world/ironjaw.sql +++ b/data/sql/updates/db_world/2024_01_03_02.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_03_01 -> 2024_01_03_02 -- DELETE FROM `smart_scripts` WHERE `entryorguid` = 18670 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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES From 8fee16756fde7354c15f44d1b3c2b532fd0f0ed0 Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 3 Jan 2024 19:11:16 -0300 Subject: [PATCH 32/33] fix(DB/TempestKeep): Rebuild Tempest Keep (#18105) Create tk.sql --- data/sql/updates/pending_db_world/tk.sql | 1049 ++++++++++++++++++++++ 1 file changed, 1049 insertions(+) create mode 100644 data/sql/updates/pending_db_world/tk.sql diff --git a/data/sql/updates/pending_db_world/tk.sql b/data/sql/updates/pending_db_world/tk.sql new file mode 100644 index 000000000..cbd520f4f --- /dev/null +++ b/data/sql/updates/pending_db_world/tk.sql @@ -0,0 +1,1049 @@ +SET @CGUID := 158000; + +DELETE FROM `creature` WHERE `map` = 550; +INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES +-- Marshal Patrol +(@CGUID+0, 20035, 550, 3845, 3845, 1, 63.4178, -1.51493, -2.42826, 0.00479513, 604800, 52485, 1, 'Tempest Keep Entrance Scripted Patrol'), +(@CGUID+1, 20036, 550, 3845, 3845, 1, 61.8152, -0.34127, -2.42826, 5.72144, 604800, 52485, 1, ''), +(@CGUID+2, 20036, 550, 3845, 3845, 1, 61.8917, -2.6948, -2.42827, 0.576039, 604800, 52485, 1, ''), +-- Entrance Group 1 +(@CGUID+3, 20034, 550, 3845, 3845, 1, 53.3193, 7.81006, -2.34492, 4.5204, 604800, 52485, 1, ''), +(@CGUID+4, 20032, 550, 3845, 3845, 1, 57.8223, 7.00091, -2.34492, 4.10152, 604800, 52485, 1, ''), +(@CGUID+5, 20031, 550, 3845, 3845, 1, 61.6321, 3.35163, -2.34492, 3.63028, 604800, 52485, 1, ''), +(@CGUID+6, 20031, 550, 3845, 3845, 1, 62.1931, -6.53074, -2.34494, 2.74017, 604800, 52485, 1, ''), +(@CGUID+7, 20033, 550, 3845, 3845, 1, 58.5711, -10.2187, -2.34494, 2.26893, 604800, 52485, 1, ''), +(@CGUID+8, 20034, 550, 3845, 3845, 1, 53.8861, -10.7066, -2.34495, 1.8326, 604800, 52485, 1, ''), +-- Entrance Group 2 +(@CGUID+9 , 20031, 550, 3845, 3845, 1, 104.795, 8.55721, -2.25027, 3.80482, 604800, 52485, 1, ''), +(@CGUID+10, 20033, 550, 3845, 3845, 1, 108.604, 5.36372, -2.24215, 5.11381, 604800, 52485, 1, ''), +(@CGUID+11, 20034, 550, 3845, 3845, 1, 113.951, 5.66478, -2.24247, 4.36332, 604800, 52485, 1, ''), +(@CGUID+12, 20034, 550, 3845, 3845, 1, 114.112, -8.94633, -2.24276, 1.90241, 604800, 52485, 1, ''), +(@CGUID+13, 20032, 550, 3845, 3845, 1, 108.159, -8.67961, -2.24247, 1.15192, 604800, 52485, 1, ''), +(@CGUID+14, 20031, 550, 3845, 3845, 1, 104.595, -11.3571, -2.25123, 2.46091, 604800, 52485, 1, ''), +-- Entrance Group 3 +(@CGUID+15, 20034, 550, 3845, 3845, 1, 188.045, 8.61233, -2.39762, 3.42085, 604800, 52485, 1, ''), +(@CGUID+16, 20032, 550, 3845, 3845, 1, 188.956, 5.88125, -2.3803, 3.33358, 604800, 52485, 1, ''), +(@CGUID+17, 20031, 550, 3845, 3845, 1, 191.375, 3.30484, -2.35456, 3.26377, 604800, 52485, 1, ''), +(@CGUID+18, 20031, 550, 3845, 3845, 1, 191.414, -5.72624, -2.35336, 3.01942, 604800, 52485, 1, ''), +(@CGUID+19, 20033, 550, 3845, 3845, 1, 188.992, -8.09278, -2.37145, 2.94961, 604800, 52485, 1, ''), +(@CGUID+20, 20033, 550, 3845, 3845, 1, 187.621, -10.937, -2.3892, 2.86234, 604800, 52485, 1, ''), +-- Falconer Group 1 +(@CGUID+21, 20037, 550, 3845, 3845, 1, 291.181, 13.2438, -2.38939, 6.23696, 604800, 52485, 1, 'Tempest Keep Falconer Scripted Patrol'), +(@CGUID+22, 20037, 550, 3845, 3845, 1, 287.201, 17.504, -2.38937, 0.678325, 604800, 52485, 1, ''), +(@CGUID+23, 20038, 550, 3845, 3845, 0, 289.549, 13.6469, -2.38938, 5.804, 604800, 52485, 1, ''), +(@CGUID+24, 20038, 550, 3845, 3845, 0, 293.151, 9.24799, -2.3894, 0.576295, 604800, 52485, 1, ''), +(@CGUID+25, 20038, 550, 3845, 3845, 0, 281.774, 11.2658, -2.38937, 0.0826095, 604800, 52485, 1, ''), +(@CGUID+26, 20038, 550, 3845, 3845, 0, 284.593, 21.0029, -2.38936, 5.30217, 604800, 52485, 1, ''), +(@CGUID+27, 20038, 550, 3845, 3845, 0, 294.369, 21.2237, -2.38939, 4.73032, 604800, 52485, 1, ''), +(@CGUID+28, 20038, 550, 3845, 3845, 0, 298.59, 15.5155, -2.3894, 4.09528, 604800, 52485, 1, ''), +-- Falconer Group 2 +(@CGUID+29, 20037, 550, 3845, 3845, 1, 378.334, -16.5305, -2.38634, 3.60934, 604800, 52485, 1, 'Tempest Keep Falconer Scripted Patrol'), +(@CGUID+30, 20037, 550, 3845, 3845, 1, 372.852, -17.4978, -2.34998, 3.97025, 604800, 52485, 1, ''), +(@CGUID+31, 20038, 550, 3845, 3845, 0, 375.233, -19.8306, -2.38673, 4.11309, 604800, 52485, 1, ''), +(@CGUID+32, 20038, 550, 3845, 3845, 0, 370.572, -18.3607, -2.38787, 3.60761, 604800, 52485, 1, ''), +(@CGUID+33, 20038, 550, 3845, 3845, 0, 373.271, -11.3935, -2.38788, 3.93352, 604800, 52485, 1, ''), +(@CGUID+34, 20038, 550, 3845, 3845, 0, 378.542, -11.303, -2.38673, 3.80249, 604800, 52485, 1, ''), +(@CGUID+35, 20038, 550, 3845, 3845, 0, 383.295, -14.7649, -2.3854, 3.61841, 604800, 52485, 1, ''), +(@CGUID+36, 20038, 550, 3845, 3845, 0, 382.072, -20.8504, -2.38516, 3.46843, 604800, 52485, 1, ''), +-- Phoenix-Hawks +(@CGUID+37, 20039, 550, 3845, 3845, 0, 246.787, -38.4272, 20.1865, 5.07862, 604800, 52485, 1, ''), +(@CGUID+38, 20039, 550, 3845, 3845, 0, 379.393, -80.7432, 20.1738, 3.57221, 604800, 52485, 1, ''), +(@CGUID+39, 20039, 550, 3845, 3845, 0, 388.865, 74.0442, 20.1793, 2.65501, 604800, 52485, 1, ''), +(@CGUID+40, 20039, 550, 3845, 3845, 0, 250.599, 45.2608, 20.2297, 1.05579, 604800, 52485, 1, ''), +-- Al'ar + Triggers +(@CGUID+41, 19514, 550, 3845, 3845, 0, 377.71875, -18.54347, 42.866432, 1.093185305595397949, 604800, 52485, 2, ''), +(@CGUID+42, 15384, 550, 3845, 3845, 0, 330.344, -1.1002, 42.8605, 3.1765, 604800, 52485, 1, ''), +(@CGUID+43, 15384, 550, 3845, 3845, 0, 276.072, -0.578703, 26.2075, 2.11185, 604800, 52485, 1, ''), +(@CGUID+44, 15384, 550, 3845, 3845, 0, 259.228, 35.879, 20.263, 5.00909, 604800, 52485, 1, ''), +(@CGUID+45, 15384, 550, 3845, 3845, 0, 335.638, 59.4879, 17.9319, 1.8326, 604800, 52485, 1, ''), +(@CGUID+46, 15384, 550, 3845, 3845, 0, 388.751, 31.7312, 20.2636, 4.62512, 604800, 52485, 1, ''), +(@CGUID+47, 15384, 550, 3845, 3845, 0, 388.791, -33.1059, 20.2636, 4.85202, 604800, 52485, 1, ''), +(@CGUID+48, 15384, 550, 3845, 3845, 0, 332.723, -61.159, 17.9791, 3.64774, 604800, 52485, 1, ''), +(@CGUID+49, 15384, 550, 3845, 3845, 0, 258.959, -38.6871, 20.2629, 5.72468, 604800, 52485, 1, ''), +(@CGUID+50, 12999, 550, 3845, 3845, 0, 425.408, -0.379617, 80.368, 0.925025, 604800, 52485, 1, 'Al\'ar Unknown Trigger'), +-- Devastator Patrol +(@CGUID+51, 20040, 550, 3845, 3845, 0, 519.576, 195.501, 20.29, 4.79369, 604800, 52485, 1, ''), +-- Sentinel Group 1 +(@CGUID+52, 20041, 550, 3845, 3845, 0, 528.337, 159.21, 20.3332, 3.07178, 604800, 52485, 1, ''), +(@CGUID+53, 20041, 550, 3845, 3845, 0, 522.524, 136.295, 20.336, 2.94961, 604800, 52485, 1, ''), +-- Sentinel Group 2 +(@CGUID+54, 20041, 550, 3845, 3845, 0, 499.913, 234.991, 20.3294, 5.91667, 604800, 52485, 1, ''), +(@CGUID+55, 20041, 550, 3845, 3845, 0, 516.177, 243.245, 20.3168, 4.69494, 604800, 52485, 1, ''), +-- Inquisitor Patrol +(@CGUID+56, 20050, 550, 3845, 3845, 1, 578.006, 129.334, 35.6868, 3.11457, 604800, 52485, 1, ''), +(@CGUID+57, 20048, 550, 3845, 3845, 1, 579.632, 125.368, 36.0563, 2.85756, 604800, 52485, 1, ''), +(@CGUID+58, 20048, 550, 3845, 3845, 1, 579.718, 130.138, 35.9214, 3.3703, 604800, 52485, 1, ''), +-- Inquisitor Adds 1 +(@CGUID+59, 20048, 550, 3845, 3845, 1, 598.221, 130.282, 37.6214, 3.21141, 604800, 52485, 1, ''), +(@CGUID+60, 20049, 550, 3845, 3845, 1, 601.037, 127.576, 38.6695, 3.05433, 604800, 52485, 1, ''), +(@CGUID+61, 20047, 550, 3845, 3845, 1, 603.495, 125.062, 39.5998, 2.9147, 604800, 52485, 1, ''), +(@CGUID+62, 20047, 550, 3845, 3845, 1, 597.978, 114.958, 39.383, 2.79253, 604800, 52485, 1, ''), +(@CGUID+63, 20049, 550, 3845, 3845, 1, 594.701, 114.735, 38.6178, 2.67035, 604800, 52485, 1, ''), +(@CGUID+64, 20048, 550, 3845, 3845, 1, 590.499, 115.313, 37.5283, 2.47837, 604800, 52485, 1, ''), +-- Inquisitor Adds 2 +(@CGUID+65, 20049, 550, 3845, 3845, 1, 654.737, 88.4818, 46.8289, 2.58309, 604800, 52485, 1, ''), +(@CGUID+66, 20047, 550, 3845, 3845, 1, 651.426, 87.7581, 46.8958, 2.32129, 604800, 52485, 1, ''), +(@CGUID+67, 20048, 550, 3845, 3845, 1, 651.478, 85.3616, 46.9853, 2.46091, 604800, 52485, 1, ''), +(@CGUID+68, 20048, 550, 3845, 3845, 1, 644.955, 78.4049, 46.925, 2.18166, 604800, 52485, 1, ''), +(@CGUID+69, 20047, 550, 3845, 3845, 1, 642.403, 80.5288, 46.891, 2.14675, 604800, 52485, 1, ''), +(@CGUID+70, 20049, 550, 3845, 3845, 1, 641.161, 77.8304, 46.8841, 2.07694, 604800, 52485, 1, ''), +-- Devastator Patrol Group +(@CGUID+71, 20040, 550, 3845, 3845, 0, 426.624, 307.508, 17.4263, 2.90924, 604800, 52485, 1, ''), +(@CGUID+72, 20042, 550, 3845, 3845, 0, 428.721, 302.901, 18.0447, 3.37401, 604800, 52485, 1, ''), +(@CGUID+73, 20042, 550, 3845, 3845, 0, 432.467, 311.209, 17.1407, 3.40942, 604800, 52485, 1, ''), +-- Void Reaver Trash Group 1 +(@CGUID+74, 20042, 550, 3845, 3845, 0, 397.997, 361.119, 14.9771, 3.42085, 604800, 52485, 1, ''), +(@CGUID+75, 20041, 550, 3845, 3845, 0, 393.282, 353.826, 15.3139, 0.349066, 604800, 52485, 1, ''), +(@CGUID+76, 20041, 550, 3845, 3845, 0, 389.993, 363.854, 15.3363, 0.279253, 604800, 52485, 1, ''), +(@CGUID+77, 20052, 550, 3845, 3845, 0, 388.995, 355.609, 15.7319, 5.68977, 604800, 52485, 1, ''), +(@CGUID+78, 20052, 550, 3845, 3845, 0, 390.007, 370.393, 15.2625, 4.27606, 604800, 52485, 1, ''), +-- Void Reaver Trash Group 2 +(@CGUID+79, 20042, 550, 3845, 3845, 0, 468.497, 382.066, 14.9938, 0.925025, 604800, 52485, 1, ''), +(@CGUID+80, 20041, 550, 3845, 3845, 0, 473.639, 388.329, 15.3246, 3.49066, 604800, 52485, 1, ''), +(@CGUID+81, 20041, 550, 3845, 3845, 0, 476.323, 378.244, 15.319, 3.35103, 604800, 52485, 1, ''), +(@CGUID+82, 20052, 550, 3845, 3845, 0, 469.932, 393.257, 15.0503, 5.06145, 604800, 52485, 1, ''), +(@CGUID+83, 20052, 550, 3845, 3845, 0, 481.119, 376.113, 15.8953, 2.37365, 604800, 52485, 1, ''), +-- Void Reaver Trash Group 3 +(@CGUID+84, 20042, 550, 3845, 3845, 0, 426.618, 334.85, 14.6985, 4.29351, 604800, 52485, 1, ''), +(@CGUID+85, 20040, 550, 3845, 3845, 0, 423.913, 327.611, 15.2007, 1.48353, 604800, 52485, 1, ''), +(@CGUID+86, 20052, 550, 3845, 3845, 0, 425.733, 323.265, 15.5336, 1.8675, 604800, 52485, 1, ''), +(@CGUID+87, 20052, 550, 3845, 3845, 0, 418.131, 328.526, 15.5518, 6.12611, 604800, 52485, 1, ''), +-- Void Reaver Trash Group 4 +(@CGUID+88, 20042, 550, 3845, 3845, 0, 457.151, 344.334, 14.9878, 4.99164, 604800, 52485, 1, ''), +(@CGUID+89, 20040, 550, 3845, 3845, 0, 459.577, 337.187, 15.2522, 2.35619, 604800, 52485, 1, ''), +(@CGUID+90, 20052, 550, 3845, 3845, 0, 465.414, 336.68, 15.8237, 2.58309, 604800, 52485, 1, ''), +(@CGUID+91, 20052, 550, 3845, 3845, 0, 454.04, 334.52, 15.2268, 0.279253, 604800, 52485, 1, ''), +-- Void Reaver +(@CGUID+92, 19516, 550, 3845, 3845, 1, 424.235, 403.475, 14.9773, 4.99164, 604800, 52485, 1, ''), +-- Solarium Sentinel Group 1 +(@CGUID+93, 20041, 550, 3845, 3845, 0, 523.206, -137.925, 20.3386, 3.47321, 604800, 52485, 1, ''), +(@CGUID+94, 20041, 550, 3845, 3845, 0, 530.071, -158.822, 20.3428, 3.59538, 604800, 52485, 1, ''), +-- Solarium Astromancer Patrol 1 +(@CGUID+95, 20046, 550, 3845, 3845, 1, 518.096, -203.404, 20.2899, 1.42875, 604800, 52485, 1, ''), +(@CGUID+96, 20031, 550, 3845, 3845, 1, 511.841, -217.453, 20.3261, 1.35613, 604800, 52485, 1, ''), +(@CGUID+97, 20031, 550, 3845, 3845, 1, 521.336, -200.949, 20.2899, 1.40287, 604800, 52485, 1, ''), +-- Solarium Large Group 1 +(@CGUID+98 , 20036, 550, 3845, 3845, 1, 508.967, -158.539, 20.3488, 2.74017, 604800, 52485, 1, ''), +(@CGUID+99 , 20036, 550, 3845, 3845, 1, 503.468, -153.307, 20.5073, 5.5676, 604800, 52485, 1, ''), +(@CGUID+100, 20044, 550, 3845, 3845, 0, 507.289, -160.424, 20.3595, 2.32129, 604800, 52485, 1, ''), +(@CGUID+101, 20043, 550, 3845, 3845, 0, 505.014, -159.06, 20.4535, 6.19592, 604800, 52485, 1, ''), +(@CGUID+102, 20043, 550, 3845, 3845, 0, 506.688, -157.552, 20.3571, 3.94444, 604800, 52485, 1, ''), +(@CGUID+103, 20044, 550, 3845, 3845, 0, 504.446, -156.253, 21.616, 0.331613, 604800, 52485, 1, ''), +(@CGUID+104, 20043, 550, 3845, 3845, 0, 506.166, -154.226, 20.3567, 3.9619, 604800, 52485, 1, ''), +(@CGUID+105, 20043, 550, 3845, 3845, 0, 505.606, -151.263, 20.3535, 2.56563, 604800, 52485, 1, ''), +(@CGUID+106, 20043, 550, 3845, 3845, 0, 502.859, -151.514, 22.0813, 1.309, 604800, 52485, 1, ''), +(@CGUID+107, 20044, 550, 3845, 3845, 0, 502.495, -149.418, 20.3666, 4.90438, 604800, 52485, 1, ''), +(@CGUID+108, 20044, 550, 3845, 3845, 0, 505.813, -148.402, 20.3507, 3.92699, 604800, 52485, 1, ''), +(@CGUID+109, 20044, 550, 3845, 3845, 0, 503.185, -146.249, 20.3612, 5.5676, 604800, 52485, 1, ''), +-- Solarium Large Group 2 +(@CGUID+110, 20036, 550, 3845, 3845, 1, 516.322, -245.612, 20.313, 3.22886, 604800, 52485, 1, ''), +(@CGUID+111, 20036, 550, 3845, 3845, 1, 498.681, -241.203, 20.3194, 1.69297, 604800, 52485, 1, ''), +(@CGUID+112, 20043, 550, 3845, 3845, 0, 516.495, -247.968, 20.3432, 1.53589, 604800, 52485, 1, ''), +(@CGUID+113, 20044, 550, 3845, 3845, 0, 513.877, -247.938, 20.2956, 1.62316, 604800, 52485, 1, ''), +(@CGUID+114, 20043, 550, 3845, 3845, 0, 510.537, -246.791, 20.2972, 6.17847, 604800, 52485, 1, ''), +(@CGUID+115, 20043, 550, 3845, 3845, 0, 512.658, -244.061, 20.3157, 5.65487, 604800, 52485, 1, ''), +(@CGUID+116, 20044, 550, 3845, 3845, 0, 514.988, -242.226, 20.329, 4.45059, 604800, 52485, 1, ''), +(@CGUID+117, 20043, 550, 3845, 3845, 0, 502.845, -244.156, 20.3911, 1.23918, 604800, 52485, 1, ''), +(@CGUID+118, 20044, 550, 3845, 3845, 0, 504.222, -240.496, 20.3758, 4.18879, 604800, 52485, 1, ''), +(@CGUID+119, 20044, 550, 3845, 3845, 0, 504.087, -237.534, 20.3063, 3.82227, 604800, 52485, 1, ''), +(@CGUID+120, 20044, 550, 3845, 3845, 0, 500.876, -238.636, 20.3007, 4.7473, 604800, 52485, 1, ''), +(@CGUID+121, 20043, 550, 3845, 3845, 0, 501.313, -241.167, 20.2896, 0.541052, 604800, 52485, 1, ''), +-- Inquisitor Patrol 2 +(@CGUID+122, 20050, 550, 3845, 3845, 1, 579.707, -129.992, 36.0585, 3.51447, 604800, 52485, 1, ''), +(@CGUID+123, 20048, 550, 3845, 3845, 1, 578.594, -132.575, 35.6392, 3.51447, 604800, 52485, 1, ''), +(@CGUID+124, 20048, 550, 3845, 3845, 1, 577.125, -128.854, 35.7304, 3.51448, 604800, 52485, 1, ''), +-- Inquisitor Adds 3 +(@CGUID+125, 20047, 550, 3845, 3845, 1, 587.318, -118.038, 37.4877, 3.76991, 604800, 52485, 1, ''), +(@CGUID+126, 20049, 550, 3845, 3845, 1, 592.64, -116.013, 38.1448, 3.66519, 604800, 52485, 1, ''), +(@CGUID+127, 20048, 550, 3845, 3845, 1, 596.609, -116.181, 39.0845, 3.56047, 604800, 52485, 1, ''), +(@CGUID+128, 20048, 550, 3845, 3845, 1, 601.667, -127.031, 39.08, 3.19395, 604800, 52485, 1, ''), +(@CGUID+129, 20049, 550, 3845, 3845, 1, 598.754, -130.387, 37.9273, 3.08923, 604800, 52485, 1, ''), +(@CGUID+130, 20047, 550, 3845, 3845, 1, 595.457, -133.021, 36.7663, 2.98451, 604800, 52485, 1, ''), +-- Inquisitor Adds 4 +(@CGUID+131, 20049, 550, 3845, 3845, 1, 643.371, -78.528, 46.8777, 4.15388, 604800, 52485, 1, ''), +(@CGUID+132, 20047, 550, 3845, 3845, 1, 641.158, -80.6899, 46.888, 4.18879, 604800, 52485, 1, ''), +(@CGUID+133, 20048, 550, 3845, 3845, 1, 645.018, -81.1729, 46.9552, 4.08407, 604800, 52485, 1, ''), +(@CGUID+134, 20047, 550, 3845, 3845, 1, 651.704, -86.6527, 46.9888, 3.82227, 604800, 52485, 1, ''), +(@CGUID+135, 20048, 550, 3845, 3845, 1, 651.807, -89.1971, 46.8866, 3.76991, 604800, 52485, 1, ''), +(@CGUID+136, 20049, 550, 3845, 3845, 1, 654.186, -91.0955, 46.8259, 3.68264, 604800, 52485, 1, ''), +-- Solarium Scryer Patrol 1 +(@CGUID+137, 20045, 550, 3845, 3845, 1, 378.721, -340.152, 17.6167, 1.0789, 604800, 52485, 1, ''), +(@CGUID+138, 20031, 550, 3845, 3845, 1, 376.364, -338.635, 17.9907, 1.10453, 604800, 52485, 1, ''), +(@CGUID+139, 20031, 550, 3845, 3845, 1, 382.18, -340.06, 17.2407, 1.0797, 604800, 52485, 1, ''), +-- Solarium Scryer Patrol 2 +(@CGUID+140, 20045, 550, 3845, 3845, 1, 357.802, -381.258, 19.1234, 1.73986, 604800, 52485, 1, ''), +(@CGUID+141, 20031, 550, 3845, 3845, 1, 354.856, -375.172, 19.4846, 1.61889, 604800, 52485, 1, ''), +(@CGUID+142, 20031, 550, 3845, 3845, 1, 360.65, -374.18, 18.716, 1.61891, 604800, 52485, 1, ''), +-- Solarian Adds 1 +(@CGUID+143, 20036, 550, 3845, 3845, 1, 531.524, -379.077, 22.1002, 2.67035, 604800, 52485, 1, ''), +(@CGUID+144, 20043, 550, 3845, 3845, 0, 528.726, -364.973, 22.1002, 5.41052, 604800, 52485, 1, ''), +(@CGUID+145, 20044, 550, 3845, 3845, 0, 531.457, -366.802, 22.1002, 3.38594, 604800, 52485, 1, ''), +(@CGUID+146, 20043, 550, 3845, 3845, 0, 527.223, -368.722, 22.1002, 0.680678, 604800, 52485, 1, ''), +(@CGUID+147, 20043, 550, 3845, 3845, 0, 526.949, -375.876, 22.1001, 4.90438, 604800, 52485, 1, ''), +(@CGUID+148, 20044, 550, 3845, 3845, 0, 527.879, -381.096, 22.1001, 0.575959, 604800, 52485, 1, ''), +-- Solarian Adds 2 +(@CGUID+149, 20036, 550, 3845, 3845, 1, 512.518, -425.02, 22.1003, 0.802851, 604800, 52485, 1, ''), +(@CGUID+150, 20044, 550, 3845, 3845, 0, 521.402, -415.551, 22.1003, 2.84489, 604800, 52485, 1, ''), +(@CGUID+151, 20043, 550, 3845, 3845, 0, 519.811, -413.351, 22.1002, 5.27089, 604800, 52485, 1, ''), +(@CGUID+152, 20043, 550, 3845, 3845, 0, 518.084, -415.48, 22.1003, 0.331613, 604800, 52485, 1, ''), +(@CGUID+153, 20044, 550, 3845, 3845, 0, 515.806, -426.442, 22.1003, 2.56563, 604800, 52485, 1, ''), +(@CGUID+154, 20044, 550, 3845, 3845, 0, 513.288, -421.953, 22.1003, 5.11381, 604800, 52485, 1, ''), +-- Solarian Adds 3 +(@CGUID+155, 20036, 550, 3845, 3845, 1, 427.989, -468.895, 22.1003, 4.62512, 604800, 52485, 1, ''), +(@CGUID+156, 20044, 550, 3845, 3845, 0, 438.087, -471.081, 22.1003, 1.39626, 604800, 52485, 1, ''), +(@CGUID+157, 20043, 550, 3845, 3845, 0, 439.473, -468.015, 22.1003, 3.90954, 604800, 52485, 1, ''), +(@CGUID+158, 20044, 550, 3845, 3845, 0, 435.639, -466.829, 22.1003, 5.02655, 604800, 52485, 1, ''), +(@CGUID+159, 20043, 550, 3845, 3845, 0, 428.962, -474.042, 22.1003, 1.90241, 604800, 52485, 1, ''), +(@CGUID+160, 20043, 550, 3845, 3845, 0, 425.113, -471.939, 22.1003, 0.261799, 604800, 52485, 1, ''), +-- Solarian Adds 4 +(@CGUID+161, 20036, 550, 3845, 3845, 1, 391.798, -459.901, 22.1003, 3.94444, 604800, 52485, 1, ''), +(@CGUID+162, 20044, 550, 3845, 3845, 0, 388.877, -462.481, 22.1003, 1.62316, 604800, 52485, 1, ''), +(@CGUID+163, 20044, 550, 3845, 3845, 0, 388.687, -457.694, 22.1003, 1.8326, 604800, 52485, 1, ''), +(@CGUID+164, 20043, 550, 3845, 3845, 0, 376.944, -455.145, 22.1003, 5.60251, 604800, 52485, 1, ''), +(@CGUID+165, 20044, 550, 3845, 3845, 0, 375.265, -452.356, 22.1003, 4.59022, 604800, 52485, 1, ''), +(@CGUID+166, 20043, 550, 3845, 3845, 0, 380.025, -451.003, 22.1003, 3.47321, 604800, 52485, 1, ''), +-- Solarian Adds 5 +(@CGUID+167, 20036, 550, 3845, 3845, 1, 337.739, -380.531, 22.1003, 2.89725, 604800, 52485, 1, ''), +(@CGUID+168, 20044, 550, 3845, 3845, 0, 330.858, -377.786, 22.1003, 5.91667, 604800, 52485, 1, ''), +(@CGUID+169, 20044, 550, 3845, 3845, 0, 335.748, -376.818, 22.1003, 4.64258, 604800, 52485, 1, ''), +(@CGUID+170, 20043, 550, 3845, 3845, 0, 335.097, -368.078, 22.1003, 6.05629, 604800, 52485, 1, ''), +(@CGUID+171, 20043, 550, 3845, 3845, 0, 340.303, -370.587, 22.1003, 2.28638, 604800, 52485, 1, ''), +(@CGUID+172, 20043, 550, 3845, 3845, 0, 338.58, -366.39, 22.1003, 4.99164, 604800, 52485, 1, ''), +-- Solarian Adds 6 +(@CGUID+173, 20036, 550, 3845, 3845, 1, 351.418, -316.259, 22.1003, 5.14872, 604800, 52485, 1, ''), +(@CGUID+174, 20044, 550, 3845, 3845, 0, 343.001, -330.82, 22.1003, 5.55015, 604800, 52485, 1, ''), +(@CGUID+175, 20043, 550, 3845, 3845, 0, 344.225, -333.593, 22.1002, 2.28638, 604800, 52485, 1, ''), +(@CGUID+176, 20043, 550, 3845, 3845, 0, 346.987, -331.116, 22.1003, 2.47837, 604800, 52485, 1, ''), +(@CGUID+177, 20044, 550, 3845, 3845, 0, 352.458, -319.709, 22.1003, 1.81514, 604800, 52485, 1, ''), +(@CGUID+178, 20044, 550, 3845, 3845, 0, 354.351, -317.713, 22.1003, 3.29867, 604800, 52485, 1, ''), +-- Solarian +(@CGUID+179, 18805, 550, 3845, 3845, 1, 432.74, -373.645, 18.0138, 1.39626, 604800, 52485, 1, ''), +-- Kael Trash 1 +(@CGUID+180, 20050, 550, 3845, 3845, 1, 730.171, 45.3477, 46.8622, 3.4383, 604800, 52485, 1, ''), +(@CGUID+181, 20035, 550, 3845, 3845, 1, 724.668, 47.5516, 46.8622, 5.48033, 604800, 52485, 1, ''), +(@CGUID+182, 20048, 550, 3845, 3845, 1, 723.4, 42.6383, 46.8622, 0.436332, 604800, 52485, 1, ''), +(@CGUID+183, 20049, 550, 3845, 3845, 1, 728.148, 39.5604, 46.8622, 1.69297, 604800, 52485, 1, ''), +-- Kael Trash 2 +(@CGUID+184, 20048, 550, 3845, 3845, 1, 642.194, -5.84332, 46.8622, 0.122173, 604800, 52485, 1, ''), +(@CGUID+185, 20050, 550, 3845, 3845, 1, 639.662, -3.34107, 46.8622, 0.0523599, 604800, 52485, 1, ''), +(@CGUID+186, 20035, 550, 3845, 3845, 1, 639.83, 2.04339, 46.8622, 6.21337, 604800, 52485, 1, ''), +(@CGUID+187, 20049, 550, 3845, 3845, 1, 642.273, 4.88217, 46.8622, 6.16101, 604800, 52485, 1, ''), +-- Kael Trash 3 +(@CGUID+188, 20050, 550, 3845, 3845, 1, 727.479, -46.945, 46.8621, 2.11185, 604800, 52485, 1, ''), +(@CGUID+189, 20035, 550, 3845, 3845, 1, 728.804, -43.1283, 46.8621, 3.76991, 604800, 52485, 1, ''), +(@CGUID+190, 20048, 550, 3845, 3845, 1, 723.422, -42.6315, 46.8622, 5.34071, 604800, 52485, 1, ''), +(@CGUID+191, 20049, 550, 3845, 3845, 1, 722.735, -47.1292, 46.8622, 0.471239, 604800, 52485, 1, ''), +-- Kael Triggers +(@CGUID+192, 22515, 550, 3845, 3845, 0, 810.193, -0.727374, 50.1339, 3.14159, 604800, 52485, 1, ''), +(@CGUID+193, 22517, 550, 3845, 3845, 0, 766.725, -0.726238, 50.1339, 0.191986, 604800, 52485, 1, ''), +(@CGUID+194, 22517, 550, 3845, 3845, 0, 732.947, -0.566178, 46.8621, 3.61283, 604800, 52485, 1, ''), +(@CGUID+195, 22517, 550, 3845, 3845, 0, 708.809, -0.769152, 46.8622, 5.14872, 604800, 52485, 1, ''), +(@CGUID+196, 22517, 550, 3845, 3845, 0, 665.109, -0.950598, 46.8622, 4.41568, 604800, 52485, 1, ''), +(@CGUID+197, 22517, 550, 3845, 3845, 0, 701.936, 66.0507, 46.8622, 3.12414, 604800, 52485, 1, ''), +(@CGUID+198, 22517, 550, 3845, 3845, 0, 699.306, -67.6275, 46.8622, 1.51844, 604800, 52485, 1, ''), +-- Kael'Thas Outside Triggers +(@CGUID+199, 22517, 550, 3845, 3845, 0, 786.061, 65.8582, 100.425, 3.26377, 604800, 52485, 1, ''), +(@CGUID+200, 22517, 550, 3845, 3845, 0, 778.818, 56.6985, 126.99, 2.51327, 604800, 52485, 1, ''), +(@CGUID+201, 22517, 550, 3845, 3845, 0, 798.812, 61.567, 115.344, 3.76991, 604800, 52485, 1, ''), +(@CGUID+202, 22517, 550, 3845, 3845, 0, 799.482, 38.384, 84.1885, 3.83972, 604800, 52485, 1, ''), +(@CGUID+203, 22517, 550, 3845, 3845, 0, 799.883, -39.7906, 86.0409, 3.31613, 604800, 52485, 1, ''), +(@CGUID+204, 22517, 550, 3845, 3845, 0, 775.732, -61.3694, 119.499, 5.8294, 604800, 52485, 1, ''), +(@CGUID+205, 22517, 550, 3845, 3845, 0, 785.424, -52.2998, 134.915, 4.71239, 604800, 52485, 1, ''), +(@CGUID+206, 22517, 550, 3845, 3845, 0, 800.02, -62.7172, 109.617, 1.6057, 604800, 52485, 1, ''), +(@CGUID+207, 22517, 550, 3845, 3845, 0, 844.856, 6.18553, 65.8621, 0.244346, 604800, 52485, 1, ''), +(@CGUID+208, 22517, 550, 3845, 3845, 0, 844.888, -7.43957, 66.1399, 0.244346, 604800, 52485, 1, ''), +(@CGUID+209, 22517, 550, 3845, 3845, 0, 847.84, 14.6727, 64.7251, 3.78736, 604800, 52485, 1, ''), +(@CGUID+210, 22517, 550, 3845, 3845, 0, 849.409, 37.1127, 77.684, 4.92183, 604800, 52485, 1, ''), +(@CGUID+211, 22517, 550, 3845, 3845, 0, 848.437, 30.2841, 92.7951, 4.81711, 604800, 52485, 1, ''), +(@CGUID+212, 22517, 550, 3845, 3845, 0, 847.912, -16.2705, 64.8023, 4.66003, 604800, 52485, 1, ''), +(@CGUID+213, 22517, 550, 3845, 3845, 0, 847.203, -31.3597, 99.5797, 0.820305, 604800, 52485, 1, ''), +(@CGUID+214, 22517, 550, 3845, 3845, 0, 855.75, -1.33504, 112.826, 3.83972, 604800, 52485, 1, ''), +(@CGUID+215, 22517, 550, 3845, 3845, 0, 852.716, -17.1614, 111.899, 5.60251, 604800, 52485, 1, ''), +(@CGUID+216, 22517, 550, 3845, 3845, 0, 846.63, -37.764, 84.4061, 2.61799, 604800, 52485, 1, ''), +(@CGUID+217, 22517, 550, 3845, 3845, 0, 851.597, 17.9129, 109.899, 1.27409, 604800, 52485, 1, ''), +-- Kael & Advisors +(@CGUID+218, 19622, 550, 3845, 3845, 0, 795.408, -1.60475, 48.8118, 3.14159, 604800, 52485, 1, ''), +(@CGUID+219, 20064, 550, 3845, 3845, 1, 785.807, 19.4862, 48.8118, 3.97935, 604800, 52485, 1, ''), +(@CGUID+220, 20063, 550, 3845, 3845, 1, 792.725, 12.7754, 48.8118, 3.59538, 604800, 52485, 1, ''), +(@CGUID+221, 20062, 550, 3845, 3845, 1, 792.408, -13.2415, 48.8118, 2.68781, 604800, 52485, 1, ''), +(@CGUID+222, 20060, 550, 3845, 3845, 1, 785.782, -20.3995, 48.8118, 2.30383, 604800, 52485, 1, ''); + +-- Tempest Falconer Group 1 +SET @NPC := @CGUID+21; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,287.89716,14.272659,-2.3893754,NULL,20000,0,0,100,0), +(@PATH,2,314.9742,39.8861,-2.3890655,NULL,0,0,0,100,0), +(@PATH,3,350.92532,39.619263,-2.3884583,NULL,0,0,0,100,0), +(@PATH,4,376.66275,13.843831,-2.3868701,NULL,20000,0,0,100,0), +(@PATH,5,350.92532,39.619263,-2.3884583,NULL,0,0,0,100,0), +(@PATH,6,314.34283,40.37823,-2.3890648,NULL,0,0,0,100,0); + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+21; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+21, @CGUID+21, 0, 0, 3), +(@CGUID+21, @CGUID+22, 6, 90, 515), +(@CGUID+21, @CGUID+23, 3, 0, 515), +(@CGUID+21, @CGUID+24, 3, 60, 515), +(@CGUID+21, @CGUID+25, 3, 120, 515), +(@CGUID+21, @CGUID+26, 3, 180, 515), +(@CGUID+21, @CGUID+27, 3, 240, 515), +(@CGUID+21, @CGUID+28, 3, 300, 515); + +-- Tempest Falconer Group 2 +SET @NPC := @CGUID+29; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,377.03555,-15.332716,-2.3867216,NULL,20000,0,0,100,0), +(@PATH,2,350.90543,-41.430454,-2.3856533,NULL,0,0,0,100,0), +(@PATH,3,314.68127,-41.644608,-2.3894813,NULL,0,0,0,100,0), +(@PATH,4,288.23596,-15.741143,-2.3894465,NULL,20000,0,0,100,0), +(@PATH,5,314.1068,-41.330368,-2.3894804,NULL,0,0,0,100,0), +(@PATH,6,350.24118,-41.162407,-2.3858225,NULL,0,0,0,100,0); + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+29; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+29, @CGUID+29, 0, 0, 3), +(@CGUID+29, @CGUID+30, 6, 90, 515), +(@CGUID+29, @CGUID+31, 3, 0, 515), +(@CGUID+29, @CGUID+32, 3, 60, 515), +(@CGUID+29, @CGUID+33, 3, 120, 515), +(@CGUID+29, @CGUID+34, 3, 180, 515), +(@CGUID+29, @CGUID+35, 3, 240, 515), +(@CGUID+29, @CGUID+36, 3, 300, 515); + +-- Pathing for Phoenix-Hawk Entry: 20039 +SET @NPC := @CGUID+0; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=59.693306,`position_y`=-1.38827,`position_z`=-2.428264 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,59.693306,-1.38827,-2.428264,NULL,0,0,0,100,0), +(@PATH,2,73.21876,-1.467932,-2.428264,NULL,0,0,0,100,0), +(@PATH,3,90.9155,-1.446664,-2.391149,NULL,0,0,0,100,0), +(@PATH,4,110.70197,-1.826883,-2.3415165,NULL,10000,0,0,100,0), +(@PATH,5,139.67517,-1.740406,-2.4282646,NULL,0,0,0,100,0), +(@PATH,6,167.337,-1.744653,-2.4282644,NULL,0,0,0,100,0), +(@PATH,7,181.79326,-1.723237,-2.4566164,NULL,10000,0,0,100,0), +(@PATH,8,219.74161,-0.849849,-2.4282396,NULL,0,0,0,100,0), +(@PATH,9,250.74739,-0.837852,-2.4254498,NULL,0,0,0,100,0), +(@PATH,10,285.23624,-0.667373,-2.3893993,NULL,15000,0,0,100,0), +(@PATH,11,254.69905,-0.906747,-2.4255166,NULL,0,0,0,100,0), +(@PATH,12,234.27116,-0.930597,-2.4254591,NULL,0,0,0,100,0), +(@PATH,13,210.60254,-0.957067,-2.4282544,NULL,0,0,0,100,0), +(@PATH,14,184.18263,-1.004889,-2.445923,NULL,10000,0,0,100,0), +(@PATH,15,151.39961,-1.254917,-2.4282634,NULL,0,0,0,100,0), +(@PATH,16,111.48205,-1.692717,-2.3092167,NULL,10000,0,0,100,0), +(@PATH,17,77.92409,-1.4717377,-2.428264,NULL,0,0,0,100,0), +(@PATH,18,59.693306,-1.38827,-2.428264,NULL,10000,0,0,100,0); + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+0; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+0, @CGUID+0, 0, 0, 3), +(@CGUID+0, @CGUID+1, 3, 90, 515), +(@CGUID+0, @CGUID+2, 3, 270, 515); + +-- Pathing for Phoenix-Hawk Entry: 20039 +SET @NPC := @CGUID+38; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=392.50244,`position_y`=-74.72135,`position_z`=20.179325 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,392.50244,-74.72135,20.179325,NULL,0,1,0,100,0), +(@PATH,2,357.12787,-90.9714,20.050905,NULL,0,1,0,100,0), +(@PATH,3,308.62036,-90.155365,20.179476,NULL,0,1,0,100,0), +(@PATH,4,278.25125,-78.9372,20.179789,NULL,0,1,0,100,0), +(@PATH,5,245.54774,-44.11123,20.179893,NULL,0,1,0,100,0), +(@PATH,6,237.7101,-3.185129,26.845533,NULL,0,1,0,100,0), +(@PATH,7,244.19905,41.52916,20.181135,NULL,0,1,0,100,0), +(@PATH,8,264.55344,65.30175,20.179731,NULL,0,1,0,100,0), +(@PATH,9,306.48563,88.13809,20.179314,NULL,0,1,0,100,0), +(@PATH,10,351.13263,89.27576,20.209774,NULL,0,1,0,100,0), +(@PATH,11,390.0448,72.604225,20.17925,NULL,0,1,0,100,0), +(@PATH,12,411.91235,43.539856,20.179478,NULL,0,1,0,100,0), +(@PATH,13,424.0854,14.535274,20.179274,NULL,0,1,0,100,0), +(@PATH,14,423.90387,-27.01116,20.179367,NULL,0,1,0,100,0), +(@PATH,15,409.96698,-46.97388,20.179514,NULL,0,1,0,100,0); +-- 0x202F3044C01391C000031F00007EBF6F .go xyz 392.50244 -74.72135 20.179325 + +-- Pathing for Phoenix-Hawk Entry: 20039 +SET @NPC := @CGUID+37; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=243.69856,`position_y`=-30.80361,`position_z`=20.173082 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,243.69856,-30.80361,20.173082,NULL,0,1,0,100,0), +(@PATH,2,269.5972,-71.95888,20.180143,NULL,0,1,0,100,0), +(@PATH,3,295.8723,-83.535995,20.17968,NULL,0,1,0,100,0), +(@PATH,4,332.14322,-90.43943,20.276579,NULL,0,1,0,100,0), +(@PATH,5,371.6328,-83.46188,19.915161,NULL,0,1,0,100,0), +(@PATH,6,398.48242,-65.72802,20.179396,NULL,0,1,0,100,0), +(@PATH,7,409.35928,-46.213287,20.180698,NULL,0,1,0,100,0), +(@PATH,8,398.48242,-65.72802,20.179396,NULL,0,1,0,100,0), +(@PATH,9,371.6328,-83.46188,19.915161,NULL,0,1,0,100,0), +(@PATH,10,332.14322,-90.43943,20.276579,NULL,0,1,0,100,0), +(@PATH,11,295.8723,-83.535995,20.17968,NULL,0,1,0,100,0), +(@PATH,12,269.5972,-71.95888,20.180143,NULL,0,1,0,100,0), +(@PATH,13,251.01363,-49.446224,20.179844,NULL,0,1,0,100,0); +-- 0x202F3044C01391C000031F0000FEBF6F .go xyz 243.69856 -30.80361 20.173082 + +-- Pathing for Phoenix-Hawk Entry: 20039 +SET @NPC := @CGUID+40; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=244.32275,`position_y`=38.13153,`position_z`=20.180424 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,244.32275,38.13153,20.180424,NULL,0,1,0,100,0), +(@PATH,2,258.2736,58.820984,20.17975,NULL,0,1,0,100,0), +(@PATH,3,284.328,78.01011,20.17977,NULL,0,1,0,100,0), +(@PATH,4,309.90018,86.33295,20.179213,NULL,0,1,0,100,0), +(@PATH,5,351.08105,85.944336,20.148655,NULL,0,1,0,100,0), +(@PATH,6,378.6678,78.538414,20.175188,NULL,0,1,0,100,0), +(@PATH,7,400.30106,58.746677,20.17938,NULL,0,1,0,100,0), +(@PATH,8,407.83536,44.418842,20.179426,NULL,0,1,0,100,0), +(@PATH,9,378.6678,78.538414,20.175188,NULL,0,1,0,100,0), +(@PATH,10,351.08105,85.944336,20.148655,NULL,0,1,0,100,0), +(@PATH,11,309.90018,86.33295,20.179213,NULL,0,1,0,100,0), +(@PATH,12,284.328,78.01011,20.17977,NULL,0,1,0,100,0), +(@PATH,13,258.2736,58.820984,20.17975,NULL,0,1,0,100,0); +-- 0x202F3044C01391C000031F00017EBF6F .go xyz 244.32275 38.13153 20.180424 + +-- Pathing for Phoenix-Hawk Entry: 20039 +SET @NPC := @CGUID+39; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=393.09442,`position_y`=71.806984,`position_z`=20.179276 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,393.09442,71.806984,20.179276,NULL,0,1,0,100,0), +(@PATH,2,364.4904,86.93881,19.899294,NULL,0,1,0,100,0), +(@PATH,3,315.06958,88.61644,20.179047,NULL,0,1,0,100,0), +(@PATH,4,278.68005,77.846535,20.179838,NULL,0,1,0,100,0), +(@PATH,5,247.10265,42.687233,20.1815,NULL,0,1,0,100,0), +(@PATH,6,238.54498,-0.783009,27.160498,NULL,0,1,0,100,0), +(@PATH,7,248.1438,-44.6957,20.179852,NULL,0,1,0,100,0), +(@PATH,8,267.64313,-70.481125,20.180151,NULL,0,1,0,100,0), +(@PATH,9,304.74136,-89.18661,20.17961,NULL,0,1,0,100,0), +(@PATH,10,342.51788,-91.57152,20.239727,NULL,0,1,0,100,0), +(@PATH,11,372.6342,-85.409676,19.976616,NULL,0,1,0,100,0), +(@PATH,12,390.3265,-72.53096,20.179314,NULL,0,1,0,100,0), +(@PATH,13,408.78253,-48.827328,20.180618,NULL,0,1,0,100,0), +(@PATH,14,423.3208,-14.964696,20.179365,NULL,0,1,0,100,0), +(@PATH,15,423.24957,11.023921,20.179274,NULL,0,1,0,100,0), +(@PATH,16,409.24487,45.13489,20.179453,NULL,0,1,0,100,0); +-- 0x202F3044C01391C000031F0001FEBF6F .go xyz 393.09442 71.806984 20.179276 + +-- Pathing for Crystalcore Devastator Entry: 20040 +SET @NPC := @CGUID+51; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=511.54654,`position_y`=229.24347,`position_z`=20.301516 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,511.54654,229.24347,20.301516,NULL,0,0,0,100,0), +(@PATH,2,518.6552,206.79694,20.289883,NULL,0,0,0,100,0), +(@PATH,3,520.88763,179.39882,20.278658,NULL,0,0,0,100,0), +(@PATH,4,514.15625,150.00967,20.235924,NULL,0,0,0,100,0), +(@PATH,5,507.257,127.883,20.271929,NULL,0,0,0,100,0), +(@PATH,6,497.40924,110.58228,20.289906,NULL,0,0,0,100,0), +(@PATH,7,486.81604,97.507996,20.289883,NULL,0,0,0,100,0), +(@PATH,8,475.72092,86.03086,20.252535,NULL,0,0,0,100,0), +(@PATH,9,486.81604,97.507996,20.289883,NULL,0,0,0,100,0), +(@PATH,10,497.40924,110.58228,20.289906,NULL,0,0,0,100,0), +(@PATH,11,507.257,127.883,20.271929,NULL,0,0,0,100,0), +(@PATH,12,514.15625,150.00967,20.235924,NULL,0,0,0,100,0), +(@PATH,13,520.88763,179.39882,20.278658,NULL,0,0,0,100,0), +(@PATH,14,518.6552,206.79694,20.289883,NULL,0,0,0,100,0); +-- 0x202F3044C013920000031F00007EBF6F .go xyz 511.54654 229.24347 20.301516 + +-- Pathing for Crystalcore Devastator Entry: 20040 +SET @NPC := @CGUID+71; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=488.87756,`position_y`=342.66516,`position_z`=17.682777 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=488.87756,`position_y`=342.66516,`position_z`=17.682777 WHERE `guid`=@NPC+1; +UPDATE `creature` SET `position_x`=488.87756,`position_y`=342.66516,`position_z`=17.682777 WHERE `guid`=@NPC+2; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,488.87756,342.66516,17.682777,NULL,0,0,0,100,0), +(@PATH,2,480.81116,330.3677,17.701866,NULL,0,0,0,100,0), +(@PATH,3,460.9808,314.85217,17.816645,NULL,0,0,0,100,0), +(@PATH,4,430.38788,306.61725,17.640047,NULL,0,0,0,100,0), +(@PATH,5,402.40613,313.23843,18.359625,NULL,0,0,0,100,0), +(@PATH,6,386.8443,324.3896,18.262718,NULL,0,0,0,100,0), +(@PATH,7,402.40613,313.23843,18.359625,NULL,0,0,0,100,0), +(@PATH,8,430.38788,306.61725,17.640047,NULL,0,0,0,100,0), +(@PATH,9,460.9808,314.85217,17.816645,NULL,0,0,0,100,0), +(@PATH,10,480.81116,330.3677,17.701866,NULL,0,0,0,100,0); +-- 0x202F3044C013920000031F00017EBF6F .go xyz 488.87756 342.66516 17.682777 + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+71; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+71, @CGUID+71, 0, 0, 3), +(@CGUID+71, @CGUID+72, 3, 90, 515), +(@CGUID+71, @CGUID+73, 3, 270, 515); + +-- Pathing for Crimson Hand Inquisitor Entry: 20050 +SET @NPC := @CGUID+56; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=564.6969,`position_y`=134.79558,`position_z`=32.850483 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=564.6969,`position_y`=134.79558,`position_z`=32.850483 WHERE `guid`=@NPC+1; +UPDATE `creature` SET `position_x`=564.6969,`position_y`=134.79558,`position_z`=32.850483 WHERE `guid`=@NPC+2; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,564.6969,134.79558,32.850483,NULL,0,0,0,100,0), +(@PATH,2,578.00616,129.33405,35.686752,NULL,0,0,0,100,0), +(@PATH,3,586.87726,125.51434,36.059555,NULL,0,0,0,100,0), +(@PATH,4,596.7023,121.07731,38.24356,NULL,0,0,0,100,0), +(@PATH,5,612.29346,113.80901,43.52018,NULL,0,0,0,100,0), +(@PATH,6,627.3768,104.11148,46.740154,NULL,0,0,0,100,0), +(@PATH,7,642.7598,88.49879,46.82853,NULL,0,0,0,100,0), +(@PATH,8,657.5163,70.17264,46.771988,NULL,0,0,0,100,0), +(@PATH,9,642.7598,88.49879,46.82853,NULL,0,0,0,100,0), +(@PATH,10,627.3768,104.11148,46.740154,NULL,0,0,0,100,0), +(@PATH,11,612.29346,113.80901,43.52018,NULL,0,0,0,100,0), +(@PATH,12,596.7023,121.07731,38.24356,NULL,0,0,0,100,0), +(@PATH,13,586.87726,125.51434,36.059555,NULL,0,0,0,100,0), +(@PATH,14,578.00616,129.33405,35.686752,NULL,0,0,0,100,0); +-- 0x202F3044C013948000031F00027EBF6F .go xyz 564.6969 134.79558 32.850483 + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+56; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+56, @CGUID+56, 0, 0, 3), +(@CGUID+56, @CGUID+57, 3, 90, 515), +(@CGUID+56, @CGUID+58, 3, 270, 515); + +-- Pathing for Crimson Hand Inquisitor Entry: 20050 +SET @NPC := @CGUID+122; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=569.4054,`position_y`=-134.02185,`position_z`=33.929092 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=569.4054,`position_y`=-134.02185,`position_z`=33.929092 WHERE `guid`=@NPC+1; +UPDATE `creature` SET `position_x`=569.4054,`position_y`=-134.02185,`position_z`=33.929092 WHERE `guid`=@NPC+2; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,569.4054,-134.02185,33.929092,NULL,0,0,0,100,0), +(@PATH,2,588.5716,-126.52433,36.050453,NULL,0,0,0,100,0), +(@PATH,3,597.0831,-122.83465,38.35739,NULL,0,0,0,100,0), +(@PATH,4,614.51105,-114.18895,44.410213,NULL,0,0,0,100,0), +(@PATH,5,629.024,-104.85851,46.76857,NULL,0,0,0,100,0), +(@PATH,6,644.30804,-89.03651,46.81918,NULL,0,0,0,100,0), +(@PATH,7,658.1658,-70.976105,46.769356,NULL,0,0,0,100,0), +(@PATH,8,644.30804,-89.03651,46.81918,NULL,0,0,0,100,0), +(@PATH,9,629.024,-104.85851,46.76857,NULL,0,0,0,100,0), +(@PATH,10,614.51105,-114.18895,44.410213,NULL,0,0,0,100,0), +(@PATH,11,597.0831,-122.83465,38.35739,NULL,0,0,0,100,0), +(@PATH,12,588.5716,-126.52433,36.050453,NULL,0,0,0,100,0); +-- 0x202F3044C013948000031F0000FEBF6F .go xyz 569.4054 -134.02185 33.929092 + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+122; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+122, @CGUID+122, 0, 0, 3), +(@CGUID+122, @CGUID+123, 3, 90, 515), +(@CGUID+122, @CGUID+124, 3, 270, 515); + +-- Pathing for Astromancer Lord Entry: 20046 +SET @NPC := @CGUID+95; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=511.51535,`position_y`=-232.16605,`position_z`=20.341183 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=511.51535,`position_y`=-232.16605,`position_z`=20.341183 WHERE `guid`=@NPC+1; +UPDATE `creature` SET `position_x`=511.51535,`position_y`=-232.16605,`position_z`=20.341183 WHERE `guid`=@NPC+2; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,511.51535,-232.16605,20.341183,NULL,0,0,0,100,0), +(@PATH,2,517.4262,-208.08437,20.289856,NULL,0,0,0,100,0), +(@PATH,3,520.61035,-185.82002,20.289864,NULL,0,0,0,100,0), +(@PATH,4,517.2678,-163.51216,20.239647,NULL,0,0,0,100,0), +(@PATH,5,511.05252,-140.89236,20.237894,NULL,0,0,0,100,0), +(@PATH,6,502.49777,-118.99611,20.28987,NULL,0,0,0,100,0), +(@PATH,7,491.02115,-103.594,20.289865,NULL,0,0,0,100,0), +(@PATH,8,473.84668,-84.87884,20.216114,NULL,0,0,0,100,0), +(@PATH,9,491.02115,-103.594,20.289865,NULL,0,0,0,100,0), +(@PATH,10,502.49777,-118.99611,20.28987,NULL,0,0,0,100,0), +(@PATH,11,511.05252,-140.89236,20.237894,NULL,0,0,0,100,0), +(@PATH,12,517.2678,-163.51216,20.239647,NULL,0,0,0,100,0), +(@PATH,13,520.61035,-185.82002,20.289864,NULL,0,0,0,100,0), +(@PATH,14,517.4262,-208.08437,20.289856,NULL,0,0,0,100,0); +-- 0x202F3044C013938000031F00007EBF6F .go xyz 511.51535 -232.16605 20.341183 + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+95; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+95, @CGUID+95, 0, 0, 3), +(@CGUID+95, @CGUID+96, 3, 90, 515), +(@CGUID+95, @CGUID+97, 3, 270, 515); + +-- Pathing for Nether Scryer Entry: 20045 +SET @NPC := @CGUID+137; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=432.46014,`position_y`=-306.89252,`position_z`=17.850367 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=432.46014,`position_y`=-306.89252,`position_z`=17.850367 WHERE `guid`=@NPC+1; +UPDATE `creature` SET `position_x`=432.46014,`position_y`=-306.89252,`position_z`=17.850367 WHERE `guid`=@NPC+2; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,432.46014,-306.89252,17.850367,NULL,0,0,0,100,0), +(@PATH,2,417.19766,-309.42938,17.6053,NULL,0,0,0,100,0), +(@PATH,3,399.2576,-317.97568,17.702955,NULL,0,0,0,100,0), +(@PATH,4,383.51407,-331.20804,17.805042,NULL,0,0,0,100,0), +(@PATH,5,374.15472,-348.67526,17.487862,NULL,0,0,0,100,0), +(@PATH,6,370.50394,-367.0732,17.405085,NULL,0,0,0,100,0), +(@PATH,7,371.08066,-386.68857,17.533276,NULL,0,0,0,100,0), +(@PATH,8,381.10196,-408.29456,17.412575,NULL,0,0,0,100,0), +(@PATH,9,405.18607,-431.40958,17.642626,NULL,0,0,0,100,0), +(@PATH,10,439.38635,-435.45056,17.482557,NULL,0,0,0,100,0), +(@PATH,11,467.38907,-425.20914,17.372616,NULL,0,0,0,100,0), +(@PATH,12,491.7526,-395.2942,17.357338,NULL,0,0,0,100,0), +(@PATH,13,495.274,-374.78607,17.28109,NULL,0,0,0,100,0), +(@PATH,14,493.10938,-352.27258,17.425085,NULL,0,0,0,100,0), +(@PATH,15,487.1593,-339.02164,17.490557,NULL,0,0,0,100,0), +(@PATH,16,493.10938,-352.27258,17.425085,NULL,0,0,0,100,0), +(@PATH,17,495.274,-374.78607,17.28109,NULL,0,0,0,100,0), +(@PATH,18,491.7526,-395.2942,17.357338,NULL,0,0,0,100,0), +(@PATH,19,467.38907,-425.20914,17.372616,NULL,0,0,0,100,0), +(@PATH,20,439.38635,-435.45056,17.482557,NULL,0,0,0,100,0), +(@PATH,21,405.18607,-431.40958,17.642626,NULL,0,0,0,100,0), +(@PATH,22,381.10196,-408.29456,17.412575,NULL,0,0,0,100,0), +(@PATH,23,371.08066,-386.68857,17.533276,NULL,0,0,0,100,0), +(@PATH,24,370.50394,-367.0732,17.405085,NULL,0,0,0,100,0), +(@PATH,25,374.15472,-348.67526,17.487862,NULL,0,0,0,100,0), +(@PATH,26,383.51407,-331.20804,17.805042,NULL,0,0,0,100,0), +(@PATH,27,399.2576,-317.97568,17.702955,NULL,0,0,0,100,0), +(@PATH,28,417.19766,-309.42938,17.6053,NULL,0,0,0,100,0); +-- 0x202F3044C013934000031F00007EBF6F .go xyz 432.46014 -306.89252 17.850367 + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+137; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+137, @CGUID+137, 0, 0, 3), +(@CGUID+137, @CGUID+138, 3, 90, 515), +(@CGUID+137, @CGUID+139, 3, 270, 515); + +-- Pathing for Nether Scryer Entry: 20045 +SET @NPC := @CGUID+140; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `wander_distance`=0,`MovementType`=2,`position_x`=431.24652,`position_y`=-296.3426,`position_z`=19.22379 WHERE `guid`=@NPC; +UPDATE `creature` SET `position_x`=431.24652,`position_y`=-296.3426,`position_z`=19.22379 WHERE `guid`=@NPC+1; +UPDATE `creature` SET `position_x`=431.24652,`position_y`=-296.3426,`position_z`=19.22379 WHERE `guid`=@NPC+2; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,431.24652,-296.3426,19.22379,NULL,0,0,0,100,0), +(@PATH,2,406.47583,-299.69058,19.35887,NULL,0,0,0,100,0), +(@PATH,3,386.1362,-311.37195,19.263794,NULL,0,0,0,100,0), +(@PATH,4,374.23172,-324.27585,19.34557,NULL,0,0,0,100,0), +(@PATH,5,361.30313,-344.0715,19.270725,NULL,0,0,0,100,0), +(@PATH,6,356.12393,-371.42795,19.313976,NULL,0,0,0,100,0), +(@PATH,7,359.95117,-393.84915,19.193377,NULL,0,0,0,100,0), +(@PATH,8,368.76376,-414.8379,19.26806,NULL,0,0,0,100,0), +(@PATH,9,384.52292,-432.4314,19.266508,NULL,0,0,0,100,0), +(@PATH,10,403.0607,-444.6788,19.3033,NULL,0,0,0,100,0), +(@PATH,11,425.69485,-450.00244,19.294594,NULL,0,0,0,100,0), +(@PATH,12,462.22357,-444.87628,19.263426,NULL,0,0,0,100,0), +(@PATH,13,492.56067,-424.456,19.386421,NULL,0,0,0,100,0), +(@PATH,14,504.81592,-404.91983,19.338032,NULL,0,0,0,100,0), +(@PATH,15,510.29065,-382.46686,19.228214,NULL,0,0,0,100,0), +(@PATH,16,509.67813,-363.055,19.14545,NULL,0,0,0,100,0), +(@PATH,17,505.61807,-344.76736,19.232473,NULL,0,0,0,100,0), +(@PATH,18,500.6301,-334.621,19.279722,NULL,0,0,0,100,0), +(@PATH,19,505.61807,-344.76736,19.232473,NULL,0,0,0,100,0), +(@PATH,20,509.67813,-363.055,19.14545,NULL,0,0,0,100,0), +(@PATH,21,510.29065,-382.46686,19.228214,NULL,0,0,0,100,0), +(@PATH,22,504.81592,-404.91983,19.338032,NULL,0,0,0,100,0), +(@PATH,23,492.56067,-424.456,19.386421,NULL,0,0,0,100,0), +(@PATH,24,462.22357,-444.87628,19.263426,NULL,0,0,0,100,0), +(@PATH,25,425.69485,-450.00244,19.294594,NULL,0,0,0,100,0), +(@PATH,26,403.0607,-444.6788,19.3033,NULL,0,0,0,100,0), +(@PATH,27,384.52292,-432.4314,19.266508,NULL,0,0,0,100,0), +(@PATH,28,368.76376,-414.8379,19.26806,NULL,0,0,0,100,0), +(@PATH,29,359.95117,-393.84915,19.193377,NULL,0,0,0,100,0), +(@PATH,30,356.12393,-371.42795,19.313976,NULL,0,0,0,100,0); +-- 0x202F3044C013934000031F00007EBF70 .go xyz 431.24652 -296.3426 19.22379 + +DELETE FROM `creature_formations` WHERE `leaderGUID` = @CGUID+140; +INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES +(@CGUID+140, @CGUID+140, 0, 0, 3), +(@CGUID+140, @CGUID+141, 3, 90, 515), +(@CGUID+140, @CGUID+142, 3, 270, 515); + +SET @NPC := @CGUID+41; +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`visibilityDistanceType`,`auras`) VALUES (@NPC,@PATH,0,0,1,0,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +-- (@PATH,1 ,367.05917,-47.550934,28.353302,NULL,0,2,0,100,0), -- Too Low +-- (@PATH,2 ,375.2119,-24.148783,39.759647,NULL,0,2,0,100,0), -- Too Low +(@PATH,1 ,383.36465,-0.746633,51.165993,NULL,0,2,0,100,0), +(@PATH,2 ,370.69662,31.525703,50.725266,NULL,0,2,0,100,0), +(@PATH,3 ,333.1678,46.373028,50.2253,NULL,0,2,0,100,0), +(@PATH,4 ,293.9196,31.22106,50.141933,NULL,0,2,0,100,0), +(@PATH,5 ,282.43225,-0.398529,50.6697,NULL,0,2,0,100,0), +(@PATH,6 ,294.0769,-32.292305,50.669724,NULL,0,2,0,100,0), +(@PATH,7 ,332.2219,-47.70136,51.003056,NULL,0,2,0,100,0), +(@PATH,8 ,370.60782,-33.38683,50.892067,NULL,0,2,0,100,0); +-- (@PATH,9 ,383.36465,-0.746633,51.165993,NULL,0,2,0,100,0), -- Repeat +-- (@PATH,10,370.69662,31.525703,50.725266,NULL,0,2,0,100,0); -- Repeat + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20052); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20052, 0, 0, 0, 0, 0, 100, 0, 4000, 6000, 12000, 14000, 0, 0, 11, 37123, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Crystalcore Mechanic - In Combat - Cast \'Saw Blade\''), +(20052, 0, 1, 0, 74, 0, 100, 0, 7000, 8000, 20000, 30000, 50, 100, 11, 37121, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Crystalcore Mechanic - On Friendly Below 50% Health - Cast \'Recharge\''), +(20052, 0, 2, 0, 1, 0, 100, 0, 20000, 90000, 20000, 90000, 0, 0, 80, 2005200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crystalcore Mechanic - Out of Combat - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2005200); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2005200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 17, 28, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crystalcore Mechanic - Actionlist - Set Emote State 28'), +(2005200, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crystalcore Mechanic - Actionlist - Set Emote State 0'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 20042) AND (`source_type` = 0) AND (`id` IN (4)); + +UPDATE `creature_text` SET `Emote`=1, `BroadcastTextId`=17818 WHERE `CreatureID`=20042 AND `GroupID`=0 AND `ID`=0; +DELETE FROM `creature_text` WHERE `CreatureID` = 20042 AND `GroupID` = 1; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Emote`, `BroadcastTextId`, `comment`) VALUES +(20042, 1, 0, 'Golem movement appears to be within the specifications.', 12, 1, 17839, 'Tempest-Smith'), +(20042, 1, 1, 'I\'ll be glad when final testing of this unit is complete.', 12, 1, 17840, 'Tempest-Smith'), +(20042, 1, 2, 'After this mobility test, we\'ll only have the final weapons check to complete.', 12, 1, 17841, 'Tempest-Smith'); + +DELETE FROM `creature_addon` WHERE (`guid` = @CGUID+73); +INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES +(@CGUID+73, 0, 0, 0, 1, 378, 3, NULL); + +DELETE FROM `creature_text` WHERE `CreatureID` = 20041 AND `GroupID` = 0; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Emote`, `BroadcastTextId`, `comment`) VALUES +(20041, 0, 0, 'This unit is currently at ninety five percent operational efficiency.', 12, 0, 17820, 'Crystalcore Sentinel/Destroyer'), +(20041, 0, 1, 'This unit is currently performing within normal parameters.', 12, 0, 17821, 'Crystalcore Sentinel/Destroyer'); + +DELETE FROM `creature_text` WHERE `CreatureID` = 20040 AND `GroupID` = 0; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Emote`, `BroadcastTextId`, `comment`) VALUES +(20040, 0, 0, 'This unit is currently at ninety five percent operational efficiency.', 12, 0, 17820, 'Crystalcore Sentinel/Destroyer'), +(20040, 0, 1, 'This unit is currently performing within normal parameters.', 12, 0, 17821, 'Crystalcore Sentinel/Destroyer'); + +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|134217728 WHERE (`entry` = 20042); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-(@CGUID+74),-(@CGUID+84),-(@CGUID+88),-(@CGUID+79),-(@CGUID+72),-(@CGUID+73))) AND (`source_type` = 0) AND (`id` IN (1000)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(-(@CGUID+74), 0, 1000, 0, 1, 0, 100, 0, 15000, 90000, 15000, 90000, 0, 0, 87, 2004200, 2004201, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Out of Combat - Run Random Script'), +(-(@CGUID+84), 0, 1000, 0, 1, 0, 100, 0, 15000, 90000, 15000, 90000, 0, 0, 87, 2004200, 2004201, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Out of Combat - Run Random Script'), +(-(@CGUID+88), 0, 1000, 0, 1, 0, 100, 0, 15000, 90000, 15000, 90000, 0, 0, 87, 2004200, 2004201, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Out of Combat - Run Random Script'), +(-(@CGUID+79), 0, 1000, 0, 1, 0, 100, 0, 15000, 90000, 15000, 90000, 0, 0, 87, 2004200, 2004201, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Out of Combat - Run Random Script'), +(-(@CGUID+72), 0, 1000, 0, 1, 0, 100, 0, 15000, 90000, 15000, 90000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Out of Combat - Say Line 1'), +(-(@CGUID+73), 0, 1000, 0, 1, 0, 100, 0, 15000, 90000, 15000, 90000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Out of Combat - Say Line 1'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2004200); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2004200, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 34946, 0, 0, 0, 0, 0, 19, 20040, 10, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Actionlist - Cast \'Golem Repair\''), +(2004200, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 34946, 0, 0, 0, 0, 0, 19, 20041, 10, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Actionlist - Cast \'Golem Repair\''); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2004201); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2004201, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Actionlist - Say Line 0'), +(2004201, 9, 1, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 20040, 10, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Actionlist - Say Line 0'), +(2004201, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 20041, 10, 0, 0, 0, 0, 0, 0, 'Tempest-Smith - Actionlist - Say Line 0'); + +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|134217728 WHERE (`entry` = 20037); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20037); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20037, 0, 0, 0, 23, 0, 100, 0, 37318, 0, 3600, 3600, 0, 0, 11, 37318, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - On Aura \'Fire Shield\' - Cast \'Fire Shield\''), +(20037, 0, 1, 0, 9, 0, 100, 0, 1200, 2400, 3600, 4800, 0, 45, 11, 39079, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - Within 0-45 Range - Cast \'Shoot\''), +(20037, 0, 2, 0, 0, 0, 100, 0, 14000, 18000, 18000, 28000, 0, 0, 11, 37154, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - In Combat - Cast \'Immolation Arrow\''), +(20037, 0, 3, 0, 9, 0, 100, 0, 6000, 11000, 15000, 19000, 0, 8, 11, 37317, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - Within 0-8 Range - Cast \'Knockback\''); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-(@CGUID+21), -(@CGUID+29))) AND (`source_type` = 0) AND (`id` IN (1000, 1001)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(-(@CGUID+21), 0, 1000, 0, 34, 0, 100, 0, 2, 0, 0, 0, 0, 0, 80, 2003700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - On Reached Point 1 - Run Script'), +(-(@CGUID+21), 0, 1001, 0, 34, 0, 100, 0, 2, 3, 0, 0, 0, 0, 80, 2003700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - On Reached Point 4 - Run Script'), +(-(@CGUID+29), 0, 1000, 0, 34, 0, 100, 0, 2, 0, 0, 0, 0, 0, 80, 2003700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - On Reached Point 1 - Run Script'), +(-(@CGUID+29), 0, 1001, 0, 34, 0, 100, 0, 2, 3, 0, 0, 0, 0, 80, 2003700, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Tempest Falconer - On Reached Point 4 - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2003700); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2003700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 9, 20038, 0, 20, 1, 0, 0, 0, 0, 'Tempest Falconer - Actionlist - Start Random Movement'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20035); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20035, 0, 0, 0, 0, 0, 100, 0, 10000, 20000, 15000, 25000, 0, 0, 11, 35949, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - In Combat - Cast \'Bloodthirst\''), +(20035, 0, 1, 0, 0, 0, 100, 0, 19000, 29000, 22000, 31000, 0, 0, 11, 34996, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - In Combat - Cast \'Uppercut\''), +(20035, 0, 2, 0, 0, 0, 100, 0, 10000, 15000, 14000, 17000, 0, 0, 11, 36132, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - In Combat - Cast \'Whirlwind\''); + +DELETE FROM `creature_text` WHERE `CreatureID` IN (20031, 20035); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Type`, `Emote`, `comment`, `BroadcastTextId`, `Text`) VALUES +(20031, 0, 0, 14, 0, 'Bloodwarder Legionnaire - First Squad', 18030, 'First squad is ready for battle!'), +(20031, 0, 1, 14, 0, 'Bloodwarder Legionnaire - First Squad', 18031, 'All clear!'), +(20031, 0, 2, 14, 0, 'Bloodwarder Legionnaire - First Squad', 18032, 'We stand ready to defend the Eye!'), +(20031, 1, 0, 14, 0, 'Bloodwarder Legionnaire - Second Squad', 18035, 'Second squad is ready to fight!'), +(20031, 1, 1, 14, 0, 'Bloodwarder Legionnaire - Second Squad', 18036, 'The enemy will not get past us!'), +(20031, 1, 2, 14, 0, 'Bloodwarder Legionnaire - Second Squad', 18037, 'Our blades and spells are at the ready!'), +(20031, 2, 0, 14, 0, 'Bloodwarder Legionnaire - Third Squad', 18038, 'Third squad reporting in!'), +(20031, 2, 1, 14, 0, 'Bloodwarder Legionnaire - Third Squad', 18039, 'We will show our enemies no quarter!'), +(20031, 2, 2, 14, 0, 'Bloodwarder Legionnaire - Third Squad', 18040, 'Our defenses stand ready!'), + +(20035, 0, 0, 14, 66, 'Bloodwarder Marshal', 18045, 'As you were!'), +(20035, 0, 1, 14, 66, 'Bloodwarder Marshal', 18046, 'Stand vigilant.'), +(20035, 0, 2, 14, 66, 'Bloodwarder Marshal', 18047, 'Very well.'), +(20035, 0, 3, 14, 66, 'Bloodwarder Marshal', 18048, 'Excellent work.'), +(20035, 0, 4, 14, 66, 'Bloodwarder Marshal', 18049, 'Your conduct makes me proud.'); + +UPDATE `creature_template` SET `flags_extra` = `flags_extra`|134217728 WHERE (`entry` = 20035); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = (-(@CGUID+0))) AND (`source_type` = 0) AND (`id` IN (1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(-(@CGUID+0), 0, 1000, 0, 34, 0, 50, 0, 2, 3, 0, 0, 0, 0, 80, 2003502, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - On Point 4 of Path Reached - Run Script for Second Squad'), +(-(@CGUID+0), 0, 1001, 0, 34, 0, 50, 0, 2, 6, 0, 0, 0, 0, 80, 2003503, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - On Point 7 of Path Reached - Run Script for Third Squad'), +(-(@CGUID+0), 0, 1002, 0, 34, 0, 50, 0, 2, 13, 0, 0, 0, 0, 80, 2003503, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - On Point 14 of Path Reached - Run Script for Third Squad'), +(-(@CGUID+0), 0, 1003, 0, 34, 0, 50, 0, 2, 15, 0, 0, 0, 0, 80, 2003502, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - On Point 16 of Path Reached - Run Script for Second Squad'), +(-(@CGUID+0), 0, 1004, 0, 34, 0, 50, 0, 2, 17, 0, 0, 0, 0, 80, 2003501, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - On Point 18 of Path Reached - Run Script for First Squad'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` IN (2003500, 2003501, 2003502, 2003503)); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(2003501, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 0, 0, 15, 1, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Set Data 1 1'), +(2003501, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 10, @CGUID+05, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Say Line 0'), +(2003501, 9, 2, 0, 0, 0, 100, 0, 4800, 4800, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Say Line 0'), + +(2003502, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 0, 0, 15, 1, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Set Data 1 1'), +(2003502, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 10, @CGUID+09, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Say Line 1'), +(2003502, 9, 2, 0, 0, 0, 100, 0, 4800, 4800, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Say Line 0'), + +(2003503, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 0, 0, 15, 1, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Set Data 1 1'), +(2003503, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 10, @CGUID+17, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Say Line 2'), +(2003503, 9, 2, 0, 0, 0, 100, 0, 4800, 4800, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal - Actionlist - Say Line 0'), + +(2003500, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 10, @CGUID+00, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal RP - Actionlist - Set Orientation Closest Creature \'Bloodwarder Marshal\''), +(2003500, 9, 1, 0, 0, 0, 100, 0, 200, 200, 0, 0, 0, 0, 5, 66, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal RP - Actionlist - Play Emote 66'), +(2003500, 9, 2, 0, 0, 0, 100, 0, 4600, 4600, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Marshal RP - Actionlist - Set Orientation Home Position'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20031); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20031, 0, 0, 0, 0, 0, 100, 0, 8000, 18000, 22000, 24000, 0, 0, 11, 35949, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Legionnaire - In Combat - Cast \'Bloodthirst\''), +(20031, 0, 1, 0, 0, 0, 100, 0, 7000, 13000, 17000, 20000, 0, 0, 11, 15284, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Legionnaire - In Combat - Cast \'Cleave\''), +(20031, 0, 2, 0, 0, 0, 100, 0, 10000, 16000, 18000, 27000, 0, 0, 11, 33500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Legionnaire - In Combat - Cast \'Whirlwind\''), +(20031, 0, 3, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 2003500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Legionnaire - On Data Set 1 1 - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20032); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20032, 0, 0, 0, 15, 0, 100, 0, 30, 5000, 10000, 0, 0, 0, 11, 39078, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Vindicator - On Friendly Crowd Controlled - Cast \'Cleanse\''), +(20032, 0, 1, 0, 0, 0, 100, 0, 3000, 12000, 15000, 20000, 0, 0, 11, 13005, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Vindicator - In Combat - Cast \'Hammer of Justice\''), +(20032, 0, 2, 0, 12, 0, 100, 0, 0, 20, 10000, 10000, 0, 0, 11, 37251, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Vindicator - Target Between 0-20% Health - Cast \'Hammer of Wrath\''), +(20032, 0, 3, 0, 74, 0, 100, 0, 5000, 8000, 5000, 8000, 20, 40, 11, 37249, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Vindicator - On Friendly Below 20% Health - Cast \'Flash of Light\''), +(20032, 0, 4, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 2003500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Bloodwarder Vindicator - On Data Set 1 1 - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20033); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20033, 0, 0, 0, 23, 0, 100, 0, 35915, 0, 3600, 3600, 0, 0, 11, 35915, 32, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer - On Aura \'Molten Armor\' - Cast \'Molten Armor\''), +(20033, 0, 1, 0, 0, 0, 100, 0, 8000, 13000, 11000, 16000, 0, 0, 11, 37109, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer - In Combat - Cast \'Fireball Volley\''), +(20033, 0, 2, 0, 0, 0, 100, 0, 14000, 19000, 18000, 28000, 0, 0, 11, 37110, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer - In Combat - Cast \'Fire Blast\''), +(20033, 0, 3, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 2003500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer - On Data Set 1 1 - Run Script'); + +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20034); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20034, 0, 0, 0, 0, 0, 100, 0, 13000, 16000, 13000, 25000, 0, 0, 11, 37126, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Star Scryer - In Combat - Cast \'Arcane Blast\''), +(20034, 0, 1, 0, 0, 0, 100, 0, 7000, 12000, 22000, 30000, 0, 0, 11, 37124, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, 0, 0, 0, 0, 'Star Scryer - In Combat - Cast \'Starfall\''), +(20034, 0, 2, 0, 0, 0, 100, 0, 8000, 16000, 21000, 36000, 0, 0, 11, 37122, 32, 0, 0, 0, 0, 6, 20, 0, 0, 0, 0, 0, 0, 0, 'Star Scryer - In Combat - Cast \'Domination\''), +(20034, 0, 3, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 80, 2003500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Star Scryer - On Data Set 1 1 - Run Script'); + +-- Static Formations +DELETE FROM `creature_formations` WHERE `memberGUID` IN (@CGUID+03,@CGUID+04,@CGUID+05,@CGUID+06,@CGUID+07,@CGUID+08,@CGUID+09,@CGUID+10,@CGUID+11,@CGUID+12,@CGUID+13,@CGUID+14,@CGUID+15,@CGUID+16,@CGUID+17,@CGUID+18,@CGUID+19,@CGUID+20,@CGUID+52,@CGUID+53,@CGUID+54,@CGUID+55,@CGUID+59,@CGUID+60,@CGUID+61,@CGUID+62,@CGUID+63,@CGUID+64,@CGUID+65,@CGUID+66,@CGUID+67,@CGUID+68,@CGUID+69,@CGUID+70,@CGUID+74,@CGUID+75,@CGUID+76,@CGUID+77,@CGUID+78,@CGUID+79,@CGUID+80,@CGUID+81,@CGUID+82,@CGUID+83,@CGUID+84,@CGUID+85,@CGUID+86,@CGUID+87,@CGUID+88,@CGUID+89,@CGUID+90,@CGUID+91,@CGUID+93,@CGUID+94,@CGUID+98,@CGUID+99,@CGUID+100,@CGUID+101,@CGUID+102,@CGUID+103,@CGUID+104,@CGUID+105,@CGUID+106,@CGUID+107,@CGUID+108,@CGUID+109,@CGUID+110,@CGUID+111,@CGUID+112,@CGUID+113,@CGUID+114,@CGUID+115,@CGUID+116,@CGUID+117,@CGUID+118,@CGUID+119,@CGUID+120,@CGUID+121,@CGUID+125,@CGUID+126,@CGUID+127,@CGUID+128,@CGUID+129,@CGUID+130,@CGUID+131,@CGUID+132,@CGUID+133,@CGUID+134,@CGUID+135,@CGUID+136,@CGUID+143,@CGUID+144,@CGUID+145,@CGUID+146,@CGUID+147,@CGUID+148,@CGUID+149,@CGUID+150,@CGUID+151,@CGUID+152,@CGUID+153,@CGUID+154,@CGUID+155,@CGUID+156,@CGUID+157,@CGUID+158,@CGUID+159,@CGUID+160,@CGUID+161,@CGUID+162,@CGUID+163,@CGUID+164,@CGUID+165,@CGUID+166,@CGUID+167,@CGUID+168,@CGUID+169,@CGUID+170,@CGUID+171,@CGUID+172,@CGUID+173,@CGUID+174,@CGUID+175,@CGUID+176,@CGUID+177,@CGUID+178,@CGUID+180,@CGUID+181,@CGUID+182,@CGUID+183,@CGUID+184,@CGUID+185,@CGUID+186,@CGUID+187,@CGUID+188,@CGUID+189,@CGUID+190,@CGUID+191,@CGUID+218,@CGUID+219,@CGUID+220,@CGUID+221,@CGUID+222) AND `groupAI` IN (3, 24); +INSERT INTO `creature_formations` (`memberGUID`, `leaderGUID`, `groupAI`) VALUES +-- Entrance Group 1 +(@CGUID+3, @CGUID+3, 3), +(@CGUID+4, @CGUID+3, 3), +(@CGUID+5, @CGUID+3, 3), +(@CGUID+6, @CGUID+3, 3), +(@CGUID+7, @CGUID+3, 3), +(@CGUID+8, @CGUID+3, 3), +-- Entrance Group 2 +(@CGUID+9 , @CGUID+9, 3), +(@CGUID+10, @CGUID+9, 3), +(@CGUID+11, @CGUID+9, 3), +(@CGUID+12, @CGUID+9, 3), +(@CGUID+13, @CGUID+9, 3), +(@CGUID+14, @CGUID+9, 3), +-- Entrance Group 3 +(@CGUID+15, @CGUID+15, 3), +(@CGUID+16, @CGUID+15, 3), +(@CGUID+17, @CGUID+15, 3), +(@CGUID+18, @CGUID+15, 3), +(@CGUID+19, @CGUID+15, 3), +(@CGUID+20, @CGUID+15, 3), +-- Sentinel Group 1 +(@CGUID+52, @CGUID+52, 3), +(@CGUID+53, @CGUID+52, 3), +-- Sentinel Group 2 +(@CGUID+54, @CGUID+54, 3), +(@CGUID+55, @CGUID+54, 3), +-- Inquisitor Adds 1 +(@CGUID+59, @CGUID+59, 3), +(@CGUID+60, @CGUID+59, 3), +(@CGUID+61, @CGUID+59, 3), +(@CGUID+62, @CGUID+59, 3), +(@CGUID+63, @CGUID+59, 3), +(@CGUID+64, @CGUID+59, 3), +-- Inquisitor Adds 2 +(@CGUID+65, @CGUID+65, 3), +(@CGUID+66, @CGUID+65, 3), +(@CGUID+67, @CGUID+65, 3), +(@CGUID+68, @CGUID+65, 3), +(@CGUID+69, @CGUID+65, 3), +(@CGUID+70, @CGUID+65, 3), +-- Void Reaver Trash Group 1 +(@CGUID+74, @CGUID+74, 3), +(@CGUID+75, @CGUID+74, 3), +(@CGUID+76, @CGUID+74, 3), +(@CGUID+77, @CGUID+74, 3), +(@CGUID+78, @CGUID+74, 3), +-- Void Reaver Trash Group 2 +(@CGUID+79, @CGUID+79, 3), +(@CGUID+80, @CGUID+79, 3), +(@CGUID+81, @CGUID+79, 3), +(@CGUID+82, @CGUID+79, 3), +(@CGUID+83, @CGUID+79, 3), +-- Void Reaver Trash Group 3 +(@CGUID+84, @CGUID+84, 3), +(@CGUID+85, @CGUID+84, 3), +(@CGUID+86, @CGUID+84, 3), +(@CGUID+87, @CGUID+84, 3), +-- Void Reaver Trash Group 4 +(@CGUID+88, @CGUID+88, 3), +(@CGUID+89, @CGUID+88, 3), +(@CGUID+90, @CGUID+88, 3), +(@CGUID+91, @CGUID+88, 3), +-- Solarium Sentinel Group 1 +(@CGUID+93, @CGUID+93, 3), +(@CGUID+94, @CGUID+93, 3), +-- Solarium Large Group 1 +(@CGUID+98 , @CGUID+98, 3), +(@CGUID+99 , @CGUID+98, 3), +(@CGUID+100, @CGUID+98, 3), +(@CGUID+101, @CGUID+98, 3), +(@CGUID+102, @CGUID+98, 3), +(@CGUID+103, @CGUID+98, 3), +(@CGUID+104, @CGUID+98, 3), +(@CGUID+105, @CGUID+98, 3), +(@CGUID+106, @CGUID+98, 3), +(@CGUID+107, @CGUID+98, 3), +(@CGUID+108, @CGUID+98, 3), +(@CGUID+109, @CGUID+98, 3), +-- Solarium Large Group 2 +(@CGUID+110, @CGUID+110, 3), +(@CGUID+111, @CGUID+110, 3), +(@CGUID+112, @CGUID+110, 3), +(@CGUID+113, @CGUID+110, 3), +(@CGUID+114, @CGUID+110, 3), +(@CGUID+115, @CGUID+110, 3), +(@CGUID+116, @CGUID+110, 3), +(@CGUID+117, @CGUID+110, 3), +(@CGUID+118, @CGUID+110, 3), +(@CGUID+119, @CGUID+110, 3), +(@CGUID+120, @CGUID+110, 3), +(@CGUID+121, @CGUID+110, 3), +-- Inquisitor Adds 3 +(@CGUID+125, @CGUID+125, 3), +(@CGUID+126, @CGUID+125, 3), +(@CGUID+127, @CGUID+125, 3), +(@CGUID+128, @CGUID+125, 3), +(@CGUID+129, @CGUID+125, 3), +(@CGUID+130, @CGUID+125, 3), +-- Inquisitor Adds 4 +(@CGUID+131, @CGUID+131, 3), +(@CGUID+132, @CGUID+131, 3), +(@CGUID+133, @CGUID+131, 3), +(@CGUID+134, @CGUID+131, 3), +(@CGUID+135, @CGUID+131, 3), +(@CGUID+136, @CGUID+131, 3), +-- Solarian Adds 1 +(@CGUID+143, @CGUID+143, 3), +(@CGUID+144, @CGUID+143, 3), +(@CGUID+145, @CGUID+143, 3), +(@CGUID+146, @CGUID+143, 3), +(@CGUID+147, @CGUID+143, 3), +(@CGUID+148, @CGUID+143, 3), +-- Solarian Adds 2 +(@CGUID+149, @CGUID+149, 3), +(@CGUID+150, @CGUID+149, 3), +(@CGUID+151, @CGUID+149, 3), +(@CGUID+152, @CGUID+149, 3), +(@CGUID+153, @CGUID+149, 3), +(@CGUID+154, @CGUID+149, 3), +-- Solarian Adds 3 +(@CGUID+155, @CGUID+155, 3), +(@CGUID+156, @CGUID+155, 3), +(@CGUID+157, @CGUID+155, 3), +(@CGUID+158, @CGUID+155, 3), +(@CGUID+159, @CGUID+155, 3), +(@CGUID+160, @CGUID+155, 3), +-- Solarian Adds 4 +(@CGUID+161, @CGUID+161, 3), +(@CGUID+162, @CGUID+161, 3), +(@CGUID+163, @CGUID+161, 3), +(@CGUID+164, @CGUID+161, 3), +(@CGUID+165, @CGUID+161, 3), +(@CGUID+166, @CGUID+161, 3), +-- Solarian Adds 5 +(@CGUID+167, @CGUID+167, 3), +(@CGUID+168, @CGUID+167, 3), +(@CGUID+169, @CGUID+167, 3), +(@CGUID+170, @CGUID+167, 3), +(@CGUID+171, @CGUID+167, 3), +(@CGUID+172, @CGUID+167, 3), +-- Solarian Adds 6 +(@CGUID+173, @CGUID+173, 3), +(@CGUID+174, @CGUID+173, 3), +(@CGUID+175, @CGUID+173, 3), +(@CGUID+176, @CGUID+173, 3), +(@CGUID+177, @CGUID+173, 3), +(@CGUID+178, @CGUID+173, 3), +-- Kael Trash 1 +(@CGUID+180, @CGUID+180, 3), +(@CGUID+181, @CGUID+180, 3), +(@CGUID+182, @CGUID+180, 3), +(@CGUID+183, @CGUID+180, 3), +-- Kael Trash 2 +(@CGUID+184, @CGUID+184, 3), +(@CGUID+185, @CGUID+184, 3), +(@CGUID+186, @CGUID+184, 3), +(@CGUID+187, @CGUID+184, 3), +-- Kael Trash 3 +(@CGUID+188, @CGUID+188, 3), +(@CGUID+189, @CGUID+188, 3), +(@CGUID+190, @CGUID+188, 3), +(@CGUID+191, @CGUID+188, 3), +-- Kael & Advisors +(@CGUID+218, @CGUID+218, 24), +(@CGUID+219, @CGUID+218, 24), +(@CGUID+220, @CGUID+218, 24), +(@CGUID+221, @CGUID+218, 24), +(@CGUID+222, @CGUID+218, 24); + +-- Update SheatheState en masse +UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE `entry` IN (18805,19514,19516,19622,20031,20032,20033,20034,20035,20036,20037,20038,20039,20040,20041,20042,20043,20044,20045,20046,20047,20048,20049,20050,20052,20060,20062,20063,20064,22515,22517); + +-- Cleanup +DELETE FROM `creature_addon` WHERE `guid` IN (12433,12434,12456,12467,12475,12476,12479,12483); +DELETE FROM `waypoint_data` WHERE `id` IN (124330,124340,124560,124670,124750,124760,124830); +DELETE FROM `linked_respawn` WHERE `guid` IN (12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12436,12437,12438,12439,12440,12441,12442,12443,12444,12445,12446,12447,12448,12449,12450,12451,12452,12453,12454,12455,12456,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12480,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,12535,12536,12537,12538,12539,12540,12541,12542,12543,12544,12545,12546,12547,12548,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572); +DELETE FROM `creature_formations` WHERE `leaderGUID` IN (12456, 12467, 12476, 12483); From b32d6743c4d2e1df827ceba45067e8148240c16c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 22:12:30 +0000 Subject: [PATCH 33/33] chore(DB): import pending files Referenced commit(s): 8fee16756fde7354c15f44d1b3c2b532fd0f0ed0 --- .../{pending_db_world/tk.sql => db_world/2024_01_03_03.sql} | 1 + 1 file changed, 1 insertion(+) rename data/sql/updates/{pending_db_world/tk.sql => db_world/2024_01_03_03.sql} (99%) diff --git a/data/sql/updates/pending_db_world/tk.sql b/data/sql/updates/db_world/2024_01_03_03.sql similarity index 99% rename from data/sql/updates/pending_db_world/tk.sql rename to data/sql/updates/db_world/2024_01_03_03.sql index cbd520f4f..814257f1d 100644 --- a/data/sql/updates/pending_db_world/tk.sql +++ b/data/sql/updates/db_world/2024_01_03_03.sql @@ -1,3 +1,4 @@ +-- DB update 2024_01_03_02 -> 2024_01_03_03 SET @CGUID := 158000; DELETE FROM `creature` WHERE `map` = 550;