Core: Updated to 10.0.2

This commit is contained in:
Shauren
2022-12-04 15:13:20 +01:00
parent de7c03c838
commit e98e1283ea
132 changed files with 9328 additions and 4629 deletions

View File

@@ -293,6 +293,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
bool HasFall = HasFallDirection || unit->m_movementInfo.jump.fallTime != 0;
bool HasSpline = unit->IsSplineEnabled();
bool HasInertia = unit->m_movementInfo.inertia.has_value();
bool HasAdvFlying = unit->m_movementInfo.advFlying.has_value();
*data << GetGUID(); // MoverGUID
@@ -321,17 +322,24 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
data->WriteBit(false); // HeightChangeFailed
data->WriteBit(false); // RemoteTimeValid
data->WriteBit(HasInertia); // HasInertia
data->WriteBit(HasAdvFlying); // HasAdvFlying
if (!unit->m_movementInfo.transport.guid.IsEmpty())
*data << unit->m_movementInfo.transport;
if (HasInertia)
{
*data << unit->m_movementInfo.inertia->guid;
*data << unit->m_movementInfo.inertia->id;
*data << unit->m_movementInfo.inertia->force.PositionXYZStream();
*data << uint32(unit->m_movementInfo.inertia->lifetime);
}
if (HasAdvFlying)
{
*data << float(unit->m_movementInfo.advFlying->forwardVelocity);
*data << float(unit->m_movementInfo.advFlying->upVelocity);
}
if (HasFall)
{
*data << uint32(unit->m_movementInfo.jump.fallTime); // Time
@@ -366,6 +374,24 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
*data << float(1.0f); // MovementForcesModMagnitude
}
*data << float(2.0f); // advFlyingAirFriction
*data << float(65.0f); // advFlyingMaxVel
*data << float(1.0f); // advFlyingLiftCoefficient
*data << float(3.0f); // advFlyingDoubleJumpVelMod
*data << float(10.0f); // advFlyingGlideStartMinHeight
*data << float(100.0f); // advFlyingAddImpulseMaxSpeed
*data << float(90.0f); // advFlyingMinBankingRate
*data << float(140.0f); // advFlyingMaxBankingRate
*data << float(180.0f); // advFlyingMinPitchingRateDown
*data << float(360.0f); // advFlyingMaxPitchingRateDown
*data << float(90.0f); // advFlyingMinPitchingRateUp
*data << float(270.0f); // advFlyingMaxPitchingRateUp
*data << float(30.0f); // advFlyingMinTurnVelocityThreshold
*data << float(80.0f); // advFlyingMaxTurnVelocityThreshold
*data << float(2.75f); // advFlyingSurfaceFriction
*data << float(7.0f); // advFlyingOverMaxDeceleration
*data << float(0.4f); // advFlyingLaunchSpeedCoefficient
data->WriteBit(HasSpline);
data->FlushBits();
@@ -438,6 +464,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
bool hasFaceMovementDir = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FACE_MOVEMENT_DIR);
bool hasFollowsTerrain = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FOLLOWS_TERRAIN);
bool hasUnk1 = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_UNK1);
bool hasUnk2 = false;
bool hasTargetRollPitchYaw = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_TARGET_ROLL_PITCH_YAW);
bool hasScaleCurveID = createProperties && createProperties->ScaleCurveId != 0;
bool hasMorphCurveID = createProperties && createProperties->MorphCurveId != 0;
@@ -448,6 +475,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
bool hasAreaTriggerPolygon = createProperties && shape.IsPolygon();
bool hasAreaTriggerCylinder = shape.IsCylinder();
bool hasDisk = shape.IsDisk();
bool hasBoundedPlane = shape.IsBoudedPlane();
bool hasAreaTriggerSpline = areaTrigger->HasSplines();
bool hasOrbit = areaTrigger->HasOrbit();
bool hasMovementScript = false;
@@ -458,6 +486,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
data->WriteBit(hasFaceMovementDir);
data->WriteBit(hasFollowsTerrain);
data->WriteBit(hasUnk1);
data->WriteBit(hasUnk2);
data->WriteBit(hasTargetRollPitchYaw);
data->WriteBit(hasScaleCurveID);
data->WriteBit(hasMorphCurveID);
@@ -468,6 +497,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
data->WriteBit(hasAreaTriggerPolygon);
data->WriteBit(hasAreaTriggerCylinder);
data->WriteBit(hasDisk);
data->WriteBit(hasBoundedPlane);
data->WriteBit(hasAreaTriggerSpline);
data->WriteBit(hasOrbit);
data->WriteBit(hasMovementScript);
@@ -549,6 +579,14 @@ void Object::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, Playe
*data << float(shape.DiskDatas.LocationZOffsetTarget);
}
if (hasBoundedPlane)
{
*data << float(shape.BoundedPlaneDatas.Extents[0]);
*data << float(shape.BoundedPlaneDatas.Extents[1]);
*data << float(shape.BoundedPlaneDatas.ExtentsTarget[0]);
*data << float(shape.BoundedPlaneDatas.ExtentsTarget[1]);
}
//if (hasMovementScript)
// *data << *areaTrigger->GetMovementScript(); // AreaTriggerMovementScriptInfo
@@ -2300,10 +2338,10 @@ int32 WorldObject::ModSpellDuration(SpellInfo const* spellInfo, WorldObject cons
if (!positive)
{
int32 mechanicMask = spellInfo->GetSpellMechanicMaskByEffectMask(effectMask);
uint64 mechanicMask = spellInfo->GetSpellMechanicMaskByEffectMask(effectMask);
auto mechanicCheck = [mechanicMask](AuraEffect const* aurEff) -> bool
{
if (mechanicMask & (1 << aurEff->GetMiscValue()))
if (mechanicMask & (UI64LIT(1) << aurEff->GetMiscValue()))
return true;
return false;
};