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

update from master #15

Merged
merged 8 commits into from
Sep 23, 2024
4 changes: 4 additions & 0 deletions data/sql/updates/db_world/2024_09_22_03.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- DB update 2024_09_22_02 -> 2024_09_22_03

UPDATE `item_template` SET `BuyCount` = 20 WHERE (`entry` = 32453);
UPDATE `item_template` SET `BuyCount` = 5 WHERE (`entry` = 32455);
27 changes: 27 additions & 0 deletions data/sql/updates/db_world/2024_09_23_00.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-- DB update 2024_09_22_03 -> 2024_09_23_00
-- Bug Report #19575

-- Unlink from engineering quest chain:
-- 3638 (Goblin Engineering - Pledge of Secrecy)
-- 3640 (gnome engineering - pledge of secrecy, alliance)
-- 3642 (gnome engineering - pledge of secrecy, horde)
UPDATE `quest_template` SET `RewardNextQuest`=0 WHERE `ID`=3638 OR `ID`=3640 OR `ID`=3642;
UPDATE `quest_template` SET `RewardNextQuest`=3639 WHERE `ID`=3526 OR `ID`=3629 OR `ID`=3633 OR `ID`=4181;
UPDATE `quest_template` SET `RewardNextQuest`=3641 WHERE `ID`=3630 OR `ID`=3632 OR `ID`=3634;
UPDATE `quest_template` SET `RewardNextQuest`=3643 WHERE `ID`=3635 OR `ID`=3637;

-- Remove Pledge of Secrecy from creature_queststarter
DELETE FROM `creature_queststarter` WHERE `quest`=3638 OR `quest`=3640 OR `quest`=3642;
-- Remove Pledge of Secrecy from creature_questender
DELETE FROM `creature_questender` WHERE `quest`=3638 OR `quest`=3640 OR `quest`=3642;

-- Link quests together:
-- 3526, 3629, 3633, 4181 (Goblin Engineering) -> 3639 (Goblin Engineering - Show Your Work)
UPDATE `quest_template_addon` SET `PrevQuestID`=3633 WHERE `ID`=3639;
UPDATE `quest_template_addon` SET `NextQuestID`=3639 WHERE `ID`=3526 OR `ID`=3629 OR `ID`=3633 OR `ID`=4181;
-- 3630, 3632, 3634 (Gnome Engineering - Alliance) -> 3641 (Gnome Engineering - Show Your Work - Alliance)
UPDATE `quest_template_addon` SET `PrevQuestID`=3634 WHERE `ID`=3641;
UPDATE `quest_template_addon` SET `NextQuestID`=3641 WHERE `ID`=3630 OR `ID`=3632 OR `ID`=3634;
-- 3635, 3637 (Gnome Engineering - Horde) -> 3643 (Gnome Engineering - Show Your Work - Horde)
UPDATE `quest_template_addon` SET `PrevQuestID`=3635 WHERE `ID`=3643;
UPDATE `quest_template_addon` SET `NextQuestID`=3643 WHERE `ID`=3635 OR `ID`=3637;
9 changes: 9 additions & 0 deletions data/sql/updates/db_world/2024_09_23_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- DB update 2024_09_23_00 -> 2024_09_23_01
--
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_skyguard_blasting_charges';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(39844, 'spell_item_skyguard_blasting_charges');

DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 39844) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 30) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 185549) AND (`ConditionValue2` = 30) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 39844, 0, 0, 30, 0, 185549, 30, 0, 0, 0, 0, '', ' Launch a blasting charge from your flying mount at monstrous kaliri eggs.');
6 changes: 6 additions & 0 deletions src/server/game/Spells/SpellInfoCorrections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4837,6 +4837,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx5 |= SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL;
});

// Fatal Attraction
ApplySpellFix({ 40870 }, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 1;
});

for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript

bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_FATAL_ATTRACTION_DAMAGE });
return ValidateSpellInfo({ SPELL_FATAL_ATTRACTION_DAMAGE, SPELL_FATAL_ATTRACTION_AURA });
}

void FilterTargets(std::list<WorldObject*>& targets)
{
if (targets.empty())
GetCaster()->RemoveAurasDueToSpell(SPELL_FATAL_ATTRACTION_AURA);
}

void HandleDummy(SpellEffIndex /*effIndex*/)
Expand All @@ -255,6 +261,7 @@ class spell_mother_shahraz_fatal_attraction_dummy : public SpellScript

void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mother_shahraz_fatal_attraction_dummy::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ALLY);
OnEffectHitTarget += SpellEffectFn(spell_mother_shahraz_fatal_attraction_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
Expand Down
41 changes: 41 additions & 0 deletions src/server/scripts/Spells/spell_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4051,6 +4051,46 @@ class spell_item_gor_dreks_ointment : public SpellScript
}
};

enum Skettis
{
QUEST_FIRES_OVER_SKETTIS = 11008
};

class spell_item_skyguard_blasting_charges : public SpellScript
{
PrepareSpellScript(spell_item_skyguard_blasting_charges);

void HandleOpenObject(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (GameObject* go = GetHitGObj())
go->UseDoorOrButton();
}

void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* kaliri = GetHitUnit())
kaliri->ToCreature()->DespawnOrUnsummon(0s, 30s);
}

SpellCastResult CheckQuest()
{
if (Player* playerCaster = GetCaster()->ToPlayer())
{
if (playerCaster->GetQuestStatus(QUEST_FIRES_OVER_SKETTIS) == QUEST_STATUS_INCOMPLETE)
return SPELL_CAST_OK;
}
return SPELL_FAILED_DONT_REPORT;
}

void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_item_skyguard_blasting_charges::HandleOpenObject, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT);
OnEffectHitTarget += SpellEffectFn(spell_item_skyguard_blasting_charges::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnCheckCast += SpellCheckCastFn(spell_item_skyguard_blasting_charges::CheckQuest);
}
};

void AddSC_item_spell_scripts()
{
RegisterSpellScript(spell_item_massive_seaforium_charge);
Expand Down Expand Up @@ -4175,4 +4215,5 @@ void AddSC_item_spell_scripts()
RegisterSpellAndAuraScriptPair(spell_item_eye_of_grillok, spell_item_eye_of_grillok_aura);
RegisterSpellScript(spell_item_fel_mana_potion);
RegisterSpellScript(spell_item_gor_dreks_ointment);
RegisterSpellScript(spell_item_skyguard_blasting_charges);
}