mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
5
data/sql/updates/db_world/2023_12_12_13.sql
Normal file
5
data/sql/updates/db_world/2023_12_12_13.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- DB update 2023_12_12_12 -> 2023_12_12_13
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 21218) AND (`source_type` = 0) AND (`id` IN (2));
|
||||
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(21218, 0, 2, 0, 2, 0, 100, 0, 0, 40, 13000, 17000, 0, 11, 38945, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Vashj\'ir Honor Guard - Between 0-40% Health - Cast \'Frightening Shout\'');
|
||||
3
data/sql/updates/db_world/2023_12_12_14.sql
Normal file
3
data/sql/updates/db_world/2023_12_12_14.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2023_12_12_13 -> 2023_12_12_14
|
||||
--
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`&~33554432 WHERE `entry` = 21964;
|
||||
215
data/sql/updates/db_world/2023_12_12_15.sql
Normal file
215
data/sql/updates/db_world/2023_12_12_15.sql
Normal file
@@ -0,0 +1,215 @@
|
||||
-- DB update 2023_12_12_14 -> 2023_12_12_15
|
||||
--
|
||||
UPDATE `creature` SET `spawntimesecs` = 7200 WHERE `guid` IN
|
||||
(153016, 153017, 153003, 153005, 153001, 153004, 153002, 153007, 153009, 153006, 153010, 153008, 153013, 153015, 153011, 153014, 153012,
|
||||
153026, 153025, 153022, 153024, 153023, 153027, 153028, 153029, 153030, 153035, 153034, 153031, 153032, 153033, 153036, 153038, 153037, 153039, 153044, 153043, 153040, 153041, 153042, 153045, 153046, 153047, 153048, 153053, 153052, 153049, 153051, 153050, 153054, 153055, 153056, 153057, 153062, 153061, 153058, 153060, 153059, 153063, 153064, 153065, 153066, 153071, 153070, 153067, 153068, 153069, 153072, 153073, 153074, 153075,
|
||||
153077, 153076, 153079, 153080, 153081, 153078, 153082, 153087, 153084, 153085, 153083, 153086, 153100, 153094, 153099, 153097, 153098, 153096, 153095, 153109, 153108, 153107, 153106, 153194, 153193, 153189, 153192, 153191, 153190, 153176, 153170, 153175, 153174, 153172, 153173, 153171, 153186, 153185, 153184, 153188, 153187, 153183, 153182, 153177, 153181, 153178, 153180, 153179, 153165, 153166, 153164, 153167, 153168,
|
||||
153101, 153088, 153092, 153090, 153091, 153089, 153104, 153102, 153103, 153105, 153115, 153116, 153117, 153118, 153121, 153120, 153119, 153126, 153125, 153124, 153123, 153122, 153131, 153129, 153132, 153127, 153128, 153130, 153138, 153137, 153136, 153135, 153133, 153134,
|
||||
153113, 153111, 153110, 153112, 153114, 153144, 153143, 153145, 153147, 153146, 153148, 153162, 153160, 153159, 153161, 153163, 153152, 153150, 153149, 153153, 153151);
|
||||
|
||||
SET @HYDROSS := 153018;
|
||||
DELETE FROM `linked_respawn` WHERE `linkedGuid` = @HYDROSS;
|
||||
INSERT INTO `linked_respawn`(`guid`, `linkedGuid`, `linkType`) VALUES
|
||||
(153016, @HYDROSS, 0),
|
||||
(153017, @HYDROSS, 0),
|
||||
(153003, @HYDROSS, 0),
|
||||
(153005, @HYDROSS, 0),
|
||||
(153001, @HYDROSS, 0),
|
||||
(153004, @HYDROSS, 0),
|
||||
(153002, @HYDROSS, 0),
|
||||
(153007, @HYDROSS, 0),
|
||||
(153009, @HYDROSS, 0),
|
||||
(153006, @HYDROSS, 0),
|
||||
(153010, @HYDROSS, 0),
|
||||
(153008, @HYDROSS, 0),
|
||||
(153013, @HYDROSS, 0),
|
||||
(153015, @HYDROSS, 0),
|
||||
(153011, @HYDROSS, 0),
|
||||
(153014, @HYDROSS, 0),
|
||||
(153012, @HYDROSS, 0);
|
||||
|
||||
SET @STRANGE_POOL := 16818;
|
||||
DELETE FROM `linked_respawn` WHERE `linkedGuid` = @STRANGE_POOL;
|
||||
INSERT INTO `linked_respawn`(`guid`, `linkedGuid`, `linkType`) VALUES
|
||||
(153026, @STRANGE_POOL, 1),
|
||||
(153025, @STRANGE_POOL, 1),
|
||||
(153022, @STRANGE_POOL, 1),
|
||||
(153024, @STRANGE_POOL, 1),
|
||||
(153023, @STRANGE_POOL, 1),
|
||||
(153027, @STRANGE_POOL, 1),
|
||||
(153028, @STRANGE_POOL, 1),
|
||||
(153029, @STRANGE_POOL, 1),
|
||||
(153030, @STRANGE_POOL, 1),
|
||||
(153035, @STRANGE_POOL, 1),
|
||||
(153034, @STRANGE_POOL, 1),
|
||||
(153031, @STRANGE_POOL, 1),
|
||||
(153032, @STRANGE_POOL, 1),
|
||||
(153033, @STRANGE_POOL, 1),
|
||||
(153036, @STRANGE_POOL, 1),
|
||||
(153038, @STRANGE_POOL, 1),
|
||||
(153037, @STRANGE_POOL, 1),
|
||||
(153039, @STRANGE_POOL, 1),
|
||||
(153044, @STRANGE_POOL, 1),
|
||||
(153043, @STRANGE_POOL, 1),
|
||||
(153040, @STRANGE_POOL, 1),
|
||||
(153041, @STRANGE_POOL, 1),
|
||||
(153042, @STRANGE_POOL, 1),
|
||||
(153045, @STRANGE_POOL, 1),
|
||||
(153046, @STRANGE_POOL, 1),
|
||||
(153047, @STRANGE_POOL, 1),
|
||||
(153048, @STRANGE_POOL, 1),
|
||||
(153053, @STRANGE_POOL, 1),
|
||||
(153052, @STRANGE_POOL, 1),
|
||||
(153049, @STRANGE_POOL, 1),
|
||||
(153051, @STRANGE_POOL, 1),
|
||||
(153050, @STRANGE_POOL, 1),
|
||||
(153054, @STRANGE_POOL, 1),
|
||||
(153055, @STRANGE_POOL, 1),
|
||||
(153056, @STRANGE_POOL, 1),
|
||||
(153057, @STRANGE_POOL, 1),
|
||||
(153062, @STRANGE_POOL, 1),
|
||||
(153061, @STRANGE_POOL, 1),
|
||||
(153058, @STRANGE_POOL, 1),
|
||||
(153060, @STRANGE_POOL, 1),
|
||||
(153059, @STRANGE_POOL, 1),
|
||||
(153063, @STRANGE_POOL, 1),
|
||||
(153064, @STRANGE_POOL, 1),
|
||||
(153065, @STRANGE_POOL, 1),
|
||||
(153066, @STRANGE_POOL, 1),
|
||||
(153071, @STRANGE_POOL, 1),
|
||||
(153070, @STRANGE_POOL, 1),
|
||||
(153067, @STRANGE_POOL, 1),
|
||||
(153068, @STRANGE_POOL, 1),
|
||||
(153069, @STRANGE_POOL, 1),
|
||||
(153072, @STRANGE_POOL, 1),
|
||||
(153073, @STRANGE_POOL, 1),
|
||||
(153074, @STRANGE_POOL, 1),
|
||||
(153075, @STRANGE_POOL, 1);
|
||||
|
||||
SET @MOROGRIM := 153169;
|
||||
DELETE FROM `linked_respawn` WHERE `linkedGuid` = @MOROGRIM;
|
||||
INSERT INTO `linked_respawn`(`guid`, `linkedGuid`, `linkType`) VALUES
|
||||
(153077, @MOROGRIM, 0),
|
||||
(153076, @MOROGRIM, 0),
|
||||
(153079, @MOROGRIM, 0),
|
||||
(153080, @MOROGRIM, 0),
|
||||
(153081, @MOROGRIM, 0),
|
||||
(153078, @MOROGRIM, 0),
|
||||
(153082, @MOROGRIM, 0),
|
||||
(153087, @MOROGRIM, 0),
|
||||
(153084, @MOROGRIM, 0),
|
||||
(153085, @MOROGRIM, 0),
|
||||
(153083, @MOROGRIM, 0),
|
||||
(153086, @MOROGRIM, 0),
|
||||
(153100, @MOROGRIM, 0),
|
||||
(153094, @MOROGRIM, 0),
|
||||
(153099, @MOROGRIM, 0),
|
||||
(153097, @MOROGRIM, 0),
|
||||
(153098, @MOROGRIM, 0),
|
||||
(153096, @MOROGRIM, 0),
|
||||
(153095, @MOROGRIM, 0),
|
||||
(153109, @MOROGRIM, 0),
|
||||
(153108, @MOROGRIM, 0),
|
||||
(153107, @MOROGRIM, 0),
|
||||
(153106, @MOROGRIM, 0),
|
||||
(153194, @MOROGRIM, 0),
|
||||
(153193, @MOROGRIM, 0),
|
||||
(153189, @MOROGRIM, 0),
|
||||
(153192, @MOROGRIM, 0),
|
||||
(153191, @MOROGRIM, 0),
|
||||
(153190, @MOROGRIM, 0),
|
||||
(153176, @MOROGRIM, 0),
|
||||
(153170, @MOROGRIM, 0),
|
||||
(153175, @MOROGRIM, 0),
|
||||
(153174, @MOROGRIM, 0),
|
||||
(153172, @MOROGRIM, 0),
|
||||
(153173, @MOROGRIM, 0),
|
||||
(153171, @MOROGRIM, 0),
|
||||
(153186, @MOROGRIM, 0),
|
||||
(153185, @MOROGRIM, 0),
|
||||
(153184, @MOROGRIM, 0),
|
||||
(153188, @MOROGRIM, 0),
|
||||
(153187, @MOROGRIM, 0),
|
||||
(153183, @MOROGRIM, 0),
|
||||
(153182, @MOROGRIM, 0),
|
||||
(153177, @MOROGRIM, 0),
|
||||
(153181, @MOROGRIM, 0),
|
||||
(153178, @MOROGRIM, 0),
|
||||
(153180, @MOROGRIM, 0),
|
||||
(153179, @MOROGRIM, 0),
|
||||
(153165, @MOROGRIM, 0),
|
||||
(153166, @MOROGRIM, 0),
|
||||
(153164, @MOROGRIM, 0),
|
||||
(153167, @MOROGRIM, 0),
|
||||
(153168, @MOROGRIM, 0);
|
||||
|
||||
SET @LEOTHERAS := 153139;
|
||||
DELETE FROM `linked_respawn` WHERE `linkedGuid` = @LEOTHERAS;
|
||||
INSERT INTO `linked_respawn`(`guid`, `linkedGuid`, `linkType`) VALUES
|
||||
(153101, @LEOTHERAS, 0),
|
||||
(153088, @LEOTHERAS, 0),
|
||||
(153092, @LEOTHERAS, 0),
|
||||
(153090, @LEOTHERAS, 0),
|
||||
(153091, @LEOTHERAS, 0),
|
||||
(153089, @LEOTHERAS, 0),
|
||||
(153104, @LEOTHERAS, 0),
|
||||
(153102, @LEOTHERAS, 0),
|
||||
(153103, @LEOTHERAS, 0),
|
||||
(153105, @LEOTHERAS, 0),
|
||||
(153115, @LEOTHERAS, 0),
|
||||
(153116, @LEOTHERAS, 0),
|
||||
(153117, @LEOTHERAS, 0),
|
||||
(153118, @LEOTHERAS, 0),
|
||||
(153121, @LEOTHERAS, 0),
|
||||
(153120, @LEOTHERAS, 0),
|
||||
(153119, @LEOTHERAS, 0),
|
||||
(153126, @LEOTHERAS, 0),
|
||||
(153125, @LEOTHERAS, 0),
|
||||
(153124, @LEOTHERAS, 0),
|
||||
(153123, @LEOTHERAS, 0),
|
||||
(153122, @LEOTHERAS, 0),
|
||||
(153131, @LEOTHERAS, 0),
|
||||
(153129, @LEOTHERAS, 0),
|
||||
(153132, @LEOTHERAS, 0),
|
||||
(153127, @LEOTHERAS, 0),
|
||||
(153128, @LEOTHERAS, 0),
|
||||
(153130, @LEOTHERAS, 0),
|
||||
(153138, @LEOTHERAS, 0),
|
||||
(153137, @LEOTHERAS, 0),
|
||||
(153136, @LEOTHERAS, 0),
|
||||
(153135, @LEOTHERAS, 0),
|
||||
(153133, @LEOTHERAS, 0),
|
||||
(153134, @LEOTHERAS, 0);
|
||||
|
||||
-- Leotheras formation
|
||||
DELETE FROM `creature_formations` WHERE `leaderGUID` = @LEOTHERAS;
|
||||
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `groupAI`) VALUES
|
||||
(@LEOTHERAS, @LEOTHERAS, 24),
|
||||
(@LEOTHERAS, @LEOTHERAS+1, 24),
|
||||
(@LEOTHERAS, @LEOTHERAS+2, 24),
|
||||
(@LEOTHERAS, @LEOTHERAS+3, 24);
|
||||
|
||||
SET @KARATHRESS := 153154;
|
||||
DELETE FROM `linked_respawn` WHERE `linkedGuid` = @KARATHRESS;
|
||||
INSERT INTO `linked_respawn`(`guid`, `linkedGuid`, `linkType`) VALUES
|
||||
(153113, @KARATHRESS, 0),
|
||||
(153111, @KARATHRESS, 0),
|
||||
(153110, @KARATHRESS, 0),
|
||||
(153112, @KARATHRESS, 0),
|
||||
(153114, @KARATHRESS, 0),
|
||||
(153144, @KARATHRESS, 0),
|
||||
(153143, @KARATHRESS, 0),
|
||||
(153145, @KARATHRESS, 0),
|
||||
(153147, @KARATHRESS, 0),
|
||||
(153146, @KARATHRESS, 0),
|
||||
(153148, @KARATHRESS, 0),
|
||||
(153162, @KARATHRESS, 0),
|
||||
(153160, @KARATHRESS, 0),
|
||||
(153159, @KARATHRESS, 0),
|
||||
(153161, @KARATHRESS, 0),
|
||||
(153163, @KARATHRESS, 0),
|
||||
(153152, @KARATHRESS, 0),
|
||||
(153150, @KARATHRESS, 0),
|
||||
(153149, @KARATHRESS, 0),
|
||||
(153153, @KARATHRESS, 0),
|
||||
(153151, @KARATHRESS, 0);
|
||||
9
data/sql/updates/db_world/2023_12_12_16.sql
Normal file
9
data/sql/updates/db_world/2023_12_12_16.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- DB update 2023_12_12_15 -> 2023_12_12_16
|
||||
--
|
||||
UPDATE `creature_template` SET `scale` = 0.5, `unit_flags` = `unit_flags`|2048|524288, `mechanic_immune_mask` = 1073741823, `AIName` = '', `ScriptName` = 'npc_rancid_mushroom' WHERE `entry` = 22250;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 38652 AND `ScriptName` = 'spell_rancid_spore_cloud';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(38652, 'spell_rancid_spore_cloud');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 22250 AND `source_type` = 0;
|
||||
@@ -68,10 +68,12 @@ public:
|
||||
virtual bool CanBeSeen(Player const* /*seer*/) { return true; }
|
||||
|
||||
// Called when the gameobject summon successfully other creature
|
||||
virtual void JustSummoned(Creature* /*summon*/) { }
|
||||
virtual void SummonedCreatureDespawn(Creature* /*summon*/) { }
|
||||
virtual void JustSummoned(Creature* /*summon*/) {}
|
||||
virtual void SummonedCreatureDespawn(Creature* /*summon*/) {}
|
||||
|
||||
virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) { }
|
||||
virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) {}
|
||||
|
||||
virtual void SummonedCreatureEvade(Creature* /*summon*/) {}
|
||||
};
|
||||
|
||||
class NullGameObjectAI : public GameObjectAI
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "CreatureGroups.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "Log.h"
|
||||
#include "MapReference.h"
|
||||
#include "Player.h"
|
||||
@@ -222,7 +223,7 @@ void CreatureAI::EnterEvadeMode(EvadeReason why)
|
||||
me->GetVehicleKit()->Reset(true);
|
||||
}
|
||||
|
||||
// despawn bosses at reset - only verified tbc/woltk bosses with this reset type - add bosses in last line respectively (dungeon/raid) and increase array limit
|
||||
// despawn bosses at reset - only verified tbc/woltk bosses with this reset type
|
||||
CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(me->GetEntry());
|
||||
if (cInfo && cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_HARD_RESET))
|
||||
{
|
||||
@@ -321,6 +322,21 @@ bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
|
||||
formation->MemberEvaded(me);
|
||||
}
|
||||
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
{
|
||||
if (WorldObject* summoner = summon->GetSummoner())
|
||||
{
|
||||
if (summoner->ToCreature() && summoner->ToCreature()->IsAIEnabled)
|
||||
{
|
||||
summoner->ToCreature()->AI()->SummonedCreatureEvade(me);
|
||||
}
|
||||
else if (summoner->ToGameObject() && summoner->ToGameObject()->AI())
|
||||
{
|
||||
summoner->ToGameObject()->AI()->SummonedCreatureEvade(me);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,8 @@ public:
|
||||
virtual void SummonedCreatureDies(Creature* /*summon*/, Unit* /*killer*/) {}
|
||||
virtual void SummonedCreatureDespawnAll() {}
|
||||
|
||||
virtual void SummonedCreatureEvade(Creature* /*summon*/) {}
|
||||
|
||||
// Called when hit by a spell
|
||||
virtual void SpellHit(Unit* /*caster*/, SpellInfo const* /*spell*/) {}
|
||||
|
||||
|
||||
@@ -817,6 +817,11 @@ void SmartAI::SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_DIES, summon);
|
||||
}
|
||||
|
||||
void SmartAI::SummonedCreatureEvade(Creature* summon)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_EVADE, summon);
|
||||
}
|
||||
|
||||
void SmartAI::AttackStart(Unit* who)
|
||||
{
|
||||
// xinef: dont allow charmed npcs to act on their own
|
||||
@@ -1136,6 +1141,11 @@ void SmartGameObjectAI::SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_DIES, summon);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::SummonedCreatureEvade(Creature* summon)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_SUMMONED_UNIT_EVADE, summon);
|
||||
}
|
||||
|
||||
void SmartGameObjectAI::UpdateAI(uint32 diff)
|
||||
{
|
||||
GetScript()->OnUpdate(diff);
|
||||
|
||||
@@ -97,6 +97,9 @@ public:
|
||||
// Called when a summoned unit dies
|
||||
void SummonedCreatureDies(Creature* summon, Unit* killer) override;
|
||||
|
||||
// Called when a summoned unit evades
|
||||
void SummonedCreatureEvade(Creature* summon) override;
|
||||
|
||||
// Tell creature to attack and follow the victim
|
||||
void AttackStart(Unit* who) override;
|
||||
|
||||
@@ -283,6 +286,9 @@ public:
|
||||
// Called when a summoned unit dies
|
||||
void SummonedCreatureDies(Creature* summon, Unit* killer) override;
|
||||
|
||||
// Called when a summoned unit evades
|
||||
void SummonedCreatureEvade(Creature* summon) override;
|
||||
|
||||
protected:
|
||||
SmartScript mScript;
|
||||
};
|
||||
|
||||
@@ -4077,6 +4077,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
}
|
||||
case SMART_EVENT_SUMMONED_UNIT:
|
||||
case SMART_EVENT_SUMMONED_UNIT_DIES:
|
||||
case SMART_EVENT_SUMMONED_UNIT_EVADE:
|
||||
{
|
||||
if (!IsCreature(unit))
|
||||
return;
|
||||
|
||||
@@ -345,6 +345,7 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
case SMART_EVENT_INSTANCE_PLAYER_ENTER:
|
||||
case SMART_EVENT_TRANSPORT_ADDCREATURE:
|
||||
case SMART_EVENT_NEAR_PLAYERS:
|
||||
case SMART_EVENT_SUMMONED_UNIT_EVADE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -454,6 +455,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
case SMART_TARGET_ROLE_SELECTION:
|
||||
case SMART_TARGET_LOOT_RECIPIENTS:
|
||||
case SMART_EVENT_SUMMONED_UNIT_DIES:
|
||||
case SMART_EVENT_SUMMONED_UNIT_EVADE:
|
||||
case SMART_TARGET_PLAYER_RANGE:
|
||||
case SMART_TARGET_CLOSEST_GAMEOBJECT:
|
||||
case SMART_TARGET_SELF:
|
||||
@@ -571,6 +573,7 @@ bool SmartAIMgr::CheckUnusedEventParams(SmartScriptHolder const& e)
|
||||
case SMART_EVENT_NEAR_UNIT_NEGATION: return sizeof(SmartEvent::nearUnitNegation);
|
||||
case SMART_EVENT_AREA_CASTING: return sizeof(SmartEvent::minMaxRepeat);
|
||||
case SMART_EVENT_AREA_RANGE: return sizeof(SmartEvent::minMaxRepeat);
|
||||
case SMART_EVENT_SUMMONED_UNIT_EVADE: return sizeof(SmartEvent::summoned);
|
||||
default:
|
||||
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an event {} with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.",
|
||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetEventType());
|
||||
@@ -1060,6 +1063,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_EVENT_SUMMON_DESPAWNED:
|
||||
case SMART_EVENT_SUMMONED_UNIT:
|
||||
case SMART_EVENT_SUMMONED_UNIT_DIES:
|
||||
case SMART_EVENT_SUMMONED_UNIT_EVADE:
|
||||
if (e.event.summoned.creature && !IsCreatureValid(e, e.event.summoned.creature))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -212,8 +212,9 @@ enum SMART_EVENT
|
||||
SMART_EVENT_NEAR_UNIT_NEGATION = 104, // type (0: creature 1: gob), entry, count, range, timer
|
||||
SMART_EVENT_AREA_CASTING = 105, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
|
||||
SMART_EVENT_AREA_RANGE = 106, // min, max, repeatMin, repeatMax, rangeMin, rangeMax
|
||||
SMART_EVENT_SUMMONED_UNIT_EVADE = 107, // CreatureId(0 all), CooldownMin, CooldownMax
|
||||
|
||||
SMART_EVENT_AC_END = 107
|
||||
SMART_EVENT_AC_END = 108
|
||||
};
|
||||
|
||||
struct SmartEvent
|
||||
@@ -1840,7 +1841,8 @@ const uint32 SmartAIEventMask[SMART_EVENT_AC_END][2] =
|
||||
{SMART_EVENT_NEAR_UNIT, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
|
||||
{SMART_EVENT_NEAR_UNIT_NEGATION, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
|
||||
{SMART_EVENT_AREA_CASTING, SMART_SCRIPT_TYPE_MASK_CREATURE },
|
||||
{SMART_EVENT_AREA_RANGE, SMART_SCRIPT_TYPE_MASK_CREATURE }
|
||||
{SMART_EVENT_AREA_RANGE, SMART_SCRIPT_TYPE_MASK_CREATURE },
|
||||
{SMART_EVENT_SUMMONED_UNIT_EVADE, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
|
||||
};
|
||||
|
||||
enum SmartEventFlags
|
||||
|
||||
@@ -2883,6 +2883,22 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= nullptr*/)
|
||||
SendMessageToSet(WorldPackets::Misc::Playsound(sound_id).Write(), true);
|
||||
}
|
||||
|
||||
void WorldObject::PlayRadiusSound(uint32 sound_id, float radius)
|
||||
{
|
||||
std::list<Player*> targets;
|
||||
Acore::AnyPlayerInObjectRangeCheck check(this, radius, false);
|
||||
Acore::PlayerListSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(this, targets, check);
|
||||
Cell::VisitWorldObjects(this, searcher, radius);
|
||||
|
||||
for (Player* player : targets)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
player->SendDirectMessage(WorldPackets::Misc::Playsound(sound_id).Write());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= nullptr*/)
|
||||
{
|
||||
if (target)
|
||||
@@ -2895,6 +2911,22 @@ void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= nullptr*/)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldObject::PlayRadiusMusic(uint32 music_id, float radius)
|
||||
{
|
||||
std::list<Player*> targets;
|
||||
Acore::AnyPlayerInObjectRangeCheck check(this, radius, false);
|
||||
Acore::PlayerListSearcher<Acore::AnyPlayerInObjectRangeCheck> searcher(this, targets, check);
|
||||
Cell::VisitWorldObjects(this, searcher, radius);
|
||||
|
||||
for (Player* player : targets)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
player->SendDirectMessage(WorldPackets::Misc::PlayMusic(music_id).Write());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WorldObject::DestroyForNearbyPlayers()
|
||||
{
|
||||
if (!IsInWorld())
|
||||
|
||||
@@ -487,7 +487,9 @@ public:
|
||||
|
||||
void PlayDistanceSound(uint32 sound_id, Player* target = nullptr);
|
||||
void PlayDirectSound(uint32 sound_id, Player* target = nullptr);
|
||||
void PlayRadiusSound(uint32 sound_id, float radius);
|
||||
void PlayDirectMusic(uint32 music_id, Player* target = nullptr);
|
||||
void PlayRadiusMusic(uint32 music_id, float radius);
|
||||
|
||||
void SendObjectDeSpawnAnim(ObjectGuid guid);
|
||||
|
||||
|
||||
@@ -86,11 +86,12 @@ struct boss_the_lurker_below : public BossAI
|
||||
{
|
||||
if (action == ACTION_START_EVENT)
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->setAttackTimer(BASE_ATTACK, 6000);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->SetInCombatWithZone();
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +136,7 @@ struct boss_the_lurker_below : public BossAI
|
||||
me->SetFacingToObject(me->GetVictim());
|
||||
me->SetTarget();
|
||||
scheduler.RescheduleGroup(GROUP_GEYSER, 25s);
|
||||
scheduler.RescheduleGroup(GROUP_WHIRL, 18s);
|
||||
scheduler.RescheduleGroup(GROUP_WHIRL, 20s);
|
||||
scheduler.Schedule(3s, [this](TaskContext)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
@@ -146,7 +147,7 @@ struct boss_the_lurker_below : public BossAI
|
||||
{
|
||||
//phase2
|
||||
scheduler.CancelAll();
|
||||
DoCastSelf(SPELL_SUBMERGE_VISUAL, true);
|
||||
DoCastSelf(SPELL_SUBMERGE_VISUAL);
|
||||
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
|
||||
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -225,7 +226,7 @@ public:
|
||||
if (roll_chance_i(instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE ? 25 : 0) && !instance->IsEncounterInProgress())
|
||||
{
|
||||
player->CastSpell(player, SPELL_LURKER_SPAWN_TRIGGER, true);
|
||||
if (Creature* lurker = go->SummonCreature(NPC_THE_LURKER_BELOW, 40.4058f, -417.108f, -21.5911f, 3.03312f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 604800000))
|
||||
if (Creature* lurker = go->SummonCreature(NPC_THE_LURKER_BELOW, 38.4567f, -417.324f, -18.916666f, 2.94960f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
lurker->AI()->DoAction(ACTION_START_EVENT);
|
||||
return true;
|
||||
}
|
||||
@@ -243,6 +244,11 @@ class spell_lurker_below_spout : public AuraScript
|
||||
SetDuration(16000);
|
||||
}
|
||||
|
||||
void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& /*isPeriodic*/, int32& amplitude)
|
||||
{
|
||||
amplitude = 250;
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Creature* creature = GetUnitOwner()->ToCreature())
|
||||
@@ -265,6 +271,7 @@ class spell_lurker_below_spout : public AuraScript
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_lurker_below_spout::CalcPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
OnEffectApply += AuraEffectApplyFn(spell_lurker_below_spout::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_lurker_below_spout::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_lurker_below_spout::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
@@ -277,22 +284,9 @@ class spell_lurker_below_spout_cone : public SpellScript
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
targets.remove_if([caster](WorldObject const* target) -> bool
|
||||
targets.remove_if([this](WorldObject const* target) -> bool
|
||||
{
|
||||
if (!caster->HasInLine(target, 5.0f) || !target->IsPlayer())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
LiquidData const& liquidData = target->GetLiquidData();
|
||||
|
||||
if (liquidData.Status == LIQUID_MAP_UNDER_WATER)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return !GetCaster()->HasInLine(target, 5.0f) || !target->IsPlayer() || target->ToUnit()->IsInWater();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "serpent_shrine.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
@@ -308,6 +309,52 @@ class spell_serpentshrine_cavern_coilfang_water : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_rancid_mushroom : public ScriptedAI
|
||||
{
|
||||
npc_rancid_mushroom(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
enum Spells : uint32
|
||||
{
|
||||
SPELL_GROW = 31698,
|
||||
SPELL_SPORE_CLOUD = 38652
|
||||
};
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
scheduler.Schedule(1150ms, [this](TaskContext context)
|
||||
{
|
||||
DoCastSelf(SPELL_GROW);
|
||||
context.Repeat(1200ms, 3400ms);
|
||||
})
|
||||
.Schedule(22950ms, [this](TaskContext /*context*/)
|
||||
{
|
||||
DoCastSelf(SPELL_SPORE_CLOUD);
|
||||
me->KillSelf();
|
||||
});
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
scheduler.Update(diff);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_rancid_spore_cloud : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rancid_spore_cloud);
|
||||
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetCaster()->CastSpell((Unit*)nullptr, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_rancid_spore_cloud::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_serpentshrine_cavern()
|
||||
{
|
||||
new instance_serpent_shrine();
|
||||
@@ -315,5 +362,7 @@ void AddSC_instance_serpentshrine_cavern()
|
||||
RegisterSpellAndAuraScriptPair(spell_serpentshrine_cavern_serpentshrine_parasite_trigger, spell_serpentshrine_cavern_serpentshrine_parasite_trigger_aura);
|
||||
RegisterSpellScript(spell_serpentshrine_cavern_infection);
|
||||
RegisterSpellScript(spell_serpentshrine_cavern_coilfang_water);
|
||||
RegisterSerpentShrineAI(npc_rancid_mushroom);
|
||||
RegisterSpellScript(spell_rancid_spore_cloud);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user