From 4f40dad714ffbc73f2ae3c3ee1236dffb5a92811 Mon Sep 17 00:00:00 2001 From: Trista Date: Fri, 1 Mar 2013 08:40:21 +0200 Subject: Scripts/Eye of Eternity: Surge of Power (25 man) * I have no idea how these breaks were removed, but it was breaking the whole mechanic. * Also fix some slight chance for fail of transitioning p II -> p III * Surge of Power (25 man) still needs to get fixed some weird facing and warnings aren't always sent for some reason --- src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index b258be20feb..a47bdcd3263 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -439,12 +439,16 @@ public: { case DATA_LAST_OVERLOAD_GUID: _arcaneOverloadGUID = guid; + break; case DATA_FIRST_SURGE_TARGET_GUID: _firstSelectedSurgeTargetGUID = guid; + break; case DATA_SECOND_SURGE_TARGET_GUID: _secondSelectedSurgeTargetGUID = guid; + break; case DATA_THIRD_SURGE_TARGET_GUID: _thirdSelectedSurgeTargetGUID = guid; + break; } } @@ -886,7 +890,8 @@ public: } break; case EVENT_PATHING_AROUND_PLATFORM: - DoAction(ACTION_CYCLIC_MOVEMENT); + if (!_performingSurgeOfPower && !_performingDestroyPlatform) + DoAction(ACTION_CYCLIC_MOVEMENT); break; case EVENT_MOVE_TO_POINT_SURGE_P_TWO: if (!_performingDestroyPlatform) -- cgit v1.2.3 From d1853f693b2c1a60134603d946e31f71f26535c0 Mon Sep 17 00:00:00 2001 From: Trista Date: Fri, 1 Mar 2013 16:25:58 +0200 Subject: Scripts/Eye of Eternity: Remove some flags, fix some timers and some misc * Starting timers were a bit slower * Destroy platform proper timing for drake casting mount spell to player (trigger) * Remove IMMUNITY_PC flag after Iris is triggered (thx to Expecto) and readd it on evade * Remove NOT_SELECTABLE flag since shouldn't be present at starting event * Fix misc of id of Static Field added to LOS attributes --- .../world/2013_03_02_00_world_conditions.sql | 4 ++ src/server/game/Spells/SpellMgr.cpp | 2 +- .../Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 56 ++++++++++++++-------- 3 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 sql/updates/world/2013_03_02_00_world_conditions.sql (limited to 'src') diff --git a/sql/updates/world/2013_03_02_00_world_conditions.sql b/sql/updates/world/2013_03_02_00_world_conditions.sql new file mode 100644 index 00000000000..074add78476 --- /dev/null +++ b/sql/updates/world/2013_03_02_00_world_conditions.sql @@ -0,0 +1,4 @@ +-- Add conditions +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=56438; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,56438,0,0,1,0,56438,0,0,1,0,0,'', 'Arcane Overload damage reduce aura can''t apply to target that already is affected by such'); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 059e552d95e..1f90adf1c7d 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3613,7 +3613,7 @@ void SpellMgr::LoadDbcDataCorrections() // All spells below work even without these changes. The LOS attribute is due to problem // from collision between maps & gos with active destroyed state. case 57473: // Arcane Storm bonus explicit visual spell - case 57430: // Summon Static Field + case 57431: // Summon Static Field case 56091: // Flame Spike (Wyrmrest Skytalon) case 56092: // Engulf in Flames (Wyrmrest Skytalon) case 57090: // Revivify (Wyrmrest Skytalon) diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index a47bdcd3263..a3c433452a1 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -80,7 +80,10 @@ enum Events EVENT_NUKE_DUMMY = 3, // ======== SCIONS OF ETERNITY ========= - EVENT_ARCANE_BARRAGE = 1 + EVENT_ARCANE_BARRAGE = 1, + + // ======== WYRMREST SKYTALON ========== + EVENT_CAST_RIDE_SPELL = 1 }; enum Phases @@ -374,7 +377,6 @@ public: DoAction(ACTION_HANDLE_RESPAWN); SetPhase(PHASE_NOT_STARTED, true); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetReactState(REACT_PASSIVE); if (instance) instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); @@ -464,7 +466,7 @@ public: pos.m_positionZ = alexstraszaBunny->GetPositionZ(); alexstraszaBunny->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAngle(me)); me->GetMotionMaster()->MoveLand(POINT_LAND_P_ONE, pos); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC); me->SetReactState(REACT_AGGRESSIVE); me->SetInCombatWithZone(); events.ScheduleEvent(EVENT_LAND_START_ENCOUNTER, 7*IN_MILLISECONDS, 1, PHASE_NOT_STARTED); @@ -541,19 +543,19 @@ public: events.ScheduleEvent(EVENT_START_FIRST_RANDOM_PORTAL, 2*IN_MILLISECONDS, 1, _phase); break; case PHASE_ONE: - events.ScheduleEvent(EVENT_ARCANE_BREATH, urand(15, 20)*IN_MILLISECONDS, 0, _phase); - events.ScheduleEvent(EVENT_ARCANE_STORM, 10*IN_MILLISECONDS, 0, _phase); - events.ScheduleEvent(EVENT_VORTEX, urand(30, 40)*IN_MILLISECONDS, 0, _phase); - events.ScheduleEvent(EVENT_POWER_SPARKS, urand(30, 35)*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_ARCANE_BREATH, urand(8, 10)*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_ARCANE_STORM, urand(3, 6)*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_VORTEX, urand(30, 35)*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_POWER_SPARKS, urand(20, 30)*IN_MILLISECONDS, 0, _phase); break; case PHASE_TWO: events.ScheduleEvent(EVENT_MOVE_TO_POINT_SURGE_P_TWO, 60*IN_MILLISECONDS, 0, _phase); me->AI()->DoAction(ACTION_LIFT_IN_AIR); break; case PHASE_THREE: - events.ScheduleEvent(EVENT_ARCANE_PULSE, 13*IN_MILLISECONDS, 0, _phase); - events.ScheduleEvent(EVENT_ARCANE_STORM, 20*IN_MILLISECONDS, 0, _phase); - events.ScheduleEvent(EVENT_SURGE_OF_POWER_P_THREE, urand(7, 16)*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_ARCANE_PULSE, 7*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_ARCANE_STORM, 10*IN_MILLISECONDS, 0, _phase); + events.ScheduleEvent(EVENT_SURGE_OF_POWER_P_THREE, urand(4, 6)*IN_MILLISECONDS, 0, _phase); events.ScheduleEvent(EVENT_STATIC_FIELD, urand(20, 30)*IN_MILLISECONDS, 0, _phase); break; } @@ -608,6 +610,8 @@ public: // Set speed to normal value me->SetSpeed(MOVE_FLIGHT, _flySpeed); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveAllAuras(); me->CombatStop(); // Sometimes threat can remain, so it's a safety measure @@ -943,7 +947,6 @@ public: DoCast(me, SPELL_IMMUNE_CURSES); _canAttack = true; UpdateVictim(); - me->SetFacingToObject(me->getVictim()); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); SetPhase(PHASE_THREE, true); break; @@ -1544,6 +1547,7 @@ public: void UpdateAI (uint32 /*diff*/) { + } void DoAction(int32 /*action*/) @@ -1568,8 +1572,8 @@ public: } private: - InstanceScript* _instance; Creature* _malygos; + InstanceScript* _instance; }; CreatureAI* GetAI(Creature* creature) const @@ -1592,16 +1596,29 @@ public: void IsSummonedBy(Unit* summoner) { - me->CastSpell(summoner, SPELL_RIDE_RED_DRAGON_TRIGGERED, true); + _summoner = NULL; + if ((_summoner = summoner->ToPlayer())) + _events.ScheduleEvent(EVENT_CAST_RIDE_SPELL, 2*IN_MILLISECONDS); } - void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply) + void UpdateAI(uint32 diff) { - if (apply) + VehicleAI::UpdateAI(diff); + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) { - _playerController = NULL; - _playerController = unit->ToPlayer(); + switch (eventId) + { + case EVENT_CAST_RIDE_SPELL: + me->CastSpell(_summoner, SPELL_RIDE_RED_DRAGON_TRIGGERED, true); + break; + } } + } + + void PassengerBoarded(Unit* unit, int8 /*seat*/, bool apply) + { if (!apply) { me->DespawnOrUnsummon(2050); @@ -1619,11 +1636,12 @@ public: void JustDied(Unit* /*killer*/) { // TO DOs: check script beginning for more info. - _playerController->Kill(_playerController, true); + _summoner->Kill(_summoner, true); } private: - Player* _playerController; + Player* _summoner; + EventMap _events; }; CreatureAI* GetAI(Creature* creature) const -- cgit v1.2.3 From 1baaaf1bf07aa93a49b255c2e4d018375471ea21 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 1 Mar 2013 20:40:49 +0100 Subject: Core/Vehicles: Defined known seat flag VEHICLE_SEAT_FLAG_IS_USING_VEHICLE_CONTROLS --- src/server/game/DataStores/DBCEnums.h | 51 +++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index 70af15da6e9..922d29b0f50 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -389,27 +389,38 @@ enum SummonPropFlags enum VehicleSeatFlags { - VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER = 0x00000001, - VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE = 0x00000002, - VEHICLE_SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_VOLUNTARY_EXIT = 0x00000008, - VEHICLE_SEAT_FLAG_HIDE_PASSENGER = 0x00000200, // Passenger is hidden - VEHICLE_SEAT_FLAG_ALLOW_TURNING = 0x00000400, // needed for CGCamera__SyncFreeLookFacing - VEHICLE_SEAT_FLAG_CAN_CONTROL = 0x00000800, // Lua_UnitInVehicleControlSeat - VEHICLE_SEAT_FLAG_CAN_CAST_MOUNT_SPELL = 0x00001000, // Can cast spells with SPELL_AURA_MOUNTED from seat (possibly 4.x only, 0 seats on 3.3.5a) - VEHICLE_SEAT_FLAG_UNCONTROLLED = 0x00002000, // can override !& VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT - VEHICLE_SEAT_FLAG_CAN_ATTACK = 0x00004000, // Can attack, cast spells and use items from vehicle - VEHICLE_SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIMN_ON_FORCED_EXIT = 0x00008000, - VEHICLE_SEAT_FLAG_HAS_VEH_EXIT_ANIM_VOLUNTARY_EXIT = 0x00040000, - VEHICLE_SEAT_FLAG_HAS_VEH_EXIT_ANIM_FORCED_EXIT = 0x00080000, - VEHICLE_SEAT_FLAG_REC_HAS_VEHICLE_ENTER_ANIM = 0x00400000, - VEHICLE_SEAT_FLAG_ENABLE_VEHICLE_ZOOM = 0x01000000, - VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT = 0x02000000, // Lua_CanExitVehicle - can enter and exit at free will - VEHICLE_SEAT_FLAG_CAN_SWITCH = 0x04000000, // Lua_CanSwitchVehicleSeats + VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_ENTER = 0x00000001, + VEHICLE_SEAT_FLAG_HAS_LOWER_ANIM_FOR_RIDE = 0x00000002, + VEHICLE_SEAT_FLAG_UNK3 = 0x00000004, + VEHICLE_SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_VOLUNTARY_EXIT = 0x00000008, + VEHICLE_SEAT_FLAG_UNK5 = 0x00000010, + VEHICLE_SEAT_FLAG_UNK6 = 0x00000020, + VEHICLE_SEAT_FLAG_UNK7 = 0x00000040, + VEHICLE_SEAT_FLAG_UNK8 = 0x00000080, + VEHICLE_SEAT_FLAG_UNK9 = 0x00000100, + VEHICLE_SEAT_FLAG_HIDE_PASSENGER = 0x00000200, // Passenger is hidden + VEHICLE_SEAT_FLAG_ALLOW_TURNING = 0x00000400, // needed for CGCamera__SyncFreeLookFacing + VEHICLE_SEAT_FLAG_CAN_CONTROL = 0x00000800, // Lua_UnitInVehicleControlSeat + VEHICLE_SEAT_FLAG_CAN_CAST_MOUNT_SPELL = 0x00001000, // Can cast spells with SPELL_AURA_MOUNTED from seat (possibly 4.x only, 0 seats on 3.3.5a) + VEHICLE_SEAT_FLAG_UNCONTROLLED = 0x00002000, // can override !& VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT + VEHICLE_SEAT_FLAG_CAN_ATTACK = 0x00004000, // Can attack, cast spells and use items from vehicle + VEHICLE_SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_FORCED_EXIT = 0x00008000, + VEHICLE_SEAT_FLAG_UNK17 = 0x00010000, + VEHICLE_SEAT_FLAG_UNK18 = 0x00020000, + VEHICLE_SEAT_FLAG_HAS_VEH_EXIT_ANIM_VOLUNTARY_EXIT = 0x00040000, + VEHICLE_SEAT_FLAG_HAS_VEH_EXIT_ANIM_FORCED_EXIT = 0x00080000, + VEHICLE_SEAT_FLAG_UNK21 = 0x00100000, + VEHICLE_SEAT_FLAG_UNK22 = 0x00200000, + VEHICLE_SEAT_FLAG_REC_HAS_VEHICLE_ENTER_ANIM = 0x00400000, + VEHICLE_SEAT_FLAG_IS_USING_VEHICLE_CONTROLS = 0x00800000, // Lua_IsUsingVehicleControls + VEHICLE_SEAT_FLAG_ENABLE_VEHICLE_ZOOM = 0x01000000, + VEHICLE_SEAT_FLAG_CAN_ENTER_OR_EXIT = 0x02000000, // Lua_CanExitVehicle - can enter and exit at free will + VEHICLE_SEAT_FLAG_CAN_SWITCH = 0x04000000, // Lua_CanSwitchVehicleSeats VEHICLE_SEAT_FLAG_HAS_START_WARITING_FOR_VEH_TRANSITION_ANIM_ENTER = 0x08000000, - VEHICLE_SEAT_FLAG_HAS_START_WARITING_FOR_VEH_TRANSITION_ANIM_EXIT = 0x10000000, - VEHICLE_SEAT_FLAG_CAN_CAST = 0x20000000, // Lua_UnitHasVehicleUI - VEHICLE_SEAT_FLAG_UNK2 = 0x40000000, // checked in conjunction with 0x800 in CastSpell2 - VEHICLE_SEAT_FLAG_ALLOWS_INTERACTION = 0x80000000 + VEHICLE_SEAT_FLAG_HAS_START_WARITING_FOR_VEH_TRANSITION_ANIM_EXIT = 0x10000000, + VEHICLE_SEAT_FLAG_CAN_CAST = 0x20000000, // Lua_UnitHasVehicleUI + VEHICLE_SEAT_FLAG_UNK2 = 0x40000000, // checked in conjunction with 0x800 in CastSpell2 + VEHICLE_SEAT_FLAG_ALLOWS_INTERACTION = 0x80000000 }; enum VehicleSeatFlagsB -- cgit v1.2.3