fix(Scripts/IcecrownCitadel): Fix Nerubar Broodkeeper flickering anim… (#15642)
* fix(Scripts/IcecrownCitadel): Fix Nerubar Broodkeeper flickering animation partial cherry-pick of https://github.com/TrinityCore/TrinityCore/commit/f8db738e8da008ccb48f79f5dd10ebbd81750f5f Co-Authored-By: Ovahlord <18347559+Ovahlord@users.noreply.github.com> Co-Authored-By: Houston <69751143+HoustonCore@users.noreply.github.com> Co-Authored-By: Lucas Nascimento <keader.android@gmail.com> * Update icecrown_citadel.cpp * fix the spiders before sindragosa as well * Update icecrown_citadel.cpp --------- Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com> Co-authored-by: Houston <69751143+HoustonCore@users.noreply.github.com> Co-authored-by: Lucas Nascimento <keader.android@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `flags_extra`=512 WHERE `entry` IN (36725,38058);
|
||||||
|
UPDATE `creature_template_addon` SET `bytes1`=0 WHERE `entry` IN (36725,38058);
|
||||||
|
UPDATE `creature_template_movement` SET `Flight`=0, `Ground`=1 WHERE `CreatureId` IN (36725,38058);
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 512 WHERE `entry` IN (37501, 37502, 38197, 38198);
|
||||||
|
UPDATE `smart_scripts` SET `event_param1` = 16 WHERE `entryorguid` IN (37501, 37502) AND `source_type` = 0 AND `event_type` = 34;
|
||||||
@@ -3347,13 +3347,19 @@ public:
|
|||||||
EventMap events;
|
EventMap events;
|
||||||
bool _didWebBeam;
|
bool _didWebBeam;
|
||||||
|
|
||||||
|
void InitializeAI() override
|
||||||
|
{
|
||||||
|
me->SetDisableGravity(true);
|
||||||
|
me->SetImmuneToAll(true);
|
||||||
|
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_03);
|
||||||
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
events.Reset();
|
events.Reset();
|
||||||
events.ScheduleEvent(1, 3s, 10s); // Crypt Scarabs
|
events.ScheduleEvent(1, 3s, 10s); // Crypt Scarabs
|
||||||
events.ScheduleEvent(2, 15s, 25s); // Dark Mending
|
events.ScheduleEvent(2, 15s, 25s); // Dark Mending
|
||||||
events.ScheduleEvent(3, 8s, 15s); // Web Wrap
|
events.ScheduleEvent(3, 8s, 15s); // Web Wrap
|
||||||
me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
@@ -3364,9 +3370,10 @@ public:
|
|||||||
float nx = me->GetPositionX();
|
float nx = me->GetPositionX();
|
||||||
float ny = me->GetPositionY();
|
float ny = me->GetPositionY();
|
||||||
float nz = me->GetFloorZ();
|
float nz = me->GetFloorZ();
|
||||||
|
DoCastSelf(SPELL_WEB_BEAM);
|
||||||
me->SetHomePosition(nx, ny, nz, me->GetOrientation());
|
me->SetHomePosition(nx, ny, nz, me->GetOrientation());
|
||||||
me->CastSpell(me, SPELL_WEB_BEAM, false);
|
me->GetMotionMaster()->MoveLand(1, nx, ny, nz, false);
|
||||||
me->GetMotionMaster()->MovePoint(1, nx, ny, nz, false);
|
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3386,20 +3393,19 @@ public:
|
|||||||
if (me->IsLevitating())
|
if (me->IsLevitating())
|
||||||
{
|
{
|
||||||
me->SetDisableGravity(false);
|
me->SetDisableGravity(false);
|
||||||
|
me->SetImmuneToAll(false);
|
||||||
me->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
me->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MovementInform(uint32 type, uint32 id) override
|
void MovementInform(uint32 /*type*/, uint32 id) override
|
||||||
{
|
{
|
||||||
if (type == POINT_MOTION_TYPE && id == 1)
|
if (id == 1)
|
||||||
{
|
{
|
||||||
if (me->IsLevitating())
|
if (me->IsLevitating())
|
||||||
{
|
{
|
||||||
me->SetDisableGravity(false);
|
me->SetDisableGravity(false);
|
||||||
me->SetOrientation(0.0f);
|
me->SetOrientation(0.0f);
|
||||||
me->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
|
||||||
me->ClearUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3516,7 +3522,7 @@ public:
|
|||||||
if (spider->GetPositionZ() > 220.0f)
|
if (spider->GetPositionZ() > 220.0f)
|
||||||
{
|
{
|
||||||
spider->CastSpell(spider, SPELL_WEB_BEAM2, false);
|
spider->CastSpell(spider, SPELL_WEB_BEAM2, false);
|
||||||
spider->GetMotionMaster()->MovePoint(POINT_ENTER_COMBAT, spider->GetPositionX(), spider->GetPositionY(), 213.03f, false);
|
spider->GetMotionMaster()->MoveLand(POINT_ENTER_COMBAT, spider->GetPositionX(), spider->GetPositionY(), 213.03f, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user