Skip to content

Commit

Permalink
Rewrite Golemagg and fix 'Golemagg's Trust' (#2835)
Browse files Browse the repository at this point in the history
  • Loading branch information
schell244 authored Dec 20, 2024
1 parent ae61d73 commit 8ae2cca
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 113 deletions.
24 changes: 24 additions & 0 deletions sql/migrations/20241117202208_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
DROP PROCEDURE IF EXISTS add_migration;
DELIMITER ??
CREATE PROCEDURE `add_migration`()
BEGIN
DECLARE v INT DEFAULT 1;
SET v = (SELECT COUNT(*) FROM `migrations` WHERE `id`='20241117202208');
IF v = 0 THEN
INSERT INTO `migrations` VALUES ('20241117202208');
-- Add your query below.

-- Golemagg - add missing auras
-- 13879 Magma Splash - Golemagg splashes magma at his attackers, dealing Fire damage over time and reducing their armor. This ability can stack.
-- 20556 Golemagg's Trust - Golemagg's Core Ragers will deal increased damage and have 50% increased attack speed if tanked too close to Golemagg.
-- 18943 Double Attack - Proc chance: 50%, 3s cooldown
UPDATE `creature_template` SET `auras` = "13879 20556 18943" WHERE `entry` = 11988;

DELETE FROM `script_texts` WHERE `entry` = -1409002; -- %s refuses to die while its master is in trouble. (2) -> 7865

-- End of migration.
END IF;
END??
DELIMITER ;
CALL add_migration();
DROP PROCEDURE IF EXISTS add_migration;
45 changes: 42 additions & 3 deletions src/game/Spells/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ void Aura::TriggerSpell()
for (auto const& it : pList)
{
Player* pPlayer = it.getSource();
if (pPlayer->GetGUID() == casterGUID) continue;
if (pPlayer->GetGUID() == casterGUID.GetRawValue()) continue;
if (!pPlayer) continue;
if (pPlayer->IsDead()) continue;
// 2d distance should be good enough
Expand Down Expand Up @@ -1826,6 +1826,12 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
return;
}
case 20556: // Golemagg's Trust
{
m_isPeriodic = true;
m_modifier.periodictime = 1000;
return;
}
case 22646: // Goblin Rocket Helmet
{
if (Unit* caster = GetCaster())
Expand Down Expand Up @@ -2062,8 +2068,18 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
case 23183: // Mark of Frost
{
if (m_removeMode == AURA_REMOVE_BY_DEATH)
target->CastSpell(target, 23182, true, nullptr, this);
return;
{
if (Unit* caster = GetCaster())
{
// Azuregos
// TODO verify: Only cast Mark of Frost on targets nearby when engaged?
// if (caster->IsInCombat())
// {
target->CastSpell(target, 23182, true, nullptr, this);
// }
}
}
return;
}
case 28169: // Mutating Injection
{
Expand Down Expand Up @@ -6790,6 +6806,29 @@ void Aura::PeriodicDummyTick()

return;
}
case 20556: // Golemagg's Trust
{
if (Unit* pCaster = GetCaster())
{
if (pCaster->IsDead() && !pCaster->IsInCombat())
{
return;
}
// Golemagg's Core Ragers will deal increased damage
// and have 50% increased attack speed if tanked too close to Golemagg.
std::list<Creature*> addList;
pCaster->GetCreatureListWithEntryInGrid(addList, 11672, 30.0f);
if (!addList.empty())
{
for (const auto& itr : addList)
{
// Golemagg's Trust Buff
pCaster->CastSpell(itr, 20553, true, nullptr, this);
}
}
}
return;
}
}
break;
}
Expand Down
Loading

0 comments on commit 8ae2cca

Please sign in to comment.