Core/PacketIO: Updated most packet structures to 9.0.1

Port From (https://github.com/TrinityCore/TrinityCore/commit/cab4c87d2d7f6d734ef067d6bf50f4b1d338a7bc)
This commit is contained in:
hondacrx
2020-12-09 14:01:38 -05:00
parent c7d968ea74
commit c46c7ba2dc
65 changed files with 2697 additions and 2217 deletions
@@ -175,6 +175,18 @@ namespace Game.Entities
public float ZOffset;
}
public struct AreaTriggerMovementScriptInfo
{
public uint SpellScriptID;
public Vector3 Center;
public void Write(WorldPacket data)
{
data.WriteUInt32(SpellScriptID);
data.WriteVector3(Center);
}
}
public class AreaTriggerTemplate : AreaTriggerData
{
public unsafe void InitMaxSearchRadius()
+10 -13
View File
@@ -275,9 +275,8 @@ namespace Game.Misc
{
ClientGossipText text = new ClientGossipText();
text.QuestID = (int)questID;
text.ContentTuningID = quest.ContentTuningId;
text.QuestType = item.QuestIcon;
text.QuestLevel = quest.Level;
text.QuestMaxScalingLevel = quest.MaxScalingLevel;
text.QuestFlags = (int)quest.Flags;
text.QuestFlagsEx = (int)quest.FlagsEx;
text.Repeatable = quest.IsRepeatable();
@@ -365,24 +364,22 @@ namespace Game.Misc
Quest quest = Global.ObjectMgr.GetQuestTemplate(questID);
if (quest != null)
{
string title = quest.LogTitle;
ClientGossipText text = new ClientGossipText();
text.QuestID = questID;
text.ContentTuningID = quest.ContentTuningId;
text.QuestType = questMenuItem.QuestIcon;
text.QuestFlags = (uint)quest.Flags;
text.QuestFlagsEx = (uint)quest.FlagsEx;
text.Repeatable = quest.IsRepeatable();
text.QuestTitle = quest.LogTitle;
if (localeConstant != Locale.enUS)
{
QuestTemplateLocale localeData = Global.ObjectMgr.GetQuestLocale(quest.Id);
if (localeData != null)
ObjectManager.GetLocaleString(localeData.LogTitle, localeConstant, ref title);
ObjectManager.GetLocaleString(localeData.LogTitle, localeConstant, ref text.QuestTitle);
}
GossipText text = new GossipText();
text.QuestID = questID;
text.QuestType = questMenuItem.QuestIcon;
text.QuestLevel = (uint)quest.Level;
text.QuestMaxScalingLevel = (uint)quest.MaxScalingLevel;
text.QuestFlags = (uint)quest.Flags;
text.QuestFlagsEx = (uint)quest.FlagsEx;
text.Repeatable = false; // NYI
text.QuestTitle = title;
questList.QuestDataText.Add(text);
}
}
+8 -3
View File
@@ -323,11 +323,11 @@ namespace Game.Entities
data.WriteBits((uint)unit.GetUnitMovementFlags(), 30);
data.WriteBits((uint)unit.GetUnitMovementFlags2(), 18);
data.WriteBit(!unit.m_movementInfo.transport.guid.IsEmpty()); // HasTransport
data.WriteBit(!unit.m_movementInfo.transport.guid.IsEmpty()); // HasTransport
data.WriteBit(HasFall); // HasFall
data.WriteBit(HasSpline); // HasSpline - marks that the unit uses spline movement
data.WriteBit(0); // HeightChangeFailed
data.WriteBit(0); // RemoteTimeValid
data.WriteBit(false); // HeightChangeFailed
data.WriteBit(false); // RemoteTimeValid
if (!unit.m_movementInfo.transport.guid.IsEmpty())
MovementExtensions.WriteTransportInfo(data, unit.m_movementInfo.transport);
@@ -467,6 +467,7 @@ namespace Game.Entities
bool hasAreaTriggerCylinder = areaTriggerTemplate.IsCylinder();
bool hasAreaTriggerSpline = areaTrigger.HasSplines();
bool hasOrbit = areaTrigger.HasOrbit();
bool hasMovementScript = false;
data.WriteBit(hasAbsoluteOrientation);
data.WriteBit(hasDynamicShape);
@@ -489,6 +490,7 @@ namespace Game.Entities
data.WriteBit(hasAreaTriggerCylinder);
data.WriteBit(hasAreaTriggerSpline);
data.WriteBit(hasOrbit);
data.WriteBit(hasMovementScript);
if (hasUnk3)
data.WriteBit(0);
@@ -571,6 +573,9 @@ namespace Game.Entities
data.WriteFloat(areaTriggerTemplate.CylinderDatas.LocationZOffsetTarget);
}
//if (hasMovementScript)
// *data << *areaTrigger->GetMovementScript(); // AreaTriggerMovementScriptInfo
if (hasOrbit)
areaTrigger.GetCircularMovementInfo().Value.Write(data);
}
@@ -497,6 +497,8 @@ namespace Game.Entities
public Array<ObjectGuid> Pieces = new Array<ObjectGuid>(EquipmentSlot.End);
public Array<int> Appearances = new Array<int>(EquipmentSlot.End); // ItemModifiedAppearanceID
public Array<int> Enchants = new Array<int>(2); // SpellItemEnchantmentID
public int Unknown901_1;
public int Unknown901_2;
}
public enum EquipmentSetType
@@ -1335,10 +1335,6 @@ namespace Game.Entities
if (thisPlayer != null)
thisPlayer.SendMovementSetCollisionHeight(thisPlayer.GetCollisionHeight(false));
Dismount data = new Dismount();
data.Guid = GetGUID();
SendMessageToSet(data, true);
// dismount as a vehicle
if (IsTypeId(TypeId.Player) && GetVehicleKit() != null)
{