From 6fe923fdd3a6b2d245e84581d776960440b49027 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Fri, 31 May 2013 14:09:34 +0200 Subject: DB/SAI: fix mobs spaming some events Fix by Kirkhammett and FireEmerald --- sql/updates/world/2013_05_31_00_world_misc.sql | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sql/updates/world/2013_05_31_00_world_misc.sql diff --git a/sql/updates/world/2013_05_31_00_world_misc.sql b/sql/updates/world/2013_05_31_00_world_misc.sql new file mode 100644 index 00000000000..1bc46748f96 --- /dev/null +++ b/sql/updates/world/2013_05_31_00_world_misc.sql @@ -0,0 +1,35 @@ +-- DB/Misc: Fix: Prevent chat/spell flood, Prevent summon spells from overwriting. + +-- Prevent chat/spell flood +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2358 AND `source_type`=0 AND `id`=9 AND `link`=10; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2358 AND `source_type`=0 AND `id`=10 AND `link`=0; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2358 AND `source_type`=0 AND `id`=11 AND `link`=12; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2358 AND `source_type`=0 AND `id`=12 AND `link`=0; + +-- Prevent chat flood / ..run away in fear! / Manually checked one by one! (64 NPC's) +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (429,453,548,1166,1867,1920,2369,4063,5839,7075,11319,11324,15281,15401,15417,15938,15945,15970,15971,16204) AND `source_type` = 0 AND `id` = 12 AND `link` = 13; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (429,453,548,1166,1867,1920,2369,4063,5839,7075,11319,11324,15281,15401,15417,15938,15945,15970,15971,16204) AND `source_type` = 0 AND `id` = 13 AND `link` = 0; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (1065,1173,1397,1914,1915,2120,2371,2376,6008,8550,9449,16249,16318,16337) AND `source_type` = 0 AND `id` = 13 AND `link` = 14; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (1065,1124,1173,1397,1914,1915,2120,2245,2371,2376,6008,8550,9449,16249,16318,16337) AND `source_type` = 0 AND `id` = 14 AND `link` = 0; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (1889,2375,2387,8566,9450,16317,16344,25073) AND `source_type` = 0 AND `id` = 14 AND `link` = 15; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (1124,1889,2375,2387,8566,9450,16317,16344,25073) AND `source_type` = 0 AND `id` = 15 AND `link` = 0; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (1123,1162,2245,2554,9451,16403) AND `source_type` = 0 AND `id` = 15 AND `link` = 16; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (1009,1013,1123,1162,2554,7246,9451,16403) AND `source_type` = 0 AND `id` = 16 AND `link` = 0; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (2276,2428,4064,4463,10824,12322) AND `source_type` = 0 AND `id` = 16 AND `link` = 17; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (2276,2428,4064,4463,10824,12322) AND `source_type` = 0 AND `id` = 17 AND `link` = 0; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (436,4462,17694) AND `source_type` = 0 AND `id` = 17 AND `link` = 18; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` IN (436,4462,17694) AND `source_type` = 0 AND `id` = 18 AND `link` = 0; +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` = 8564 AND `source_type` = 0 AND `id` = 18 AND `link` = 19; -- Ranger - Allow Combat Movement +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` = 8564 AND `source_type` = 0 AND `id` = 19 AND `link` = 0; -- Ranger - Flee For Assist +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` = 24683 AND `source_type` = 0 AND `id` = 19 AND `link` = 20; -- Sunblade Mage Guard - Allow Combat Movement +UPDATE `smart_scripts` SET `event_flags` = 1 WHERE `entryorguid` = 24683 AND `source_type` = 0 AND `id` = 20 AND `link` = 0; -- Sunblade Mage Guard - Flee For Assist + +-- Prevent summon spells from overwriting each other's cast time, earlier script had wrong timers.. +UPDATE `smart_scripts` SET `link`=15 WHERE `entryorguid`=1124 AND `source_type`=0 AND `id`=14 AND `link`=01; +UPDATE `smart_scripts` SET `event_type`=61, `event_flags`=1 WHERE `entryorguid`=1124 AND `source_type`=0 AND `id`=15 AND `link`=0; +UPDATE `smart_scripts` SET `event_param1`=9100, `event_param2`=14900 WHERE `entryorguid`=2358 AND `source_type`=0 AND `id`=9 AND `link`=10; +UPDATE `smart_scripts` SET `event_param1`=4700, `event_param2`=11100 WHERE `entryorguid`=2358 AND `source_type`=0 AND `id`=11 AND `link`=12; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid` IN (429,453) AND `source_type`=0 AND `id`=12 AND `link`=13; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid` IN (1009,1065,1397) AND `source_type`=0 AND `id`=13 AND `link`=14; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid` IN (1009,1013,1123,2245,2554) AND `source_type`=0 AND `id`=15 AND `link`=16; +UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid` = 1009 AND `source_type`=0 AND `id`=14 AND `link`=15; -- cgit v1.2.3 From 905ca8e1e4eba81b4183873731ce4ad6475a136b Mon Sep 17 00:00:00 2001 From: Subv Date: Fri, 31 May 2013 12:38:05 -0500 Subject: Core/Movement: Follower creatures in a formation will now follow their leader when the leader was moved with PointMovementGenerator --- .../Movement/MovementGenerators/PointMovementGenerator.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index ea7a8c4c710..51a23b84342 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -42,6 +42,11 @@ void PointMovementGenerator::DoInitialize(T* unit) if (speed > 0.0f) init.SetVelocity(speed); init.Launch(); + + //Call for creature group update + if (Creature* creature = unit->ToCreature()) + if (creature->GetFormation() && creature->GetFormation()->getLeader() == creature) + creature->GetFormation()->LeaderMoveTo(i_x, i_y, i_z); } template @@ -66,6 +71,11 @@ bool PointMovementGenerator::DoUpdate(T* unit, uint32 /*diff*/) if (speed > 0.0f) // Default value for point motion type is 0.0, if 0.0 spline will use GetSpeed on unit init.SetVelocity(speed); init.Launch(); + + //Call for creature group update + if (Creature* creature = unit->ToCreature()) + if (creature->GetFormation() && creature->GetFormation()->getLeader() == creature) + creature->GetFormation()->LeaderMoveTo(i_x, i_y, i_z); } return !unit->movespline->Finalized(); -- cgit v1.2.3 From 16e1703872653f14e0b77148897e4ed8ff25e653 Mon Sep 17 00:00:00 2001 From: Subv Date: Fri, 31 May 2013 12:59:33 -0500 Subject: Core/Build: Missing include. --- src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp index 51a23b84342..227780daa1f 100755 --- a/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp @@ -24,6 +24,7 @@ #include "MoveSplineInit.h" #include "MoveSpline.h" #include "Player.h" +#include "CreatureGroups.h" //----- Point Movement Generator template -- cgit v1.2.3 From a78480d56e35bccaf3d673a81ec967b55fe423ae Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 1 Jun 2013 13:58:05 +0200 Subject: Core: Advance logging - Log guid in SmartScript::IsSmart and SmartScript::IsSmartGO - Prevent false positive for missing game_graveyard_zone data for battlegrounds --- src/server/game/AI/SmartScripts/SmartScript.h | 4 ++-- src/server/game/Globals/ObjectMgr.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 409d0e7d324..6801c132331 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -117,7 +117,7 @@ class SmartScript smart = false; if (!smart) - TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target Creature(entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetEntry() : (me ? me->GetEntry() : 0)); + TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target Creature (GUID: %u Entry: %u) is not using SmartAI, action skipped to prevent crash.", c ? c->GetDBTableGUIDLow() : (me ? me->GetDBTableGUIDLow() : 0), c ? c->GetEntry() : (me ? me->GetEntry() : 0)); return smart; } @@ -131,7 +131,7 @@ class SmartScript if (!go || go->GetAIName() != "SmartGameObjectAI") smart = false; if (!smart) - TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target GameObject(entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetEntry() : (go ? go->GetEntry() : 0)); + TC_LOG_ERROR(LOG_FILTER_SQL, "SmartScript: Action target GameObject (GUID: %u Entry: %u) is not using SmartGameObjectAI, action skipped to prevent crash.", g ? g->GetDBTableGUIDLow() : (go ? go->GetDBTableGUIDLow() : 0), g ? g->GetEntry() : (go ? go->GetEntry() : 0)); return smart; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index e684de730da..2290a7c088e 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5724,7 +5724,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveYard(float x, float y, float MapEntry const* map = sMapStore.LookupEntry(MapId); // not need to check validity of map object; MapId _MUST_ be valid here - if (range.first == range.second && !map->IsBattleArena()) + if (range.first == range.second && !map->IsBattlegroundOrArena()) { TC_LOG_ERROR(LOG_FILTER_SQL, "Table `game_graveyard_zone` incomplete: Zone %u Team %u does not have a linked graveyard.", zoneId, team); return GetDefaultGraveYard(team); -- cgit v1.2.3 From e741821dc2b1db41017fdc954da0ea36a84ace3e Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 1 Jun 2013 14:36:22 +0200 Subject: DB: Fishing loot for Pit Of Saron http://www.elsanglin.com/forums/topic/pit-of-saron --- .../world/2013_06_01_01_world_fishing_loot_template.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/2013_06_01_01_world_fishing_loot_template.sql diff --git a/sql/updates/world/2013_06_01_01_world_fishing_loot_template.sql b/sql/updates/world/2013_06_01_01_world_fishing_loot_template.sql new file mode 100644 index 00000000000..0a0d8f842fa --- /dev/null +++ b/sql/updates/world/2013_06_01_01_world_fishing_loot_template.sql @@ -0,0 +1,14 @@ +DELETE FROM `skill_fishing_base_level` WHERE `entry`=4813; +INSERT INTO `skill_fishing_base_level`(`entry`,`skill`) VALUE +(4813,450); + +DELETE FROM `fishing_loot_template` WHERE `entry`=4813; +INSERT INTO `fishing_loot_template`(`entry`,`item`,`ChanceOrQuestChance`,`groupid`) VALUES +(4813,41808,58,1), +(4813,43572,20.5,1), +(4813,36794,5.4,1), +(4813,4875,5,1), +(4813,3671,4.5,1), +(4813,25447,4.5,1), +(4813,44475,1.1,1), +(4813,37705,1,1); -- cgit v1.2.3 From 9251a605445a6f6ffe77b4fab03d368c93fcdacd Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 1 Jun 2013 14:36:59 +0200 Subject: DB/SAI: Assign SmartAI and remove needless SmartScript (See core script) --- sql/updates/world/2013_06_01_00_world_creature_template.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2013_06_01_00_world_creature_template.sql diff --git a/sql/updates/world/2013_06_01_00_world_creature_template.sql b/sql/updates/world/2013_06_01_00_world_creature_template.sql new file mode 100644 index 00000000000..1c56f1979f8 --- /dev/null +++ b/sql/updates/world/2013_06_01_00_world_creature_template.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (24021,3094,23905,27376,27378,27379,27381); +DELETE FROM `smart_scripts` WHERE `entryorguid`=26917; -- cgit v1.2.3 From 891d97ec4cef21d3131ee11d5cce64a300b02ea4 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 1 Jun 2013 17:47:02 +0200 Subject: Core/Movement * Changed speed selection for flying creatures - use MOVE_RUN by default. * Do not add MOVEMENTFLAG_WALKING to creatures that did not have it but called .SetWalk for their movement --- src/server/game/Movement/Spline/MoveSplineInit.cpp | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp index 192a539db54..2f4224c8b91 100644 --- a/src/server/game/Movement/Spline/MoveSplineInit.cpp +++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp @@ -29,11 +29,7 @@ namespace Movement { UnitMoveType SelectSpeedType(uint32 moveFlags) { - /*! Not sure about MOVEMENTFLAG_CAN_FLY here - do creatures that can fly - but are on ground right now also have it? If yes, this needs a more - dynamic check, such as is flying now - */ - if (moveFlags & (MOVEMENTFLAG_FLYING | MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY)) + if (moveFlags & MOVEMENTFLAG_FLYING) { if (moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.flight >= speed_obj.flight_back*/) return MOVE_FLIGHT_BACK; @@ -55,6 +51,8 @@ namespace Movement else if (moveFlags & MOVEMENTFLAG_BACKWARD /*&& speed_obj.run >= speed_obj.run_back*/) return MOVE_RUN_BACK; + // Flying creatures use MOVEMENTFLAG_CAN_FLY or MOVEMENTFLAG_DISABLE_GRAVITY + // Run speed is their default flight speed. return MOVE_RUN; } @@ -90,22 +88,25 @@ namespace Movement move_spline.onTransport = transport; uint32 moveFlags = unit->m_movementInfo.GetMovementFlags(); - if (args.flags.walkmode) - moveFlags |= MOVEMENTFLAG_WALKING; - else - moveFlags &= ~MOVEMENTFLAG_WALKING; - moveFlags |= (MOVEMENTFLAG_SPLINE_ENABLED|MOVEMENTFLAG_FORWARD); + if (moveFlags & MOVEMENTFLAG_ROOT) + moveFlags &= ~MOVEMENTFLAG_MASK_MOVING; + if (!args.HasVelocity) - args.velocity = unit->GetSpeed(SelectSpeedType(moveFlags)); + { + // If spline is initialized with SetWalk method it only means we need to select + // walk move speed for it but not add walk flag to unit + uint32 moveFlagsForSpeed = moveFlags; + if (args.flags.walkmode) + moveFlagsForSpeed |= MOVEMENTFLAG_WALKING; + + args.velocity = unit->GetSpeed(SelectSpeedType(moveFlagsForSpeed)); + } if (!args.Validate(unit)) return 0; - if (moveFlags & MOVEMENTFLAG_ROOT) - moveFlags &= ~MOVEMENTFLAG_MASK_MOVING; - unit->m_movementInfo.SetMovementFlags((MovementFlags)moveFlags); move_spline.Initialize(args); -- cgit v1.2.3 From fb718d20aa23409c4ea695950d731d7887e87dc2 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 1 Jun 2013 18:30:36 +0200 Subject: Core/Scripts: Always run OnSpellClick AI hook, even if there are no spells defined for spellclick event. --- src/server/game/AI/CreatureAI.h | 2 +- src/server/game/AI/SmartScripts/SmartAI.cpp | 5 ++++- src/server/game/AI/SmartScripts/SmartAI.h | 2 +- src/server/game/Entities/Unit/Unit.cpp | 9 +++------ .../Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp | 5 ++++- .../scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp | 5 ++++- src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp | 4 +++- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index 9d61ec0a214..3d71abb47a9 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -169,7 +169,7 @@ class CreatureAI : public UnitAI virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) {} - virtual void OnSpellClick(Unit* /*clicker*/) { } + virtual void OnSpellClick(Unit* /*clicker*/, bool& /*result*/) { } virtual bool CanSeeAlways(WorldObject const* /*obj*/) { return false; } protected: diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 96979cf2c49..a2612df2f89 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -828,8 +828,11 @@ void SmartAI::sOnGameEvent(bool start, uint16 eventId) GetScript()->ProcessEventsFor(start ? SMART_EVENT_GAME_EVENT_START : SMART_EVENT_GAME_EVENT_END, NULL, eventId); } -void SmartAI::OnSpellClick(Unit* clicker) +void SmartAI::OnSpellClick(Unit* clicker, bool& result) { + if (!result) + return; + GetScript()->ProcessEventsFor(SMART_EVENT_ON_SPELLCLICK, clicker); } diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index dee6bec905c..4b4909e9c6c 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -197,7 +197,7 @@ class SmartAI : public CreatureAI void RemoveAuras(); - void OnSpellClick(Unit* clicker); + void OnSpellClick(Unit* clicker, bool& result); private: uint32 mFollowCreditType; diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index d8137864ded..4ad2a06a61e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16801,12 +16801,9 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId) result = true; } - if (result) - { - Creature* creature = ToCreature(); - if (creature && creature->IsAIEnabled) - creature->AI()->OnSpellClick(clicker); - } + Creature* creature = ToCreature(); + if (creature && creature->IsAIEnabled) + creature->AI()->OnSpellClick(clicker, result); return result; } diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index 97a70f43c27..259f2c28300 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -1013,8 +1013,11 @@ class npc_dream_portal : public CreatureScript { } - void OnSpellClick(Unit* /*clicker*/) + void OnSpellClick(Unit* /*clicker*/, bool& result) { + if (!result) + return; + _used = true; me->DespawnOrUnsummon(); } diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp index f89112e3d67..37ecf7874b8 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp @@ -709,8 +709,11 @@ class boss_flame_leviathan_overload_device : public CreatureScript { } - void OnSpellClick(Unit* /*clicker*/) + void OnSpellClick(Unit* /*clicker*/, bool& result) { + if (!result) + return; + if (me->GetVehicle()) { me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp index 105b4757066..97554a63217 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp @@ -1421,8 +1421,10 @@ class npc_descend_into_madness : public CreatureScript { npc_descend_into_madnessAI(Creature* creature) : PassiveAI(creature), _instance(creature->GetInstanceScript()) { } - void OnSpellClick(Unit* clicker) + void OnSpellClick(Unit* clicker, bool& result) { + if (!result) + return; clicker->RemoveAurasDueToSpell(SPELL_BRAIN_LINK); me->DespawnOrUnsummon(); } -- cgit v1.2.3