diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-11-23 00:19:43 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-11-23 00:19:43 +0100 |
| commit | faab5afaf4f30d9e28d4b0843c3f5e1d561b97df (patch) | |
| tree | d59a4399f79f2950e4d23024d475dffcef5c4f5f /src/server/scripts/Northrend | |
| parent | b1ab5b7d624d337ae421fe8da536f6958ac5fa08 (diff) | |
Scripts/Misc: Replace manual jumps with proper spells (or non-jump movement where there should be no jumps)
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp | 9 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp | 30 |
2 files changed, 28 insertions, 11 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp index 1fd04161511..5489d042e33 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp @@ -38,6 +38,7 @@ enum AIs enum Spells { // generic + SPELL_LEAP = 67382, // intro SPELL_ANTI_AOE = 68595, SPELL_PVP_TRINKET = 65547, @@ -482,13 +483,13 @@ struct boss_toc_champion_controller : public BossAI if (playerTeam == ALLIANCE) { champion->SetHomePosition(vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 0); - champion->GetMotionMaster()->MoveJump(vChampionJumpTarget[pos], 20.0f, 20.0f); - champion->SetOrientation(0); + champion->CastSpell(vChampionJumpTarget[pos], SPELL_LEAP); } else { - champion->SetHomePosition((ToCCommonLoc[1].GetPositionX()*2)-vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3); - champion->GetMotionMaster()->MoveJump({ (ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ() }, 20.0f, 20.0f); + Position jumpTarget = { (ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ(), 3 }; + champion->SetHomePosition(jumpTarget); + champion->CastSpell(jumpTarget, SPELL_LEAP); champion->SetOrientation(3); } } diff --git a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp index 9aa6f4d2636..d0e08c48e1b 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_maexxna.cpp @@ -74,8 +74,6 @@ enum MaexxnaData DATA_WEBWRAP_VICTIM_GUID = 0 }; -const float WEB_WRAP_MOVE_SPEED = 20.0f; - struct WebTargetSelector { WebTargetSelector(Unit* maexxna) : _maexxna(maexxna) {} @@ -147,10 +145,7 @@ struct boss_maexxna : public BossAI target->RemoveAura(SPELL_WEB_SPRAY); if (Creature* wrap = DoSummon(NPC_WEB_WRAP, WrapPositions[wrapPos], 70s, TEMPSUMMON_TIMED_DESPAWN)) - { wrap->AI()->SetGUID(target->GetGUID(), DATA_WEBWRAP_VICTIM_GUID); // handles application of debuff - target->GetMotionMaster()->MoveJump(WrapPositions[wrapPos], WEB_WRAP_MOVE_SPEED, WEB_WRAP_MOVE_SPEED); // move after stun to avoid stun cancelling move - } } } events.Repeat(Seconds(40)); @@ -204,8 +199,29 @@ struct npc_webwrap : public NullCreatureAI victimGUID = guid; if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID)) { - visibleTimer = (me->GetDistance2d(victim) / WEB_WRAP_MOVE_SPEED + 0.5f) * AsUnderlyingType(IN_MILLISECONDS); - victim->CastSpell(victim, SPELL_WEB_WRAP, CastSpellExtraArgs(TRIGGERED_FULL_MASK) + uint32 spellId = 28621; + // TODO: not fully correct - should be using different set of script_effect spells first (29280, 29281, 29282, 29283, 29285, 29287) + float dist = me->GetDistance2d(victim); + float speed = 50.0f; + if (dist <= 20.0f) + { + spellId = 28618; + speed = 20.0f; + } + else if (dist <= 30.0f) + { + spellId = 28619; + speed = 30.0f; + } + else if (dist <= 40.0f) + { + spellId = 28620; + speed = 40.0f; + } + + visibleTimer = (me->GetDistance2d(victim) / speed + 0.5f) * AsUnderlyingType(IN_MILLISECONDS); + + victim->CastSpell(victim, spellId, CastSpellExtraArgs(TRIGGERED_FULL_MASK) .SetOriginalCaster(me->GetGUID())); } } |
