diff --git a/data/sql/updates/pending_db_world/rev_1680057777548192700.sql b/data/sql/updates/pending_db_world/rev_1680057777548192700.sql new file mode 100644 index 000000000..f6854f75c --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1680057777548192700.sql @@ -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; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp index b9110e2e3..0029019b2 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp @@ -3347,13 +3347,19 @@ public: EventMap events; bool _didWebBeam; + void InitializeAI() override + { + me->SetDisableGravity(true); + me->SetImmuneToAll(true); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_CUSTOM_SPELL_03); + } + void Reset() override { events.Reset(); events.ScheduleEvent(1, 3s, 10s); // Crypt Scarabs events.ScheduleEvent(2, 15s, 25s); // Dark Mending events.ScheduleEvent(3, 8s, 15s); // Web Wrap - me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD); } void MoveInLineOfSight(Unit* who) override @@ -3364,9 +3370,10 @@ public: float nx = me->GetPositionX(); float ny = me->GetPositionY(); float nz = me->GetFloorZ(); + DoCastSelf(SPELL_WEB_BEAM); me->SetHomePosition(nx, ny, nz, me->GetOrientation()); - me->CastSpell(me, SPELL_WEB_BEAM, false); - me->GetMotionMaster()->MovePoint(1, nx, ny, nz, false); + me->GetMotionMaster()->MoveLand(1, nx, ny, nz, false); + me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); return; } @@ -3386,20 +3393,19 @@ public: if (me->IsLevitating()) { me->SetDisableGravity(false); + me->SetImmuneToAll(false); 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()) { me->SetDisableGravity(false); 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) { 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); } }