diff --git a/data/sql/updates/db_world/2023_08_01_00.sql b/data/sql/updates/db_world/2023_08_01_00.sql new file mode 100644 index 000000000..c4411c6c6 --- /dev/null +++ b/data/sql/updates/db_world/2023_08_01_00.sql @@ -0,0 +1,3 @@ +-- DB update 2023_07_31_00 -> 2023_08_01_00 +-- +UPDATE `gameobject_template` SET `ScriptName` = 'go_manticron_cube' WHERE `entry` = 181713; diff --git a/data/sql/updates/db_world/2023_08_02_00.sql b/data/sql/updates/db_world/2023_08_02_00.sql new file mode 100644 index 000000000..6fa106c2f --- /dev/null +++ b/data/sql/updates/db_world/2023_08_02_00.sql @@ -0,0 +1,16 @@ +-- DB update 2023_08_01_00 -> 2023_08_02_00 +-- +-- mechanical immunities changes +UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|2|16|64|256|512|1024|2048|4096|8192|131072|524288|4194304|8388608|33554432, `flags_extra` = `flags_extra`|256 WHERE `entry` = 16414; + +-- smart scripts changes +DELETE FROM `smart_scripts` WHERE `entryorguid` = 16414 AND `source_type` = 0; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(16414, 0, 0, 0, 4, 0, 30, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - On Aggro - Say Line 0'), +(16414, 0, 1, 0, 6, 0, 50, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - On Death - Say Line 1'), +(16414, 0, 2, 3, 0, 0, 100, 0, 2000, 11000, 12000, 21000, 0, 11, 29690, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - In Combat - Cast Drunken Skull Crack'), +(16414, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - In Combat - Say Line 2'), +(16414, 0, 4, 5, 2, 0, 100, 1, 0, 50, 0, 0, 0, 11, 29691, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - At Health 50% - Cast Frenzy'), +(16414, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - At Health 50% - Say Line 3'), +(16414, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 14, 0, 100, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ghostly Steward - At Health 50% - Wipe Raid Threat'); diff --git a/data/sql/updates/db_world/2023_08_03_00.sql b/data/sql/updates/db_world/2023_08_03_00.sql new file mode 100644 index 000000000..2cd3da010 --- /dev/null +++ b/data/sql/updates/db_world/2023_08_03_00.sql @@ -0,0 +1,33 @@ +-- DB update 2023_08_02_00 -> 2023_08_03_00 +DELETE FROM `creature_loot_template` WHERE (`Entry` IN (16152, 16457, 17521, 18168, 15691, 15687, 15688, 16524, 15689, 15690)) AND (`Item` IN (29434, 23809, 30480)); +INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(16152, 23809, 0, 8, 0, 1, 0, 1, 1, 'Attumen the Huntsman - Schematic: Stabilized Eternium Scope'), +(16152, 30480, 0, 1, 0, 1, 0, 1, 1, 'Attumen the Huntsman - Fiery Warhorse\'s Reins'), +(15687, 29434, 0, 100, 0, 1, 0, 1, 1, 'Moroes - Badge of Justice'), +(16457, 29434, 0, 100, 0, 1, 0, 1, 1, 'Maiden of Virtue - Badge of Justice'), +(17521, 29434, 0, 100, 0, 1, 0, 1, 1, 'The Big Bad Wolf - Badge of Justice'), +(18168, 29434, 0, 100, 0, 1, 0, 1, 1, 'The Crone - Badge of Justice'), +(15691, 29434, 0, 100, 0, 1, 0, 1, 1, 'The Curator - Badge of Justice'), +(15688, 29434, 0, 100, 0, 1, 0, 1, 1, 'Terestian Illhoof - Badge of Justice'), +(16524, 29434, 0, 100, 0, 1, 0, 1, 1, 'Shade of Aran - Badge of Justice'), +(15689, 29434, 0, 100, 0, 1, 0, 1, 1, 'Netherspite - Badge of Justice'), +(15690, 29434, 0, 100, 0, 1, 0, 2, 2, 'Prince Malchezaar - Badge of Justice'); + +DELETE FROM `gameobject_loot_template` WHERE (`Entry` = 20712) AND (`Item` IN (29434)); +INSERT INTO `gameobject_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(20712, 29434, 0, 100, 0, 1, 0, 1, 1, 'Dust Covered Chest - Badge of Justice'); + +DELETE FROM `reference_loot_template` WHERE (`Entry` = 12001) AND (`Item` IN (28745, 28746, 28747, 28748, 28749, 28750, 28751, 28752, 28753, 28754, 28755, 28756)); +INSERT INTO `reference_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES +(12001, 28745, 0, 0, 0, 1, 1, 1, 1, 'Mithril Chain of Heroism'), +(12001, 28746, 0, 0, 0, 1, 1, 1, 1, 'Fiend Slayer Boots'), +(12001, 28747, 0, 0, 0, 1, 1, 1, 1, 'Battlescar Boots'), +(12001, 28748, 0, 0, 0, 1, 1, 1, 1, 'Legplates of the Innocent'), +(12001, 28749, 0, 0, 0, 1, 1, 1, 1, 'King\'s Defender'), +(12001, 28750, 0, 0, 0, 1, 1, 1, 1, 'Girdle of Treachery'), +(12001, 28751, 0, 0, 0, 1, 1, 1, 1, 'Heart-Flame Leggings'), +(12001, 28752, 0, 0, 0, 1, 1, 1, 1, 'Forestlord Striders'), +(12001, 28753, 0, 0, 0, 1, 1, 1, 1, 'Ring of Recurrence'), +(12001, 28754, 0, 0, 0, 1, 1, 1, 1, 'Triptych Shield of the Ancients'), +(12001, 28755, 0, 0, 0, 1, 1, 1, 1, 'Bladed Shoulderpads of the Merciless'), +(12001, 28756, 0, 0, 0, 1, 1, 1, 1, 'Headdress of the High Potentate'); diff --git a/data/sql/updates/db_world/2023_08_04_00.sql b/data/sql/updates/db_world/2023_08_04_00.sql new file mode 100644 index 000000000..f2b96ca5f --- /dev/null +++ b/data/sql/updates/db_world/2023_08_04_00.sql @@ -0,0 +1,16 @@ +-- DB update 2023_08_03_00 -> 2023_08_04_00 +-- + +UPDATE `creature_template` SET `ScriptName` = "" WHERE `entry` = 22307; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 22095) AND (`source_type` = 0) AND (`id` IN (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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(22095, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 11, 22419, 20, 1, 0, 0, 0, 0, 0, 'Infested Root-Walker - On Just Died - Start Random Movement'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 22307; + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 22307) AND (`source_type` = 0) AND (`id` IN (0, 1, 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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(22307, 0, 0, 0, 6, 0, 75, 0, 0, 0, 0, 0, 0, 11, 39134, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rotting Forest-Rager - On Just Died - Cast \'Summon Lots of Wood Mites\''), +(22307, 0, 1, 0, 0, 0, 100, 0, 0, 5, 12000, 18000, 0, 11, 15548, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Rotting Forest-Rager - In Combat - Cast \'Thunderclap\' (No Repeat)'), +(22307, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 89, 5, 0, 0, 0, 0, 0, 11, 22419, 20, 1, 0, 0, 0, 0, 0, 'Rotting Forest-Rager - On Just Died - Start Random Movement'); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 2fb065df7..46f91221f 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -180,7 +180,7 @@ void BattlegroundMgr::Update(uint32 diff) if (GameTime::GetGameTime() > m_NextAutoDistributionTime) { sArenaTeamMgr->DistributeArenaPoints(); - m_NextAutoDistributionTime = m_NextAutoDistributionTime + 1_days * sWorld->getIntConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); + m_NextAutoDistributionTime = GameTime::GetGameTime() + Seconds(DAY * sWorld->getIntConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS)); sWorld->setWorldState(WS_ARENA_DISTRIBUTION_TIME, m_NextAutoDistributionTime.count()); } m_AutoDistributionTimeChecker = 600000; // 10 minutes check diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 01b8fb146..857147253 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1091,7 +1091,17 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(creature_ID, petlevel); if (pInfo) // exist in DB { - SetCreateHealth(pInfo->health); + // Default scale value of 1 to use if Pet.RankMod.Health = 0 + float factorHealth = 1; + // If config is set to allow pets to use health modifiers, apply it to creatures with a DB entry + // Pet.RankMod.Health = 1 use the factor value based on the rank of the pet, most pets have a rank of 0 and so use + // the Elite rank which is set as the default in Creature::_GetHealthMod(int32 Rank) + if (sWorld->getBoolConfig(CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH)) + { + factorHealth *= _GetHealthMod(cinfo->rank); + } + + SetCreateHealth(pInfo->health*factorHealth); SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)pInfo->health); if (petType != HUNTER_PET) //hunter pet use focus { diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index bd5e28e21..093823a1f 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -2187,7 +2187,7 @@ bool Aura::CanStackWith(Aura const* existingAura, bool remove) const } // spell of same spell rank chain - if (m_spellInfo->IsRankOf(existingSpellInfo)) + if (m_spellInfo->IsRankOf(existingSpellInfo) && !(m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags[1] & 0x80000000)) { // don't allow passive area auras to stack if (m_spellInfo->IsMultiSlotAura() && !IsArea()) diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index d9c2eb103..a5555d266 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -127,7 +127,7 @@ public: { "cometome", HandleComeToMeCommand, SEC_ADMINISTRATOR, Console::No }, { "damage", HandleDamageCommand, SEC_GAMEMASTER, Console::No }, { "combatstop", HandleCombatStopCommand, SEC_GAMEMASTER, Console::Yes }, - { "flusharenapoints", HandleFlushArenaPointsCommand, SEC_ADMINISTRATOR, Console::No }, + { "flusharenapoints", HandleFlushArenaPointsCommand, SEC_ADMINISTRATOR, Console::Yes }, { "freeze", HandleFreezeCommand, SEC_GAMEMASTER, Console::No }, { "unfreeze", HandleUnFreezeCommand, SEC_GAMEMASTER, Console::No }, { "possess", HandlePossessCommand, SEC_GAMEMASTER, Console::No }, diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp index b0c0f0e53..b771a3bce 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/instance_old_hillsbrad.cpp @@ -66,7 +66,7 @@ public: void OnPlayerEnter(Player* player) override { - if (instance->GetPlayersCountExceptGMs() == 1) + if (instance->GetPlayersCountExceptGMs() <= 1) CleanupInstance(); EnsureGridLoaded(); @@ -144,8 +144,11 @@ public: Reposition(thrall); return; case DATA_ESCORT_PROGRESS: - _encounterProgress = data; - SaveToDB(); + if (_encounterProgress < data) + { + _encounterProgress = data; + SaveToDB(); + } break; case DATA_BOMBS_PLACED: { diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp index 71ce4f2cd..a2b6471bf 100644 --- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp +++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp @@ -261,6 +261,15 @@ struct boss_kiggler_the_crazed : public ScriptedAI instance->SetBossState(DATA_MAULGAR, NOT_STARTED); } + void AttackStart(Unit* who) override + { + if (!who) + return; + + if (me->Attack(who, true)) + me->GetMotionMaster()->MoveChase(who, 25.0f); + } + void JustEngagedWith(Unit* /*who*/) override { me->SetInCombatWithZone(); diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 020a9555f..132af1a6c 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "Player.h" #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" @@ -47,6 +48,7 @@ enum Spells SPELL_BLAZE = 30541, SPELL_BLAZE_SUMMON = 30542, SPELL_BERSERK = 27680, + SPELL_SHADOW_GRASP = 30410, SPELL_SHADOW_GRASP_VISUAL = 30166, SPELL_MIND_EXHAUSTION = 44032, SPELL_QUAKE = 30657, @@ -327,10 +329,29 @@ class spell_magtheridon_quake : public SpellScript } }; +class go_manticron_cube : public GameObjectScript +{ +public: + go_manticron_cube() : GameObjectScript("go_manticron_cube") { } + + bool OnGossipHello(Player* player, GameObject* /*go*/) override + { + if (player->HasAura(SPELL_MIND_EXHAUSTION) || player->HasAura(SPELL_SHADOW_GRASP)) + return true; + + if (Creature* trigger = player->FindNearestCreature(NPC_HELLFIRE_RAID_TRIGGER, 10.0f)) + trigger->CastSpell(nullptr, SPELL_SHADOW_GRASP_VISUAL); + + player->CastSpell((Unit*)nullptr, SPELL_SHADOW_GRASP, true); + return true; + } +}; + void AddSC_boss_magtheridon() { RegisterMagtheridonsLairCreatureAI(boss_magtheridon); RegisterSpellScript(spell_magtheridon_blaze); RegisterSpellScript(spell_magtheridon_shadow_grasp); RegisterSpellScript(spell_magtheridon_quake); + new go_manticron_cube(); } diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h index fe6fccf97..a65282235 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/magtheridons_lair.h @@ -39,7 +39,8 @@ enum NpcIds { NPC_MAGTHERIDON = 17257, NPC_HELLFIRE_CHANNELER = 17256, - NPC_HELLFIRE_WARDER = 18829 + NPC_HELLFIRE_WARDER = 18829, + NPC_HELLFIRE_RAID_TRIGGER = 17376, }; enum GoIds diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index bc9f2ca24..e584f8cbe 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -429,38 +429,6 @@ public: }; }; -/*###### -## npc_rotting_forest_rager -######*/ - -class npc_rotting_forest_rager : public CreatureScript -{ -public: - npc_rotting_forest_rager() : CreatureScript("npc_rotting_forest_rager") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_rotting_forest_ragerAI(creature); - } - - struct npc_rotting_forest_ragerAI : public ScriptedAI - { - npc_rotting_forest_ragerAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override { } - void JustEngagedWith(Unit* /*who*/) override { } - - void DamageTaken(Unit* done_by, uint32& damage, DamageEffectType, SpellSchoolMask) override - { - if (done_by && done_by->GetTypeId() == TYPEID_PLAYER) - if (me->GetHealth() <= damage) - if (rand() % 100 < 75) - //Summon Lots of Wood Mights - DoCast(me, 39134, true); - } - }; -}; - /*###### ## npc_isla_starmane ######*/ @@ -714,7 +682,6 @@ void AddSC_terokkar_forest() // Theirs new npc_unkor_the_ruthless(); - new npc_rotting_forest_rager(); new npc_isla_starmane(); new go_skull_pile(); new npc_slim();