Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
49 changes: 49 additions & 0 deletions sql/custom/world/EG_2026_02_13_00_misc.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
-- The Exorcism Bubbling Slimer Bunny (DND) smart ai
SET @ENTRY := 22505;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 11, 39300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Cast spell Quest - The Exorcism Bubbling Slimer (39300) on Self'),
(@ENTRY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 146, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Set uninteractable'),
(@ENTRY, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Set react state to Passive'),
(@ENTRY, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Set rooted'),
(@ENTRY, 0, 4, 0, 60, 0, 100, 0, 5000, 10000, 15000, 30000, 11, 39302, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Every 15 - 30 seconds (5 - 10s initially) - Self: Cast spell Quest - The Exorcism, Summon Foul Purge (39302) on Self');


DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 22505 AND `SourceId` = 0;

-- Correct condition set, because previously you could start the event again even though the quest was finished.
DELETE FROM `gossip_menu_option` WHERE `MenuID` = 8539;
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
(8539, 1, 0, 'I am ready, Anchorite. Let us begin the exorcism.', 20396, 1, 3, 0, 0, 0, 0, NULL, 0, 0);
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 15) AND (`SourceGroup` IN (8539));
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
(15, 8539, 1, 0, 0, 9, 0, 10935, 0, 0, 0, 'Player for which gossip text is shown has quest The Exorcism of Colonel Jules (10935) active');

-- Sleeping is not necessary here because a spell takes care of that
UPDATE `creature_template_addon` SET `StandState` = 0 WHERE `entry` = 22432;

-- Delete non-working Linked spell entry
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 39371;

-- Darkness Released smart ai
SET @ENTRY := 22507;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(@ENTRY, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 89, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Move randomly in radius 15 yards'),
(@ENTRY, 0, 1, 0, 8, 0, 100, 0, 39371, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On spell Prayer Beads (39371) hit - Self: Die');


DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 22507 AND `SourceId` = 0;

-- Spellscript Entry
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'EG_spell_prayer_beads';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(39371, 'EG_spell_prayer_beads');

UPDATE `creature` SET `orientation` = 4.79 WHERE (`guid` = 78786);

DELETE FROM `creature_template_movement` WHERE `CreatureId`= 22507;
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
(22507, 0, 0, 1, 0, 0, 0, 0);
2 changes: 2 additions & 0 deletions src/server/game/Entities/Object/Object.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <list>
#include <set>
#include <unordered_map>
#include <unordered_set>

class Corpse;
class Creature;
Expand Down Expand Up @@ -298,6 +299,7 @@ class FlaggedValuesArray32
struct FindCreatureOptions
{
Optional<uint32> CreatureId;
std::unordered_set<uint32> CreatureIds;
Optional<std::string_view> StringId;

Optional<bool> IsAlive;
Expand Down
3 changes: 3 additions & 0 deletions src/server/game/Grids/Notifiers/GridNotifiers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,9 @@ namespace Trinity
if (i_args.CreatureId && u->GetEntry() != i_args.CreatureId)
return false;

if (!i_args.CreatureIds.contains(u->GetEntry()))
return false;

if (i_args.StringId && !u->HasStringId(*i_args.StringId))
return false;

Expand Down
31 changes: 31 additions & 0 deletions src/server/scripts/Custom/Spells/EG_gen_spell_scripts.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "ScriptMgr.h"
#include "Creature.h"
#include "Spell.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
Expand Down Expand Up @@ -167,6 +168,35 @@ class EG_spell_charm_drakuru_servant : public AuraScript
}
};

enum SpellRitualPrayerBeads
{
SPELL_HEAL_BARADA = 39322,
NPC_ANCHORITE_BARADA = 22431
};

// 39371 - Prayer Beads
class EG_spell_prayer_beads : public SpellScript
{
PrepareSpellScript(EG_spell_prayer_beads);

void HandleHit()
{
Unit* caster = GetCaster();
Creature* target = GetHitCreature();
if (!caster || !target)
return;

uint32 entry = target->GetEntry();
if (entry == NPC_ANCHORITE_BARADA)
caster->CastSpell(target, SPELL_HEAL_BARADA, true);
}

void Register() override
{
OnHit += SpellHitFn(EG_spell_prayer_beads::HandleHit);
}
};

void AddSC_EG_gen_spell_scripts()
{
RegisterSpellScript(EG_spell_Cosmetic___Divine_Shield_Blue);
Expand All @@ -175,4 +205,5 @@ void AddSC_EG_gen_spell_scripts()
RegisterSpellScript(EG_spell_fel_reaver_controller);
RegisterSpellScript(EG_spell_charm_channel);
RegisterSpellScript(EG_spell_charm_drakuru_servant);
RegisterSpellScript(EG_spell_prayer_beads);
}
Loading
Loading