Ejemplo n.º 1
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            packet.ReadInt32("Count?");

            var count = packet.ReadBits("Count", 20);

            var POIcounter = new uint[count];
            var pointsSize = new uint[count][];

            for (var i = 0; i < count; ++i)
            {
                POIcounter[i] = packet.ReadBits("POI Counter", 18, i);
                pointsSize[i] = new uint[POIcounter[i]];

                for (var j = 0; j < POIcounter[i]; ++j)
                    pointsSize[i][j] = packet.ReadBits("Points Counter", 21, i, j);
            }

            for (var i = 0; i < count; ++i)
            {
                var questPOIs = new List<QuestPOI>();

                for (var j = 0; j < POIcounter[i]; ++j)
                {
                    var questPoi = new QuestPOI();
                    questPoi.Points = new List<QuestPOIPoint>((int)pointsSize[i][j]);

                    for (var k = 0u; k < pointsSize[i][j]; ++k)
                    {
                        var questPoiPoint = new QuestPOIPoint
                        {
                            Index = k,
                            X = packet.ReadInt32("Point X", i, j, (int)k),
                            Y = packet.ReadInt32("Point Y", i, j, (int)k)
                        };
                        questPoi.Points.Add(questPoiPoint);
                    }

                    packet.ReadInt32("Unk Int32 1", i, j);
                    packet.ReadInt32("Unk Int32 2", i, j);
                    packet.ReadInt32("Unk Int32 3", i, j);
                    questPoi.Map = (uint)packet.ReadEntry<UInt32>(StoreNameType.Map, "Map Id", i, j);
                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);
                    questPoi.WorldMapAreaId = packet.ReadUInt32("World Map Area ID", i, j);
                    packet.ReadInt32("Unk Int32 4", i, j);
                    packet.ReadInt32("World Effect ID", i, j);
                    questPoi.Idx = (uint)packet.ReadInt32("POI Index", i, j);
                    packet.ReadInt32("Player Condition ID", i, j);
                    questPoi.FloorId = packet.ReadUInt32("Floor Id", i, j);

                    questPOIs.Add(questPoi);
                }

                var questId = packet.ReadEntry<Int32>(StoreNameType.Quest, "Quest ID", i);
                packet.ReadInt32("POI Counter?", i);

                foreach (var questpoi in questPOIs)
                    Storage.QuestPOIs.Add(new Tuple<uint, uint>((uint)questId, questpoi.Idx), questpoi, packet.TimeSpan);
            }
        }
Ejemplo n.º 2
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; i++)
            {
                var questId = packet.ReadEntryWithName<Int32>(StoreNameType.Quest, "Quest ID", i);

                var counter = packet.ReadInt32("POI Counter", i);
                for (var j = 0; j < counter; j++)
                {
                    var questPoi = new QuestPOI();

                    var idx = packet.ReadInt32("POI Index", i, j);
                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);

                    questPoi.Map = (uint) packet.ReadEntryWithName<UInt32>(StoreNameType.Map, "Map Id", i);
                    questPoi.WorldMapAreaId = packet.ReadUInt32("World Map Area", i, j);
                    questPoi.FloorId = packet.ReadUInt32("Floor Id", i, j);
                    questPoi.UnkInt1 = packet.ReadUInt32("Unk Int32 2", i, j);
                    questPoi.UnkInt2 = packet.ReadUInt32("Unk Int32 3", i, j);

                    var pointsSize = packet.ReadInt32("Points Counter", i, j);
                    questPoi.Points = new List<QuestPOIPoint>(pointsSize);
                    for (var k = 0u; k < pointsSize; k++)
                    {
                        var questPoiPoint = new QuestPOIPoint
                                            {
                                                Index = k,
                                                X = packet.ReadInt32("Point X", i, j, (int) k),
                                                Y = packet.ReadInt32("Point Y", i, j, (int) k)
                                            };
                        questPoi.Points.Add(questPoiPoint);
                    }

                    Storage.QuestPOIs.Add(new Tuple<uint, uint>((uint) questId, (uint) idx), questPoi, packet.TimeSpan);
                }
            }
        }
Ejemplo n.º 3
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            packet.ReadInt32("NumPOIs");
            var int4 = packet.ReadInt32("QuestPOIData");

            for (var i = 0; i < int4; ++i)
            {
                var questId = packet.ReadUInt32("QuestID", i);
                packet.ReadUInt32("NumBlobs", i);

                var int2 = packet.ReadInt32("QuestPOIBlobData", i);

                for (var j = 0; j < int2; ++j)
                {
                    var questPoi = new QuestPOI();
                    var idx = packet.ReadInt32("BlobIndex", i, j);
                    questPoi.ObjectiveIndex = packet.ReadInt32("ObjectiveIndex", i, j);
                    packet.ReadInt32("QuestObjectiveID", i, j);
                    packet.ReadInt32("QuestObjectID", i, j);
                    questPoi.Map = (uint)packet.ReadInt32("MapID", i, j);
                    questPoi.WorldMapAreaId = (uint)packet.ReadInt32("WorldMapAreaID", i, j);
                    questPoi.FloorId = (uint)packet.ReadInt32("Floor", i, j);
                    packet.ReadInt32("Priority", i, j);
                    packet.ReadInt32("Flags", i, j);
                    packet.ReadInt32("WorldEffectID", i, j);
                    packet.ReadInt32("PlayerConditionID", i, j);
                    packet.ReadInt32("NumPoints", i, j);
                    packet.ReadInt32("Int12", i, j);

                    var int13 = packet.ReadInt32("QuestPOIBlobPoint", i, j);
                    questPoi.Points = new List<QuestPOIPoint>(int13);
                    for (var k = 0u; k < int13; ++k)
                    {
                        var questPoiPoint = new QuestPOIPoint
                        {
                            Index = k,
                            X = packet.ReadInt32("X", i, j, (int)k),
                            Y = packet.ReadInt32("Y", i, j, (int)k)
                        };
                        questPoi.Points.Add(questPoiPoint);
                    }

                    Storage.QuestPOIs.Add(new Tuple<uint, uint>(questId, (uint)idx), questPoi, packet.TimeSpan);
                }
            }
        }
Ejemplo n.º 4
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            packet.ReadInt32("Count?");

            uint count = packet.ReadBits("Count", 20);

            var poiCounter = new uint[count];
            var pointsSize = new uint[count][];

            for (int i = 0; i < count; ++i)
            {
                poiCounter[i] = packet.ReadBits("POI Counter", 18, i);
                pointsSize[i] = new uint[poiCounter[i]];

                for (int j = 0; j < poiCounter[i]; ++j)
                    pointsSize[i][j] = packet.ReadBits("Points Counter", 21, i, j);
            }

            for (int i = 0; i < count; ++i)
            {
                var questPOIs = new List<QuestPOI>();
                var questPoiPointsForQuest = new List<QuestPOIPoint>();

                for (int j = 0; j < poiCounter[i]; ++j)
                {
                    QuestPOI questPoi = new QuestPOI();

                    packet.ReadInt32("Unk Int32 1", i, j);
                    packet.ReadInt32("Unk Int32 2", i, j);
                    packet.ReadInt32("Unk Int32 3", i, j);
                    questPoi.Floor = (int)packet.ReadUInt32("Floor Id", i, j);
                    questPoi.WorldMapAreaId = (int)packet.ReadUInt32("World Map Area ID", i, j);

                    var questPoiPoints = new List<QuestPOIPoint>();
                    for (int k = 0; k < pointsSize[i][j]; ++k)
                    {
                        QuestPOIPoint questPoiPoint = new QuestPOIPoint
                        {
                            Idx2 = k,
                            Y = packet.ReadInt32("Point Y", i, j, k),
                            X = packet.ReadInt32("Point X", i, j, k)
                        };
                        questPoiPoints.Add(questPoiPoint);
                    }

                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);
                    packet.ReadInt32("Points Counter?", i, j);
                    questPoi.MapID = (int)packet.ReadUInt32<MapId>("Map Id", i, j);
                    packet.ReadInt32("Player Condition ID", i, j);
                    packet.ReadInt32("World Effect ID", i, j);

                    int idx = packet.ReadInt32("POI Index", i, j);
                    questPoi.ID = idx;

                    questPoiPoints.ForEach(p =>
                    {
                        p.Idx1 = idx;
                        questPoiPointsForQuest.Add(p);
                    });

                    questPOIs.Add(questPoi);
                }

                int questId = packet.ReadInt32<QuestId>("Quest ID", i);
                packet.ReadInt32("POI Counter?", i);

                questPoiPointsForQuest.ForEach(q =>
                {
                    q.QuestID = questId;
                    Storage.QuestPOIPoints.Add(q, packet.TimeSpan);
                });

                questPOIs.ForEach(q =>
                {
                    q.QuestID = questId;
                    Storage.QuestPOIs.Add(q, packet.TimeSpan);
                });
            }
        }
Ejemplo n.º 5
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            var count = packet.ReadInt32("Count");

            for (var i = 0; i < count; ++i)
            {
                var questId = packet.ReadEntry<Int32>(StoreNameType.Quest, "Quest ID", i);

                var counter = packet.ReadInt32("POI Counter", i);
                for (var j = 0; j < counter; ++j)
                {
                    var questPoi = new QuestPOI();

                    var idx = packet.ReadInt32("POI Index", i, j);
                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_0_5_16048))
                        packet.ReadUInt32("Unk Int32 1", i, j);

                    questPoi.Map = packet.ReadEntry<UInt32>(StoreNameType.Map, "Map Id", i);
                    questPoi.WorldMapAreaId = packet.ReadUInt32("World Map Area ID", i, j);
                    questPoi.FloorId = packet.ReadUInt32("Floor Id", i, j);
                    questPoi.UnkInt1 = packet.ReadUInt32("Unk Int32 2", i, j);
                    questPoi.UnkInt2 = packet.ReadUInt32("Unk Int32 3", i, j);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_0_5_16048))
                    {
                        packet.ReadUInt32("World Effect ID", i, j);
                        packet.ReadUInt32("Player Condition ID", i, j);
                    }

                    var pointsSize = packet.ReadInt32("Points Counter", i, j);
                    questPoi.Points = new List<QuestPOIPoint>(pointsSize);
                    for (var k = 0u; k < pointsSize; ++k)
                    {
                        var questPoiPoint = new QuestPOIPoint
                                            {
                                                Index = k,
                                                X = packet.ReadInt32("Point X", i, j, (int) k),
                                                Y = packet.ReadInt32("Point Y", i, j, (int) k)
                                            };
                        questPoi.Points.Add(questPoiPoint);
                    }

                    Storage.QuestPOIs.Add(new Tuple<uint, uint>((uint) questId, (uint) idx), questPoi, packet.TimeSpan);
                }
            }
        }
Ejemplo n.º 6
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            int count = packet.ReadInt32("Count");

            for (int i = 0; i < count; ++i)
            {
                int questId = packet.ReadInt32<QuestId>("Quest ID", i);

                int counter = packet.ReadInt32("POI Counter", i);
                for (int j = 0; j < counter; ++j)
                {
                    int idx = packet.ReadInt32("POI Index", i, j);
                    QuestPOI questPoi = new QuestPOI
                    {
                        QuestID = questId,
                        ID = idx
                    };

                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_0_5_16048))
                        packet.ReadUInt32("Unk Int32 1", i, j);

                    questPoi.MapID = (int)packet.ReadUInt32<MapId>("Map Id", i);
                    questPoi.WorldMapAreaId = (int)packet.ReadUInt32("World Map Area ID", i, j);
                    questPoi.Floor = (int)packet.ReadUInt32("Floor Id", i, j);
                    questPoi.Priority = (int)packet.ReadUInt32("Unk Int32 2", i, j);
                    questPoi.Flags = (int)packet.ReadUInt32("Unk Int32 3", i, j);

                    if (ClientVersion.AddedInVersion(ClientVersionBuild.V5_0_5_16048))
                    {
                        packet.ReadUInt32("World Effect ID", i, j);
                        packet.ReadUInt32("Player Row ID", i, j);
                    }

                    int pointsSize = packet.ReadInt32("Points Counter", i, j);
                    for (int k = 0; k < pointsSize; ++k)
                    {
                        QuestPOIPoint questPoiPoint = new QuestPOIPoint
                        {
                            QuestID = questId,
                            Idx1 = idx,
                            Idx2 = k,
                            X = packet.ReadInt32("Point X", i, j, k),
                            Y = packet.ReadInt32("Point Y", i, j, k)
                        };
                        Storage.QuestPOIPoints.Add(questPoiPoint, packet.TimeSpan);
                    }

                    Storage.QuestPOIs.Add(questPoi, packet.TimeSpan);
                }
            }
        }
Ejemplo n.º 7
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            var count = packet.ReadBits("Count", 20);

            var counter = new uint[count];
            var points = new int[count][];

            for (var i = 0; i < count; i++)
            {
                counter[i] = packet.ReadBits("POI Counter", 18, i);
                points[i] = new int[counter[i]];
                for (var j = 0; j < counter[i]; j++)
                    points[i][j] = (int)packet.ReadBits("POI Points", 21, i, j);
            }
            for (var i = 0; i < count; i++)
            {
                for (var j = 0; j < counter[i]; j++)
                {
                    var questPoi = new QuestPOI();

                    questPoi.FloorId = packet.ReadUInt32("Floor Id", i, j);
                    questPoi.Points = new List<QuestPOIPoint>(points[i][j]);
                    for (var k = 0u; k < points[i][j]; k++)
                    {
                        var questPoiPoint = new QuestPOIPoint
                        {
                            Index = k,
                            X = packet.ReadInt32("Point X", i, j, (int)k),
                            Y = packet.ReadInt32("Point Y", i, j, (int)k)
                        };
                        questPoi.Points.Add(questPoiPoint);
                    }
                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);
                    var idx = packet.ReadInt32("POI Index", i, j);
                    packet.ReadInt32("Unk14*4", i, j);
                    packet.ReadInt32("Unk42*4", i, j);

                    questPoi.Map = (uint)packet.ReadEntry<UInt32>(StoreNameType.Map, "Map Id", i, j);
                    packet.ReadInt32("Points Counter", i, j);
                    questPoi.WorldMapAreaId = packet.ReadUInt32("World Map Area", i, j);
                    packet.ReadInt32("Unk200", i, j);

                    questPoi.UnkInt2 = packet.ReadUInt32("Unk Int32 3", i, j);
                    questPoi.UnkInt1 = packet.ReadUInt32("Unk Int32 2", i, j);

                    Storage.QuestPOIs.Add(new Tuple<uint, uint>((uint)0, (uint)idx), questPoi, packet.TimeSpan);
                }
                var questId = packet.ReadEntry<Int32>(StoreNameType.Quest, "Quest ID", i);
                packet.ReadInt32("POI size", i);
            }
            packet.ReadInt32("count");
        }
Ejemplo n.º 8
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            packet.ReadInt32("NumPOIs");
            int int4 = packet.ReadInt32("QuestPOIData");

            for (int i = 0; i < int4; ++i)
            {
                int questId = packet.ReadInt32("QuestID", i);

                if (ClientVersion.RemovedInVersion(ClientVersionBuild.V6_2_0_20173))
                    packet.ReadUInt32("NumBlobs", i);

                int int2 = packet.ReadInt32("QuestPOIBlobData", i);

                for (int j = 0; j < int2; ++j)
                {
                    QuestPOI questPoi = new QuestPOI
                    {
                        QuestID = questId,
                        ID = j,
                        BlobIndex = packet.ReadInt32("BlobIndex", i, j),
                        ObjectiveIndex = packet.ReadInt32("ObjectiveIndex", i, j),
                        QuestObjectiveID = packet.ReadInt32("QuestObjectiveID", i, j),
                        QuestObjectID = packet.ReadInt32("QuestObjectID", i, j),
                        MapID = packet.ReadInt32("MapID", i, j),
                        WorldMapAreaId = packet.ReadInt32("WorldMapAreaID", i, j),
                        Floor = packet.ReadInt32("Floor", i, j),
                        Priority = packet.ReadInt32("Priority", i, j),
                        Flags = packet.ReadInt32("Flags", i, j),
                        WorldEffectID = packet.ReadInt32("WorldEffectID", i, j),
                        PlayerConditionID = packet.ReadInt32("PlayerConditionID", i, j)
                    };

                    if (ClientVersion.RemovedInVersion(ClientVersionBuild.V6_2_0_20173))
                        packet.ReadInt32("NumPoints", i, j);

                    questPoi.WoDUnk1 = packet.ReadInt32("WoDUnk1", i, j);

                    int int13 = packet.ReadInt32("QuestPOIBlobPoint", i, j);
                    for (int k = 0; k < int13; ++k)
                    {
                        QuestPOIPoint questPoiPoint = new QuestPOIPoint
                        {
                            QuestID = questId,
                            Idx1 = j,
                            Idx2 = k,
                            X = packet.ReadInt32("X", i, j, k),
                            Y = packet.ReadInt32("Y", i, j, k)
                        };
                        Storage.QuestPOIPoints.Add(questPoiPoint, packet.TimeSpan);
                    }

                    Storage.QuestPOIs.Add(questPoi, packet.TimeSpan);
                }
            }
        }
Ejemplo n.º 9
0
        public static void HandleQuestPoiQueryResponse(Packet packet)
        {
            var count = packet.ReadBits("Count", 20);

            var counter = new uint[count];
            var points = new int[count][];

            for (var i = 0; i < count; i++)
            {
                counter[i] = packet.ReadBits("POI Counter", 18, i);
                points[i] = new int[counter[i]];
                for (var j = 0; j < counter[i]; j++)
                    points[i][j] = (int)packet.ReadBits("POI Points", 21, i, j);
            }
            for (var i = 0; i < count; i++)
            {
                var questPOIs = new List<QuestPOI>();
                var questPoiPointsForQuest = new List<QuestPOIPoint>();

                for (var j = 0; j < counter[i]; j++)
                {
                    QuestPOI questPoi = new QuestPOI();

                    questPoi.Floor = (int)packet.ReadUInt32("Floor Id", i, j);
                    var questPoiPoints = new List<QuestPOIPoint>();
                    for (int k = 0; k < points[i][j]; k++)
                    {
                        QuestPOIPoint questPoiPoint = new QuestPOIPoint
                        {
                            Idx2 = k,
                            X = packet.ReadInt32("Point X", i, j, (int)k),
                            Y = packet.ReadInt32("Point Y", i, j, (int)k)
                        };
                        questPoiPoints.Add(questPoiPoint);
                    }
                    questPoi.ObjectiveIndex = packet.ReadInt32("Objective Index", i, j);
                    var idx = packet.ReadInt32("POI Index", i, j);
                    packet.ReadInt32("Unk14*4", i, j);
                    packet.ReadInt32("Unk42*4", i, j);

                    questPoi.MapID = (int)packet.ReadUInt32<MapId>("Map Id", i, j);
                    packet.ReadInt32("Points Counter", i, j);
                    questPoi.WorldMapAreaId = (int)packet.ReadUInt32("World Map Area", i, j);
                    packet.ReadInt32("Unk200", i, j);

                    packet.ReadUInt32("Unk Int32 3", i, j);
                    packet.ReadUInt32("Unk Int32 2", i, j);

                    questPoiPoints.ForEach(p =>
                    {
                        p.Idx1 = idx;
                        questPoiPointsForQuest.Add(p);
                    });

                    questPOIs.Add(questPoi);
                }
                var questId = packet.ReadInt32<QuestId>("Quest ID", i);
                packet.ReadInt32("POI size", i);

                questPoiPointsForQuest.ForEach(q =>
                {
                    q.QuestID = questId;
                    Storage.QuestPOIPoints.Add(q, packet.TimeSpan);
                });

                questPOIs.ForEach(q =>
                {
                    q.QuestID = questId;
                    Storage.QuestPOIs.Add(q, packet.TimeSpan);
                });
            }
            packet.ReadInt32("count");
        }