Core/PacketIO: Updated most packet structures to 9.0.1
Port From (https://github.com/TrinityCore/TrinityCore/commit/cab4c87d2d7f6d734ef067d6bf50f4b1d338a7bc)
This commit is contained in:
@@ -123,4 +123,18 @@ namespace Framework.Constants
|
||||
public const uint GossipSenderSecMailbox = 9;
|
||||
public const uint GossipSenderSecStablemaster = 10;
|
||||
}
|
||||
|
||||
public enum GossipOptionStatus
|
||||
{
|
||||
Available = 0,
|
||||
Unavailable = 1,
|
||||
Locked = 2,
|
||||
AlreadyComplete = 3
|
||||
}
|
||||
|
||||
public enum GossipOptionRewardType
|
||||
{
|
||||
Item = 0,
|
||||
Currency = 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,12 @@ namespace Framework.Constants
|
||||
FishingJunk = 22 // unsupported by client, sending LOOT_FISHING instead
|
||||
}
|
||||
|
||||
public enum LootItemType
|
||||
{
|
||||
Item = 0,
|
||||
Currency = 1
|
||||
}
|
||||
|
||||
public enum LootError
|
||||
{
|
||||
DidntKill = 0, // You don't have permission to loot that corpse.
|
||||
|
||||
@@ -32,12 +32,15 @@ namespace Framework.Constants
|
||||
{
|
||||
None = 0x00,
|
||||
// x00-x07 used as animation Ids storage in pair with Animation flag
|
||||
Unknown0 = 0x00000008, // NOT VERIFIED - does someting related to falling/fixed orientation
|
||||
Unknown_0x1 = 0x00000001, // NOT VERIFIED
|
||||
Unknown_0x2 = 0x00000002, // NOT VERIFIED
|
||||
Unknown_0x4 = 0x00000004, // NOT VERIFIED
|
||||
Unknown_0x8 = 0x00000008, // NOT VERIFIED - does someting related to falling/fixed orientation
|
||||
FallingSlow = 0x00000010,
|
||||
Done = 0x00000020,
|
||||
Falling = 0x00000040, // Affects elevation computation, can't be combined with Parabolic flag
|
||||
NoSpline = 0x00000080,
|
||||
Unknown1 = 0x00000100, // NOT VERIFIED
|
||||
Unknown_0x100 = 0x00000100, // NOT VERIFIED
|
||||
Flying = 0x00000200, // Smooth movement(Catmullrom interpolation mode), flying animation
|
||||
OrientationFixed = 0x00000400, // Model orientation fixed
|
||||
Catmullrom = 0x00000800, // Used Catmullrom interpolation mode
|
||||
@@ -46,27 +49,28 @@ namespace Framework.Constants
|
||||
Frozen = 0x00004000, // Will never arrive
|
||||
TransportEnter = 0x00008000,
|
||||
TransportExit = 0x00010000,
|
||||
Unknown2 = 0x00020000, // NOT VERIFIED
|
||||
Unknown3 = 0x00040000, // NOT VERIFIED
|
||||
Unknown_0x20000 = 0x00020000, // NOT VERIFIED
|
||||
Unknown_0x40000 = 0x00040000, // NOT VERIFIED
|
||||
Backward = 0x00080000,
|
||||
SmoothGroundPath = 0x00100000,
|
||||
CanSwim = 0x00200000,
|
||||
UncompressedPath = 0x00400000,
|
||||
Unknown4 = 0x00800000, // NOT VERIFIED
|
||||
Unknown5 = 0x01000000, // NOT VERIFIED
|
||||
Unknown_0x800000 = 0x00800000, // NOT VERIFIED
|
||||
Unknown_0x1000000 = 0x01000000, // NOT VERIFIED
|
||||
Animation = 0x02000000, // Plays animation after some time passed
|
||||
Parabolic = 0x04000000, // Affects elevation computation, can't be combined with Falling flag
|
||||
FadeObject = 0x08000000,
|
||||
Steering = 0x10000000,
|
||||
Unknown8 = 0x20000000, // NOT VERIFIED
|
||||
Unknown9 = 0x40000000, // NOT VERIFIED
|
||||
Unknown10 = 0x80000000, // NOT VERIFIED
|
||||
Unknown_0x20000000 = 0x20000000, // NOT VERIFIED
|
||||
Unknown_0x40000000 = 0x40000000, // NOT VERIFIED
|
||||
Unknown_0x80000000 = 0x80000000, // NOT VERIFIED
|
||||
|
||||
// animation ids stored here, see AnimType enum, used with Animation flag
|
||||
MaskAnimations = 0x7,
|
||||
// flags that shouldn't be appended into SMSG_MONSTER_MOVE\SMSG_MONSTER_MOVE_TRANSPORT packet, should be more probably
|
||||
MaskNoMonsterMove = MaskAnimations | Done,
|
||||
MaskNoMonsterMove = Done,
|
||||
// Unused, not suported flags
|
||||
MaskUnused = NoSpline | EnterCycle | Frozen | Unknown0 | Unknown1 | Unknown2 | Unknown3 | Unknown4 | FadeObject | Steering | Unknown8 | Unknown9 | Unknown10
|
||||
MaskUnused = NoSpline | EnterCycle | Frozen | Unknown_0x8 | Unknown_0x100 | Unknown_0x20000 | Unknown_0x40000
|
||||
| Unknown_0x800000 | Unknown_0x1000000 | FadeObject | Steering | Unknown_0x20000000 | Unknown_0x40000000 | Unknown_0x80000000
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -305,6 +305,14 @@ namespace Framework.IO
|
||||
WriteBytes(buffer.GetData());
|
||||
}
|
||||
|
||||
public void WriteVector4(Vector4 pos)
|
||||
{
|
||||
WriteFloat(pos.X);
|
||||
WriteFloat(pos.Y);
|
||||
WriteFloat(pos.Z);
|
||||
WriteFloat(pos.W);
|
||||
}
|
||||
|
||||
public void WriteVector3(Vector3 pos)
|
||||
{
|
||||
WriteFloat(pos.X);
|
||||
|
||||
@@ -65,7 +65,11 @@ namespace Game.AI
|
||||
/// <summary>
|
||||
/// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
||||
/// </summary>
|
||||
public virtual void QuestReward(Player player, Quest quest, uint opt) { }
|
||||
public virtual void QuestReward(Player player, Quest quest, uint opt)
|
||||
{
|
||||
QuestReward(player, quest, LootItemType.Item, opt);
|
||||
}
|
||||
public virtual void QuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when the dialog status between a player and the gameobject is requested.
|
||||
|
||||
@@ -516,12 +516,17 @@ namespace Game.AI
|
||||
/// <summary>
|
||||
/// Called when a player completes a quest and is rewarded, opt is the selected item's index or 0
|
||||
/// </summary>
|
||||
public virtual void QuestReward(Player player, Quest quest, uint opt) { }
|
||||
public virtual void QuestReward(Player player, Quest quest, uint opt)
|
||||
{
|
||||
QuestReward(player, quest, LootItemType.Item, opt);
|
||||
}
|
||||
public virtual void QuestReward(Player player, Quest quest, LootItemType type, uint opt) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when a game event starts or ends
|
||||
/// </summary>
|
||||
public virtual void OnGameEvent(bool start, ushort eventId) { }
|
||||
|
||||
/// <summary>
|
||||
/// Called when a game event starts or ends
|
||||
/// </summary>
|
||||
public virtual void OnGameEvent(bool start, ushort eventId) { }
|
||||
|
||||
// Called when the dialog status between a player and the creature is requested.
|
||||
public virtual QuestGiverStatus GetDialogStatus(Player player) { return QuestGiverStatus.ScriptedNoStatus; }
|
||||
|
||||
@@ -257,12 +257,12 @@ namespace Game.Chat.Commands
|
||||
var poiData = Global.ObjectMgr.GetQuestPOIData(questID);
|
||||
if (poiData != null)
|
||||
{
|
||||
var data = poiData.QuestPOIBlobDataStats[0];
|
||||
var data = poiData.Blobs[0];
|
||||
|
||||
mapId = (uint)data.MapID;
|
||||
|
||||
x = data.QuestPOIBlobPointStats[0].X;
|
||||
y = data.QuestPOIBlobPointStats[0].Y;
|
||||
x = data.Points[0].X;
|
||||
y = data.Points[0].Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -581,9 +581,9 @@ namespace Game.Garrisons
|
||||
_owner.SendPacket(data);
|
||||
}
|
||||
|
||||
public void SendBuildingLandmarks(Player receiver)
|
||||
public void SendMapData(Player receiver)
|
||||
{
|
||||
GarrisonBuildingLandmarks buildingLandmarks = new GarrisonBuildingLandmarks();
|
||||
GarrisonMapDataResponse mapData = new GarrisonMapDataResponse();
|
||||
|
||||
foreach (var plot in _plots.Values)
|
||||
{
|
||||
@@ -591,11 +591,11 @@ namespace Game.Garrisons
|
||||
{
|
||||
uint garrBuildingPlotInstId = Global.GarrisonMgr.GetGarrBuildingPlotInst(plot.BuildingInfo.PacketInfo.Value.GarrBuildingID, plot.GarrSiteLevelPlotInstId);
|
||||
if (garrBuildingPlotInstId != 0)
|
||||
buildingLandmarks.Landmarks.Add(new GarrisonBuildingLandmark(garrBuildingPlotInstId, plot.PacketInfo.PlotPos));
|
||||
mapData.Buildings.Add(new GarrisonBuildingMapData(garrBuildingPlotInstId, plot.PacketInfo.PlotPos));
|
||||
}
|
||||
}
|
||||
|
||||
receiver.SendPacket(buildingLandmarks);
|
||||
receiver.SendPacket(mapData);
|
||||
}
|
||||
|
||||
Map FindMap()
|
||||
|
||||
@@ -7544,7 +7544,7 @@ namespace Game
|
||||
_questPOIStorage[questID] = new QuestPOIData(questID);
|
||||
|
||||
QuestPOIData poiData = _questPOIStorage[questID];
|
||||
poiData.QuestPOIBlobDataStats.Add(new QuestPOIBlobData(blobIndex, objectiveIndex, questObjectiveID, questObjectID, mapID, uiMapId, priority, flags, worldEffectID, playerConditionID, spawnTrackingID, POIs[questID][idx1], alwaysAllowMergingBlobs));
|
||||
poiData.Blobs.Add(new QuestPOIBlobData(blobIndex, objectiveIndex, questObjectiveID, questObjectID, mapID, uiMapId, priority, flags, worldEffectID, playerConditionID, spawnTrackingID, POIs[questID][idx1], alwaysAllowMergingBlobs));
|
||||
|
||||
++count;
|
||||
} while (result.NextRow());
|
||||
@@ -10490,8 +10490,23 @@ namespace Game
|
||||
|
||||
public class QuestPOIBlobData
|
||||
{
|
||||
public int BlobIndex;
|
||||
public int ObjectiveIndex;
|
||||
public int QuestObjectiveID;
|
||||
public int QuestObjectID;
|
||||
public int MapID;
|
||||
public int UiMapID;
|
||||
public int Priority;
|
||||
public int Flags;
|
||||
public int WorldEffectID;
|
||||
public int PlayerConditionID;
|
||||
public int NavigationPlayerConditionID;
|
||||
public int SpawnTrackingID;
|
||||
public List<QuestPOIBlobPoint> Points;
|
||||
public bool AlwaysAllowMergingBlobs;
|
||||
|
||||
public QuestPOIBlobData(int blobIndex, int objectiveIndex, int questObjectiveID, int questObjectID, int mapID, int uiMapID, int priority, int flags,
|
||||
int worldEffectID, int playerConditionID, int spawnTrackingID, List<QuestPOIBlobPoint> questPOIBlobPointStats, bool alwaysAllowMergingBlobs)
|
||||
int worldEffectID, int playerConditionID, int spawnTrackingID, List<QuestPOIBlobPoint> points, bool alwaysAllowMergingBlobs)
|
||||
{
|
||||
BlobIndex = blobIndex;
|
||||
ObjectiveIndex = objectiveIndex;
|
||||
@@ -10504,46 +10519,36 @@ namespace Game
|
||||
WorldEffectID = worldEffectID;
|
||||
PlayerConditionID = playerConditionID;
|
||||
SpawnTrackingID = spawnTrackingID;
|
||||
QuestPOIBlobPointStats = questPOIBlobPointStats;
|
||||
Points = points;
|
||||
AlwaysAllowMergingBlobs = alwaysAllowMergingBlobs;
|
||||
}
|
||||
|
||||
public int BlobIndex;
|
||||
public int ObjectiveIndex;
|
||||
public int QuestObjectiveID;
|
||||
public int QuestObjectID;
|
||||
public int MapID;
|
||||
public int UiMapID;
|
||||
public int Priority;
|
||||
public int Flags;
|
||||
public int WorldEffectID;
|
||||
public int PlayerConditionID;
|
||||
public int SpawnTrackingID;
|
||||
public List<QuestPOIBlobPoint> QuestPOIBlobPointStats;
|
||||
public bool AlwaysAllowMergingBlobs;
|
||||
}
|
||||
|
||||
public class QuestPOIBlobPoint
|
||||
{
|
||||
public QuestPOIBlobPoint(int _x, int _y)
|
||||
{
|
||||
X = _x;
|
||||
Y = _y;
|
||||
}
|
||||
|
||||
public int X;
|
||||
public int Y;
|
||||
public int Z;
|
||||
|
||||
public QuestPOIBlobPoint(int x, int y, int z)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
}
|
||||
}
|
||||
|
||||
public class QuestPOIData
|
||||
{
|
||||
public uint QuestID;
|
||||
public List<QuestPOIBlobData> QuestPOIBlobDataStats = new List<QuestPOIBlobData>();
|
||||
public ByteBuffer QueryDataBuffer = new ByteBuffer();
|
||||
public List<QuestPOIBlobData> Blobs;
|
||||
public ByteBuffer QueryDataBuffer;
|
||||
|
||||
public QuestPOIData(uint questId)
|
||||
{
|
||||
QuestID = questId;
|
||||
Blobs = new List<QuestPOIBlobData>();
|
||||
QueryDataBuffer = new ByteBuffer();
|
||||
}
|
||||
|
||||
public void InitializeQueryData()
|
||||
@@ -10554,9 +10559,9 @@ namespace Game
|
||||
public void Write(ByteBuffer data)
|
||||
{
|
||||
data.WriteUInt32(QuestID);
|
||||
data.WriteInt32(QuestPOIBlobDataStats.Count);
|
||||
data.WriteInt32(Blobs.Count);
|
||||
|
||||
foreach (QuestPOIBlobData questPOIBlobData in QuestPOIBlobDataStats)
|
||||
foreach (QuestPOIBlobData questPOIBlobData in Blobs)
|
||||
{
|
||||
data.WriteInt32(questPOIBlobData.BlobIndex);
|
||||
data.WriteInt32(questPOIBlobData.ObjectiveIndex);
|
||||
@@ -10568,13 +10573,15 @@ namespace Game
|
||||
data.WriteInt32(questPOIBlobData.Flags);
|
||||
data.WriteInt32(questPOIBlobData.WorldEffectID);
|
||||
data.WriteInt32(questPOIBlobData.PlayerConditionID);
|
||||
data.WriteInt32(questPOIBlobData.NavigationPlayerConditionID);
|
||||
data.WriteInt32(questPOIBlobData.SpawnTrackingID);
|
||||
data.WriteInt32(questPOIBlobData.QuestPOIBlobPointStats.Count);
|
||||
data.WriteInt32(questPOIBlobData.Points.Count);
|
||||
|
||||
foreach (QuestPOIBlobPoint questPOIBlobPoint in questPOIBlobData.QuestPOIBlobPointStats)
|
||||
foreach (QuestPOIBlobPoint questPOIBlobPoint in questPOIBlobData.Points)
|
||||
{
|
||||
data.WriteInt32(questPOIBlobPoint.X);
|
||||
data.WriteInt32(questPOIBlobPoint.Y);
|
||||
data.WriteInt16((short)questPOIBlobPoint.X);
|
||||
data.WriteInt16((short)questPOIBlobPoint.Y);
|
||||
data.WriteInt16((short)questPOIBlobPoint.Z);
|
||||
}
|
||||
|
||||
data.WriteBit(questPOIBlobData.AlwaysAllowMergingBlobs);
|
||||
|
||||
@@ -1107,11 +1107,11 @@ namespace Game.Guilds
|
||||
else
|
||||
member.RemoveFlag(GuildMemberFlags.DND);
|
||||
|
||||
GuildEventAwayChange awayChange = new GuildEventAwayChange();
|
||||
awayChange.Guid = memberGuid;
|
||||
awayChange.AFK = afk;
|
||||
awayChange.DND = dnd;
|
||||
BroadcastPacket(awayChange);
|
||||
GuildEventStatusChange statusChange = new GuildEventStatusChange();
|
||||
statusChange.Guid = memberGuid;
|
||||
statusChange.AFK = afk;
|
||||
statusChange.DND = dnd;
|
||||
BroadcastPacket(statusChange);
|
||||
}
|
||||
|
||||
void SendEventBankMoneyChanged()
|
||||
|
||||
@@ -578,8 +578,8 @@ namespace Game
|
||||
reportedPlayer.ReportedAfkBy(GetPlayer());
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.RequestRatedBattlefieldInfo)]
|
||||
void HandleRequestRatedBattlefieldInfo(RequestRatedBattlefieldInfo packet)
|
||||
[WorldPacketHandler(ClientOpcodes.RequestRatedPvpInfo)]
|
||||
void HandleRequestRatedPvpInfo(RequestRatedPvpInfo packet)
|
||||
{
|
||||
RatedPvpInfo ratedPvpInfo = new RatedPvpInfo();
|
||||
SendPacket(ratedPvpInfo);
|
||||
|
||||
@@ -108,12 +108,12 @@ namespace Game
|
||||
Global.CalendarMgr.SendCalendarCommandResult(GetPlayer().GetGUID(), CalendarError.EventInvalid);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarCommunityFilter)]
|
||||
void HandleCalendarCommunityFilter(CalendarCommunityFilter calendarCommunityFilter)
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarCommunityInviteRequest)]
|
||||
void HandleCalendarCommunityInvite(CalendarCommunityInviteRequest calendarCommunityInvite)
|
||||
{
|
||||
Guild guild = Global.GuildMgr.GetGuildById(GetPlayer().GetGuildId());
|
||||
if (guild)
|
||||
guild.MassInviteToEvent(this, calendarCommunityFilter.MinLevel, calendarCommunityFilter.MaxLevel, calendarCommunityFilter.MaxRankOrder);
|
||||
guild.MassInviteToEvent(this, calendarCommunityInvite.MinLevel, calendarCommunityInvite.MaxLevel, calendarCommunityInvite.MaxRankOrder);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarAddEvent)]
|
||||
@@ -234,8 +234,8 @@ namespace Game
|
||||
Global.CalendarMgr.SendCalendarCommandResult(guid, CalendarError.EventInvalid);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarEventInvite)]
|
||||
void HandleCalendarEventInvite(CalendarEventInvite calendarEventInvite)
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarInvite)]
|
||||
void HandleCalendarInvite(CalendarInvitePkt calendarInvite)
|
||||
{
|
||||
ObjectGuid playerGuid = GetPlayer().GetGUID();
|
||||
|
||||
@@ -243,10 +243,10 @@ namespace Game
|
||||
Team inviteeTeam = 0;
|
||||
ulong inviteeGuildId = 0;
|
||||
|
||||
if (!ObjectManager.NormalizePlayerName(ref calendarEventInvite.Name))
|
||||
if (!ObjectManager.NormalizePlayerName(ref calendarInvite.Name))
|
||||
return;
|
||||
|
||||
Player player = Global.ObjAccessor.FindPlayerByName(calendarEventInvite.Name);
|
||||
Player player = Global.ObjAccessor.FindPlayerByName(calendarInvite.Name);
|
||||
if (player)
|
||||
{
|
||||
// Invitee is online
|
||||
@@ -257,7 +257,7 @@ namespace Game
|
||||
else
|
||||
{
|
||||
// Invitee offline, get data from database
|
||||
ObjectGuid guid = Global.CharacterCacheStorage.GetCharacterGuidByName(calendarEventInvite.Name);
|
||||
ObjectGuid guid = Global.CharacterCacheStorage.GetCharacterGuidByName(calendarInvite.Name);
|
||||
if (!guid.IsEmpty())
|
||||
{
|
||||
CharacterCacheEntry characterInfo = Global.CharacterCacheStorage.GetCharacterCacheByGuid(guid);
|
||||
@@ -288,14 +288,14 @@ namespace Game
|
||||
|
||||
if (Convert.ToBoolean(result1.Read<byte>(0) & (byte)SocialFlag.Ignored))
|
||||
{
|
||||
Global.CalendarMgr.SendCalendarCommandResult(playerGuid, CalendarError.IgnoringYouS, calendarEventInvite.Name);
|
||||
Global.CalendarMgr.SendCalendarCommandResult(playerGuid, CalendarError.IgnoringYouS, calendarInvite.Name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!calendarEventInvite.Creating)
|
||||
if (!calendarInvite.Creating)
|
||||
{
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarEventInvite.EventID);
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarInvite.EventID);
|
||||
if (calendarEvent != null)
|
||||
{
|
||||
if (calendarEvent.IsGuildEvent() && calendarEvent.GuildId == inviteeGuildId)
|
||||
@@ -305,7 +305,7 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
CalendarInvite invite = new CalendarInvite(Global.CalendarMgr.GetFreeInviteId(), calendarEventInvite.EventID, inviteeGuid, playerGuid, SharedConst.CalendarDefaultResponseTime, CalendarInviteStatus.Invited, CalendarModerationRank.Player, "");
|
||||
CalendarInvite invite = new CalendarInvite(Global.CalendarMgr.GetFreeInviteId(), calendarInvite.EventID, inviteeGuid, playerGuid, SharedConst.CalendarDefaultResponseTime, CalendarInviteStatus.Invited, CalendarModerationRank.Player, "");
|
||||
Global.CalendarMgr.AddInvite(calendarEvent, invite);
|
||||
}
|
||||
else
|
||||
@@ -313,13 +313,13 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
if (calendarEventInvite.IsSignUp && inviteeGuildId == GetPlayer().GetGuildId())
|
||||
if (calendarInvite.IsSignUp && inviteeGuildId == GetPlayer().GetGuildId())
|
||||
{
|
||||
Global.CalendarMgr.SendCalendarCommandResult(playerGuid, CalendarError.NoGuildInvites);
|
||||
return;
|
||||
}
|
||||
|
||||
CalendarInvite invite = new CalendarInvite(calendarEventInvite.EventID, 0, inviteeGuid, playerGuid, SharedConst.CalendarDefaultResponseTime, CalendarInviteStatus.Invited, CalendarModerationRank.Player, "");
|
||||
CalendarInvite invite = new CalendarInvite(calendarInvite.EventID, 0, inviteeGuid, playerGuid, SharedConst.CalendarDefaultResponseTime, CalendarInviteStatus.Invited, CalendarModerationRank.Player, "");
|
||||
Global.CalendarMgr.SendCalendarEventInvite(invite);
|
||||
}
|
||||
}
|
||||
@@ -347,25 +347,25 @@ namespace Game
|
||||
Global.CalendarMgr.SendCalendarCommandResult(guid, CalendarError.EventInvalid);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarEventRsvp)]
|
||||
void HandleCalendarEventRsvp(CalendarEventRSVP calendarEventRSVP)
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarRsvp)]
|
||||
void HandleCalendarRsvp(HandleCalendarRsvp calendarRSVP)
|
||||
{
|
||||
ObjectGuid guid = GetPlayer().GetGUID();
|
||||
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarEventRSVP.EventID);
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarRSVP.EventID);
|
||||
if (calendarEvent != null)
|
||||
{
|
||||
// i think we still should be able to remove self from locked events
|
||||
if (calendarEventRSVP.Status != CalendarInviteStatus.Removed && calendarEvent.IsLocked())
|
||||
if (calendarRSVP.Status != CalendarInviteStatus.Removed && calendarEvent.IsLocked())
|
||||
{
|
||||
Global.CalendarMgr.SendCalendarCommandResult(guid, CalendarError.EventLocked);
|
||||
return;
|
||||
}
|
||||
|
||||
CalendarInvite invite = Global.CalendarMgr.GetInvite(calendarEventRSVP.InviteID);
|
||||
CalendarInvite invite = Global.CalendarMgr.GetInvite(calendarRSVP.InviteID);
|
||||
if (invite != null)
|
||||
{
|
||||
invite.Status = calendarEventRSVP.Status;
|
||||
invite.Status = calendarRSVP.Status;
|
||||
invite.ResponseTime = Time.UnixTime;
|
||||
|
||||
Global.CalendarMgr.UpdateInvite(invite);
|
||||
@@ -399,22 +399,22 @@ namespace Game
|
||||
Global.CalendarMgr.SendCalendarCommandResult(guid, CalendarError.NoInvite);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarEventStatus)]
|
||||
void HandleCalendarEventStatus(CalendarEventStatus calendarEventStatus)
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarStatus)]
|
||||
void HandleCalendarStatus(CalendarStatus calendarStatus)
|
||||
{
|
||||
ObjectGuid guid = GetPlayer().GetGUID();
|
||||
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarEventStatus.EventID);
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarStatus.EventID);
|
||||
if (calendarEvent != null)
|
||||
{
|
||||
CalendarInvite invite = Global.CalendarMgr.GetInvite(calendarEventStatus.InviteID);
|
||||
CalendarInvite invite = Global.CalendarMgr.GetInvite(calendarStatus.InviteID);
|
||||
if (invite != null)
|
||||
{
|
||||
invite.Status = (CalendarInviteStatus)calendarEventStatus.Status;
|
||||
invite.Status = (CalendarInviteStatus)calendarStatus.Status;
|
||||
|
||||
Global.CalendarMgr.UpdateInvite(invite);
|
||||
Global.CalendarMgr.SendCalendarEventStatus(calendarEvent, invite);
|
||||
Global.CalendarMgr.SendCalendarClearPendingAction(calendarEventStatus.Guid);
|
||||
Global.CalendarMgr.SendCalendarClearPendingAction(calendarStatus.Guid);
|
||||
}
|
||||
else
|
||||
Global.CalendarMgr.SendCalendarCommandResult(guid, CalendarError.NoInvite); // correct?
|
||||
@@ -424,17 +424,17 @@ namespace Game
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CalendarEventModeratorStatus)]
|
||||
void HandleCalendarEventModeratorStatus(CalendarEventModeratorStatus calendarEventModeratorStatus)
|
||||
void HandleCalendarModeratorStatus(CalendarModeratorStatusQuery calendarModeratorStatus)
|
||||
{
|
||||
ObjectGuid guid = GetPlayer().GetGUID();
|
||||
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarEventModeratorStatus.EventID);
|
||||
CalendarEvent calendarEvent = Global.CalendarMgr.GetEvent(calendarModeratorStatus.EventID);
|
||||
if (calendarEvent != null)
|
||||
{
|
||||
CalendarInvite invite = Global.CalendarMgr.GetInvite(calendarEventModeratorStatus.InviteID);
|
||||
CalendarInvite invite = Global.CalendarMgr.GetInvite(calendarModeratorStatus.InviteID);
|
||||
if (invite != null)
|
||||
{
|
||||
invite.Rank = (CalendarModerationRank)calendarEventModeratorStatus.Status;
|
||||
invite.Rank = (CalendarModerationRank)calendarModeratorStatus.Status;
|
||||
Global.CalendarMgr.UpdateInvite(invite);
|
||||
Global.CalendarMgr.SendCalendarEventModeratorStatusAlert(calendarEvent, invite);
|
||||
}
|
||||
|
||||
@@ -54,11 +54,6 @@ namespace Game
|
||||
|
||||
void HandleCharEnumCallback(SQLResult result)
|
||||
{
|
||||
byte demonHunterCount = 0; // We use this counter to allow multiple demon hunter creations when allowed in config
|
||||
bool canAlwaysCreateDemonHunter = HasPermission(RBACPermissions.SkipCheckCharacterCreationDemonHunter);
|
||||
if (WorldConfig.GetIntValue(WorldCfg.CharacterCreatingMinLevelForDemonHunter) == 0) // char level = 0 means this check is disabled, so always true
|
||||
canAlwaysCreateDemonHunter = true;
|
||||
|
||||
EnumCharactersResult charResult = new EnumCharactersResult();
|
||||
charResult.Success = true;
|
||||
charResult.IsDeletedCharacters = false;
|
||||
@@ -101,14 +96,6 @@ namespace Game
|
||||
if (!Global.CharacterCacheStorage.HasCharacterCacheEntry(charInfo.Guid)) // This can happen if characters are inserted into the database manually. Core hasn't loaded name data yet.
|
||||
Global.CharacterCacheStorage.AddCharacterCacheEntry(charInfo.Guid, GetAccountId(), charInfo.Name, charInfo.SexId, charInfo.RaceId, (byte)charInfo.ClassId, charInfo.ExperienceLevel, false);
|
||||
|
||||
if (charInfo.ClassId == Class.DemonHunter)
|
||||
demonHunterCount++;
|
||||
|
||||
if (demonHunterCount >= WorldConfig.GetIntValue(WorldCfg.DemonHuntersPerRealm) && !canAlwaysCreateDemonHunter)
|
||||
charResult.HasDemonHunterOnRealm = true;
|
||||
else
|
||||
charResult.HasDemonHunterOnRealm = false;
|
||||
|
||||
charResult.MaxCharacterLevel = Math.Max(charResult.MaxCharacterLevel, charInfo.ExperienceLevel);
|
||||
|
||||
charResult.Characters.Add(charInfo);
|
||||
@@ -116,8 +103,6 @@ namespace Game
|
||||
while (result.NextRow());
|
||||
}
|
||||
|
||||
charResult.IsTestDemonHunterCreationAllowed = canAlwaysCreateDemonHunter;
|
||||
charResult.IsDemonHunterCreationAllowed = GetAccountExpansion() >= Expansion.Legion || canAlwaysCreateDemonHunter;
|
||||
charResult.IsAlliedRacesCreationAllowed = GetAccountExpansion() >= Expansion.BattleForAzeroth;
|
||||
|
||||
foreach (var requirement in Global.ObjectMgr.GetRaceUnlockRequirements())
|
||||
@@ -360,25 +345,10 @@ namespace Game
|
||||
if (result1 != null && !result1.IsEmpty())
|
||||
{
|
||||
Team team = Player.TeamForRace(createInfo.RaceId);
|
||||
int freeDemonHunterSlots = WorldConfig.GetIntValue(WorldCfg.DemonHuntersPerRealm);
|
||||
|
||||
byte accRace = result1.Read<byte>(1);
|
||||
|
||||
if (checkDemonHunterReqs)
|
||||
{
|
||||
byte accClass = result1.Read<byte>(2);
|
||||
if (accClass == (byte)Class.DemonHunter)
|
||||
{
|
||||
if (freeDemonHunterSlots > 0)
|
||||
--freeDemonHunterSlots;
|
||||
|
||||
if (freeDemonHunterSlots == 0)
|
||||
{
|
||||
SendCharCreate(ResponseCodes.CharCreateFailed);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasDemonHunterReqLevel)
|
||||
{
|
||||
byte accLevel = result1.Read<byte>(0);
|
||||
@@ -1079,6 +1049,40 @@ namespace Game
|
||||
GetPlayer().GetReputationMgr().SetInactive(packet.Index, packet.State);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.CheckCharacterNameAvailability)]
|
||||
void HandleCheckCharacterNameAvailability(CheckCharacterNameAvailability checkCharacterNameAvailability)
|
||||
{
|
||||
// prevent character rename to invalid name
|
||||
if (!ObjectManager.NormalizePlayerName(ref checkCharacterNameAvailability.Name))
|
||||
{
|
||||
SendPacket(new CheckCharacterNameAvailabilityResult(checkCharacterNameAvailability.SequenceIndex, ResponseCodes.CharNameNoName));
|
||||
return;
|
||||
}
|
||||
|
||||
ResponseCodes res = ObjectManager.CheckPlayerName(checkCharacterNameAvailability.Name, GetSessionDbcLocale(), true);
|
||||
if (res != ResponseCodes.CharNameSuccess)
|
||||
{
|
||||
SendPacket(new CheckCharacterNameAvailabilityResult(checkCharacterNameAvailability.SequenceIndex, res));
|
||||
return;
|
||||
}
|
||||
|
||||
// check name limitations
|
||||
if (!HasPermission(RBACPermissions.SkipCheckCharacterCreationReservedname) && Global.ObjectMgr.IsReservedName(checkCharacterNameAvailability.Name))
|
||||
{
|
||||
SendPacket(new CheckCharacterNameAvailabilityResult(checkCharacterNameAvailability.SequenceIndex, ResponseCodes.CharNameReserved));
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure that there is no character with the desired new name
|
||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_CHECK_NAME);
|
||||
stmt.AddValue(0, checkCharacterNameAvailability.Name);
|
||||
|
||||
_queryProcessor.AddCallback(DB.Characters.AsyncQuery(stmt).WithCallback(result =>
|
||||
{
|
||||
SendPacket(new CheckCharacterNameAvailabilityResult(checkCharacterNameAvailability.SequenceIndex, !result.IsEmpty() ? ResponseCodes.CharCreateNameInUse : ResponseCodes.Success));
|
||||
}));
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.RequestForcedReactions)]
|
||||
void HandleRequestForcedReactions(RequestForcedReactions requestForcedReactions)
|
||||
{
|
||||
@@ -2455,13 +2459,8 @@ namespace Game
|
||||
packet.Display.HasValue = true;
|
||||
packet.Display.Value.Name = factionChangeInfo.Name;
|
||||
packet.Display.Value.SexID = (byte)factionChangeInfo.SexID;
|
||||
packet.Display.Value.SkinID = factionChangeInfo.SkinID;
|
||||
packet.Display.Value.HairColorID = factionChangeInfo.HairColorID;
|
||||
packet.Display.Value.HairStyleID = factionChangeInfo.HairStyleID;
|
||||
packet.Display.Value.FacialHairStyleID = factionChangeInfo.FacialHairStyleID;
|
||||
packet.Display.Value.FaceID = factionChangeInfo.FaceID;
|
||||
packet.Display.Value.Customizations = factionChangeInfo.Customizations;
|
||||
packet.Display.Value.RaceID = (byte)factionChangeInfo.RaceID;
|
||||
packet.Display.Value.CustomDisplay = factionChangeInfo.CustomDisplay;
|
||||
}
|
||||
|
||||
SendPacket(packet);
|
||||
|
||||
@@ -62,12 +62,12 @@ namespace Game
|
||||
garrison.SendBlueprintAndSpecializationData();
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.GarrisonGetBuildingLandmarks)]
|
||||
void HandleGarrisonGetBuildingLandmarks(GarrisonGetBuildingLandmarks garrisonGetBuildingLandmarks)
|
||||
[WorldPacketHandler(ClientOpcodes.GarrisonGetMapData)]
|
||||
void HandleGarrisonGetMapData(GarrisonGetMapData garrisonGetMapData)
|
||||
{
|
||||
Garrison garrison = _player.GetGarrison();
|
||||
if (garrison != null)
|
||||
garrison.SendBuildingLandmarks(_player);
|
||||
garrison.SendMapData(_player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Game
|
||||
|
||||
if (store.HasRecord(record.RecordID))
|
||||
{
|
||||
dbReply.Allow = true;
|
||||
dbReply.Status = 1;
|
||||
dbReply.Timestamp = (uint)GameTime.GetGameTime();
|
||||
store.WriteRecord(record.RecordID, GetSessionDbcLocale(), dbReply.Data);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Game
|
||||
|
||||
// Get player locked Dungeons
|
||||
foreach (var locked in Global.LFGMgr.GetLockedDungeons(_player.GetGUID()))
|
||||
lfgPlayerInfo.BlackList.Slot.Add(new LFGBlackListSlot(locked.Key, (uint)locked.Value.lockStatus, locked.Value.requiredItemLevel, (int)locked.Value.currentItemLevel));
|
||||
lfgPlayerInfo.BlackList.Slot.Add(new LFGBlackListSlot(locked.Key, (uint)locked.Value.lockStatus, locked.Value.requiredItemLevel, (int)locked.Value.currentItemLevel, 0));
|
||||
|
||||
foreach (var slot in randomDungeons)
|
||||
{
|
||||
@@ -231,7 +231,7 @@ namespace Game
|
||||
LFGBlackList lfgBlackList = new LFGBlackList();
|
||||
lfgBlackList.PlayerGuid.Set(pguid);
|
||||
foreach (var locked in Global.LFGMgr.GetLockedDungeons(pguid))
|
||||
lfgBlackList.Slot.Add(new LFGBlackListSlot(locked.Key, (uint)locked.Value.lockStatus, locked.Value.requiredItemLevel, (int)locked.Value.currentItemLevel));
|
||||
lfgBlackList.Slot.Add(new LFGBlackListSlot(locked.Key, (uint)locked.Value.lockStatus, locked.Value.requiredItemLevel, (int)locked.Value.currentItemLevel, 0));
|
||||
|
||||
lfgPartyInfo.Player.Add(lfgBlackList);
|
||||
}
|
||||
@@ -353,7 +353,7 @@ namespace Game
|
||||
|
||||
foreach (var it in joinData.lockmap)
|
||||
{
|
||||
var blackList = new LFGJoinBlackList();
|
||||
var blackList = new LFGBlackListPkt();
|
||||
blackList.PlayerGuid = it.Key;
|
||||
|
||||
foreach (var lockInfo in it.Value)
|
||||
@@ -361,8 +361,10 @@ namespace Game
|
||||
Log.outTrace(LogFilter.Lfg, "SendLfgJoinResult:: {0} DungeonID: {1} Lock status: {2} Required itemLevel: {3} Current itemLevel: {4}",
|
||||
it.Key.ToString(), (lockInfo.Key & 0x00FFFFFF), lockInfo.Value.lockStatus, lockInfo.Value.requiredItemLevel, lockInfo.Value.currentItemLevel);
|
||||
|
||||
blackList.Slots.Add(new LFGJoinBlackListSlot((int)lockInfo.Key, (int)lockInfo.Value.lockStatus, lockInfo.Value.requiredItemLevel, (int)lockInfo.Value.currentItemLevel));
|
||||
blackList.Slot.Add(new LFGBlackListSlot(lockInfo.Key, (uint)lockInfo.Value.lockStatus, lockInfo.Value.requiredItemLevel, (int)lockInfo.Value.currentItemLevel, 0));
|
||||
}
|
||||
|
||||
lfgJoinResult.BlackList.Add(blackList);
|
||||
}
|
||||
|
||||
SendPacket(lfgJoinResult);
|
||||
|
||||
@@ -732,8 +732,8 @@ namespace Game
|
||||
GetPlayer().SetPendingBind(0, 0);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.WardenData)]
|
||||
void HandleWardenDataOpcode(WardenData packet)
|
||||
[WorldPacketHandler(ClientOpcodes.Warden3Data)]
|
||||
void HandleWarden3Data(WardenData packet)
|
||||
{
|
||||
if (_warden == null || packet.Data.GetSize() == 0)
|
||||
return;
|
||||
|
||||
@@ -429,7 +429,7 @@ namespace Game
|
||||
|
||||
NewWorld packet = new NewWorld();
|
||||
packet.MapID = loc.GetMapId();
|
||||
packet.Pos = loc;
|
||||
packet.Loc.Pos = loc;
|
||||
packet.Reason = (uint)(!_player.IsBeingTeleportedSeamlessly() ? NewWorldReason.Normal : NewWorldReason.Seamless);
|
||||
SendPacket(packet);
|
||||
|
||||
|
||||
@@ -242,10 +242,13 @@ namespace Game
|
||||
if (quest == null)
|
||||
return;
|
||||
|
||||
// This is Real Item Entry, not slot id as pre 5.x
|
||||
// TODO: currency choice items
|
||||
if (packet.Choice.LootItemType != LootItemType.Item)
|
||||
return;
|
||||
|
||||
if (packet.ItemChoiceID != 0)
|
||||
{
|
||||
ItemTemplate rewardProto = Global.ObjectMgr.GetItemTemplate(packet.ItemChoiceID);
|
||||
ItemTemplate rewardProto = Global.ObjectMgr.GetItemTemplate(packet.Choice.Item.ItemID);
|
||||
if (rewardProto == null)
|
||||
{
|
||||
Log.outError(LogFilter.Network, "Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player {0} ({1}) tried to get invalid reward item (Item Entry: {2}) for quest {3} (possible packet-hacking detected)", GetPlayer().GetName(), GetPlayer().GetGUID().ToString(), packet.ItemChoiceID, packet.QuestID);
|
||||
@@ -255,7 +258,7 @@ namespace Game
|
||||
bool itemValid = false;
|
||||
for (uint i = 0; i < quest.GetRewChoiceItemsCount(); ++i)
|
||||
{
|
||||
if (quest.RewardChoiceItemId[i] != 0 && quest.RewardChoiceItemId[i] == packet.ItemChoiceID)
|
||||
if (quest.RewardChoiceItemId[i] != 0 && quest.RewardChoiceItemId[i] == packet.Choice.Item.ItemID)
|
||||
{
|
||||
itemValid = true;
|
||||
break;
|
||||
@@ -269,7 +272,7 @@ namespace Game
|
||||
{
|
||||
foreach (var questPackageItem in questPackageItems)
|
||||
{
|
||||
if (questPackageItem.ItemID != packet.ItemChoiceID)
|
||||
if (questPackageItem.ItemID != packet.Choice.Item.ItemID)
|
||||
continue;
|
||||
|
||||
if (_player.CanSelectQuestPackageItem(questPackageItem))
|
||||
@@ -287,7 +290,7 @@ namespace Game
|
||||
{
|
||||
foreach (var questPackageItem in questPackageItems1)
|
||||
{
|
||||
if (questPackageItem.ItemID != packet.ItemChoiceID)
|
||||
if (questPackageItem.ItemID != packet.Choice.Item.ItemID)
|
||||
continue;
|
||||
|
||||
itemValid = true;
|
||||
@@ -324,9 +327,9 @@ namespace Game
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetPlayer().CanRewardQuest(quest, packet.ItemChoiceID, true))
|
||||
if (GetPlayer().CanRewardQuest(quest, packet.Choice.Item.ItemID, true))
|
||||
{
|
||||
GetPlayer().RewardQuest(quest, packet.ItemChoiceID, obj);
|
||||
GetPlayer().RewardQuest(quest, packet.Choice.Item.ItemID, obj);
|
||||
|
||||
switch (obj.GetTypeId())
|
||||
{
|
||||
@@ -350,7 +353,7 @@ namespace Game
|
||||
}
|
||||
|
||||
_player.PlayerTalkClass.ClearMenus();
|
||||
creatureQGiver.GetAI().QuestReward(_player, quest, packet.ItemChoiceID);
|
||||
creatureQGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
|
||||
break;
|
||||
}
|
||||
case TypeId.GameObject:
|
||||
@@ -371,7 +374,7 @@ namespace Game
|
||||
}
|
||||
|
||||
_player.PlayerTalkClass.ClearMenus();
|
||||
questGiver.GetAI().QuestReward(_player, quest, packet.ItemChoiceID);
|
||||
questGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -531,13 +531,8 @@ namespace Game
|
||||
|
||||
Guild guild = player.GetGuild();
|
||||
|
||||
mirrorImageComponentedData.SkinColor = player.m_playerData.SkinID;
|
||||
mirrorImageComponentedData.FaceVariation = player.m_playerData.FaceID;
|
||||
mirrorImageComponentedData.HairVariation = player.m_playerData.HairStyleID;
|
||||
mirrorImageComponentedData.HairColor = player.m_playerData.HairColorID;
|
||||
mirrorImageComponentedData.BeardVariation = player.m_playerData.FacialHairStyleID;
|
||||
for (int i = 0; i < PlayerConst.CustomDisplaySize; ++i)
|
||||
mirrorImageComponentedData.CustomDisplay[i] = player.m_playerData.CustomDisplayOption[i];
|
||||
foreach (var customization in player.m_playerData.Customizations)
|
||||
mirrorImageComponentedData.Customizations.Add(new ChrCustomizationChoice(customization.ChrCustomizationOptionID, customization.ChrCustomizationChoiceID));
|
||||
mirrorImageComponentedData.GuildGUID = (guild ? guild.GetGUID() : ObjectGuid.Empty);
|
||||
|
||||
byte[] itemSlots =
|
||||
|
||||
@@ -43,32 +43,33 @@ namespace Game
|
||||
SendPacket(response);
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SupportTicketSubmitBug)]
|
||||
void HandleSupportTicketSubmitBug(SupportTicketSubmitBug packet)
|
||||
[WorldPacketHandler(ClientOpcodes.SubmitUserFeedback)]
|
||||
void HandleSubmitUserFeedback(SubmitUserFeedback userFeedback)
|
||||
{
|
||||
if (!Global.SupportMgr.GetBugSystemStatus())
|
||||
return;
|
||||
if (userFeedback.IsSuggestion)
|
||||
{
|
||||
if (!Global.SupportMgr.GetSuggestionSystemStatus())
|
||||
return;
|
||||
|
||||
BugTicket ticket = new BugTicket(GetPlayer());
|
||||
ticket.SetPosition(packet.Header.MapID, packet.Header.Position);
|
||||
ticket.SetFacing(packet.Header.Facing);
|
||||
ticket.SetNote(packet.Note);
|
||||
SuggestionTicket ticket = new SuggestionTicket(GetPlayer());
|
||||
ticket.SetPosition(userFeedback.Header.MapID, userFeedback.Header.Position);
|
||||
ticket.SetFacing(userFeedback.Header.Facing);
|
||||
ticket.SetNote(userFeedback.Note);
|
||||
|
||||
Global.SupportMgr.AddTicket(ticket);
|
||||
}
|
||||
Global.SupportMgr.AddTicket(ticket);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Global.SupportMgr.GetBugSystemStatus())
|
||||
return;
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SupportTicketSubmitSuggestion)]
|
||||
void HandleSupportTicketSubmitSuggestion(SupportTicketSubmitSuggestion packet)
|
||||
{
|
||||
if (!Global.SupportMgr.GetSuggestionSystemStatus())
|
||||
return;
|
||||
BugTicket ticket = new BugTicket(GetPlayer());
|
||||
ticket.SetPosition(userFeedback.Header.MapID, userFeedback.Header.Position);
|
||||
ticket.SetFacing(userFeedback.Header.Facing);
|
||||
ticket.SetNote(userFeedback.Note);
|
||||
|
||||
SuggestionTicket ticket = new SuggestionTicket(GetPlayer());
|
||||
ticket.SetPosition(packet.Header.MapID, packet.Header.Position);
|
||||
ticket.SetFacing(packet.Header.Facing);
|
||||
ticket.SetNote(packet.Note);
|
||||
|
||||
Global.SupportMgr.AddTicket(ticket);
|
||||
Global.SupportMgr.AddTicket(ticket);
|
||||
}
|
||||
}
|
||||
|
||||
[WorldPacketHandler(ClientOpcodes.SupportTicketSubmitComplaint)]
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace Game.Movement
|
||||
vertical_acceleration = 0.0f;
|
||||
effect_start_time = 0;
|
||||
spell_effect_extra = args.spellEffectExtra;
|
||||
anim_tier = args.animTier;
|
||||
splineIsFacingOnly = args.path.Length == 2 && args.facing.type != MonsterMoveType.Normal && ((args.path[1] - args.path[0]).GetLength() < 0.1f);
|
||||
|
||||
// Check if its a stop spline
|
||||
@@ -155,7 +156,7 @@ namespace Game.Movement
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!splineflags.HasFlag(SplineFlag.OrientationFixed | SplineFlag.Falling | SplineFlag.Unknown0))
|
||||
if (!splineflags.HasFlag(SplineFlag.OrientationFixed | SplineFlag.Falling | SplineFlag.Unknown0x8))
|
||||
{
|
||||
Vector3 hermite;
|
||||
spline.Evaluate_Derivative(point_Idx, u, out hermite);
|
||||
@@ -309,6 +310,7 @@ namespace Game.Movement
|
||||
public int point_Idx;
|
||||
public int point_Idx_offset;
|
||||
public Optional<SpellEffectExtraData> spell_effect_extra;
|
||||
public Optional<AnimTierTransition> anim_tier;
|
||||
#endregion
|
||||
|
||||
public class CommonInitializer : IInitializer
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace Game.Movement
|
||||
public bool IsSmooth() { return Flags.HasAnyFlag(SplineFlag.Catmullrom); }
|
||||
public bool IsLinear() { return !IsSmooth(); }
|
||||
|
||||
public byte GetAnimTier() { return animTier; }
|
||||
public bool HasAllFlags(SplineFlag f) { return (Flags & f) == f; }
|
||||
public bool HasFlag(SplineFlag f) { return (Flags & f) != 0; }
|
||||
|
||||
@@ -41,10 +40,10 @@ namespace Game.Movement
|
||||
Flags &= ~f;
|
||||
}
|
||||
|
||||
public void EnableAnimation(uint anim) { Flags = (Flags & ~(SplineFlag.MaskAnimations | SplineFlag.Falling | SplineFlag.Parabolic | SplineFlag.FallingSlow | SplineFlag.FadeObject)) | SplineFlag.Animation | ((SplineFlag)anim & SplineFlag.MaskAnimations); }
|
||||
public void EnableParabolic() { Flags = (Flags & ~(SplineFlag.MaskAnimations | SplineFlag.Falling | SplineFlag.Animation | SplineFlag.FallingSlow | SplineFlag.FadeObject)) | SplineFlag.Parabolic; }
|
||||
public void EnableAnimation() { Flags = (Flags & ~(SplineFlag.Falling | SplineFlag.Parabolic | SplineFlag.FallingSlow | SplineFlag.FadeObject)) | SplineFlag.Animation; }
|
||||
public void EnableParabolic() { Flags = (Flags & ~(SplineFlag.Falling | SplineFlag.Animation | SplineFlag.FallingSlow | SplineFlag.FadeObject)) | SplineFlag.Parabolic; }
|
||||
public void EnableFlying() { Flags = (Flags & ~SplineFlag.Falling) | SplineFlag.Flying; }
|
||||
public void EnableFalling() { Flags = (Flags & ~(SplineFlag.MaskAnimations | SplineFlag.Parabolic | SplineFlag.Animation | SplineFlag.Flying)) | SplineFlag.Falling; }
|
||||
public void EnableFalling() { Flags = (Flags & ~(SplineFlag.Parabolic | SplineFlag.Animation | SplineFlag.Flying)) | SplineFlag.Falling; }
|
||||
public void EnableCatmullRom() { Flags = (Flags & ~SplineFlag.SmoothGroundPath) | SplineFlag.Catmullrom; }
|
||||
public void EnableTransportEnter() { Flags = (Flags & ~SplineFlag.TransportExit) | SplineFlag.TransportEnter; }
|
||||
public void EnableTransportExit() { Flags = (Flags & ~SplineFlag.TransportEnter) | SplineFlag.TransportExit; }
|
||||
|
||||
@@ -285,7 +285,9 @@ namespace Game.Movement
|
||||
public void SetAnimation(AnimType anim)
|
||||
{
|
||||
args.time_perc = 0.0f;
|
||||
args.flags.EnableAnimation((byte)anim);
|
||||
args.animTier.emplace();
|
||||
args.animTier.AnimTier = anim;
|
||||
args.flags.EnableAnimation();
|
||||
}
|
||||
|
||||
public void SetFacing(Vector3 spot)
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace Game.Movement
|
||||
public uint splineId;
|
||||
public float initialOrientation;
|
||||
public Optional<SpellEffectExtraData> spellEffectExtra;
|
||||
public Optional<AnimTierTransition> animTier;
|
||||
public bool walk;
|
||||
public bool HasVelocity;
|
||||
public bool TransformForTransport;
|
||||
@@ -92,4 +93,10 @@ namespace Game.Movement
|
||||
public uint ProgressCurveId;
|
||||
public uint ParabolicCurveId;
|
||||
}
|
||||
|
||||
public class AnimTierTransition
|
||||
{
|
||||
public uint TierTransitionId;
|
||||
public byte AnimTier;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2020 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace Game.Networking
|
||||
{
|
||||
public class CompactArray
|
||||
{
|
||||
public void Insert(int index, int value)
|
||||
{
|
||||
Cypher.Assert(index < 0x20);
|
||||
|
||||
_mask |= 1u << index;
|
||||
if (_contents.Length <= index)
|
||||
Array.Resize(ref _contents, index + 1);
|
||||
_contents[index] = value;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
_mask = 0;
|
||||
_contents = new int[1];
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
uint mask = data.ReadUInt32();
|
||||
|
||||
for (int index = 0; mask != 0; mask >>= 1, ++index)
|
||||
{
|
||||
if ((mask & 1) != 0)
|
||||
{
|
||||
int value = data.ReadInt32();
|
||||
Insert(index, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
uint mask = GetMask();
|
||||
data.WriteUInt32(mask);
|
||||
for (int i = 0; i < GetSize(); ++i)
|
||||
{
|
||||
if (Convert.ToBoolean(mask & (1 << i)))
|
||||
data.WriteInt32(this[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return _mask.GetHashCode() ^ _contents.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is CompactArray)
|
||||
return (CompactArray)obj == this;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(CompactArray left, CompactArray right)
|
||||
{
|
||||
if (left._mask != right._mask)
|
||||
return false;
|
||||
|
||||
return left._contents == right._contents;
|
||||
}
|
||||
|
||||
public static bool operator !=(CompactArray left, CompactArray right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
uint GetMask() { return _mask; }
|
||||
public int this[int index] { get { return _contents[index]; } }
|
||||
int GetSize() { return _contents.Length; }
|
||||
|
||||
uint _mask;
|
||||
int[] _contents = new int[1];
|
||||
}
|
||||
}
|
||||
@@ -72,17 +72,22 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WriteBit(AreaTriggerSpline.HasValue);
|
||||
_worldPacket.WriteBit(AreaTriggerOrbit.HasValue);
|
||||
_worldPacket.WriteBit(AreaTriggerMovementScript.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (AreaTriggerSpline.HasValue)
|
||||
AreaTriggerSpline.Value.Write(_worldPacket);
|
||||
|
||||
if (AreaTriggerMovementScript.HasValue)
|
||||
AreaTriggerMovementScript.Value.Write(_worldPacket);
|
||||
|
||||
if (AreaTriggerOrbit.HasValue)
|
||||
AreaTriggerOrbit.Value.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public Optional<AreaTriggerSplineInfo> AreaTriggerSpline;
|
||||
public Optional<AreaTriggerOrbitInfo> AreaTriggerOrbit;
|
||||
public Optional<AreaTriggerMovementScriptInfo> AreaTriggerMovementScript;
|
||||
public ObjectGuid TriggerGUID;
|
||||
}
|
||||
|
||||
|
||||
@@ -616,6 +616,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
foreach (AuctionItem item in Items)
|
||||
item.Write(_worldPacket);
|
||||
|
||||
foreach (AuctionItem item in SoldItems)
|
||||
item.Write(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -857,10 +860,12 @@ namespace Game.Networking.Packets
|
||||
public AuctionBucketKey Key;
|
||||
public int TotalQuantity;
|
||||
public ulong MinPrice;
|
||||
public int RequiredLevel;
|
||||
public List<uint> ItemModifiedAppearanceIDs = new List<uint>();
|
||||
public Optional<byte> MaxBattlePetQuality;
|
||||
public Optional<byte> MaxBattlePetLevel;
|
||||
public Optional<byte> BattlePetBreedID;
|
||||
public Optional<uint> Unk901_1;
|
||||
public bool ContainsOwnerItem;
|
||||
public bool ContainsOnlyCollectedAppearances;
|
||||
|
||||
@@ -868,6 +873,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
Key.Write(data);
|
||||
data.WriteInt32(TotalQuantity);
|
||||
data.WriteInt32(RequiredLevel);
|
||||
data.WriteUInt64(MinPrice);
|
||||
data.WriteInt32(ItemModifiedAppearanceIDs.Count);
|
||||
if (!ItemModifiedAppearanceIDs.Empty())
|
||||
@@ -879,6 +885,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(MaxBattlePetQuality.HasValue);
|
||||
data.WriteBit(MaxBattlePetLevel.HasValue);
|
||||
data.WriteBit(BattlePetBreedID.HasValue);
|
||||
data.WriteBit(Unk901_1.HasValue);
|
||||
data.WriteBit(ContainsOwnerItem);
|
||||
data.WriteBit(ContainsOnlyCollectedAppearances);
|
||||
data.FlushBits();
|
||||
@@ -891,6 +898,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
if (BattlePetBreedID.HasValue)
|
||||
data.WriteUInt8(BattlePetBreedID.Value);
|
||||
|
||||
if (Unk901_1.HasValue)
|
||||
data.WriteUInt32(Unk901_1.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,13 +153,13 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
{
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.Billing.BillingPlan);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.Billing.TimeRemain);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.Billing.Unknown735);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.GameTimeInfo.BillingPlan);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.GameTimeInfo.TimeRemain);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.GameTimeInfo.Unknown735);
|
||||
// 3x same bit is not a mistake - preserves legacy client behavior of BillingPlanFlags::SESSION_IGR
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.Billing.InGameRoom); // inGameRoom check in function checking which lua event to fire when remaining time is near end - BILLING_NAG_DIALOG vs IGR_BILLING_NAG_DIALOG
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.Billing.InGameRoom); // inGameRoom lua return from Script_GetBillingPlan
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.Billing.InGameRoom); // not used anywhere in the client
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.GameTimeInfo.InGameRoom); // inGameRoom check in function checking which lua event to fire when remaining time is near end - BILLING_NAG_DIALOG vs IGR_BILLING_NAG_DIALOG
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.GameTimeInfo.InGameRoom); // inGameRoom lua return from Script_GetBillingPlan
|
||||
_worldPacket.WriteBit(SuccessInfo.Value.GameTimeInfo.InGameRoom); // not used anywhere in the client
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace Game.Networking.Packets
|
||||
public uint CurrencyID; // this is probably used for the ingame shop. @todo implement
|
||||
public uint Time;
|
||||
|
||||
public BillingInfo Billing;
|
||||
public GameTime GameTimeInfo;
|
||||
|
||||
public List<VirtualRealmInfo> VirtualRealms = new List<VirtualRealmInfo>(); // list of realms connected to this one (inclusive) @todo implement
|
||||
public List<CharacterTemplate> Templates = new List<CharacterTemplate>(); // list of pre-made character templates. @todo implement
|
||||
@@ -226,7 +226,7 @@ namespace Game.Networking.Packets
|
||||
public Optional<ushort> NumPlayersAlliance; // number of alliance players in this realm. @todo implement
|
||||
public Optional<int> ExpansionTrialExpiration; // expansion trial expiration unix timestamp
|
||||
|
||||
public struct BillingInfo
|
||||
public struct GameTime
|
||||
{
|
||||
public uint BillingPlan;
|
||||
public uint TimeRemain;
|
||||
|
||||
@@ -33,13 +33,18 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(MythicPlusSeasonID);
|
||||
_worldPacket.WriteInt32(CurrentSeason);
|
||||
_worldPacket.WriteInt32(PreviousSeason);
|
||||
_worldPacket.WriteInt32(ConquestWeeklyProgressCurrencyID);
|
||||
_worldPacket.WriteInt32(PvpSeasonID);
|
||||
_worldPacket.WriteBit(WeeklyRewardChestsEnabled);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public int MythicPlusSeasonID;
|
||||
public int PreviousSeason;
|
||||
public int CurrentSeason;
|
||||
public int PvpSeasonID;
|
||||
public int ConquestWeeklyProgressCurrencyID;
|
||||
public bool WeeklyRewardChestsEnabled;
|
||||
}
|
||||
|
||||
public class AreaSpiritHealerQuery : ClientPacket
|
||||
@@ -435,9 +440,9 @@ namespace Game.Networking.Packets
|
||||
public uint RandomMaxRewardPointsThisWeek;
|
||||
}
|
||||
|
||||
class RequestRatedBattlefieldInfo : ClientPacket
|
||||
class RequestRatedPvpInfo : ClientPacket
|
||||
{
|
||||
public RequestRatedBattlefieldInfo(WorldPacket packet) : base(packet) { }
|
||||
public RequestRatedPvpInfo(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace Game.Networking.Packets
|
||||
public ulong EventID;
|
||||
}
|
||||
|
||||
class CalendarCommunityFilter : ClientPacket
|
||||
class CalendarCommunityInviteRequest : ClientPacket
|
||||
{
|
||||
public CalendarCommunityFilter(WorldPacket packet) : base(packet) { }
|
||||
public CalendarCommunityInviteRequest(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
@@ -260,9 +260,9 @@ namespace Game.Networking.Packets
|
||||
public string EventName;
|
||||
}
|
||||
|
||||
class CalendarEventInvite : ClientPacket
|
||||
class CalendarInvitePkt : ClientPacket
|
||||
{
|
||||
public CalendarEventInvite(WorldPacket packet) : base(packet) { }
|
||||
public CalendarInvitePkt(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
@@ -285,9 +285,9 @@ namespace Game.Networking.Packets
|
||||
public string Name;
|
||||
}
|
||||
|
||||
class CalendarEventRSVP : ClientPacket
|
||||
class HandleCalendarRsvp : ClientPacket
|
||||
{
|
||||
public CalendarEventRSVP(WorldPacket packet) : base(packet) { }
|
||||
public HandleCalendarRsvp(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
@@ -502,9 +502,9 @@ namespace Game.Networking.Packets
|
||||
public ulong InviteID;
|
||||
}
|
||||
|
||||
class CalendarEventStatus : ClientPacket
|
||||
class CalendarStatus : ClientPacket
|
||||
{
|
||||
public CalendarEventStatus(WorldPacket packet) : base(packet) { }
|
||||
public CalendarStatus(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
@@ -538,9 +538,9 @@ namespace Game.Networking.Packets
|
||||
public uint DifficultyID;
|
||||
}
|
||||
|
||||
class CalendarEventModeratorStatus : ClientPacket
|
||||
class CalendarModeratorStatusQuery : ClientPacket
|
||||
{
|
||||
public CalendarEventModeratorStatus(WorldPacket packet) : base(packet) { }
|
||||
public CalendarModeratorStatusQuery(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(ChannelWelcomeMsg.GetByteCount(), 11);
|
||||
_worldPacket.WriteUInt32((uint)ChannelFlags);
|
||||
_worldPacket.WriteInt32(ChatChannelID);
|
||||
_worldPacket.WriteUInt64((ulong)InstanceID);
|
||||
_worldPacket.WriteUInt64(InstanceID);
|
||||
_worldPacket.WritePackedGuid(ChannelGUID);
|
||||
_worldPacket.WriteString(Channel);
|
||||
_worldPacket.WriteString(ChannelWelcomeMsg);
|
||||
@@ -123,7 +123,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public string ChannelWelcomeMsg = "";
|
||||
public int ChatChannelID;
|
||||
public int InstanceID;
|
||||
public ulong InstanceID;
|
||||
public ChannelFlags ChannelFlags;
|
||||
public string Channel = "";
|
||||
public ObjectGuid ChannelGUID;
|
||||
|
||||
@@ -41,9 +41,8 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket.WriteBit(IsDeletedCharacters);
|
||||
_worldPacket.WriteBit(IsTestDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(HasDemonHunterOnRealm);
|
||||
_worldPacket.WriteBit(IsDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(IsNewPlayerRestrictionSkipped);
|
||||
_worldPacket.WriteBit(IsNewPlayer);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.HasValue);
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
_worldPacket.WriteInt32(Characters.Count);
|
||||
@@ -66,9 +65,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
public bool Success;
|
||||
public bool IsDeletedCharacters; // used for character undelete list
|
||||
public bool IsTestDemonHunterCreationAllowed = false; //allows client to skip 1 per realm and level 70 requirements
|
||||
public bool HasDemonHunterOnRealm = false;
|
||||
public bool IsDemonHunterCreationAllowed = false; //used for demon hunter early access
|
||||
public bool IsNewPlayerRestrictionSkipped = false; // allows client to skip new player restrictions
|
||||
public bool IsNewPlayer = false; // forbids hero classes and allied races
|
||||
public bool IsAlliedRacesCreationAllowed = false;
|
||||
|
||||
public int MaxCharacterLevel = 1;
|
||||
@@ -187,14 +185,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt8(RaceId);
|
||||
data.WriteUInt8((byte)ClassId);
|
||||
data.WriteUInt8(SexId);
|
||||
data.WriteUInt8(SkinId);
|
||||
data.WriteUInt8(FaceId);
|
||||
data.WriteUInt8(HairStyle);
|
||||
data.WriteUInt8(HairColor);
|
||||
data.WriteUInt8(FacialHair);
|
||||
|
||||
foreach (var display in CustomDisplay)
|
||||
data.WriteUInt8(display);
|
||||
data.WriteInt32(Customizations.Count);
|
||||
|
||||
data.WriteUInt8(ExperienceLevel);
|
||||
data.WriteUInt32(ZoneId);
|
||||
@@ -219,18 +210,23 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(Unknown703);
|
||||
data.WriteUInt32(LastLoginVersion);
|
||||
data.WriteUInt32(Flags4);
|
||||
data.WriteInt32(Unknown830.Count);
|
||||
data.WriteInt32(MailSenders.Count);
|
||||
data.WriteUInt32(OverrideSelectScreenFileDataID);
|
||||
|
||||
foreach (ChrCustomizationChoice customization in Customizations)
|
||||
customization.Write(data);
|
||||
|
||||
data.WriteBits(Name.GetByteCount(), 6);
|
||||
data.WriteBit(FirstLogin);
|
||||
data.WriteBit(BoostInProgress);
|
||||
data.WriteBits(unkWod61x, 5);
|
||||
|
||||
foreach (string str in Unknown830)
|
||||
foreach (string str in MailSenders)
|
||||
data.WriteBits(str.GetByteCount() + 1, 6);
|
||||
|
||||
data.FlushBits();
|
||||
|
||||
foreach (string str in Unknown830)
|
||||
foreach (string str in MailSenders)
|
||||
if (!str.IsEmpty())
|
||||
data.WriteCString(str);
|
||||
|
||||
@@ -244,12 +240,7 @@ namespace Game.Networking.Packets
|
||||
public byte RaceId;
|
||||
public Class ClassId;
|
||||
public byte SexId;
|
||||
public byte SkinId;
|
||||
public byte FaceId;
|
||||
public byte HairStyle;
|
||||
public byte HairColor;
|
||||
public byte FacialHair;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
public byte ExperienceLevel;
|
||||
public uint ZoneId;
|
||||
public uint MapId;
|
||||
@@ -265,14 +256,14 @@ namespace Game.Networking.Packets
|
||||
public ushort SpecID;
|
||||
public uint Unknown703;
|
||||
public uint LastLoginVersion;
|
||||
public uint OverrideSelectScreenFileDataID;
|
||||
public uint PetCreatureDisplayId;
|
||||
public uint PetExperienceLevel;
|
||||
public uint PetCreatureFamilyId;
|
||||
public bool BoostInProgress; // @todo
|
||||
public uint[] ProfessionIds = new uint[2]; // @todo
|
||||
public VisualItemInfo[] VisualItems = new VisualItemInfo[InventorySlots.BagEnd];
|
||||
public List<string> Unknown830 = new List<string>(); // Something with character names, same length limit as name,
|
||||
// client accepts unlimited number of these in packet but only uses first 3
|
||||
public List<string> MailSenders = new List<string>();
|
||||
|
||||
public struct VisualItemInfo
|
||||
{
|
||||
@@ -280,12 +271,14 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
data.WriteUInt32(DisplayId);
|
||||
data.WriteUInt32(DisplayEnchantId);
|
||||
data.WriteInt32(ItemModifiedAppearanceID);
|
||||
data.WriteUInt8(InvType);
|
||||
data.WriteUInt8(Subclass);
|
||||
}
|
||||
|
||||
public uint DisplayId;
|
||||
public uint DisplayEnchantId;
|
||||
public int ItemModifiedAppearanceID; // also -1 is some special value
|
||||
public byte InvType;
|
||||
public byte Subclass;
|
||||
}
|
||||
@@ -328,6 +321,38 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
class CheckCharacterNameAvailability : ClientPacket
|
||||
{
|
||||
public uint SequenceIndex;
|
||||
public string Name;
|
||||
|
||||
public CheckCharacterNameAvailability(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
SequenceIndex = _worldPacket.ReadUInt32();
|
||||
Name = _worldPacket.ReadString(_worldPacket.ReadBits<uint>(6));
|
||||
}
|
||||
}
|
||||
|
||||
class CheckCharacterNameAvailabilityResult : ServerPacket
|
||||
{
|
||||
public uint SequenceIndex;
|
||||
public ResponseCodes Result;
|
||||
|
||||
public CheckCharacterNameAvailabilityResult(uint sequenceIndex, ResponseCodes result) : base(ServerOpcodes.SMSG_CHECK_CHARACTER_NAME_AVAILABILITY_RESULT)
|
||||
{
|
||||
SequenceIndex = sequenceIndex;
|
||||
Result = result;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SequenceIndex);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
}
|
||||
}
|
||||
|
||||
public class CreateCharacter : ClientPacket
|
||||
{
|
||||
public CreateCharacter(WorldPacket packet) : base(packet) { }
|
||||
@@ -338,23 +363,19 @@ namespace Game.Networking.Packets
|
||||
uint nameLength = _worldPacket.ReadBits<uint>(6);
|
||||
bool hasTemplateSet = _worldPacket.HasBit();
|
||||
CreateInfo.IsTrialBoost = _worldPacket.HasBit();
|
||||
CreateInfo.UseNPE = _worldPacket.HasBit();
|
||||
|
||||
CreateInfo.RaceId = (Race)_worldPacket.ReadUInt8();
|
||||
CreateInfo.ClassId = (Class)_worldPacket.ReadUInt8();
|
||||
CreateInfo.Sex = (Gender)_worldPacket.ReadUInt8();
|
||||
CreateInfo.Skin = _worldPacket.ReadUInt8();
|
||||
CreateInfo.Face = _worldPacket.ReadUInt8();
|
||||
CreateInfo.HairStyle = _worldPacket.ReadUInt8();
|
||||
CreateInfo.HairColor = _worldPacket.ReadUInt8();
|
||||
CreateInfo.FacialHairStyle = _worldPacket.ReadUInt8();
|
||||
CreateInfo.OutfitId = _worldPacket.ReadUInt8();
|
||||
|
||||
for (var i = 0; i < CreateInfo.CustomDisplay.GetLimit(); ++i)
|
||||
CreateInfo.CustomDisplay[i] = _worldPacket.ReadUInt8();
|
||||
var customizationCount = _worldPacket.ReadUInt32();
|
||||
|
||||
CreateInfo.Name = _worldPacket.ReadString(nameLength);
|
||||
if (CreateInfo.TemplateSet.HasValue)
|
||||
CreateInfo.TemplateSet.Set(_worldPacket.ReadUInt32());
|
||||
|
||||
for (var i = 0; i < customizationCount; ++i)
|
||||
CreateInfo.Customizations[i].Read(_worldPacket);
|
||||
}
|
||||
|
||||
public CharacterCreateInfo CreateInfo;
|
||||
@@ -446,14 +467,10 @@ namespace Game.Networking.Packets
|
||||
CustomizeInfo = new CharCustomizeInfo();
|
||||
CustomizeInfo.CharGUID = _worldPacket.ReadPackedGuid();
|
||||
CustomizeInfo.SexID = (Gender)_worldPacket.ReadUInt8();
|
||||
CustomizeInfo.SkinID = _worldPacket.ReadUInt8();
|
||||
CustomizeInfo.HairColorID = _worldPacket.ReadUInt8();
|
||||
CustomizeInfo.HairStyleID = _worldPacket.ReadUInt8();
|
||||
CustomizeInfo.FacialHairStyleID = _worldPacket.ReadUInt8();
|
||||
CustomizeInfo.FaceID = _worldPacket.ReadUInt8();
|
||||
var customizationCount = _worldPacket.ReadUInt32();
|
||||
|
||||
for (var i = 0; i < CustomizeInfo.CustomDisplay.GetLimit(); ++i)
|
||||
CustomizeInfo.CustomDisplay[i] = _worldPacket.ReadUInt8();
|
||||
for (var i = 0; i < customizationCount; ++i)
|
||||
CustomizeInfo.Customizations[i].Read(_worldPacket);
|
||||
|
||||
CustomizeInfo.CharName = _worldPacket.ReadString(_worldPacket.ReadBits<uint>(6));
|
||||
}
|
||||
@@ -478,17 +495,11 @@ namespace Game.Networking.Packets
|
||||
RaceOrFactionChangeInfo.Guid = _worldPacket.ReadPackedGuid();
|
||||
RaceOrFactionChangeInfo.SexID = (Gender)_worldPacket.ReadUInt8();
|
||||
RaceOrFactionChangeInfo.RaceID = (Race)_worldPacket.ReadUInt8();
|
||||
|
||||
RaceOrFactionChangeInfo.SkinID = _worldPacket.ReadUInt8();
|
||||
RaceOrFactionChangeInfo.HairColorID = _worldPacket.ReadUInt8();
|
||||
RaceOrFactionChangeInfo.HairStyleID = _worldPacket.ReadUInt8();
|
||||
RaceOrFactionChangeInfo.FacialHairStyleID = _worldPacket.ReadUInt8();
|
||||
RaceOrFactionChangeInfo.FaceID = _worldPacket.ReadUInt8();
|
||||
|
||||
for (var i = 0; i < RaceOrFactionChangeInfo.CustomDisplay.GetLimit(); ++i)
|
||||
RaceOrFactionChangeInfo.CustomDisplay[i] = _worldPacket.ReadUInt8();
|
||||
|
||||
var customizationCount = _worldPacket.ReadUInt32();
|
||||
RaceOrFactionChangeInfo.Name = _worldPacket.ReadString(nameLength);
|
||||
|
||||
for (var i = 0; i < customizationCount; ++i)
|
||||
RaceOrFactionChangeInfo.Customizations[i].Read(_worldPacket);
|
||||
}
|
||||
|
||||
public CharRaceOrFactionChangeInfo RaceOrFactionChangeInfo;
|
||||
@@ -512,14 +523,11 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteBits(Display.Value.Name.GetByteCount(), 6);
|
||||
_worldPacket.WriteUInt8(Display.Value.SexID);
|
||||
_worldPacket.WriteUInt8(Display.Value.SkinID);
|
||||
_worldPacket.WriteUInt8(Display.Value.HairColorID);
|
||||
_worldPacket.WriteUInt8(Display.Value.HairStyleID);
|
||||
_worldPacket.WriteUInt8(Display.Value.FacialHairStyleID);
|
||||
_worldPacket.WriteUInt8(Display.Value.FaceID);
|
||||
_worldPacket.WriteUInt8(Display.Value.RaceID);
|
||||
Display.Value.CustomDisplay.ForEach(id => _worldPacket.WriteUInt8(id));
|
||||
_worldPacket.WriteString(Display.Value.Name);
|
||||
|
||||
foreach (ChrCustomizationChoice customization in Display.Value.Customizations)
|
||||
customization.Write(_worldPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,13 +539,8 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public string Name;
|
||||
public byte SexID;
|
||||
public byte SkinID;
|
||||
public byte HairColorID;
|
||||
public byte HairStyleID;
|
||||
public byte FacialHairStyleID;
|
||||
public byte FaceID;
|
||||
public byte RaceID;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +590,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public ReorderInfo[] Entries = new ReorderInfo[WorldConfig.GetIntValue(WorldCfg.CharactersPerRealm)];
|
||||
public ReorderInfo[] Entries = new ReorderInfo[200];
|
||||
|
||||
public struct ReorderInfo
|
||||
{
|
||||
@@ -660,7 +663,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public ObjectGuid Guid; // Guid of the player that is logging in
|
||||
float FarClip; // Visibility distance (for terrain)
|
||||
public float FarClip; // Visibility distance (for terrain)
|
||||
}
|
||||
|
||||
public class LoginVerifyWorld : ServerPacket
|
||||
@@ -706,7 +709,7 @@ namespace Game.Networking.Packets
|
||||
IdleLogout = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
bool IdleLogout;
|
||||
public bool IdleLogout;
|
||||
}
|
||||
|
||||
public class LogoutResponse : ServerPacket
|
||||
@@ -755,8 +758,8 @@ namespace Game.Networking.Packets
|
||||
Showing = _worldPacket.HasBit();
|
||||
}
|
||||
|
||||
int MapID = -1;
|
||||
bool Showing;
|
||||
public int MapID = -1;
|
||||
public bool Showing;
|
||||
}
|
||||
|
||||
public class InitialSetup : ServerPacket
|
||||
@@ -832,22 +835,15 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
NewHairStyle = _worldPacket.ReadUInt32();
|
||||
NewHairColor = _worldPacket.ReadUInt32();
|
||||
NewFacialHair = _worldPacket.ReadUInt32();
|
||||
NewSkinColor = _worldPacket.ReadUInt32();
|
||||
NewFace = _worldPacket.ReadUInt32();
|
||||
var customizationCount = _worldPacket.ReadUInt32();
|
||||
NewSex = _worldPacket.ReadUInt8();
|
||||
|
||||
for (var i = 0; i < NewCustomDisplay.GetLimit(); ++i)
|
||||
NewCustomDisplay[i] = _worldPacket.ReadUInt32();
|
||||
for (var i = 0; i < customizationCount; ++i)
|
||||
Customizations[i].Read(_worldPacket);
|
||||
}
|
||||
|
||||
public uint NewHairStyle;
|
||||
public uint NewHairColor;
|
||||
public uint NewFacialHair;
|
||||
public uint NewSkinColor;
|
||||
public uint NewFace;
|
||||
public Array<uint> NewCustomDisplay = new Array<uint>(PlayerConst.CustomDisplaySize);
|
||||
public byte NewSex;
|
||||
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
}
|
||||
|
||||
public class BarberShopResult : ServerPacket
|
||||
@@ -975,25 +971,18 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
CharGUID = customizeInfo.CharGUID;
|
||||
SexID = (byte)customizeInfo.SexID;
|
||||
SkinID = customizeInfo.SkinID;
|
||||
HairColorID = customizeInfo.HairColorID;
|
||||
HairStyleID = customizeInfo.HairStyleID;
|
||||
FacialHairStyleID = customizeInfo.FacialHairStyleID;
|
||||
FaceID = customizeInfo.FaceID;
|
||||
CharName = customizeInfo.CharName;
|
||||
CustomDisplay = customizeInfo.CustomDisplay;
|
||||
Customizations = customizeInfo.Customizations;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(CharGUID);
|
||||
_worldPacket.WriteUInt8(SexID);
|
||||
_worldPacket.WriteUInt8(SkinID);
|
||||
_worldPacket.WriteUInt8(HairColorID);
|
||||
_worldPacket.WriteUInt8(HairStyleID);
|
||||
_worldPacket.WriteUInt8(FacialHairStyleID);
|
||||
_worldPacket.WriteUInt8(FaceID);
|
||||
CustomDisplay.ForEach(id => _worldPacket.WriteUInt8(id));
|
||||
_worldPacket.WriteInt32(Customizations.Count);
|
||||
foreach (ChrCustomizationChoice customization in Customizations)
|
||||
customization.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteBits(CharName.GetByteCount(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(CharName);
|
||||
@@ -1002,12 +991,7 @@ namespace Game.Networking.Packets
|
||||
ObjectGuid CharGUID;
|
||||
string CharName = "";
|
||||
byte SexID;
|
||||
byte SkinID;
|
||||
byte HairColorID;
|
||||
byte HairStyleID;
|
||||
byte FacialHairStyleID;
|
||||
byte FaceID;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
}
|
||||
|
||||
class CharCustomizeFailure : ServerPacket
|
||||
@@ -1063,21 +1047,40 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
//Structs
|
||||
public struct ChrCustomizationChoice
|
||||
{
|
||||
public uint ChrCustomizationOptionID;
|
||||
public uint ChrCustomizationChoiceID;
|
||||
|
||||
public ChrCustomizationChoice(uint chrCustomizationOptionID, uint chrCustomizationChoiceID)
|
||||
{
|
||||
ChrCustomizationOptionID = chrCustomizationOptionID;
|
||||
ChrCustomizationChoiceID = chrCustomizationChoiceID;
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ChrCustomizationOptionID);
|
||||
data.WriteUInt32(ChrCustomizationChoiceID);
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
ChrCustomizationOptionID = data.ReadUInt32();
|
||||
ChrCustomizationChoiceID = data.ReadUInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public class CharacterCreateInfo
|
||||
{
|
||||
// User specified variables
|
||||
public Race RaceId = Race.None;
|
||||
public Class ClassId = Class.None;
|
||||
public Gender Sex = Gender.None;
|
||||
public byte Skin;
|
||||
public byte Face;
|
||||
public byte HairStyle;
|
||||
public byte HairColor;
|
||||
public byte FacialHairStyle;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public byte OutfitId;
|
||||
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
public Optional<uint> TemplateSet = new Optional<uint>();
|
||||
public bool IsTrialBoost;
|
||||
public bool UseNPE;
|
||||
public string Name;
|
||||
|
||||
// Server side data
|
||||
@@ -1092,30 +1095,20 @@ namespace Game.Networking.Packets
|
||||
|
||||
public class CharCustomizeInfo
|
||||
{
|
||||
public byte HairStyleID;
|
||||
public byte FaceID;
|
||||
public ObjectGuid CharGUID;
|
||||
public Gender SexID = Gender.None;
|
||||
public string CharName;
|
||||
public byte HairColorID;
|
||||
public byte FacialHairStyleID;
|
||||
public byte SkinID;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
}
|
||||
|
||||
public class CharRaceOrFactionChangeInfo
|
||||
{
|
||||
public byte HairColorID;
|
||||
public Race RaceID = Race.None;
|
||||
public Gender SexID = Gender.None;
|
||||
public byte SkinID;
|
||||
public byte FacialHairStyleID;
|
||||
public ObjectGuid Guid;
|
||||
public bool FactionChange;
|
||||
public string Name;
|
||||
public byte FaceID;
|
||||
public byte HairStyleID;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public Array<ChrCustomizationChoice> Customizations = new Array<ChrCustomizationChoice>(50);
|
||||
}
|
||||
|
||||
public class CharacterUndeleteInfo
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(Prefix.GetByteCount(), 5);
|
||||
_worldPacket.WriteBits(Channel.GetByteCount(), 7);
|
||||
_worldPacket.WriteBits(ChatText.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits((byte)_ChatFlags, 11);
|
||||
_worldPacket.WriteBits((byte)_ChatFlags, 14);
|
||||
_worldPacket.WriteBit(HideChatLog);
|
||||
_worldPacket.WriteBit(FakeSenderName);
|
||||
_worldPacket.WriteBit(Unused_801.HasValue);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
using Framework.Constants;
|
||||
using Framework.IO;
|
||||
using Game.Entities;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.Networking.Packets
|
||||
{
|
||||
@@ -29,13 +30,13 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(PlayerGuid);
|
||||
_worldPacket.WriteUInt32(ServerTime);
|
||||
for (int i = 0; i < (int)AccountDataTypes.Max; ++i)
|
||||
_worldPacket.WriteUInt32(AccountTimes[i]);
|
||||
foreach (var accounttime in AccountTimes)
|
||||
_worldPacket.WriteUInt32(accounttime);
|
||||
}
|
||||
|
||||
public ObjectGuid PlayerGuid;
|
||||
public uint ServerTime = 0;
|
||||
public uint[] AccountTimes = new uint[(int)AccountDataTypes.Max];
|
||||
public Array<uint> AccountTimes = new Array<uint>((int)AccountDataTypes.Max);
|
||||
}
|
||||
|
||||
public class ClientCacheVersion : ServerPacket
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WritePackedGuid(CasterGUID);
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteInt32(SpellXSpellVisualID);
|
||||
Visual.Write(_worldPacket);
|
||||
_worldPacket.WriteInt32(Damage);
|
||||
_worldPacket.WriteInt32(OriginalDamage);
|
||||
_worldPacket.WriteInt32(Overkill);
|
||||
@@ -90,7 +90,7 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid CasterGUID;
|
||||
public ObjectGuid CastID;
|
||||
public int SpellID;
|
||||
public int SpellXSpellVisualID;
|
||||
public SpellCastVisual Visual;
|
||||
public int Damage;
|
||||
public int OriginalDamage;
|
||||
public int Overkill = -1;
|
||||
@@ -578,8 +578,8 @@ namespace Game.Networking.Packets
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TargetMaxScalingLevel);
|
||||
attackRoundInfo.WriteInt16(ContentTuning.PlayerLevelDelta);
|
||||
attackRoundInfo.WriteInt8(ContentTuning.TargetScalingLevelDelta);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.PlayerItemLevel);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.TargetItemLevel);
|
||||
attackRoundInfo.WriteFloat(ContentTuning.PlayerItemLevel);
|
||||
attackRoundInfo.WriteFloat(ContentTuning.TargetItemLevel);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.ScalingHealthItemLevelCurveID);
|
||||
attackRoundInfo.WriteUInt8((byte)(ContentTuning.ScalesWithItemLevel ? 1 : 0));
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ namespace Game.Networking.Packets
|
||||
foreach (var id in equipSet.Enchants)
|
||||
_worldPacket.WriteInt32(id);
|
||||
|
||||
_worldPacket.WriteInt32(equipSet.Unknown901_1);
|
||||
_worldPacket.WriteInt32(equipSet.Unknown901_2);
|
||||
|
||||
_worldPacket.WriteBit(equipSet.AssignedSpecIndex != -1);
|
||||
_worldPacket.WriteBits(equipSet.SetName.GetByteCount(), 8);
|
||||
_worldPacket.WriteBits(equipSet.SetIcon.GetByteCount(), 9);
|
||||
@@ -100,6 +103,9 @@ namespace Game.Networking.Packets
|
||||
Set.Enchants[0] = _worldPacket.ReadInt32();
|
||||
Set.Enchants[1] = _worldPacket.ReadInt32();
|
||||
|
||||
Set.Unknown901_1 = _worldPacket.ReadInt32();
|
||||
Set.Unknown901_2 = _worldPacket.ReadInt32();
|
||||
|
||||
bool hasSpecIndex = _worldPacket.HasBit();
|
||||
|
||||
uint setNameLength = _worldPacket.ReadBits<uint>(8);
|
||||
|
||||
@@ -20,6 +20,7 @@ using Game.DataStorage;
|
||||
using Game.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Framework.Dynamic;
|
||||
|
||||
namespace Game.Networking.Packets
|
||||
{
|
||||
@@ -223,25 +224,25 @@ namespace Game.Networking.Packets
|
||||
public List<uint> BlueprintsKnown = null;
|
||||
}
|
||||
|
||||
class GarrisonGetBuildingLandmarks : ClientPacket
|
||||
class GarrisonGetMapData : ClientPacket
|
||||
{
|
||||
public GarrisonGetBuildingLandmarks(WorldPacket packet) : base(packet) { }
|
||||
public GarrisonGetMapData(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read() { }
|
||||
}
|
||||
|
||||
class GarrisonBuildingLandmarks : ServerPacket
|
||||
class GarrisonMapDataResponse : ServerPacket
|
||||
{
|
||||
public GarrisonBuildingLandmarks() : base(ServerOpcodes.GarrisonBuildingLandmarks, ConnectionType.Instance) { }
|
||||
public GarrisonMapDataResponse() : base(ServerOpcodes.GarrisonBuildingLandmarks, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Landmarks.Count);
|
||||
foreach (GarrisonBuildingLandmark landmark in Landmarks)
|
||||
_worldPacket.WriteInt32(Buildings.Count);
|
||||
foreach (GarrisonBuildingMapData landmark in Buildings)
|
||||
landmark.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public List<GarrisonBuildingLandmark> Landmarks = new List<GarrisonBuildingLandmark>();
|
||||
public List<GarrisonBuildingMapData> Buildings = new List<GarrisonBuildingMapData>();
|
||||
}
|
||||
|
||||
class GarrisonPlotPlaced : ServerPacket
|
||||
@@ -369,6 +370,9 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(AbilityID.Count);
|
||||
data.WriteUInt32(ZoneSupportSpellID);
|
||||
data.WriteUInt32(FollowerStatus);
|
||||
data.WriteInt32(Health);
|
||||
data .WriteInt8(BoardIndex);
|
||||
data .WriteInt32(HealingTimestamp);
|
||||
|
||||
AbilityID.ForEach(ability => data.WriteUInt32(ability.Id));
|
||||
|
||||
@@ -390,6 +394,9 @@ namespace Game.Networking.Packets
|
||||
public List<GarrAbilityRecord> AbilityID = new List<GarrAbilityRecord>();
|
||||
public uint ZoneSupportSpellID;
|
||||
public uint FollowerStatus;
|
||||
public int Health;
|
||||
public int HealingTimestamp;
|
||||
public sbyte BoardIndex;
|
||||
public string CustomName = "";
|
||||
}
|
||||
|
||||
@@ -405,8 +412,9 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(TravelDuration);
|
||||
data.WriteUInt32(MissionDuration);
|
||||
data.WriteUInt32(MissionState);
|
||||
data.WriteUInt32(Unknown1);
|
||||
data.WriteUInt32(Unknown2);
|
||||
data.WriteUInt32(SuccessChance);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteFloat(MissionScalar);
|
||||
}
|
||||
|
||||
public ulong DbID;
|
||||
@@ -417,8 +425,9 @@ namespace Game.Networking.Packets
|
||||
public uint TravelDuration;
|
||||
public uint MissionDuration;
|
||||
public uint MissionState;
|
||||
public uint Unknown1 = 0;
|
||||
public uint Unknown2 = 0;
|
||||
public uint SuccessChance;
|
||||
public uint Flags;
|
||||
public float MissionScalar = 1.0f;
|
||||
}
|
||||
|
||||
struct GarrisonMissionReward
|
||||
@@ -455,6 +464,18 @@ namespace Game.Networking.Packets
|
||||
public long StartTime;
|
||||
}
|
||||
|
||||
struct GarrisonTalentSocketData
|
||||
{
|
||||
public int SoulbindConduitID;
|
||||
public int SoulbindConduitRank;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(SoulbindConduitID);
|
||||
data.WriteInt32(SoulbindConduitRank);
|
||||
}
|
||||
}
|
||||
|
||||
struct GarrisonTalent
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
@@ -463,12 +484,70 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(Rank);
|
||||
data.WriteUInt32((uint)ResearchStartTime);
|
||||
data.WriteInt32(Flags);
|
||||
data.WriteBit(Socket.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (Socket.HasValue)
|
||||
Socket.Value.Write(data);
|
||||
}
|
||||
|
||||
public int GarrTalentID;
|
||||
public int Rank;
|
||||
public long ResearchStartTime;
|
||||
public int Flags;
|
||||
public Optional<GarrisonTalentSocketData> Socket;
|
||||
}
|
||||
|
||||
struct GarrisonCollectionEntry
|
||||
{
|
||||
public int EntryID;
|
||||
public int Rank;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(EntryID);
|
||||
data.WriteInt32(Rank);
|
||||
}
|
||||
}
|
||||
|
||||
class GarrisonCollection
|
||||
{
|
||||
public int Type;
|
||||
public List<GarrisonCollectionEntry> Entries = new List<GarrisonCollectionEntry>();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Type);
|
||||
data.WriteInt32(Entries.Count);
|
||||
foreach (GarrisonCollectionEntry collectionEntry in Entries)
|
||||
collectionEntry.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
struct GarrisonEventEntry
|
||||
{
|
||||
public int EntryID;
|
||||
public int EventValue;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(EntryID);
|
||||
data.WriteInt32(EventValue);
|
||||
}
|
||||
}
|
||||
|
||||
class GarrisonEventList
|
||||
{
|
||||
public int Type;
|
||||
public List<GarrisonEventEntry> Events = new List<GarrisonEventEntry>();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Type);
|
||||
data.WriteInt32(Events.Count);
|
||||
foreach (GarrisonEventEntry eventEntry in Events)
|
||||
eventEntry.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
class GarrisonInfo
|
||||
@@ -481,11 +560,14 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(Buildings.Count);
|
||||
data.WriteInt32(Plots.Count);
|
||||
data.WriteInt32(Followers.Count);
|
||||
data.WriteInt32(AutoTroops.Count);
|
||||
data.WriteInt32(Missions.Count);
|
||||
data.WriteInt32(MissionRewards.Count);
|
||||
data.WriteInt32(MissionOvermaxRewards.Count);
|
||||
data.WriteInt32(MissionAreaBonuses.Count);
|
||||
data.WriteInt32(Talents.Count);
|
||||
data.WriteInt32(Collections.Count);
|
||||
data.WriteInt32(EventLists.Count);
|
||||
data.WriteInt32(CanStartMission.Count);
|
||||
data.WriteInt32(ArchivedMissions.Count);
|
||||
data.WriteUInt32(NumFollowerActivationsRemaining);
|
||||
@@ -514,11 +596,14 @@ namespace Game.Networking.Packets
|
||||
foreach (GarrisonMissionBonusAbility areaBonus in MissionAreaBonuses)
|
||||
areaBonus.Write(data);
|
||||
|
||||
foreach (GarrisonTalent talent in Talents)
|
||||
talent.Write(data);
|
||||
foreach (GarrisonCollection collection in Collections)
|
||||
collection.Write(data);
|
||||
|
||||
foreach(var id in ArchivedMissions)
|
||||
data.WriteInt32(id);
|
||||
foreach (GarrisonEventList eventList in EventLists)
|
||||
eventList.Write(data);
|
||||
|
||||
foreach (var id in ArchivedMissions)
|
||||
data.WriteInt32(id);
|
||||
|
||||
foreach (GarrisonBuildingInfo building in Buildings)
|
||||
building.Write(data);
|
||||
@@ -530,6 +615,12 @@ namespace Game.Networking.Packets
|
||||
|
||||
foreach (GarrisonFollower follower in Followers)
|
||||
follower.Write(data);
|
||||
|
||||
foreach (GarrisonFollower follower in AutoTroops)
|
||||
follower.Write(data);
|
||||
|
||||
foreach (GarrisonTalent talent in Talents)
|
||||
talent.Write(data);
|
||||
}
|
||||
|
||||
public GarrisonType GarrTypeID;
|
||||
@@ -540,11 +631,14 @@ namespace Game.Networking.Packets
|
||||
public List<GarrisonPlotInfo> Plots = new List<GarrisonPlotInfo>();
|
||||
public List<GarrisonBuildingInfo> Buildings = new List<GarrisonBuildingInfo>();
|
||||
public List<GarrisonFollower> Followers = new List<GarrisonFollower>();
|
||||
public List<GarrisonFollower> AutoTroops = new List<GarrisonFollower>();
|
||||
public List<GarrisonMission> Missions = new List<GarrisonMission>();
|
||||
public List<List<GarrisonMissionReward>> MissionRewards = new List<List<GarrisonMissionReward>>();
|
||||
public List<List<GarrisonMissionReward>> MissionOvermaxRewards = new List<List<GarrisonMissionReward>>();
|
||||
public List<GarrisonMissionBonusAbility> MissionAreaBonuses = new List<GarrisonMissionBonusAbility>();
|
||||
public List<GarrisonTalent> Talents = new List<GarrisonTalent>();
|
||||
public List<GarrisonCollection> Collections = new List<GarrisonCollection>();
|
||||
public List<GarrisonEventList> EventLists = new List<GarrisonEventList>();
|
||||
public List<bool> CanStartMission = new List<bool>();
|
||||
public List<int> ArchivedMissions = new List<int>();
|
||||
}
|
||||
@@ -593,9 +687,9 @@ namespace Game.Networking.Packets
|
||||
public List<GarrisonRemoteBuildingInfo> Buildings = new List<GarrisonRemoteBuildingInfo>();
|
||||
}
|
||||
|
||||
struct GarrisonBuildingLandmark
|
||||
struct GarrisonBuildingMapData
|
||||
{
|
||||
public GarrisonBuildingLandmark(uint buildingPlotInstId, Position pos)
|
||||
public GarrisonBuildingMapData(uint buildingPlotInstId, Position pos)
|
||||
{
|
||||
GarrBuildingPlotInstID = buildingPlotInstId;
|
||||
Pos = pos;
|
||||
|
||||
@@ -278,9 +278,9 @@ namespace Game.Networking.Packets
|
||||
public string OldGuildName;
|
||||
}
|
||||
|
||||
public class GuildEventAwayChange : ServerPacket
|
||||
public class GuildEventStatusChange : ServerPacket
|
||||
{
|
||||
public GuildEventAwayChange() : base(ServerOpcodes.GuildEventAwayChange) { }
|
||||
public GuildEventStatusChange() : base(ServerOpcodes.GuildEventAwayChange) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
@@ -426,7 +426,6 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteBit(Removed);
|
||||
_worldPacket.WriteBits(LeaverName.GetByteCount(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (Removed)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(TableHash);
|
||||
_worldPacket.WriteUInt32(RecordID);
|
||||
_worldPacket.WriteUInt32(Timestamp);
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket.WriteBits(Status, 2);
|
||||
_worldPacket.WriteUInt32(Data.GetSize());
|
||||
_worldPacket.WriteBytes(Data.GetData());
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace Game.Networking.Packets
|
||||
public uint TableHash;
|
||||
public uint Timestamp;
|
||||
public uint RecordID;
|
||||
public bool Allow;
|
||||
public byte Status = 3;
|
||||
|
||||
public ByteBuffer Data = new ByteBuffer();
|
||||
}
|
||||
@@ -147,12 +147,12 @@ namespace Game.Networking.Packets
|
||||
if (Size.HasValue)
|
||||
{
|
||||
data.WriteUInt32(Size.Value);
|
||||
data.WriteBit(true);
|
||||
data.WriteBits(1, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
data.WriteUInt32(0);
|
||||
data.WriteBit(false);
|
||||
data.WriteBits(3, 2);
|
||||
}
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
@@ -224,14 +224,9 @@ namespace Game.Networking.Packets
|
||||
public string Name;
|
||||
public uint SpecializationID;
|
||||
public byte GenderID;
|
||||
public byte Skin;
|
||||
public byte HairColor;
|
||||
public byte HairStyle;
|
||||
public byte FacialHairStyle;
|
||||
public byte Face;
|
||||
public byte Race;
|
||||
public byte ClassID;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public List<ChrCustomizationChoice> Customizations = new List<ChrCustomizationChoice>();
|
||||
|
||||
public void Initialize(Player player)
|
||||
{
|
||||
@@ -239,14 +234,11 @@ namespace Game.Networking.Packets
|
||||
SpecializationID = player.GetPrimarySpecialization();
|
||||
Name = player.GetName();
|
||||
GenderID = player.m_playerData.NativeSex;
|
||||
Skin = player.m_playerData.SkinID;
|
||||
HairColor = player.m_playerData.HairColorID;
|
||||
HairStyle = player.m_playerData.HairStyleID;
|
||||
FacialHairStyle = player.m_playerData.FacialHairStyleID;
|
||||
Face = player.m_playerData.FaceID;
|
||||
Race = (byte)player.GetRace();
|
||||
ClassID = (byte)player.GetClass();
|
||||
CustomDisplay.AddRange(player.m_playerData.CustomDisplayOption._values);
|
||||
|
||||
foreach (var customization in player.m_playerData.Customizations)
|
||||
Customizations.Add(new ChrCustomizationChoice(customization.ChrCustomizationOptionID, customization.ChrCustomizationChoiceID));
|
||||
|
||||
for (byte i = 0; i < EquipmentSlot.End; ++i)
|
||||
{
|
||||
@@ -263,17 +255,14 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(Items.Count);
|
||||
data.WriteBits(Name.GetByteCount(), 6);
|
||||
data.WriteUInt8(GenderID);
|
||||
data.WriteUInt8(Skin);
|
||||
data.WriteUInt8(HairColor);
|
||||
data.WriteUInt8(HairStyle);
|
||||
data.WriteUInt8(FacialHairStyle);
|
||||
data.WriteUInt8(Face);
|
||||
data.WriteUInt8(Race);
|
||||
data.WriteUInt8(ClassID);
|
||||
CustomDisplay.ForEach(id => data.WriteUInt8(id));
|
||||
|
||||
data.WriteInt32(Customizations.Count);
|
||||
data.WriteString(Name);
|
||||
|
||||
foreach (var customization in Customizations)
|
||||
customization.Write(data);
|
||||
|
||||
foreach (InspectItemData item in Items)
|
||||
item.Write(data);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Game.Networking.Packets
|
||||
Muid = _worldPacket.ReadUInt32();
|
||||
Slot = _worldPacket.ReadUInt32();
|
||||
Item.Read(_worldPacket);
|
||||
ItemType = (ItemVendorType)_worldPacket.ReadBits<int>(2);
|
||||
ItemType = (ItemVendorType)_worldPacket.ReadBits<int>(3);
|
||||
}
|
||||
|
||||
public ObjectGuid VendorGUID;
|
||||
@@ -678,7 +678,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
//Structs
|
||||
public class ItemBonusInstanceData
|
||||
public class ItemBonuses
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
@@ -708,13 +708,13 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is ItemBonusInstanceData)
|
||||
return (ItemBonusInstanceData)obj == this;
|
||||
if (obj is ItemBonuses)
|
||||
return (ItemBonuses)obj == this;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(ItemBonusInstanceData left, ItemBonusInstanceData right)
|
||||
public static bool operator ==(ItemBonuses left, ItemBonuses right)
|
||||
{
|
||||
if (left.Context != right.Context)
|
||||
return false;
|
||||
@@ -725,7 +725,7 @@ namespace Game.Networking.Packets
|
||||
return left.BonusListIDs.SequenceEqual(right.BonusListIDs);
|
||||
}
|
||||
|
||||
public static bool operator !=(ItemBonusInstanceData left, ItemBonusInstanceData right)
|
||||
public static bool operator !=(ItemBonuses left, ItemBonuses right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
@@ -734,8 +734,118 @@ namespace Game.Networking.Packets
|
||||
public List<uint> BonusListIDs = new List<uint>();
|
||||
}
|
||||
|
||||
public class ItemMod
|
||||
{
|
||||
public uint Value;
|
||||
public ItemModifier Type;
|
||||
|
||||
public ItemMod()
|
||||
{
|
||||
Type = ItemModifier.Max;
|
||||
}
|
||||
public ItemMod(uint value, ItemModifier type)
|
||||
{
|
||||
Value = value;
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
Value = data.ReadUInt32();
|
||||
Type = (ItemModifier)data.ReadUInt8();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Value);
|
||||
data.WriteUInt8((byte)Type);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Value.GetHashCode() ^ Type.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is ItemMod)
|
||||
return (ItemMod)obj == this;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(ItemMod left, ItemMod right)
|
||||
{
|
||||
if (left.Value != right.Value)
|
||||
return false;
|
||||
|
||||
return left.Type != right.Type;
|
||||
}
|
||||
|
||||
public static bool operator !=(ItemMod left, ItemMod right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
}
|
||||
|
||||
public class ItemModList
|
||||
{
|
||||
public Array<ItemMod> Values = new Array<ItemMod>(ItemModifier.Max);
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
var itemModListCount = data.ReadBits<uint>(6);
|
||||
|
||||
for (var i = 0; i < itemModListCount; ++i)
|
||||
{
|
||||
var itemMod = new ItemMod();
|
||||
itemMod.Read(data);
|
||||
Values[i] = itemMod;
|
||||
}
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits(Values.Count, 6);
|
||||
data.FlushBits();
|
||||
|
||||
foreach (ItemMod itemMod in Values)
|
||||
itemMod.Write(data);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Values.GetHashCode();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is ItemModList)
|
||||
return (ItemModList)obj == this;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(ItemModList left, ItemModList right)
|
||||
{
|
||||
if (left.Values.Count != right.Values.Count)
|
||||
return false;
|
||||
|
||||
return !left.Values.Except(right.Values).Any();
|
||||
}
|
||||
|
||||
public static bool operator !=(ItemModList left, ItemModList right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
}
|
||||
|
||||
public class ItemInstance
|
||||
{
|
||||
public uint ItemID;
|
||||
public Optional<ItemBonuses> ItemBonus;
|
||||
public ItemModList Modifications = new ItemModList();
|
||||
|
||||
public ItemInstance() { }
|
||||
|
||||
public ItemInstance(Item item)
|
||||
@@ -749,17 +859,8 @@ namespace Game.Networking.Packets
|
||||
ItemBonus.Value.Context = item.GetContext();
|
||||
}
|
||||
|
||||
uint mask = item.m_itemData.ModifiersMask;
|
||||
if (mask != 0)
|
||||
{
|
||||
Modifications.HasValue = true;
|
||||
|
||||
for (int i = 0; mask != 0; mask >>= 1, ++i)
|
||||
{
|
||||
if ((mask & 1) != 0)
|
||||
Modifications.Value.Insert(i, (int)item.GetModifier((ItemModifier)i));
|
||||
}
|
||||
}
|
||||
foreach (var mod in item.m_itemData.Modifiers.Values)
|
||||
Modifications.Values.Add(mod.Value, (ItemModifier)mod.Type);
|
||||
}
|
||||
|
||||
public ItemInstance(Loots.LootItem lootItem)
|
||||
@@ -780,14 +881,11 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
ItemID = voidItem.ItemEntry;
|
||||
|
||||
if (voidItem.FixedScalingLevel != 0 || voidItem.ArtifactKnowledgeLevel != 0)
|
||||
{
|
||||
Modifications.HasValue = true;
|
||||
if (voidItem.FixedScalingLevel != 0)
|
||||
Modifications.Value.Insert((int)ItemModifier.TimewalkerLevel, (int)voidItem.FixedScalingLevel);
|
||||
if (voidItem.ArtifactKnowledgeLevel != 0)
|
||||
Modifications.Value.Insert((int)ItemModifier.ArtifactKnowledgeLevel, (int)voidItem.ArtifactKnowledgeLevel);
|
||||
}
|
||||
if (voidItem.FixedScalingLevel != 0)
|
||||
Modifications.Values.Add(new ItemMod(voidItem.FixedScalingLevel, ItemModifier.TimewalkerLevel));
|
||||
|
||||
if (voidItem.ArtifactKnowledgeLevel != 0)
|
||||
Modifications.Values.Add(new ItemMod(voidItem.ArtifactKnowledgeLevel, ItemModifier.ArtifactKnowledgeLevel));
|
||||
|
||||
if (!voidItem.BonusListIDs.Empty())
|
||||
{
|
||||
@@ -801,7 +899,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
ItemID = gem.ItemId;
|
||||
|
||||
ItemBonusInstanceData bonus = new ItemBonusInstanceData();
|
||||
ItemBonuses bonus = new ItemBonuses();
|
||||
bonus.Context = (ItemContext)(byte)gem.Context;
|
||||
foreach (ushort bonusListId in gem.BonusListIDs)
|
||||
if (bonusListId != 0)
|
||||
@@ -816,14 +914,12 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(ItemID);
|
||||
|
||||
data.WriteBit(ItemBonus.HasValue);
|
||||
data.WriteBit(Modifications.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
Modifications.Write(data);
|
||||
|
||||
if (ItemBonus.HasValue)
|
||||
ItemBonus.Value.Write(data);
|
||||
|
||||
if (Modifications.HasValue)
|
||||
Modifications.Value.Write(data);
|
||||
}
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
@@ -831,14 +927,12 @@ namespace Game.Networking.Packets
|
||||
ItemID = data.ReadUInt32();
|
||||
|
||||
ItemBonus.HasValue = data.HasBit();
|
||||
Modifications.HasValue = data.HasBit();
|
||||
data.ResetBitPos();
|
||||
|
||||
Modifications.Read(data);
|
||||
|
||||
if (ItemBonus.HasValue)
|
||||
ItemBonus.Value.Read(data);
|
||||
|
||||
if (Modifications.HasValue)
|
||||
Modifications.Value.Read(data);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
@@ -859,10 +953,10 @@ namespace Game.Networking.Packets
|
||||
if (left.ItemID != right.ItemID)
|
||||
return false;
|
||||
|
||||
if (left.ItemBonus.HasValue != right.ItemBonus.HasValue || left.Modifications.HasValue != right.Modifications.HasValue)
|
||||
if (left.ItemBonus.HasValue != right.ItemBonus.HasValue)
|
||||
return false;
|
||||
|
||||
if (left.Modifications.HasValue && left.Modifications.Value != right.Modifications.Value)
|
||||
if (left.Modifications != right.Modifications)
|
||||
return false;
|
||||
|
||||
if (left.ItemBonus.HasValue && left.ItemBonus.Value != right.ItemBonus.Value)
|
||||
@@ -875,10 +969,6 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
public uint ItemID;
|
||||
public Optional<ItemBonusInstanceData> ItemBonus;
|
||||
public Optional<CompactArray> Modifications;
|
||||
}
|
||||
|
||||
public class ItemEnchantData
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(BlackList.Count);
|
||||
_worldPacket.WriteInt32(BlackListNames.Count);
|
||||
|
||||
foreach (LFGJoinBlackList blackList in BlackList)
|
||||
foreach (LFGBlackListPkt blackList in BlackList)
|
||||
blackList.Write(_worldPacket);
|
||||
|
||||
foreach (string str in BlackListNames)
|
||||
@@ -292,7 +292,7 @@ namespace Game.Networking.Packets
|
||||
public RideTicket Ticket = new RideTicket();
|
||||
public byte Result;
|
||||
public byte ResultDetail;
|
||||
public List<LFGJoinBlackList> BlackList = new List<LFGJoinBlackList>();
|
||||
public List<LFGBlackListPkt> BlackList = new List<LFGBlackListPkt>();
|
||||
public List<string> BlackListNames = new List<string>();
|
||||
}
|
||||
|
||||
@@ -441,22 +441,36 @@ namespace Game.Networking.Packets
|
||||
//Structs
|
||||
public class LFGBlackListSlot
|
||||
{
|
||||
public LFGBlackListSlot(uint slot, uint reason, int subReason1, int subReason2)
|
||||
public uint Slot;
|
||||
public uint Reason;
|
||||
public int SubReason1;
|
||||
public int SubReason2;
|
||||
public uint SoftLock;
|
||||
|
||||
public LFGBlackListSlot(uint slot, uint reason, int subReason1, int subReason2, uint softLock)
|
||||
{
|
||||
Slot = slot;
|
||||
Reason = reason;
|
||||
SubReason1 = subReason1;
|
||||
SubReason2 = subReason2;
|
||||
SoftLock = softLock;
|
||||
}
|
||||
|
||||
public uint Slot { get; set; }
|
||||
public uint Reason { get; set; }
|
||||
public int SubReason1 { get; set; }
|
||||
public int SubReason2 { get; set; }
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Slot);
|
||||
data.WriteUInt32(Reason);
|
||||
data.WriteInt32(SubReason1);
|
||||
data.WriteInt32(SubReason2);
|
||||
data.WriteUInt32(SoftLock);
|
||||
}
|
||||
}
|
||||
|
||||
public class LFGBlackList
|
||||
{
|
||||
public Optional<ObjectGuid> PlayerGuid;
|
||||
public List<LFGBlackListSlot> Slot = new List<LFGBlackListSlot>();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBit(PlayerGuid.HasValue);
|
||||
@@ -464,17 +478,9 @@ namespace Game.Networking.Packets
|
||||
if (PlayerGuid.HasValue)
|
||||
data.WritePackedGuid(PlayerGuid.Value);
|
||||
|
||||
foreach (LFGBlackListSlot lfgBlackListSlot in Slot)
|
||||
{
|
||||
data.WriteUInt32(lfgBlackListSlot.Slot);
|
||||
data.WriteUInt32(lfgBlackListSlot.Reason);
|
||||
data.WriteInt32(lfgBlackListSlot.SubReason1);
|
||||
data.WriteInt32(lfgBlackListSlot.SubReason2);
|
||||
}
|
||||
foreach (LFGBlackListSlot slot in Slot)
|
||||
slot.Write(data);
|
||||
}
|
||||
|
||||
public Optional<ObjectGuid> PlayerGuid;
|
||||
public List<LFGBlackListSlot> Slot = new List<LFGBlackListSlot>();
|
||||
}
|
||||
|
||||
public struct LfgPlayerQuestRewardItem
|
||||
@@ -639,40 +645,22 @@ namespace Game.Networking.Packets
|
||||
public bool RoleCheckComplete;
|
||||
}
|
||||
|
||||
public struct LFGJoinBlackListSlot
|
||||
{
|
||||
public LFGJoinBlackListSlot(int slot, int reason, int subReason1, int subReason2)
|
||||
{
|
||||
Slot = slot;
|
||||
Reason = reason;
|
||||
SubReason1 = subReason1;
|
||||
SubReason2 = subReason2;
|
||||
}
|
||||
|
||||
public int Slot { get; set; }
|
||||
public int Reason { get; set; }
|
||||
public int SubReason1 { get; set; }
|
||||
public int SubReason2 { get; set; }
|
||||
}
|
||||
|
||||
public class LFGJoinBlackList
|
||||
public class LFGBlackListPkt
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WritePackedGuid(PlayerGuid);
|
||||
data.WriteInt32(Slots.Count);
|
||||
data.WriteBit(PlayerGuid.HasValue);
|
||||
data.WriteInt32(Slot.Count);
|
||||
|
||||
foreach (LFGJoinBlackListSlot lfgBlackListSlot in Slots)
|
||||
{
|
||||
data.WriteInt32(lfgBlackListSlot.Slot);
|
||||
data.WriteInt32(lfgBlackListSlot.Reason);
|
||||
data.WriteInt32(lfgBlackListSlot.SubReason1);
|
||||
data.WriteInt32(lfgBlackListSlot.SubReason2);
|
||||
}
|
||||
if (PlayerGuid.HasValue)
|
||||
data.WritePackedGuid(PlayerGuid.Value);
|
||||
|
||||
foreach (LFGBlackListSlot slot in Slot)
|
||||
slot.Write(data);
|
||||
}
|
||||
|
||||
public ObjectGuid PlayerGuid;
|
||||
public List<LFGJoinBlackListSlot> Slots = new List<LFGJoinBlackListSlot>();
|
||||
public Optional<ObjectGuid> PlayerGuid;
|
||||
public List<LFGBlackListSlot> Slot = new List<LFGBlackListSlot>();
|
||||
}
|
||||
|
||||
public struct LFGPlayerRewards
|
||||
|
||||
@@ -124,6 +124,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(WeeklyQuantity.HasValue);
|
||||
_worldPacket.WriteBit(TrackedQuantity.HasValue);
|
||||
_worldPacket.WriteBit(MaxQuantity.HasValue);
|
||||
_worldPacket.WriteBit(Unused901.HasValue);
|
||||
_worldPacket.WriteBit(SuppressChatLog);
|
||||
_worldPacket.WriteBit(QuantityChange.HasValue);
|
||||
_worldPacket.WriteBit(QuantityGainSource.HasValue);
|
||||
@@ -139,6 +140,9 @@ namespace Game.Networking.Packets
|
||||
if (MaxQuantity.HasValue)
|
||||
_worldPacket.WriteInt32(MaxQuantity.Value);
|
||||
|
||||
if (Unused901.HasValue)
|
||||
_worldPacket.WriteInt32(Unused901.Value);
|
||||
|
||||
if (QuantityChange.HasValue)
|
||||
_worldPacket.WriteInt32(QuantityChange.Value);
|
||||
|
||||
@@ -155,6 +159,7 @@ namespace Game.Networking.Packets
|
||||
public Optional<int> WeeklyQuantity;
|
||||
public Optional<int> TrackedQuantity;
|
||||
public Optional<int> MaxQuantity;
|
||||
public Optional<int> Unused901;
|
||||
public Optional<int> QuantityChange;
|
||||
public Optional<int> QuantityGainSource;
|
||||
public Optional<int> QuantityLostSource;
|
||||
@@ -204,6 +209,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(data.MaxWeeklyQuantity.HasValue);
|
||||
_worldPacket.WriteBit(data.TrackedQuantity.HasValue);
|
||||
_worldPacket.WriteBit(data.MaxQuantity.HasValue);
|
||||
_worldPacket.WriteBit(data.Unused901.HasValue);
|
||||
_worldPacket.WriteBits(data.Flags, 5);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -215,6 +221,8 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(data.TrackedQuantity.Value);
|
||||
if (data.MaxQuantity.HasValue)
|
||||
_worldPacket.WriteInt32(data.MaxQuantity.Value);
|
||||
if (data.Unused901.HasValue)
|
||||
_worldPacket.WriteInt32(data.Unused901.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,6 +236,7 @@ namespace Game.Networking.Packets
|
||||
public Optional<uint> MaxWeeklyQuantity; // Weekly Currency cap.
|
||||
public Optional<uint> TrackedQuantity;
|
||||
public Optional<int> MaxQuantity;
|
||||
public Optional<int> Unused901;
|
||||
public byte Flags; // 0 = none,
|
||||
}
|
||||
}
|
||||
@@ -366,7 +375,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(RestrictedAccountMaxLevel.Value);
|
||||
|
||||
if (RestrictedAccountMaxMoney.HasValue)
|
||||
_worldPacket.WriteUInt32(RestrictedAccountMaxMoney.Value);
|
||||
_worldPacket.WriteUInt64(RestrictedAccountMaxMoney.Value);
|
||||
|
||||
if (InstanceGroupSize.HasValue)
|
||||
_worldPacket.WriteUInt32(InstanceGroupSize.Value);
|
||||
@@ -378,7 +387,7 @@ namespace Game.Networking.Packets
|
||||
public bool BlockExitingLoadingScreen; // when set to true, sending SMSG_UPDATE_OBJECT with CreateObject Self bit = true will not hide loading screen
|
||||
// instead it will be done after this packet is sent again with false in this bit and SMSG_UPDATE_OBJECT Values for player
|
||||
public Optional<uint> RestrictedAccountMaxLevel;
|
||||
public Optional<uint> RestrictedAccountMaxMoney;
|
||||
public Optional<ulong> RestrictedAccountMaxMoney;
|
||||
public Optional<uint> InstanceGroupSize;
|
||||
}
|
||||
|
||||
@@ -864,12 +873,14 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WritePackedGuid(SourceObjectGUID);
|
||||
_worldPacket.WritePackedGuid(TargetObjectGUID);
|
||||
_worldPacket.WriteVector3(Position);
|
||||
_worldPacket.WriteInt32(BroadcastTextID);
|
||||
}
|
||||
|
||||
ObjectGuid TargetObjectGUID;
|
||||
ObjectGuid SourceObjectGUID;
|
||||
uint SoundKitID;
|
||||
Vector3 Position;
|
||||
public ObjectGuid TargetObjectGUID;
|
||||
public ObjectGuid SourceObjectGUID;
|
||||
public uint SoundKitID;
|
||||
public Vector3 Position;
|
||||
public int BroadcastTextID;
|
||||
}
|
||||
|
||||
class PlaySound : ServerPacket
|
||||
@@ -884,10 +895,12 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt32(SoundKitID);
|
||||
_worldPacket.WritePackedGuid(SourceObjectGuid);
|
||||
_worldPacket.WriteInt32(BroadcastTextID);
|
||||
}
|
||||
|
||||
ObjectGuid SourceObjectGuid;
|
||||
uint SoundKitID;
|
||||
public ObjectGuid SourceObjectGuid;
|
||||
public uint SoundKitID;
|
||||
public int BroadcastTextID;
|
||||
}
|
||||
|
||||
class PlaySpeakerBoxSound : ServerPacket
|
||||
@@ -948,18 +961,6 @@ namespace Game.Networking.Packets
|
||||
public bool Enable;
|
||||
}
|
||||
|
||||
class Dismount : ServerPacket
|
||||
{
|
||||
public Dismount() : base(ServerOpcodes.Dismount) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
}
|
||||
|
||||
class SaveCUFProfiles : ClientPacket
|
||||
{
|
||||
public SaveCUFProfiles(WorldPacket packet) : base(packet) { }
|
||||
|
||||
@@ -161,8 +161,8 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(hasTransportData);
|
||||
data.WriteBit(hasFallData);
|
||||
data.WriteBit(hasSpline);
|
||||
data.WriteBit(0); // HeightChangeFailed
|
||||
data.WriteBit(0); // RemoteTimeValid
|
||||
data.WriteBit(false); // HeightChangeFailed
|
||||
data.WriteBit(false); // RemoteTimeValid
|
||||
data.FlushBits();
|
||||
|
||||
if (hasTransportData)
|
||||
@@ -206,10 +206,11 @@ namespace Game.Networking.Packets
|
||||
data.WriteBits((byte)moveSpline.facing.type, 2); // Face
|
||||
bool hasFadeObjectTime = data.WriteBit(moveSpline.splineflags.HasFlag(SplineFlag.FadeObject) && moveSpline.effect_start_time < moveSpline.Duration());
|
||||
data.WriteBits(moveSpline.GetPath().Length, 16);
|
||||
data.WriteBits((byte)moveSpline.spline.m_mode, 2); // Mode
|
||||
data.WriteBit(0); // HasSplineFilter
|
||||
data.WriteBit(false); // HasSplineFilter
|
||||
data.WriteBit(moveSpline.spell_effect_extra.HasValue); // HasSpellEffectExtraData
|
||||
data.WriteBit(moveSpline.splineflags.HasFlag(SplineFlag.Parabolic)); // HasJumpExtraData
|
||||
data.WriteBit(moveSpline.anim_tier.HasValue); // HasAnimationTierTransition
|
||||
data.WriteBit(false); // HasUnknown901
|
||||
data.FlushBits();
|
||||
|
||||
//if (HasSplineFilterKey)
|
||||
@@ -258,6 +259,25 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(moveSpline.effect_start_time);
|
||||
data.WriteUInt32(0); // Duration (override)
|
||||
}
|
||||
|
||||
if (moveSpline.anim_tier.HasValue)
|
||||
{
|
||||
data.WriteUInt32(moveSpline.anim_tier.Value.TierTransitionId);
|
||||
data.WriteInt32(moveSpline.effect_start_time);
|
||||
data.WriteUInt32(0);
|
||||
data.WriteUInt8(moveSpline.anim_tier.Value.AnimTier);
|
||||
}
|
||||
|
||||
//if (HasUnknown901)
|
||||
//{
|
||||
// for (WorldPackets::Movement::MonsterSplineUnknown901::Inner const& unkInner : unk.Data) size = 16
|
||||
// {
|
||||
// data << int32(unkInner.Unknown_1);
|
||||
// data << int32(unkInner.Unknown_2);
|
||||
// data << int32(unkInner.Unknown_3);
|
||||
// data << uint32(unkInner.Unknown_4);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,8 +373,10 @@ namespace Game.Networking.Packets
|
||||
|
||||
if (splineFlags.HasFlag(SplineFlag.Animation))
|
||||
{
|
||||
movementSpline.AnimTier = splineFlags.GetAnimTier();
|
||||
movementSpline.TierTransStartTime = (uint)moveSpline.effect_start_time;
|
||||
movementSpline.AnimTierTransition.HasValue = true;
|
||||
movementSpline.AnimTierTransition.Value.TierTransitionID = (int)moveSpline.anim_tier.Value.TierTransitionId;
|
||||
movementSpline.AnimTierTransition.Value.StartTime = (uint)moveSpline.effect_start_time;
|
||||
movementSpline.AnimTierTransition.Value.AnimTier = moveSpline.anim_tier.Value.AnimTier;
|
||||
}
|
||||
|
||||
movementSpline.MoveTime = (uint)moveSpline.Duration();
|
||||
@@ -562,14 +584,14 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(MapID);
|
||||
_worldPacket.WriteXYZO(Pos);
|
||||
Loc.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt32(Reason);
|
||||
_worldPacket.WriteXYZ(MovementOffset);
|
||||
}
|
||||
|
||||
public uint MapID;
|
||||
public uint Reason;
|
||||
public Position Pos;
|
||||
public TeleportLocation Loc = new TeleportLocation();
|
||||
public Position MovementOffset; // Adjusts all pending movement events by this offset
|
||||
}
|
||||
|
||||
@@ -894,10 +916,9 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(SequenceIndex);
|
||||
_worldPacket.WriteFloat(Height);
|
||||
_worldPacket.WriteFloat(Scale);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
_worldPacket.WriteUInt32(MountDisplayID);
|
||||
_worldPacket.WriteInt32(ScaleDuration);
|
||||
_worldPacket.WriteBits((uint)Reason, 2);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public float Scale = 1.0f;
|
||||
@@ -934,7 +955,7 @@ namespace Game.Networking.Packets
|
||||
Data.Read(_worldPacket);
|
||||
Height = _worldPacket.ReadFloat();
|
||||
MountDisplayID = _worldPacket.ReadUInt32();
|
||||
Reason = (UpdateCollisionHeightReason)_worldPacket.ReadBits<uint>(2);
|
||||
Reason = (UpdateCollisionHeightReason)_worldPacket.ReadUInt8();
|
||||
}
|
||||
|
||||
public MovementAck Data;
|
||||
@@ -1118,13 +1139,10 @@ namespace Game.Networking.Packets
|
||||
data.WriteBit(MovementForceGUID.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (CollisionHeight.HasValue)
|
||||
{
|
||||
data.WriteFloat(CollisionHeight.Value.Height);
|
||||
data.WriteFloat(CollisionHeight.Value.Scale);
|
||||
data.WriteBits(CollisionHeight.Value.Reason, 2);
|
||||
data.FlushBits();
|
||||
}
|
||||
if (MovementForce_.HasValue)
|
||||
MovementForce_.Value.Write(data);
|
||||
|
||||
|
||||
|
||||
if (Speed.HasValue)
|
||||
data.WriteFloat(Speed.Value);
|
||||
@@ -1139,11 +1157,16 @@ namespace Game.Networking.Packets
|
||||
if (VehicleRecID.HasValue)
|
||||
data.WriteInt32(VehicleRecID.Value);
|
||||
|
||||
if (CollisionHeight.HasValue)
|
||||
{
|
||||
data.WriteFloat(CollisionHeight.Value.Height);
|
||||
data.WriteFloat(CollisionHeight.Value.Scale);
|
||||
data.WriteBits(CollisionHeight.Value.Reason, 2);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
if (MovementForceGUID.HasValue)
|
||||
data.WritePackedGuid(MovementForceGUID.Value);
|
||||
|
||||
if (MovementForce_.HasValue)
|
||||
MovementForce_.Value.Write(data);
|
||||
}
|
||||
|
||||
public ServerOpcodes MessageID;
|
||||
@@ -1238,26 +1261,81 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
struct MonsterSplineAnimTierTransition
|
||||
{
|
||||
public int TierTransitionID;
|
||||
public uint StartTime;
|
||||
public uint EndTime;
|
||||
public byte AnimTier;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(TierTransitionID);
|
||||
data .WriteUInt32(StartTime);
|
||||
data.WriteUInt32(EndTime);
|
||||
data.WriteUInt8(AnimTier);
|
||||
}
|
||||
}
|
||||
|
||||
class MonsterSplineUnknown901
|
||||
{
|
||||
public Array<Inner> Data = new Array<Inner>(16);
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
foreach (var unkInner in Data)
|
||||
{
|
||||
data.WriteInt32(unkInner.Unknown_1);
|
||||
data.WriteInt32(unkInner.Unknown_2);
|
||||
data.WriteInt32(unkInner.Unknown_3);
|
||||
data.WriteUInt32(unkInner.Unknown_4);
|
||||
}
|
||||
}
|
||||
|
||||
public struct Inner
|
||||
{
|
||||
public int Unknown_1;
|
||||
public int Unknown_2;
|
||||
public int Unknown_3;
|
||||
public uint Unknown_4;
|
||||
}
|
||||
}
|
||||
|
||||
public class TeleportLocation
|
||||
{
|
||||
public Vector4 Pos;
|
||||
public int Unused901_1 = -1;
|
||||
public int Unused901_2 = -1;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteVector4(Pos);
|
||||
data.WriteInt32(Unused901_1);
|
||||
data.WriteInt32(Unused901_2);
|
||||
}
|
||||
}
|
||||
|
||||
public class MovementSpline
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteUInt8(AnimTier);
|
||||
data.WriteUInt32(TierTransStartTime);
|
||||
data.WriteInt32(Elapsed);
|
||||
data.WriteUInt32(MoveTime);
|
||||
data.WriteUInt32(FadeObjectTime);
|
||||
data.WriteUInt8(Mode);
|
||||
data.WriteUInt8(VehicleExitVoluntary);
|
||||
data.WritePackedGuid(TransportGUID);
|
||||
data.WriteInt8(VehicleSeat);
|
||||
data.WriteBits((byte)Face, 2);
|
||||
data.WriteBits(Points.Count, 16);
|
||||
data.WriteBit(VehicleExitVoluntary);
|
||||
data.WriteBit(Interpolate);
|
||||
data.WriteBits(PackedDeltas.Count, 16);
|
||||
data.WriteBit(SplineFilter.HasValue);
|
||||
data.WriteBit(SpellEffectExtraData.HasValue);
|
||||
data.WriteBit(JumpExtraData.HasValue);
|
||||
data.WriteBit(AnimTierTransition.HasValue);
|
||||
data.WriteBit(Unknown901.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (SplineFilter.HasValue)
|
||||
@@ -1288,24 +1366,31 @@ namespace Game.Networking.Packets
|
||||
|
||||
if (JumpExtraData.HasValue)
|
||||
JumpExtraData.Value.Write(data);
|
||||
|
||||
if (AnimTierTransition.HasValue)
|
||||
AnimTierTransition.Value.Write(data);
|
||||
|
||||
if (Unknown901.HasValue)
|
||||
Unknown901.Value.Write(data);
|
||||
}
|
||||
|
||||
public uint Flags; // Spline flags
|
||||
public MonsterMoveType Face; // Movement direction (see MonsterMoveType enum)
|
||||
public byte AnimTier;
|
||||
public uint TierTransStartTime;
|
||||
public int Elapsed;
|
||||
public uint MoveTime;
|
||||
public uint FadeObjectTime;
|
||||
public List<Vector3> Points = new List<Vector3>(); // Spline path
|
||||
public byte Mode; // Spline mode - actually always 0 in this packet - Catmullrom mode appears only in SMSG_UPDATE_OBJECT. In this packet it is determined by flags
|
||||
public byte VehicleExitVoluntary;
|
||||
public bool VehicleExitVoluntary;
|
||||
public bool Interpolate;
|
||||
public ObjectGuid TransportGUID;
|
||||
public sbyte VehicleSeat = -1;
|
||||
public List<Vector3> PackedDeltas = new List<Vector3>();
|
||||
public Optional<MonsterSplineFilter> SplineFilter;
|
||||
public Optional<MonsterSplineSpellEffectExtraData> SpellEffectExtraData;
|
||||
public Optional<MonsterSplineJumpExtraData> JumpExtraData;
|
||||
public Optional<MonsterSplineAnimTierTransition> AnimTierTransition;
|
||||
public Optional<MonsterSplineUnknown901> Unknown901;
|
||||
public float FaceDirection;
|
||||
public ObjectGuid FaceGUID;
|
||||
public Vector3 FaceSpot;
|
||||
|
||||
@@ -65,27 +65,17 @@ namespace Game.Networking.Packets
|
||||
|
||||
_worldPacket.WriteBits(options.Text.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits(options.Confirm.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits((byte)options.Status, 2);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
options.Treasure.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteString(options.Text);
|
||||
_worldPacket.WriteString(options.Confirm);
|
||||
}
|
||||
|
||||
foreach (ClientGossipText text in GossipText)
|
||||
{
|
||||
_worldPacket.WriteInt32(text.QuestID);
|
||||
_worldPacket.WriteInt32(text.QuestType);
|
||||
_worldPacket.WriteInt32(text.QuestLevel);
|
||||
_worldPacket.WriteInt32(text.QuestMaxScalingLevel);
|
||||
_worldPacket.WriteInt32(text.QuestFlags);
|
||||
_worldPacket.WriteInt32(text.QuestFlagsEx);
|
||||
|
||||
_worldPacket.WriteBit(text.Repeatable);
|
||||
_worldPacket.WriteBits(text.QuestTitle.GetByteCount(), 9);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(text.QuestTitle);
|
||||
}
|
||||
text.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public List<ClientGossipOptions> GossipOptions = new List<ClientGossipOptions>();
|
||||
@@ -297,26 +287,68 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
//Structs
|
||||
public struct TreasureItem
|
||||
{
|
||||
public GossipOptionRewardType Type;
|
||||
public int ID;
|
||||
public int Quantity;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits((byte)Type, 1);
|
||||
data.WriteInt32(ID);
|
||||
data.WriteInt32(Quantity);
|
||||
}
|
||||
}
|
||||
|
||||
public class TreasureLootList
|
||||
{
|
||||
public List<TreasureItem> Items = new List<TreasureItem>();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Items.Count);
|
||||
foreach (TreasureItem treasureItem in Items)
|
||||
treasureItem.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
public struct ClientGossipOptions
|
||||
{
|
||||
public int ClientOption;
|
||||
public byte OptionNPC;
|
||||
public byte OptionFlags;
|
||||
public int OptionCost;
|
||||
public GossipOptionStatus Status;
|
||||
public string Text;
|
||||
public string Confirm;
|
||||
public TreasureLootList Treasure;
|
||||
}
|
||||
|
||||
public class ClientGossipText
|
||||
{
|
||||
public int QuestID;
|
||||
public uint QuestID;
|
||||
public int ContentTuningID;
|
||||
public int QuestType;
|
||||
public int QuestLevel;
|
||||
public int QuestMaxScalingLevel;
|
||||
public bool Repeatable;
|
||||
public string QuestTitle;
|
||||
public int QuestFlags;
|
||||
public int QuestFlagsEx;
|
||||
public uint QuestFlags;
|
||||
public uint QuestFlagsEx;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(QuestID);
|
||||
data.WriteInt32(ContentTuningID);
|
||||
data.WriteInt32(QuestType);
|
||||
data.WriteUInt32(QuestFlags);
|
||||
data.WriteUInt32(QuestFlagsEx);
|
||||
|
||||
data.WriteBit(Repeatable);
|
||||
data.WriteBits(QuestTitle.GetByteCount(), 9);
|
||||
data.FlushBits();
|
||||
|
||||
data.WriteString(QuestTitle);
|
||||
}
|
||||
}
|
||||
|
||||
public class VendorItemPkt
|
||||
@@ -332,6 +364,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(ExtendedCostID);
|
||||
data.WriteInt32(PlayerConditionFailed);
|
||||
Item.Write(data);
|
||||
data.WriteBit(Locked);
|
||||
data.WriteBit(DoNotFilterOnVendor);
|
||||
data.WriteBit(Refundable);
|
||||
data.FlushBits();
|
||||
@@ -346,6 +379,7 @@ namespace Game.Networking.Packets
|
||||
public int StackCount;
|
||||
public int ExtendedCostID;
|
||||
public int PlayerConditionFailed;
|
||||
public bool Locked;
|
||||
public bool DoNotFilterOnVendor;
|
||||
public bool Refundable;
|
||||
}
|
||||
|
||||
@@ -85,9 +85,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
ProposedRoles = proposedRoles;
|
||||
|
||||
InviterVirtualRealmAddress = Global.WorldMgr.GetVirtualRealmAddress();
|
||||
InviterRealmNameActual = Global.WorldMgr.GetRealm().Name;
|
||||
InviterRealmNameNormalized = Global.WorldMgr.GetRealm().NormalizedName;
|
||||
var realm = Global.WorldMgr.GetRealm();
|
||||
InviterRealm = new VirtualRealmInfo(realm.Id.GetAddress(), true, false, realm.Name, realm.NormalizedName);
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
@@ -97,15 +96,10 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(IsXRealm);
|
||||
_worldPacket.WriteBit(MustBeBNetFriend);
|
||||
_worldPacket.WriteBit(AllowMultipleRoles);
|
||||
_worldPacket.WriteBit(QuestSessionActive);
|
||||
_worldPacket.WriteBits(InviterName.GetByteCount(), 6);
|
||||
|
||||
_worldPacket.WriteUInt32(InviterVirtualRealmAddress);
|
||||
_worldPacket.WriteBit(IsLocal);
|
||||
_worldPacket.WriteBit(Unk2);
|
||||
_worldPacket.WriteBits(InviterRealmNameActual.GetByteCount(), 8);
|
||||
_worldPacket.WriteBits(InviterRealmNameNormalized.GetByteCount(), 8);
|
||||
_worldPacket.WriteString(InviterRealmNameActual);
|
||||
_worldPacket.WriteString(InviterRealmNameNormalized);
|
||||
InviterRealm.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WritePackedGuid(InviterGUID);
|
||||
_worldPacket.WritePackedGuid(InviterBNetAccountId);
|
||||
@@ -123,22 +117,19 @@ namespace Game.Networking.Packets
|
||||
public bool MightCRZYou;
|
||||
public bool MustBeBNetFriend;
|
||||
public bool AllowMultipleRoles;
|
||||
public bool Unk2;
|
||||
public bool QuestSessionActive;
|
||||
public ushort Unk1;
|
||||
|
||||
public bool CanAccept;
|
||||
|
||||
// Inviter
|
||||
public VirtualRealmInfo InviterRealm;
|
||||
public ObjectGuid InviterGUID;
|
||||
public ObjectGuid InviterBNetAccountId;
|
||||
public string InviterName;
|
||||
|
||||
// Realm
|
||||
public bool IsXRealm;
|
||||
public bool IsLocal = true;
|
||||
public uint InviterVirtualRealmAddress;
|
||||
public string InviterRealmNameActual;
|
||||
public string InviterRealmNameNormalized;
|
||||
|
||||
// Lfg
|
||||
public uint ProposedRoles;
|
||||
@@ -920,20 +911,20 @@ namespace Game.Networking.Packets
|
||||
|
||||
class PartyMemberAuraStates
|
||||
{
|
||||
public int SpellID;
|
||||
public ushort Flags;
|
||||
public uint ActiveFlags;
|
||||
public List<float> Points = new List<float>();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteUInt8(Flags);
|
||||
data.WriteUInt16(Flags);
|
||||
data.WriteUInt32(ActiveFlags);
|
||||
data.WriteInt32(Points.Count);
|
||||
foreach (float points in Points)
|
||||
data.WriteFloat(points);
|
||||
}
|
||||
|
||||
public int SpellID;
|
||||
public byte Flags;
|
||||
public uint ActiveFlags;
|
||||
public List<float> Points = new List<float>();
|
||||
}
|
||||
|
||||
class PartyMemberPetStats
|
||||
@@ -962,6 +953,20 @@ namespace Game.Networking.Packets
|
||||
public List<PartyMemberAuraStates> Auras = new List<PartyMemberAuraStates>();
|
||||
}
|
||||
|
||||
public struct CTROptions
|
||||
{
|
||||
public uint ContentTuningConditionMask;
|
||||
public int Unused901;
|
||||
public uint ExpansionLevelMask;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ContentTuningConditionMask);
|
||||
data.WriteInt32(Unused901);
|
||||
data.WriteUInt32(ExpansionLevelMask);
|
||||
}
|
||||
}
|
||||
|
||||
class PartyMemberStats
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
@@ -988,6 +993,7 @@ namespace Game.Networking.Packets
|
||||
data.WriteInt32(Auras.Count);
|
||||
|
||||
Phases.Write(data);
|
||||
ChromieTime.Write(data);
|
||||
|
||||
foreach (PartyMemberAuraStates aura in Auras)
|
||||
aura.Write(data);
|
||||
@@ -1025,6 +1031,7 @@ namespace Game.Networking.Packets
|
||||
public ushort WmoGroupID;
|
||||
public uint WmoDoodadPlacementID;
|
||||
public sbyte[] PartyType = new sbyte[2];
|
||||
public CTROptions ChromieTime;
|
||||
}
|
||||
|
||||
struct PartyPlayerInfo
|
||||
|
||||
@@ -132,7 +132,6 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(Stats.RequiredExpansion);
|
||||
_worldPacket.WriteUInt32(Stats.VignetteID);
|
||||
_worldPacket.WriteInt32(Stats.Class);
|
||||
_worldPacket.WriteFloat(Stats.FadeRegionRadius);
|
||||
_worldPacket.WriteInt32(Stats.WidgetSetID);
|
||||
_worldPacket.WriteInt32(Stats.WidgetSetUnitConditionID);
|
||||
|
||||
@@ -722,7 +721,6 @@ namespace Game.Networking.Packets
|
||||
public uint RequiredExpansion;
|
||||
public uint VignetteID;
|
||||
public int Class;
|
||||
public float FadeRegionRadius;
|
||||
public int WidgetSetID;
|
||||
public int WidgetSetUnitConditionID;
|
||||
public uint[] Flags = new uint[2];
|
||||
|
||||
@@ -108,7 +108,6 @@ namespace Game.Networking.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(QuestID);
|
||||
|
||||
_worldPacket.WriteBit(Allow);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -116,11 +115,8 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt32(Info.QuestID);
|
||||
_worldPacket.WriteInt32(Info.QuestType);
|
||||
_worldPacket.WriteInt32(Info.QuestLevel);
|
||||
_worldPacket.WriteInt32(Info.QuestScalingFactionGroup);
|
||||
_worldPacket.WriteInt32(Info.QuestMaxScalingLevel);
|
||||
_worldPacket.WriteUInt32(Info.QuestPackageID);
|
||||
_worldPacket.WriteInt32(Info.QuestMinLevel);
|
||||
_worldPacket.WriteInt32(Info.ContentTuningID);
|
||||
_worldPacket.WriteInt32(Info.QuestSortID);
|
||||
_worldPacket.WriteUInt32(Info.QuestInfoID);
|
||||
_worldPacket.WriteUInt32(Info.SuggestedGroupNum);
|
||||
@@ -131,10 +127,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(Info.RewardMoneyDifficulty);
|
||||
_worldPacket.WriteFloat(Info.RewardMoneyMultiplier);
|
||||
_worldPacket.WriteUInt32(Info.RewardBonusMoney);
|
||||
|
||||
foreach (uint id in Info.RewardDisplaySpell)
|
||||
_worldPacket.WriteUInt32(id);
|
||||
|
||||
_worldPacket.WriteInt32(Info.RewardDisplaySpell.Count);
|
||||
_worldPacket.WriteUInt32(Info.RewardSpell);
|
||||
_worldPacket.WriteUInt32(Info.RewardHonor);
|
||||
_worldPacket.WriteFloat(Info.RewardKillHonor);
|
||||
@@ -204,6 +197,9 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(Info.ManagedWorldStateID);
|
||||
_worldPacket.WriteInt32(Info.QuestSessionBonus);
|
||||
|
||||
foreach (QuestCompleteDisplaySpell rewardDisplaySpell in Info.RewardDisplaySpell)
|
||||
rewardDisplaySpell.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteBits(Info.LogTitle.GetByteCount(), 9);
|
||||
_worldPacket.WriteBits(Info.LogDescription.GetByteCount(), 12);
|
||||
_worldPacket.WriteBits(Info.QuestDescription.GetByteCount(), 12);
|
||||
@@ -213,6 +209,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(Info.PortraitTurnInText.GetByteCount(), 10);
|
||||
_worldPacket.WriteBits(Info.PortraitTurnInName.GetByteCount(), 8);
|
||||
_worldPacket.WriteBits(Info.QuestCompletionLog.GetByteCount(), 11);
|
||||
_worldPacket.WriteBit(Info.ReadyForTranslation);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
foreach (QuestObjective questObjective in Info.Objectives)
|
||||
@@ -358,7 +355,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public ObjectGuid QuestGiverGUID;
|
||||
public uint QuestID;
|
||||
public uint ItemChoiceID;
|
||||
public QuestChoiceItem Choice;
|
||||
}
|
||||
|
||||
public class QuestGiverQuestComplete : ServerPacket
|
||||
@@ -627,21 +624,8 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(Greeting.GetByteCount(), 11);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
foreach (GossipText gossip in QuestDataText)
|
||||
{
|
||||
_worldPacket.WriteUInt32(gossip.QuestID);
|
||||
_worldPacket.WriteUInt32(gossip.QuestType);
|
||||
_worldPacket.WriteUInt32(gossip.QuestLevel);
|
||||
_worldPacket.WriteUInt32(gossip.QuestMaxScalingLevel);
|
||||
_worldPacket.WriteUInt32(gossip.QuestFlags);
|
||||
_worldPacket.WriteUInt32(gossip.QuestFlagsEx);
|
||||
|
||||
_worldPacket.WriteBit(gossip.Repeatable);
|
||||
_worldPacket.WriteBits(gossip.QuestTitle.GetByteCount(), 9);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteString(gossip.QuestTitle);
|
||||
}
|
||||
foreach (ClientGossipText gossip in QuestDataText)
|
||||
gossip.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteString(Greeting);
|
||||
}
|
||||
@@ -649,7 +633,7 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid QuestGiverGUID;
|
||||
public uint GreetEmoteDelay;
|
||||
public uint GreetEmoteType;
|
||||
public List<GossipText> QuestDataText = new List<GossipText>();
|
||||
public List<ClientGossipText> QuestDataText = new List<ClientGossipText>();
|
||||
public string Greeting = "";
|
||||
}
|
||||
|
||||
@@ -901,6 +885,18 @@ namespace Game.Networking.Packets
|
||||
public uint DisplayID;
|
||||
}
|
||||
|
||||
public struct QuestCompleteDisplaySpell
|
||||
{
|
||||
public int SpellID;
|
||||
public int PlayerConditionID;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteInt32(PlayerConditionID);
|
||||
}
|
||||
}
|
||||
|
||||
public class QuestInfo
|
||||
{
|
||||
public QuestInfo()
|
||||
@@ -918,11 +914,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
public uint QuestID;
|
||||
public int QuestType; // Accepted values: 0, 1 or 2. 0 == IsAutoComplete() (skip objectives/details)
|
||||
public int QuestLevel; // may be -1, static data, in other cases must be used dynamic level: Player.GetQuestLevel (0 is not known, but assuming this is no longer valid for quest intended for client)
|
||||
public int QuestScalingFactionGroup;
|
||||
public int QuestMaxScalingLevel = 255;
|
||||
public int ContentTuningID;
|
||||
public uint QuestPackageID;
|
||||
public int QuestMinLevel;
|
||||
public int QuestSortID; // zone or sort to display in quest log
|
||||
public uint QuestInfoID;
|
||||
public uint SuggestedGroupNum;
|
||||
@@ -933,7 +926,7 @@ namespace Game.Networking.Packets
|
||||
public uint RewardMoneyDifficulty;
|
||||
public float RewardMoneyMultiplier = 1.0f;
|
||||
public uint RewardBonusMoney;
|
||||
public uint[] RewardDisplaySpell = new uint[SharedConst.QuestRewardDisplaySpellCount]; // reward spell, this spell will be displayed (icon)
|
||||
public List<QuestCompleteDisplaySpell> RewardDisplaySpell = new List<QuestCompleteDisplaySpell>(); // reward spell, this spell will be displayed (icon)
|
||||
public uint RewardSpell;
|
||||
public uint RewardHonor;
|
||||
public float RewardKillHonor;
|
||||
@@ -986,16 +979,59 @@ namespace Game.Networking.Packets
|
||||
public int[] RewardFactionCapIn = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public uint[] RewardCurrencyID = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public uint[] RewardCurrencyQty = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public bool ReadyForTranslation;
|
||||
}
|
||||
|
||||
public struct QuestChoiceItem
|
||||
{
|
||||
public LootItemType LootItemType;
|
||||
public ItemInstance Item;
|
||||
public uint Quantity;
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
data.ResetBitPos();
|
||||
LootItemType = (LootItemType)data.ReadBits<byte>(2);
|
||||
Item = new ItemInstance();
|
||||
Item.Read(data);
|
||||
Quantity = data.ReadUInt32();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBits((byte)LootItemType, 2);
|
||||
Item.Write(data);
|
||||
data.WriteUInt32(Quantity);
|
||||
}
|
||||
}
|
||||
|
||||
public class QuestRewards
|
||||
{
|
||||
public uint ChoiceItemCount;
|
||||
public uint ItemCount;
|
||||
public uint Money;
|
||||
public uint XP;
|
||||
public uint ArtifactXP;
|
||||
public uint ArtifactCategoryID;
|
||||
public uint Honor;
|
||||
public uint Title;
|
||||
public uint FactionFlags;
|
||||
public Array<int> SpellCompletionDisplayID = new Array<int>(SharedConst.QuestRewardDisplaySpellCount);
|
||||
public uint SpellCompletionID;
|
||||
public uint SkillLineID;
|
||||
public uint NumSkillUps;
|
||||
public uint TreasurePickerID;
|
||||
public Array<QuestChoiceItem> ChoiceItems = new Array<QuestChoiceItem>(SharedConst.QuestRewardChoicesCount);
|
||||
public Array<uint> ItemID = new Array<uint>(SharedConst.QuestRewardItemCount);
|
||||
public Array<uint> ItemQty = new Array<uint>(SharedConst.QuestRewardItemCount);
|
||||
public Array<uint> FactionID = new Array<uint>(SharedConst.QuestRewardReputationsCount);
|
||||
public Array<int> FactionValue = new Array<int>(SharedConst.QuestRewardReputationsCount);
|
||||
public Array<int> FactionOverride = new Array<int>(SharedConst.QuestRewardReputationsCount);
|
||||
public Array<int> FactionCapIn = new Array<int>(SharedConst.QuestRewardReputationsCount);
|
||||
public Array<uint> CurrencyID = new Array<uint>(SharedConst.QuestRewardCurrencyCount);
|
||||
public Array<uint> CurrencyQty = new Array<uint>(SharedConst.QuestRewardCurrencyCount);
|
||||
public bool IsBoostSpell;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(ChoiceItemCount);
|
||||
@@ -1038,40 +1074,12 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(NumSkillUps);
|
||||
data.WriteUInt32(TreasurePickerID);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||
{
|
||||
ChoiceItems[i].Item.Write(data);
|
||||
data.WriteUInt32(ChoiceItems[i].Quantity);
|
||||
}
|
||||
foreach (var choice in ChoiceItems)
|
||||
choice.Write(data);
|
||||
|
||||
data.WriteBit(IsBoostSpell);
|
||||
data.FlushBits();
|
||||
}
|
||||
|
||||
public uint ChoiceItemCount;
|
||||
public uint ItemCount;
|
||||
public uint Money;
|
||||
public uint XP;
|
||||
public uint ArtifactXP;
|
||||
public uint ArtifactCategoryID;
|
||||
public uint Honor;
|
||||
public uint Title;
|
||||
public uint FactionFlags;
|
||||
public int[] SpellCompletionDisplayID = new int[SharedConst.QuestRewardDisplaySpellCount];
|
||||
public uint SpellCompletionID;
|
||||
public uint SkillLineID;
|
||||
public uint NumSkillUps;
|
||||
public uint TreasurePickerID;
|
||||
public QuestChoiceItem[] ChoiceItems = new QuestChoiceItem[SharedConst.QuestRewardChoicesCount];
|
||||
public uint[] ItemID = new uint[SharedConst.QuestRewardItemCount];
|
||||
public uint[] ItemQty = new uint[SharedConst.QuestRewardItemCount];
|
||||
public uint[] FactionID = new uint[SharedConst.QuestRewardReputationsCount];
|
||||
public int[] FactionValue = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public int[] FactionOverride = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public int[] FactionCapIn = new int[SharedConst.QuestRewardReputationsCount];
|
||||
public uint[] CurrencyID = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public uint[] CurrencyQty = new uint[SharedConst.QuestRewardCurrencyCount];
|
||||
public bool IsBoostSpell;
|
||||
}
|
||||
|
||||
public struct QuestDescEmote
|
||||
@@ -1105,6 +1113,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
data.WriteBit(AutoLaunched);
|
||||
data.WriteBit(false); // Unused
|
||||
data.FlushBits();
|
||||
|
||||
Rewards.Write(data);
|
||||
@@ -1154,30 +1163,6 @@ namespace Game.Networking.Packets
|
||||
public int Amount;
|
||||
}
|
||||
|
||||
public struct GossipText
|
||||
{
|
||||
public GossipText(uint questID, uint questType, uint questLevel, uint questMaxScalingLevel, uint questFlags, uint questFlagsEx, bool repeatable, string questTitle)
|
||||
{
|
||||
QuestID = questID;
|
||||
QuestType = questType;
|
||||
QuestLevel = questLevel;
|
||||
QuestMaxScalingLevel = questMaxScalingLevel;
|
||||
QuestFlags = questFlags;
|
||||
QuestFlagsEx = questFlagsEx;
|
||||
Repeatable = repeatable;
|
||||
QuestTitle = questTitle;
|
||||
}
|
||||
|
||||
public uint QuestID;
|
||||
public uint QuestType;
|
||||
public uint QuestLevel;
|
||||
public uint QuestMaxScalingLevel;
|
||||
public uint QuestFlags;
|
||||
public uint QuestFlagsEx;
|
||||
public bool Repeatable;
|
||||
public string QuestTitle;
|
||||
}
|
||||
|
||||
struct WorldQuestUpdateInfo
|
||||
{
|
||||
public WorldQuestUpdateInfo(int lastUpdate, uint questID, uint timer, int variableID, int value)
|
||||
@@ -1255,17 +1240,60 @@ namespace Game.Networking.Packets
|
||||
public List<PlayerChoiceResponseRewardEntry> ItemChoices = new List<PlayerChoiceResponseRewardEntry>();
|
||||
}
|
||||
|
||||
struct PlayerChoiceResponseMawPower
|
||||
{
|
||||
public int Unused901_1;
|
||||
public int TypeArtFileID;
|
||||
public int Rarity;
|
||||
public uint RarityColor;
|
||||
public int Unused901_2;
|
||||
public int SpellID;
|
||||
public int MaxStacks;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Unused901_1);
|
||||
data.WriteInt32(TypeArtFileID);
|
||||
data.WriteInt32(Rarity);
|
||||
data.WriteUInt32(RarityColor);
|
||||
data.WriteInt32(Unused901_2);
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteInt32(MaxStacks);
|
||||
}
|
||||
}
|
||||
|
||||
class PlayerChoiceResponse
|
||||
{
|
||||
public int ResponseID;
|
||||
public ushort ResponseIdentifier;
|
||||
public int ChoiceArtFileID;
|
||||
public int Flags;
|
||||
public uint WidgetSetID;
|
||||
public uint UiTextureAtlasElementID;
|
||||
public uint SoundKitID;
|
||||
public byte GroupID;
|
||||
public int UiTextureKitID;
|
||||
public string Answer;
|
||||
public string Header;
|
||||
public string SubHeader;
|
||||
public string ButtonTooltip;
|
||||
public string Description;
|
||||
public string Confirmation;
|
||||
public Optional<PlayerChoiceResponseReward> Reward;
|
||||
public Optional<uint> RewardQuestID;
|
||||
public Optional<PlayerChoiceResponseMawPower> MawPower;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(ResponseID);
|
||||
data.WriteUInt16(ResponseIdentifier);
|
||||
data.WriteInt32(ChoiceArtFileID);
|
||||
data.WriteInt32(Flags);
|
||||
data.WriteUInt32(WidgetSetID);
|
||||
data.WriteUInt32(UiTextureAtlasElementID);
|
||||
data.WriteUInt32(SoundKitID);
|
||||
data.WriteUInt8(GroupID);
|
||||
data.WriteInt32(UiTextureKitID);
|
||||
|
||||
data.WriteBits(Answer.GetByteCount(), 9);
|
||||
data.WriteBits(Header.GetByteCount(), 9);
|
||||
@@ -1276,6 +1304,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
data.WriteBit(RewardQuestID.HasValue);
|
||||
data.WriteBit(Reward.HasValue);
|
||||
data.WriteBit(MawPower.HasValue);
|
||||
data.FlushBits();
|
||||
|
||||
if (Reward.HasValue)
|
||||
@@ -1290,22 +1319,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
if (RewardQuestID.HasValue)
|
||||
data.WriteUInt32(RewardQuestID.Value);
|
||||
}
|
||||
|
||||
public int ResponseID;
|
||||
public int ChoiceArtFileID;
|
||||
public int Flags;
|
||||
public uint WidgetSetID;
|
||||
public uint UiTextureAtlasElementID;
|
||||
public uint SoundKitID;
|
||||
public byte GroupID;
|
||||
public string Answer;
|
||||
public string Header;
|
||||
public string SubHeader;
|
||||
public string ButtonTooltip;
|
||||
public string Description;
|
||||
public string Confirmation;
|
||||
public Optional<PlayerChoiceResponseReward> Reward;
|
||||
public Optional<uint> RewardQuestID;
|
||||
if (MawPower.HasValue)
|
||||
MawPower.Value.Write(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
public class InitializeFactions : ServerPacket
|
||||
{
|
||||
const ushort FactionCount = 350;
|
||||
const ushort FactionCount = 400;
|
||||
|
||||
public InitializeFactions() : base(ServerOpcodes.InitializeFactions, ConnectionType.Instance) { }
|
||||
|
||||
|
||||
@@ -147,12 +147,14 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(scenarioPOI.Flags);
|
||||
_worldPacket.WriteInt32(scenarioPOI.WorldEffectID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.PlayerConditionID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.NavigationPlayerConditionID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.Points.Count);
|
||||
|
||||
foreach (var scenarioPOIBlobPoint in scenarioPOI.Points)
|
||||
{
|
||||
_worldPacket.WriteInt32((int)scenarioPOIBlobPoint.X);
|
||||
_worldPacket.WriteInt32((int)scenarioPOIBlobPoint.Y);
|
||||
_worldPacket.WriteInt32((int)scenarioPOIBlobPoint.Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBits(Contacts.Count, 8);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
Contacts.ForEach(p => p.Write(_worldPacket));
|
||||
foreach (ContactInfo contact in Contacts)
|
||||
contact.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public List<ContactInfo> Contacts;
|
||||
|
||||
@@ -332,6 +332,7 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WriteInt32(SpellID.Count);
|
||||
_worldPacket.WriteInt32(FavoriteSpellID.Count);
|
||||
_worldPacket.WriteUInt32(SpecializationID);
|
||||
|
||||
foreach (uint spell in SpellID)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
@@ -345,6 +346,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public List<uint> SpellID = new List<uint>();
|
||||
public List<int> FavoriteSpellID = new List<int>();
|
||||
public uint SpecializationID;
|
||||
public bool SuppressMessaging;
|
||||
}
|
||||
|
||||
@@ -357,13 +359,15 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WritePackedGuid(CasterUnit);
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(SpellXSpellVisualID);
|
||||
|
||||
Visual.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteUInt16(Reason);
|
||||
}
|
||||
|
||||
public ObjectGuid CasterUnit;
|
||||
public uint SpellID;
|
||||
public uint SpellXSpellVisualID;
|
||||
public SpellCastVisual Visual;
|
||||
public ushort Reason;
|
||||
public ObjectGuid CastID;
|
||||
}
|
||||
@@ -377,49 +381,51 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WritePackedGuid(CasterUnit);
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(SpellXSpellVisualID);
|
||||
|
||||
Visual.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteUInt16(Reason);
|
||||
}
|
||||
|
||||
public ObjectGuid CasterUnit;
|
||||
public uint SpellID;
|
||||
public uint SpellXSpellVisualID;
|
||||
public SpellCastVisual Visual;
|
||||
public ushort Reason;
|
||||
public ObjectGuid CastID;
|
||||
}
|
||||
|
||||
class CastFailedBase : ServerPacket
|
||||
class CastFailed : ServerPacket
|
||||
{
|
||||
public CastFailedBase(ServerOpcodes serverOpcodes, ConnectionType connectionType) : base(serverOpcodes, connectionType) { }
|
||||
|
||||
public override void Write() { throw new NotImplementedException(); }
|
||||
|
||||
public ObjectGuid CastID;
|
||||
public int SpellID;
|
||||
public SpellCastVisual Visual;
|
||||
public SpellCastResult Reason;
|
||||
public int FailedArg1 = -1;
|
||||
public int FailedArg2 = -1;
|
||||
}
|
||||
|
||||
class CastFailed : CastFailedBase
|
||||
{
|
||||
public CastFailed() : base(ServerOpcodes.CastFailed, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteInt32(SpellXSpellVisualID);
|
||||
|
||||
Visual.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteInt32((int)Reason);
|
||||
_worldPacket.WriteInt32(FailedArg1);
|
||||
_worldPacket.WriteInt32(FailedArg2);
|
||||
}
|
||||
|
||||
public int SpellXSpellVisualID;
|
||||
}
|
||||
|
||||
class PetCastFailed : CastFailedBase
|
||||
class PetCastFailed : ServerPacket
|
||||
{
|
||||
public ObjectGuid CastID;
|
||||
public int SpellID;
|
||||
public SpellCastResult Reason;
|
||||
public int FailedArg1 = -1;
|
||||
public int FailedArg2 = -1;
|
||||
|
||||
public PetCastFailed() : base(ServerOpcodes.PetCastFailed, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
@@ -673,10 +679,13 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Source);
|
||||
_worldPacket.WriteUInt32(SpellVisualKitID);
|
||||
_worldPacket.WriteBit(MountedVisual);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public ObjectGuid Source;
|
||||
public uint SpellVisualKitID;
|
||||
public bool MountedVisual;
|
||||
}
|
||||
|
||||
class PlayOrphanSpellVisual : ServerPacket
|
||||
@@ -753,12 +762,15 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(KitRecID);
|
||||
_worldPacket.WriteUInt32(KitType);
|
||||
_worldPacket.WriteUInt32(Duration);
|
||||
_worldPacket.WriteBit(MountedVisual);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public ObjectGuid Unit;
|
||||
public uint KitRecID;
|
||||
public uint KitType;
|
||||
public uint Duration;
|
||||
public bool MountedVisual;
|
||||
}
|
||||
|
||||
public class CancelCast : ClientPacket
|
||||
@@ -797,7 +809,9 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(CasterGUID);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteInt32(SpellXSpellVisualID);
|
||||
|
||||
Visual.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteUInt32(ChannelDuration);
|
||||
_worldPacket.WriteBit(InterruptImmunities.HasValue);
|
||||
_worldPacket.WriteBit(HealPrediction.HasValue);
|
||||
@@ -811,7 +825,7 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
|
||||
public int SpellID;
|
||||
public int SpellXSpellVisualID;
|
||||
public SpellCastVisual Visual;
|
||||
public Optional<SpellChannelStartInterruptImmunities> InterruptImmunities;
|
||||
public ObjectGuid CasterGUID;
|
||||
public Optional<SpellTargetedHealPrediction> HealPrediction;
|
||||
@@ -905,35 +919,28 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UnitGUID);
|
||||
_worldPacket.WriteInt32(DisplayID);
|
||||
_worldPacket.WriteInt32(SpellVisualKitID);
|
||||
_worldPacket.WriteUInt8(RaceID);
|
||||
_worldPacket.WriteUInt8(Gender);
|
||||
_worldPacket.WriteUInt8(ClassID);
|
||||
_worldPacket.WriteUInt8(SkinColor);
|
||||
_worldPacket.WriteUInt8(FaceVariation);
|
||||
_worldPacket.WriteUInt8(HairVariation);
|
||||
_worldPacket.WriteUInt8(HairColor);
|
||||
_worldPacket.WriteUInt8(BeardVariation);
|
||||
|
||||
CustomDisplay.ForEach(id => _worldPacket.WriteUInt8(id));
|
||||
|
||||
_worldPacket.WriteInt32(Customizations.Count);
|
||||
_worldPacket.WritePackedGuid(GuildGUID);
|
||||
_worldPacket.WriteInt32(ItemDisplayID.Count);
|
||||
|
||||
foreach (ChrCustomizationChoice customization in Customizations)
|
||||
customization.Write(_worldPacket);
|
||||
|
||||
foreach (var itemDisplayId in ItemDisplayID)
|
||||
_worldPacket.WriteInt32(itemDisplayId);
|
||||
}
|
||||
|
||||
public ObjectGuid UnitGUID;
|
||||
public int DisplayID;
|
||||
public int SpellVisualKitID;
|
||||
public byte RaceID;
|
||||
public byte Gender;
|
||||
public byte ClassID;
|
||||
public byte SkinColor;
|
||||
public byte FaceVariation;
|
||||
public byte HairVariation;
|
||||
public byte HairColor;
|
||||
public byte BeardVariation;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
public List<ChrCustomizationChoice> Customizations = new List<ChrCustomizationChoice>();
|
||||
public ObjectGuid GuildGUID;
|
||||
|
||||
public List<int> ItemDisplayID = new List<int>();
|
||||
@@ -947,10 +954,12 @@ namespace Game.Networking.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UnitGUID);
|
||||
_worldPacket.WriteInt32(DisplayID);
|
||||
_worldPacket.WriteInt32(SpellVisualKitID);
|
||||
}
|
||||
|
||||
public ObjectGuid UnitGUID;
|
||||
public int DisplayID;
|
||||
public int SpellVisualKitID;
|
||||
}
|
||||
|
||||
class SpellClick : ClientPacket
|
||||
@@ -1300,9 +1309,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteFloat(PlayerItemLevel);
|
||||
data.WriteFloat(TargetItemLevel);
|
||||
data.WriteInt16(PlayerLevelDelta);
|
||||
data.WriteUInt16(PlayerItemLevel);
|
||||
data.WriteUInt16(TargetItemLevel);
|
||||
data.WriteUInt16(ScalingHealthItemLevelCurveID);
|
||||
data.WriteUInt8(TargetLevel);
|
||||
data.WriteUInt8(Expansion);
|
||||
@@ -1316,8 +1325,8 @@ namespace Game.Networking.Packets
|
||||
|
||||
public ContentTuningType TuningType;
|
||||
public short PlayerLevelDelta;
|
||||
public ushort PlayerItemLevel;
|
||||
public ushort TargetItemLevel;
|
||||
public float PlayerItemLevel;
|
||||
public float TargetItemLevel;
|
||||
public ushort ScalingHealthItemLevelCurveID;
|
||||
public byte TargetLevel;
|
||||
public byte Expansion;
|
||||
@@ -1335,14 +1344,34 @@ namespace Game.Networking.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public struct SpellCastVisual
|
||||
{
|
||||
public uint SpellXSpellVisualID;
|
||||
public int ScriptVisualID;
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
SpellXSpellVisualID = data.ReadUInt32();
|
||||
ScriptVisualID = data.ReadInt32();
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(SpellXSpellVisualID);
|
||||
data.WriteInt32(ScriptVisualID);
|
||||
}
|
||||
}
|
||||
|
||||
public class AuraDataInfo
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WritePackedGuid(CastID);
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteInt32(SpellXSpellVisualID);
|
||||
data.WriteUInt8((byte)Flags);
|
||||
|
||||
Visual.Write(data);
|
||||
|
||||
data.WriteUInt16((ushort)Flags);
|
||||
data.WriteUInt32(ActiveFlags);
|
||||
data.WriteUInt16(CastLevel);
|
||||
data.WriteUInt8(Applications);
|
||||
@@ -1379,7 +1408,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public ObjectGuid CastID;
|
||||
public int SpellID;
|
||||
public int SpellXSpellVisualID;
|
||||
public SpellCastVisual Visual;
|
||||
public AuraFlags Flags;
|
||||
public uint ActiveFlags;
|
||||
public ushort CastLevel = 1;
|
||||
@@ -1519,17 +1548,68 @@ namespace Game.Networking.Packets
|
||||
public uint Quantity;
|
||||
}
|
||||
|
||||
public struct SpellOptionalReagent
|
||||
{
|
||||
public int ItemID;
|
||||
public int Slot;
|
||||
public int Count;
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
ItemID = data.ReadInt32();
|
||||
Slot = data.ReadInt32();
|
||||
Count = data.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public struct SpellExtraCurrencyCost
|
||||
{
|
||||
public int CurrencyID;
|
||||
public int Count;
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
CurrencyID = data.ReadInt32();
|
||||
Count = data.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public class SpellCastRequest
|
||||
{
|
||||
public ObjectGuid CastID;
|
||||
public uint SpellID;
|
||||
public SpellCastVisual Visual;
|
||||
public uint SendCastFlags;
|
||||
public SpellTargetData Target = new SpellTargetData();
|
||||
public MissileTrajectoryRequest MissileTrajectory;
|
||||
public Optional<MovementInfo> MoveUpdate;
|
||||
public List<SpellWeight> Weight = new List<SpellWeight>();
|
||||
public Array<SpellOptionalReagent> OptionalReagents = new Array<SpellOptionalReagent>(3);
|
||||
public Array<SpellExtraCurrencyCost> OptionalCurrencies = new Array<SpellExtraCurrencyCost>(5 /*MAX_ITEM_EXT_COST_CURRENCIES*/);
|
||||
public ObjectGuid CraftingNPC;
|
||||
public uint[] Misc = new uint[2];
|
||||
|
||||
public void Read(WorldPacket data)
|
||||
{
|
||||
CastID = data.ReadPackedGuid();
|
||||
Misc[0] = data.ReadUInt32();
|
||||
Misc[1] = data.ReadUInt32();
|
||||
SpellID = data.ReadUInt32();
|
||||
SpellXSpellVisualID = data.ReadUInt32();
|
||||
|
||||
Visual.Read(data);
|
||||
|
||||
MissileTrajectory.Read(data);
|
||||
CraftingNPC = data.ReadPackedGuid();
|
||||
|
||||
var optionalReagents = data.ReadUInt32();
|
||||
var optionalCurrencies = data.ReadUInt32();
|
||||
|
||||
for (var i = 0; i < optionalReagents; ++i)
|
||||
OptionalReagents[i].Read(data);
|
||||
|
||||
for (var i = 0; i < optionalCurrencies; ++i)
|
||||
OptionalCurrencies[i].Read(data);
|
||||
|
||||
SendCastFlags = data.ReadBits<uint>(5);
|
||||
MoveUpdate.HasValue = data.HasBit();
|
||||
var weightCount = data.ReadBits<uint>(2);
|
||||
@@ -1548,17 +1628,6 @@ namespace Game.Networking.Packets
|
||||
Weight.Add(weight);
|
||||
}
|
||||
}
|
||||
|
||||
public ObjectGuid CastID;
|
||||
public uint SpellID;
|
||||
public uint SpellXSpellVisualID;
|
||||
public uint SendCastFlags;
|
||||
public SpellTargetData Target = new SpellTargetData();
|
||||
public MissileTrajectoryRequest MissileTrajectory;
|
||||
public Optional<MovementInfo> MoveUpdate;
|
||||
public List<SpellWeight> Weight = new List<SpellWeight>();
|
||||
public ObjectGuid CraftingNPC;
|
||||
public uint[] Misc = new uint[2];
|
||||
}
|
||||
|
||||
public struct SpellHitStatus
|
||||
@@ -1685,7 +1754,9 @@ namespace Game.Networking.Packets
|
||||
data.WritePackedGuid(CastID);
|
||||
data.WritePackedGuid(OriginalCastID);
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteUInt32(SpellXSpellVisualID);
|
||||
|
||||
Visual.Read(data);
|
||||
|
||||
data.WriteUInt32((uint)CastFlags);
|
||||
data.WriteUInt32((uint)CastFlagsEx);
|
||||
data.WriteUInt32(CastTime);
|
||||
@@ -1736,7 +1807,7 @@ namespace Game.Networking.Packets
|
||||
public ObjectGuid CastID;
|
||||
public ObjectGuid OriginalCastID;
|
||||
public int SpellID;
|
||||
public uint SpellXSpellVisualID;
|
||||
public SpellCastVisual Visual;
|
||||
public SpellCastFlags CastFlags;
|
||||
public SpellCastFlagsEx CastFlagsEx;
|
||||
public uint CastTime;
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(TwitterPostThrottleCooldown);
|
||||
|
||||
_worldPacket.WriteUInt32(TokenPollTimeSeconds);
|
||||
_worldPacket.WriteUInt32(KioskSessionMinutes);
|
||||
_worldPacket.WriteInt64(TokenBalanceAmount);
|
||||
|
||||
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
|
||||
@@ -71,7 +72,6 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(RestrictedAccount);
|
||||
_worldPacket.WriteBit(CommerceSystemEnabled);
|
||||
_worldPacket.WriteBit(TutorialsEnabled);
|
||||
_worldPacket.WriteBit(NPETutorialsEnabled);
|
||||
_worldPacket.WriteBit(TwitterEnabled);
|
||||
_worldPacket.WriteBit(Unk67);
|
||||
_worldPacket.WriteBit(WillKickFromWorld);
|
||||
@@ -88,6 +88,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(QuestSessionEnabled);
|
||||
_worldPacket.WriteBit(IsMuted);
|
||||
_worldPacket.WriteBit(ClubFinderEnabled);
|
||||
_worldPacket.WriteBit(Unknown901CheckoutRelated);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
{
|
||||
@@ -123,22 +124,12 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteInt32(SessionAlert.Value.DisplayTime);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBit(VoiceChatManagerSettings.IsSquelched);
|
||||
_worldPacket.WritePackedGuid(VoiceChatManagerSettings.BnetAccountGuid);
|
||||
_worldPacket.WritePackedGuid(VoiceChatManagerSettings.GuildGuid);
|
||||
_worldPacket.WriteBit(Squelch.IsSquelched);
|
||||
_worldPacket.WritePackedGuid(Squelch.BnetAccountGuid);
|
||||
_worldPacket.WritePackedGuid(Squelch.GuildGuid);
|
||||
|
||||
if (EuropaTicketSystemStatus.HasValue)
|
||||
{
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.Value.TicketsEnabled);
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.Value.BugsEnabled);
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.Value.ComplaintsEnabled);
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.Value.SuggestionsEnabled);
|
||||
|
||||
_worldPacket.WriteUInt32(EuropaTicketSystemStatus.Value.ThrottleState.MaxTries);
|
||||
_worldPacket.WriteUInt32(EuropaTicketSystemStatus.Value.ThrottleState.PerMilliseconds);
|
||||
_worldPacket.WriteUInt32(EuropaTicketSystemStatus.Value.ThrottleState.TryCount);
|
||||
_worldPacket.WriteUInt32(EuropaTicketSystemStatus.Value.ThrottleState.LastResetTimeBeforeNow);
|
||||
}
|
||||
EuropaTicketSystemStatus.Value.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public bool VoiceEnabled;
|
||||
@@ -160,6 +151,7 @@ namespace Game.Networking.Packets
|
||||
public uint BpayStoreProductDeliveryDelay;
|
||||
public uint ClubsPresenceUpdateTimer;
|
||||
public uint HiddenUIClubsPresenceUpdateTimer; // Timer for updating club presence when communities ui frame is hidden
|
||||
public uint KioskSessionMinutes;
|
||||
public bool ItemRestorationButtonEnabled;
|
||||
public bool CharUndeleteEnabled; // Implemented
|
||||
public bool BpayStoreDisabledByParentalControls;
|
||||
@@ -183,29 +175,12 @@ namespace Game.Networking.Packets
|
||||
public bool QuestSessionEnabled;
|
||||
public bool IsMuted;
|
||||
public bool ClubFinderEnabled;
|
||||
public bool Unknown901CheckoutRelated;
|
||||
|
||||
public SocialQueueConfig QuickJoinConfig;
|
||||
public VoiceChatProxySettings VoiceChatManagerSettings;
|
||||
public SquelchInfo Squelch;
|
||||
public RafSystemFeatureInfo RAFSystem;
|
||||
|
||||
public struct SavedThrottleObjectState
|
||||
{
|
||||
public uint MaxTries;
|
||||
public uint PerMilliseconds;
|
||||
public uint TryCount;
|
||||
public uint LastResetTimeBeforeNow;
|
||||
}
|
||||
|
||||
public struct EuropaTicketConfig
|
||||
{
|
||||
public bool TicketsEnabled;
|
||||
public bool BugsEnabled;
|
||||
public bool ComplaintsEnabled;
|
||||
public bool SuggestionsEnabled;
|
||||
|
||||
public SavedThrottleObjectState ThrottleState;
|
||||
}
|
||||
|
||||
public struct SessionAlertConfig
|
||||
{
|
||||
public int Delay;
|
||||
@@ -240,7 +215,7 @@ namespace Game.Networking.Packets
|
||||
public float ThrottleDfBestPriority;
|
||||
}
|
||||
|
||||
public struct VoiceChatProxySettings
|
||||
public struct SquelchInfo
|
||||
{
|
||||
public bool IsSquelched;
|
||||
public ObjectGuid BnetAccountGuid;
|
||||
@@ -279,16 +254,28 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteBit(LiveRegionCharacterListEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionCharacterCopyEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionAccountCopyEnabled);
|
||||
_worldPacket.WriteBit(LiveRegionKeyBindingsCopyEnabled);
|
||||
_worldPacket.WriteBit(Unknown901CheckoutRelated);
|
||||
_worldPacket.WriteBit(EuropaTicketSystemStatus.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
if (EuropaTicketSystemStatus.HasValue)
|
||||
EuropaTicketSystemStatus.Value.Write(_worldPacket);
|
||||
|
||||
_worldPacket.WriteUInt32(TokenPollTimeSeconds);
|
||||
_worldPacket.WriteUInt32(KioskSessionMinutes);
|
||||
_worldPacket.WriteInt64(TokenBalanceAmount);
|
||||
_worldPacket.WriteInt32(MaxCharactersPerRealm);
|
||||
_worldPacket.WriteInt32(LiveRegionCharacterCopySourceRegions.Count);
|
||||
_worldPacket.WriteUInt32(BpayStoreProductDeliveryDelay);
|
||||
_worldPacket.WriteInt32(ActiveCharacterUpgradeBoostType);
|
||||
_worldPacket.WriteInt32(ActiveClassTrialBoostType);
|
||||
_worldPacket.WriteInt32(MinimumExpansionLevel);
|
||||
_worldPacket.WriteInt32(MaximumExpansionLevel);
|
||||
|
||||
foreach (var sourceRegion in LiveRegionCharacterCopySourceRegions)
|
||||
_worldPacket.WriteInt32(sourceRegion);
|
||||
|
||||
}
|
||||
|
||||
public bool BpayStoreAvailable; // NYI
|
||||
@@ -306,6 +293,10 @@ namespace Game.Networking.Packets
|
||||
public bool LiveRegionCharacterListEnabled; // NYI
|
||||
public bool LiveRegionCharacterCopyEnabled; // NYI
|
||||
public bool LiveRegionAccountCopyEnabled; // NYI
|
||||
public bool LiveRegionKeyBindingsCopyEnabled = false;
|
||||
public bool Unknown901CheckoutRelated = false; // NYI
|
||||
public Optional<EuropaTicketConfig> EuropaTicketSystemStatus;
|
||||
public List<int> LiveRegionCharacterCopySourceRegions = new List<int>();
|
||||
public uint TokenPollTimeSeconds; // NYI
|
||||
public long TokenBalanceAmount; // NYI
|
||||
public int MaxCharactersPerRealm;
|
||||
@@ -314,6 +305,7 @@ namespace Game.Networking.Packets
|
||||
public int ActiveClassTrialBoostType; // NYI
|
||||
public int MinimumExpansionLevel;
|
||||
public int MaximumExpansionLevel;
|
||||
public uint KioskSessionMinutes;
|
||||
}
|
||||
|
||||
public class MOTD : ServerPacket
|
||||
@@ -351,4 +343,40 @@ namespace Game.Networking.Packets
|
||||
public string ServerTimeTZ;
|
||||
public string GameTimeTZ;
|
||||
}
|
||||
|
||||
public struct SavedThrottleObjectState
|
||||
{
|
||||
public uint MaxTries;
|
||||
public uint PerMilliseconds;
|
||||
public uint TryCount;
|
||||
public uint LastResetTimeBeforeNow;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(MaxTries);
|
||||
data.WriteUInt32(PerMilliseconds);
|
||||
data.WriteUInt32(TryCount);
|
||||
data.WriteUInt32(LastResetTimeBeforeNow);
|
||||
}
|
||||
}
|
||||
|
||||
public struct EuropaTicketConfig
|
||||
{
|
||||
public bool TicketsEnabled;
|
||||
public bool BugsEnabled;
|
||||
public bool ComplaintsEnabled;
|
||||
public bool SuggestionsEnabled;
|
||||
|
||||
public SavedThrottleObjectState ThrottleState;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBit(TicketsEnabled);
|
||||
data.WriteBit(BugsEnabled);
|
||||
data.WriteBit(ComplaintsEnabled);
|
||||
data.WriteBit(SuggestionsEnabled);
|
||||
|
||||
ThrottleState.Write(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,31 +102,22 @@ namespace Game.Networking.Packets
|
||||
int CaseID;
|
||||
}
|
||||
|
||||
public class SupportTicketSubmitBug : ClientPacket
|
||||
public class SubmitUserFeedback : ClientPacket
|
||||
{
|
||||
public SupportTicketHeader Header;
|
||||
public string Note;
|
||||
public bool IsSuggestion;
|
||||
|
||||
public SupportTicketSubmitBug(WorldPacket packet) : base(packet) { }
|
||||
public SubmitUserFeedback(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Header.Read(_worldPacket);
|
||||
Note = _worldPacket.ReadString(_worldPacket.ReadBits<uint>(10));
|
||||
}
|
||||
}
|
||||
uint noteLength = _worldPacket.ReadBits<uint>(24);
|
||||
IsSuggestion = _worldPacket.HasBit();
|
||||
|
||||
public class SupportTicketSubmitSuggestion : ClientPacket
|
||||
{
|
||||
public SupportTicketHeader Header;
|
||||
public string Note;
|
||||
|
||||
public SupportTicketSubmitSuggestion(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
Header.Read(_worldPacket);
|
||||
Note = _worldPacket.ReadString(_worldPacket.ReadBits<uint>(10));
|
||||
if (noteLength != 0)
|
||||
Note = _worldPacket.ReadString(noteLength - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,10 +91,12 @@ namespace Game.Networking.Packets
|
||||
ItemModifiedAppearanceID = data.ReadInt32();
|
||||
Slot = data.ReadUInt32();
|
||||
SpellItemEnchantmentID = data.ReadInt32();
|
||||
SecondaryItemModifiedAppearanceID = data.ReadInt32();
|
||||
}
|
||||
|
||||
public int ItemModifiedAppearanceID;
|
||||
public uint Slot;
|
||||
public int SpellItemEnchantmentID;
|
||||
public int SecondaryItemModifiedAppearanceID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,6 +242,16 @@ namespace Game.Scenarios
|
||||
|
||||
public class ScenarioPOI
|
||||
{
|
||||
public int BlobIndex;
|
||||
public int MapID;
|
||||
public int UiMapID;
|
||||
public int Priority;
|
||||
public int Flags;
|
||||
public int WorldEffectID;
|
||||
public int PlayerConditionID;
|
||||
public int NavigationPlayerConditionID;
|
||||
public List<Vector2> Points = new List<Vector2>();
|
||||
|
||||
public ScenarioPOI(int blobIndex, int mapID, int uiMapID, int priority, int flags, int worldEffectID, int playerConditionID, List<Vector2> points)
|
||||
{
|
||||
BlobIndex = blobIndex;
|
||||
@@ -253,14 +263,5 @@ namespace Game.Scenarios
|
||||
PlayerConditionID = playerConditionID;
|
||||
Points = points;
|
||||
}
|
||||
|
||||
public int BlobIndex;
|
||||
public int MapID;
|
||||
public int UiMapID;
|
||||
public int Priority;
|
||||
public int Flags;
|
||||
public int WorldEffectID;
|
||||
public int PlayerConditionID;
|
||||
public List<Vector2> Points = new List<Vector2>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace Game.Spells
|
||||
Unit,
|
||||
DynObj
|
||||
}
|
||||
|
||||
public enum AuraRemoveMode
|
||||
{
|
||||
None = 0,
|
||||
@@ -43,6 +44,7 @@ namespace Game.Spells
|
||||
Expire, // aura duration has ended
|
||||
Death
|
||||
}
|
||||
|
||||
public enum AuraFlags
|
||||
{
|
||||
None = 0x00,
|
||||
@@ -211,7 +213,7 @@ namespace Game.Spells
|
||||
AuraDataInfo auraData = auraInfo.AuraData.Value;
|
||||
auraData.CastID = aura.GetCastGUID();
|
||||
auraData.SpellID = (int)aura.GetId();
|
||||
auraData.SpellXSpellVisualID = (int)aura.GetSpellXSpellVisualId();
|
||||
auraData.Visual.SpellXSpellVisualID = (int)aura.GetSpellXSpellVisualId();
|
||||
auraData.Flags = GetFlags();
|
||||
if (aura.GetMaxDuration() > 0 && !aura.GetSpellInfo().HasAttribute(SpellAttr5.HideDuration))
|
||||
auraData.Flags |= AuraFlags.Duration;
|
||||
|
||||
@@ -3525,7 +3525,7 @@ namespace Game.Spells
|
||||
result = SpellCastResult.DontReport;
|
||||
|
||||
CastFailed castFailed = new CastFailed();
|
||||
castFailed.SpellXSpellVisualID = (int)m_SpellVisual;
|
||||
castFailed.Visual.SpellXSpellVisualID = (int)m_SpellVisual;
|
||||
FillSpellCastFailedArgs(castFailed, m_castId, m_spellInfo, result, m_customError, param1, param2, m_caster.ToPlayer());
|
||||
m_caster.ToPlayer().SendPacket(castFailed);
|
||||
}
|
||||
@@ -3553,7 +3553,7 @@ namespace Game.Spells
|
||||
return;
|
||||
|
||||
CastFailed packet = new CastFailed();
|
||||
packet.SpellXSpellVisualID = (int)spellVisual;
|
||||
packet.Visual.SpellXSpellVisualID = (int)spellVisual;
|
||||
FillSpellCastFailedArgs(packet, cast_count, spellInfo, result, customError, param1, param2, caster);
|
||||
caster.SendPacket(packet);
|
||||
}
|
||||
@@ -3610,7 +3610,7 @@ namespace Game.Spells
|
||||
castData.CastID = m_castId;
|
||||
castData.OriginalCastID = m_originalCastId;
|
||||
castData.SpellID = (int)m_spellInfo.Id;
|
||||
castData.SpellXSpellVisualID = m_SpellVisual;
|
||||
castData.Visual.SpellXSpellVisualID = m_SpellVisual;
|
||||
castData.CastFlags = castFlags;
|
||||
castData.CastFlagsEx = m_castFlagsEx;
|
||||
castData.CastTime = (uint)m_casttime;
|
||||
@@ -3724,7 +3724,7 @@ namespace Game.Spells
|
||||
castData.CastID = m_castId;
|
||||
castData.OriginalCastID = m_originalCastId;
|
||||
castData.SpellID = (int)m_spellInfo.Id;
|
||||
castData.SpellXSpellVisualID = m_SpellVisual;
|
||||
castData.Visual.SpellXSpellVisualID = m_SpellVisual;
|
||||
castData.CastFlags = castFlags;
|
||||
castData.CastFlagsEx = m_castFlagsEx;
|
||||
castData.CastTime = Time.GetMSTime();
|
||||
@@ -4019,7 +4019,7 @@ namespace Game.Spells
|
||||
failurePacket.CasterUnit = m_caster.GetGUID();
|
||||
failurePacket.CastID = m_castId;
|
||||
failurePacket.SpellID = m_spellInfo.Id;
|
||||
failurePacket.SpellXSpellVisualID = m_SpellVisual;
|
||||
failurePacket.Visual.SpellXSpellVisualID = m_SpellVisual;
|
||||
failurePacket.Reason = result;
|
||||
m_caster.SendMessageToSet(failurePacket, true);
|
||||
|
||||
@@ -4027,6 +4027,7 @@ namespace Game.Spells
|
||||
failedPacket.CasterUnit = m_caster.GetGUID();
|
||||
failedPacket.CastID = m_castId;
|
||||
failedPacket.SpellID = m_spellInfo.Id;
|
||||
failedPacket.Visual.SpellXSpellVisualID = m_SpellVisual;
|
||||
failedPacket.Reason = result;
|
||||
m_caster.SendMessageToSet(failedPacket, true);
|
||||
}
|
||||
@@ -4051,7 +4052,7 @@ namespace Game.Spells
|
||||
SpellChannelStart spellChannelStart = new SpellChannelStart();
|
||||
spellChannelStart.CasterGUID = m_caster.GetGUID();
|
||||
spellChannelStart.SpellID = (int)m_spellInfo.Id;
|
||||
spellChannelStart.SpellXSpellVisualID = (int)m_SpellVisual;
|
||||
spellChannelStart.Visual.SpellXSpellVisualID = m_SpellVisual;
|
||||
spellChannelStart.ChannelDuration = duration;
|
||||
|
||||
uint schoolImmunityMask = m_caster.GetSchoolImmunityMask();
|
||||
|
||||
Reference in New Issue
Block a user