Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Golemagg and fix 'Golemagg's Trust' #2835

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions sql/migrations/20241117202208_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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.

-- Moss Covered Feet - add SPELL_ATTR_EX_AURA_UNIQUE
INSERT INTO `spell_mod` (`Id`, `procChance`, `procFlags`, `procCharges`, `DurationIndex`, `Category`, `CastingTimeIndex`, `StackAmount`, `SpellIconID`, `activeIconID`, `manaCost`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `Custom`, `InterruptFlags`, `AuraInterruptFlags`, `ChannelInterruptFlags`, `Dispel`, `Stances`, `StancesNot`, `SpellVisual`, `ManaCostPercentage`, `StartRecoveryCategory`, `StartRecoveryTime`, `MaxAffectedTargets`, `MaxTargetLevel`, `DmgClass`, `rangeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `SpellFamilyName`, `SpellFamilyFlags`, `Mechanic`, `EquippedItemClass`, `Comment`) VALUES
(6870, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67110928, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 'Moss Covered Feet - Add unique aura flag');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this modification, the spell can be applied multiple times to a player. I have no proof that this is correct - I just remember it not being applied more than once. I can remove this line if that’s preferable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1223 (comment) - maybe this can be achieved differently, but currently I don't have any other idea except adding the unique flag.


-- 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;
61 changes: 58 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 @@ -1862,6 +1862,16 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
target->HandleEmoteCommand(EMOTE_STATE_DANCE);
break;
}
case 6870: // Moss Covered Feet
{
if (target)
{
m_positive = false;
m_isPeriodic = true;
m_modifier.periodictime = 1000;
}
return;
}
}
break;
}
Expand Down Expand Up @@ -2062,8 +2072,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
// Only cast Mark of Frost on targets nearby when engaged
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this blizzlike?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also have no poof for this - needs to be confirmed.

if (caster->IsInCombat())
{
target->CastSpell(target, 23182, true, nullptr, this);
}
}
}
return;
}
case 28169: // Mutating Injection
{
Expand Down Expand Up @@ -6795,6 +6815,41 @@ 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;
}
case 6870: // Moss Covered Feet
{
if (target->IsInCombat())
{
// 5% proc chance
if (urand(0, 99) < 5)
{
target->CastSpell(target, 6869, true, nullptr, this); // Fall Down
}
}
return;
}
}
break;
}
Expand Down
14 changes: 14 additions & 0 deletions src/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,20 @@ void Spell::EffectDummy(SpellEffectIndex effIdx)
}
return;
}
case 7669: // Bethor's Potion (debuff removal spell 8320 does not work, fix it here...)
{
// HEX_OF_RAVENCLAW_1
if (m_casterUnit->HasAura(7656))
{
m_casterUnit->RemoveAurasDueToSpell(7656);
}
// HEX_OF_RAVENCLAW_2
if (m_casterUnit->HasAura(7657))
{
m_casterUnit->RemoveAurasDueToSpell(7657);
}
return;
}
}

//All IconID Check in there
Expand Down
Loading