Core: Update to 10.1
Port From (https://github.com/TrinityCore/TrinityCore/commit/16bc74667e8996b64258718e95b97258dfc0217a)
This commit is contained in:
@@ -1430,6 +1430,7 @@ namespace Game.Entities
|
||||
public uint turnpersonallootsecurityoff; // 22 turn personal loot security off, enum { false, true, }; Default: false
|
||||
public uint ClearObjectVignetteonOpening; // 23 Clear Object Vignette on Opening, enum { false, true, }; Default: false
|
||||
public uint InteractRadiusOverride; // 24 Interact Radius Override (in hundredths), int, Min value: 0, Max value: 2147483647, Default value: 0
|
||||
public uint Overrideminimaptrackingicon; // 25 Override minimap tracking icon, References: UiTextureAtlasMember, NoValue = 0
|
||||
}
|
||||
|
||||
public struct challengemodereward
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -265,6 +265,7 @@ namespace Game.Entities
|
||||
bool HasSpline = unit.IsSplineEnabled();
|
||||
bool HasInertia = unit.m_movementInfo.inertia.HasValue;
|
||||
bool HasAdvFlying = unit.m_movementInfo.advFlying.HasValue;
|
||||
bool HasStandingOnGameObjectGUID = unit.m_movementInfo.standingOnGameObjectGUID.HasValue;
|
||||
|
||||
data.WritePackedGuid(GetGUID()); // MoverGUID
|
||||
|
||||
@@ -287,6 +288,7 @@ namespace Game.Entities
|
||||
//for (public uint i = 0; i < RemoveForcesIDs.Count; ++i)
|
||||
// *data << ObjectGuid(RemoveForcesIDs);
|
||||
|
||||
data.WriteBit(HasStandingOnGameObjectGUID); // HasStandingOnGameObjectGUID
|
||||
data.WriteBit(!unit.m_movementInfo.transport.guid.IsEmpty()); // HasTransport
|
||||
data.WriteBit(HasFall); // HasFall
|
||||
data.WriteBit(HasSpline); // HasSpline - marks that the unit uses spline movement
|
||||
@@ -297,6 +299,9 @@ namespace Game.Entities
|
||||
if (!unit.m_movementInfo.transport.guid.IsEmpty())
|
||||
MovementExtensions.WriteTransportInfo(data, unit.m_movementInfo.transport);
|
||||
|
||||
if (HasStandingOnGameObjectGUID)
|
||||
data.WritePackedGuid(unit.m_movementInfo.standingOnGameObjectGUID.Value);
|
||||
|
||||
if (HasInertia)
|
||||
{
|
||||
data.WriteInt32(unit.m_movementInfo.inertia.Value.id);
|
||||
@@ -3774,6 +3779,7 @@ namespace Game.Entities
|
||||
public JumpInfo jump;
|
||||
public float stepUpStartElevation { get; set; }
|
||||
public AdvFlying? advFlying;
|
||||
public ObjectGuid? standingOnGameObjectGUID;
|
||||
|
||||
public MovementInfo()
|
||||
{
|
||||
|
||||
@@ -3684,19 +3684,8 @@ namespace Game.Entities
|
||||
stmt.AddValue(index++, GetDrunkValue());
|
||||
stmt.AddValue(index++, GetHealth());
|
||||
|
||||
int storedPowers = 0;
|
||||
for (PowerType powerType = 0; powerType < PowerType.Max; ++powerType)
|
||||
{
|
||||
if (GetPowerIndex(powerType) != (int)PowerType.Max)
|
||||
{
|
||||
stmt.AddValue(index++, m_unitData.Power[storedPowers]);
|
||||
if (++storedPowers >= (int)PowerType.MaxPerClass)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (; storedPowers < (int)PowerType.MaxPerClass; ++storedPowers)
|
||||
stmt.AddValue(index++, 0);
|
||||
for (int i = 0; i < (int)PowerType.MaxPerClass; ++i)
|
||||
stmt.AddValue(index++, m_unitData.Power[i]);
|
||||
|
||||
stmt.AddValue(index++, GetSession().GetLatency());
|
||||
stmt.AddValue(index++, GetActiveTalentGroup());
|
||||
@@ -3830,19 +3819,8 @@ namespace Game.Entities
|
||||
stmt.AddValue(index++, GetDrunkValue());
|
||||
stmt.AddValue(index++, GetHealth());
|
||||
|
||||
int storedPowers = 0;
|
||||
for (PowerType powerType = 0; powerType < PowerType.Max; ++powerType)
|
||||
{
|
||||
if (GetPowerIndex(powerType) != (int)PowerType.Max)
|
||||
{
|
||||
stmt.AddValue(index++, m_unitData.Power[storedPowers]);
|
||||
if (++storedPowers >= (int)PowerType.MaxPerClass)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (; storedPowers < (int)PowerType.MaxPerClass; ++storedPowers)
|
||||
stmt.AddValue(index++, 0);
|
||||
for (int i = 0; i < (int)PowerType.MaxPerClass; ++i)
|
||||
stmt.AddValue(index++, m_unitData.Power[i]);
|
||||
|
||||
stmt.AddValue(index++, GetSession().GetLatency());
|
||||
stmt.AddValue(index++, GetActiveTalentGroup());
|
||||
|
||||
@@ -5395,6 +5395,43 @@ namespace Game.Entities
|
||||
GetSceneMgr().TriggerDelayedScenes();
|
||||
}
|
||||
|
||||
public void AddSpellCategoryCooldownMod(int spellCategoryId, int mod)
|
||||
{
|
||||
int categoryIndex = m_activePlayerData.CategoryCooldownMods.FindIndexIf(mod => mod.SpellCategoryID == spellCategoryId);
|
||||
|
||||
if (categoryIndex < 0)
|
||||
{
|
||||
CategoryCooldownMod newMod = new();
|
||||
newMod.SpellCategoryID = spellCategoryId;
|
||||
newMod.ModCooldown = -mod;
|
||||
|
||||
AddDynamicUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.CategoryCooldownMods), newMod);
|
||||
}
|
||||
else
|
||||
{
|
||||
CategoryCooldownMod g = m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.CategoryCooldownMods, categoryIndex);
|
||||
SetUpdateFieldValue(ref g.ModCooldown, m_activePlayerData.CategoryCooldownMods[categoryIndex].ModCooldown - mod);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveSpellCategoryCooldownMod(int spellCategoryId, int mod)
|
||||
{
|
||||
int categoryIndex = m_activePlayerData.CategoryCooldownMods.FindIndexIf(mod => mod.SpellCategoryID == spellCategoryId);
|
||||
|
||||
if (categoryIndex < 0)
|
||||
return;
|
||||
|
||||
if (m_activePlayerData.CategoryCooldownMods[categoryIndex].ModCooldown + mod == 0)
|
||||
{
|
||||
RemoveDynamicUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.CategoryCooldownMods), categoryIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
CategoryCooldownMod g = m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.CategoryCooldownMods, categoryIndex);
|
||||
SetUpdateFieldValue(ref g.ModCooldown, m_activePlayerData.CategoryCooldownMods[categoryIndex].ModCooldown + mod);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveSocial()
|
||||
{
|
||||
SocialMgr.RemovePlayerSocial(GetGUID());
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Game.Entities
|
||||
|
||||
public void InitTaxiNodesForLevel(Race race, Class chrClass, uint level)
|
||||
{
|
||||
m_taximask = new byte[((CliDB.TaxiNodesStorage.GetNumRows() - 1) / 8) + 1];
|
||||
m_taximask = new byte[((CliDB.TaxiNodesStorage.GetNumRows() - 1) / (8 * 64) + 1) * 8];
|
||||
|
||||
// class specific initial known nodes
|
||||
if (chrClass == Class.Deathknight)
|
||||
@@ -93,7 +93,7 @@ namespace Game.Entities
|
||||
|
||||
public void LoadTaxiMask(string data)
|
||||
{
|
||||
m_taximask = new byte[((CliDB.TaxiNodesStorage.GetNumRows() - 1) / 8) + 1];
|
||||
m_taximask = new byte[((CliDB.TaxiNodesStorage.GetNumRows() - 1) / (8 * 64) + 1) * 8];
|
||||
|
||||
var split = new StringArray(data, ' ');
|
||||
|
||||
|
||||
@@ -140,6 +140,13 @@ namespace Game.Entities
|
||||
case UnitMods.ArcaneCharges:
|
||||
case UnitMods.Fury:
|
||||
case UnitMods.Pain:
|
||||
case UnitMods.Essence:
|
||||
case UnitMods.RuneBlood:
|
||||
case UnitMods.RuneFrost:
|
||||
case UnitMods.RuneUnholy:
|
||||
case UnitMods.AlternateQuest:
|
||||
case UnitMods.AlternateEncounter:
|
||||
case UnitMods.AlternateMount:
|
||||
UpdateMaxPower((PowerType)(unitMod - UnitMods.PowerStart));
|
||||
break;
|
||||
case UnitMods.ResistanceHoly:
|
||||
|
||||
Reference in New Issue
Block a user