Merge pull request #8 from azerothcore/master

Merge
This commit is contained in:
kadeshar
2025-08-30 21:23:42 +02:00
committed by GitHub
17 changed files with 115 additions and 79 deletions

View File

@@ -0,0 +1,14 @@
-- DB update 2025_08_27_01 -> 2025_08_27_02
--
UPDATE `creature_template` SET `ScriptName` = '', `AIName` = 'SmartAI' WHERE (`entry` = 16143);
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 16143) AND (`source_type` = 0);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(16143, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5000, 1, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - On Just Summoned - Say Line 0'),
(16143, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 10389, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - On Just Summoned - Cast \'Spawn Smoke\''),
(16143, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 18, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - On Just Summoned - Set Flags Immune To Players'),
(16143, 0, 3, 0, 52, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - On Text 0 Over - Remove Flags Immune To Players'),
(16143, 0, 4, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 28056, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - On Just Died - Cast \'Zap Crystal Corpse\''),
(16143, 0, 5, 0, 8, 0, 100, 0, 17680, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - On Spellhit \'Spirit Spawn-out\' - Despawn In 3000 ms'),
(16143, 0, 6, 0, 0, 0, 100, 0, 2000, 2000, 6500, 13000, 0, 0, 11, 16568, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - In Combat - Cast \'Mind Flay\''),
(16143, 0, 7, 0, 0, 0, 100, 0, 2000, 2000, 14500, 14500, 0, 0, 11, 12542, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Doom - In Combat - Cast \'Fear\'');

View File

@@ -0,0 +1,2 @@
-- DB update 2025_08_27_02 -> 2025_08_28_00
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 1 WHERE `entry` = 28194;

View File

@@ -0,0 +1,43 @@
-- DB update 2025_08_28_00 -> 2025_08_29_00
-- Necrotic Runes
DELETE FROM `creature_loot_template` WHERE `Item` = 22484;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
(14697, 22484, 0, 100, 0, 1, 0, 2, 3, 'Lumbering Horror - Necrotic Rune'),
(16379, 22484, 0, 100, 0, 1, 0, 2, 3, 'Spirit of the Damned - Necrotic Rune'),
(16380, 22484, 0, 100, 0, 1, 0, 2, 3, 'Bone Witch - Necrotic Rune'),
(16143, 22484, 0, 100, 0, 1, 0, 30, 30, 'Shadow of Doom - Necrotic Rune'),
(16141, 22484, 0, 33.33, 0, 1, 0, 1, 1, 'Ghoul Berserker - Necrotic Rune'),
(16298, 22484, 0, 33.33, 0, 1, 0, 1, 1, 'Spectral Soldier - Necrotic Rune'),
(16299, 22484, 0, 33.33, 0, 1, 0, 1, 1, 'Skeletal Shocktrooper - Necrotic Rune'),
(16383, 22484, 0, 33.33, 0, 1, 0, 1, 1, 'Flameshocker - Necrotic Rune');
-- Sealed Research Report items
DELETE FROM `creature_loot_template` WHERE `Item` IN (22970, 22972, 22973, 22974, 22975, 22977);
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
(16141, 22970, 0, 2, 0, 1, 1, 1, 1, 'Ghoul Berserker - A Bloodstained Envelope'),
(16141, 22972, 0, 2, 0, 1, 1, 1, 1, 'Ghoul Berserker - A Careworn Note'),
(16141, 22973, 0, 2, 0, 1, 1, 1, 1, 'Ghoul Berserker - A Crumpled Missive'),
(16141, 22974, 0, 2, 0, 1, 1, 1, 1, 'Ghoul Berserker - A Ragged Page'),
(16141, 22975, 0, 2, 0, 1, 1, 1, 1, 'Ghoul Berserker - A Smudged Document'),
(16141, 22977, 0, 2, 0, 1, 1, 1, 1, 'Ghoul Berserker - A Torn Letter'),
(16298, 22970, 0, 2, 0, 1, 1, 1, 1, 'Spectral Soldier - A Bloodstained Envelope'),
(16298, 22972, 0, 2, 0, 1, 1, 1, 1, 'Spectral Soldier - A Careworn Note'),
(16298, 22973, 0, 2, 0, 1, 1, 1, 1, 'Spectral Soldier - A Crumpled Missive'),
(16298, 22974, 0, 2, 0, 1, 1, 1, 1, 'Spectral Soldier - A Ragged Page'),
(16298, 22975, 0, 2, 0, 1, 1, 1, 1, 'Spectral Soldier - A Smudged Document'),
(16298, 22977, 0, 2, 0, 1, 1, 1, 1, 'Spectral Soldier - A Torn Letter'),
(16299, 22970, 0, 2, 0, 1, 1, 1, 1, 'Skeletal Shocktrooper - A Bloodstained Envelope'),
(16299, 22972, 0, 2, 0, 1, 1, 1, 1, 'Skeletal Shocktrooper - A Careworn Note'),
(16299, 22973, 0, 2, 0, 1, 1, 1, 1, 'Skeletal Shocktrooper - A Crumpled Missive'),
(16299, 22974, 0, 2, 0, 1, 1, 1, 1, 'Skeletal Shocktrooper - A Ragged Page'),
(16299, 22975, 0, 2, 0, 1, 1, 1, 1, 'Skeletal Shocktrooper - A Smudged Document'),
(16299, 22977, 0, 2, 0, 1, 1, 1, 1, 'Skeletal Shocktrooper - A Torn Letter'),
(16383, 22970, 0, 2, 0, 1, 1, 1, 1, 'Flameshocker - A Bloodstained Envelope'),
(16383, 22972, 0, 2, 0, 1, 1, 1, 1, 'Flameshocker - A Careworn Note'),
(16383, 22973, 0, 2, 0, 1, 1, 1, 1, 'Flameshocker - A Crumpled Missive'),
(16383, 22974, 0, 2, 0, 1, 1, 1, 1, 'Flameshocker - A Ragged Page'),
(16383, 22975, 0, 2, 0, 1, 1, 1, 1, 'Flameshocker - A Smudged Document'),
(16383, 22977, 0, 2, 0, 1, 1, 1, 1, 'Flameshocker - A Torn Letter');
-- Dim Necrotic Stone
UPDATE `creature_loot_template` SET `Chance` = 25 WHERE `Item` = 22892;

View File

@@ -0,0 +1,4 @@
-- DB update 2025_08_29_00 -> 2025_08_29_01
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 202) AND (`source_type` = 0) AND (`id` IN (0));
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(202, 0, 0, 0, 101, 0, 100, 0, 2, 5, 5000, 9000, 13000, 0, 11, 7399, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Skeletal Horror - On 2 or More Players in Range - Cast \'Terrify\'');

View File

@@ -0,0 +1,2 @@
-- DB update 2025_08_29_01 -> 2025_08_30_00
UPDATE `creature` SET `spawntimesecs` = 604800 WHERE `id1` = 28194;

View File

@@ -0,0 +1,6 @@
-- DB update 2025_08_30_00 -> 2025_08_30_01
-- Update creature 'Tahu Sagewind' with sniffed values
-- new spawns
DELETE FROM `creature` WHERE (`id1` IN (34528)) AND (`guid` IN (37));
INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
(37, 34528, 1, 1, 1, 0, -1047.1771240234375, -287.98785400390625, 159.113677978515625, 2.728425025939941406, 120, 0, 0, 0, 0, 0, "", 45435, 1, NULL);

View File

@@ -0,0 +1,13 @@
-- DB update 2025_08_30_01 -> 2025_08_30_02
-- Update gameobject 'Mag'har Rug' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (182257)) AND (`guid` IN (22684, 22685, 22686));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(22684, 182257, 530, 0, 0, 1, 1, -1235.0460205078125, 7247.54248046875, 57.33856201171875, 4.97418975830078125, 0, 0, -0.60876083374023437, 0.793353796005249023, 120, 255, 1, "", 45704, NULL),
(22685, 182257, 530, 0, 0, 1, 1, -1242.7056884765625, 7246.685546875, 57.29010009765625, 4.97418975830078125, 0, 0, -0.60876083374023437, 0.793353796005249023, 120, 255, 1, "", 45704, NULL),
(22686, 182257, 530, 0, 0, 1, 1, -1238.972412109375, 7247.02001953125, 57.3078765869140625, 4.97418975830078125, 0, 0, -0.60876083374023437, 0.793353796005249023, 120, 255, 1, "", 45704, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (182257)) AND (`guid` IN (38));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(38, 182257, 1, 0, 0, 1, 1, -1049.82470703125, -286.196197509765625, 159.0303497314453125, 2.548179388046264648, 0, 0, 0.956304550170898437, 0.292372345924377441, 120, 255, 1, "", 45435, NULL);

View File

@@ -0,0 +1,12 @@
-- DB update 2025_08_30_02 -> 2025_08_30_03
-- Update gameobject 'Stranglekelp Sack' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (185004)) AND (`guid` IN (25928));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(25928, 185004, 530, 0, 0, 1, 1, 728.25927734375, 6844.61083984375, -66.3580474853515625, 4.433136463165283203, 0, 0, -0.79863548278808593, 0.60181504487991333, 120, 255, 1, "", 45942, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (185004)) AND (`guid` IN (84, 85));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(84, 185004, 1, 0, 0, 1, 1, -1049.5347900390625, -290.34722900390625, 159.0303497314453125, 0.209439441561698913, 0, 0, 0.104528427124023437, 0.994521915912628173, 120, 255, 1, "", 45435, NULL),
(85, 185004, 1, 0, 0, 1, 1, -1050.2257080078125, -290.552093505859375, 159.0303497314453125, 2.495818138122558593, 0, 0, 0.948323249816894531, 0.317305892705917358, 120, 255, 1, "", 45435, NULL);

View File

@@ -1579,7 +1579,7 @@ void Creature::SelectLevel(bool changelevel)
SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, stats->AttackPower);
SetModifierValue(UNIT_MOD_ATTACK_POWER_RANGED, BASE_VALUE, stats->RangedAttackPower);
sScriptMgr->Creature_SelectLevel(cInfo, this);
sScriptMgr->OnCreatureSelectLevel(cInfo, this);
}
float Creature::_GetHealthMod(int32 Rank)

View File

@@ -57,11 +57,11 @@ void ScriptMgr::OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creat
});
}
void ScriptMgr::Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature)
void ScriptMgr::OnCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature)
{
ExecuteScript<AllCreatureScript>([&](AllCreatureScript* script)
{
script->Creature_SelectLevel(cinfo, creature);
script->OnCreatureSelectLevel(cinfo, creature);
});
}

View File

@@ -33,7 +33,7 @@ public:
virtual void OnBeforeCreatureSelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/, uint8& /*level*/) { }
// Called from End of Creature SelectLevel.
virtual void Creature_SelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/) { }
virtual void OnCreatureSelectLevel(const CreatureTemplate* /*cinfo*/, Creature* /*creature*/) { }
/**
* @brief This hook runs after add creature in world

View File

@@ -593,7 +593,7 @@ public: /* AllCreatureScript */
//listener function (OnAllCreatureUpdate) is called by OnCreatureUpdate
//void OnAllCreatureUpdate(Creature* creature, uint32 diff);
void OnBeforeCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature, uint8& level);
void Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature);
void OnCreatureSelectLevel(const CreatureTemplate* cinfo, Creature* creature);
void OnCreatureSaveToDB(Creature* creature);
public: /* AllGameobjectScript */

View File

@@ -1312,6 +1312,8 @@ void WorldState::StartScourgeInvasion(bool sendMail)
Acore::Containers::RandomShuffle(randomIds);
for (uint32 id : randomIds)
OnEnable(m_siData.m_activeInvasions[id]);
sGameEventMgr->StartEvent(GAME_EVENT_SCOURGE_INVASION_BOSSES);
}
}

View File

@@ -65,6 +65,7 @@ enum WorldStateGameEvents
{
// Scourge Invasion
GAME_EVENT_SCOURGE_INVASION = 17,
GAME_EVENT_SCOURGE_INVASION_BOSSES = 120,
GAME_EVENT_SCOURGE_INVASION_WINTERSPRING = 121,
GAME_EVENT_SCOURGE_INVASION_TANARIS = 122,
GAME_EVENT_SCOURGE_INVASION_AZSHARA = 123,

View File

@@ -177,6 +177,9 @@ struct npc_sanguine_spirit : public ScriptedAI
me->SetReactState(REACT_AGGRESSIVE);
me->SetInCombatWithZone();
DoCastSelf(SPELL_SANGUINE_SPIRIT_AURA);
}).Schedule(30s, [this](TaskContext /*context*/)
{
me->DespawnOrUnsummon();
});
}
@@ -320,6 +323,7 @@ public:
events.Reset();
if (InstanceScript* instance = player->GetInstanceScript())
{
if (instance->GetBossState(DATA_MIRKBLOOD) != DONE)
{
opener = player;
@@ -327,8 +331,10 @@ public:
events.ScheduleEvent(EVENT_SAY, 1s);
events.ScheduleEvent(EVENT_FLAG, 5s);
me->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
}
}
me->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
return true;
}
@@ -342,13 +348,12 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SAY:
if (!mirkblood)
if (!mirkblood || !mirkblood->IsAlive())
return;
mirkblood->AI()->Talk(SAY_AGGRO, opener);
break;
case EVENT_FLAG:
if (!mirkblood)
return;
if (mirkblood)
mirkblood->SetImmuneToPC(false);
me->Delete();
break;

View File

@@ -499,7 +499,7 @@ struct npc_necrotic_shard : public ScriptedAI
// Only Minions and the shard itself can deal damage.
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellSchoolMask /*damageSchoolMask*/) override
{
if (attacker->GetFactionTemplateEntry() != me->GetFactionTemplateEntry())
if (attacker && attacker->GetFactionTemplateEntry() != me->GetFactionTemplateEntry())
damage = 0;
}
@@ -802,69 +802,6 @@ struct npc_cultist_engineer : public ScriptedAI
}
};
struct npc_shadow_of_doom : public CombatAI
{
npc_shadow_of_doom(Creature* creature) : CombatAI(creature) { }
void JustEngagedWith(Unit* /*who*/) override
{
scheduler.Schedule(2s, [&](TaskContext context)
{
DoCastVictim(SPELL_MINDFLAY);
context.Repeat(6500ms, 13s);
}).Schedule(2s, [&](TaskContext context)
{
DoCastVictim(SPELL_FEAR);
context.Repeat(14500ms, 14500ms);
});
}
void Reset() override
{
scheduler.CancelAll();
me->SetImmuneToPC(false);
}
void IsSummonedBy(WorldObject* summoner) override
{
if (!summoner)
return;
if (Player* player = summoner->ToPlayer())
{
me->SetImmuneToPC(true);
me->SetFacingToObject(player);
Talk(SHADOW_OF_DOOM_SAY_AGGRO, player);
DoCastSelf(SPELL_SPAWN_SMOKE, true);
scheduler.Schedule(5s, [this, player](TaskContext const& /*context*/)
{
me->SetImmuneToPC(false);
if (me->CanStartAttack(player))
AttackStart(player);
});
}
}
void JustDied(Unit* /*pKiller*/) override
{
DoCastSelf(SPELL_ZAP_CRYSTAL_CORPSE, true);
}
void SpellHit(Unit* /* caster */, SpellInfo const* spell) override
{
if (spell->Id == SPELL_SPIRIT_SPAWN_OUT)
me->DespawnOrUnsummon(3000);
}
void UpdateAI(uint32 const diff) override
{
scheduler.Update(diff);
DoMeleeAttackIfReady();
}
};
struct npc_flameshocker : public CombatAI
{
npc_flameshocker(Creature* creature) : CombatAI(creature) { }
@@ -1121,7 +1058,6 @@ void AddSC_scourge_invasion()
RegisterCreatureAI(npc_minion_spawner);
RegisterCreatureAI(npc_pallid_horror);
RegisterCreatureAI(npc_cultist_engineer);
RegisterCreatureAI(npc_shadow_of_doom);
RegisterCreatureAI(npc_flameshocker);
RegisterSpellScript(spell_communique_trigger);
RegisterSpellScript(spell_despawner_self);

View File

@@ -137,10 +137,7 @@ enum ScourgeInvasionSpells
*/
// Shadow of Doom
SPELL_SPAWN_SMOKE = 10389, // Spawning Visual.
SPELL_ZAP_CRYSTAL_CORPSE = 28056, // Casted on Shard if Shadow of Doom dies.
SPELL_MINDFLAY = 16568,
SPELL_FEAR = 12542,
// Pallid Horror - Patchwerk Terror (also uses: 28315)
SPELL_SUMMON_CRACKED_NECROTIC_CRYSTAL = 28424, // Alliance.
@@ -336,7 +333,6 @@ enum ScourgeInvasionTalk
HERALD_OF_THE_LICH_KING_SAY_ATTACK_END = 1,
HERALD_OF_THE_LICH_KING_SAY_ATTACK_RANDOM = 2,
PALLID_HORROR_SAY_RANDOM_YELL = 0,
SHADOW_OF_DOOM_SAY_AGGRO = 0,
SYLVANAS_SAY_ATTACK_END = 3,
VARIAN_SAY_ATTACK_END = 3
};