mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
62
data/sql/updates/db_world/2022_05_17_00.sql
Normal file
62
data/sql/updates/db_world/2022_05_17_00.sql
Normal file
@@ -0,0 +1,62 @@
|
||||
-- DB update 2022_05_16_01 -> 2022_05_17_00
|
||||
-- Add Missing gossip text
|
||||
DELETE FROM `gossip_menu` WHERE `MenuID`=7346 AND `TextID`=8760;
|
||||
INSERT INTO `gossip_menu` (`MenuID`,`TextID`) VALUES (7346,8760);
|
||||
|
||||
-- Conditions for gossip text
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7346;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(14,7346,8759,0,0,8,0,9067,0,0,1,0,0,'','Show gossip text 8759 if quest ''The Party Never Ends'' is not rewarded'),
|
||||
(14,7346,8760,0,0,8,0,9067,0,0,0,0,0,'','Show gossip text 8760 if quest ''The Party Never Ends'' is rewarded');
|
||||
|
||||
-- Remove hack SAI from Fireworks Launchers
|
||||
UPDATE `gameobject_template` SET `AIName`='' WHERE `entry`=180771;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=180771 AND `source_type`=1;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=17056 AND `source_type`=0;
|
||||
-- Correct facing
|
||||
UPDATE `creature` SET `orientation`=2.14675498 WHERE `guid`=59449;
|
||||
|
||||
-- Correct equipment
|
||||
UPDATE `creature` SET `equipment_id`=0 WHERE `id1`=17056;
|
||||
-- Correct Addon
|
||||
UPDATE `creature_addon` SET `bytes1`=0,`bytes2`=1,`emote`=0 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id1`=17056);
|
||||
UPDATE `creature_addon` SET `auras`='42386' WHERE `guid` IN (59434);
|
||||
-- Move start location
|
||||
UPDATE `creature` SET `position_x`=8679.53,`position_y`=-6342.703,`position_z`=55.914032,`orientation`=6.2308254 WHERE `guid`=59444;
|
||||
|
||||
-- Add Missing meat equipment
|
||||
DELETE FROM `creature_equip_template` WHERE `CreatureID`=17056 AND `ID`=2;
|
||||
INSERT INTO `creature_equip_template` (`CreatureID`,`ID`,`ItemID1`,`ItemID2`,`ItemID3`,`VerifiedBuild`) VALUES (17056,2,2202,0,0,0);
|
||||
|
||||
-- Pathing for Eversong Partygoer Entry: 17056
|
||||
DELETE FROM `waypoint_data` WHERE `id` IN (594440,594441,594442,594443,594444);
|
||||
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
|
||||
(594440,1,8680.874,-6340.5757,55.93538,0,0,0,0,100,0),
|
||||
(594440,2,8685.874,-6338.5757,55.94099,0,0,0,0,100,0),
|
||||
(594440,3,8687.746,-6339.301,55.93539,0,0,0,0,100,0),
|
||||
(594440,4,8687.746,-6339.301,55.93539,4.502949,1000,0,0,100,0),
|
||||
(594441,1,8689.3545,-6332.7295,55.95669,0,0,0,0,100,0),
|
||||
(594441,2,8691,-6332.577,55.95949,0,0,0,0,100,0),
|
||||
(594441,3,8691,-6332.577,55.95949,5.148721,1000,0,0,100,0),
|
||||
(594442,1,8681.171,-6329.512,55.948093,0,0,0,0,100,0),
|
||||
(594442,2,8681.171,-6329.512,55.948093,2.303835,1000,0,0,100,0),
|
||||
(594443,1,8675.356,-6334.1494,55.932705,0,0,0,0,100,0),
|
||||
(594443,2,8675.356,-6334.1494,55.932705,3.124139,1000,0,0,100,0),
|
||||
(594444,1,8678.709,-6342.523,55.915527,0,0,0,0,100,0),
|
||||
(594444,2,8679.53,-6342.703,55.914032,0,0,0,0,100,0),
|
||||
(594444,3,8679.53,-6342.703,55.914032,6.230825,1000,0,0,100,0);
|
||||
|
||||
UPDATE `creature` SET `ScriptName`='npc_partygoer_pather' WHERE `guid`=59444;
|
||||
UPDATE `creature` SET `ScriptName`='npc_partygoer' WHERE `guid` IN (59435,59436,59437,59438,59439,59440,59441,59442,59443,59445,59446,59447,59448,59449);
|
||||
|
||||
-- Sempstress Ambershine SAI
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16366;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=16366 AND `source_type`=0;
|
||||
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
|
||||
(16366,0,0,0,1,0,100,0,8000,15000,8000,15000,0,10,1,5,11,18,24,25,1,0,0,0,0,0,0,0,0,'Sempstress Ambershine - OOC - Random Emote');
|
||||
|
||||
-- Botanist Tyniarrel SAI
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=16367;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=16367 AND `source_type`=0;
|
||||
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
|
||||
(16367,0,0,0,1,0,100,0,8000,15000,8000,15000,0,10,1,5,11,18,24,25,1,0,0,0,0,0,0,0,0,'Botanist Tyniarrel - OOC - Random Emote');
|
||||
7
data/sql/updates/db_world/2022_05_17_01.sql
Normal file
7
data/sql/updates/db_world/2022_05_17_01.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2022_05_17_00 -> 2022_05_17_01
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 10376;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 10376);
|
||||
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
|
||||
(10376, 0, 0, 0, 37, 0, 85, 512, 0, 0, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'On AI initialize - None: Despawn in 0.5 s'),
|
||||
(10376, 0, 1, 0, 6, 0, 100, 514, 0, 0, 0, 0, 0, 11, 16103, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Crystal Fang - On Death - Cast Spell Summon Spire Spiderling (16103)');
|
||||
5
data/sql/updates/db_world/2022_05_17_02.sql
Normal file
5
data/sql/updates/db_world/2022_05_17_02.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- DB update 2022_05_17_01 -> 2022_05_17_02
|
||||
-- (Quest) Coward Delivery... Under 30 Minutes or it's Free - Cast "Call Alliance Deserter" on accept
|
||||
UPDATE `quest_template_addon` SET `SourceSpellID` = 45975 WHERE `ID` = 11711;
|
||||
-- Valiance Keep Officer set NPC and PC immunity flags
|
||||
UPDATE `creature_template` SET `unit_flags` = `unit_flags` | 768 WHERE `entry` = 25759;
|
||||
3
data/sql/updates/db_world/2022_05_17_03.sql
Normal file
3
data/sql/updates/db_world/2022_05_17_03.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2022_05_17_02 -> 2022_05_17_03
|
||||
-- Goblin Land Mine, remove Hakkar sound on arming
|
||||
UPDATE `creature_text` SET `Sound` = 0 WHERE `CreatureID` = 7527;
|
||||
2
data/sql/updates/db_world/2022_05_17_04.sql
Normal file
2
data/sql/updates/db_world/2022_05_17_04.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- DB update 2022_05_17_03 -> 2022_05_17_04
|
||||
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 14834;
|
||||
@@ -376,7 +376,7 @@ void ScriptedAI::DoResetThreat()
|
||||
return;
|
||||
}
|
||||
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
}
|
||||
|
||||
float ScriptedAI::DoGetThreat(Unit* unit)
|
||||
|
||||
@@ -233,6 +233,9 @@ public:
|
||||
// Reset all aggro without modifying the threadlist.
|
||||
void resetAllAggro();
|
||||
|
||||
// -- compatibility layer for combat rewrite
|
||||
void ResetAllThreat() { resetAllAggro(); }
|
||||
|
||||
// Reset all aggro of unit in threadlist satisfying the predicate.
|
||||
template<class PREDICATE> void resetAggro(PREDICATE predicate)
|
||||
{
|
||||
|
||||
@@ -407,11 +407,13 @@ void Guardian::InitSummon()
|
||||
{
|
||||
TempSummon::InitSummon();
|
||||
|
||||
Unit* m_owner = GetOwner();
|
||||
if (m_owner->GetTypeId() == TYPEID_PLAYER
|
||||
&& m_owner->GetMinionGUID() == GetGUID()
|
||||
&& !m_owner->GetCharmGUID())
|
||||
m_owner->ToPlayer()->CharmSpellInitialize();
|
||||
if (Unit* m_owner = GetOwner())
|
||||
{
|
||||
if (m_owner->GetTypeId() == TYPEID_PLAYER && m_owner->GetMinionGUID() == GetGUID() && !m_owner->GetCharmGUID())
|
||||
{
|
||||
m_owner->ToPlayer()->CharmSpellInitialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Puppet::Puppet(SummonPropertiesEntry const* properties, ObjectGuid owner) : Minion(properties, owner, false), m_owner(owner) //maybe true?
|
||||
|
||||
@@ -17369,7 +17369,7 @@ void Unit::Kill(Unit* killer, Unit* victim, bool durabilityLoss, WeaponAttackTyp
|
||||
// Spirit of Redemption
|
||||
// if talent known but not triggered (check priest class for speedup check)
|
||||
bool spiritOfRedemption = false;
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST)
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST && !victim->ToPlayer()->HasPlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS))
|
||||
{
|
||||
if (AuraEffect* aurEff = victim->GetAuraEffectDummy(20711))
|
||||
{
|
||||
|
||||
@@ -597,7 +597,7 @@ public:
|
||||
{
|
||||
if (Creature* creatureCaster = caster->ToCreature())
|
||||
{
|
||||
creatureCaster->getThreatMgr().resetAllAggro();
|
||||
creatureCaster->getThreatMgr().ResetAllThreat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
|
||||
if (Creature* creatureCaster = caster->ToCreature())
|
||||
{
|
||||
creatureCaster->getThreatMgr().resetAllAggro();
|
||||
creatureCaster->getThreatMgr().ResetAllThreat();
|
||||
creatureCaster->getThreatMgr().addThreat(target, 1);
|
||||
creatureCaster->AI()->AttackStart(target); // Attack the target which caster will teleport to.
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ public:
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetCaster()->getThreatMgr().resetAllAggro();
|
||||
GetCaster()->getThreatMgr().ResetAllThreat();
|
||||
if (Unit* target = GetHitUnit())
|
||||
GetCaster()->CastSpell(target, SPELL_BLINK, true);
|
||||
}
|
||||
|
||||
@@ -15,16 +15,210 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Eversong_Woods
|
||||
SD%Complete: 95
|
||||
SDComment: Quest support:
|
||||
SDCategory: Eversong Woods
|
||||
EndScriptData */
|
||||
#include "Common.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
|
||||
/* ContentData
|
||||
EndContentData */
|
||||
enum Partygoer_Pather
|
||||
{
|
||||
EVENT_PATH = 1,
|
||||
EVENT_RANDOM_ACTION_PATHER = 2,
|
||||
EVENT_REMOVE_EQUIPMENT_PATHER = 3,
|
||||
EVENT_STOP_DANCING_PATHER = 4
|
||||
};
|
||||
|
||||
struct npc_partygoer_pather : public ScriptedAI
|
||||
{
|
||||
npc_partygoer_pather(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_path = 594440;
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION_PATHER, urand(11000, 14000));
|
||||
}
|
||||
|
||||
void PathEndReached(uint32 /*pathId*/) override
|
||||
{
|
||||
++_path;
|
||||
if (_path > 594444)
|
||||
_path = 594440;
|
||||
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION_PATHER, urand(11000,14000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
if (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_PATH:
|
||||
me->GetMotionMaster()->MovePath(_path, false);
|
||||
break;
|
||||
case EVENT_RANDOM_ACTION_PATHER:
|
||||
{
|
||||
int8 _action = urand(1, 5);
|
||||
|
||||
switch (_action)
|
||||
{
|
||||
case 1:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
_events.ScheduleEvent(EVENT_PATH, 11000);
|
||||
break;
|
||||
case 2:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
_events.ScheduleEvent(EVENT_PATH, 11000);
|
||||
break;
|
||||
case 3:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
|
||||
_events.ScheduleEvent(EVENT_PATH, 11000);
|
||||
break;
|
||||
case 4:
|
||||
me->LoadEquipment(urand(1, 2));
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EAT_NO_SHEATHE);
|
||||
_events.ScheduleEvent(EVENT_REMOVE_EQUIPMENT_PATHER, 4000);
|
||||
break;
|
||||
case 5:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE);
|
||||
_events.ScheduleEvent(EVENT_STOP_DANCING_PATHER, 6000);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVENT_REMOVE_EQUIPMENT_PATHER:
|
||||
me->LoadEquipment(0, true);
|
||||
_events.ScheduleEvent(EVENT_PATH, 8000);
|
||||
break;
|
||||
case EVENT_STOP_DANCING_PATHER:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
_events.ScheduleEvent(EVENT_PATH, 5000);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
uint32 _path;
|
||||
};
|
||||
|
||||
enum Partygoer
|
||||
{
|
||||
EVENT_RANDOM_ACTION = 5,
|
||||
EVENT_REMOVE_EQUIPMENT = 6,
|
||||
EVENT_STOP_DANCING = 7,
|
||||
EVENT_THROW_FIREWORKS = 8,
|
||||
EVENT_RESET_FACING = 9,
|
||||
GO_FIREWORKS_LAUNCHER = 180771
|
||||
};
|
||||
|
||||
struct npc_partygoer : public ScriptedAI
|
||||
{
|
||||
npc_partygoer(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_facing = me->GetOrientation();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(1000, 20000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
if (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_RANDOM_ACTION:
|
||||
{
|
||||
int8 _action = urand(1, 6);
|
||||
|
||||
switch (_action)
|
||||
{
|
||||
case 1:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(13000, 20000));
|
||||
break;
|
||||
case 2:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(13000, 20000));
|
||||
break;
|
||||
case 3:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH);
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(13000, 20000));
|
||||
break;
|
||||
case 4:
|
||||
me->LoadEquipment(urand(1, 2));
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EAT_NO_SHEATHE);
|
||||
_events.ScheduleEvent(EVENT_REMOVE_EQUIPMENT, 4000);
|
||||
break;
|
||||
case 5:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE);
|
||||
_events.ScheduleEvent(EVENT_STOP_DANCING, urand(8000, 16000));
|
||||
break;
|
||||
case 6:
|
||||
if (GameObject* launcher = me->FindNearestGameObject(GO_FIREWORKS_LAUNCHER, 20.0f))
|
||||
me->SetFacingToObject(launcher);
|
||||
_events.ScheduleEvent(EVENT_THROW_FIREWORKS, 1000);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVENT_REMOVE_EQUIPMENT:
|
||||
me->LoadEquipment(0, true);
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(10000, 20000));
|
||||
break;
|
||||
case EVENT_STOP_DANCING:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(10000, 20000));
|
||||
break;
|
||||
case EVENT_THROW_FIREWORKS:
|
||||
me->CastSpell(me, 26295);
|
||||
_events.ScheduleEvent(EVENT_RESET_FACING, 3000);
|
||||
break;
|
||||
case EVENT_RESET_FACING:
|
||||
me->SetFacingTo(_facing);
|
||||
_events.ScheduleEvent(EVENT_RANDOM_ACTION, urand(12000, 20000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
float _facing;
|
||||
};
|
||||
|
||||
void AddSC_eversong_woods()
|
||||
{
|
||||
RegisterCreatureAI(npc_partygoer_pather);
|
||||
RegisterCreatureAI(npc_partygoer);
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
{
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
AttackStart(target);
|
||||
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
{
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
AttackStart(target);
|
||||
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
if (me->HealthBelowPct(50))
|
||||
{
|
||||
Talk(SAY_FLESH);
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->CastSpell((Unit*)nullptr, SPELL_TURN_FLESH, false);
|
||||
|
||||
events.Reset();
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetUnitOwner()->getThreatMgr().resetAllAggro();
|
||||
GetUnitOwner()->getThreatMgr().ResetAllThreat();
|
||||
GetUnitOwner()->GetMotionMaster()->Clear();
|
||||
GetUnitOwner()->CastSpell((Unit*)nullptr, SPELL_TURN_BONES, false);
|
||||
GetUnitOwner()->GetAI()->DoAction(ACTION_TURN_BONES);
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
case EVENT_ECK_SPRING:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 30.0f, true))
|
||||
{
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 500.0f);
|
||||
me->CastSpell(target, SPELL_ECK_SPRING, false);
|
||||
}
|
||||
|
||||
@@ -930,7 +930,7 @@ public:
|
||||
ScriptedAI::AttackStart(who);
|
||||
if (!targetGUID)
|
||||
{
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(who, 1000000.0f);
|
||||
targetGUID = who->GetGUID();
|
||||
}
|
||||
|
||||
@@ -1779,7 +1779,7 @@ public:
|
||||
for (ThreatContainer::StorageType::const_iterator iter = target_tl.begin(); iter != target_tl.end(); ++iter)
|
||||
me->getThreatMgr().addThreat((*iter)->getTarget(), (*iter)->getThreat());
|
||||
|
||||
c->getThreatMgr().resetAllAggro();
|
||||
c->getThreatMgr().ResetAllThreat();
|
||||
for (ThreatContainer::StorageType::const_iterator iter = me_tl.begin(); iter != me_tl.end(); ++iter)
|
||||
c->getThreatMgr().addThreat((*iter)->getTarget(), (*iter)->getThreat());
|
||||
}
|
||||
|
||||
@@ -1674,7 +1674,7 @@ public:
|
||||
if (!target || !caster)
|
||||
return;
|
||||
|
||||
caster->getThreatMgr().resetAllAggro();
|
||||
caster->getThreatMgr().ResetAllThreat();
|
||||
caster->GetAI()->AttackStart(target); // Chase target
|
||||
caster->AddThreat(target, 10000000.0f);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
heat->ModStackAmount(-1);
|
||||
}
|
||||
me->CastSpell(me, SPELL_MOLTEN, true);
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1158,7 +1158,7 @@ public:
|
||||
}
|
||||
}
|
||||
_playerAttack = true;
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->CallForHelp(40.0f);
|
||||
AttackStart(who);
|
||||
}
|
||||
|
||||
@@ -438,10 +438,13 @@ struct npc_salvaged_siege_engine : public VehicleAI
|
||||
{
|
||||
if (Unit* turret = vehicle->GetPassenger(7))
|
||||
{
|
||||
if (!turret->GetVehicleKit()->IsVehicleInUse())
|
||||
if (Vehicle* turretVehicle = me->GetVehicleKit())
|
||||
{
|
||||
turret->HandleSpellClick(clicker);
|
||||
return false;
|
||||
if (!turretVehicle->IsVehicleInUse())
|
||||
{
|
||||
turret->HandleSpellClick(clicker);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
if (switchTimer >= 10000)
|
||||
{
|
||||
switchTimer = 0;
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
if (Player* player = SelectTargetFromPlayerList(100.0f))
|
||||
me->AddThreat(player, 100000.0f);
|
||||
}
|
||||
|
||||
@@ -343,8 +343,7 @@ public:
|
||||
{
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
summons.DespawnEntry(NPC_PARASITIC_SHADOWFIEND);
|
||||
instance->SetBossState(DATA_ILLIDAN_STORMRAGE, DONE);
|
||||
instance->SaveToDB();
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -619,7 +618,7 @@ public:
|
||||
me->SetDisableGravity(false);
|
||||
break;
|
||||
case EVENT_START_PHASE_3_LAND:
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetTarget(me->GetVictim()->GetGUID());
|
||||
AttackStart(me->GetVictim());
|
||||
@@ -632,7 +631,7 @@ public:
|
||||
// ///////////////////////////
|
||||
case EVENT_PHASE_4_START:
|
||||
me->CastSpell(me, SPELL_DEMON_TRANSFORM_1, true);
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim(), 35.0f);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_BLAST, 11000);
|
||||
@@ -655,7 +654,7 @@ public:
|
||||
break;
|
||||
case EVENT_REMOVE_DEMON_FORM:
|
||||
me->CastSpell(me, SPELL_DEMON_TRANSFORM_1, true);
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
events.Reset();
|
||||
if (summons.HasEntry(NPC_MAIEV_SHADOWSONG))
|
||||
{
|
||||
|
||||
@@ -229,6 +229,7 @@ struct boss_illidari_council_memberAI : public ScriptedAI
|
||||
boss_illidari_council_memberAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
SetBoundary(instance->GetBossBoundary(DATA_ILLIDARI_COUNCIL));
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
@@ -40,6 +40,21 @@ DoorData const doorData[] =
|
||||
{ 0, 0, DOOR_TYPE_ROOM }
|
||||
};
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_HIGH_WARLORD_NAJENTUS, new RectangleBoundary(394.0f, 479.4f, 707.8f, 859.1f) },
|
||||
{ DATA_SUPREMUS, new RectangleBoundary(556.1f, 850.2f, 542.0f, 1001.0f) },
|
||||
{ DATA_SHADE_OF_AKAMA, new RectangleBoundary(406.8f, 564.0f, 327.9f, 473.5f) },
|
||||
{ DATA_TERON_GOREFIEND, new RectangleBoundary(512.5f, 613.3f, 373.2f, 432.0f) },
|
||||
{ DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) },
|
||||
{ DATA_GURTOGG_BLOODBOIL, new RectangleBoundary(720.5f, 864.5f, 159.3f, 316.0f) },
|
||||
{ DATA_RELIQUARY_OF_SOULS, new RectangleBoundary(435.9f, 660.3f, 21.2f, 229.6f) },
|
||||
{ DATA_RELIQUARY_OF_SOULS, new ZRangeBoundary(81.8f, 148.0f) },
|
||||
{ DATA_MOTHER_SHAHRAZ, new RectangleBoundary(903.4f, 982.1f, 92.4f, 313.2f) },
|
||||
{ DATA_ILLIDARI_COUNCIL, new EllipseBoundary(Position(696.6f, 305.0f), 70.0 , 85.0) },
|
||||
{ DATA_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 80.0 , 95.0) }
|
||||
};
|
||||
|
||||
class instance_black_temple : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -51,6 +66,7 @@ public:
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
LoadDoorData(doorData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
|
||||
ashtongueGUIDs.clear();
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetCaster()->getThreatMgr().resetAllAggro();
|
||||
GetCaster()->getThreatMgr().ResetAllThreat();
|
||||
|
||||
if (roll_chance_i(33))
|
||||
if (Unit* target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
|
||||
@@ -164,7 +164,7 @@ struct npc_pet_mage_mirror_image : CasterAI
|
||||
|
||||
if (selection)
|
||||
{
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(selection, 1000000.0f);
|
||||
|
||||
if (owner->IsInCombat())
|
||||
|
||||
Reference in New Issue
Block a user