aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/base/auth_database.sql28
-rw-r--r--sql/updates/auth/master/2025_11_18_00_auth.sql23
-rw-r--r--sql/updates/auth/master/2025_11_19_00_auth.sql23
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp23
-rw-r--r--src/server/game/Entities/Unit/Unit.h3
-rw-r--r--src/server/game/Movement/MotionMaster.cpp59
-rw-r--r--src/server/game/Movement/MotionMaster.h6
-rw-r--r--src/server/game/Movement/Spline/MoveSpline.cpp28
-rw-r--r--src/server/game/Spells/SpellEffects.cpp7
-rw-r--r--src/server/game/Spells/SpellScript.cpp3
-rw-r--r--src/server/game/Spells/SpellScript.h2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_undercity.cpp5
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp2
15 files changed, 132 insertions, 84 deletions
diff --git a/sql/base/auth_database.sql b/sql/base/auth_database.sql
index 2f4aaa1c384..51904bee814 100644
--- a/sql/base/auth_database.sql
+++ b/sql/base/auth_database.sql
@@ -1341,7 +1341,21 @@ INSERT INTO `build_auth_key` VALUES
(64395,'Mac','x64','WoWC',0xB9EE0DED365A0D1ADCC780CF91708136),
(64395,'Win','A64','WoW',0x3084B511A81DBD956D09C74BE18E6C12),
(64395,'Win','x64','WoW',0x927C362C2B951B50D63F203C88BBB4BD),
-(64395,'Win','x64','WoWC',0xB00C9B95D14079E04B937B0DED2C1247);
+(64395,'Win','x64','WoWC',0xB00C9B95D14079E04B937B0DED2C1247),
+(64484,'Mac','A64','WoW',0x208FD6C24C40FDA62A4B3314E4E25336),
+(64484,'Mac','A64','WoWC',0xD2D29647DE175101CEF35C10D671BF94),
+(64484,'Mac','x64','WoW',0x3B2D2B6D9CE0957F7307E4D8E649B1B0),
+(64484,'Mac','x64','WoWC',0x7F843C10B9FE9A3F2C200E8DDEF7CFAD),
+(64484,'Win','A64','WoW',0x0D7B806EF0D5640724866D8842590992),
+(64484,'Win','x64','WoW',0x2DD6D7583BB976AF101585B572C4CC41),
+(64484,'Win','x64','WoWC',0x21F23079D5EA654F8D21B80C93DD1A34),
+(64502,'Mac','A64','WoW',0x9F782C29580703ECF3148E3E78B3B45B),
+(64502,'Mac','A64','WoWC',0x17168E59E27ECE41AAD719777413668F),
+(64502,'Mac','x64','WoW',0xDA795FF3960DE8212AD6C97C4619BFD0),
+(64502,'Mac','x64','WoWC',0x6DCE3BA9C0ACF638AE599680200483AE),
+(64502,'Win','A64','WoW',0x51DF09ABE30D38142EB5942ED774301B),
+(64502,'Win','x64','WoW',0x54D307CF2BC84E50E94C2D3A95CD6D7B),
+(64502,'Win','x64','WoWC',0xA968CFA8B0558F433B3E483E844FBFC3);
/*!40000 ALTER TABLE `build_auth_key` ENABLE KEYS */;
UNLOCK TABLES;
@@ -1756,7 +1770,9 @@ INSERT INTO `build_info` VALUES
(63906,11,2,5,NULL),
(64154,11,2,5,NULL),
(64270,11,2,5,NULL),
-(64395,11,2,5,NULL);
+(64395,11,2,5,NULL),
+(64484,11,2,5,NULL),
+(64502,11,2,5,NULL);
/*!40000 ALTER TABLE `build_info` ENABLE KEYS */;
UNLOCK TABLES;
@@ -3369,7 +3385,7 @@ CREATE TABLE `realmlist` (
`timezone` tinyint unsigned NOT NULL DEFAULT '0',
`allowedSecurityLevel` tinyint unsigned NOT NULL DEFAULT '0',
`population` float NOT NULL DEFAULT '0',
- `gamebuild` int unsigned NOT NULL DEFAULT '64395',
+ `gamebuild` int unsigned NOT NULL DEFAULT '64502',
`Region` tinyint unsigned NOT NULL DEFAULT '1',
`Battlegroup` tinyint unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
@@ -3384,7 +3400,7 @@ CREATE TABLE `realmlist` (
LOCK TABLES `realmlist` WRITE;
/*!40000 ALTER TABLE `realmlist` DISABLE KEYS */;
INSERT INTO `realmlist` VALUES
-(1,'Trinity','127.0.0.1','127.0.0.1',NULL,NULL,'255.255.255.0',8085,0,0,1,0,0,64395,1,1);
+(1,'Trinity','127.0.0.1','127.0.0.1',NULL,NULL,'255.255.255.0',8085,0,0,1,0,0,64502,1,1);
/*!40000 ALTER TABLE `realmlist` ENABLE KEYS */;
UNLOCK TABLES;
@@ -3912,7 +3928,9 @@ INSERT INTO `updates` VALUES
('2025_10_29_00_auth.sql','CA6DC3F6A070AD894AB0DF2B21168D1BD7445A38','ARCHIVED','2025-10-29 06:57:00',0),
('2025_10_30_00_auth.sql','BEBD6BC06B857C182BAD8A0DCAAF5B6AFEA2DFE7','RELEASED','2025-10-30 18:24:07',0),
('2025_11_07_00_auth.sql','496BAF87666950FDBA459CC72472AAB4CBD71D40','RELEASED','2025-11-07 09:46:17',0),
-('2025_11_15_00_auth.sql','744E145E7EFBADDAF0BAC00F6FC84A1FE79EDFCA','RELEASED','2025-11-15 12:09:00',0);
+('2025_11_15_00_auth.sql','744E145E7EFBADDAF0BAC00F6FC84A1FE79EDFCA','RELEASED','2025-11-15 12:09:00',0),
+('2025_11_18_00_auth.sql','AAE3FEB4363A16253C7ADF8CF5973E3694C5BC52','RELEASED','2025-11-18 20:09:47',0),
+('2025_11_19_00_auth.sql','2E89C66714539C9713B9ADD3F7697730A426C795','RELEASED','2025-11-19 08:20:00',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/sql/updates/auth/master/2025_11_18_00_auth.sql b/sql/updates/auth/master/2025_11_18_00_auth.sql
new file mode 100644
index 00000000000..c212a264df3
--- /dev/null
+++ b/sql/updates/auth/master/2025_11_18_00_auth.sql
@@ -0,0 +1,23 @@
+DELETE FROM `build_info` WHERE `build` IN (64484);
+INSERT INTO `build_info` (`build`,`majorVersion`,`minorVersion`,`bugfixVersion`,`hotfixVersion`) VALUES
+(64484,11,2,5,NULL);
+
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Mac' AND `arch`='A64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Mac' AND `arch`='A64' AND `type`='WoWC';
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Mac' AND `arch`='x64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Mac' AND `arch`='x64' AND `type`='WoWC';
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Win' AND `arch`='A64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Win' AND `arch`='x64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64484 AND `platform`='Win' AND `arch`='x64' AND `type`='WoWC';
+INSERT INTO `build_auth_key` (`build`,`platform`,`arch`,`type`,`key`) VALUES
+(64484,'Mac','A64','WoW',0x208FD6C24C40FDA62A4B3314E4E25336),
+(64484,'Mac','A64','WoWC',0xD2D29647DE175101CEF35C10D671BF94),
+(64484,'Mac','x64','WoW',0x3B2D2B6D9CE0957F7307E4D8E649B1B0),
+(64484,'Mac','x64','WoWC',0x7F843C10B9FE9A3F2C200E8DDEF7CFAD),
+(64484,'Win','A64','WoW',0x0D7B806EF0D5640724866D8842590992),
+(64484,'Win','x64','WoW',0x2DD6D7583BB976AF101585B572C4CC41),
+(64484,'Win','x64','WoWC',0x21F23079D5EA654F8D21B80C93DD1A34);
+
+UPDATE `realmlist` SET `gamebuild`=64484 WHERE `gamebuild`=64395;
+
+ALTER TABLE `realmlist` CHANGE `gamebuild` `gamebuild` int unsigned NOT NULL DEFAULT '64484';
diff --git a/sql/updates/auth/master/2025_11_19_00_auth.sql b/sql/updates/auth/master/2025_11_19_00_auth.sql
new file mode 100644
index 00000000000..9f835567a7c
--- /dev/null
+++ b/sql/updates/auth/master/2025_11_19_00_auth.sql
@@ -0,0 +1,23 @@
+DELETE FROM `build_info` WHERE `build` IN (64502);
+INSERT INTO `build_info` (`build`,`majorVersion`,`minorVersion`,`bugfixVersion`,`hotfixVersion`) VALUES
+(64502,11,2,5,NULL);
+
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Mac' AND `arch`='A64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Mac' AND `arch`='A64' AND `type`='WoWC';
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Mac' AND `arch`='x64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Mac' AND `arch`='x64' AND `type`='WoWC';
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Win' AND `arch`='A64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Win' AND `arch`='x64' AND `type`='WoW';
+DELETE FROM `build_auth_key` WHERE `build`=64502 AND `platform`='Win' AND `arch`='x64' AND `type`='WoWC';
+INSERT INTO `build_auth_key` (`build`,`platform`,`arch`,`type`,`key`) VALUES
+(64502,'Mac','A64','WoW',0x9F782C29580703ECF3148E3E78B3B45B),
+(64502,'Mac','A64','WoWC',0x17168E59E27ECE41AAD719777413668F),
+(64502,'Mac','x64','WoW',0xDA795FF3960DE8212AD6C97C4619BFD0),
+(64502,'Mac','x64','WoWC',0x6DCE3BA9C0ACF638AE599680200483AE),
+(64502,'Win','A64','WoW',0x51DF09ABE30D38142EB5942ED774301B),
+(64502,'Win','x64','WoW',0x54D307CF2BC84E50E94C2D3A95CD6D7B),
+(64502,'Win','x64','WoWC',0xA968CFA8B0558F433B3E483E844FBFC3);
+
+UPDATE `realmlist` SET `gamebuild`=64502 WHERE `gamebuild`=64484;
+
+ALTER TABLE `realmlist` CHANGE `gamebuild` `gamebuild` int unsigned NOT NULL DEFAULT '64502';
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index c6466bba6b4..287fc1753e7 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12325,7 +12325,7 @@ void Unit::SendMoveKnockBack(Player* player, float speedXY, float speedZ, float
player->GetSession()->SendPacket(moveKnockBack.Write());
}
-void Unit::KnockbackFrom(Position const& origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/)
+void Unit::KnockbackFrom(Position const& origin, float speedXY, float speedZ, float angle /*= M_PI*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/)
{
Player* player = ToPlayer();
if (!player)
@@ -12339,14 +12339,14 @@ void Unit::KnockbackFrom(Position const& origin, float speedXY, float speedZ, Mo
}
if (!player)
- GetMotionMaster()->MoveKnockbackFrom(origin, speedXY, speedZ, spellEffectExtraData);
+ GetMotionMaster()->MoveKnockbackFrom(origin, speedXY, speedZ, angle, spellEffectExtraData);
else
{
- float o = GetPosition() == origin ? GetOrientation() + M_PI : origin.GetAbsoluteAngle(this);
+ float o = (GetPosition() == origin ? GetOrientation() : GetAbsoluteAngle(origin)) + angle;
if (speedXY < 0)
{
speedXY = -speedXY;
- o = o - M_PI;
+ o = o - float(M_PI);
}
float vcos = std::cos(o);
@@ -12470,21 +12470,6 @@ uint32 Unit::GetModelForForm(ShapeshiftForm form, uint32 spellId) const
return 0;
}
-void Unit::JumpTo(float speedXY, float speedZ, float angle, Optional<Position> dest)
-{
- if (dest)
- angle += GetRelativeAngle(*dest);
-
- if (GetTypeId() == TYPEID_UNIT)
- GetMotionMaster()->MoveJumpTo(angle, speedXY, speedZ);
- else
- {
- float vcos = std::cos(angle+GetOrientation());
- float vsin = std::sin(angle+GetOrientation());
- SendMoveKnockBack(ToPlayer(), speedXY, -speedZ, vcos, vsin);
- }
-}
-
void Unit::HandleSpellClick(Unit* clicker, int8 seatId /*= -1*/)
{
bool spellClickHandled = false;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 8973b439717..de5b2692cf0 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1133,8 +1133,7 @@ class TC_GAME_API Unit : public WorldObject
void UpdateHeight(float newZ);
void SendMoveKnockBack(Player* player, float speedXY, float speedZ, float vcos, float vsin);
- void KnockbackFrom(Position const& origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
- void JumpTo(float speedXY, float speedZ, float angle, Optional<Position> dest = {});
+ void KnockbackFrom(Position const& origin, float speedXY, float speedZ, float angle = M_PI, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
void MonsterMoveWithSpeed(float x, float y, float z, float speed, bool generatePath = false, bool forceDestination = false);
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 85bb2e365f3..202663cf1cc 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -29,6 +29,7 @@
#include "PathGenerator.h"
#include "Player.h"
#include "ScriptSystem.h"
+#include <boost/container/static_vector.hpp>
#include <algorithm>
#include <iterator>
@@ -800,17 +801,17 @@ void MotionMaster::MoveCharge(PathGenerator const& path, float speed /*= SPEED_C
init.Launch();
}
-void MotionMaster::MoveKnockbackFrom(Position const& origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/)
+void MotionMaster::MoveKnockbackFrom(Position const& origin, float speedXY, float speedZ, float angle /*= M_PI*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/)
{
// This function may make players fall below map
if (_owner->GetTypeId() == TYPEID_PLAYER)
return;
- if (std::abs(speedXY) < 0.01f /* && std::abs(speedZ) < 0.01f */)
+ if (std::abs(speedXY) < 0.01f && std::abs(speedZ) < 0.01f)
return;
Position dest = _owner->GetPosition();
- float o = dest == origin ? 0.0f : _owner->GetRelativeAngle(origin) + float(M_PI);
+ float o = (dest == origin ? 0.0f : _owner->GetRelativeAngle(origin)) + angle;
if (speedXY < 0)
{
speedXY = -speedXY;
@@ -824,16 +825,29 @@ void MotionMaster::MoveKnockbackFrom(Position const& origin, float speedXY, floa
float dist = 2 * moveTimeHalf * speedXY;
float max_height = -Movement::computeFallElevation(moveTimeHalf, false, -speedZ);
- // Use a mmap raycast to get a valid destination.
- _owner->MovePositionToFirstCollision(dest, dist, o);
+ boost::container::static_vector<G3D::Vector3, 3> path;
+ path.push_back(PositionToVector3(dest));
+
+ if (dist > 0.01f)
+ {
+ // Use a mmap raycast to get a valid destination.
+ _owner->MovePositionToFirstCollision(dest, dist, o);
+ path.push_back(PositionToVector3(dest));
+ }
+ else
+ {
+ // vertical knockbacks get a fake 0.5 higher additional point to avoid clientside spline length checks
+ // sniffs confirmed that it is always 0.5, no matter what the max height is
+ path.push_back(PositionToVector3(dest.GetPositionWithOffset({ 0.0f, 0.0f, 0.5f })));
+ path.push_back(PositionToVector3(dest));
+ }
std::function<void(Movement::MoveSplineInit&)> initializer = [=, effect = (spellEffectExtraData ? Optional<Movement::SpellEffectExtraData>(*spellEffectExtraData) : Optional<Movement::SpellEffectExtraData>())](Movement::MoveSplineInit& init)
{
- init.MoveTo(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false);
+ init.MovebyPath({ path.data(), path.size() });
init.SetParabolic(max_height, 0);
init.SetOrientationFixed(true);
- if (speedXY >= 0.01f)
- init.SetVelocity(speedXY);
+ init.SetVelocity(speedXY);
if (effect)
init.SetSpellEffectExtraData(*effect);
};
@@ -844,36 +858,11 @@ void MotionMaster::MoveKnockbackFrom(Position const& origin, float speedXY, floa
Add(movement);
}
-void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ)
-{
- // This function may make players fall below map
- if (_owner->GetTypeId() == TYPEID_PLAYER)
- return;
-
- float x, y, z = _owner->GetPositionZ();
-
- float moveTimeHalf = speedZ / Movement::gravity;
- float dist = 2 * moveTimeHalf * speedXY;
-
- _owner->GetNearPoint2D(nullptr, x, y, dist, _owner->GetOrientation() + angle);
- _owner->UpdateAllowedPositionZ(x, y, z);
-
- MoveJump(x, y, z, speedXY, speedZ);
-}
-
void MotionMaster::MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id /*= EVENT_JUMP*/, MovementFacingTarget const& facing /*= {}*/,
bool orientationFixed /*= false*/, JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult /*= {}*/)
{
- MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ, id, facing, orientationFixed, arrivalCast,
- spellEffectExtraData, std::move(scriptResult));
-}
-
-void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id /*= EVENT_JUMP*/, MovementFacingTarget const& facing /* = {}*/,
- bool orientationFixed /*= false*/, JumpArrivalCastArgs const* arrivalCast /*= nullptr*/, Movement::SpellEffectExtraData const* spellEffectExtraData /*= nullptr*/,
- Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult /*= {}*/)
-{
- TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveJump: '{}', jumps to point Id: {} (X: {}, Y: {}, Z: {})", _owner->GetGUID(), id, x, y, z);
+ TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveJump: '{}', jumps to point Id: {} ({})", _owner->GetGUID(), id, pos.ToString());
if (speedXY < 0.01f)
{
if (scriptResult)
@@ -886,7 +875,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
std::function<void(Movement::MoveSplineInit&)> initializer = [=, effect = (spellEffectExtraData ? Optional<Movement::SpellEffectExtraData>(*spellEffectExtraData) : Optional<Movement::SpellEffectExtraData>())](Movement::MoveSplineInit& init)
{
- init.MoveTo(x, y, z, false);
+ init.MoveTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), false);
init.SetParabolic(max_height, 0);
init.SetVelocity(speedXY);
std::visit(Movement::MoveSplineInitFacingVisitor(init), facing);
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index 22f6bfaf475..43ad95fd4da 100644
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -190,14 +190,10 @@ class TC_GAME_API MotionMaster
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult = {});
void MoveCharge(float x, float y, float z, float speed = SPEED_CHARGE, uint32 id = EVENT_CHARGE, bool generatePath = false, Unit const* target = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
void MoveCharge(PathGenerator const& path, float speed = SPEED_CHARGE, Unit const* target = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
- void MoveKnockbackFrom(Position const& origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
- void MoveJumpTo(float angle, float speedXY, float speedZ);
+ void MoveKnockbackFrom(Position const& origin, float speedXY, float speedZ, float angle = M_PI, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
void MoveJump(Position const& pos, float speedXY, float speedZ, uint32 id = EVENT_JUMP, MovementFacingTarget const& facing = {},
bool orientationFixed = false, JumpArrivalCastArgs const* arrivalCast = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr,
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult = {});
- void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = EVENT_JUMP, MovementFacingTarget const& facing = {},
- bool orientationFixed = false, JumpArrivalCastArgs const* arrivalCast = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr,
- Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult = {});
void MoveJumpWithGravity(Position const& pos, float speedXY, float gravity, uint32 id = EVENT_JUMP, MovementFacingTarget const& facing = {},
bool orientationFixed = false, JumpArrivalCastArgs const* arrivalCast = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr,
Optional<Scripting::v2::ActionResultSetter<MovementStopReason>>&& scriptResult = {});
diff --git a/src/server/game/Movement/Spline/MoveSpline.cpp b/src/server/game/Movement/Spline/MoveSpline.cpp
index a317b018ed6..7d76570b81d 100644
--- a/src/server/game/Movement/Spline/MoveSpline.cpp
+++ b/src/server/game/Movement/Spline/MoveSpline.cpp
@@ -120,9 +120,8 @@ void MoveSpline::computeFallElevation(int32 time_point, float& el) const
struct FallInitializer
{
- FallInitializer(float _start_elevation) : start_elevation(_start_elevation) { }
float start_elevation;
- inline int32 operator()(Spline<int32>& s, int32 i)
+ inline int32 operator()(Spline<int32> const& s, int32 i) const
{
return Movement::computeFallTime(start_elevation - s.getPoint(i+1).z, false) * 1000.f;
}
@@ -132,11 +131,21 @@ enum{
minimal_duration = 1
};
+struct ParabolicInPlaceInitializer
+{
+ float parabolic_amplitude;
+ inline int32 operator()(Spline<int32> const& /*s*/, int32 /*i*/)
+ {
+ return time += Movement::computeFallTime(parabolic_amplitude, false) * 1000.f;
+ }
+
+ int32 time = minimal_duration;
+};
+
struct CommonInitializer
{
- CommonInitializer(float _velocity) : velocityInv(1000.f/_velocity), time(minimal_duration) { }
float velocityInv;
- int32 time;
+ int32 time = minimal_duration;
inline int32 operator()(Spline<int32>& s, int32 i)
{
time += (s.SegLength(i) * velocityInv);
@@ -160,12 +169,17 @@ void MoveSpline::init_spline(MoveSplineInitArgs const& args)
// init spline timestamps
if (splineflags.Falling)
{
- FallInitializer init(spline.getPoint(spline.first()).z);
+ FallInitializer init{ .start_elevation = spline.getPoint(spline.first()).z };
+ spline.initLengths(init);
+ }
+ else if (splineflags.Parabolic && args.velocity < 0.01f)
+ {
+ ParabolicInPlaceInitializer init{ .parabolic_amplitude = args.parabolic_amplitude };
spline.initLengths(init);
}
else
{
- CommonInitializer init(args.velocity);
+ CommonInitializer init{ .velocityInv = 1000.0f / args.velocity };
spline.initLengths(init);
}
@@ -254,7 +268,7 @@ bool MoveSplineInitArgs::Validate(Unit const* unit)
}()
CHECK(path.size() > 1, unit->GetDebugInfo());
- CHECK(velocity >= 0.01f, unit->GetDebugInfo());
+ CHECK(velocity >= 0.01f || (flags.Parabolic && parabolic_amplitude != 0.0f), unit->GetDebugInfo());
CHECK(effect_start_point < std::ssize(path), unit->GetDebugInfo());
CHECK(_checkPathLengths(), unit->GetGUID().ToString());
if (spellEffectExtra)
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 95df657d03d..e05c2fa67d8 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -4072,8 +4072,9 @@ void Spell::EffectLeapBack()
float speedxy = effectInfo->MiscValue / 10.f;
float speedz = damage / 10.f;
+
// Disengage
- unitTarget->JumpTo(speedxy, speedz, effectInfo->PositionFacing);
+ unitTarget->KnockbackFrom(unitTarget->GetPosition(), speedxy, speedz, effectInfo->PositionFacing);
// changes fall time
if (m_caster->GetTypeId() == TYPEID_PLAYER)
@@ -4162,7 +4163,7 @@ void Spell::EffectPullTowards()
return;
}
- unitTarget->JumpTo(speedXY, speedZ, 0.0f, pos);
+ unitTarget->KnockbackFrom(unitTarget->GetPosition(), speedXY, speedZ, unitTarget->GetRelativeAngle(pos));
}
void Spell::EffectPullTowardsDest()
@@ -4198,7 +4199,7 @@ void Spell::EffectPullTowardsDest()
return;
}
- unitTarget->JumpTo(speedXY, speedZ, 0.0f, *pos);
+ unitTarget->KnockbackFrom(unitTarget->GetPosition(), speedXY, speedZ, unitTarget->GetRelativeAngle(pos));
}
void Spell::EffectChangeRaidMarker()
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 9ffefa47fc6..db24e13cb19 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -21,7 +21,6 @@
#include "Spell.h"
#include "SpellAuras.h"
#include "SpellMgr.h"
-#include "StringConvert.h"
#include "Unit.h"
#include <string>
@@ -35,7 +34,7 @@ bool SpellScriptBase::_Validate(SpellInfo const* entry)
return true;
}
-SpellScriptBase::SpellScriptBase() noexcept : m_currentScriptState(SPELL_SCRIPT_STATE_NONE), m_scriptSpellId(0)
+SpellScriptBase::SpellScriptBase() noexcept : m_scriptSpellId(0), m_currentScriptState(SPELL_SCRIPT_STATE_NONE)
{
}
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 77c5c512fc7..739355cd21e 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -174,9 +174,9 @@ protected:
Ret(* Thunk)(BaseClass&, Args..., StorageType);
};
- uint8 m_currentScriptState;
std::string_view m_scriptName;
uint32 m_scriptSpellId;
+ uint8 m_currentScriptState;
private:
diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
index 2c05032de2e..21211518c3c 100644
--- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp
@@ -153,14 +153,15 @@ public:
{
if (summoned->GetEntry() == NPC_HIGHBORNE_BUNNY)
{
+ summoned->SetDisableGravity(true);
+
if (Creature* target = ObjectAccessor::GetCreature(*summoned, targetGUID))
{
- target->GetMotionMaster()->MoveJump(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ() + 15.0f, me->GetOrientation(), 0);
+ target->GetMotionMaster()->MovePoint(0, target->GetPositionX(), target->GetPositionY(), me->GetPositionZ() + 15.0f, false);
target->UpdatePosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false);
}
- summoned->SetDisableGravity(true);
targetGUID = summoned->GetGUID();
}
}
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 32bc627b92d..1fd04161511 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -488,7 +488,7 @@ struct boss_toc_champion_controller : public BossAI
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);
+ champion->GetMotionMaster()->MoveJump({ (ToCCommonLoc[1].GetPositionX() * 2) - vChampionJumpTarget[pos].GetPositionX(), vChampionJumpTarget[pos].GetPositionY(), vChampionJumpTarget[pos].GetPositionZ() }, 20.0f, 20.0f);
champion->SetOrientation(3);
}
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index 917562d6661..d9c4fa8d755 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -451,7 +451,7 @@ class boss_mimiron : public CreatureScript
DoCastAOE(SPELL_DESPAWN_ASSAULT_BOTS);
me->ExitVehicle();
// ExitVehicle() offset position is not implemented, so we make up for that with MoveJump()...
- me->GetMotionMaster()->MoveJump(me->GetPositionX() + (10.f * std::cos(me->GetOrientation())), me->GetPositionY() + (10.f * std::sin(me->GetOrientation())), me->GetPositionZ(), 10.f, 5.f);
+ me->GetMotionMaster()->MoveJump(me->GetPositionWithOffset({ 10.0f, 0.0f }), 10.f, 5.f);
events.ScheduleEvent(EVENT_OUTTRO_1, 7s);
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
index 96729d2b71a..1a21fd6dc1c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
@@ -701,7 +701,7 @@ class boss_thorim : public CreatureScript
me->SetReactState(REACT_AGGRESSIVE);
me->SetDisableGravity(false);
me->SetControlled(false, UNIT_STATE_ROOT);
- me->GetMotionMaster()->MoveJump(2134.8f, -263.056f, 419.983f, 30.0f, 20.0f);
+ me->GetMotionMaster()->MoveJump({ 2134.8f, -263.056f, 419.983f }, 30.0f, 20.0f);
events.ScheduleEvent(EVENT_START_PERIODIC_CHARGE, 2s, 0, PHASE_2);
events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, 15s, 0, PHASE_2);
events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, 20s, 0, PHASE_2);