From 7182f5ddd1eae074ea96ee457a683453a4f4764b Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Sun, 4 Feb 2018 14:40:04 +0100 Subject: [PATCH 001/101] DB/Loot: Reference template 24078 corrections Closes #21345 --- .../world/3.3.5/2018_02_04_01_world_335.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_04_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_04_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_04_01_world_335.sql new file mode 100644 index 0000000000..bc35f5d806 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_04_01_world_335.sql @@ -0,0 +1,29 @@ +-- Remove unique items from reference table 24078 +DELETE FROM `reference_loot_template` WHERE `Entry`=24078 AND `Item` IN (899, 1391, 1440, 1446, 1469, 1473, 1929, 1930, 1936, 1943, 1944, 1945, 1951, 2020, 4290, 10400, 10401, 10402); + +-- Add former items from reference table 24078 to their proper NPCs +DELETE FROM `creature_loot_template` WHERE `Item` IN (899, 1391, 1440, 1446, 1469, 1473, 1929, 1930, 1936, 1943, 1944, 1945, 1951, 2020, 4290, 10400, 10401, 10402); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES +(217, 899, 0.1, 0, "Venom Web Spider - Venom Web Fang"), +(453, 1391, 0.1, 0, "Riverpaw Mystic - Riverpaw Mystic Staff"), +(446, 1440, 0.1, 0, "Redridge Basher - Gnoll Skull Basher"), +(440, 1446, 0.1, 0, "Blackrock Grunt - Blackrock Boots"), +(578, 1469, 0.1, 0, "Murloc Scout - Scimitar of Atun"), +(14270, 1469, 1, 0, "Squiddic - Scimitar of Atun"), +(545, 1473, 0.1, 0, "Murloc Tidecaller - Riverside Staff"), +(1729, 1929, 0.1, 0, "Defias Evoker - Silk-threaded Trousers"), +(4418, 1929, 0.1, 0, "Defias Wizard - Silk-threaded Trousers"), +(598, 1930, 0.1, 0, "Defias Miner - Stonemason Cloak"), +(622, 1936, 0.1, 0, "Goblin Engineer - Goblin Screwdriver"), +(3947, 1943, 0.1, 0, "Goblin Shipbuilder - Goblin Mail Leggings"), +(1731, 1944, 0.1, 0, "Goblin Craftsman - Metalworking Gloves"), +(641, 1945, 0.1, 0, "Goblin Woodcarver - Woodworking Gloves"), +(657, 1951, 0.1, 0, "Defias Pirate - Blackwater Cutlass"), +(1732, 1951, 0.1, 0, "Defias Squallshaper - Blackwater Cutlass"), +(539, 2020, 0.1, 0, "Pygmy Venom Web Spider - Hollowfang Blade"), +(832, 4290, 0.5, 0, "Dust Devil - Dust Bowl"), +(634, 10400, 0.5, 2, "Defias Overseer - Blackened Defias Leggings"), +(4417, 10400, 0.5, 2, "Defias Taskmaster - Blackened Defias Leggings"), +(634, 10401, 0.5, 2, "Defias Overseer - Blackened Defias Gloves"), +(4417, 10401, 0.5, 2, "Defias Taskmaster - Blackened Defias Gloves"), +(4416, 10402, 0.5, 0, "Defias Strip Miner - Blackened Defias Boots"); From 57314740daec56091db2a58bb80a42b4906207fa Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 4 Feb 2018 21:47:45 +0100 Subject: [PATCH 002/101] Core/AI: Fix assertion triggered with PetAI derived scripts (#21254) * Core/AI: Fix assertion triggered with PetAI derived scripts Fix an assertion triggered when spawning through ".npc add" or from SQL db table a Creature with AI set to a custom AI inheriting from PetAI. --- src/server/game/AI/AIException.cpp | 23 +++++++++++++ src/server/game/AI/AIException.h | 40 +++++++++++++++++++++++ src/server/game/AI/CoreAI/PetAI.cpp | 17 ++++++---- src/server/game/AI/CreatureAISelector.cpp | 13 ++++++-- 4 files changed, 85 insertions(+), 8 deletions(-) create mode 100644 src/server/game/AI/AIException.cpp create mode 100644 src/server/game/AI/AIException.h diff --git a/src/server/game/AI/AIException.cpp b/src/server/game/AI/AIException.cpp new file mode 100644 index 0000000000..ce3d601302 --- /dev/null +++ b/src/server/game/AI/AIException.cpp @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "AIException.h" + +InvalidAIException::InvalidAIException(char const* _message) +{ + message().assign(_message); +} diff --git a/src/server/game/AI/AIException.h b/src/server/game/AI/AIException.h new file mode 100644 index 0000000000..265e5dddb5 --- /dev/null +++ b/src/server/game/AI/AIException.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2008-2018 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef TRINITY_AIEXCEPTION_H +#define TRINITY_AIEXCEPTION_H + +#include "Define.h" +#include +#include + +class TC_GAME_API InvalidAIException : public std::exception +{ +public: + InvalidAIException(char const* _message); + ~InvalidAIException() throw() { } + + char const* what() const noexcept override { return msg_.c_str(); } + +protected: + std::string & message() throw() { return msg_; } + +private: + std::string msg_; +}; + +#endif diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 2283616df7..1068f2334f 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -17,17 +17,20 @@ */ #include "PetAI.h" +#include "AIException.h" +#include "Creature.h" #include "Errors.h" +#include "Group.h" +#include "Log.h" +#include "MotionMaster.h" +#include "ObjectAccessor.h" #include "Pet.h" #include "Player.h" #include "Spell.h" -#include "ObjectAccessor.h" #include "SpellHistory.h" -#include "SpellMgr.h" -#include "Creature.h" -#include "Util.h" -#include "Group.h" #include "SpellInfo.h" +#include "SpellMgr.h" +#include "Util.h" int32 PetAI::Permissible(Creature const* creature) { @@ -43,6 +46,8 @@ int32 PetAI::Permissible(Creature const* creature) PetAI::PetAI(Creature* c) : CreatureAI(c), i_tracker(TIME_INTERVAL_LOOK) { + if (!me->GetCharmInfo()) + throw InvalidAIException("Creature doesn't have a valid charm info"); UpdateAllies(); } @@ -152,7 +157,7 @@ void PetAI::UpdateAI(uint32 diff) if (!spellInfo) continue; - if (me->GetCharmInfo() && me->GetSpellHistory()->HasGlobalCooldown(spellInfo)) + if (me->GetSpellHistory()->HasGlobalCooldown(spellInfo)) continue; // check spell cooldown diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 17a9431a94..88fedcda68 100644 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -16,6 +16,7 @@ * with this program. If not, see . */ +#include "AIException.h" #include "Creature.h" #include "CreatureAISelector.h" #include "CreatureAIFactory.h" @@ -84,8 +85,16 @@ namespace FactorySelector return ASSERT_NOTNULL(sCreatureAIRegistry->GetRegistryItem("PetAI"))->Create(creature); // scriptname in db - if (CreatureAI* scriptedAI = sScriptMgr->GetCreatureAI(creature)) - return scriptedAI; + try + { + if (CreatureAI* scriptedAI = sScriptMgr->GetCreatureAI(creature)) + return scriptedAI; + } + catch (InvalidAIException const& e) + { + TC_LOG_ERROR("entities.unit", "Exception trying to assign script '%s' to Creature (Entry: %u), this Creature will have a default AI. Exception message: %s", + creature->GetScriptName().c_str(), creature->GetEntry(), e.what()); + } return SelectFactory(creature)->Create(creature); } From 8e5c1d012d4e8316071eb11d6cb65564286f26f2 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 4 Feb 2018 21:54:06 +0100 Subject: [PATCH 003/101] Core/Misc: Fix no-pch build --- src/server/game/AI/CreatureAISelector.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/game/AI/CreatureAISelector.cpp b/src/server/game/AI/CreatureAISelector.cpp index 88fedcda68..ec0e1d213b 100644 --- a/src/server/game/AI/CreatureAISelector.cpp +++ b/src/server/game/AI/CreatureAISelector.cpp @@ -26,6 +26,7 @@ #include "GameObject.h" #include "GameObjectAIFactory.h" +#include "Log.h" #include "ScriptMgr.h" namespace FactorySelector From 136ea0023be7eb8a6204e7795e0cf8ba3d77d391 Mon Sep 17 00:00:00 2001 From: Killyana Date: Sun, 4 Feb 2018 23:17:12 +0100 Subject: [PATCH 004/101] DB/Loot: Fix fishing loots for some areas Closes #11251 --- .../world/3.3.5/2018_02_04_02_world.sql | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_04_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_04_02_world.sql b/sql/updates/world/3.3.5/2018_02_04_02_world.sql new file mode 100644 index 0000000000..014a52c778 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_04_02_world.sql @@ -0,0 +1,55 @@ +-- +DELETE FROM `reference_loot_template` WHERE `entry`=11001; +INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES +(11001, 118, 0.5 , 0, 1, 1, 1, 1), +(11001, 159, 0.1 , 0, 1, 1, 1, 1), +(11001, 774, 0.1 , 0, 1, 1, 1, 1), +(11001, 1423, 0.1 , 0, 1, 1, 1, 1), +(11001, 2407, 0.1 , 0, 1, 1, 1, 1), +(11001, 2455, 0.5 , 0, 1, 1, 1, 1), +(11001, 2589, 0.5 , 0, 1, 1, 1, 1), +(11001, 4540, 0.1 , 0, 1, 1, 1, 1), +(11001, 4565, 0.1 , 0, 1, 1, 1, 1), +(11001, 4757, 0.1 , 0, 1, 1, 1, 1), +(11001, 4775, 0.1 , 0, 1, 1, 1, 1), +(11001, 4814, 0.1 , 0, 1, 1, 1, 1), +(11001, 5523, 0.1 , 0, 1, 1, 1, 1), +(11001, 6289, 30 , 0, 1, 1, 1, 1), +(11001, 6291, 36 , 0, 1, 1, 1, 1), +(11001, 6292, 0.5 , 0, 1, 1, 1, 1), +(11001, 6294, 0.5 , 0, 1, 1, 1, 1), +(11001, 6295, 0.1 , 0, 1, 1, 1, 1), +(11001, 6303, 15 , 0, 1, 1, 1, 1), +(11001, 6308, 0.5 , 0, 1, 1, 1, 1), +(11001, 6356, 2 , 0, 1, 1, 1, 1), +(11001, 6358, 0.1 , 0, 1, 1, 1, 1), +(11001, 6361, 0.1 , 0, 1, 1, 1, 1), +(11001, 6643, 0.1 , 0, 1, 1, 1, 1), +(11001, 6889, 0.1 , 0, 1, 1, 1, 1), +(11001, 7096, 0.1 , 0, 1, 1, 1, 1), +(11001, 7097, 0.1 , 0, 1, 1, 1, 1), +(11001, 20812, 0.1, 0, 1, 1, 1, 1), +(11001, 20813, 0.1, 0, 1, 1, 1, 1), +(11001, 20847, 0.1, 0, 1, 1, 1, 1), +(11001, 20848, 0.1, 0, 1, 1, 1, 1), +(11001, 21002, 0.1, 0, 1, 1, 1, 1), +(11001, 21004, 0.1, 0, 1, 1, 1, 1), +(11001, 21006, 0.1, 0, 1, 1, 1, 1), +(11001, 21008, 0.1, 0, 1, 1, 1, 1), +(11001, 21009, 0.1, 0, 1, 1, 1, 1), +(11001, 21011, 0.1, 0, 1, 1, 1, 1), +(11001, 21013, 0.1, 0, 1, 1, 1, 1), +(11001, 21014, 0.1, 0, 1, 1, 1, 1), +(11001, 21019, 0.1, 0, 1, 1, 1, 1), +(11001, 23333, 0.1, 0, 1, 1, 1, 1), +(11001, 27668, 0.1, 0, 1, 1, 1, 1), +(11001, 45190, 2 , 0, 1, 1, 1, 1), +(11001, 45194, 2 , 0, 1, 1, 1, 1), +(11001, 45195, 0.1, 0, 1, 1, 1, 1), +(11001, 45196, 2 , 0, 1, 1, 1, 1), +(11001, 45197, 0.1, 0, 1, 1, 1, 1), +(11001, 45198, 2 , 0, 1, 1, 1, 1), +(11001, 45199, 0.1, 0, 1, 1, 1, 1), +(11001, 45200, 2 , 0, 1, 1, 1, 1), +(11001, 45201, 0.1, 0, 1, 1, 1, 1), +(11001, 45202, 0.1, 0, 1, 1, 1, 1); From 23af4f93bac2660b14fae48ec70fa6e5b35f03ba Mon Sep 17 00:00:00 2001 From: ariel- Date: Sun, 4 Feb 2018 22:07:10 -0300 Subject: [PATCH 005/101] Core/Spells: remove duplicated LowerPlayerDamageReq call on reflected spells - It is already called at Unit::DealDamage --- src/server/game/Spells/Spell.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 41dcff51fd..3556220abf 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2362,11 +2362,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target) else if (missInfo == SPELL_MISS_REFLECT) // In case spell reflect from target, do all effect on caster (if hit) { if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him - { spellHitTarget = m_caster; - if (m_caster->GetTypeId() == TYPEID_UNIT) - m_caster->ToCreature()->LowerPlayerDamageReq(target->damage); - } } bool enablePvP = false; // need to check PvP state before spell effects, but act on it afterwards From 6dc6cc7608e41d5743ffde9e44740aefc1b114b1 Mon Sep 17 00:00:00 2001 From: ariel- Date: Sun, 4 Feb 2018 22:47:53 -0300 Subject: [PATCH 006/101] Core/Spells: fix logic error causing near teleports to drop combat for players Closes #21362 --- src/server/game/Spells/SpellEffects.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 52aac213a6..406de6f722 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -901,19 +901,17 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) } // Init dest coordinates - uint32 mapid = destTarget->GetMapId(); - if (mapid == MAPID_INVALID) - mapid = unitTarget->GetMapId(); - float x, y, z, orientation; - destTarget->GetPosition(x, y, z, orientation); - if (!orientation && m_targets.GetUnitTarget()) - orientation = m_targets.GetUnitTarget()->GetOrientation(); - TC_LOG_DEBUG("spells", "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation); + WorldLocation targetDest(*destTarget); + if (targetDest.GetMapId() == MAPID_INVALID) + targetDest.m_mapId = unitTarget->GetMapId(); - if (unitTarget->GetTypeId() == TYPEID_PLAYER) - unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL | TELE_TO_NOT_LEAVE_COMBAT : 0); - else if (mapid == unitTarget->GetMapId()) - unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); + if (!targetDest.GetOrientation() && m_targets.GetUnitTarget()) + targetDest.SetOrientation(m_targets.GetUnitTarget()->GetOrientation()); + + if (targetDest.GetMapId() == unitTarget->GetMapId()) + unitTarget->NearTeleportTo(targetDest, unitTarget == m_caster); + else if (unitTarget->GetTypeId() == TYPEID_PLAYER) + unitTarget->ToPlayer()->TeleportTo(targetDest, unitTarget == m_caster ? TELE_TO_SPELL : 0); else { TC_LOG_ERROR("spells", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id); @@ -921,6 +919,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) } // post effects for TARGET_DEST_DB + /// @todo: awful hacks, move this to spellscripts switch (m_spellInfo->Id) { // Dimensional Ripper - Everlook From afed7f04256c6f26780e7347fbc618993e4e2e33 Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 5 Feb 2018 13:45:52 -0300 Subject: [PATCH 007/101] Core/Channel: properly notify client about invalid channel names Closes #16190 --- src/server/game/Chat/Channels/ChannelMgr.cpp | 3 ++- src/server/game/Handlers/ChannelHandler.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp index dbb3a32b04..3deb2ee722 100644 --- a/src/server/game/Chat/Channels/ChannelMgr.cpp +++ b/src/server/game/Chat/Channels/ChannelMgr.cpp @@ -16,8 +16,9 @@ * with this program. If not, see . */ -#include "Channel.h" #include "ChannelMgr.h" +#include "Channel.h" +#include "DBCStores.h" #include "Player.h" #include "World.h" #include "WorldSession.h" diff --git a/src/server/game/Handlers/ChannelHandler.cpp b/src/server/game/Handlers/ChannelHandler.cpp index ab056bddb5..8546d6099f 100644 --- a/src/server/game/Handlers/ChannelHandler.cpp +++ b/src/server/game/Handlers/ChannelHandler.cpp @@ -54,11 +54,13 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket) return; } - if (channelName.empty()) - return; - - if (isdigit(channelName[0])) + if (channelName.empty() || isdigit(channelName[0])) + { + WorldPacket data(SMSG_CHANNEL_NOTIFY, 1 + channelName.size()); + data << uint8(CHAT_INVALID_NAME_NOTICE) << channelName; + SendPacket(&data); return; + } if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam())) if (Channel* channel = cMgr->GetJoinChannel(channelId, channelName, zone)) From a97171c8c06a47ba1d4c7846ffdb053f5f85384c Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 5 Feb 2018 14:43:11 -0300 Subject: [PATCH 008/101] Core/ScriptSystem: AfterHit hook can't modify damage/healing, so log it - Also added const to getter members --- src/server/game/Spells/SpellScript.cpp | 60 ++++++++++++++++---------- src/server/game/Spells/SpellScript.h | 43 +++++++++--------- 2 files changed, 60 insertions(+), 43 deletions(-) diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 5c81eb0bce..eada49fb87 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -393,6 +393,22 @@ bool SpellScript::IsInTargetHook() const } return false; } + +bool SpellScript::IsInModifiableHook() const +{ + // after hit hook executed after damage/healing is already done + // modifying it at this point has no effect + switch (m_currentScriptState) + { + case SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET: + case SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET: + case SPELL_SCRIPT_HOOK_BEFORE_HIT: + case SPELL_SCRIPT_HOOK_HIT: + return true; + } + return false; +} + bool SpellScript::IsInHitPhase() const { return (m_currentScriptState >= HOOK_SPELL_HIT_START && m_currentScriptState < HOOK_SPELL_HIT_END); @@ -403,22 +419,22 @@ bool SpellScript::IsInEffectHook() const return (m_currentScriptState >= SPELL_SCRIPT_HOOK_EFFECT_LAUNCH && m_currentScriptState <= SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET); } -Unit* SpellScript::GetCaster() +Unit* SpellScript::GetCaster() const { return m_spell->GetCaster(); } -Unit* SpellScript::GetOriginalCaster() +Unit* SpellScript::GetOriginalCaster() const { return m_spell->GetOriginalCaster(); } -SpellInfo const* SpellScript::GetSpellInfo() +SpellInfo const* SpellScript::GetSpellInfo() const { return m_spell->GetSpellInfo(); } -WorldLocation const* SpellScript::GetExplTargetDest() +WorldLocation const* SpellScript::GetExplTargetDest() const { if (m_spell->m_targets.HasDst()) return m_spell->m_targets.GetDstPos(); @@ -430,27 +446,27 @@ void SpellScript::SetExplTargetDest(WorldLocation& loc) m_spell->m_targets.SetDst(loc); } -WorldObject* SpellScript::GetExplTargetWorldObject() +WorldObject* SpellScript::GetExplTargetWorldObject() const { return m_spell->m_targets.GetObjectTarget(); } -Unit* SpellScript::GetExplTargetUnit() +Unit* SpellScript::GetExplTargetUnit() const { return m_spell->m_targets.GetUnitTarget(); } -GameObject* SpellScript::GetExplTargetGObj() +GameObject* SpellScript::GetExplTargetGObj() const { return m_spell->m_targets.GetGOTarget(); } -Item* SpellScript::GetExplTargetItem() +Item* SpellScript::GetExplTargetItem() const { return m_spell->m_targets.GetItemTarget(); } -Unit* SpellScript::GetHitUnit() +Unit* SpellScript::GetHitUnit() const { if (!IsInTargetHook()) { @@ -460,7 +476,7 @@ Unit* SpellScript::GetHitUnit() return m_spell->unitTarget; } -Creature* SpellScript::GetHitCreature() +Creature* SpellScript::GetHitCreature() const { if (!IsInTargetHook()) { @@ -473,7 +489,7 @@ Creature* SpellScript::GetHitCreature() return NULL; } -Player* SpellScript::GetHitPlayer() +Player* SpellScript::GetHitPlayer() const { if (!IsInTargetHook()) { @@ -486,7 +502,7 @@ Player* SpellScript::GetHitPlayer() return NULL; } -Item* SpellScript::GetHitItem() +Item* SpellScript::GetHitItem() const { if (!IsInTargetHook()) { @@ -496,7 +512,7 @@ Item* SpellScript::GetHitItem() return m_spell->itemTarget; } -GameObject* SpellScript::GetHitGObj() +GameObject* SpellScript::GetHitGObj() const { if (!IsInTargetHook()) { @@ -506,7 +522,7 @@ GameObject* SpellScript::GetHitGObj() return m_spell->gameObjTarget; } -WorldLocation* SpellScript::GetHitDest() +WorldLocation* SpellScript::GetHitDest() const { if (!IsInEffectHook()) { @@ -516,7 +532,7 @@ WorldLocation* SpellScript::GetHitDest() return m_spell->destTarget; } -int32 SpellScript::GetHitDamage() +int32 SpellScript::GetHitDamage() const { if (!IsInTargetHook()) { @@ -528,7 +544,7 @@ int32 SpellScript::GetHitDamage() void SpellScript::SetHitDamage(int32 damage) { - if (!IsInTargetHook()) + if (!IsInModifiableHook()) { TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; @@ -536,7 +552,7 @@ void SpellScript::SetHitDamage(int32 damage) m_spell->m_damage = damage; } -int32 SpellScript::GetHitHeal() +int32 SpellScript::GetHitHeal() const { if (!IsInTargetHook()) { @@ -548,7 +564,7 @@ int32 SpellScript::GetHitHeal() void SpellScript::SetHitHeal(int32 heal) { - if (!IsInTargetHook()) + if (!IsInModifiableHook()) { TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return; @@ -556,7 +572,7 @@ void SpellScript::SetHitHeal(int32 heal) m_spell->m_healing = heal; } -Aura* SpellScript::GetHitAura() +Aura* SpellScript::GetHitAura() const { if (!IsInTargetHook()) { @@ -624,7 +640,7 @@ void SpellScript::SetEffectValue(int32 value) m_spell->damage = value; } -Item* SpellScript::GetCastItem() +Item* SpellScript::GetCastItem() const { return m_spell->m_CastItem; } @@ -634,7 +650,7 @@ void SpellScript::CreateItem(uint32 effIndex, uint32 itemId) m_spell->DoCreateItem(effIndex, itemId); } -SpellInfo const* SpellScript::GetTriggeringSpell() +SpellInfo const* SpellScript::GetTriggeringSpell() const { return m_spell->m_triggeredByAuraSpell; } @@ -656,7 +672,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result) m_spell->m_customError = result; } -SpellValue const* SpellScript::GetSpellValue() +SpellValue const* SpellScript::GetSpellValue() const { return m_spell->m_spellValue; } diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index acd070e11a..625fd89c6e 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -276,6 +276,7 @@ class TC_GAME_API SpellScript : public _SpellScript void _FinishScriptCall(); bool IsInCheckCastHook() const; bool IsInTargetHook() const; + bool IsInModifiableHook() const; bool IsInHitPhase() const; bool IsInEffectHook() const; private: @@ -356,10 +357,10 @@ class TC_GAME_API SpellScript : public _SpellScript // methods allowing interaction with Spell object // // methods useable during all spell handling phases - Unit* GetCaster(); - Unit* GetOriginalCaster(); - SpellInfo const* GetSpellInfo(); - SpellValue const* GetSpellValue(); + Unit* GetCaster() const; + Unit* GetOriginalCaster() const; + SpellInfo const* GetSpellInfo() const; + SpellValue const* GetSpellValue() const; // methods useable after spell is prepared // accessors to the explicit targets of the spell @@ -373,48 +374,48 @@ class TC_GAME_API SpellScript : public _SpellScript // - ImplicitTargetXX set to TARGET_XXX_TARGET_YYY, _TARGET_ here means that explicit target is used by the effect, so spell needs one too // returns: WorldLocation which was selected as a spell destination or NULL - WorldLocation const* GetExplTargetDest(); + WorldLocation const* GetExplTargetDest() const; void SetExplTargetDest(WorldLocation& loc); // returns: WorldObject which was selected as an explicit spell target or NULL if there's no target - WorldObject* GetExplTargetWorldObject(); + WorldObject* GetExplTargetWorldObject() const; // returns: Unit which was selected as an explicit spell target or NULL if there's no target - Unit* GetExplTargetUnit(); + Unit* GetExplTargetUnit() const; // returns: GameObject which was selected as an explicit spell target or NULL if there's no target - GameObject* GetExplTargetGObj(); + GameObject* GetExplTargetGObj() const; // returns: Item which was selected as an explicit spell target or NULL if there's no target - Item* GetExplTargetItem(); + Item* GetExplTargetItem() const; // methods useable only during spell hit on target, or during spell launch on target: // returns: target of current effect if it was Unit otherwise NULL - Unit* GetHitUnit(); + Unit* GetHitUnit() const; // returns: target of current effect if it was Creature otherwise NULL - Creature* GetHitCreature(); + Creature* GetHitCreature() const; // returns: target of current effect if it was Player otherwise NULL - Player* GetHitPlayer(); + Player* GetHitPlayer() const; // returns: target of current effect if it was Item otherwise NULL - Item* GetHitItem(); + Item* GetHitItem() const; // returns: target of current effect if it was GameObject otherwise NULL - GameObject* GetHitGObj(); + GameObject* GetHitGObj() const; // returns: destination of current effect - WorldLocation* GetHitDest(); + WorldLocation* GetHitDest() const; // setter/getter for for damage done by spell to target of spell hit // returns damage calculated before hit, and real dmg done after hit - int32 GetHitDamage(); + int32 GetHitDamage() const; void SetHitDamage(int32 damage); void PreventHitDamage() { SetHitDamage(0); } // setter/getter for for heal done by spell to target of spell hit // returns healing calculated before hit, and real dmg done after hit - int32 GetHitHeal(); + int32 GetHitHeal() const; void SetHitHeal(int32 heal); void PreventHitHeal() { SetHitHeal(0); } - Spell* GetSpell() { return m_spell; } + Spell* GetSpell() const { return m_spell; } // returns current spell hit target aura - Aura* GetHitAura(); + Aura* GetHitAura() const; // prevents applying aura on current spell hit target void PreventHitAura(); @@ -434,13 +435,13 @@ class TC_GAME_API SpellScript : public _SpellScript void SetEffectValue(int32 value); // returns: cast item if present. - Item* GetCastItem(); + Item* GetCastItem() const; // Creates item. Calls Spell::DoCreateItem method. void CreateItem(uint32 effIndex, uint32 itemId); // Returns SpellInfo from the spell that triggered the current one - SpellInfo const* GetTriggeringSpell(); + SpellInfo const* GetTriggeringSpell() const; // finishes spellcast prematurely with selected error message void FinishCast(SpellCastResult result, uint32* param1 = nullptr, uint32* param2 = nullptr); From 6c6249851780e74c71aec5bc334277f768547208 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 10 Feb 2018 11:51:28 +0100 Subject: [PATCH 009/101] pre-cp --- src/server/game/Entities/Creature/Creature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index ea27e28a9a..1e01f49529 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -511,7 +511,7 @@ class TC_GAME_API Creature : public Unit, public GridObject, public Ma bool IsEvadingAttacks() const { return IsInEvadeMode() || CanNotReachTarget(); } bool AIM_Destroy(); - bool AIM_Initialize(CreatureAI* ai = NULL); + bool AIM_Initialize(CreatureAI* ai = nullptr); void Motion_Initialize(); CreatureAI* AI() const { return reinterpret_cast(i_AI); } From c385edb12dffae5fa317a37a3fa76412914f0d48 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 5 Feb 2018 20:52:19 +0100 Subject: [PATCH 010/101] Core/Scripts: Fixed ENSURE_AI assertion failures when used in Reset()/InitializeAI() hooks with hotswap Updates #20727 --- src/server/game/Entities/Creature/Creature.cpp | 13 ++++++++++++- src/server/game/Entities/Creature/Creature.h | 2 ++ src/server/game/Scripting/ScriptMgr.cpp | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 832b29db25..f1d832cd48 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -833,7 +833,7 @@ bool Creature::AIM_Destroy() return true; } -bool Creature::AIM_Initialize(CreatureAI* ai) +bool Creature::AIM_Create(CreatureAI* ai /*= nullptr*/) { // make sure nothing can change the AI during AI update if (m_AI_locked) @@ -847,12 +847,23 @@ bool Creature::AIM_Initialize(CreatureAI* ai) Motion_Initialize(); i_AI = ai ? ai : FactorySelector::SelectAI(this); +} +void Creature::AI_InitializeAndEnable() +{ IsAIEnabled = true; i_AI->InitializeAI(); // Initialize vehicle if (GetVehicleKit()) GetVehicleKit()->Reset(); +} + +bool Creature::AIM_Initialize(CreatureAI* ai) +{ + if (!AIM_Create(ai)) + return false; + + AI_InitializeAndEnable(); return true; } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 1e01f49529..eb500405d9 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -511,6 +511,8 @@ class TC_GAME_API Creature : public Unit, public GridObject, public Ma bool IsEvadingAttacks() const { return IsInEvadeMode() || CanNotReachTarget(); } bool AIM_Destroy(); + bool AIM_Create(CreatureAI* ai = nullptr); + void AI_InitializeAndEnable(); bool AIM_Initialize(CreatureAI* ai = nullptr); void Motion_Initialize(); diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index d63cc74b92..80d4a12d4e 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -416,7 +416,7 @@ class CreatureGameObjectScriptRegistrySwapHooks if (creature->IsAlive()) creature->ClearUnitState(UNIT_STATE_EVADE); - bool const created = creature->AIM_Initialize(); + bool const created = creature->AIM_Create(); ASSERT(created, "Creating the AI should never fail here!"); (void)created; @@ -427,6 +427,7 @@ class CreatureGameObjectScriptRegistrySwapHooks if (!creature->IsAlive()) return; + creature->AI_InitializeAndEnable(); creature->AI()->EnterEvadeMode(); // Cast a dummy visual spell asynchronously here to signal From bf2d223cc33b8e252caf3e7332036a5459bc2639 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 5 Feb 2018 21:08:09 +0100 Subject: [PATCH 011/101] Build fix --- src/server/game/Entities/Creature/Creature.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f1d832cd48..9a037781be 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -847,6 +847,7 @@ bool Creature::AIM_Create(CreatureAI* ai /*= nullptr*/) Motion_Initialize(); i_AI = ai ? ai : FactorySelector::SelectAI(this); + return true; } void Creature::AI_InitializeAndEnable() From 855a0bbaf0794d16d837224d50976cab2fb68e4f Mon Sep 17 00:00:00 2001 From: sirikfoll Date: Mon, 5 Feb 2018 21:27:13 -0200 Subject: [PATCH 012/101] Scripts/Magisters Terrace: Removed not allowed ENSURE_AI call from constructor Closes #20727 --- .../MagistersTerrace/boss_priestess_delrissa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index 1756dcc938..5ef6262be0 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -360,7 +360,6 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI { Initialize(); instance = creature->GetInstanceScript(); - AcquireGUIDs(); } void Initialize() @@ -384,6 +383,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI void Reset() override { Initialize(); + AcquireGUIDs(); // in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her) if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA))) From 9fdb4c0a4d7368e011773cbb3862dfa76d362a15 Mon Sep 17 00:00:00 2001 From: ariel- Date: Tue, 6 Feb 2018 13:59:08 -0300 Subject: [PATCH 013/101] Core/Scripts: fix non-functional Celestial Planetarium Access GO - Client only sends CMSG_GAMEOBJ_REPORT_USE for this one Closes #19982 --- .../Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index aea63dff76..9c99c9a176 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -979,7 +979,7 @@ class go_celestial_planetarium_access : public GameObjectScript { } - bool GossipHello(Player* player) override + bool OnReportUse(Player* player) override { if (me->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE)) return true; From 2f8361d3206a3c328b243987d81f85ecb6c2f995 Mon Sep 17 00:00:00 2001 From: Keader Date: Thu, 8 Feb 2018 10:05:08 -0300 Subject: [PATCH 014/101] Core/Scripts: Fixed possible crashs related with JustDied --- .../BlackwingLair/boss_nefarian.cpp | 2 +- .../EasternKingdoms/Karazhan/boss_midnight.cpp | 4 ++-- .../MagistersTerrace/boss_vexallus.cpp | 3 ++- .../EasternKingdoms/ScarletEnclave/chapter1.cpp | 2 +- .../EasternKingdoms/ScarletEnclave/chapter2.cpp | 3 ++- .../ShadowfangKeep/boss_apothecary_hummel.cpp | 4 ++-- .../Stratholme/boss_order_of_silver_hand.cpp | 2 +- .../EasternKingdoms/Uldaman/boss_archaedas.cpp | 2 +- .../EscapeFromDurnholdeKeep/old_hillsbrad.cpp | 4 ++-- .../Kalimdor/WailingCaverns/wailing_caverns.cpp | 2 +- .../scripts/Kalimdor/zone_bloodmyst_isle.cpp | 7 +++++++ src/server/scripts/Kalimdor/zone_silithus.cpp | 4 ++-- .../AzjolNerub/boss_krikthir_the_gatewatcher.cpp | 4 ++-- .../TrialOfTheCrusader/boss_anubarak_trial.cpp | 3 ++- .../boss_blood_queen_lana_thel.cpp | 4 ++++ .../IcecrownCitadel/boss_lady_deathwhisper.cpp | 8 ++++++++ .../Northrend/Ulduar/Ulduar/boss_mimiron.cpp | 2 +- .../Northrend/Ulduar/Ulduar/boss_thorim.cpp | 6 +++--- .../Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp | 4 ++-- .../Northrend/VioletHold/boss_cyanigosa.cpp | 4 ++-- .../scripts/Northrend/VioletHold/boss_erekem.cpp | 4 ++-- .../Northrend/VioletHold/boss_ichoron.cpp | 4 ++-- .../Northrend/VioletHold/boss_lavanthor.cpp | 5 ----- .../scripts/Northrend/VioletHold/boss_moragg.cpp | 5 ----- .../scripts/Northrend/VioletHold/boss_xevozz.cpp | 4 ++-- .../Northrend/VioletHold/boss_zuramat.cpp | 4 ++-- .../scripts/Northrend/zone_borean_tundra.cpp | 16 +++++++++------- .../scripts/Northrend/zone_howling_fjord.cpp | 6 +++--- .../scripts/Northrend/zone_wintergrasp.cpp | 2 +- .../BloodFurnace/boss_kelidan_the_breaker.cpp | 3 +++ .../boss_vazruden_the_herald.cpp | 3 +++ .../ShatteredHalls/shattered_halls.cpp | 2 +- .../Outland/TempestKeep/Eye/boss_kaelthas.cpp | 4 ++-- .../Mechanar/boss_mechano_lord_capacitus.cpp | 2 +- .../scripts/Outland/zone_shadowmoon_valley.cpp | 3 +++ 35 files changed, 82 insertions(+), 59 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 549aaf7d17..fd6704bcdc 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -431,7 +431,7 @@ public: Talk(SAY_RANDOM); } - void JustDied(Unit* /*Killer*/) override + void JustDied(Unit* /*killer*/) override { _JustDied(); Talk(SAY_DEATH); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 9c77230e48..1717205a6c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -198,13 +198,13 @@ public: } } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); if (Unit* midnight = ObjectAccessor::GetUnit(*me, _midnightGUID)) midnight->KillSelf(); - BossAI::JustDied(killer); + _JustDied(); } void SetGUID(ObjectGuid const& guid, int32 id) override diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 6ff76c94e8..15e28f8e43 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -207,7 +207,8 @@ class npc_pure_energy : public CreatureScript void JustDied(Unit* killer) override { - killer->CastSpell(killer, SPELL_ENERGY_FEEDBACK, true); + if (killer) + killer->CastSpell(killer, SPELL_ENERGY_FEEDBACK, true); me->RemoveAurasDueToSpell(SPELL_PURE_ENERGY_PASSIVE); } }; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 2c014f5cbd..257f6c40ba 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -866,7 +866,7 @@ public: void JustDied(Unit* killer) override { Creature* deathcharger = me->FindNearestCreature(28782, 30); - if (!deathcharger) + if (!deathcharger || !killer) return; if (killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->IsVehicle()) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 7e51397a1c..913db196e1 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -549,7 +549,8 @@ public: void JustDied(Unit* killer) override { Talk(SAY_VALROTH_DEATH); - killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true); + if (killer) + killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true); } }; diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index fa34bf45b5..ecd4614476 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -315,7 +315,7 @@ class npc_apothecary_frye : public CreatureScript { npc_apothecary_fryeAI(Creature* creature) : npc_apothecary_genericAI(creature, FryeMovePos) { } - void JustDied(Unit* /*who*/) override + void JustDied(Unit* /*killer*/) override { Talk(SAY_FRYE_DEATH); } @@ -343,7 +343,7 @@ class npc_apothecary_baxter : public CreatureScript _events.ScheduleEvent(EVENT_CHAIN_REACTION, Seconds(12)); } - void JustDied(Unit* /*who*/) override + void JustDied(Unit* /*killer*/) override { _events.Reset(); Talk(SAY_BAXTER_DEATH); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index 1103f0da89..5a5f2334d9 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -129,7 +129,7 @@ public: break; } - if (instance->GetData(TYPE_SH_QUEST)) + if (killer && instance->GetData(TYPE_SH_QUEST)) { if (Player* player = killer->ToPlayer()) player->KilledMonsterCredit(SH_QUEST_CREDIT); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index c2602dda1c..a066f29652 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -372,7 +372,7 @@ class npc_stonekeepers : public CreatureScript DoMeleeAttackIfReady(); } - void JustDied(Unit* /*attacker*/) override + void JustDied(Unit* /*killer*/) override { DoCast (me, SPELL_SELF_DESTRUCT, true); instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index 73ac4cfd18..b250721e37 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -528,12 +528,12 @@ public: { Talk(SAY_TH_RANDOM_KILL); } - void JustDied(Unit* slayer) override + void JustDied(Unit* killer) override { instance->SetData(TYPE_THRALL_EVENT, FAIL); // Don't do a yell if he kills self (if player goes too far or at the end). - if (slayer == me) + if (killer == me) return; Talk(SAY_TH_RANDOM_DIE); diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 25ba260c2f..230f4ee0a0 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -172,7 +172,7 @@ public: Talk(SAY_ATTACKED, who); } - void JustDied(Unit* /*slayer*/) override + void JustDied(Unit* /*killer*/) override { instance->SetData(DATA_NARALEX_EVENT, FAIL); instance->SetData(DATA_NARALEX_PART1, FAIL); diff --git a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp index 6fa3352245..dbdc2752c6 100644 --- a/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp +++ b/src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp @@ -67,6 +67,9 @@ public: void JustDied(Unit* killer) override { + if (!killer) + return; + uint32 spawnCreatureID = 0; switch (urand(0, 2)) @@ -261,6 +264,10 @@ public: { me->SetObjectScale(1.0f); _events.Reset(); + + if (!killer) + return; + if (Creature* legoso = me->FindNearestCreature(NPC_LEGOSO, SIZE_OF_GRIDS)) { Group* group = me->GetLootRecipientGroup(); diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index 157e37dcbf..41093297d5 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -684,7 +684,7 @@ public: } void JustEngagedWith(Unit* /*who*/) override { } - void JustDied(Unit* /*slayer*/) override; + void JustDied(Unit* /*killer*/) override; void UpdateAI(uint32 diff) override { @@ -920,7 +920,7 @@ public: }; -void npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::JustDied(Unit* /*slayer*/) +void npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::JustDied(Unit* /*killer*/) { me->RemoveCorpse(); diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp index b32dc1d4e4..067a60021e 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp @@ -173,10 +173,10 @@ class boss_krik_thir : public CreatureScript Talk(SAY_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { summons.clear(); - BossAI::JustDied(killer); + _JustDied(); Talk(SAY_DEATH); } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index ccc4714e87..fe2bdd35bf 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -476,7 +476,8 @@ class npc_swarm_scarab : public CreatureScript void JustDied(Unit* killer) override { - DoCast(killer, SPELL_TRAITOR_KING); + if (killer) + DoCast(killer, SPELL_TRAITOR_KING); } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp index e6a842ea34..9bd0d48a45 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp @@ -198,6 +198,10 @@ class boss_blood_queen_lana_thel : public CreatureScript DoCastAOE(SPELL_BLOOD_INFUSION_CREDIT, true); CleanAuras(); + + if (!killer) + return; + // Blah, credit the quest if (_creditBloodQuickening) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index 1c92cbc128..a0dfbf3c47 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -363,6 +363,10 @@ class boss_lady_deathwhisper : public CreatureScript darnavan->SetReactState(REACT_PASSIVE); darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10000)); darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED); + + if (!killer) + return; + if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) { if (Group* group = owner->GetGroup()) @@ -883,6 +887,10 @@ class npc_darnavan : public CreatureScript void JustDied(Unit* killer) override { _events.Reset(); + + if (!killer) + return; + if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) { if (Group* group = owner->GetGroup()) diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index ece8443c6d..c1e0cd8d7b 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -435,7 +435,7 @@ class boss_mimiron : public CreatureScript events.ScheduleEvent(EVENT_INTRO_1, 1500); } - void JustDied(Unit* /*who*/) override + void JustDied(Unit* /*killer*/) override { instance->SetBossState(BOSS_MIMIRON, DONE); events.Reset(); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index cc16588c3b..429bcdb6c0 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -1146,7 +1146,7 @@ class npc_thorim_pre_phase : public CreatureScript SetCombatMovement(false); } - void JustDied(Unit* /*victim*/) override + void JustDied(Unit* /*killer*/) override { if (Creature* thorim = _instance->GetCreature(BOSS_THORIM)) thorim->AI()->DoAction(ACTION_INCREASE_PREADDS_COUNT); @@ -1405,7 +1405,7 @@ class npc_runic_colossus : public CreatureScript } } - void JustDied(Unit* /*victim*/) override + void JustDied(Unit* /*killer*/) override { // open the Runic Door _instance->HandleGameObject(_instance->GetGuidData(DATA_RUNIC_DOOR), true); @@ -1516,7 +1516,7 @@ class npc_ancient_rune_giant : public CreatureScript _events.ScheduleEvent(EVENT_RUNE_DETONATION, 25000); } - void JustDied(Unit* /*victim*/) override + void JustDied(Unit* /*killer*/) override { // opem the Stone Door _instance->HandleGameObject(_instance->GetGuidData(DATA_STONE_DOOR), true); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 2f56df7406..a063663f74 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -528,13 +528,13 @@ class boss_voice_of_yogg_saron : public CreatureScript events.ScheduleEvent(EVENT_EXTINGUISH_ALL_LIFE, 900000); // 15 minutes } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { // don't despawn Yogg-Saron's corpse, remove him from SummonList! if (Creature* yogg = instance->GetCreature(BOSS_YOGG_SARON)) summons.Despawn(yogg); - BossAI::JustDied(killer); + _JustDied(); } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp index 99fcf9cfd3..49139c9c2b 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_cyanigosa.cpp @@ -63,10 +63,10 @@ class boss_cyanigosa : public CreatureScript Talk(SAY_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { - BossAI::JustDied(killer); Talk(SAY_DEATH); + _JustDied(); } void MoveInLineOfSight(Unit* /*who*/) override { } diff --git a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp index 964ee11d94..453e947fa8 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_erekem.cpp @@ -90,10 +90,10 @@ class boss_erekem : public CreatureScript Talk(SAY_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { - BossAI::JustDied(killer); Talk(SAY_DEATH); + _JustDied(); } bool CheckGuardAuras(Creature* guard) const diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp index 4450dfe98d..4788524ba5 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp @@ -162,10 +162,10 @@ class boss_ichoron : public CreatureScript Talk(SAY_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { - BossAI::JustDied(killer); Talk(SAY_DEATH); + _JustDied(); } void JustSummoned(Creature* summon) override diff --git a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp index 9309276f05..2a2bf14330 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_lavanthor.cpp @@ -52,11 +52,6 @@ class boss_lavanthor : public CreatureScript instance->SetData(DATA_HANDLE_CELLS, DATA_LAVANTHOR); } - void JustDied(Unit* killer) override - { - BossAI::JustDied(killer); - } - void UpdateAI(uint32 diff) override { if (!UpdateVictim()) diff --git a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp index bfaf7d972b..45ac551d94 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_moragg.cpp @@ -59,11 +59,6 @@ class boss_moragg : public CreatureScript instance->SetData(DATA_HANDLE_CELLS, DATA_MORAGG); } - void JustDied(Unit* killer) override - { - BossAI::JustDied(killer); - } - void UpdateAI(uint32 diff) override { if (!UpdateVictim()) diff --git a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp index 4d00e558e4..7d08c7127c 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_xevozz.cpp @@ -113,10 +113,10 @@ class boss_xevozz : public CreatureScript Talk(SAY_SLAY); } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { - BossAI::JustDied(killer); Talk(SAY_DEATH); + _JustDied(); } void SpellHit(Unit* /*who*/, SpellInfo const* spell) override diff --git a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp index fec6547710..3bb8756981 100644 --- a/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp +++ b/src/server/scripts/Northrend/VioletHold/boss_zuramat.cpp @@ -103,10 +103,10 @@ class boss_zuramat : public CreatureScript return 0; } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { - BossAI::JustDied(killer); Talk(SAY_DEATH); + _JustDied(); } void KilledUnit(Unit* victim) override diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 56870ec2ba..f933cc5de8 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -366,9 +366,10 @@ public: void JustDied(Unit* killer) override { + if (!killer || killer->GetTypeId() != TYPEID_PLAYER) + return; + Player* player = killer->ToPlayer(); - if (!player) - return; if (player->GetQuestStatus(QUEST_TAKEN_BY_THE_SCOURGE) == QUEST_STATUS_INCOMPLETE) { @@ -1270,9 +1271,9 @@ public: leryssa->ClearUnitState(UNIT_STATE_STUNNED); leryssa->SetWalk(false); leryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f); - - if (Player* player = killer->ToPlayer()) - player->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0); + + if (killer && killer->GetTypeId() == TYPEID_PLAYER) + killer->ToPlayer()->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0); } }; @@ -1941,9 +1942,10 @@ public: void JustDied(Unit* killer) override { + if (!killer || killer->GetTypeId() != TYPEID_PLAYER) + return; + Player* player = killer->ToPlayer(); - if (!player) - return; if (player->GetQuestStatus(QUEST_YOU_RE_NOT_SO_BIG_NOW) == QUEST_STATUS_INCOMPLETE && (me->HasAura(SPELL_AURA_NOTSOBIG_1) || me->HasAura(SPELL_AURA_NOTSOBIG_2) || diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index c1848464bd..ff8449cbd5 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -636,11 +636,11 @@ public: void JustDied(Unit* killer) override { + if (!killer || killer->GetTypeId() != TYPEID_PLAYER) + return; + Player* player = killer->ToPlayer(); - if (!player) - return; - if (roll_chance_i(20)) { player->CastSpell(me, SPELL_SUMMON_FREED_MIST_WHISPER_SCOUT, true); diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 3b0a90be56..c057b08fca 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -405,7 +405,7 @@ class npc_wg_give_promotion_credit : public CreatureScript void JustDied(Unit* killer) override { - if (killer->GetTypeId() != TYPEID_PLAYER) + if (!killer || killer->GetTypeId() != TYPEID_PLAYER) return; BattlefieldWG* wintergrasp = static_cast(sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG)); diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index b95b94b540..912fcfe50b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -308,6 +308,9 @@ class npc_shadowmoon_channeler : public CreatureScript void JustDied(Unit* killer) override { + if (!killer) + return; + if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100)) ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer); } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index bee72bf775..35f6a423a9 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -484,6 +484,9 @@ class npc_hellfire_sentry : public CreatureScript void JustDied(Unit* killer) override { + if (!killer) + return; + if (Creature* herald = me->FindNearestCreature(NPC_VAZRUDEN_HERALD, 150)) ENSURE_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(killer); } diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp index 5f95314e9f..a4f508f0da 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/shattered_halls.cpp @@ -102,7 +102,7 @@ class boss_shattered_executioner : public CreatureScript void JustSummoned(Creature*) override { } // avoid despawn of prisoners on death/reset - void JustDied(Unit*) override + void JustDied(Unit* /*killer*/) override { _JustDied(); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index da4402ec5b..3f4aed13e7 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -647,10 +647,10 @@ class boss_kaelthas : public CreatureScript } } - void JustDied(Unit* killer) override + void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - BossAI::JustDied(killer); + _JustDied(); } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 415e9a54a6..8487a15195 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -93,7 +93,7 @@ class boss_mechano_lord_capacitus : public CreatureScript Talk(YELL_KILL); } - void JustDied(Unit* /*victim*/) override + void JustDied(Unit* /*killer*/) override { _JustDied(); Talk(YELL_DEATH); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index fb89bf4019..21710c50b0 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -971,6 +971,9 @@ public: void JustDied(Unit* killer) override { + if (!killer) + return; + switch (killer->GetTypeId()) { case TYPEID_UNIT: From a162d421ce49521974be3d74ddf09ff2cc7287f4 Mon Sep 17 00:00:00 2001 From: Keader Date: Thu, 8 Feb 2018 10:16:19 -0300 Subject: [PATCH 015/101] Core/Scripts: Fixed tabs issues introduced in 5bef3e426aea37b0e7555f146037c58e7be6352d --- .../EasternKingdoms/MagistersTerrace/boss_vexallus.cpp | 5 ----- .../EasternKingdoms/ScarletEnclave/chapter2.cpp | 2 +- src/server/scripts/Northrend/zone_howling_fjord.cpp | 6 +++--- .../BloodFurnace/boss_kelidan_the_breaker.cpp | 10 +++++----- .../HellfireRamparts/boss_vazruden_the_herald.cpp | 6 +++--- src/server/scripts/Outland/zone_shadowmoon_valley.cpp | 6 +++--- 6 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index 15e28f8e43..94cf59f5b9 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -82,11 +82,6 @@ class boss_vexallus : public CreatureScript Talk(SAY_KILL); } - void JustDied(Unit* /*killer*/) override - { - _JustDied(); - } - void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 913db196e1..193a31325d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -549,7 +549,7 @@ public: void JustDied(Unit* killer) override { Talk(SAY_VALROTH_DEATH); - if (killer) + if (killer) killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true); } }; diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp index ff8449cbd5..b9f409f6e0 100644 --- a/src/server/scripts/Northrend/zone_howling_fjord.cpp +++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp @@ -636,9 +636,9 @@ public: void JustDied(Unit* killer) override { - if (!killer || killer->GetTypeId() != TYPEID_PLAYER) - return; - + if (!killer || killer->GetTypeId() != TYPEID_PLAYER) + return; + Player* player = killer->ToPlayer(); if (roll_chance_i(20)) diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 912fcfe50b..9750180525 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -308,11 +308,11 @@ class npc_shadowmoon_channeler : public CreatureScript void JustDied(Unit* killer) override { - if (!killer) - return; - - if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100)) - ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer); + if (!killer) + return; + + if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100)) + ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer); } void UpdateAI(uint32 diff) override diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 35f6a423a9..5f77ffe9c6 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -484,9 +484,9 @@ class npc_hellfire_sentry : public CreatureScript void JustDied(Unit* killer) override { - if (!killer) - return; - + if (!killer) + return; + if (Creature* herald = me->FindNearestCreature(NPC_VAZRUDEN_HERALD, 150)) ENSURE_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(killer); } diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 21710c50b0..f3184bf780 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -971,9 +971,9 @@ public: void JustDied(Unit* killer) override { - if (!killer) - return; - + if (!killer) + return; + switch (killer->GetTypeId()) { case TYPEID_UNIT: From f177fa33223241bc571b0f1b5966b54d8409dfc6 Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Thu, 8 Feb 2018 17:25:03 +0100 Subject: [PATCH 016/101] DB/Loot: Reference template 24060 corrections Closes #21363 --- .../world/3.3.5/2018_02_08_00_world_335.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_00_world_335.sql new file mode 100644 index 0000000000..5046c17523 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_00_world_335.sql @@ -0,0 +1,23 @@ +-- Remove unique items from reference table 24060, as well as removing Agile Boots (4788) which is sold only and does not drop +DELETE FROM `reference_loot_template` WHERE `Entry`=24060 AND `Item` IN (1218, 1220, 1296, 1300, 1448, 1460, 1934, 2021, 2166, 2167, 2168, 3018, 3227, 4788, 4949, 5182, 5183); + +-- Add former items from reference table 24060 to their proper NPCs, as well as removing 4788 which is sold only and does not drop +DELETE FROM `creature_loot_template` WHERE `Item` IN (1218, 1220, 1296, 1300, 1448, 1460, 1934, 2021, 2166, 2167, 2168, 3018, 3227, 4788, 4949, 5182, 5183); +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Chance`,`GroupId`,`Comment`) VALUES +(445, 1218, 0.1, 0, "Redridge Alpha - Heavy Gnoll War Club"), +(580, 1220, 0.1, 0, "Redridge Drudger - Lupine Axe"), +(437, 1296, 0.1, 0, "Blackrock Renegade - Blackrock Mace"), +(4065, 1296, 0.1, 0, "Blackrock Sentry - Blackrock Mace"), +(436, 1300, 0.1, 0, "Blackrock Shadowcaster - Lesser Staff of the Spire"), +(485, 1448, 0.1, 0, "Blackrock Outrunner - Blackrock Gauntlets"), +(434, 1460, 0.1, 0, "Rabid Shadowhide Gnoll - Shadowhide Two-handed Sword"), +(636, 1934, 0.1, 0, "Defias Blackguard - Stonemason Trousers"), +(569, 2021, 0.1, 0, "Green Recluse - Green Carapace Shield"), +(626, 2166, 2, 2, "Foreman Thistlenettle - Foreman's Leggings"), +(626, 2167, 2, 2, "Foreman Thistlenettle - Foreman's Gloves"), +(626, 2168, 2, 2, "Foreman Thistlenettle - Foreman's Boots"), +(521, 3018, 2, 2, "Lupos - Hide of Lupos"), +(521, 3227, 2, 2, "Lupos - Nightbane Staff"), +(7170, 4949, 100, 0, "Thragomm - Orcish Cleaver"), +(3398, 5182, 2, 2, "Gesharahan - Shiver Blade"), +(3398, 5183, 2, 2, "Gesharahan - Pulsating Hydra Heart"); From 63a15d90623ad9f48def87e289fcd5bf59fd0d38 Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Thu, 8 Feb 2018 17:25:49 +0100 Subject: [PATCH 017/101] DB/Loot: Dun Morogh - Coldridge Valley loot tables redone Closes #21364 --- .../world/3.3.5/2018_02_08_01_world_335.sql | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_01_world_335.sql new file mode 100644 index 0000000000..f3359f34e7 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_01_world_335.sql @@ -0,0 +1,85 @@ +-- Ragged Timber Wolf +DELETE FROM `creature_loot_template` WHERE `Entry`=704; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(704, 750, 0, 100, 1, 1, 0, 1, 1, "Tough Wolf Meat (quest)"), +(704, 4865, 0, 20, 0, 1, 1, 1, 2, "Ruined Pelt"), +(704, 3300, 0, 30, 0, 1, 1, 1, 2, "Rabbit's Foot"), +(704, 7074, 0, 20, 0, 1, 1, 1, 2, "Chipped Claw"), +(704, 7073, 0, 30, 0, 1, 1, 1, 2, "Broken Fang"), +(704, 24073, 24073, 1, 0, 1, 0, 1, 1, "Junk"), +(704, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); + +-- Ragged Young Wolf +DELETE FROM `creature_loot_template` WHERE `Entry`=705; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(705, 750, 0, 100, 1, 1, 0, 1, 1, "Tough Wolf Meat (quest)"), +(705, 4865, 0, 20, 0, 1, 1, 1, 2, "Ruined Pelt"), +(705, 3300, 0, 30, 0, 1, 1, 1, 2, "Rabbit's Foot"), +(705, 7074, 0, 20, 0, 1, 1, 1, 2, "Chipped Claw"), +(705, 7073, 0, 30, 0, 1, 1, 1, 2, "Broken Fang"), +(705, 24073, 24073, 1, 0, 1, 0, 1, 1, "Junk"), +(705, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); + +-- Frostmane Troll Whelp +DELETE FROM `creature_loot_template` WHERE `Entry`=706; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(706, 117, 0, 15, 0, 1, 0, 1, 1, "Tough Jerky"), +(706, 159, 0, 10, 0, 1, 0, 1, 1, "Refreshing Spring Water"), +(706, 2108, 0, 1, 0, 1, 0, 1, 1, "Frostmane Leather Vest (unique)"), +(706, 24073, 24073, 5, 0, 1, 0, 1, 1, "Junk"), +(706, 11111, 11111, 0.5, 0, 1, 0, 1, 1, "Bags"); + +-- Rockjaw Trogg +DELETE FROM `creature_loot_template` WHERE `Entry`=707; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(707, 117, 0, 15, 0, 1, 0, 1, 1, "Tough Jerky"), +(707, 159, 0, 10, 0, 1, 0, 1, 1, "Refreshing Spring Water"), +(707, 24073, 24073, 5, 0, 1, 0, 1, 1, "Junk"), +(707, 11111, 11111, 0.5, 0, 1, 0, 1, 1, "Bags"); + +-- Small Crag Boar +DELETE FROM `creature_loot_template` WHERE `Entry`=708; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(708, 117, 0, 30, 0, 1, 0, 1, 2, "Tough Jerky"), +(708, 771, 0, 30, 0, 1, 1, 1, 2, "Chipped Boar Tusk"), +(708, 4865, 0, 35, 0, 1, 1, 1, 2, "Ruined Pelt"), +(708, 7098, 0, 35, 0, 1, 1, 1, 2, "Splintered Tusk"), +(708, 24073, 24073, 2, 0, 1, 0, 1, 1, "Junk"), +(708, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); + +-- Burly Rockjaw Trogg +DELETE FROM `creature_loot_template` WHERE `Entry`=724; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(724, 117, 0, 15, 0, 1, 0, 1, 1, "Tough Jerky"), +(724, 159, 0, 10, 0, 1, 0, 1, 1, "Refreshing Spring Water"), +(724, 2787, 0, 1, 0, 1, 0, 1, 1, "Trogg Dagger (unique)"), +(724, 24073, 24073, 5, 0, 1, 0, 1, 1, "Junk"), +(724, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); + +-- Grik'nir the Cold +DELETE FROM `creature_loot_template` WHERE `Entry`=808; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(808, 117, 0, 15, 0, 1, 0, 1, 1, "Tough Jerky"), +(808, 159, 0, 10, 0, 1, 0, 1, 1, "Refreshing Spring Water"), +(808, 2004, 0, 100, 1, 1, 0, 1, 1, "Grelin Whitebeard's Journal (quest)"), +(808, 2109, 0, 1, 0, 1, 0, 1, 1, "Frostmane Chain Vest (unique)"), +(808, 24073, 24073, 35, 0, 1, 0, 1, 1, "Junk"), +(808, 11111, 11111, 1, 0, 1, 0, 1, 1, "Bags"); + +-- Frostmane Novice +DELETE FROM `creature_loot_template` WHERE `Entry`=946; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(946, 117, 0, 15, 0, 1, 0, 1, 1, "Tough Jerky"), +(946, 159, 0, 10, 0, 1, 0, 1, 1, "Refreshing Spring Water"), +(946, 2110, 0, 1, 0, 1, 0, 1, 1, "Light Magesmith Robe (unique)"), +(946, 24073, 24073, 5, 0, 1, 0, 1, 1, "Junk"), +(946, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); + +-- Rockjaw Raider +DELETE FROM `creature_loot_template` WHERE `Entry`=1718; +INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES +(1718, 117, 0, 15, 0, 1, 0, 1, 1, "Tough Jerky"), +(1718, 159, 0, 10, 0, 1, 0, 1, 1, "Refreshing Spring Water"), +(1718, 2054, 0, 1, 0, 1, 0, 1, 1, "Trogg Hand Axe (unique)"), +(1718, 24073, 24073, 5, 0, 1, 0, 1, 1, "Junk"), +(1718, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); From 15e908faf99cea352ed5e137e15dfafb18dc1186 Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Thu, 8 Feb 2018 17:26:38 +0100 Subject: [PATCH 018/101] DB/Loot: Reference template 24062 corrections Closes #21368 --- .../world/3.3.5/2018_02_08_02_world_335.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_02_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_02_world_335.sql new file mode 100644 index 0000000000..717cec62c0 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_02_world_335.sql @@ -0,0 +1,14 @@ +-- Remove unique items from reference table 24062 +DELETE FROM `reference_loot_template` WHERE `Entry`=24062 AND `Item` IN (880, 1299, 1457, 1458, 2175, 1462, 1461, 1459, 3018, 3227); + +-- Add former items from reference table 24062 to their proper NPCs +DELETE FROM `creature_loot_template` WHERE `Item` IN (880, 1299, 1457, 1458, 2175, 1462, 1461, 1459); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES +(202, 880, 0.1, 0, "Skeletal Horror - Staff of Horrors"), +(436, 1299, 0.1, 0, "Blackrock Shadowcaster - Lesser Belt of the Spire"), +(433, 1457, 0.1, 0, "Shadowhide Gnoll - Shadowhide Mace"), +(432, 1458, 0.1, 0, "Shadowhide Brute - Shadowhide Maul"), +(568, 2175, 0.1, 0, "Shadowhide Warrior - Shadowhide Battle Axe"), +(429, 1462, 0.1, 0, "Shadowhide Darkweaver - Ring of the Shadow"), +(431, 1461, 0.1, 0, "Shadowhide Slayer - Slayer's Battle Axe"), +(579, 1459, 0.1, 0, "Shadowhide Assassin - Shadowhide Scalper"); From 770bb364a168aa0b59f58bdbc32387ac5e69e48b Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Thu, 8 Feb 2018 17:28:33 +0100 Subject: [PATCH 019/101] DB/Loot: Set up correct rare drops for Shadowfang Keep exclusive items Closes #21382 --- .../world/3.3.5/2018_02_08_03_world_335.sql | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_03_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_03_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_03_world_335.sql new file mode 100644 index 0000000000..2d7c7378b6 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_03_world_335.sql @@ -0,0 +1,39 @@ +-- Create new reference loot template for Shadowfang Keep +SET @ENTRY := 1055; -- need a new id + +DELETE FROM `reference_loot_template` WHERE `Entry`=@ENTRY; +INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES +(@ENTRY, 1318, 0, 1, "Night Reaver"), +(@ENTRY, 1482, 0, 1, "Shadowfang"), +(@ENTRY, 1483, 0, 1, "Face Smasher"), +(@ENTRY, 1484, 0, 1, "Witching Stave"), +(@ENTRY, 1489, 0, 1, "Gloomshroud Armor"), +(@ENTRY, 1935, 0, 1, "Assassin's Blade"), +(@ENTRY, 1974, 0, 1, "Mindthrust Bracers"), +(@ENTRY, 2205, 0, 1, "Duskbringer"), +(@ENTRY, 2292, 0, 1, "Necrology Robes"), +(@ENTRY, 2807, 0, 1, "Guillotine Axe"), +(@ENTRY, 3194, 0, 1, "Black Malice"); + +-- Remove all SFK exclusive items from direct drops from NPCs +DELETE FROM `creature_loot_template` WHERE `Item` IN +(1318, 1482, 1483, 1484, 1489, 1935, 1974, 2205, 2292, 2807, 3194); + +-- Add SFK reference template for non-boss NPCs +DELETE FROM `creature_loot_template` WHERE `Reference` = @ENTRY; +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `Comment`) VALUES +(2529, @ENTRY, @ENTRY, 0.1, "Son of Arugal - SFK Rares"), +(3851, @ENTRY, @ENTRY, 0.1, "Shadowfang Whitescalp - SFK Rares"), +(3853, @ENTRY, @ENTRY, 0.1, "Shadowfang Moonwalker - SFK Rares"), +(3854, @ENTRY, @ENTRY, 0.1, "Shadowfang Wolfguard - SFK Rares"), +(3855, @ENTRY, @ENTRY, 0.1, "Shadowfang Darksoul - SFK Rares"), +(3857, @ENTRY, @ENTRY, 0.1, "Shadowfang Glutton - SFK Rares"), +(3859, @ENTRY, @ENTRY, 0.1, "Shadowfang Ragetooth - SFK Rares"), +(3861, @ENTRY, @ENTRY, 0.1, "Bleak Worg - SFK Rares"), +(3862, @ENTRY, @ENTRY, 0.1, "Slavering Worg - SFK Rares"), +(3863, @ENTRY, @ENTRY, 0.1, "Lupine Horror - SFK Rares"), +(3866, @ENTRY, @ENTRY, 0.1, "Vile Bat - SFK Rares"), +(3868, @ENTRY, @ENTRY, 0.1, "Blood Seeker - SFK Rares"), +(3873, @ENTRY, @ENTRY, 0.1, "Tormented Officer - SFK Rares"), +(3875, @ENTRY, @ENTRY, 0.1, "Haunted Servitor - SFK Rares"), +(3877, @ENTRY, @ENTRY, 0.1, "Wailing Guardsman - SFK Rares"); From 7f37e5886e06288fe319cd105f1880e096db2a2f Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 8 Feb 2018 17:29:51 +0100 Subject: [PATCH 020/101] DB/SAI: Living Storm, Land Rager & Gusting Vortex Closes #21376 --- .../world/3.3.5/2018_02_08_04_world_335.sql | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_04_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_04_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_04_world_335.sql new file mode 100644 index 0000000000..bf4ac574ee --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_04_world_335.sql @@ -0,0 +1,22 @@ +-- Living Storm +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9397; +DELETE FROM `smart_scripts` WHERE `entryorguid`=9397 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(9397,0,0,0,16,0,100,0,12550,1,5000,5000,11,12550,0,0,0,0,0,1,0,0,0,0,0,0,0,"Living Storm - On Friendly Unit Missing Buff 'Lightning Shield' - Cast Lightning Shield"); + +-- Land Rager +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5465; +DELETE FROM `smart_scripts` WHERE `entryorguid`=5465 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5465,0,0,0,2,0,100,1,0,50,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0,"Land Rager - Between 0-50% Health - Cast Enrage (No Repeat)"), +(5465,0,1,0,2,0,100,1,0,50,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Land Rager - Between 0-50% Health - Say Line 0 (No Repeat)"); + +DELETE FROM `creature_text` WHERE `CreatureID`=5465; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(5465,0,0,"%s becomes enraged!",16,0,100,0,0,0,10677,0,"Land Rager"); + +-- Gusting Vortex +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8667; +DELETE FROM `smart_scripts` WHERE `entryorguid`=8667 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(8667,0,0,0,0,0,100,0,8000,11000,22000,26000,11,6982,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gusting Vortex - In Combat - Cast Gust of Wind"); From e54268094268a7c06bd17fe5937df4a138c3d604 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 8 Feb 2018 17:31:12 +0100 Subject: [PATCH 021/101] DB/Quest: Tran'rek (breadcrumb quest) Closes #21373 --- sql/updates/world/3.3.5/2018_02_08_05_world_335.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_05_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_05_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_05_world_335.sql new file mode 100644 index 0000000000..07134fb590 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_05_world_335.sql @@ -0,0 +1,6 @@ +-- BreadCrumb Quest "Tran'rek" +UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=2865; +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry` IN (2864,2865); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19,0,2864,0,0,14,0,2865,0,0,0,0,0,"","Quest 'Tran'rek' can only be taken if quest 'Scarab Shells' is not taken"), +(19,0,2865,0,0,28,0,2864,0,0,1,0,0,"","Quest 'Scarab Shells' can only be taken if quest 'Tran'rek' is not completed"); From e17a835a4b126abff376a721bcc9b6f8d2b9101d Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 8 Feb 2018 17:31:45 +0100 Subject: [PATCH 022/101] DB/Misc: Feralas Quest Emotes (Horde) Closes #21372 --- .../world/3.3.5/2018_02_08_06_world_335.sql | 219 ++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_06_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_06_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_06_world_335.sql new file mode 100644 index 0000000000..4714d0f5e0 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_06_world_335.sql @@ -0,0 +1,219 @@ +-- Quest "A Threat in Feralas" +DELETE FROM `quest_details` WHERE `ID`=2981; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2981,1,1,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=2981; + +-- Quest "The Ogres of Feralas" +DELETE FROM `quest_details` WHERE `ID`=2975; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2975,5,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=2975; + +-- Quest "The Ogres of Feralas (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=2980; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2980,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=2980; + +-- Quest "The Gordunni Scroll" +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=2978; + +-- Quest "Dark Ceremony" +DELETE FROM `quest_details` WHERE `ID`=2979; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2979,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=2979; + +-- Quest "The Gordunni Orb" +DELETE FROM `quest_details` WHERE `ID`=3002; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3002,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=3002; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=3002; + +-- Quest "A New Cloak's Sheen" +DELETE FROM `quest_details` WHERE `ID`=2973; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2973,2,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=1, `EmoteOnIncomplete`=1 WHERE `ID`=2973; +UPDATE `quest_offer_reward` SET `Emote1`=11 WHERE `ID`=2973; + +-- Quest "A Grim Discovery" +DELETE FROM `quest_details` WHERE `ID`=2974; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2974,5,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=1, `EmoteOnIncomplete`=1 WHERE `ID`=2974; + +-- Quest "A Grim Discovery (Part 2)" +DELETE FROM `quest_details` WHERE `ID`=2976; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2976,5,1,1,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=5, `Emote2`=1 WHERE `ID`=2976; + +-- Quest "A Strange Request" +DELETE FROM `quest_details` WHERE `ID`=3121; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3121,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=3121; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3121; + +-- Quest "Return to Witch Doctor Uzer'i" +DELETE FROM `quest_details` WHERE `ID`=3122; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3122,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=3122; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3122; + +-- Quest "Natural Materials" +DELETE FROM `quest_details` WHERE `ID`=3128; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3128,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=3128; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=3128; + +-- Quest "War on the Woodpaw" +DELETE FROM `quest_details` WHERE `ID`=2862; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2862,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=5, `EmoteOnIncomplete`=5 WHERE `ID`=2862; +UPDATE `quest_offer_reward` SET `Emote1`=21 WHERE `ID`=2862; + +-- Quest "Alpha Strike" +DELETE FROM `quest_details` WHERE `ID`=2863; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2863,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=66 WHERE `ID`=2863; + +-- Quest "Woodpaw Investigation" +DELETE FROM `quest_details` WHERE `ID`=2902; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2902,1,1,0,0,0,0,0,0,0); + +-- Quest "The Battle Plans" +UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=2903; + +-- Quest "Stinglasher" +DELETE FROM `quest_details` WHERE `ID`=7731; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7731,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=7731; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=7731; + +-- Quest "Zukk'ash Infestation" +DELETE FROM `quest_details` WHERE `ID`=7730; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7730,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=7730; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=7730; + +-- Quest "Zukk'ash Report" +DELETE FROM `quest_details` WHERE `ID`=7732; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7732,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=7732; +UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=1 WHERE `ID`=7732; + +-- Quest "The Mark of Quality" +DELETE FROM `quest_details` WHERE `ID`=2822; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(2822,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=2822; +UPDATE `quest_offer_reward` SET `Emote1`=5 WHERE `ID`=2822; + +-- Quest "Gordunni Cobalt" +UPDATE `quest_request_items` SET `EmoteOnComplete`=5, `EmoteOnIncomplete`=5 WHERE `ID`=2987; + +-- Quest "Testing the Vessel" +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=3123; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3123; + +-- Quest "Hippogryph Muisek" +DELETE FROM `quest_details` WHERE `ID`=3124; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3124,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=3124; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3124; + +-- Quest "Faerie Dragon Muisek" +DELETE FROM `quest_details` WHERE `ID`=3125; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3125,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=3125; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3125; + +-- Quest "Treant Muisek" +DELETE FROM `quest_details` WHERE `ID`=3126; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3126,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=3126; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=3126; + +-- Quest "Mountain Giant Muisek" +DELETE FROM `quest_details` WHERE `ID`=3127; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3127,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=6, `EmoteOnIncomplete`=6 WHERE `ID`=3127; +UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=4 WHERE `ID`=3127; + +-- Quest "Weapons of Spirit" +DELETE FROM `quest_details` WHERE `ID`=3129; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3129,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=4 WHERE `ID`=3129; + +-- Quest "Dark Heart" +DELETE FROM `quest_details` WHERE `ID`=3062; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3062,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnComplete`=0 WHERE `ID`=3062; +UPDATE `quest_offer_reward` SET `Emote1`=2, `EmoteDelay1`=1000 WHERE `ID`=3062; + +-- Quest "Vengeance on the Northspring" +DELETE FROM `quest_details` WHERE `ID`=3063; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(3063,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=2 WHERE `ID`=3063; + +-- Quest "The Strength of Corruption" +DELETE FROM `quest_details` WHERE `ID`=4120; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(4120,1,0,0,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=4120; + +-- Quest "Improved Quality" +DELETE FROM `quest_details` WHERE `ID`=7734; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7734,1,0,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=5 WHERE `ID`=7734; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=7734; + +-- Quest "Perfect Yeti Hide" +UPDATE `quest_request_items` SET `EmoteOnComplete`=6 WHERE `ID`=7738; +UPDATE `quest_offer_reward` SET `Emote1`=1 WHERE `ID`=7738; + +-- Quest "Zapped Giants" +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=7003; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=7003; + +-- Quest "Again With the Zapped Giants" +DELETE FROM `quest_details` WHERE `ID`=7725; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7725,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=7725; +UPDATE `quest_offer_reward` SET `Emote1`=4 WHERE `ID`=7725; + +-- Quest "Fuel for the Zapping" +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=7721; + +-- Quest "Refuel for the Zapping" +DELETE FROM `quest_details` WHERE `ID`=7726; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7726,1,1,0,0,0,0,0,0,0); +UPDATE `quest_request_items` SET `EmoteOnIncomplete`=6 WHERE `ID`=7726; + +-- Quest "Elven Legends" +DELETE FROM `quest_details` WHERE `ID`=7481; +INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES +(7481,1,1,1,0,0,0,0,0,0); +UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=6 WHERE `ID`=7481; From f96c30d92c22b8f869660fba32d8c097ff8cca6d Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 8 Feb 2018 17:34:00 +0100 Subject: [PATCH 023/101] DB/Quest: Weapons of Spirit Closes #21371 --- .../world/3.3.5/2018_02_08_07_world_335.sql | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_07_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_07_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_07_world_335.sql new file mode 100644 index 0000000000..d032ad62a5 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_07_world_335.sql @@ -0,0 +1,31 @@ +-- Witch Doctor Uzer'i +DELETE FROM `creature_text` WHERE `CreatureID`=8115 AND `GroupID` IN (2,3); +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(8115,2,0,"%s gathers the materials together and begins to work.",16,0,100,0,0,0,4175,0,"Witch Doctor Uzer'i"), +(8115,3,0,"I have completed the weapons, $n.",12,0,100,1,0,0,4176,0,"Witch Doctor Uzer'i"); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=8115 AND `source_type`=0 AND `id` IN (1,2,3); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (811501,811502,811503) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(8115,0,1,0,19,0,100,0,3129,0,0,0,80,811501,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Quest 'Weapons of Spirit' Taken - Run Script"), +(8115,0,2,0,40,0,100,0,3,8115,0,0,80,811502,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Waypoint 3 Reached - Run Script"), +(8115,0,3,0,40,0,100,0,6,8115,0,0,80,811503,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Waypoint 6 Reached - Run Script"), +(811501,9,0,0,0,0,100,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Remove Npc Flag Questgiver+Gossip"), +(811501,9,1,0,0,0,100,0,1000,1000,0,0,53,1,8115,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Start Waypoint"), +(811502,9,0,0,0,0,100,0,0,0,0,0,54,16000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Pause Waypoint"), +(811502,9,1,0,0,0,100,0,500,500,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,1.75709,"Witch Doctor Uzer'i - On Script - Set Orientation"), +(811502,9,2,0,0,0,100,0,1000,1000,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Set Flag Standstate Kneel"), +(811502,9,3,0,0,0,100,0,0,0,0,0,1,2,0,0,0,0,0,7,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Say Line 2"), +(811502,9,4,0,0,0,100,0,13000,13000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Remove Flag Standstate Kneel"), +(811503,9,0,0,0,0,100,0,500,500,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.72984,"Witch Doctor Uzer'i - On Script - Set Orientation"), +(811503,9,1,0,0,0,100,0,0,0,0,0,1,3,0,0,0,0,0,7,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Say Line 3"), +(811503,9,2,0,0,0,100,0,0,0,0,0,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Witch Doctor Uzer'i - On Script - Add Npc Flag Questgiver+Gossip"); + +DELETE FROM `waypoints` WHERE `entry`=8115; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(8115,1,-4375.1,259.339,26.584,""), +(8115,2,-4378.28,255.898,26.3856,""), +(8115,3,-4383,256.683,25.8833,""), +(8115,4,-4378.28,255.898,26.3856,""), +(8115,5,-4375.1,259.339,26.584,""), +(8115,6,-4375.68,269.717,25.4947,""); From 882930d448291136a6f43cbb0a0241b8b5c98e23 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 8 Feb 2018 17:34:38 +0100 Subject: [PATCH 024/101] DB/Quest: Zapped Giants Closes #21370 --- .../world/3.3.5/2018_02_08_08_world_335.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_08_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_08_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_08_world_335.sql new file mode 100644 index 0000000000..c985af6e20 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_08_world_335.sql @@ -0,0 +1,25 @@ +-- Quest "Zapped Giants" +-- Cliff Giant +DELETE FROM `smart_scripts` WHERE `entryorguid`=5358 AND `source_type`=0 AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5358,0,2,0,8,0,100,512,23359,0,0,0,3,14640,0,0,0,0,0,1,0,0,0,0,0,0,0,"Cliff Giant - On Spellhit 'Transmogrify!' - Morph to 'Zapped Cliff Giant'"); + +-- Land Walker +DELETE FROM `smart_scripts` WHERE `entryorguid`=5357 AND `source_type`=0 AND `id`=2; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5357,0,2,0,8,0,100,512,23359,0,0,0,3,14604,0,0,0,0,0,1,0,0,0,0,0,0,0,"Land Walker - On Spellhit 'Transmogrify!' - Morph to 'Zapped Land Walker'"); + +-- Shore Strider +DELETE FROM `smart_scripts` WHERE `entryorguid`=5359 AND `source_type`=0 AND `id`=1; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5359,0,1,0,8,0,100,512,23359,0,0,0,3,14603,0,0,0,0,0,1,0,0,0,0,0,0,0,"Shore Strider - On Spellhit 'Transmogrify!' - Morph to 'Zapped Shore Strider'"); + +-- Deep Strider +DELETE FROM `smart_scripts` WHERE `entryorguid`=5360 AND `source_type`=0 AND `id`=1; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5360,0,1,0,8,0,100,512,23359,0,0,0,3,14639,0,0,0,0,0,1,0,0,0,0,0,0,0,"Deep Strider - On Spellhit 'Transmogrify!' - Morph to 'Zapped Deep Strider'"); + +-- Wave Strider +DELETE FROM `smart_scripts` WHERE `entryorguid`=5361 AND `source_type`=0 AND `id`=1; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(5361,0,1,0,8,0,100,512,23359,0,0,0,3,14638,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wave Strider - On Spellhit 'Transmogrify!' - Morph to 'Zapped Wave Strider'"); From 1fe757d16c9f8c396134c55fd8879115c455016a Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Thu, 8 Feb 2018 17:35:56 +0100 Subject: [PATCH 025/101] DB/Gossip: Zorbin Fandazzle Closes #21369 --- sql/updates/world/3.3.5/2018_02_08_09_world_335.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_09_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_09_world_335.sql b/sql/updates/world/3.3.5/2018_02_08_09_world_335.sql new file mode 100644 index 0000000000..6369e7e1a3 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_09_world_335.sql @@ -0,0 +1,11 @@ +-- Zorbin Fandazzle --> Add gossip conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=11361; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,11361,7116,0,0,8,0,7003,0,0,0,0,0,"","Show gossip text 5444 if quest 'Zapped Giants' is rewarded"), +(14,11361,7116,0,0,8,0,7721,0,0,0,0,0,"","Show gossip text 5444 if quest 'Fuel for the Zapping' is rewarded"), +(15,11361,0,0,0,8,0,7003,0,0,0,0,0,"","Show gossip option if quest 'Zapped Giants' is rewarded"), +(15,11361,0,0,0,8,0,7721,0,0,0,0,0,"","Show gossip option if quest 'Fuel for the Zapping' is rewarded"); + +DELETE FROM `gossip_menu_option` WHERE `MenuID`=11361; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(11361,0,1,"Got anything interesting for sale, Zorbin?",9817,3,128,0,0,0,0,"",0,0); From 696304ab11754ee57a3ee091ec6823e1ddb56604 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 8 Feb 2018 22:26:58 +0100 Subject: [PATCH 026/101] DB/Creature: Remove Tamed Sporebat spawns, summoned as pets by other npcs --- sql/updates/world/3.3.5/2018_02_08_10_world.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_08_10_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_10_world.sql b/sql/updates/world/3.3.5/2018_02_08_10_world.sql new file mode 100644 index 0000000000..ae24d4fd45 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_08_10_world.sql @@ -0,0 +1,3 @@ +-- +DELETE FROM `creature` WHERE `id` IN (18201); +DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (18201)); From c14a2284ab0104a1c27dc4bd66643ec765abd77a Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 8 Feb 2018 23:14:07 +0100 Subject: [PATCH 027/101] DB: Fix the previous commit --- sql/updates/world/3.3.5/2018_02_08_10_world.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/world/3.3.5/2018_02_08_10_world.sql b/sql/updates/world/3.3.5/2018_02_08_10_world.sql index ae24d4fd45..24d0f839e1 100644 --- a/sql/updates/world/3.3.5/2018_02_08_10_world.sql +++ b/sql/updates/world/3.3.5/2018_02_08_10_world.sql @@ -1,3 +1,3 @@ -- -DELETE FROM `creature` WHERE `id` IN (18201); DELETE FROM `creature_addon` WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (18201)); +DELETE FROM `creature` WHERE `id` IN (18201); From 6363bc77b8331cf8eab10ea00b368b85c9c337c8 Mon Sep 17 00:00:00 2001 From: Treeston Date: Fri, 9 Feb 2018 18:07:57 +0100 Subject: [PATCH 028/101] Game/AI: InvalidAIException internal cleanup --- src/server/game/AI/AIException.cpp | 23 ----------------------- src/server/game/AI/AIException.h | 9 ++------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 src/server/game/AI/AIException.cpp diff --git a/src/server/game/AI/AIException.cpp b/src/server/game/AI/AIException.cpp deleted file mode 100644 index ce3d601302..0000000000 --- a/src/server/game/AI/AIException.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2008-2018 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "AIException.h" - -InvalidAIException::InvalidAIException(char const* _message) -{ - message().assign(_message); -} diff --git a/src/server/game/AI/AIException.h b/src/server/game/AI/AIException.h index 265e5dddb5..d012a4cc5f 100644 --- a/src/server/game/AI/AIException.h +++ b/src/server/game/AI/AIException.h @@ -25,16 +25,11 @@ class TC_GAME_API InvalidAIException : public std::exception { public: - InvalidAIException(char const* _message); - ~InvalidAIException() throw() { } - + InvalidAIException(char const* msg) : msg_(msg) {} char const* what() const noexcept override { return msg_.c_str(); } -protected: - std::string & message() throw() { return msg_; } - private: - std::string msg_; + std::string const msg_; }; #endif From 563de5bf204255a0814cfdb2e86c12cfc4c93d66 Mon Sep 17 00:00:00 2001 From: Keader Date: Fri, 9 Feb 2018 16:02:00 -0200 Subject: [PATCH 029/101] Scripts/Icecrown Citadel: Fixed Sindragosa spawn after grid unload ty sirikfoll :) --- .../scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 58eb328ddf..47178a4007 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1621,12 +1621,12 @@ public: } }; -class at_sindragosa_lair : public OnlyOnceAreaTriggerScript +class at_sindragosa_lair : public AreaTriggerScript { public: - at_sindragosa_lair() : OnlyOnceAreaTriggerScript("at_sindragosa_lair") { } + at_sindragosa_lair() : AreaTriggerScript("at_sindragosa_lair") { } - bool _OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override + bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override { if (InstanceScript* instance = player->GetInstanceScript()) { From e208de2a7293ce91076c50d6cdd59c58fe6d7da1 Mon Sep 17 00:00:00 2001 From: Killyana Date: Fri, 9 Feb 2018 23:19:02 +0100 Subject: [PATCH 030/101] DB/Creature: Arcatraz Sentinel Updates #21156 --- sql/updates/world/3.3.5/2018_02_09_01_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_09_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_09_01_world.sql b/sql/updates/world/3.3.5/2018_02_09_01_world.sql new file mode 100644 index 0000000000..4b5d7be403 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_09_01_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `creature_template` SET `RegenHealth`=0 WHERE `entry` IN (20869, 21586); +UPDATE `creature` SET `curhealth`=62315 WHERE `id` IN (20869); +DELETE FROM `smart_scripts` WHERE `entryorguid`=20869 AND `source_type`=0 AND `id`=4; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(20869, 0, 4, 0, 4, 0, 100, 0, 0, 0, 0, 0, 28, 31261, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Arcatraz Sentinel - On aggro - remove aura'); From 9818296c27452a40271d967e6ade83e2ff2f084d Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 10 Feb 2018 12:17:24 +0100 Subject: [PATCH 031/101] rename files --- .../2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql} | 0 .../2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql} | 0 .../2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql} | 0 .../2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql} | 0 .../2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql} | 0 .../2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql} | 0 .../2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql} | 0 .../2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql} | 0 .../2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql} | 0 .../2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql} | 0 .../2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql} | 0 .../2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql} | 0 .../2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql} | 0 .../2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql} | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{3.3.5/2018_02_04_01_world_335.sql => 4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_04_02_world.sql => 4.3.4/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_00_world_335.sql => 4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_01_world_335.sql => 4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_02_world_335.sql => 4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_03_world_335.sql => 4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_04_world_335.sql => 4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_05_world_335.sql => 4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_06_world_335.sql => 4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_07_world_335.sql => 4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_08_world_335.sql => 4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_09_world_335.sql => 4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_08_10_world.sql => 4.3.4/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_09_01_world.sql => 4.3.4/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_02_04_01_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_04_01_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_04_02_world.sql b/sql/updates/world/4.3.4/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_04_02_world.sql rename to sql/updates/world/4.3.4/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_00_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_00_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_01_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_01_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_02_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_02_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_03_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_03_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_04_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_04_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_05_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_05_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_06_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_06_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_07_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_07_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_08_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_08_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_09_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_09_world_335.sql rename to sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_08_10_world.sql b/sql/updates/world/4.3.4/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_08_10_world.sql rename to sql/updates/world/4.3.4/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_09_01_world.sql b/sql/updates/world/4.3.4/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_09_01_world.sql rename to sql/updates/world/4.3.4/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql From 104aa66912ad0c9c5e7b97b93866292f0b509268 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 10 Feb 2018 12:18:56 +0100 Subject: [PATCH 032/101] missing part --- ...2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql | 2 ++ ...2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql | 2 ++ ...2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql | 2 ++ ...2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql | 2 ++ ...2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql | 2 ++ ...2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql | 2 ++ ...2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql | 2 ++ ...2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql | 2 ++ ...2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql | 2 ++ ...2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql | 2 ++ ...2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql | 2 ++ 11 files changed, 22 insertions(+) diff --git a/sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql index bc35f5d806..f035e77f2f 100644 --- a/sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql @@ -1,3 +1,4 @@ +/* -- Remove unique items from reference table 24078 DELETE FROM `reference_loot_template` WHERE `Entry`=24078 AND `Item` IN (899, 1391, 1440, 1446, 1469, 1473, 1929, 1930, 1936, 1943, 1944, 1945, 1951, 2020, 4290, 10400, 10401, 10402); @@ -27,3 +28,4 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Com (634, 10401, 0.5, 2, "Defias Overseer - Blackened Defias Gloves"), (4417, 10401, 0.5, 2, "Defias Taskmaster - Blackened Defias Gloves"), (4416, 10402, 0.5, 0, "Defias Strip Miner - Blackened Defias Boots"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql index 5046c17523..cadd583c72 100644 --- a/sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql @@ -1,3 +1,4 @@ +/* -- Remove unique items from reference table 24060, as well as removing Agile Boots (4788) which is sold only and does not drop DELETE FROM `reference_loot_template` WHERE `Entry`=24060 AND `Item` IN (1218, 1220, 1296, 1300, 1448, 1460, 1934, 2021, 2166, 2167, 2168, 3018, 3227, 4788, 4949, 5182, 5183); @@ -21,3 +22,4 @@ INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Chance`,`GroupId`,`Comment (7170, 4949, 100, 0, "Thragomm - Orcish Cleaver"), (3398, 5182, 2, 2, "Gesharahan - Shiver Blade"), (3398, 5183, 2, 2, "Gesharahan - Pulsating Hydra Heart"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql index f3359f34e7..5df88215c5 100644 --- a/sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql @@ -1,3 +1,4 @@ +/* -- Ragged Timber Wolf DELETE FROM `creature_loot_template` WHERE `Entry`=704; INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`QuestRequired`,`LootMode`,`GroupId`,`MinCount`,`MaxCount`,`Comment`) VALUES @@ -83,3 +84,4 @@ INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Reference`,`Chance`,`Quest (1718, 2054, 0, 1, 0, 1, 0, 1, 1, "Trogg Hand Axe (unique)"), (1718, 24073, 24073, 5, 0, 1, 0, 1, 1, "Junk"), (1718, 11111, 11111, 0.1, 0, 1, 0, 1, 1, "Bags"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql index 717cec62c0..8b03cf27af 100644 --- a/sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql @@ -1,3 +1,4 @@ +/* -- Remove unique items from reference table 24062 DELETE FROM `reference_loot_template` WHERE `Entry`=24062 AND `Item` IN (880, 1299, 1457, 1458, 2175, 1462, 1461, 1459, 3018, 3227); @@ -12,3 +13,4 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Com (429, 1462, 0.1, 0, "Shadowhide Darkweaver - Ring of the Shadow"), (431, 1461, 0.1, 0, "Shadowhide Slayer - Slayer's Battle Axe"), (579, 1459, 0.1, 0, "Shadowhide Assassin - Shadowhide Scalper"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql index 2d7c7378b6..52d1cce48a 100644 --- a/sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql @@ -1,3 +1,4 @@ +/* -- Create new reference loot template for Shadowfang Keep SET @ENTRY := 1055; -- need a new id @@ -37,3 +38,4 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `C (3873, @ENTRY, @ENTRY, 0.1, "Tormented Officer - SFK Rares"), (3875, @ENTRY, @ENTRY, 0.1, "Haunted Servitor - SFK Rares"), (3877, @ENTRY, @ENTRY, 0.1, "Wailing Guardsman - SFK Rares"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql index bf4ac574ee..edbd3a87cd 100644 --- a/sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql @@ -1,3 +1,4 @@ +/* -- Living Storm UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9397; DELETE FROM `smart_scripts` WHERE `entryorguid`=9397 AND `source_type`=0; @@ -20,3 +21,4 @@ UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8667; DELETE FROM `smart_scripts` WHERE `entryorguid`=8667 AND `source_type`=0; INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (8667,0,0,0,0,0,100,0,8000,11000,22000,26000,11,6982,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gusting Vortex - In Combat - Cast Gust of Wind"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql index 07134fb590..9312d8d981 100644 --- a/sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql @@ -1,6 +1,8 @@ +/* -- BreadCrumb Quest "Tran'rek" UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=2865; DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry` IN (2864,2865); INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (19,0,2864,0,0,14,0,2865,0,0,0,0,0,"","Quest 'Tran'rek' can only be taken if quest 'Scarab Shells' is not taken"), (19,0,2865,0,0,28,0,2864,0,0,1,0,0,"","Quest 'Scarab Shells' can only be taken if quest 'Tran'rek' is not completed"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql index 4714d0f5e0..8e877ef84a 100644 --- a/sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "A Threat in Feralas" DELETE FROM `quest_details` WHERE `ID`=2981; INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES @@ -217,3 +218,4 @@ DELETE FROM `quest_details` WHERE `ID`=7481; INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES (7481,1,1,1,0,0,0,0,0,0); UPDATE `quest_offer_reward` SET `Emote1`=1, `Emote2`=6 WHERE `ID`=7481; +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql index d032ad62a5..46e637012b 100644 --- a/sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql @@ -1,3 +1,4 @@ +/* -- Witch Doctor Uzer'i DELETE FROM `creature_text` WHERE `CreatureID`=8115 AND `GroupID` IN (2,3); INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES @@ -29,3 +30,4 @@ INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `positi (8115,4,-4378.28,255.898,26.3856,""), (8115,5,-4375.1,259.339,26.584,""), (8115,6,-4375.68,269.717,25.4947,""); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql index c985af6e20..f5098d7e1d 100644 --- a/sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql @@ -1,3 +1,4 @@ +/* -- Quest "Zapped Giants" -- Cliff Giant DELETE FROM `smart_scripts` WHERE `entryorguid`=5358 AND `source_type`=0 AND `id`=2; @@ -23,3 +24,4 @@ INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_ DELETE FROM `smart_scripts` WHERE `entryorguid`=5361 AND `source_type`=0 AND `id`=1; INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (5361,0,1,0,8,0,100,512,23359,0,0,0,3,14638,0,0,0,0,0,1,0,0,0,0,0,0,0,"Wave Strider - On Spellhit 'Transmogrify!' - Morph to 'Zapped Wave Strider'"); +*/ diff --git a/sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql b/sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql index 6369e7e1a3..cb75285a1b 100644 --- a/sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql @@ -1,3 +1,4 @@ +/* -- Zorbin Fandazzle --> Add gossip conditions DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=11361; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES @@ -9,3 +10,4 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry DELETE FROM `gossip_menu_option` WHERE `MenuID`=11361; INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES (11361,0,1,"Got anything interesting for sale, Zorbin?",9817,3,128,0,0,0,0,"",0,0); +*/ From d1df97db238c8e6d4092cbe0798889912278dc42 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 10 Feb 2018 16:07:56 +0100 Subject: [PATCH 033/101] Shared/Database: Improve dead-lock error handling Improve dead-lock error handling in async transactions by retrying the transaction for up to 60 seconds instead of just 5 times --- .../database/Database/DatabaseWorkerPool.cpp | 1 + src/server/database/Database/Transaction.cpp | 25 ++++++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/server/database/Database/DatabaseWorkerPool.cpp b/src/server/database/Database/DatabaseWorkerPool.cpp index a001954d09..4661cd5244 100644 --- a/src/server/database/Database/DatabaseWorkerPool.cpp +++ b/src/server/database/Database/DatabaseWorkerPool.cpp @@ -238,6 +238,7 @@ void DatabaseWorkerPool::DirectCommitTransaction(SQLTransaction& transaction) /// @todo More elegant way if (errorCode == ER_LOCK_DEADLOCK) { + //todo: handle multiple sync threads deadlocking in a similar way as async threads uint8 loopBreaker = 5; for (uint8 i = 0; i < loopBreaker; ++i) { diff --git a/src/server/database/Database/Transaction.cpp b/src/server/database/Database/Transaction.cpp index a8cb502e68..f3345f762d 100644 --- a/src/server/database/Database/Transaction.cpp +++ b/src/server/database/Database/Transaction.cpp @@ -15,12 +15,19 @@ * with this program. If not, see . */ -#include "DatabaseEnv.h" +#include "Log.h" #include "Transaction.h" +#include "MySQLConnection.h" +#include "PreparedStatement.h" +#include "Timer.h" #include +#include +#include std::mutex TransactionTask::_deadlockLock; +#define DEADLOCK_MAX_RETRY_TIME_MS 60000 + //- Append a raw ad-hoc query to the transaction void Transaction::Append(const char* sql) { @@ -72,12 +79,22 @@ bool TransactionTask::Execute() if (errorCode == ER_LOCK_DEADLOCK) { + std::ostringstream threadIdStream; + threadIdStream << std::this_thread::get_id(); + std::string threadId = threadIdStream.str(); + // Make sure only 1 async thread retries a transaction so they don't keep dead-locking each other std::lock_guard lock(_deadlockLock); - uint8 loopBreaker = 5; // Handle MySQL Errno 1213 without extending deadlock to the core itself - for (uint8 i = 0; i < loopBreaker; ++i) - if (!m_conn->ExecuteTransaction(m_trans)) + + for (uint32 loopDuration = 0, startMSTime = getMSTime(); loopDuration <= DEADLOCK_MAX_RETRY_TIME_MS; loopDuration = GetMSTimeDiffToNow(startMSTime)) + { + if (!m_conn->ExecuteTransaction(m_trans)) return true; + + TC_LOG_WARN("sql.sql", "Deadlocked SQL Transaction, retrying. Loop timer: %u ms, Thread Id: %s", loopDuration, threadId.c_str()); + } + + TC_LOG_ERROR("sql.sql", "Fatal deadlocked SQL Transaction, it will not be retried anymore. Thread Id: %s", threadId.c_str()); } // Clean up now. From 0ed2e8e6072811c80fcb0f184a84bcdb37843100 Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 10 Feb 2018 20:42:12 +0100 Subject: [PATCH 034/101] DB: Fix some DB errors Ref https://github.com/TrinityCore/TrinityCore/commit/3acd9a7c4f7f4372b27f0e1a15c18b00435c9a03 --- sql/updates/world/3.3.5/2018_02_10_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_10_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_10_00_world.sql b/sql/updates/world/3.3.5/2018_02_10_00_world.sql new file mode 100644 index 0000000000..ad19973dc2 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_10_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `spawn_group` WHERE `spawnId` IN (64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993) AND `spawnType`=0 AND `groupId`=2; From 1e4197d7adf0354c53df96aeab3798aa45ee305e Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 10 Feb 2018 21:10:51 +0100 Subject: [PATCH 035/101] DB/SAI: Mire Hydra --- sql/updates/world/3.3.5/2018_02_10_01_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_10_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_10_01_world.sql b/sql/updates/world/3.3.5/2018_02_10_01_world.sql new file mode 100644 index 0000000000..f8d0d34852 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_10_01_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid`=18213 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(18213, 0, 0, 0, 0, 0, 100, 0, 1000, 2000, 3400, 5800, 11, 39419, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, "Mire Hydra - IC - Cast 'Poison Spit'"); From 53728216b694f4dde877cd46447a0916aad28164 Mon Sep 17 00:00:00 2001 From: Jildor Date: Sun, 11 Feb 2018 13:15:09 +0100 Subject: [PATCH 036/101] Whitespace cleanup in Transaction.cpp Removing white space after commit 54b0b8f5ead41f936b12e97d1b4fbacd9b89ab53 --- src/server/database/Database/Transaction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/database/Database/Transaction.cpp b/src/server/database/Database/Transaction.cpp index f3345f762d..929653d210 100644 --- a/src/server/database/Database/Transaction.cpp +++ b/src/server/database/Database/Transaction.cpp @@ -85,10 +85,10 @@ bool TransactionTask::Execute() // Make sure only 1 async thread retries a transaction so they don't keep dead-locking each other std::lock_guard lock(_deadlockLock); - + for (uint32 loopDuration = 0, startMSTime = getMSTime(); loopDuration <= DEADLOCK_MAX_RETRY_TIME_MS; loopDuration = GetMSTimeDiffToNow(startMSTime)) { - if (!m_conn->ExecuteTransaction(m_trans)) + if (!m_conn->ExecuteTransaction(m_trans)) return true; TC_LOG_WARN("sql.sql", "Deadlocked SQL Transaction, retrying. Loop timer: %u ms, Thread Id: %s", loopDuration, threadId.c_str()); From 46467499f341d092ba06b6defc2bcc4f02706ca6 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 11 Feb 2018 15:53:30 +0100 Subject: [PATCH 037/101] Scripting/Obsidian Sanctum: Fix crash Fix crash caused by calling Reset() in constructor (which is not allowed) --- .../ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp index fa5359a9fd..14a16d60f9 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp @@ -980,7 +980,6 @@ public: { npc_twilight_whelpAI(Creature* creature) : ScriptedAI(creature) { - Reset(); } void Reset() override From bee461eda8602c6a949ccbc6a7c7d565c447f3ab Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 11 Feb 2018 17:43:12 +0100 Subject: [PATCH 038/101] Core/Player: Add some asserts Assert PlayerInfo for race/class pair in a few Player functions --- src/server/game/Entities/Player/Player.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 56cecdd224..ca8299a169 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -22698,6 +22698,7 @@ void Player::ReportedAfkBy(Player* reporter) WorldLocation Player::GetStartPosition() const { PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + ASSERT(info); uint32 mapId = info->mapId; if (getClass() == CLASS_DEATH_KNIGHT && HasSpell(50977)) mapId = 0; @@ -23407,6 +23408,7 @@ void Player::LearnCustomSpells() // learn default race/class spells PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + ASSERT(info); for (PlayerCreateInfoSpells::const_iterator itr = info->customSpells.begin(); itr != info->customSpells.end(); ++itr) { uint32 tspell = *itr; @@ -23423,6 +23425,7 @@ void Player::LearnDefaultSkills() { // learn default race/class skills PlayerInfo const* info = sObjectMgr->GetPlayerInfo(getRace(), getClass()); + ASSERT(info); for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr) { uint32 skillId = itr->SkillId; From bfcdb9e7f9c1906c276beb2019b5c03ca46db7fe Mon Sep 17 00:00:00 2001 From: ariel- Date: Sun, 11 Feb 2018 19:49:22 -0300 Subject: [PATCH 039/101] DB/Spell: fix Unstable Affliction and Vampiric Touch dispel double dipping from SP Closes #21393 --- sql/updates/world/3.3.5/2018_02_11_00_world_335.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/3.3.5/2018_02_11_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_11_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_11_00_world_335.sql new file mode 100644 index 0000000000..498c89eab1 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_11_00_world_335.sql @@ -0,0 +1 @@ +DELETE FROM `spell_bonus_data` WHERE `entry` IN (31117, 64085); From 2388415edd25f5c8fb4cf71c104b8c9c2c17c52d Mon Sep 17 00:00:00 2001 From: ariel- Date: Sun, 11 Feb 2018 20:42:06 -0300 Subject: [PATCH 040/101] Core/Spells: require phasemask set for periodic damage procflag Closes #21379 --- sql/updates/world/3.3.5/2018_02_11_01_world_335.sql | 1 + src/server/game/Spells/SpellMgr.cpp | 4 ++-- src/server/game/Spells/SpellMgr.h | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 sql/updates/world/3.3.5/2018_02_11_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_11_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_11_01_world_335.sql new file mode 100644 index 0000000000..e2e2b3a0ba --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_11_01_world_335.sql @@ -0,0 +1 @@ +UPDATE `spell_proc` SET `SpellPhaseMask` = `SpellPhaseMask`|0x2 WHERE `SpellId` IN (-19572, 28716, -31656, 37603, 38394, 40438, 40478, 45054, -47195, -47245, -48539, -49217, 54754, 56218, -56636, 57870, 60061, 60170, 60176, 60487, 61188, 64752, 64824, 64914, 67209, 67356, 67361, 67365, 70664, 70730, 70841, 70854, 71174, 71176, 71178, 71198, 71606, 71637); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 86a1afc275..a85827b6dd 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -540,7 +540,7 @@ bool SpellMgr::CanSpellTriggerProcOnEvent(SpellProcEntry const& procEntry, ProcE return false; // check spell family name/flags (if set) for spells - if (eventInfo.GetTypeMask() & (PERIODIC_PROC_FLAG_MASK | SPELL_PROC_FLAG_MASK)) + if (eventInfo.GetTypeMask() & SPELL_PROC_FLAG_MASK) { if (SpellInfo const* eventSpellInfo = eventInfo.GetSpellInfo()) if (!eventSpellInfo->IsAffected(procEntry.SpellFamilyName, procEntry.SpellFamilyMask)) @@ -1670,7 +1670,7 @@ void SpellMgr::LoadSpellProcs() TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u doesn't have any `ProcFlags` value defined, proc will not be triggered.", spellInfo->Id); if (procEntry.SpellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL) TC_LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `SpellTypeMask` set: %u", spellInfo->Id, procEntry.SpellTypeMask); - if (procEntry.SpellTypeMask && !(procEntry.ProcFlags & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK))) + if (procEntry.SpellTypeMask && !(procEntry.ProcFlags & SPELL_PROC_FLAG_MASK)) TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has `SpellTypeMask` value defined, but it will not be used for the defined `ProcFlags` value.", spellInfo->Id); if (!procEntry.SpellPhaseMask && procEntry.ProcFlags & REQ_SPELL_PHASE_PROC_FLAG_MASK) TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u doesn't have any `SpellPhaseMask` value defined, but it is required for the defined `ProcFlags` value. Proc will not be triggered.", spellInfo->Id); diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index b870cf5638..4bfbb2474b 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -165,10 +165,9 @@ enum ProcFlags | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG | PROC_FLAG_TAKEN_SPELL_NONE_DMG_CLASS_NEG | PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG | PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG + | PROC_FLAG_DONE_PERIODIC | PROC_FLAG_TAKEN_PERIODIC | PROC_FLAG_DONE_TRAP_ACTIVATION, - PERIODIC_PROC_FLAG_MASK = PROC_FLAG_DONE_PERIODIC | PROC_FLAG_TAKEN_PERIODIC, - DONE_HIT_PROC_FLAG_MASK = PROC_FLAG_DONE_MELEE_AUTO_ATTACK | PROC_FLAG_DONE_RANGED_AUTO_ATTACK | PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS | PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_POS | PROC_FLAG_DONE_SPELL_NONE_DMG_CLASS_NEG From d5a77f6b794aa7a245573744b74c66fc41e46bde Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 01:21:15 +0100 Subject: [PATCH 041/101] Core/Auras: fix periodic ticks proc after previous commit --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 68c1b44ae6..ee69d861ae 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5654,7 +5654,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const caster->DealDamage(target, damage, &cleanDamage, DOT, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), true); - caster->ProcSkillsAndAuras(target, procAttacker, procVictim, PROC_SPELL_TYPE_DAMAGE, PROC_SPELL_PHASE_NONE, hitMask, nullptr, &damageInfo, nullptr); + caster->ProcSkillsAndAuras(target, procAttacker, procVictim, PROC_SPELL_TYPE_DAMAGE, PROC_SPELL_PHASE_HIT, hitMask, nullptr, &damageInfo, nullptr); } void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) const @@ -5747,7 +5747,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c int32 new_damage = caster->DealDamage(target, damage, &cleanDamage, DOT, GetSpellInfo()->GetSchoolMask(), GetSpellInfo(), false); if (caster->IsAlive()) { - caster->ProcSkillsAndAuras(target, procAttacker, procVictim, PROC_SPELL_TYPE_DAMAGE, PROC_SPELL_PHASE_NONE, hitMask, nullptr, &damageInfo, nullptr); + caster->ProcSkillsAndAuras(target, procAttacker, procVictim, PROC_SPELL_TYPE_DAMAGE, PROC_SPELL_PHASE_HIT, hitMask, nullptr, &damageInfo, nullptr); float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster); @@ -5758,7 +5758,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c caster->HealBySpell(healInfo); caster->getHostileRefManager().threatAssist(caster, healInfo.GetEffectiveHeal() * 0.5f, GetSpellInfo()); - caster->ProcSkillsAndAuras(caster, PROC_FLAG_DONE_PERIODIC, PROC_FLAG_TAKEN_PERIODIC, PROC_SPELL_TYPE_HEAL, PROC_SPELL_PHASE_NONE, hitMask, nullptr, nullptr, &healInfo); + caster->ProcSkillsAndAuras(caster, PROC_FLAG_DONE_PERIODIC, PROC_FLAG_TAKEN_PERIODIC, PROC_SPELL_TYPE_HEAL, PROC_SPELL_PHASE_HIT, hitMask, nullptr, nullptr, &healInfo); } } @@ -5789,7 +5789,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster) HealInfo healInfo(caster, target, damage, GetSpellInfo(), GetSpellInfo()->GetSchoolMask()); caster->HealBySpell(healInfo); - caster->ProcSkillsAndAuras(target, PROC_FLAG_DONE_PERIODIC, PROC_FLAG_TAKEN_PERIODIC, PROC_SPELL_TYPE_HEAL, PROC_SPELL_PHASE_NONE, PROC_HIT_NORMAL, nullptr, nullptr, &healInfo); + caster->ProcSkillsAndAuras(target, PROC_FLAG_DONE_PERIODIC, PROC_FLAG_TAKEN_PERIODIC, PROC_SPELL_TYPE_HEAL, PROC_SPELL_PHASE_HIT, PROC_HIT_NORMAL, nullptr, nullptr, &healInfo); } void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const @@ -5917,7 +5917,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const uint32 hitMask = crit ? PROC_HIT_CRITICAL : PROC_HIT_NORMAL; // ignore item heals if (!haveCastItem) - caster->ProcSkillsAndAuras(target, procAttacker, procVictim, PROC_SPELL_TYPE_HEAL, PROC_SPELL_PHASE_NONE, hitMask, nullptr, nullptr, &healInfo); + caster->ProcSkillsAndAuras(target, procAttacker, procVictim, PROC_SPELL_TYPE_HEAL, PROC_SPELL_PHASE_HIT, hitMask, nullptr, nullptr, &healInfo); } void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) const @@ -6099,7 +6099,7 @@ void AuraEffect::HandlePeriodicPowerBurnAuraTick(Unit* target, Unit* caster) con caster->DealSpellDamage(&damageInfo, true); DamageInfo dotDamageInfo(damageInfo, DOT, BASE_ATTACK, hitMask); - caster->ProcSkillsAndAuras(target, procAttacker, procVictim, spellTypeMask, PROC_SPELL_PHASE_NONE, hitMask, nullptr, &dotDamageInfo, nullptr); + caster->ProcSkillsAndAuras(target, procAttacker, procVictim, spellTypeMask, PROC_SPELL_PHASE_HIT, hitMask, nullptr, &dotDamageInfo, nullptr); } void AuraEffect::HandleBreakableCCAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo) From e6888f72e067631876362fa6be7728fe471deeb5 Mon Sep 17 00:00:00 2001 From: ariel- Date: Sun, 11 Feb 2018 21:10:56 -0300 Subject: [PATCH 042/101] Core/Scripts: implemented Combined Toxins proc only from poisons --- .../world/3.3.5/2018_02_11_02_world_335.sql | 3 +++ .../AzjolNerub/Ahnkahet/instance_ahnkahet.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_11_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_11_02_world_335.sql b/sql/updates/world/3.3.5/2018_02_11_02_world_335.sql new file mode 100644 index 0000000000..5a98c0da86 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_11_02_world_335.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_combined_toxins'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(56584, 'spell_combined_toxins'); diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index b30cc5c4b8..433ae77c16 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -280,7 +280,26 @@ class instance_ahnkahet : public InstanceMapScript } }; +// 56584 - Combined Toxins +class spell_combined_toxins : public AuraScript +{ + PrepareAuraScript(spell_combined_toxins); + + bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + // only procs on poisons (damage class check to exclude stuff like Envenom) + SpellInfo const* spellInfo = eventInfo.GetSpellInfo(); + return (spellInfo && spellInfo->Dispel == DISPEL_POISON && spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE); + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_combined_toxins::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_DAMAGE); + } +}; + void AddSC_instance_ahnkahet() { new instance_ahnkahet(); + RegisterAuraScript(spell_combined_toxins); } From 7c9b62eac85b0d08c8b1cbad845ebed6fb40cea2 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 12 Feb 2018 02:58:23 +0100 Subject: [PATCH 043/101] DB/Quest: fix Territorial Trespass SmartScript to use proper target type (tag #20310) --- sql/updates/world/3.3.5/2018_02_12_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_12_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_12_00_world.sql b/sql/updates/world/3.3.5/2018_02_12_00_world.sql new file mode 100644 index 0000000000..8349cbe23c --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_12_00_world.sql @@ -0,0 +1,2 @@ +-- SAI target fix for Territorial Trespass (13051) +update `smart_scripts` set `target_type`=23 where (`source_type`=0 and `entryorguid`=30461 and `id`=2) or (`source_type`=9 and `entryorguid`=3046200 and `id` in (1,4)); From 302599decdf3afca4df9afb65c9433ddb0a813df Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 12 Feb 2018 02:58:51 +0100 Subject: [PATCH 044/101] Scripts/ScarletEnclave: fix Massacre at Light's Point mine cart escort to work again (tag #20310) --- .../ScarletEnclave/chapter1.cpp | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 257f6c40ba..115c921f82 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1056,11 +1056,6 @@ class npc_scarlet_miner_cart : public CreatureScript if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID)) { me->SetWalk(false); - - // Not 100% correct, but movement is smooth. Sometimes miner walks faster - // than normal, this speed is fast enough to keep up at those times. - me->SetSpeedRate(MOVE_RUN, 1.25f); - me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0); } } @@ -1110,25 +1105,21 @@ class npc_scarlet_miner : public CreatureScript { npc_scarlet_minerAI(Creature* creature) : npc_escortAI(creature) { - Initialize(); me->SetReactState(REACT_PASSIVE); } - void Initialize() + void InitializeAI() override { - carGUID.Clear(); IntroTimer = 0; IntroPhase = 0; + carGUID.Clear(); + playerGUID.Clear(); } uint32 IntroTimer; uint32 IntroPhase; ObjectGuid carGUID; - - void Reset() override - { - Initialize(); - } + ObjectGuid playerGUID; void IsSummonedBy(Unit* summoner) override { @@ -1170,9 +1161,12 @@ class npc_scarlet_miner : public CreatureScript void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { - InitWaypoint(); - Start(false, false, guid); - SetDespawnAtFar(false); + playerGUID = guid; + } + + void Reset() override + { + EscortAI::Reset(); } void WaypointReached(uint32 waypointId) override @@ -1202,6 +1196,16 @@ class npc_scarlet_miner : public CreatureScript } } + void JustAppeared() override + { + EscortAI::JustAppeared(); + if (!playerGUID) + return; + InitWaypoint(); + Start(false, false, playerGUID); + SetDespawnAtFar(false); + } + void UpdateAI(uint32 diff) override { if (IntroPhase) From c83d9d3a4b0496caf89c0b5e1dcf34d720ee36b6 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 12 Feb 2018 03:08:34 +0100 Subject: [PATCH 045/101] Scripts/AzjolNerub: Hadronox is a big spider mommy, and needs more room to pet her spider pets properly. Hopefully this'll reduce the number of evades happening during the encounter. Tag #20310. --- .../scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp index bf3cb0a41d..6ef9fc9e0f 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp @@ -218,7 +218,7 @@ public: bool CanAIAttack(Unit const* target) const override { // Prevent Hadronox from going too far from her current home position - if (!target->IsControlledByPlayer() && target->GetDistance(me->GetHomePosition()) > 20.0f) + if (!target->IsControlledByPlayer() && target->GetDistance(me->GetHomePosition()) > 70.0f) return false; return BossAI::CanAIAttack(target); } From daa7c79f7e55cde6a19440e8ed882c0753aeceb4 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 12 Feb 2018 03:23:54 +0100 Subject: [PATCH 046/101] Revert "Scripts/ScarletEnclave: fix Massacre at Light's Point mine cart escort to work again (tag #20310)" This reverts commit 6ff71dffbb774b8ea715053cd9223edc5c67bb0f. --- .../ScarletEnclave/chapter1.cpp | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 115c921f82..257f6c40ba 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1056,6 +1056,11 @@ class npc_scarlet_miner_cart : public CreatureScript if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID)) { me->SetWalk(false); + + // Not 100% correct, but movement is smooth. Sometimes miner walks faster + // than normal, this speed is fast enough to keep up at those times. + me->SetSpeedRate(MOVE_RUN, 1.25f); + me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0); } } @@ -1105,21 +1110,25 @@ class npc_scarlet_miner : public CreatureScript { npc_scarlet_minerAI(Creature* creature) : npc_escortAI(creature) { + Initialize(); me->SetReactState(REACT_PASSIVE); } - void InitializeAI() override + void Initialize() { + carGUID.Clear(); IntroTimer = 0; IntroPhase = 0; - carGUID.Clear(); - playerGUID.Clear(); } uint32 IntroTimer; uint32 IntroPhase; ObjectGuid carGUID; - ObjectGuid playerGUID; + + void Reset() override + { + Initialize(); + } void IsSummonedBy(Unit* summoner) override { @@ -1161,12 +1170,9 @@ class npc_scarlet_miner : public CreatureScript void SetGUID(ObjectGuid const& guid, int32 /*id*/) override { - playerGUID = guid; - } - - void Reset() override - { - EscortAI::Reset(); + InitWaypoint(); + Start(false, false, guid); + SetDespawnAtFar(false); } void WaypointReached(uint32 waypointId) override @@ -1196,16 +1202,6 @@ class npc_scarlet_miner : public CreatureScript } } - void JustAppeared() override - { - EscortAI::JustAppeared(); - if (!playerGUID) - return; - InitWaypoint(); - Start(false, false, playerGUID); - SetDespawnAtFar(false); - } - void UpdateAI(uint32 diff) override { if (IntroPhase) From 54316a0b999db3ed86dd90e5797665549715d857 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 12 Feb 2018 03:47:31 +0100 Subject: [PATCH 047/101] Scripts/CoT4: Stratholme Residents should no longer rudely interrupt Arthas by punching him in the face while he's giving a righteous sermon on his reasons for wiping them all out. --- sql/updates/world/3.3.5/2018_02_12_01_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_12_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_12_01_world.sql b/sql/updates/world/3.3.5/2018_02_12_01_world.sql new file mode 100644 index 0000000000..4ff4dafec0 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_12_01_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `creature_template` SET `flags_extra`=2 WHERE `entry`=28167; From 3a4035bb8dbc13a163bbd16e49bf87bf76141fdf Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 12 Feb 2018 00:17:34 -0300 Subject: [PATCH 048/101] Core/Spells: add log on load about improper use of attribute PROC_ATTR_REQ_SPELLMOD --- src/server/game/Spells/SpellMgr.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index a85827b6dd..dfb6dfaff2 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1685,6 +1685,24 @@ void SpellMgr::LoadSpellProcs() for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) if ((procEntry.AttributesMask & (PROC_ATTR_DISABLE_EFF_0 << i)) && !spellInfo->Effects[i].IsAura()) TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has Attribute PROC_ATTR_DISABLE_EFF_%u, but effect %u is not an aura effect", spellInfo->Id, static_cast(i), static_cast(i)); + if (procEntry.AttributesMask & PROC_ATTR_REQ_SPELLMOD) + { + bool found = false; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + if (!spellInfo->Effects[i].IsAura()) + continue; + + if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_ADD_PCT_MODIFIER || spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_ADD_FLAT_MODIFIER) + { + found = true; + break; + } + } + + if (!found) + TC_LOG_ERROR("sql.sql", "The `spell_proc` table entry for spellId %u has Attribute PROC_ATTR_REQ_SPELLMOD, but spell has no spell mods. Proc will not be triggered", spellInfo->Id); + } mSpellProcMap[spellInfo->Id] = procEntry; From 9f0f00257ee8fa2876d2382a615573dd515aaf23 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 01:38:48 +0100 Subject: [PATCH 049/101] Core/Scripts: fix nopch --- .../Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp index 433ae77c16..88576ff9bc 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/instance_ahnkahet.cpp @@ -16,9 +16,14 @@ */ #include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "InstanceScript.h" +#include "AreaBoundary.h" #include "ahnkahet.h" +#include "Creature.h" +#include "GameObject.h" +#include "InstanceScript.h" +#include "Map.h" +#include "SpellInfo.h" +#include "SpellScript.h" DoorData const doorData[] = { From 6d90944f02dffed4a84e6446fe791d0b12b3faea Mon Sep 17 00:00:00 2001 From: Wilcalaf Date: Mon, 12 Feb 2018 22:38:08 +0200 Subject: [PATCH 050/101] Archaedas should properly start now when clicking on the altar. (#21401) --- src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 48b8fbc30c..4920b7fb29 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -257,6 +257,8 @@ class instance_uldaman : public InstanceMapScript { archaedas->RemoveAura(SPELL_FREEZE_ANIM); archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN, false); + archaedas->SetFaction(FACTION_TITAN); + archaedas->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); whoWokeuiArchaedasGUID = target; } } From bbe9aa23b053914e54ff1609cafaff12512be7a5 Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 12 Feb 2018 19:32:59 -0300 Subject: [PATCH 051/101] Core/Spells: fix Vampiric touch dispel effect inheriting damage done pct twice --- src/server/game/Spells/SpellMgr.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index dfb6dfaff2..2c474523b3 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3221,6 +3221,14 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_INITIAL_AGGRO; }); + // Vampiric Touch (dispel effect) + ApplySpellFix({ 64085 }, [](SpellInfo* spellInfo) + { + // copy from similar effect of Unstable Affliction (31117) + spellInfo->AttributesEx4 |= SPELL_ATTR4_FIXED_DAMAGE; + spellInfo->AttributesEx6 |= SPELL_ATTR6_LIMIT_PCT_DAMAGE_MODS; + }); + // Improved Devouring Plague ApplySpellFix({ 63675 }, [](SpellInfo* spellInfo) { From 7638a2c93068d7916de7dcf300f77fcdddf95b20 Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Tue, 13 Feb 2018 01:26:40 +0100 Subject: [PATCH 052/101] DB/Loot: Reference template 24064 corrections Closes #21385 --- .../world/3.3.5/2018_02_13_00_world_335.sql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql new file mode 100644 index 0000000000..c991c6b155 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql @@ -0,0 +1,26 @@ +-- Remove unique items from reference table 24064 +DELETE FROM `reference_loot_template` WHERE `Entry`=24064 AND `Item` IN (911, 920, 1076, 1406, 1455, 1459, 1461, 1462, 2034, 2232, 3429); + +-- Add former items from reference table 24064 to their proper NPCs +DELETE FROM `creature_loot_template` WHERE `Item` IN (911, 920, 1076, 1406, 1455, 2034, 2232, 3429); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`) VALUES +(889, 911, 0.1, 0, "Splinter Fist Ogre - Ironwood Treebranch"), +(215, 920, 0.1, 0, "Defias Night Runner - Wicked Spiked Mace"), +(909, 920, 0.1, 0, "Defias Night Blade - Wicked Spiked Mace"), +(1706, 1076, 1, 0, "Defias Prisoner - Defias Renegade Ring"), +(1711, 1076, 1, 0, "Defias Convict - Defias Renegade Ring"), +(1715, 1076, 1, 0, "Defias Insurgent - Defias Renegade Ring"), +(1708, 1076, 1, 0, "Defias Inmate - Defias Renegade Ring"), +(1707, 1076, 1, 0, "Defias Captive - Defias Renegade Ring"), +(544, 1406, 0.1, 0, "Murloc Nightcrawler - Pearl-encrusted Spear"), +(435, 1455, 0.1, 0, "Blackrock Champion - Blackrock Champion's Axe"), +(4464, 1455, 0.1, 0, "Blackrock Gladiator - Blackrock Champion's Axe"), +(4809, 2034, 1, 0, "Twilight Acolyte - Scholarly Robes"), +(4811, 2034, 1, 0, "Twilight Aquamancer - Scholarly Robes"), +(4810, 2034, 1, 0, "Twilight Reaver - Scholarly Robes"), +(4814, 2034, 1, 0, "Twilight Elementalist - Scholarly Robes"), +(4813, 2034, 1, 0, "Twilight Shadowmage - Scholarly Robes"), +(4812, 2034, 1, 0, "Twilight Loreseeker - Scholarly Robes"), +(205, 2232, 0.1, 0, "Nightbane Dark Runner - Dark Runner Boots"), +(2427, 3429, 1, 0, "Jailor Eston - Guardsman Belt"), +(2428, 3429, 1, 0, "Jailor Marlgen - Guardsman Belt"); From 5b1703f82eeb49bbabe49e51c7f8edaa08cb7d2a Mon Sep 17 00:00:00 2001 From: Killyana Date: Tue, 13 Feb 2018 01:28:07 +0100 Subject: [PATCH 053/101] SAI/Quest: Sabotage Closes #20881 --- sql/updates/world/3.3.5/2018_02_13_01_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_01_world.sql b/sql/updates/world/3.3.5/2018_02_13_01_world.sql new file mode 100644 index 0000000000..e2efbd4b0e --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_01_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `smart_scripts` SET `target_type`=23 WHERE `source_type`=9 AND `entryorguid`=2878000 AND `id` IN (6); +DELETE FROM `smart_scripts` WHERE `entryorguid`=2878000 AND `source_type`=9 AND `id` IN (7,8); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(2878000, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 20, 190731, 15, 0, 0, 0, 0, 0, "Explosive Charges Bunny - On Script - despawn gob"), +(2878000, 9, 8, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 20, 190732, 15, 0, 0, 0, 0, 0, "Explosive Charges Bunny - On Script - despawn gob"); From 3cf55bd2c10b6e4bfd60175d3310f24ff523598e Mon Sep 17 00:00:00 2001 From: Killyana Date: Tue, 13 Feb 2018 01:55:03 +0100 Subject: [PATCH 054/101] DB: Add a missing action_param to the previous commit Gobs always requires respawn time with the action 41, otherwise they will never respawn --- sql/updates/world/3.3.5/2018_02_13_02_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_02_world.sql b/sql/updates/world/3.3.5/2018_02_13_02_world.sql new file mode 100644 index 0000000000..713a4d5d89 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_02_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param1`=180 WHERE `source_type`=9 AND `entryorguid`=2878000 AND `id` IN (7); From bdfcfacf713f3ec0775b794219aff6f55092b304 Mon Sep 17 00:00:00 2001 From: tkrokli Date: Tue, 13 Feb 2018 07:58:49 +0100 Subject: [PATCH 055/101] DB/Loot: add missing column name to 2018_02_13_00_world_335.sql Error message upon loading the original file into DB: - ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1 Closes #21407 --- sql/updates/world/3.3.5/2018_02_13_00_world_335.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql index c991c6b155..828f0c7083 100644 --- a/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql +++ b/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql @@ -3,7 +3,7 @@ DELETE FROM `reference_loot_template` WHERE `Entry`=24064 AND `Item` IN (911, 92 -- Add former items from reference table 24064 to their proper NPCs DELETE FROM `creature_loot_template` WHERE `Item` IN (911, 920, 1076, 1406, 1455, 2034, 2232, 3429); -INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`) VALUES +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES (889, 911, 0.1, 0, "Splinter Fist Ogre - Ironwood Treebranch"), (215, 920, 0.1, 0, "Defias Night Runner - Wicked Spiked Mace"), (909, 920, 0.1, 0, "Defias Night Blade - Wicked Spiked Mace"), From 9ce54f06fd69ba14ea22b6b18f790f0a5cb171b2 Mon Sep 17 00:00:00 2001 From: Killyana Date: Tue, 13 Feb 2018 16:15:27 +0100 Subject: [PATCH 056/101] DB/SAI: Fix wrong event type for npcs summoned by Flight Master Closes #21244 --- sql/updates/world/3.3.5/2018_02_13_03_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_03_world.sql b/sql/updates/world/3.3.5/2018_02_13_03_world.sql new file mode 100644 index 0000000000..32c53176b5 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_03_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `event_type`=1 WHERE `entryorguid`IN (9297,9521, 9526,9527) AND `source_type`=0 AND `id`=1; From 74b7ac101ab140db353525adaa4ae32b0c311611 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 02:08:56 +0100 Subject: [PATCH 057/101] =?UTF-8?q?Scripts/SmartAI:=20SMART=5FTARGET=5FINV?= =?UTF-8?q?OKER=20cleanup=20step=201.=20The=20core=20will=20n=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …ow log errors on start-up if SMART_TARGET_INVOKER abuse is found, but will continue to load the scripts as deprecated for now. Note that a lot of these scripts may either not currently work, not work reliably, or may be prone to breaking unexpectedly when core internals change. SMART_TARGET_INVOKER is undefined behavior on any event that doesn't directly specify its invoker. (We are considering options for allowing INVOKER to make sense in timed action lists in a reliable fashion, so they are exempted at this time.) --- .../world/3.3.5/2018_02_13_04_world.sql | 2 + src/server/game/AI/SmartScripts/SmartAI.cpp | 5 +- .../game/AI/SmartScripts/SmartScript.cpp | 2 +- .../game/AI/SmartScripts/SmartScriptMgr.cpp | 61 ++++++++++++++++++- .../game/AI/SmartScripts/SmartScriptMgr.h | 4 +- 5 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 sql/updates/world/3.3.5/2018_02_13_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_04_world.sql b/sql/updates/world/3.3.5/2018_02_13_04_world.sql new file mode 100644 index 0000000000..2a99ff63b5 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_04_world.sql @@ -0,0 +1,2 @@ +-- SMART_ACTION_FLEE_FOR_ASSIST (25) does not need a target +UPDATE `smart_scripts` SET `target_type`=0 WHERE `action_type`=25; diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 98105373c2..530cfe043e 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -891,7 +891,8 @@ void SmartAI::StopFollow(bool complete) if (!complete) return; - if (Player* player = ObjectAccessor::GetPlayer(*me, mFollowGuid)) + Player* player = ObjectAccessor::GetPlayer(*me, mFollowGuid); + if (player) { if (!mFollowCreditType) player->RewardPlayerAndGroupAtEvent(mFollowCredit, me); @@ -901,7 +902,7 @@ void SmartAI::StopFollow(bool complete) SetDespawnTime(5000); StartDespawn(); - GetScript()->ProcessEventsFor(SMART_EVENT_FOLLOW_COMPLETED); + GetScript()->ProcessEventsFor(SMART_EVENT_FOLLOW_COMPLETED, player); } void SmartAI::SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index bc53b0dcf9..048f619b83 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -3330,7 +3330,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui uint32 count = me->EnsureVictim()->GetAuraCount(e.event.aura.spell); if (count < e.event.aura.count) return; - ProcessTimedAction(e, e.event.aura.repeatMin, e.event.aura.repeatMax); + ProcessTimedAction(e, e.event.aura.repeatMin, e.event.aura.repeatMax, me->GetVictim()); break; } case SMART_EVENT_CHARMED: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 988c12403f..f0f5f9d5c8 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -380,6 +380,54 @@ void SmartAIMgr::LoadSmartAIFromDB() UnLoadHelperStores(); } +/*static*/ bool SmartAIMgr::EventHasInvoker(SMART_EVENT event) +{ + switch (event) + { // white list of events that actually have an invoker passed to them + case SMART_EVENT_AGGRO: + case SMART_EVENT_DEATH: + case SMART_EVENT_KILL: + case SMART_EVENT_SUMMONED_UNIT: + case SMART_EVENT_SPELLHIT: + case SMART_EVENT_SPELLHIT_TARGET: + case SMART_EVENT_DAMAGED: + case SMART_EVENT_RECEIVE_HEAL: + case SMART_EVENT_RECEIVE_EMOTE: + case SMART_EVENT_JUST_SUMMONED: + case SMART_EVENT_DAMAGED_TARGET: + case SMART_EVENT_SUMMON_DESPAWNED: + case SMART_EVENT_PASSENGER_BOARDED: + case SMART_EVENT_PASSENGER_REMOVED: + case SMART_EVENT_GOSSIP_HELLO: + case SMART_EVENT_GOSSIP_SELECT: + case SMART_EVENT_ACCEPTED_QUEST: + case SMART_EVENT_REWARD_QUEST: + case SMART_EVENT_FOLLOW_COMPLETED: + case SMART_EVENT_ON_SPELLCLICK: + case SMART_EVENT_GO_LOOT_STATE_CHANGED: + case SMART_EVENT_AREATRIGGER_ONTRIGGER: + case SMART_EVENT_IC_LOS: + case SMART_EVENT_OOC_LOS: + case SMART_EVENT_DISTANCE_CREATURE: + case SMART_EVENT_FRIENDLY_HEALTH: + case SMART_EVENT_FRIENDLY_HEALTH_PCT: + case SMART_EVENT_FRIENDLY_IS_CC: + case SMART_EVENT_FRIENDLY_MISSING_BUFF: + case SMART_EVENT_ACTION_DONE: + case SMART_EVENT_TARGET_HEALTH_PCT: + case SMART_EVENT_TARGET_MANA_PCT: + case SMART_EVENT_RANGE: + case SMART_EVENT_VICTIM_CASTING: + case SMART_EVENT_TARGET_BUFFED: + case SMART_EVENT_IS_BEHIND_TARGET: + case SMART_EVENT_INSTANCE_PLAYER_ENTER: + case SMART_EVENT_TRANSPORT_ADDCREATURE: + return true; + default: + return false; + } +} + bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) { if (std::abs(e.target.o) > 2 * float(M_PI)) @@ -433,6 +481,16 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) } break; } + case SMART_TARGET_ACTION_INVOKER: + case SMART_TARGET_ACTION_INVOKER_VEHICLE: + case SMART_TARGET_INVOKER_PARTY: + if (e.GetScriptType() != SMART_SCRIPT_TYPE_TIMED_ACTIONLIST && e.GetEventType() != SMART_EVENT_LINK && !EventHasInvoker(e.event.type)) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has invoker target, but action does not provide any invoker!", e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType()); + // allow this to load for now + // return false; + } + break; case SMART_TARGET_PLAYER_RANGE: case SMART_TARGET_SELF: case SMART_TARGET_VICTIM: @@ -440,11 +498,8 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e) case SMART_TARGET_HOSTILE_LAST_AGGRO: case SMART_TARGET_HOSTILE_RANDOM: case SMART_TARGET_HOSTILE_RANDOM_NOT_TOP: - case SMART_TARGET_ACTION_INVOKER: - case SMART_TARGET_INVOKER_PARTY: case SMART_TARGET_POSITION: case SMART_TARGET_NONE: - case SMART_TARGET_ACTION_INVOKER_VEHICLE: case SMART_TARGET_OWNER_OR_SUMMONER: case SMART_TARGET_THREAT_LIST: case SMART_TARGET_CLOSEST_GAMEOBJECT: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 756449a72a..bc9e5f1705 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1188,7 +1188,7 @@ enum SMARTAI_TEMPLATE enum SMARTAI_TARGETS { - SMART_TARGET_NONE = 0, // NONE, defaulting to invoket + SMART_TARGET_NONE = 0, // NONE SMART_TARGET_SELF = 1, // Self cast SMART_TARGET_VICTIM = 2, // Our current target (ie: highest aggro) SMART_TARGET_HOSTILE_SECOND_AGGRO = 3, // Second highest aggro, maxdist, playerOnly, powerType + 1 @@ -1673,6 +1673,8 @@ class TC_GAME_API SmartAIMgr //event stores SmartAIEventMap mEventMap[SMART_SCRIPT_TYPE_MAX]; + static bool EventHasInvoker(SMART_EVENT event); + bool IsEventValid(SmartScriptHolder& e); bool IsTargetValid(SmartScriptHolder const& e); From 3e055551c60768f91c0baa27efc42554f50c29f1 Mon Sep 17 00:00:00 2001 From: Killyana Date: Tue, 13 Feb 2018 17:08:50 +0100 Subject: [PATCH 058/101] DB/SAI: Runed Stone Giant --- sql/updates/world/3.3.5/2018_02_13_05_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_05_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_05_world.sql b/sql/updates/world/3.3.5/2018_02_13_05_world.sql new file mode 100644 index 0000000000..403eb6212f --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_05_world.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` = 24329 AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(24329, 0, 0, 0, 8, 0, 100, 512, 43666, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Runed Stone Giant - On spell hit - Despawn"); From a3a3b763540b92beab40856b0296b90f540fffa4 Mon Sep 17 00:00:00 2001 From: Killyana Date: Tue, 13 Feb 2018 17:25:35 +0100 Subject: [PATCH 059/101] DB/Quest: Rescue from Town Square Closes #20102 --- sql/updates/world/3.3.5/2018_02_13_06_world.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_06_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_06_world.sql b/sql/updates/world/3.3.5/2018_02_13_06_world.sql new file mode 100644 index 0000000000..ace7471404 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_06_world.sql @@ -0,0 +1,3 @@ +-- +UPDATE `smart_scripts` SET `target_type`=7 WHERE `entryorguid` IN (27370) AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN (2735900) AND `source_type`=9 AND `id`=4; From 140cdb4185f01d056bc5ee3a03be8231b1071f2c Mon Sep 17 00:00:00 2001 From: Killyana Date: Tue, 13 Feb 2018 17:29:31 +0100 Subject: [PATCH 060/101] DB/Condition: Placing Beacon Torch Closes #21244 --- sql/updates/world/3.3.5/2018_02_13_07_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_13_07_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_07_world.sql b/sql/updates/world/3.3.5/2018_02_13_07_world.sql new file mode 100644 index 0000000000..1afb5c37cf --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_13_07_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `conditions` WHERE `SourceEntry` = 17016 AND `SourceTypeOrReferenceId`=13; From 0aacb75d738261af6ab2d2ca0e9e73e6175aa1c6 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 02:21:09 +0100 Subject: [PATCH 061/101] Scripts/TheBarrens: Fix "The Escape" (863) --- .../scripts/Kalimdor/zone_the_barrens.cpp | 82 ++++++++----------- 1 file changed, 36 insertions(+), 46 deletions(-) diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp index d108f8859f..bc134faeb0 100644 --- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp +++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp @@ -535,25 +535,13 @@ public: IsPostEvent = false; PostEventTimer = 1000; PostEventCount = 0; + me->SetReactState(REACT_DEFENSIVE); } bool IsPostEvent; uint32 PostEventTimer; uint32 PostEventCount; - void Reset() override - { - if (!HasEscortState(STATE_ESCORT_ESCORTING)) - { - if (me->GetStandState() == UNIT_STAND_STATE_DEAD) - me->SetStandState(UNIT_STAND_STATE_STAND); - - IsPostEvent = false; - PostEventTimer = 1000; - PostEventCount = 0; - } - } - void WaypointReached(uint32 waypointId) override { switch (waypointId) @@ -607,43 +595,44 @@ public: void UpdateEscortAI(uint32 Diff) override { - if (!UpdateVictim()) + if (UpdateVictim()) { - if (IsPostEvent) - { - if (PostEventTimer <= Diff) - { - switch (PostEventCount) - { - case 0: - Talk(SAY_PROGRESS_2); - break; - case 1: - Talk(SAY_PROGRESS_3); - break; - case 2: - Talk(SAY_END); - break; - case 3: - if (Player* player = GetPlayerForEscort()) - { - player->GroupEventHappens(QUEST_ESCAPE, me); - me->SummonCreature(NPC_PILOT_WIZZ, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000); - } - break; - } - - ++PostEventCount; - PostEventTimer = 5000; - } - else - PostEventTimer -= Diff; - } - + DoMeleeAttackIfReady(); return; } - DoMeleeAttackIfReady(); + if (!IsPostEvent) + return; + + if (PostEventTimer > Diff) + { + PostEventTimer -= Diff; + return; + } + + switch (PostEventCount) + { + case 0: + Talk(SAY_PROGRESS_2); + break; + case 1: + Talk(SAY_PROGRESS_3); + break; + case 2: + Talk(SAY_END); + break; + case 3: + if (Player* player = GetPlayerForEscort()) + { + player->GroupEventHappens(QUEST_ESCAPE, me); + me->DespawnOrUnsummon(Minutes(3)); + me->SummonCreature(NPC_PILOT_WIZZ, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000); + } + break; + } + + ++PostEventCount; + PostEventTimer = 5000; } void QuestAccept(Player* player, Quest const* quest) override @@ -652,6 +641,7 @@ public: { me->SetFaction(FACTION_RATCHET); Talk(SAY_START); + SetDespawnAtEnd(false); Start(true, false, player->GetGUID()); } } From 79d9bb1ad546ad6cd125743cece4b5ec22e0f23b Mon Sep 17 00:00:00 2001 From: Killyana Date: Wed, 14 Feb 2018 01:03:03 +0100 Subject: [PATCH 062/101] DB: Fixing a typo from a previous commit Ref https://github.com/TrinityCore/TrinityCore/commit/9f59fb54fc16e06f81a1e99df4076c939bdb3339 --- sql/updates/world/3.3.5/2018_02_14_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_14_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_00_world.sql b/sql/updates/world/3.3.5/2018_02_14_00_world.sql new file mode 100644 index 0000000000..6139607d98 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_14_00_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `action_param1`=0, `action_param2`=180 WHERE `source_type`=9 AND `entryorguid`=2878000 AND `id` IN (7); From 0858a2a8f9ad8b467cf827e45fbeb7662f60f69c Mon Sep 17 00:00:00 2001 From: Killyana Date: Wed, 14 Feb 2018 18:34:42 +0100 Subject: [PATCH 063/101] DB/SAI: Update SAI that was using threat list target on aggro target_type 2, 3, 4, 5, 6 musn't be used with the event 4 --- sql/updates/world/3.3.5/2018_02_14_08_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_14_08_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_08_world.sql b/sql/updates/world/3.3.5/2018_02_14_08_world.sql new file mode 100644 index 0000000000..f5d3bf5b3a --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_14_08_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `smart_scripts` SET `target_type`=7 WHERE `event_type` IN (4) AND `target_type`=2; +UPDATE `smart_scripts` SET `target_type`=16 WHERE `event_type` IN (4) AND `target_type`=5; +UPDATE `smart_scripts` SET `event_type`=0 WHERE `entryorguid`=18701 AND `source_type`=0 AND `id`=1; From 3d0535ba38e5753055e47dfbb8e322b12742faf6 Mon Sep 17 00:00:00 2001 From: Killyana Date: Wed, 14 Feb 2018 19:22:45 +0100 Subject: [PATCH 064/101] DB: Fix some DB errors related to wrong SAI target --- sql/updates/world/3.3.5/2018_02_14_01_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_14_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_01_world.sql b/sql/updates/world/3.3.5/2018_02_14_01_world.sql new file mode 100644 index 0000000000..097e645368 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_14_01_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=32495 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=20405 AND `source_type`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=32357 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=2 WHERE `event_type`=0 AND `target_type`=7 AND `source_type`=0; From 12b9563b4e18592a5f3dd659a52d0e3ec9f8288f Mon Sep 17 00:00:00 2001 From: tkrokli Date: Wed, 14 Feb 2018 19:51:00 +0100 Subject: [PATCH 065/101] DB/updates: files renamed in chronological order These files were wrongly named and would be read in the wrong order when applied on local DB. --- .../3.3.5/{2018_02_14_08_world.sql => 2018_02_14_02_world.sql} | 0 .../3.3.5/{2018_02_14_01_world.sql => 2018_02_14_03_world.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/3.3.5/{2018_02_14_08_world.sql => 2018_02_14_02_world.sql} (100%) rename sql/updates/world/3.3.5/{2018_02_14_01_world.sql => 2018_02_14_03_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_02_14_08_world.sql b/sql/updates/world/3.3.5/2018_02_14_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_14_08_world.sql rename to sql/updates/world/3.3.5/2018_02_14_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_01_world.sql b/sql/updates/world/3.3.5/2018_02_14_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_14_01_world.sql rename to sql/updates/world/3.3.5/2018_02_14_03_world.sql From 4721d9814bb940bce24c5eae351eaffdd86ed802 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 03:26:36 +0100 Subject: [PATCH 066/101] Core/Scripts: Fixed some delayed enrage --- .../TheBlackMorass/boss_chrono_lord_deja.cpp | 4 ++-- .../RubySanctum/boss_baltharus_the_warborn.cpp | 4 ++-- .../RubySanctum/boss_general_zarithrian.cpp | 4 ++-- .../ChamberOfAspects/RubySanctum/boss_halion.cpp | 5 ++++- .../Northrend/IsleOfConquest/boss_ioc_horde_alliance.cpp | 4 ++-- .../Outland/BlackTemple/boss_gurtogg_bloodboil.cpp | 4 ++-- .../scripts/Outland/BlackTemple/boss_illidari_council.cpp | 4 ++-- .../Outland/BlackTemple/boss_reliquary_of_souls.cpp | 4 ++-- .../scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp | 4 ++-- .../HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp | 8 ++++---- 10 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp index a967f15445..46f60b4747 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/TheBlackMorass/boss_chrono_lord_deja.cpp @@ -106,11 +106,11 @@ public: if (!UpdateVictim()) return; + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index 79d40b29f2..0c6fe7ba38 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -182,11 +182,11 @@ class boss_baltharus_the_warborn : public CreatureScript if (!events.IsInPhase(PHASE_INTRO)) me->SetHealth(instance->GetData(DATA_BALTHARUS_SHARED_HEALTH)); + events.Update(diff); + if (!events.IsInPhase(PHASE_INTRO) && me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp index 4559cf170f..1c3541e110 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_general_zarithrian.cpp @@ -123,11 +123,11 @@ class boss_general_zarithrian : public CreatureScript if (!UpdateVictim()) return; + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index e30194e204..d8e00e49ac 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -311,11 +311,14 @@ class boss_halion : public CreatureScript if (events.IsInPhase(PHASE_TWO)) return; - if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING)) + if (!UpdateVictim()) return; events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Northrend/IsleOfConquest/boss_ioc_horde_alliance.cpp b/src/server/scripts/Northrend/IsleOfConquest/boss_ioc_horde_alliance.cpp index ed16b6728a..2b452ff3cb 100644 --- a/src/server/scripts/Northrend/IsleOfConquest/boss_ioc_horde_alliance.cpp +++ b/src/server/scripts/Northrend/IsleOfConquest/boss_ioc_horde_alliance.cpp @@ -79,11 +79,11 @@ public: if (!UpdateVictim()) return; + _events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - _events.Update(diff); - while (uint32 eventId = _events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp index dad4878247..2fa63fa5ff 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_gurtogg_bloodboil.cpp @@ -180,11 +180,11 @@ public: if (!UpdateVictim()) return; + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp index da5a92fcff..85f2efca14 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidari_council.cpp @@ -206,11 +206,11 @@ public: if (!UpdateVictim()) return; + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 7dcdc907f1..252270eeaa 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -262,11 +262,11 @@ public: if (!UpdateVictim()) return; + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp index 9d6c27144c..4a40496fec 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp @@ -172,11 +172,11 @@ public: if (!events.IsInPhase(PHASE_INTRO) && !UpdateVictim()) return; + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; - events.Update(diff); - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index d6a6ab3888..f4dd961f19 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -218,11 +218,14 @@ class boss_magtheridon : public CreatureScript void UpdateAI(uint32 diff) override { - if (me->HasUnitState(UNIT_STATE_CASTING)) + if (!events.IsInPhase(PHASE_BANISH) && !UpdateVictim()) return; events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) @@ -291,9 +294,6 @@ class boss_magtheridon : public CreatureScript return; } - if (!UpdateVictim()) - return; - DoMeleeAttackIfReady(); } From 66334459a61813ac1858c28b189cf93875d1540c Mon Sep 17 00:00:00 2001 From: ariel- Date: Wed, 14 Feb 2018 23:10:41 -0300 Subject: [PATCH 067/101] Core/Spells: fixed server being too overzealous with autoshot - Interrupting it when casting another spell and switching targets Ref #21390 --- src/server/game/Spells/Spell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 3556220abf..10e3772da7 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -2989,7 +2989,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered m_caster->m_Events.AddEvent(Event, m_caster->m_Events.CalculateTime(1)); //Prevent casting at cast another spell (ServerSide check) - if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true) && m_cast_count) + if (!(_triggeredCastFlags & TRIGGERED_IGNORE_CAST_IN_PROGRESS) && m_caster->IsNonMeleeSpellCast(false, true, true, m_spellInfo->Id == 75) && m_cast_count) { SendCastResult(SPELL_FAILED_SPELL_IN_PROGRESS); finish(false); From 66a01f2d69b4cb91da0a82fe8d37015c21a928de Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 03:30:18 +0100 Subject: [PATCH 068/101] Core/Handlers: fix bogus check that skipped CMSG_CAST_SPELL packet under certain conditions, missing a target change --- src/server/game/Handlers/SpellHandler.cpp | 24 ++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 003fae7891..23e202579d 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -403,15 +403,6 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) // Check possible spell cast overrides spellInfo = caster->GetCastSpellInfo(spellInfo); - // Client is resending autoshot cast opcode when other spell is cast during shoot rotation - // Skip it to prevent "interrupt" message - if (spellInfo->IsAutoRepeatRangedSpell() && caster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL) - && caster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)->m_spellInfo == spellInfo) - { - recvPacket.rfinish(); - return; - } - // can't use our own spells when we're in possession of another unit, if (_player->isPossessing()) { @@ -424,6 +415,21 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) targets.Read(recvPacket, caster); HandleClientCastFlags(recvPacket, castFlags, targets); + // Client is resending autoshot cast opcode when other spell is cast during shoot rotation + // Skip it to prevent "interrupt" message + // Also check targets! target may have changed and we need to interrupt current spell + if (spellInfo->IsAutoRepeatRangedSpell()) + { + if (Spell* spell = caster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL)) + { + if (spell->m_spellInfo == spellInfo && spell->m_targets.GetUnitTargetGUID() == targets.GetUnitTargetGUID()) + { + recvPacket.rfinish(); + return; + } + } + } + // auto-selection buff level base at target level (in spellInfo) if (targets.GetUnitTarget()) { From 1f7391a6b16fed840eb187e43976553c34fb5310 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 03:44:27 +0100 Subject: [PATCH 069/101] Scripts/Commands: add AI/ScriptName to .gobject info --- src/server/game/Miscellaneous/Language.h | 2 +- src/server/scripts/Commands/cs_gobject.cpp | 2 ++ src/server/scripts/Commands/cs_npc.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 43d34d220f..d4440de644 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1000,7 +1000,7 @@ enum TrinityStrings LANG_GOINFO_LOOTID = 5028, LANG_COMMAND_LOOKUP_MAX_RESULTS = 5029, LANG_UNAUTHORIZED = 5030, - LANG_NPCINFO_AIINFO = 5031, + LANG_OBJECTINFO_AIINFO = 5031, LANG_COMMAND_NO_BATTLEGROUND_FOUND = 5032, LANG_COMMAND_NO_ACHIEVEMENT_CRITERIA_FOUND = 5033, LANG_COMMAND_NO_OUTDOOR_PVP_FORUND = 5034, diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index aa3d71eacc..3ad0901731 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -613,6 +613,8 @@ public: if (GameObjectTemplateAddon const* addon = sObjectMgr->GetGameObjectTemplateAddon(entry)) handler->PSendSysMessage(LANG_GOINFO_ADDON, addon->faction, addon->flags); + handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, gameObjectInfo->AIName.c_str(), sObjectMgr->GetScriptName(gameObjectInfo->ScriptId).c_str()); + if (GameObjectDisplayInfoEntry const* modelInfo = sGameObjectDisplayInfoStore.LookupEntry(displayId)) handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->maxX, modelInfo->maxY, modelInfo->maxZ, modelInfo->minX, modelInfo->minY, modelInfo->minZ); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index febfea8855..250d6c798c 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -734,7 +734,7 @@ public: handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor()); handler->PSendSysMessage(LANG_NPCINFO_POSITION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()); - handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str()); + handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str()); handler->PSendSysMessage(LANG_NPCINFO_FLAGS_EXTRA, cInfo->flags_extra); for (uint8 i = 0; i < FLAGS_EXTRA_COUNT; ++i) if (cInfo->flags_extra & flagsExtra[i].Value) From 25675405b20134475668d014a4b897b0e0ba4f32 Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 15 Feb 2018 13:53:41 -0300 Subject: [PATCH 070/101] Core/Auras: skip target map update for one world tick if owner is not yet in world Closes #21426 --- src/server/game/Spells/Auras/SpellAuras.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 0ac8777176..71d846db4b 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -496,6 +496,10 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply) m_updateTargetMapInterval = UPDATE_TARGET_MAP_INTERVAL; + // skip update if owner is not in world! + if (!GetOwner()->IsInWorld()) + return; + // fill up to date target list // target, effMask std::unordered_map targets; From 097c6b97fc32faaa5a0c4e066bd20928c974fae3 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 15 Feb 2018 19:08:53 +0100 Subject: [PATCH 071/101] DB/SAI: Fix some DB errors related to the event "on text over" used with "invoker target" --- sql/updates/world/3.3.5/2018_02_15_01_world.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_15_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_01_world.sql b/sql/updates/world/3.3.5/2018_02_15_01_world.sql new file mode 100644 index 0000000000..fa60c65725 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_15_01_world.sql @@ -0,0 +1,11 @@ +-- +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `event_type`=52 AND `source_type`=0 AND `action_type`=11 AND `action_param1`=63010 AND `target_type`=7; +UPDATE smart_scripts SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN (3328500, 3374500) AND `source_type`=9 AND `id`=10; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 4488 AND `source_type` = 0 AND id IN (20,21,22,23); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(4488,0, 20, 0, 62,0,100,0, 4764, 0,0,0, 64, 1, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 0 Selected - Store target'), +(4488,0, 21, 0, 62,0,100,0, 4764, 1,0,0, 64, 1, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 1 Selected - Store target'), +(4488,0, 22, 0, 62,0,100,0, 4764, 2,0,0, 64, 1, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 2 Selected - Store target'), +(4488,0, 23, 0, 62,0,100,0, 4764, 3,0,0, 64, 1, 0,0,0,0,0, 7, 0, 0,0,0,0,0,0,'Parqual Fintallas - On Gossip Option 3 Selected - Store target'); +UPDATE smart_scripts SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN (4488) AND `source_type`=0 AND `id`IN (3,4,9,13); +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (18417) AND `source_type`=0 AND `id`IN (6); From f65dc90ba75b31845316b409b6396c35914e0009 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 15 Feb 2018 20:32:23 +0100 Subject: [PATCH 072/101] DB/SAI: Fix some DB errors related to the event "health pct" used with "invoker target" --- sql/updates/world/3.3.5/2018_02_15_02_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_15_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_02_world.sql b/sql/updates/world/3.3.5/2018_02_15_02_world.sql new file mode 100644 index 0000000000..afea607109 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_15_02_world.sql @@ -0,0 +1,4 @@ +-- +UPDATE `smart_scripts` SET `target_type`=1 WHERE `action_type`=39; +UPDATE `smart_scripts` SET `target_type`=2 WHERE `target_type`=7 AND `event_type`=2 AND `event_flags`=1 AND `event_param2`=30 AND `action_type`=1; +UPDATE `smart_scripts` SET `target_type`=24 WHERE `target_type`=7 AND `event_type`=2 AND `action_type` IN (33,85); From 0b4d30b423b95fc46275e378a6e5f765531d7396 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 15 Feb 2018 22:02:44 +0100 Subject: [PATCH 073/101] DB: Fix mode DB errors --- sql/updates/world/3.3.5/2018_02_15_03_world.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_15_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_03_world.sql b/sql/updates/world/3.3.5/2018_02_15_03_world.sql new file mode 100644 index 0000000000..72c8613c57 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_15_03_world.sql @@ -0,0 +1,11 @@ +-- +UPDATE `smart_scripts` SET `target_type`=24 WHERE `target_type`=16 AND `event_type`=2 AND `action_type` IN (33,15,11); +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=13197 AND `source_type`=0 AND `id`=11; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=16977 AND `source_type`=0 AND `id`=14; +UPDATE `smart_scripts` SET `target_type`=18, `target_param1`=25 WHERE `target_type`=7 AND `event_type`=7 AND `action_type` IN (6); +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=25773 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=19480 AND `source_type`=0 AND `id`=2; +UPDATE `smart_scripts` SET `event_type`=4 WHERE `entryorguid`=18400 AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=28444 AND `source_type`=0 AND `id`=1; +UPDATE `smart_scripts` SET `event_type`=10, `event_param1`=1, `event_param1`=20 WHERE `entryorguid`=19283 AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=27202 AND `source_type`=0 AND `id`=6; From 1e3c9c0ade92734bb8fc3a8e3cf1a05fa906e656 Mon Sep 17 00:00:00 2001 From: Killyana Date: Thu, 15 Feb 2018 22:43:35 +0100 Subject: [PATCH 074/101] DB: Fix last part of DB errors --- sql/updates/world/3.3.5/2018_02_15_04_world.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_15_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_04_world.sql b/sql/updates/world/3.3.5/2018_02_15_04_world.sql new file mode 100644 index 0000000000..262e0c7b03 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_15_04_world.sql @@ -0,0 +1,11 @@ +-- +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (25321,25322) AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (30154) AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `target_type`=23 WHERE `entryorguid` IN (25401) AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (22423) AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (14354) AND `source_type`=0 AND `id`=0; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (13197) AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (16769) AND `source_type`=0 AND `id`=9; +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (16769) AND `source_type`=0 AND `id`=4; +UPDATE `smart_scripts` SET `target_type`=21, target_param1=30 WHERE `entryorguid` IN (15420) AND `source_type`=0 AND `id`=3; +UPDATE `smart_scripts` SET `target_type`=21, target_param1=30 WHERE `entryorguid` IN (3584) AND `source_type`=0 AND `id`=2; From ade258873e9792edf7d7fcb3a7dfd8a2f54d2bec Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 03:49:47 +0100 Subject: [PATCH 075/101] Scripts/TotC: Reduce Twin Val'kyr berserk timer from 10 minutes to 8 minutes on normal mode (match DBM). --- .../CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index a83e26ba74..536160a34d 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -276,7 +276,7 @@ struct boss_twin_baseAI : public BossAI DoCast(me, SurgeSpellId); events.ScheduleEvent(EVENT_TWIN_SPIKE, 20 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 10 * MINUTE*IN_MILLISECONDS); + events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 8 * MINUTE*IN_MILLISECONDS); if (IsHeroic()) events.ScheduleEvent(EVENT_TOUCH, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS)); } From ca5e3445b89f6f0db59dade0d0b4df9183a9ed9c Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 04:05:47 +0100 Subject: [PATCH 076/101] Core/SAI: Add an action_param3 to "summon gob" to control when the object will despawn 0 - For despawn when creature dies or time runs out 1 - For despawn after time --- src/server/game/AI/SmartScripts/SmartScript.cpp | 4 ++-- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 1 + src/server/game/Entities/Object/Object.cpp | 4 ++-- src/server/game/Entities/Object/Object.h | 8 +++++++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 048f619b83..d7c0e07910 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1333,7 +1333,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u // continue; Position pos = (*itr)->GetPositionWithOffset(Position(e.target.x, e.target.y, e.target.z, e.target.o)); - GetBaseObject()->SummonGameObject(e.action.summonGO.entry, pos, G3D::Quat(), e.action.summonGO.despawnTime); + GetBaseObject()->SummonGameObject(e.action.summonGO.entry, pos, G3D::Quat(), e.action.summonGO.despawnTime, GOSummonType(e.action.summonGO.summonType)); } delete targets; @@ -1342,7 +1342,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (e.GetTargetType() != SMART_TARGET_POSITION) break; - GetBaseObject()->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), G3D::Quat(), e.action.summonGO.despawnTime); + GetBaseObject()->SummonGameObject(e.action.summonGO.entry, Position(e.target.x, e.target.y, e.target.z, e.target.o), G3D::Quat(), e.action.summonGO.despawnTime, GOSummonType(e.action.summonGO.summonType)); break; } case SMART_ACTION_KILL_UNIT: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index bc9e5f1705..a00f2bfbd6 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -838,6 +838,7 @@ struct SmartAction { uint32 entry; uint32 despawnTime; + uint32 summonType; } summonGO; struct diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 66a9a642fb..59e17e4a4a 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2176,7 +2176,7 @@ TempSummon* WorldObject::SummonCreature(uint32 id, float x, float y, float z, fl return SummonCreature(id, pos, spwtype, despwtime, 0); } -GameObject* WorldObject::SummonGameObject(uint32 entry, Position const& pos, G3D::Quat const& rot, uint32 respawnTime) +GameObject* WorldObject::SummonGameObject(uint32 entry, Position const& pos, G3D::Quat const& rot, uint32 respawnTime, GOSummonType summonType) { if (!IsInWorld()) return nullptr; @@ -2199,7 +2199,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, Position const& pos, G3D go->CopyPhaseFrom(this); go->SetRespawnTime(respawnTime); - if (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT) //not sure how to handle this + if (GetTypeId() == TYPEID_PLAYER || (GetTypeId() == TYPEID_UNIT && summonType == GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)) //not sure how to handle this ToUnit()->AddGameObject(go); else go->SetSpawnedByDefault(false); diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index a2e8e276d4..142e2689b8 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -446,6 +446,12 @@ class TC_GAME_API MapObject } }; +enum GOSummonType +{ + GO_SUMMON_TIMED_OR_CORPSE_DESPAWN = 0, // despawns after a specified time OR when the summoner dies + GO_SUMMON_TIMED_DESPAWN = 1 // despawns after a specified time +}; + class TC_GAME_API WorldObject : public Object, public WorldLocation { protected: @@ -584,7 +590,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation TempSummon* SummonCreature(uint32 id, Position const& pos, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0, uint32 vehId = 0) const; TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang = 0, TempSummonType spwtype = TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime = 0) const; - GameObject* SummonGameObject(uint32 entry, Position const& pos, G3D::Quat const& rot, uint32 respawnTime /* s */); + GameObject* SummonGameObject(uint32 entry, Position const& pos, G3D::Quat const& rot, uint32 respawnTime /* s */, GOSummonType summonType = GO_SUMMON_TIMED_OR_CORPSE_DESPAWN); GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, G3D::Quat const& rot, uint32 respawnTime /* s */); Creature* SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI* (*GetAI)(Creature*) = NULL); void SummonCreatureGroup(uint8 group, std::list* list = NULL); From 0b8101ba2f193200b6d4ee4642efa5e8f27dbae5 Mon Sep 17 00:00:00 2001 From: Killyana Date: Fri, 16 Feb 2018 02:22:36 +0100 Subject: [PATCH 077/101] DB/SAI: Chief Plaguebringer Harris --- sql/updates/world/3.3.5/2018_02_16_00_world.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_16_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_16_00_world.sql b/sql/updates/world/3.3.5/2018_02_16_00_world.sql new file mode 100644 index 0000000000..35cdaf23c5 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_16_00_world.sql @@ -0,0 +1,12 @@ +-- Chief Plaguebringer Harris SAI +SET @ENTRY := 24251; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,0,0,100,0,4000,8000,10000,12000,11,16432,0,0,0,0,0,5,0,0,0,0,0,0,0,"Chief Plaguebringer Harris - In Combat - Cast 'Plague Mist'"), +(@ENTRY,0,1,0,0,0,100,0,6000,8000,10000,15000,11,34095,0,0,0,0,0,5,0,0,0,0,0,0,0,"Chief Plaguebringer Harris - In Combat - Cast 'Throw Proximity Bomb'"), +(@ENTRY,0,2,0,2,0,100,1,10,15,0,0,11,5782,0,0,0,0,0,5,0,0,0,0,0,0,0,"Chief Plaguebringer Harris - Between 10-15% Health - Cast 'Fear'"); + +DELETE FROM `creature_text` WHERE `CreatureID`=24251 AND `GroupID`=0 AND `ID`=2; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(24251, 0, 2, "Steady your hand, you fool! Those are rare components you're spilling on the floor!", 14, 0, 100, 0, 0, 0, 23100, 0, "Chief Plaguebringer Harris"); From 5fc15396cc6ebbefbd911b2a9c2819003a6316b9 Mon Sep 17 00:00:00 2001 From: Keader Date: Thu, 15 Feb 2018 22:53:04 -0300 Subject: [PATCH 078/101] DB/Creature: Fixed number of Laughing Skull summoned on Yogg Saron --- sql/updates/world/3.3.5/2018_02_16_01_world.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_16_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_16_01_world.sql b/sql/updates/world/3.3.5/2018_02_16_01_world.sql new file mode 100644 index 0000000000..c125033507 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_16_01_world.sql @@ -0,0 +1,13 @@ +DELETE FROM `creature_summon_groups` WHERE `summonerId`=33890 AND `entry`=33990; -- Laughing Skull +INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES +(33890,0,0,33990,2063.156,27.95839,244.2707,5.288348,3,60000), -- Chambers of Aspects +(33890,0,0,33990,2061.257,-53.8788,239.8633,2.478368,3,60000), +(33890,0,0,33990,2109.908,29.33236,239.8817,0.1919862,3,60000), +(33890,0,0,33990,2135.219,-41.44271,239.8027,5.846853,3,60000), +(33890,0,1,33990,1932.213,-93.62798,240.073,4.852015,3,60000), -- Icecrown Citadel +(33890,0,1,33990,1905.937,-133.1651,240.073,5.77704,3,60000), +(33890,0,1,33990,1948.668,-152.4481,240.073,1.919862,3,60000), +(33890,0,1,33990,1992.463,-131.2119,240.073,3.455752,3,60000), +(33890,0,2,33990,1917.492,91.10191,239.7496,0.5235988,3,60000), -- Stormwind Keep +(33890,0,2,33990,1918.132,73.82926,241.7929,2.600541,3,60000), +(33890,0,2,33990,1922.55,54.68001,241.1263,0.1919862,3,60000); From f91813fd79f385629adba24decba262999b3ee25 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 04:18:00 +0100 Subject: [PATCH 079/101] rename files --- sql/updates/world/3.3.5/2018_02_10_00_world.sql | 2 -- sql/updates/world/3.3.5/2018_02_11_00_world_335.sql | 1 - sql/updates/world/3.3.5/2018_02_11_01_world_335.sql | 1 - .../2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql | 2 ++ .../2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql} | 0 ...2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql | 1 + ...2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql | 1 + ...018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql} | 2 ++ .../2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql} | 0 .../2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql} | 0 ...018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql} | 2 ++ .../2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql} | 0 .../2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql} | 0 .../2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql} | 0 .../2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql} | 0 .../2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql} | 0 .../2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql} | 0 .../2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql} | 0 .../2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql} | 0 .../2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql} | 0 .../2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql} | 0 .../2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql} | 0 .../2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql} | 0 .../2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql} | 0 .../2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql} | 0 .../2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql} | 0 .../2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql} | 0 27 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 sql/updates/world/3.3.5/2018_02_10_00_world.sql delete mode 100644 sql/updates/world/3.3.5/2018_02_11_00_world_335.sql delete mode 100644 sql/updates/world/3.3.5/2018_02_11_01_world_335.sql create mode 100644 sql/updates/world/4.3.4/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql rename sql/updates/world/{3.3.5/2018_02_10_01_world.sql => 4.3.4/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql} (100%) create mode 100644 sql/updates/world/4.3.4/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql create mode 100644 sql/updates/world/4.3.4/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql rename sql/updates/world/{3.3.5/2018_02_11_02_world_335.sql => 4.3.4/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql} (96%) rename sql/updates/world/{3.3.5/2018_02_12_00_world.sql => 4.3.4/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_12_01_world.sql => 4.3.4/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_00_world_335.sql => 4.3.4/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_13_01_world.sql => 4.3.4/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_02_world.sql => 4.3.4/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_03_world.sql => 4.3.4/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_04_world.sql => 4.3.4/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_05_world.sql => 4.3.4/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_06_world.sql => 4.3.4/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_13_07_world.sql => 4.3.4/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_14_00_world.sql => 4.3.4/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_14_02_world.sql => 4.3.4/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_14_03_world.sql => 4.3.4/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_15_01_world.sql => 4.3.4/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_15_02_world.sql => 4.3.4/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_15_03_world.sql => 4.3.4/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_15_04_world.sql => 4.3.4/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_16_00_world.sql => 4.3.4/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_16_01_world.sql => 4.3.4/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_02_10_00_world.sql b/sql/updates/world/3.3.5/2018_02_10_00_world.sql deleted file mode 100644 index ad19973dc2..0000000000 --- a/sql/updates/world/3.3.5/2018_02_10_00_world.sql +++ /dev/null @@ -1,2 +0,0 @@ --- -DELETE FROM `spawn_group` WHERE `spawnId` IN (64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993) AND `spawnType`=0 AND `groupId`=2; diff --git a/sql/updates/world/3.3.5/2018_02_11_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_11_00_world_335.sql deleted file mode 100644 index 498c89eab1..0000000000 --- a/sql/updates/world/3.3.5/2018_02_11_00_world_335.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `spell_bonus_data` WHERE `entry` IN (31117, 64085); diff --git a/sql/updates/world/3.3.5/2018_02_11_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_11_01_world_335.sql deleted file mode 100644 index e2e2b3a0ba..0000000000 --- a/sql/updates/world/3.3.5/2018_02_11_01_world_335.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `spell_proc` SET `SpellPhaseMask` = `SpellPhaseMask`|0x2 WHERE `SpellId` IN (-19572, 28716, -31656, 37603, 38394, 40438, 40478, 45054, -47195, -47245, -48539, -49217, 54754, 56218, -56636, 57870, 60061, 60170, 60176, 60487, 61188, 64752, 64824, 64914, 67209, 67356, 67361, 67365, 70664, 70730, 70841, 70854, 71174, 71176, 71178, 71198, 71606, 71637); diff --git a/sql/updates/world/4.3.4/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql b/sql/updates/world/4.3.4/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql new file mode 100644 index 0000000000..ca0346de02 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql @@ -0,0 +1,2 @@ +-- +-- DELETE FROM `spawn_group` WHERE `spawnId` IN (64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993) AND `spawnType`=0 AND `groupId`=2; diff --git a/sql/updates/world/3.3.5/2018_02_10_01_world.sql b/sql/updates/world/4.3.4/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_10_01_world.sql rename to sql/updates/world/4.3.4/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql b/sql/updates/world/4.3.4/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql new file mode 100644 index 0000000000..f6ab39a914 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql @@ -0,0 +1 @@ +-- DELETE FROM `spell_bonus_data` WHERE `entry` IN (31117, 64085); diff --git a/sql/updates/world/4.3.4/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql b/sql/updates/world/4.3.4/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql new file mode 100644 index 0000000000..28a1ad70e2 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql @@ -0,0 +1 @@ +-- UPDATE `spell_proc` SET `SpellPhaseMask` = `SpellPhaseMask`|0x2 WHERE `SpellId` IN (-19572, 28716, -31656, 37603, 38394, 40438, 40478, 45054, -47195, -47245, -48539, -49217, 54754, 56218, -56636, 57870, 60061, 60170, 60176, 60487, 61188, 64752, 64824, 64914, 67209, 67356, 67361, 67365, 70664, 70730, 70841, 70854, 71174, 71176, 71178, 71198, 71606, 71637); diff --git a/sql/updates/world/3.3.5/2018_02_11_02_world_335.sql b/sql/updates/world/4.3.4/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql similarity index 96% rename from sql/updates/world/3.3.5/2018_02_11_02_world_335.sql rename to sql/updates/world/4.3.4/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql index 5a98c0da86..bffc51359f 100644 --- a/sql/updates/world/3.3.5/2018_02_11_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql @@ -1,3 +1,5 @@ +/* DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_combined_toxins'; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (56584, 'spell_combined_toxins'); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_12_00_world.sql b/sql/updates/world/4.3.4/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_12_00_world.sql rename to sql/updates/world/4.3.4/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_12_01_world.sql b/sql/updates/world/4.3.4/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_12_01_world.sql rename to sql/updates/world/4.3.4/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql b/sql/updates/world/4.3.4/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_13_00_world_335.sql rename to sql/updates/world/4.3.4/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql index 828f0c7083..8b78a708f1 100644 --- a/sql/updates/world/3.3.5/2018_02_13_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql @@ -1,3 +1,4 @@ +/* -- Remove unique items from reference table 24064 DELETE FROM `reference_loot_template` WHERE `Entry`=24064 AND `Item` IN (911, 920, 1076, 1406, 1455, 1459, 1461, 1462, 2034, 2232, 3429); @@ -24,3 +25,4 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Com (205, 2232, 0.1, 0, "Nightbane Dark Runner - Dark Runner Boots"), (2427, 3429, 1, 0, "Jailor Eston - Guardsman Belt"), (2428, 3429, 1, 0, "Jailor Marlgen - Guardsman Belt"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_13_01_world.sql b/sql/updates/world/4.3.4/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_01_world.sql rename to sql/updates/world/4.3.4/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_02_world.sql b/sql/updates/world/4.3.4/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_02_world.sql rename to sql/updates/world/4.3.4/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_03_world.sql b/sql/updates/world/4.3.4/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_03_world.sql rename to sql/updates/world/4.3.4/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_04_world.sql b/sql/updates/world/4.3.4/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_04_world.sql rename to sql/updates/world/4.3.4/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_05_world.sql b/sql/updates/world/4.3.4/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_05_world.sql rename to sql/updates/world/4.3.4/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_06_world.sql b/sql/updates/world/4.3.4/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_06_world.sql rename to sql/updates/world/4.3.4/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_13_07_world.sql b/sql/updates/world/4.3.4/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_13_07_world.sql rename to sql/updates/world/4.3.4/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_00_world.sql b/sql/updates/world/4.3.4/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_14_00_world.sql rename to sql/updates/world/4.3.4/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_02_world.sql b/sql/updates/world/4.3.4/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_14_02_world.sql rename to sql/updates/world/4.3.4/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_14_03_world.sql b/sql/updates/world/4.3.4/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_14_03_world.sql rename to sql/updates/world/4.3.4/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_01_world.sql b/sql/updates/world/4.3.4/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_15_01_world.sql rename to sql/updates/world/4.3.4/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_02_world.sql b/sql/updates/world/4.3.4/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_15_02_world.sql rename to sql/updates/world/4.3.4/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_03_world.sql b/sql/updates/world/4.3.4/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_15_03_world.sql rename to sql/updates/world/4.3.4/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_15_04_world.sql b/sql/updates/world/4.3.4/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_15_04_world.sql rename to sql/updates/world/4.3.4/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_16_00_world.sql b/sql/updates/world/4.3.4/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_16_00_world.sql rename to sql/updates/world/4.3.4/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_16_01_world.sql b/sql/updates/world/4.3.4/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_16_01_world.sql rename to sql/updates/world/4.3.4/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql From 6f014c638cd182c9fe2bb7b7debb65d724a208d8 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 16 Feb 2018 04:47:06 +0100 Subject: [PATCH 080/101] TDB 4.3.4.27 2018/02/16 --- revision_data.h.in.cmake | 2 +- sql/base/auth_database.sql | 3 ++- sql/base/characters_database.sql | 3 ++- .../4.3.4/auth/26_2018_02_16}/2018_01_15_00_auth.sql | 0 .../characters/26_2018_02_16}/2018_01_15_00_characters.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_15_00_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_15_01_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_20_00_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_20_01_world.sql | 0 .../2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql | 0 .../2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql | 0 .../2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql | 0 ...018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql | 0 .../2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_27_00_world.sql | 0 ...018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql | 0 ...018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql | 0 .../2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql | 0 .../2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql | 0 ...018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql | 0 ...018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql | 0 ...018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql | 0 ...018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql | 0 ...018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql | 0 ...018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql | 0 ...018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql | 0 ...018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql | 0 ...018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql | 0 ...018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql | 0 ...018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql | 0 .../2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_29_00_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_01_29_01_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_02_02_00_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_02_02_01_world.sql | 0 .../4.3.4/world/26_2018_02_16}/2018_02_04_00_world.sql | 0 ...018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql | 0 .../2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql | 0 ...018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql | 0 ...018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql | 0 ...018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql | 0 ...018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql | 0 ...018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql | 0 ...018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql | 0 ...018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql | 0 ...018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql | 0 ...018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql | 0 ...018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql | 0 .../2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql | 0 .../2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql | 0 .../2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql | 0 .../2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql | 0 ...018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql | 0 ...018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql | 0 ...018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql | 0 .../2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql | 0 .../2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql | 0 ...018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql | 0 .../2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql | 0 .../2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql | 0 .../2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql | 0 .../2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql | 0 .../2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql | 0 .../2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql | 0 .../2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql | 0 .../2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql | 0 .../2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql | 0 .../2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql | 0 .../2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql | 0 .../2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql | 0 .../2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql | 0 .../2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql | 0 .../2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql | 0 .../2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql | 0 sql/updates/auth/4.3.4/2018_02_16_00_auth.sql | 2 ++ sql/updates/characters/4.3.4/2018_02_16_00_characters.sql | 2 ++ sql/updates/world/4.3.4/2018_02_16_24_world.sql | 3 +++ 77 files changed, 12 insertions(+), 3 deletions(-) rename sql/{updates/auth/4.3.4 => old/4.3.4/auth/26_2018_02_16}/2018_01_15_00_auth.sql (100%) rename sql/{updates/characters/4.3.4 => old/4.3.4/characters/26_2018_02_16}/2018_01_15_00_characters.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_15_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_15_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_20_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_20_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_29_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_01_29_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_02_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_02_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_04_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql (100%) rename sql/{updates/world/4.3.4 => old/4.3.4/world/26_2018_02_16}/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql (100%) create mode 100644 sql/updates/auth/4.3.4/2018_02_16_00_auth.sql create mode 100644 sql/updates/characters/4.3.4/2018_02_16_00_characters.sql create mode 100644 sql/updates/world/4.3.4/2018_02_16_24_world.sql diff --git a/revision_data.h.in.cmake b/revision_data.h.in.cmake index 4422f549d2..99ad8bfe12 100644 --- a/revision_data.h.in.cmake +++ b/revision_data.h.in.cmake @@ -7,7 +7,7 @@ #define _SOURCE_DIRECTORY R"(@CMAKE_SOURCE_DIR@)" #define _BUILD_DIRECTORY R"(@BUILDDIR@)" #define _MYSQL_EXECUTABLE R"(@MYSQL_EXECUTABLE@)" - #define _FULL_DATABASE "TDB_full_world_434.26_2018_01_15.sql" + #define _FULL_DATABASE "TDB_full_world_434.27_2018_02_16.sql" #define VER_COMPANYNAME_STR "TrinityCore Developers" #define VER_LEGALCOPYRIGHT_STR "(c)2008-2018 TrinityCore" #define VER_FILEVERSION 0,0,0 diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql index d6c676c974..4b4bcc6f29 100644 --- a/sql/base/auth_database.sql +++ b/sql/base/auth_database.sql @@ -2000,7 +2000,8 @@ INSERT INTO `updates` VALUES ('2017_11_16_00_auth.sql','A53D70B4DB8686AB3A0B0E62471717F4F3902ADD','ARCHIVED','2017-11-16 01:40:04',0), ('2017_12_17_00_auth.sql','E2EC5999D5305FC12EA576D08EFB95D1660DCF4D','ARCHIVED','2017-12-17 01:40:04',0), ('2018_01_06_00_auth.sql','CD9B826B9D95697DC412DEF780E814FA3991D6CD','ARCHIVED','2018-01-06 01:40:04',0), -('2018_01_15_00_auth.sql','1C5C28490B27D86EBC14F6034AA4D34E66D5545D','ARCHIVED','2018-01-15 01:40:04',0); +('2018_01_15_00_auth.sql','1C5C28490B27D86EBC14F6034AA4D34E66D5545D','ARCHIVED','2018-01-15 01:40:04',0), +('2018_02_16_00_auth.sql','1AAD2FC649CBE8093ECE5908EBBBB31EC326166A','ARCHIVED','2018-02-16 01:40:04',0); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index a3227a8208..b5fa46f8c5 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -2875,7 +2875,8 @@ INSERT INTO `updates` VALUES ('2017_11_26_00_characters.sql','4609CDC122E0A7F27A09C2605B329A06FC7FB7C2','ARCHIVED','2017-11-27 00:00:00',0), ('2017_11_28_00_characters.sql','6FF1F84B8985ADFC7FF97F0BF8E53403CF13C320','ARCHIVED','2017-11-28 00:00:00',0), ('2017_12_17_00_characters.sql','937E8F51DC74AC41FF8F213CE36C69DDEB878D6A','ARCHIVED','2017-12-17 00:00:00',0), -('2018_01_15_00_characters.sql','43C8E4549E1AA9610B377BC7139C88C63D0DC193','ARCHIVED','2018-01-15 00:00:00',0); +('2018_01_15_00_characters.sql','43C8E4549E1AA9610B377BC7139C88C63D0DC193','ARCHIVED','2018-01-15 00:00:00',0), +('2018_02_16_00_characters.sql','F1254689CE8A0B0AF149E557830287FF583B8D91','ARCHIVED','2018-02-16 00:00:00',0); /*!40000 ALTER TABLE `updates` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/auth/4.3.4/2018_01_15_00_auth.sql b/sql/old/4.3.4/auth/26_2018_02_16/2018_01_15_00_auth.sql similarity index 100% rename from sql/updates/auth/4.3.4/2018_01_15_00_auth.sql rename to sql/old/4.3.4/auth/26_2018_02_16/2018_01_15_00_auth.sql diff --git a/sql/updates/characters/4.3.4/2018_01_15_00_characters.sql b/sql/old/4.3.4/characters/26_2018_02_16/2018_01_15_00_characters.sql similarity index 100% rename from sql/updates/characters/4.3.4/2018_01_15_00_characters.sql rename to sql/old/4.3.4/characters/26_2018_02_16/2018_01_15_00_characters.sql diff --git a/sql/updates/world/4.3.4/2018_01_15_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_15_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_15_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_15_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_15_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_15_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_15_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_15_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_20_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_20_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_20_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_20_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_20_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_20_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_20_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_20_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_21_00_world_from_335_was_2018_01_16_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_21_01_world_from_335_was_2018_01_17_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_21_02_world_from_335_was_2018_01_18_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_21_03_world_from_335_was_2018_01_18_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_21_04_world_from_335_was_2018_01_20_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_01_world_from_335_was_2018_01_21_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_02_world_from_335_was_2018_01_23_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_03_world_from_335_was_2018_01_24_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_04_world_from_335_was_2018_01_24_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_05_world_from_335_was_2018_01_25_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_06_world_from_335_was_2018_01_25_03_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_07_world_from_335_was_2018_01_25_04_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_08_world_from_335_was_2018_01_25_05_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_09_world_from_335_was_2018_01_25_06_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_10_world_from_335_was_2018_01_25_07_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_11_world_from_335_was_2018_01_25_08_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_12_world_from_335_was_2018_01_25_09_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_13_world_from_335_was_2018_01_25_10_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_14_world_from_335_was_2018_01_25_11_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_15_world_from_335_was_2018_01_25_12_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_27_16_world_from_335_was_2018_01_26_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_29_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_29_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_29_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_29_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_01_29_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_01_29_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_01_29_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_01_29_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_02_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_02_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_02_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_02_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_02_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_02_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_02_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_02_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_04_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_04_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_04_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_04_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_00_world_from_335_was_2018_02_04_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_01_world_from_335_was_2018_02_04_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_02_world_from_335_was_2018_02_08_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_03_world_from_335_was_2018_02_08_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_04_world_from_335_was_2018_02_08_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_05_world_from_335_was_2018_02_08_03_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_06_world_from_335_was_2018_02_08_04_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_07_world_from_335_was_2018_02_08_05_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_08_world_from_335_was_2018_02_08_06_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_09_world_from_335_was_2018_02_08_07_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_10_world_from_335_was_2018_02_08_08_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_11_world_from_335_was_2018_02_08_09_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_12_world_from_335_was_2018_02_08_10_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_10_13_world_from_335_was_2018_02_09_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_00_world_from_335_was_2018_02_10_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_01_world_from_335_was_2018_02_10_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_02_world_from_335_was_2018_02_11_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_03_world_from_335_was_2018_02_11_01_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_04_world_from_335_was_2018_02_11_02_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_05_world_from_335_was_2018_02_12_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_06_world_from_335_was_2018_02_12_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_07_world_from_335_was_2018_02_13_00_world_335.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_08_world_from_335_was_2018_02_13_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_09_world_from_335_was_2018_02_13_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_10_world_from_335_was_2018_02_13_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_11_world_from_335_was_2018_02_13_04_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_12_world_from_335_was_2018_02_13_05_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_13_world_from_335_was_2018_02_13_06_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_14_world_from_335_was_2018_02_13_07_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_15_world_from_335_was_2018_02_14_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_16_world_from_335_was_2018_02_14_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_17_world_from_335_was_2018_02_14_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_18_world_from_335_was_2018_02_15_01_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_19_world_from_335_was_2018_02_15_02_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_20_world_from_335_was_2018_02_15_03_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_21_world_from_335_was_2018_02_15_04_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_22_world_from_335_was_2018_02_16_00_world.sql diff --git a/sql/updates/world/4.3.4/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql b/sql/old/4.3.4/world/26_2018_02_16/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql similarity index 100% rename from sql/updates/world/4.3.4/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql rename to sql/old/4.3.4/world/26_2018_02_16/2018_02_16_23_world_from_335_was_2018_02_16_01_world.sql diff --git a/sql/updates/auth/4.3.4/2018_02_16_00_auth.sql b/sql/updates/auth/4.3.4/2018_02_16_00_auth.sql new file mode 100644 index 0000000000..a053031111 --- /dev/null +++ b/sql/updates/auth/4.3.4/2018_02_16_00_auth.sql @@ -0,0 +1,2 @@ +-- TDB 4.3.4-27 auth database +UPDATE `updates` SET `state`='ARCHIVED'; diff --git a/sql/updates/characters/4.3.4/2018_02_16_00_characters.sql b/sql/updates/characters/4.3.4/2018_02_16_00_characters.sql new file mode 100644 index 0000000000..20ee966b26 --- /dev/null +++ b/sql/updates/characters/4.3.4/2018_02_16_00_characters.sql @@ -0,0 +1,2 @@ +-- TDB 4.3.4-27 characters database +UPDATE `updates` SET `state`='ARCHIVED'; diff --git a/sql/updates/world/4.3.4/2018_02_16_24_world.sql b/sql/updates/world/4.3.4/2018_02_16_24_world.sql new file mode 100644 index 0000000000..4a03ca9c83 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_02_16_24_world.sql @@ -0,0 +1,3 @@ +UPDATE `version` SET `db_version`='TDB 434.27', `cache_id`=27 LIMIT 1; + +UPDATE `updates` SET `state`='ARCHIVED'; From a858e9937e9bab7615417f72e8913e2ab41ce699 Mon Sep 17 00:00:00 2001 From: ariel- Date: Thu, 15 Feb 2018 23:58:20 -0300 Subject: [PATCH 081/101] Core/Auras: remove obsolete check that was preventing some auras to proc even if they met conditions otherwise --- src/server/game/Spells/Auras/SpellAuras.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 71d846db4b..19989c2cd3 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1795,12 +1795,6 @@ uint8 Aura::GetProcEffectMask(AuraApplication* aurApp, ProcEventInfo& eventInfo, // this is needed because this is the last moment in which you can prevent aura charge drop on proc // and possibly a way to prevent default checks (if there're going to be any) - // Aura added by spell can't trigger from self (prevent drop charges/do triggers) - // But except periodic and kill triggers (can triggered from self) - if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo()) - if (spellInfo->Id == GetId() && !(eventInfo.GetTypeMask() & (PROC_FLAG_TAKEN_PERIODIC | PROC_FLAG_KILL))) - return 0; - // Check if current equipment meets aura requirements // do that only for passive spells /// @todo this needs to be unified for all kinds of auras From 70a30770d838fd8f9a571814e60c8dc692e4013d Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 17 Feb 2018 16:11:01 +0100 Subject: [PATCH 082/101] Core/Scripts: implemented Fungal Decay & Tail Sting --- .../world/3.3.5/2018_02_16_02_world.sql | 8 ++ src/server/scripts/Spells/spell_generic.cpp | 114 ++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_16_02_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_16_02_world.sql b/sql/updates/world/3.3.5/2018_02_16_02_world.sql new file mode 100644 index 0000000000..ac6733d105 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_16_02_world.sql @@ -0,0 +1,8 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (32065, 36659); +INSERT INTO `spell_proc` (`SpellId`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `ProcsPerMinute`, `Chance`, `Cooldown`, `Charges`) VALUES +(32065, 0x0, 0, 0x00000000, 0x00000000, 0x00000000, 0x80000, 0x1, 0x0, 0x0, 0x0, 0, 0, 0, 0), +(36659, 0x0, 0, 0x00000000, 0x00000000, 0x00000000, 0x80000, 0x1, 0x0, 0x0, 0x0, 0, 0, 0, 0); +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_gen_decay_over_time_fungal_decay','spell_gen_decay_over_time_tail_sting'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(32065, 'spell_gen_decay_over_time_fungal_decay'), +(36659, 'spell_gen_decay_over_time_tail_sting'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 90f599c870..6de9a63ba3 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -1324,6 +1324,118 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader } }; +class spell_gen_decay_over_time : public SpellScriptLoader +{ + public: + spell_gen_decay_over_time(char const* name) : SpellScriptLoader(name) { } + + SpellScript* GetSpellScript() const override + { + return new spell_gen_decay_over_time_SpellScript(); + } + + private: + class spell_gen_decay_over_time_SpellScript : public SpellScript + { + PrepareSpellScript(spell_gen_decay_over_time_SpellScript); + + void ModAuraStack() + { + if (Aura* aur = GetHitAura()) + aur->SetStackAmount(static_cast(GetSpellInfo()->StackAmount)); + } + + void Register() override + { + AfterHit += SpellHitFn(spell_gen_decay_over_time_SpellScript::ModAuraStack); + } + }; + + protected: + class spell_gen_decay_over_time_AuraScript : public AuraScript + { + protected: + PrepareAuraScript(spell_gen_decay_over_time_AuraScript); + + bool CheckProc(ProcEventInfo& eventInfo) + { + return (eventInfo.GetSpellInfo() == GetSpellInfo()); + } + + void Decay(ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + ModStackAmount(-1); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_gen_decay_over_time_AuraScript::CheckProc); + OnProc += AuraProcFn(spell_gen_decay_over_time_AuraScript::Decay); + } + + ~spell_gen_decay_over_time_AuraScript() = default; + }; + + ~spell_gen_decay_over_time() = default; +}; + +enum FungalDecay +{ + // found in sniffs, there is no duration entry we can possibly use + AURA_DURATION = 12600 +}; + +// 32065 - Fungal Decay +class spell_gen_decay_over_time_fungal_decay : public spell_gen_decay_over_time +{ + public: + spell_gen_decay_over_time_fungal_decay() : spell_gen_decay_over_time("spell_gen_decay_over_time_fungal_decay") { } + + class spell_gen_decay_over_time_fungal_decay_AuraScript : public spell_gen_decay_over_time_AuraScript + { + PrepareAuraScript(spell_gen_decay_over_time_fungal_decay_AuraScript); + + void ModDuration(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + // only on actual reapply, not on stack decay + if (GetDuration() == GetMaxDuration()) + { + SetMaxDuration(AURA_DURATION); + SetDuration(AURA_DURATION); + } + } + + void Register() override + { + spell_gen_decay_over_time_AuraScript::Register(); + OnEffectApply += AuraEffectApplyFn(spell_gen_decay_over_time_fungal_decay_AuraScript::ModDuration, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_decay_over_time_fungal_decay_AuraScript(); + } +}; + +// 36659 - Tail Sting +class spell_gen_decay_over_time_tail_sting : public spell_gen_decay_over_time +{ + public: + spell_gen_decay_over_time_tail_sting() : spell_gen_decay_over_time("spell_gen_decay_over_time_tail_sting") { } + + class spell_gen_decay_over_time_tail_sting_AuraScript : public spell_gen_decay_over_time_AuraScript + { + PrepareAuraScript(spell_gen_decay_over_time_tail_sting_AuraScript); + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_decay_over_time_tail_sting_AuraScript(); + } +}; + enum DefendVisuals { SPELL_VISUAL_SHIELD_1 = 63130, @@ -4277,6 +4389,8 @@ void AddSC_generic_spell_scripts() new spell_gen_creature_permanent_feign_death(); new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise"); new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise"); + new spell_gen_decay_over_time_fungal_decay(); + new spell_gen_decay_over_time_tail_sting(); new spell_gen_defend(); new spell_gen_despawn_self(); new spell_gen_divine_storm_cd_reset(); From 3292925319e09c1f3fd8b04496767443b5491920 Mon Sep 17 00:00:00 2001 From: ariel- Date: Fri, 16 Feb 2018 03:02:10 -0300 Subject: [PATCH 083/101] Core/Events: update holiday code and remove misleading log (event date is the one from game_event) - add siign to DBC struct member CalendarFilterType as it was being used as such - kill localtime usage as it's deprecated Closes #18542 --- src/server/game/DataStores/DBCStructure.h | 2 +- src/server/game/Events/GameEventMgr.cpp | 39 +++++++++++++++-------- src/server/game/Events/GameEventMgr.h | 6 ++-- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 952cb2767b..b06220cecf 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1346,7 +1346,7 @@ struct HolidaysEntry //uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc) char* TextureFilename; // 51 m_textureFilename uint32 Priority; // 52 m_priority - uint32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) + int32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday) //uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1) }; diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 72790a87a8..2afac887fc 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -943,7 +943,6 @@ void GameEventMgr::LoadHolidayDates() // 0 1 2 QueryResult result = WorldDatabase.Query("SELECT id, date_id, date_value FROM holiday_dates"); - if (!result) { TC_LOG_INFO("server.loading", ">> Loaded 0 holiday dates. DB table `holiday_dates` is empty."); @@ -968,7 +967,10 @@ void GameEventMgr::LoadHolidayDates() continue; } entry->Date[dateId] = fields[2].GetUInt32(); - modifiedHolidays.insert(entry->Id); + + auto itr = std::lower_bound(modifiedHolidays.begin(), modifiedHolidays.end(), entry->Id); + if (itr == modifiedHolidays.end() || *itr != entry->Id) + modifiedHolidays.insert(itr, entry->Id); ++count; } while (result->NextRow()); @@ -1720,7 +1722,6 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event) return; HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(event.holiday_id); - if (!holiday->Date[0] || !holiday->Duration[0]) // Invalid definitions { TC_LOG_ERROR("sql.sql", "Missing date or duration for holiday %u.", event.holiday_id); @@ -1731,7 +1732,7 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event) event.length = holiday->Duration[stageIndex] * HOUR / MINUTE; time_t stageOffset = 0; - for (int i = 0; i < stageIndex; ++i) + for (uint8 i = 0; i < stageIndex; ++i) stageOffset += holiday->Duration[i] * HOUR; switch (holiday->CalendarFilterType) @@ -1751,20 +1752,23 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event) if (holiday->Looping) { event.occurence = 0; - for (int i = 0; i < MAX_HOLIDAY_DURATIONS && holiday->Duration[i]; ++i) + for (uint8 i = 0; i < MAX_HOLIDAY_DURATIONS && holiday->Duration[i]; ++i) event.occurence += holiday->Duration[i] * HOUR / MINUTE; } bool singleDate = ((holiday->Date[0] >> 24) & 0x1F) == 31; // Events with fixed date within year have - 1 - time_t curTime = time(nullptr); - for (int i = 0; i < MAX_HOLIDAY_DATES && holiday->Date[i]; ++i) + time_t curTime = GameTime::GetGameTime(); + for (uint8 i = 0; i < MAX_HOLIDAY_DATES && holiday->Date[i]; ++i) { uint32 date = holiday->Date[i]; tm timeInfo; if (singleDate) - timeInfo.tm_year = localtime(&curTime)->tm_year - 1; // First try last year (event active through New Year) + { + localtime_r(&curTime, &timeInfo); + timeInfo.tm_year -= 1; // First try last year (event active through New Year) + } else timeInfo.tm_year = ((date >> 24) & 0x1F) + 100; @@ -1776,22 +1780,31 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event) timeInfo.tm_wday = 0; timeInfo.tm_yday = 0; timeInfo.tm_isdst = -1; - tm tmCopy = timeInfo; + // try to get next start time (skip past dates) time_t startTime = mktime(&timeInfo); if (curTime < startTime + event.length * MINUTE) { event.start = startTime + stageOffset; - return; + break; } else if (singleDate) { - tmCopy.tm_year = localtime(&curTime)->tm_year; // This year + tm tmCopy; + localtime_r(&curTime, &tmCopy); + int year = tmCopy.tm_year; // This year + tmCopy = timeInfo; + tmCopy.tm_year = year; + event.start = mktime(&tmCopy) + stageOffset; - return; + break; + } + else + { + // date is due and not a singleDate event, try with next DBC date (modified by holiday_dates) + // if none is found we don't modify start date and use the one in game_event } } - TC_LOG_ERROR("sql.sql", "No suitable start date found for holiday %u.", event.holiday_id); } bool IsHolidayActive(HolidayIds id) diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h index de1f09dc24..e77295e32c 100644 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -121,9 +121,8 @@ class TC_GAME_API GameEventMgr bool StartEvent(uint16 event_id, bool overwrite = false); void StopEvent(uint16 event_id, bool overwrite = false); void HandleQuestComplete(uint32 quest_id); // called on world event type quest completions - void HandleWorldEventGossip(Player* player, Creature* c); uint32 GetNPCFlag(Creature* cr); - uint32 GetNpcTextId(uint32 guid); + private: void SendWorldStateUpdate(Player* player, uint16 event_id); void AddActiveEvent(uint16 event_id) { m_ActiveEvents.insert(event_id); } @@ -177,10 +176,11 @@ class TC_GAME_API GameEventMgr GameEventNPCFlagMap mGameEventNPCFlags; ActiveEvents m_ActiveEvents; bool isSystemInit; + public: GameEventGuidMap mGameEventCreatureGuids; GameEventGuidMap mGameEventGameobjectGuids; - std::set modifiedHolidays; + std::vector modifiedHolidays; }; #define sGameEventMgr GameEventMgr::instance() From cbe84fa13052b5dccc7e95d821d8cdaa3305bdd2 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 17 Feb 2018 17:45:03 +0100 Subject: [PATCH 084/101] Core/Entities: remove grid-wide visibility from setActive and implement another method for it --- src/server/game/Battlefield/Battlefield.cpp | 2 ++ src/server/game/Entities/Object/Object.cpp | 16 ++++++++++++---- src/server/game/Entities/Object/Object.h | 3 +++ .../BlackwingLair/boss_nefarian.cpp | 1 + .../BlackwingLair/instance_blackwing_lair.cpp | 1 + .../EasternKingdoms/Karazhan/boss_nightbane.cpp | 1 + .../EasternKingdoms/Karazhan/karazhan.cpp | 1 + .../ScarletEnclave/zone_the_scarlet_enclave.cpp | 1 + .../SunwellPlateau/boss_brutallus.cpp | 1 + .../SunwellPlateau/boss_kiljaeden.cpp | 4 ++++ .../BattleForMountHyjal/hyjalAI.cpp | 8 ++++++++ .../EscapeFromDurnholdeKeep/old_hillsbrad.cpp | 1 + .../Kalimdor/OnyxiasLair/boss_onyxia.cpp | 1 + .../Kalimdor/WailingCaverns/wailing_caverns.cpp | 1 + .../instance_obsidian_sanctum.cpp | 3 +++ .../RubySanctum/boss_baltharus_the_warborn.cpp | 1 + .../RubySanctum/boss_halion.cpp | 1 + .../RubySanctum/ruby_sanctum.cpp | 2 ++ .../IcecrownCitadel/boss_sindragosa.cpp | 7 +++++++ .../IcecrownCitadel/boss_the_lich_king.cpp | 2 ++ .../IcecrownCitadel/icecrown_citadel.cpp | 14 ++++++++++++++ .../instance_icecrown_citadel.cpp | 5 +++-- .../Northrend/Naxxramas/boss_four_horsemen.cpp | 1 + .../scripts/Northrend/Naxxramas/boss_noth.cpp | 1 + .../Northrend/Naxxramas/boss_thaddius.cpp | 17 +++++++++++++++++ .../Ulduar/Ulduar/boss_algalon_the_observer.cpp | 1 + .../Northrend/Ulduar/Ulduar/boss_thorim.cpp | 1 + .../UtgardeKeep/UtgardePinnacle/boss_skadi.cpp | 1 + .../SerpentShrine/instance_serpent_shrine.cpp | 4 ++++ 29 files changed, 97 insertions(+), 6 deletions(-) diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index a703c70d30..c93b72804d 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -787,6 +787,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, Position const& pos) // Set creature in world map->AddToMap(creature); creature->setActive(true); + creature->SetFarVisible(true); return creature; } @@ -812,6 +813,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, Position const& pos, G3D: // Add to world map->AddToMap(go); go->setActive(true); + go->SetFarVisible(true); return go; } diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 59e17e4a4a..cd10148bbb 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1193,8 +1193,8 @@ void MovementInfo::OutDebug() } WorldObject::WorldObject(bool isWorldObject) : WorldLocation(), LastUsedScriptID(0), -m_name(""), m_isActive(false), m_isWorldObject(isWorldObject), m_zoneScript(NULL), -m_transport(NULL), m_zoneId(0), m_areaId(0), m_staticFloorZ(VMAP_INVALID_HEIGHT), m_currMap(NULL), m_InstanceId(0), +m_name(""), m_isActive(false), m_isFarVisible(false), m_isWorldObject(isWorldObject), m_zoneScript(nullptr), +m_transport(nullptr), m_zoneId(0), m_areaId(0), m_staticFloorZ(VMAP_INVALID_HEIGHT), m_currMap(nullptr), m_InstanceId(0), m_phaseMask(PHASEMASK_NORMAL), _dbPhase(0), m_notifyflags(0), m_executed_notifies(0), m_aiAnimKitId(0), m_movementAnimKitId(0), m_meleeAnimKitId(0) { @@ -1254,6 +1254,14 @@ void WorldObject::setActive(bool on) } } +void WorldObject::SetFarVisible(bool on) +{ + if (GetTypeId() == TYPEID_PLAYER) + return; + + m_isFarVisible = on; +} + void WorldObject::CleanupsBeforeDelete(bool /*finalCleanup*/) { if (IsInWorld()) @@ -1704,7 +1712,7 @@ float WorldObject::GetGridActivationRange() const float WorldObject::GetVisibilityRange() const { - if (isActiveObject() && !ToPlayer()) + if (IsFarVisible() && !ToPlayer()) return MAX_VISIBILITY_DISTANCE; else return GetMap()->GetVisibilityRange(); @@ -1716,7 +1724,7 @@ float WorldObject::GetSightRange(const WorldObject* target) const { if (ToPlayer()) { - if (target && target->isActiveObject() && !target->ToPlayer()) + if (target && target->IsFarVisible() && !target->ToPlayer()) return MAX_VISIBILITY_DISTANCE; else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic()) return DEFAULT_VISIBILITY_INSTANCE; diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index 142e2689b8..27788e2330 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -632,6 +632,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation bool isActiveObject() const { return m_isActive; } void setActive(bool isActiveObject); + bool IsFarVisible() const { return m_isFarVisible; } + void SetFarVisible(bool on); void SetWorldObject(bool apply); bool IsPermanentWorldObject() const { return m_isWorldObject; } bool IsWorldObject() const; @@ -668,6 +670,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation protected: std::string m_name; bool m_isActive; + bool m_isFarVisible; const bool m_isWorldObject; ZoneScript* m_zoneScript; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index fd6704bcdc..a622583e54 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -348,6 +348,7 @@ public: if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianLoc[0])) { nefarian->setActive(true); + nefarian->SetFarVisible(true); nefarian->SetCanFly(true); nefarian->SetDisableGravity(true); nefarian->CastSpell((Unit*)NULL, SPELL_SHADOWFLAME_INITIAL); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 4496e017f8..0ed7e25f6d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -252,6 +252,7 @@ public: { nefarius->SetPhaseMask(1, true); nefarius->setActive(true); + nefarius->SetFarVisible(true); nefarius->Respawn(); nefarius->GetMotionMaster()->MoveTargetedHome(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 30f5e6d011..6289fb2bfb 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -153,6 +153,7 @@ public: Talk(EMOTE_SUMMON); events.SetPhase(PHASE_INTRO); me->setActive(true); + me->SetFarVisible(true); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->GetMotionMaster()->MoveAlongSplineChain(POINT_INTRO_START, SPLINE_CHAIN_INTRO_START, false); HandleTerraceDoors(false); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 86a7f5a548..f6ddb2c1f7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -558,6 +558,7 @@ public: { arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f); arca->setActive(true); + arca->SetFarVisible(true); arca->InterruptNonMeleeSpells(true); arca->SetSpeedRate(MOVE_FLIGHT, 2.0f); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index bed8c4b25c..bdad7f9a17 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -67,6 +67,7 @@ public: void Reset() override { me->setActive(true); + me->SetFarVisible(true); me->SetVisible(false); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetCanFly(true); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 6bd77a8101..eabb1d1c32 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -151,6 +151,7 @@ public: { Madrigosa->Respawn(); Madrigosa->setActive(true); + Madrigosa->SetFarVisible(true); IsIntro = true; Madrigosa->SetMaxHealth(me->GetMaxHealth()); Madrigosa->SetHealth(me->GetMaxHealth()); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 1cebe7c96d..935a85b7a4 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -260,6 +260,7 @@ public: me->SetDisableGravity(true); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->setActive(true); + me->SetFarVisible(true); for (uint8 i = 0; i < 4; ++i) if (GameObject* pOrb = GetOrb(i)) @@ -307,6 +308,7 @@ public: pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES); pOrb->SetFaction(FACTION_FRIENDLY); pOrb->setActive(true); + pOrb->SetFarVisible(true); pOrb->Refresh(); } } @@ -319,6 +321,7 @@ public: pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES); pOrb->SetFaction(FACTION_FRIENDLY); pOrb->setActive(true); + pOrb->SetFarVisible(true); pOrb->Refresh(); OrbsEmpowered = (OrbsEmpowered+1)%4; @@ -350,6 +353,7 @@ public: { pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES); pOrb->setActive(true); + pOrb->SetFarVisible(true); pOrb->Refresh(); } } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp index 82e652f526..71a733d2f1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp @@ -383,6 +383,7 @@ void hyjalAI::SummonedCreatureDespawn(Creature* summoned) void hyjalAI::Reset() { me->setActive(true); + me->SetFarVisible(true); Initialize(); @@ -503,6 +504,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3]) creature->SetWalk(false); creature->setActive(true); + creature->SetFarVisible(true); switch (entry) { case NECROMANCER: @@ -1027,6 +1029,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 3; ++i)//summon 3 abominations @@ -1039,6 +1042,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 5; ++i)//summon 5 gargoyles @@ -1051,6 +1055,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } break; @@ -1068,6 +1073,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 25; ++i)//summon 25 ghouls @@ -1080,6 +1086,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } for (uint8 i = 0; i < 5; ++i)//summon 5 abominations @@ -1092,6 +1099,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff) ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true; ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i; unit->setActive(true); + unit->SetFarVisible(true); } } break; diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp index b250721e37..dadf3d5524 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp @@ -209,6 +209,7 @@ public: instance = creature->GetInstanceScript(); HadMount = false; me->setActive(true); + me->SetFarVisible(true); } void Initialize() diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index 4f0b6ed852..4d89d8f94b 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -182,6 +182,7 @@ public: break; case NPC_LAIRGUARD: summoned->setActive(true); + summoned->SetFarVisible(true); break; } summons.Summon(summoned); diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp index 230f4ee0a0..8427061b6c 100644 --- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp +++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp @@ -82,6 +82,7 @@ public: currentEvent = 0; eventProgress = 0; me->setActive(true); + me->SetFarVisible(true); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp index 67063e471a..f4e926bf3d 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/instance_obsidian_sanctum.cpp @@ -54,14 +54,17 @@ public: case NPC_TENEBRON: tenebronGUID = creature->GetGUID(); creature->setActive(true); + creature->SetFarVisible(true); break; case NPC_SHADRON: shadronGUID = creature->GetGUID(); creature->setActive(true); + creature->SetFarVisible(true); break; case NPC_VESPERON: vesperonGUID = creature->GetGUID(); creature->setActive(true); + creature->SetFarVisible(true); break; } } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp index 0c6fe7ba38..30a6eb7bd4 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_baltharus_the_warborn.cpp @@ -90,6 +90,7 @@ class boss_baltharus_the_warborn : public CreatureScript { case ACTION_INTRO_BALTHARUS: me->setActive(true); + me->SetFarVisible(true); events.ScheduleEvent(EVENT_INTRO_TALK, Seconds(7), 0, PHASE_INTRO); break; case ACTION_CLONE: diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index d8e00e49ac..a20c1bd55a 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -1083,6 +1083,7 @@ class npc_meteor_strike : public CreatureScript { DoCastSelf(SPELL_METEOR_STRIKE_FIRE_AURA_2, true); me->setActive(true); + me->SetFarVisible(true); _events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, Milliseconds(500)); } } diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp index df89c790d5..73ce04363e 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/ruby_sanctum.cpp @@ -77,6 +77,7 @@ class npc_xerestrasza : public CreatureScript if (action == ACTION_BALTHARUS_DEATH) { me->setActive(true); + me->SetFarVisible(true); _isIntro = false; Talk(SAY_XERESTRASZA_EVENT); @@ -131,6 +132,7 @@ class npc_xerestrasza : public CreatureScript me->SetFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER); Talk(SAY_XERESTRASZA_EVENT_7); me->setActive(false); + me->SetFarVisible(true); break; default: break; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 47178a4007..e97f447c7e 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -276,6 +276,7 @@ class boss_sindragosa : public CreatureScript instance->SetBossState(DATA_SINDRAGOSA, IN_PROGRESS); me->SetCombatPulseDelay(5); me->setActive(true); + me->SetFarVisible(true); DoZoneInCombat(); } @@ -313,6 +314,7 @@ class boss_sindragosa : public CreatureScript return; me->setActive(true); + me->SetFarVisible(true); me->SetCanFly(true); me->SetDisableGravity(true); me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); @@ -347,6 +349,7 @@ class boss_sindragosa : public CreatureScript { case POINT_FROSTWYRM_LAND: me->setActive(false); + me->SetFarVisible(true); me->SetCanFly(false); me->SetDisableGravity(false); me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); @@ -701,6 +704,7 @@ class npc_spinestalker : public CreatureScript return; me->setActive(true); + me->SetFarVisible(true); me->SetSpeedRate(MOVE_FLIGHT, 2.0f); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); float moveTime = me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f); @@ -719,6 +723,7 @@ class npc_spinestalker : public CreatureScript return; me->setActive(false); + me->SetFarVisible(true); me->SetCanFly(false); me->SetDisableGravity(false); me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); @@ -838,6 +843,7 @@ class npc_rimefang : public CreatureScript return; me->setActive(true); + me->SetFarVisible(true); me->SetSpeedRate(MOVE_FLIGHT, 2.0f); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f); @@ -856,6 +862,7 @@ class npc_rimefang : public CreatureScript return; me->setActive(false); + me->SetFarVisible(true); me->SetCanFly(false); me->SetDisableGravity(false); me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 3b770c46f5..f6e6967b41 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -1053,6 +1053,7 @@ class boss_the_lich_king : public CreatureScript triggers.sort(Trinity::ObjectDistanceOrderPred(terenas, true)); Creature* spawner = triggers.front(); spawner->setActive(true); + spawner->SetFarVisible(true); spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_1, true); // summons bombs randomly spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_2, true); // summons bombs on players spawner->m_Events.AddEvent(new TriggerWickedSpirit(spawner), spawner->m_Events.CalculateTime(3000)); @@ -1739,6 +1740,7 @@ class npc_terenas_menethil : public CreatureScript { case ACTION_FROSTMOURNE_INTRO: me->setActive(true); + me->SetFarVisible(false); if (!IsHeroic()) me->SetHealth(me->GetMaxHealth() / 2); DoCast(me, SPELL_LIGHTS_FAVOR); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index 113ec50a14..35b8aa0ad5 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -418,12 +418,16 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript if (Creature* factionNPC = me->FindNearestCreature(_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? NPC_SE_HIGH_OVERLORD_SAURFANG : NPC_SE_MURADIN_BRONZEBEARD, 50.0f)) { me->setActive(true); + me->SetFarVisible(true); _theLichKing = theLichKing->GetGUID(); theLichKing->setActive(true); + theLichKing->SetFarVisible(true); _bolvarFordragon = bolvarFordragon->GetGUID(); bolvarFordragon->setActive(true); + bolvarFordragon->SetFarVisible(true); _factionNPC = factionNPC->GetGUID(); factionNPC->setActive(true); + factionNPC->SetFarVisible(true); } } } @@ -515,6 +519,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript { bolvarFordragon->AI()->Talk(SAY_BOLVAR_INTRO_1); bolvarFordragon->setActive(false); + bolvarFordragon->SetFarVisible(false); } break; case EVENT_LK_INTRO_5: @@ -522,6 +527,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript { theLichKing->AI()->Talk(SAY_LK_INTRO_5); theLichKing->setActive(false); + theLichKing->SetFarVisible(false); } break; case EVENT_SAURFANG_INTRO_1: @@ -835,6 +841,7 @@ class boss_sister_svalna : public CreatureScript break; case ACTION_START_GAUNTLET: me->setActive(true); + me->SetFarVisible(true); _isEventInProgress = true; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); events.ScheduleEvent(EVENT_SVALNA_START, 25000); @@ -847,6 +854,7 @@ class boss_sister_svalna : public CreatureScript break; case ACTION_RESET_EVENT: me->setActive(false); + me->SetFarVisible(false); Reset(); break; default: @@ -870,6 +878,7 @@ class boss_sister_svalna : public CreatureScript _isEventInProgress = false; me->setActive(false); + me->SetFarVisible(false); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC); me->SetDisableGravity(false); me->SetHover(false); @@ -1001,6 +1010,7 @@ class npc_crok_scourgebane : public CreatureScript _events.ScheduleEvent(EVENT_CROK_INTRO_3, 14000); _events.ScheduleEvent(EVENT_START_PATHING, 37000); me->setActive(true); + me->SetFarVisible(true); for (uint32 i = 0; i < 4; ++i) if (Creature* crusader = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_CAPTAIN_ARNATH + i))) crusader->AI()->DoAction(ACTION_START_GAUNTLET); @@ -1010,6 +1020,7 @@ class npc_crok_scourgebane : public CreatureScript _isEventActive = false; _isEventDone = _instance->GetBossState(DATA_SISTER_SVALNA) == DONE; me->setActive(false); + me->SetFarVisible(false); _aliveTrash.clear(); _currentWPid = 0; } @@ -1027,6 +1038,7 @@ class npc_crok_scourgebane : public CreatureScript { _isEventActive = false; me->setActive(false); + me->SetFarVisible(false); Talk(SAY_CROK_FINAL_WP); if (Creature* svalna = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SISTER_SVALNA))) svalna->AI()->DoAction(ACTION_RESURRECT_CAPTAINS); @@ -1056,6 +1068,7 @@ class npc_crok_scourgebane : public CreatureScript { _isEventActive = false; me->setActive(false); + me->SetFarVisible(false); Talk(SAY_CROK_FINAL_WP); if (Creature* svalna = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SISTER_SVALNA))) svalna->AI()->DoAction(ACTION_RESURRECT_CAPTAINS); @@ -1280,6 +1293,7 @@ struct npc_argent_captainAI : public ScriptedAI } me->setActive(true); + me->SetFarVisible(true); } else if (action == ACTION_RESET_EVENT) { diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp index 004ec13e8d..919a4ad4d2 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp @@ -990,9 +990,10 @@ class instance_icecrown_citadel : public InstanceMapScript // set the platform as active object to dramatically increase visibility range // note: "active" gameobjects do not block grid unloading if (GameObject* precipice = instance->GetGameObject(ArthasPrecipiceGUID)) - precipice->setActive(state == IN_PROGRESS); + precipice->SetFarVisible(state == IN_PROGRESS); + if (GameObject* platform = instance->GetGameObject(ArthasPlatformGUID)) - platform->setActive(state == IN_PROGRESS); + platform->SetFarVisible(state == IN_PROGRESS); if (instance->IsHeroic()) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp index 4e3ec1bd14..89d0542eaf 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_four_horsemen.cpp @@ -226,6 +226,7 @@ struct boss_four_horsemen_baseAI : public BossAI cBoss->SetReactState(REACT_PASSIVE); cBoss->AttackStop(); // clear initial target that was set on enter combat cBoss->setActive(true); + cBoss->SetFarVisible(true); for (Map::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it) { diff --git a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp index 09904dd9bb..2dd4cf5450 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_noth.cpp @@ -163,6 +163,7 @@ public: { summons.Summon(summon); summon->setActive(true); + summon->SetFarVisible(true); summon->AI()->DoZoneInCombat(nullptr, 250.0f); // specify range to cover entire room - default 50yd is not enough } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index 77d47b892d..dc50bf69b0 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -221,10 +221,17 @@ public: { _JustDied(); me->setActive(false); + me->SetFarVisible(false); if (Creature* stalagg = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_STALAGG))) + { stalagg->setActive(false); + stalagg->SetFarVisible(false); + } if (Creature* feugen = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FEUGEN))) + { feugen->setActive(false); + feugen->SetFarVisible(false); + } Talk(SAY_DEATH); } @@ -262,11 +269,18 @@ public: instance->SetBossState(BOSS_THADDIUS, IN_PROGRESS); me->setActive(true); + me->SetFarVisible(true); DoZoneInCombat(); if (Creature* stalagg = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_STALAGG))) + { stalagg->setActive(true); + stalagg->SetFarVisible(true); + } if (Creature* feugen = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FEUGEN))) + { feugen->setActive(true); + feugen->SetFarVisible(true); + } break; case ACTION_FEUGEN_DIED: if (Creature* feugen = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FEUGEN))) @@ -335,6 +349,7 @@ public: stalagg->AI()->DoAction(ACTION_BEGIN_RESET_ENCOUNTER); me->setActive(false); + me->SetFarVisible(false); } void ResetEncounter() @@ -525,6 +540,7 @@ public: coil->SetGoState(GO_STATE_READY); me->DespawnOrUnsummon(); me->setActive(false); + me->SetFarVisible(false); } void ResetEncounter() @@ -794,6 +810,7 @@ public: coil->SetGoState(GO_STATE_READY); me->DespawnOrUnsummon(); me->setActive(false); + me->SetFarVisible(false); } void ResetEncounter() diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp index 9c99c9a176..2d395eab00 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp @@ -407,6 +407,7 @@ class boss_algalon_the_observer : public CreatureScript brann->AI()->DoAction(ACTION_FINISH_INTRO); me->setActive(true); + me->SetFarVisible(true); DoZoneInCombat(); introDelay = 26000; summons.DespawnEntry(NPC_AZEROTH); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index 429bcdb6c0..ca07a8b117 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -1131,6 +1131,7 @@ class npc_thorim_pre_phase : public CreatureScript npc_thorim_pre_phaseAI(Creature* creature) : npc_thorim_trashAI(creature) { me->setActive(true); // prevent grid unload + me->SetFarVisible(true); } void Reset() override diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 578637611e..9af1b2044b 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -361,6 +361,7 @@ public: init.Launch(); me->setActive(true); + me->SetFarVisible(true); me->SetCanFly(true); me->SetDisableGravity(true); me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 408b6b422a..71810ff2a5 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -191,18 +191,22 @@ class instance_serpent_shrine : public InstanceMapScript case 184568: ControlConsole = go->GetGUID(); go->setActive(true); + go->SetFarVisible(true); break; case 184203: BridgePart[0] = go->GetGUID(); go->setActive(true); + go->SetFarVisible(true); break; case 184204: BridgePart[1] = go->GetGUID(); go->setActive(true); + go->SetFarVisible(true); break; case 184205: BridgePart[2] = go->GetGUID(); go->setActive(true); + go->SetFarVisible(true); break; default: break; From c238fd1017d03ae44a053d2403a4ad3693f407d3 Mon Sep 17 00:00:00 2001 From: Cannix Date: Sat, 17 Feb 2018 16:46:26 +0100 Subject: [PATCH 085/101] Core/Spells: Execute item casts immediately instead (#21396) --- src/server/game/Spells/Spell.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 10e3772da7..34b5b1a0f7 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3115,12 +3115,11 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered if (!(_triggeredCastFlags & TRIGGERED_IGNORE_GCD)) TriggerGlobalCooldown(); - //item: first cast may destroy item and second cast causes crash // commented out !m_spellInfo->StartRecoveryTime, it forces instant spells with global cooldown to be processed in spell::update // as a result a spell that passed CheckCast and should be processed instantly may suffer from this delayed process // the easiest bug to observe is LoS check in AddUnitTarget, even if spell passed the CheckCast LoS check the situation can change in spell::update // because target could be relocated in the meantime, making the spell fly to the air (no targets can be registered, so no effects processed, nothing in combat log) - if (!m_casttime && /*!m_spellInfo->StartRecoveryTime && */!m_castItemGUID && GetCurrentContainer() == CURRENT_GENERIC_SPELL) + if (!m_casttime && /*!m_spellInfo->StartRecoveryTime && */ GetCurrentContainer() == CURRENT_GENERIC_SPELL) cast(true); } } From 28a4f1e099d19f13968b9066fd8be7e9beeb09e9 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 17 Feb 2018 17:48:21 +0100 Subject: [PATCH 086/101] rename file --- .../2018_02_17_00_world_from_335_was_2018_02_16_02_world.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/updates/world/{3.3.5/2018_02_16_02_world.sql => 4.3.4/2018_02_17_00_world_from_335_was_2018_02_16_02_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_02_16_02_world.sql b/sql/updates/world/4.3.4/2018_02_17_00_world_from_335_was_2018_02_16_02_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_16_02_world.sql rename to sql/updates/world/4.3.4/2018_02_17_00_world_from_335_was_2018_02_16_02_world.sql From c20af5267c509eea387fa606d75682513983bd77 Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Sat, 17 Feb 2018 21:06:01 +0100 Subject: [PATCH 087/101] DB/Loot: Reference template 24068 corrections Closes #21416 --- .../world/3.3.5/2018_02_17_00_world_335.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_17_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_00_world_335.sql b/sql/updates/world/3.3.5/2018_02_17_00_world_335.sql new file mode 100644 index 0000000000..4bb884d99b --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_00_world_335.sql @@ -0,0 +1,14 @@ +-- +-- Remove unique items from reference table 24068 +DELETE FROM `reference_loot_template` WHERE `Entry`=24068 AND `Item` IN (897, 1351, 2015, 2017, 3053, 3336, 4723); +-- Add former items from reference table 24068 to their proper NPCs +DELETE FROM `creature_loot_template` WHERE `Item` IN (897, 1351, 2015, 2017, 3053, 3336, 4723); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES +(206, 897, 0.1, 0, "Nightbane Vile Fang - Madwolf Bracers"), +(3808, 1351, 0.1, 0, "Forsaken Dark Stalker - Fingerbone Bracers"), +(570, 2015, 1, 0, "Brain Eater - Black Metal War Axe"), +(785, 2017, 1, 0, "Skeletal Warder - Glowing Leather Bracers"), +(2344, 3053, 2.5, 0, "Dun Garok Mountaineer - Humbert's Chestpiece"), +(2368, 3336, 0.1, 0, "Daggerspine Shorestalker - Flesh Piercer"), +(2370, 3336, 0.1, 0, "Daggerspine Screamer - Flesh Piercer"), +(2346, 4723, 2.5, 0, "Dun Garok Priest - Humbert's Pants"); From 0e9a0decafa89241d921d2c9bd9a08d1b530d453 Mon Sep 17 00:00:00 2001 From: Teppic1 Date: Sat, 17 Feb 2018 21:13:23 +0100 Subject: [PATCH 088/101] DB/Loot: Reference template 24066 corrections Closes #21409 --- .../world/3.3.5/2018_02_17_01_world_335.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_17_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_01_world_335.sql b/sql/updates/world/3.3.5/2018_02_17_01_world_335.sql new file mode 100644 index 0000000000..97fc90e52b --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_01_world_335.sql @@ -0,0 +1,15 @@ +-- +-- Remove unique items from reference table 24066 +DELETE FROM `reference_loot_template` WHERE `Entry`=24066 AND `Item` IN (886, 1077, 2013, 2227, 2233, 2566, 3204, 3569, 6315); +-- Add former items from reference table 24066 to their proper NPCs +DELETE FROM `creature_loot_template` WHERE `Item` IN (886, 1077, 2013, 2227, 2233, 2566, 3204, 3569, 6315); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Comment`) VALUES +(210, 886, 0.1, 0, "Bone Chewer - Black Metal Shortsword"), +(910, 1077, 0.1, 0, "Defias Enchanter - Defias Mage Ring"), +(787, 2013, 0.1, 0, "Skeletal Healer - Cryptbone Staff"), +(892, 2227, 0.1, 0, "Splinter Fist Taskmaster - Heavy Ogre War Axe"), +(533, 2233, 0.1, 0, "Nightbane Shadow Weaver - Shadow Weaver Leggings"), +(397, 2566, 1.5, 0, "Morganth - Sacrificial Robes"), +(2372, 3204, 0.1, 0, "Mudsnout Gnoll - Deepwood Bracers"), +(4517, 3569, 1.5, 0, "Death's Head Priest - Vicar's Robe"), +(6523, 6315, 0.1, 0, "Dark Iron Rifleman - Steelarrow Crossbow"); From 3adfc66859c8a5bb013cf2c027c49457c4146f3a Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 18 Feb 2018 17:58:58 +0100 Subject: [PATCH 089/101] Core/Scripts: implement Drain Mana breaking some auras on hit --- .../world/3.3.5/2018_02_17_02_world_335.sql | 4 +++ src/server/scripts/Spells/spell_generic.cpp | 19 ++++++++++++ src/server/scripts/Spells/spell_priest.cpp | 29 ------------------- 3 files changed, 23 insertions(+), 29 deletions(-) create mode 100644 sql/updates/world/3.3.5/2018_02_17_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_02_world_335.sql b/sql/updates/world/3.3.5/2018_02_17_02_world_335.sql new file mode 100644 index 0000000000..5ff208273e --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_02_world_335.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_pri_mana_burn','spell_gen_clear_fear_poly'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(5138, 'spell_gen_clear_fear_poly'), +(8129, 'spell_gen_clear_fear_poly'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 6de9a63ba3..0189d95339 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -922,6 +922,24 @@ enum Clone SPELL_NIGHTMARE_FIGMENT_MIRROR_IMAGE = 57528 }; +// 5138 - Drain Mana +// 8129 - Mana Burn +class spell_gen_clear_fear_poly : public SpellScript +{ + PrepareSpellScript(spell_gen_clear_fear_poly); + + void HandleAfterHit() + { + if (Unit* unitTarget = GetHitUnit()) + unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH)); + } + + void Register() override + { + AfterHit += SpellHitFn(spell_gen_clear_fear_poly::HandleAfterHit); + } +}; + class spell_gen_clone : public SpellScriptLoader { public: @@ -4380,6 +4398,7 @@ void AddSC_generic_spell_scripts() new spell_gen_burning_depths_necrolyte_image(); new spell_gen_cannibalize(); new spell_gen_chaos_blast(); + RegisterSpellScript(spell_gen_clear_fear_poly); new spell_gen_clone(); new spell_gen_clone_weapon(); new spell_gen_clone_weapon_aura(); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 6b44155e25..0a5b3277d5 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -628,34 +628,6 @@ class spell_pri_lightwell_renew : public SpellScriptLoader } }; -// 8129 - Mana Burn -class spell_pri_mana_burn : public SpellScriptLoader -{ - public: - spell_pri_mana_burn() : SpellScriptLoader("spell_pri_mana_burn") { } - - class spell_pri_mana_burn_SpellScript : public SpellScript - { - PrepareSpellScript(spell_pri_mana_burn_SpellScript); - - void HandleAfterHit() - { - if (Unit* unitTarget = GetHitUnit()) - unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH)); - } - - void Register() override - { - AfterHit += SpellHitFn(spell_pri_mana_burn_SpellScript::HandleAfterHit); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_pri_mana_burn_SpellScript; - } -}; - // 28305 - Mana Leech (Passive) (Priest Pet Aura) class spell_pri_mana_leech : public SpellScriptLoader { @@ -1303,7 +1275,6 @@ void AddSC_priest_spell_scripts() new spell_pri_guardian_spirit(); new spell_pri_leap_of_faith_effect_trigger(); new spell_pri_lightwell_renew(); - new spell_pri_mana_burn(); new spell_pri_mana_leech(); new spell_pri_mind_sear(); new spell_pri_pain_and_suffering_proc(); From e219b3f94084d20de667ade024df2e950f1fb2ea Mon Sep 17 00:00:00 2001 From: ariel- Date: Sat, 17 Feb 2018 17:50:05 -0300 Subject: [PATCH 090/101] Core/Auras: fixed Drain Mana breaking early if caster has Mana Feed talent but no active pet --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index ee69d861ae..1757ee95a2 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -5969,14 +5969,13 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con target->AddThreat(caster, float(gainedAmount) * 0.5f, GetSpellInfo()->GetSchoolMask(), GetSpellInfo()); } - // Drain Mana - if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK - && m_spellInfo->SpellFamilyFlags[0] & 0x00000010) + // Drain Mana - Mana Feed effect + if (caster->GetGuardianPet() && m_spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags[0] & 0x00000010) { int32 manaFeedVal = 0; - if (AuraEffect const* aurEff = GetBase()->GetEffect(1)) + if (AuraEffect const* aurEff = GetBase()->GetEffect(EFFECT_1)) manaFeedVal = aurEff->GetAmount(); - // Mana Feed - Drain Mana + if (manaFeedVal > 0) { int32 feedAmount = CalculatePct(gainedAmount, manaFeedVal); From 12756609feb3d104a14ce6b95fafe3692621f78c Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 17 Feb 2018 22:08:01 +0100 Subject: [PATCH 091/101] DB/SAI: Fix text target related to Battle at Valhalas quests --- sql/updates/world/3.3.5/2018_02_17_03_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_17_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_03_world.sql b/sql/updates/world/3.3.5/2018_02_17_03_world.sql new file mode 100644 index 0000000000..e06a081832 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_03_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN (31135,3113500,3113501,3113502,3113503,3113504,3113505,3113506) AND `source_type` IN (0,9) AND `target_type`=7; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (31135) AND `source_type`=0 AND `id`=42; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(31135, 0, 42, 0, 19, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Geirrvif - On quest taken - Store target"); From d22969c42230729b18b60ba54ce6d9f293a97e6a Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 17 Feb 2018 22:26:22 +0100 Subject: [PATCH 092/101] DB/SAI: Fix text target related to The Ring of Blood quests --- sql/updates/world/3.3.5/2018_02_17_04_world.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_17_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_04_world.sql b/sql/updates/world/3.3.5/2018_02_17_04_world.sql new file mode 100644 index 0000000000..bd8643534e --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_04_world.sql @@ -0,0 +1,6 @@ +-- +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN (18471) AND `source_type` IN (0) AND `target_type`=7 AND `action_type`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18471) AND `source_type`=0 AND `id`=28; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(18471, 0, 28, 0, 19, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Gurgthock - On quest taken - Store target"); + From 3cd5030e3ef06f6a5b66e0598c00408e9252cc6d Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 17 Feb 2018 22:33:38 +0100 Subject: [PATCH 093/101] DB/SAI: Fix text target related to The Amphitheater of Anguish quests --- sql/updates/world/3.3.5/2018_02_17_05_world.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_17_05_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_05_world.sql b/sql/updates/world/3.3.5/2018_02_17_05_world.sql new file mode 100644 index 0000000000..bcf0b3fc68 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_05_world.sql @@ -0,0 +1,5 @@ +-- +UPDATE `smart_scripts` SET `target_type`=12, `target_param1`=1 WHERE `entryorguid` IN (30007) AND `source_type` IN (0) AND `target_type`=7 AND `action_type`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (30007) AND `source_type`=0 AND `id`=20; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(30007, 0, 20, 0, 19, 0, 100, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Gurgthock - On quest taken - Store target"); From 263617f81fb2e05c2e9bec05f739ee37ee524a94 Mon Sep 17 00:00:00 2001 From: sirikfoll Date: Sat, 17 Feb 2018 20:11:37 -0200 Subject: [PATCH 094/101] Scripts/Icecrown Citadel: Prevent Lady Deathwhisper movement during first phase. --- .../IcecrownCitadel/boss_lady_deathwhisper.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp index a0dfbf3c47..b2a058469c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp @@ -286,10 +286,10 @@ class boss_lady_deathwhisper : public CreatureScript return; } + _phase = PHASE_ONE; me->SetCombatPulseDelay(5); me->setActive(true); DoZoneInCombat(); - _phase = PHASE_ONE; scheduler.CancelGroup(GROUP_INTRO); // phase-independent events scheduler @@ -363,10 +363,10 @@ class boss_lady_deathwhisper : public CreatureScript darnavan->SetReactState(REACT_PASSIVE); darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10000)); darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED); - + if (!killer) return; - + if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) { if (Group* group = owner->GetGroup()) @@ -887,10 +887,10 @@ class npc_darnavan : public CreatureScript void JustDied(Unit* killer) override { _events.Reset(); - + if (!killer) return; - + if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself()) { if (Group* group = owner->GetGroup()) From c4342a775689c73d85a8d59df1c2885936fe0a61 Mon Sep 17 00:00:00 2001 From: Killyana Date: Sat, 17 Feb 2018 23:23:21 +0100 Subject: [PATCH 095/101] DB/SAI: Fix text target related to Sasha quests --- sql/updates/world/3.3.5/2018_02_17_06_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_02_17_06_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_06_world.sql b/sql/updates/world/3.3.5/2018_02_17_06_world.sql new file mode 100644 index 0000000000..34de419964 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_02_17_06_world.sql @@ -0,0 +1,2 @@ +-- +UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid` IN (26935,2693501,2693500) AND `source_type` IN (0,9) AND `target_type`=7 AND `action_type`=1; From 4a7089b10a4f2dec2445933583ece93ad82cc2de Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 17 Feb 2018 23:26:50 +0100 Subject: [PATCH 096/101] Core/Misc: ASSERT() cleanup Move some functions calls out of ASSERT() calls. ASSERT() should only apply checks without modifying any object and without having any side effect. --- src/server/game/DataStores/DBCStores.cpp | 6 ++++-- src/server/game/Entities/Vehicle/Vehicle.cpp | 5 ++++- src/server/game/Groups/Group.cpp | 3 ++- src/server/game/Tools/PlayerDump.cpp | 9 ++++++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index e71768912f..240dc156ed 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -524,7 +524,8 @@ void LoadDBCStores(const std::string& dataPath) ASSERT(namesProfanity->Language < TOTAL_LOCALES || namesProfanity->Language == -1); std::wstring wname; - ASSERT(Utf8toWStr(namesProfanity->Name, wname)); + bool conversionResult = Utf8toWStr(namesProfanity->Name, wname); + ASSERT(conversionResult); if (namesProfanity->Language != -1) NamesProfaneValidators[namesProfanity->Language].emplace_back(wname, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize); @@ -541,7 +542,8 @@ void LoadDBCStores(const std::string& dataPath) ASSERT(namesReserved->Language < TOTAL_LOCALES || namesReserved->Language == -1); std::wstring wname; - ASSERT(Utf8toWStr(namesReserved->Name, wname)); + bool conversionResult = Utf8toWStr(namesReserved->Name, wname); + ASSERT(conversionResult); if (namesReserved->Language != -1) NamesReservedValidators[namesReserved->Language].emplace_back(wname, Trinity::regex::perl | Trinity::regex::icase | Trinity::regex::optimize); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index e39aef40ce..0fd8ec92ed 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -862,7 +862,10 @@ bool VehicleJoinEvent::Execute(uint64, uint32) if (Target->GetBase()->GetTypeId() == TYPEID_UNIT && Passenger->GetTypeId() == TYPEID_PLAYER && Seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) - ASSERT(Target->GetBase()->SetCharmedBy(Passenger, CHARM_TYPE_VEHICLE)); // SMSG_CLIENT_CONTROL + { + bool charmedByResult = Target->GetBase()->SetCharmedBy(Passenger, CHARM_TYPE_VEHICLE); // SMSG_CLIENT_CONTROL + ASSERT(charmedByResult); + } Passenger->SendClearTarget(); // SMSG_BREAK_TARGET Passenger->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index d3a7d21687..11e32cd749 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -152,7 +152,8 @@ bool Group::Create(Player* leader) Group::ConvertLeaderInstancesToGroup(leader, this, false); - ASSERT(AddMember(leader)); // If the leader can't be added to a new group because it appears full, something is clearly wrong. + bool addMemberResult = AddMember(leader); + ASSERT(addMemberResult); // If the leader can't be added to a new group because it appears full, something is clearly wrong. } else if (!AddMember(leader)) return false; diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index af05314e4d..1057f8fec1 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -169,10 +169,12 @@ std::vector CharacterTables; inline bool StringsEqualCaseInsensitive(std::string const& left, std::string const& right) { std::string upperLeftString = left; - ASSERT(Utf8ToUpperOnlyLatin(upperLeftString)); + bool leftResult = Utf8ToUpperOnlyLatin(upperLeftString); + ASSERT(leftResult); std::string upperRightString = right; - ASSERT(Utf8ToUpperOnlyLatin(upperRightString)); + bool rightResult = Utf8ToUpperOnlyLatin(upperRightString); + ASSERT(rightResult); return upperLeftString == upperRightString; } @@ -271,7 +273,8 @@ void PlayerDump::InitializeTables() TableField f; f.FieldName = columnName; - ASSERT(Utf8ToUpperOnlyLatin(columnName)); + bool toUpperResult = Utf8ToUpperOnlyLatin(columnName); + ASSERT(toUpperResult); t.TableFields.emplace_back(std::move(f)); } while (result->NextRow()); From bb70a60ba710e687cc6b3e03c08700de3b1069b1 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sat, 17 Feb 2018 23:29:34 +0100 Subject: [PATCH 097/101] Core/Misc: Add PERFORMANCE_PROFILING CMake option Add a new CMake option called PERFORMANCE_PROFILING that should be used only when profiling the performance. This option is unsupported, do not report any issue happening when enabling this option. --- cmake/showoptions.cmake | 7 +++++++ src/common/Debugging/Errors.h | 5 +++++ src/common/Logging/Log.h | 6 ++++-- src/common/Metric/Metric.h | 5 ++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index f87c51e6e5..7127c96bb0 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -105,6 +105,13 @@ if ( HELGRIND ) add_definitions(-DHELGRIND) endif() +if ( PERFORMANCE_PROFILING ) + message("") + message(" *** PERFORMANCE_PROFILING - WARNING!") + message(" *** Please note that this is for PERFORMANCE PROFILING only! Do NOT report any issue when enabling this configuration!") + add_definitions(-DPERFORMANCE_PROFILING) +endif() + if (BUILD_SHARED_LIBS) message("") message(" *** WITH_DYNAMIC_LINKING - INFO!") diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 867040ed82..ecb8284e9d 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -52,7 +52,12 @@ namespace Trinity #define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END #define WPAbort() ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END +#ifdef PERFORMANCE_PROFILING +#define ASSERT(cond, ...) ((void)0) +#else #define ASSERT WPAssert +#endif + #define ABORT WPAbort template inline T* ASSERT_NOTNULL(T* pointer) diff --git a/src/common/Logging/Log.h b/src/common/Logging/Log.h index bd91866784..fe84a4cc6b 100644 --- a/src/common/Logging/Log.h +++ b/src/common/Logging/Log.h @@ -166,8 +166,10 @@ inline bool Log::ShouldLog(std::string const& type, LogLevel level) const } \ } -#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS -void check_args(const char*, ...) ATTR_PRINTF(1, 2); +#ifdef PERFORMANCE_PROFILING +#define TC_LOG_MESSAGE_BODY(filterType__, level__, ...) ((void)0) +#elif TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS +void check_args(char const*, ...) ATTR_PRINTF(1, 2); void check_args(std::string const&, ...); // This will catch format errors on build time diff --git a/src/common/Metric/Metric.h b/src/common/Metric/Metric.h index 91a0210c90..ec95f20eec 100644 --- a/src/common/Metric/Metric.h +++ b/src/common/Metric/Metric.h @@ -116,7 +116,10 @@ public: #define sMetric Metric::instance() -#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS +#ifdef PERFORMANCE_PROFILING +#define TC_METRIC_EVENT(category, title, description) ((void)0) +#define TC_METRIC_VALUE(category, value) ((void)0) +#elif TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS #define TC_METRIC_EVENT(category, title, description) \ do { \ if (sMetric->IsEnabled()) \ From be2a17f191a59abd0787549a506dfab395fc1d26 Mon Sep 17 00:00:00 2001 From: Wilcalaf Date: Sun, 18 Feb 2018 04:02:58 +0200 Subject: [PATCH 098/101] Scripts/Nexus: Fixed a rare bug when sometimes Magus telestra managed to die while invisible preventing players from looting. (#21436) --- .../scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp index 90b7bdf37c..a0d3e876f2 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp @@ -150,7 +150,7 @@ public: void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); - + me->SetVisible(true); instance->SetBossState(DATA_MAGUS_TELESTRA, DONE); } From 86f03d79cc9d36bc615960faadfd43c83ce0305d Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 18 Feb 2018 12:20:25 +0100 Subject: [PATCH 099/101] Core/Spells: Revert SPELL_ATTR2_IGNORE_ITEM_CHECK to unknown Revert SPELL_ATTR2_IGNORE_ITEM_CHECK to unknown, too many spells unrelated to items have this attribute and the current handling was causing exploits with "Mote of Water" and other elements. Fix #19547 --- src/server/game/Miscellaneous/SharedDefines.h | 2 +- src/server/game/Spells/Spell.cpp | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 92792c951e..b6b8ffaf6b 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -429,7 +429,7 @@ enum SpellAttr2 SPELL_ATTR2_UNK25 = 0x02000000, // 25 SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE = 0x04000000, // 26 unaffected by school immunity SPELL_ATTR2_UNK27 = 0x08000000, // 27 - SPELL_ATTR2_IGNORE_ITEM_CHECK = 0x10000000, // 28 Spell is cast without checking item requirements (charges/reagents/totem) + SPELL_ATTR2_UNK28 = 0x10000000, // 28 SPELL_ATTR2_CANT_CRIT = 0x20000000, // 29 Spell can't crit SPELL_ATTR2_TRIGGERED_CAN_TRIGGER_PROC = 0x40000000, // 30 spell can trigger even if triggered SPELL_ATTR2_FOOD_BUFF = 0x80000000 // 31 Food or Drink Buff (like Well Fed) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 34b5b1a0f7..a5a0f23725 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -6306,9 +6306,6 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 / if (!player) return SPELL_CAST_OK; - if (m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_ITEM_CHECK)) - return SPELL_CAST_OK; - if (!m_CastItem) { if (m_castItemGUID) From e3423b4298d150ba470278105146765beff09cb4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 18 Feb 2018 18:39:07 +0100 Subject: [PATCH 100/101] Core/DBUpdater: Improve message when base SQL file is missing --- src/server/database/Updater/DBUpdater.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index 3d3576d986..6922be3688 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -287,10 +287,12 @@ bool DBUpdater::Populate(DatabaseWorkerPool& pool) } case LOCATION_DOWNLOAD: { + const char* filename = base.filename().generic_string().c_str(); + const char* workdir = boost::filesystem::current_path().generic_string().c_str(); TC_LOG_ERROR("sql.updates", ">> File \"%s\" is missing, download it from \"https://t.me/trinitycorelegacy\"" \ " Mirror: \"https://github.com/TrinityCoreLegacy/TrinityCore/releases\"" \ - " uncompress it and place the file TDB_full_world_(a_variable_name).sql where your worldserver binary is located.", base.filename().generic_string().c_str()); - break; + " uncompress it and place the file \"%s\" in the directory \"%s\".", filename, filename, workdir); + break; } } return false; From 4b5dcbf74bccde198c3e1b48fbf642664fa88de5 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 18 Feb 2018 19:01:43 +0100 Subject: [PATCH 101/101] rename files --- ...018_02_18_00_world_from_335_was_2018_02_17_00_world_335.sql} | 2 ++ ...018_02_18_01_world_from_335_was_2018_02_17_01_world_335.sql} | 2 ++ ...018_02_18_02_world_from_335_was_2018_02_17_02_world_335.sql} | 2 ++ .../2018_02_18_03_world_from_335_was_2018_02_17_03_world.sql} | 0 .../2018_02_18_04_world_from_335_was_2018_02_17_04_world.sql} | 0 .../2018_02_18_05_world_from_335_was_2018_02_17_05_world.sql} | 0 .../2018_02_18_06_world_from_335_was_2018_02_17_06_world.sql} | 0 7 files changed, 6 insertions(+) rename sql/updates/world/{3.3.5/2018_02_17_00_world_335.sql => 4.3.4/2018_02_18_00_world_from_335_was_2018_02_17_00_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_17_01_world_335.sql => 4.3.4/2018_02_18_01_world_from_335_was_2018_02_17_01_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_02_17_02_world_335.sql => 4.3.4/2018_02_18_02_world_from_335_was_2018_02_17_02_world_335.sql} (97%) rename sql/updates/world/{3.3.5/2018_02_17_03_world.sql => 4.3.4/2018_02_18_03_world_from_335_was_2018_02_17_03_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_17_04_world.sql => 4.3.4/2018_02_18_04_world_from_335_was_2018_02_17_04_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_17_05_world.sql => 4.3.4/2018_02_18_05_world_from_335_was_2018_02_17_05_world.sql} (100%) rename sql/updates/world/{3.3.5/2018_02_17_06_world.sql => 4.3.4/2018_02_18_06_world_from_335_was_2018_02_17_06_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_02_17_00_world_335.sql b/sql/updates/world/4.3.4/2018_02_18_00_world_from_335_was_2018_02_17_00_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_17_00_world_335.sql rename to sql/updates/world/4.3.4/2018_02_18_00_world_from_335_was_2018_02_17_00_world_335.sql index 4bb884d99b..89ff8c5dea 100644 --- a/sql/updates/world/3.3.5/2018_02_17_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_18_00_world_from_335_was_2018_02_17_00_world_335.sql @@ -1,3 +1,4 @@ +/* -- -- Remove unique items from reference table 24068 DELETE FROM `reference_loot_template` WHERE `Entry`=24068 AND `Item` IN (897, 1351, 2015, 2017, 3053, 3336, 4723); @@ -12,3 +13,4 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Com (2368, 3336, 0.1, 0, "Daggerspine Shorestalker - Flesh Piercer"), (2370, 3336, 0.1, 0, "Daggerspine Screamer - Flesh Piercer"), (2346, 4723, 2.5, 0, "Dun Garok Priest - Humbert's Pants"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_17_01_world_335.sql b/sql/updates/world/4.3.4/2018_02_18_01_world_from_335_was_2018_02_17_01_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_02_17_01_world_335.sql rename to sql/updates/world/4.3.4/2018_02_18_01_world_from_335_was_2018_02_17_01_world_335.sql index 97fc90e52b..4c94f1e5a9 100644 --- a/sql/updates/world/3.3.5/2018_02_17_01_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_18_01_world_from_335_was_2018_02_17_01_world_335.sql @@ -1,3 +1,4 @@ +/* -- -- Remove unique items from reference table 24066 DELETE FROM `reference_loot_template` WHERE `Entry`=24066 AND `Item` IN (886, 1077, 2013, 2227, 2233, 2566, 3204, 3569, 6315); @@ -13,3 +14,4 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Chance`, `GroupId`, `Com (2372, 3204, 0.1, 0, "Mudsnout Gnoll - Deepwood Bracers"), (4517, 3569, 1.5, 0, "Death's Head Priest - Vicar's Robe"), (6523, 6315, 0.1, 0, "Dark Iron Rifleman - Steelarrow Crossbow"); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_17_02_world_335.sql b/sql/updates/world/4.3.4/2018_02_18_02_world_from_335_was_2018_02_17_02_world_335.sql similarity index 97% rename from sql/updates/world/3.3.5/2018_02_17_02_world_335.sql rename to sql/updates/world/4.3.4/2018_02_18_02_world_from_335_was_2018_02_17_02_world_335.sql index 5ff208273e..54fb7cd580 100644 --- a/sql/updates/world/3.3.5/2018_02_17_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_02_18_02_world_from_335_was_2018_02_17_02_world_335.sql @@ -1,4 +1,6 @@ +/* DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_pri_mana_burn','spell_gen_clear_fear_poly'); INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (5138, 'spell_gen_clear_fear_poly'), (8129, 'spell_gen_clear_fear_poly'); +*/ diff --git a/sql/updates/world/3.3.5/2018_02_17_03_world.sql b/sql/updates/world/4.3.4/2018_02_18_03_world_from_335_was_2018_02_17_03_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_17_03_world.sql rename to sql/updates/world/4.3.4/2018_02_18_03_world_from_335_was_2018_02_17_03_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_04_world.sql b/sql/updates/world/4.3.4/2018_02_18_04_world_from_335_was_2018_02_17_04_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_17_04_world.sql rename to sql/updates/world/4.3.4/2018_02_18_04_world_from_335_was_2018_02_17_04_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_05_world.sql b/sql/updates/world/4.3.4/2018_02_18_05_world_from_335_was_2018_02_17_05_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_17_05_world.sql rename to sql/updates/world/4.3.4/2018_02_18_05_world_from_335_was_2018_02_17_05_world.sql diff --git a/sql/updates/world/3.3.5/2018_02_17_06_world.sql b/sql/updates/world/4.3.4/2018_02_18_06_world_from_335_was_2018_02_17_06_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_02_17_06_world.sql rename to sql/updates/world/4.3.4/2018_02_18_06_world_from_335_was_2018_02_17_06_world.sql