fix(Scripts/BRD): Mobs in Manufactory should attack on Golem Lord Arg… (#7794)
- Closes #3077
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1631178211175526300');
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid`=8983 AND `id` BETWEEN 3 AND 13;
|
||||||
|
INSERT INTO `smart_scripts` VALUES
|
||||||
|
(8983,0,3,0,4,0,100,0,0,0,0,0,0,34,31,1,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On Aggro - Set instance data 34'),
|
||||||
|
(8983,0,4,5,38,0,100,0,31,1,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On set 31 data - set react passive'),
|
||||||
|
(8983,0,5,6,61,0,100,0,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On set 31 data - set phase mask to 2'),
|
||||||
|
(8983,0,6,0,61,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On set 31 data - say 0'),
|
||||||
|
(8983,0,7,8,0,2,100,1,100,100,0,0,0,22,3,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - IC - set phase mask to 4'),
|
||||||
|
(8983,0,8,9,61,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - IC - set react passive'),
|
||||||
|
(8983,0,9,0,61,0,100,0,0,0,0,0,0,69,1,0,0,0,0,0,8,0,0,0,0,809.1331,22.008,-53.658,3.16,'Golem Lord Argelmach - On set 31 data - move to pos 1'),
|
||||||
|
(8983,0,10,0,34,0,100,0,8,1,0,0,0,34,32,1,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On pos 1 - set instance data 32'),
|
||||||
|
(8983,0,11,12,25,0,100,0,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On reset - set react aggressive'),
|
||||||
|
(8983,0,12,0,61,0,100,0,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On reset - reset phase mask'),
|
||||||
|
(8983,0,13,0,38,0,100,0,31,3,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Golem Lord Argelmach - On set 31 data - set phase mask to 1');
|
||||||
|
|
||||||
|
UPDATE `smart_scripts` SET `event_phase_mask`=0 WHERE `entryorguid`=8983 AND `id`=0;
|
||||||
|
UPDATE `smart_scripts` SET `event_phase_mask`=1 WHERE `entryorguid`=8983 AND `id` BETWEEN 1 AND 2;
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureId`=8983;
|
||||||
|
INSERT INTO `creature_text` VALUES
|
||||||
|
(8983,0,0,'Intruders in the Manufactory? My constructs will destroy you!',12,0,100,0,0,0,5297,0,'Golem Lord Argelmach Say 0');
|
||||||
@@ -1875,7 +1875,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (TransportBase* trans = me->GetDirectTransport())
|
if (TransportBase* trans = me->GetDirectTransport())
|
||||||
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
|
trans->CalculatePassengerPosition(dest.x, dest.y, dest.z);
|
||||||
|
|
||||||
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, true, true, isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE);
|
me->GetMotionMaster()->MovePoint(e.action.MoveToPos.pointId, dest.x, dest.y, dest.z, true, true,
|
||||||
|
isControlled ? MOTION_SLOT_CONTROLLED : MOTION_SLOT_ACTIVE, e.target.o);
|
||||||
}
|
}
|
||||||
else // Xinef: we can use dest.x, dest.y, dest.z to make offset
|
else // Xinef: we can use dest.x, dest.y, dest.z to make offset
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-1
@@ -56,7 +56,10 @@ enum DataTypes
|
|||||||
DATA_SF_BRAZIER_S = 26,
|
DATA_SF_BRAZIER_S = 26,
|
||||||
DATA_MOIRA = 27,
|
DATA_MOIRA = 27,
|
||||||
|
|
||||||
DATA_OPEN_COFFER_DOORS = 30
|
DATA_OPEN_COFFER_DOORS = 30,
|
||||||
|
|
||||||
|
DATA_GOLEM_LORD_ARGELMACH_INIT = 31,
|
||||||
|
DATA_GOLEM_LORD_ARGELMACH_ADDS = 32
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class AI, class T>
|
template <class AI, class T>
|
||||||
|
|||||||
+139
@@ -26,6 +26,12 @@ enum Creatures
|
|||||||
NPC_MOIRA = 8929,
|
NPC_MOIRA = 8929,
|
||||||
|
|
||||||
NPC_WATCHMAN_DOOMGRIP = 9476,
|
NPC_WATCHMAN_DOOMGRIP = 9476,
|
||||||
|
|
||||||
|
NPC_WEAPON_TECHNICIAN = 8920,
|
||||||
|
NPC_DOOMFORGE_ARCANASMITH = 8900,
|
||||||
|
NPC_RAGEREAVER_GOLEM = 8906,
|
||||||
|
NPC_WRATH_HAMMER_CONSTRUCT = 8907,
|
||||||
|
NPC_GOLEM_LORD_ARGELMACH = 8983
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GameObjects
|
enum GameObjects
|
||||||
@@ -53,6 +59,34 @@ enum GameObjects
|
|||||||
GO_CHEST_SEVEN = 169243,
|
GO_CHEST_SEVEN = 169243,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum MiscData
|
||||||
|
{
|
||||||
|
SPELL_STONED = 10255
|
||||||
|
};
|
||||||
|
|
||||||
|
class RestoreAttack : public BasicEvent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RestoreAttack(Creature* boss) : _boss(boss) {}
|
||||||
|
|
||||||
|
bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override
|
||||||
|
{
|
||||||
|
_boss->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
_boss->AI()->SetData(DATA_GOLEM_LORD_ARGELMACH_INIT, DONE);
|
||||||
|
|
||||||
|
if (Unit* victim = _boss->GetVictim())
|
||||||
|
{
|
||||||
|
_boss->SetTarget(victim->GetGUID());
|
||||||
|
_boss->GetMotionMaster()->MoveChase(victim);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
Creature* _boss;
|
||||||
|
};
|
||||||
|
|
||||||
class instance_blackrock_depths : public InstanceMapScript
|
class instance_blackrock_depths : public InstanceMapScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -105,6 +139,9 @@ public:
|
|||||||
uint32 TombEventCounter;
|
uint32 TombEventCounter;
|
||||||
uint32 OpenedCoofers;
|
uint32 OpenedCoofers;
|
||||||
|
|
||||||
|
GuidList ArgelmachAdds;
|
||||||
|
ObjectGuid ArgelmachGUID;
|
||||||
|
|
||||||
void Initialize() override
|
void Initialize() override
|
||||||
{
|
{
|
||||||
memset(&encounter, 0, sizeof(encounter));
|
memset(&encounter, 0, sizeof(encounter));
|
||||||
@@ -155,6 +192,20 @@ public:
|
|||||||
if (!creature->IsAlive())
|
if (!creature->IsAlive())
|
||||||
HandleGameObject(GetGuidData(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
HandleGameObject(GetGuidData(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||||
break;
|
break;
|
||||||
|
case NPC_WEAPON_TECHNICIAN:
|
||||||
|
case NPC_DOOMFORGE_ARCANASMITH:
|
||||||
|
case NPC_RAGEREAVER_GOLEM:
|
||||||
|
case NPC_WRATH_HAMMER_CONSTRUCT:
|
||||||
|
if (creature->IsAlive() && creature->GetPositionZ() < -51.5f && creature->GetPositionZ() > -55.f)
|
||||||
|
{
|
||||||
|
ArgelmachAdds.push_back(creature->GetGUID());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NPC_GOLEM_LORD_ARGELMACH:
|
||||||
|
ArgelmachGUID = creature->GetGUID();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,6 +283,21 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnUnitDeath(Unit* unit) override
|
||||||
|
{
|
||||||
|
switch (unit->GetEntry())
|
||||||
|
{
|
||||||
|
case NPC_WEAPON_TECHNICIAN:
|
||||||
|
case NPC_DOOMFORGE_ARCANASMITH:
|
||||||
|
case NPC_RAGEREAVER_GOLEM:
|
||||||
|
case NPC_WRATH_HAMMER_CONSTRUCT:
|
||||||
|
ArgelmachAdds.remove(unit->GetGUID());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SetGuidData(uint32 type, ObjectGuid data) override
|
void SetGuidData(uint32 type, ObjectGuid data) override
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
@@ -285,6 +351,79 @@ public:
|
|||||||
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case DATA_GOLEM_LORD_ARGELMACH_INIT:
|
||||||
|
{
|
||||||
|
if (Creature* argelmach = instance->GetCreature(ArgelmachGUID))
|
||||||
|
{
|
||||||
|
GuidList adds = ArgelmachAdds;
|
||||||
|
for (GuidList::const_iterator itr = adds.begin(); itr != adds.end();)
|
||||||
|
{
|
||||||
|
if (Creature* argelmachAdd = instance->GetCreature(*itr))
|
||||||
|
{
|
||||||
|
if (argelmachAdd->GetEntry() == NPC_WRATH_HAMMER_CONSTRUCT)
|
||||||
|
{
|
||||||
|
argelmachAdd->RemoveAurasDueToSpell(SPELL_STONED);
|
||||||
|
argelmachAdd->AI()->AttackStart(argelmach->GetVictim());
|
||||||
|
itr = adds.erase(itr);
|
||||||
|
}
|
||||||
|
else if (argelmachAdd->GetEntry() == NPC_RAGEREAVER_GOLEM)
|
||||||
|
{
|
||||||
|
if (argelmachAdd->IsWithinDist2d(argelmach, 10.f))
|
||||||
|
{
|
||||||
|
argelmachAdd->RemoveAurasDueToSpell(SPELL_STONED);
|
||||||
|
argelmachAdd->AI()->AttackStart(argelmach->GetVictim());
|
||||||
|
itr = adds.erase(itr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++itr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!adds.empty())
|
||||||
|
{
|
||||||
|
argelmach->SetReactState(REACT_PASSIVE);
|
||||||
|
argelmach->SetTarget();
|
||||||
|
argelmach->AI()->SetData(DATA_GOLEM_LORD_ARGELMACH_INIT, IN_PROGRESS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
argelmach->AI()->SetData(DATA_GOLEM_LORD_ARGELMACH_INIT, DONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DATA_GOLEM_LORD_ARGELMACH_ADDS:
|
||||||
|
{
|
||||||
|
if (Creature* argelmach = instance->GetCreature(ArgelmachGUID))
|
||||||
|
{
|
||||||
|
argelmach->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);
|
||||||
|
argelmach->m_Events.AddEvent(new RestoreAttack(argelmach), argelmach->m_Events.CalculateTime(3000));
|
||||||
|
|
||||||
|
for (ObjectGuid const& argelmachAddGUID : ArgelmachAdds)
|
||||||
|
{
|
||||||
|
if (Creature* argelmachAdd = instance->GetCreature(argelmachAddGUID))
|
||||||
|
{
|
||||||
|
if (!argelmachAdd->IsInCombat())
|
||||||
|
{
|
||||||
|
argelmachAdd->RemoveAurasDueToSpell(SPELL_STONED);
|
||||||
|
argelmachAdd->AI()->AttackStart(argelmach->GetVictim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data == DONE || GhostKillCount >= 7)
|
if (data == DONE || GhostKillCount >= 7)
|
||||||
|
|||||||
@@ -156,6 +156,11 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum UldamanStonedEnum
|
||||||
|
{
|
||||||
|
MAP_ULDAMAN = 70
|
||||||
|
};
|
||||||
|
|
||||||
class spell_uldaman_stoned : public SpellScriptLoader
|
class spell_uldaman_stoned : public SpellScriptLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -167,7 +172,7 @@ public:
|
|||||||
|
|
||||||
bool Load() override
|
bool Load() override
|
||||||
{
|
{
|
||||||
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT;
|
return GetUnitOwner()->GetTypeId() == TYPEID_UNIT && GetUnitOwner()->GetMapId() == MAP_ULDAMAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
|||||||
Reference in New Issue
Block a user