Exemplo n.º 1
0
        public void HandleClientChatMessage(Parser packet)
        {
            var type = (ChatMessageType)packet.ReadInt32();
            WriteLine("Type: " + type);

            var lang = (Language)packet.ReadInt32();
            WriteLine("Language: " + lang);

            switch (type)
            {
                case ChatMessageType.Whisper:
                {
                    var to = packet.ReadCString();
                    WriteLine("Recipient: " + to);
                    goto default;
                }
                case ChatMessageType.Channel:
                {
                    var chan = packet.ReadCString();
                    WriteLine("Channel: " + chan);
                    goto default;
                }
                default:
                {
                    var msg = packet.ReadCString();
                    WriteLine("Message: " + msg);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        public void HandleGameObjectQueryResponse(Parser packet)
        {
            var entry = packet.ReadEntry();
            WriteLine("Entry: " + entry.Key);

            if (entry.Value)
                return;

            var type = (GameObjectType)packet.ReadInt32();
            WriteLine("Type: " + type);

            var dispId = packet.ReadInt32();
            WriteLine("Display ID: " + dispId);

            var name = new string[4];
            for (var i = 0; i < 4; i++)
            {
                name[i] = packet.ReadCString();
                WriteLine("Name " + i + ": " + name[i]);
            }

            var iconName = packet.ReadCString();
            WriteLine("Icon Name: " + iconName);

            var castCaption = packet.ReadCString();
            WriteLine("Cast Caption: " + castCaption);

            var unkStr = packet.ReadCString();
            WriteLine("Unk String: " + unkStr);

            var data = new int[24];
            for (var i = 0; i < 24; i++)
            {
                data[i] = packet.ReadInt32();
                WriteLine("Data " + i + ": " + data[i]);
            }

            var size = packet.ReadSingle();
            WriteLine("Size: " + size);

            var qItem = new int[6];
            for (var i = 0; i < 6; i++)
            {
                qItem[i] = packet.ReadInt32();
                WriteLine("Quest Item " + i + ": " + qItem[i]);
            }

            //SQLStore.WriteData(SQLStore.GameObjects.GetCommand(entry.Key, type, dispId, name[0], iconName,
            //    castCaption, unkStr, data, size, qItem));
        }
Exemplo n.º 3
0
        public void HandleContactList(Parser packet)
        {
            var flags = (ContactListFlag)packet.ReadInt32();
            WriteLine("List Flags: " + flags);

            var count = packet.ReadInt32();
            WriteLine("Count: " + count);

            for (var i = 0; i < count; i++)
            {
                var guid = packet.ReadGuid();
                WriteLine("GUID: " + guid);

                var cflags = (ContactEntryFlag)packet.ReadInt32();
                WriteLine("Flags: " + cflags);

                var note = packet.ReadCString();
                WriteLine("Note: " + note);

                if (!cflags.HasFlag(ContactEntryFlag.Friend))
                    continue;

                ReadSingleContactBlock(packet, true);
            }
        }
Exemplo n.º 4
0
        public void HandleFriendStatus(Parser packet)
        {
            var result = (ContactResult)packet.ReadByte();
            WriteLine("Result: " + result);

            var guid = packet.ReadGuid();
            WriteLine("GUID: " + guid);

            switch (result)
            {
                case ContactResult.FriendAddedOnline:
                case ContactResult.FriendAddedOffline:
                case ContactResult.Online:
                {
                    if (result != ContactResult.Online)
                    {
                        var note = packet.ReadCString();
                        WriteLine("Note: " + note);
                    }

                    ReadSingleContactBlock(packet, false);
                    break;
                }
            }
        }
Exemplo n.º 5
0
        public void HandleSetActiveVoiceChannel(Parser packet)
        {
            var chanId = packet.ReadInt32();
            WriteLine("Channel ID: " + chanId);

            var name = packet.ReadCString();
            WriteLine("Channel Name: " + name);
        }
Exemplo n.º 6
0
        public void HandleGroupInvite(Parser packet)
        {
            var name = packet.ReadCString();
            WriteLine("Name: " + name);

            var unkint = packet.ReadInt32();
            WriteLine("Unk Int32: " + unkint);
        }
Exemplo n.º 7
0
        public void HandleGossipMenu(Parser packet)
        {
            packet.ReadInt64("Guid: ");
            packet.ReadCString("Gossip Text: ");
            packet.ReadInt32("Unk: ");
            packet.ReadInt32("Unk: ");
            var QuestAmount = packet.ReadByte();
                WriteLine("Quest Amount: " + QuestAmount);

            for (int i = 0; i < QuestAmount; i++)
            {
                packet.ReadInt32("Quest ID: " + i);
                packet.ReadInt32("Unknown: " + i);
                packet.ReadInt32("Unknown: " + i);
                packet.ReadInt32("Unknown: " + i);
                packet.ReadByte("Unknown: " + i);
                packet.ReadCString("Quest Title: " + i);
            }
        }
Exemplo n.º 8
0
        public void HandleAvailableVoiceChannel(Parser packet)
        {
            var unk = packet.ReadInt64();
            WriteLine("Unk Int64 1: " + unk);

            var type = packet.ReadByte();
            WriteLine("Channel Type: " + type);

            var name = packet.ReadCString();
            WriteLine("Channel Name: " + name);

            var unk2 = packet.ReadInt64();
            WriteLine("Unk Int64 2: " + unk2);
        }
Exemplo n.º 9
0
        public void HandleGossipPoi(Parser packet)
        {
            var flags = packet.ReadInt32();
            WriteLine("Flags: 0x" + flags.ToString("X8"));

            Float("X");
            Float("Y");

            var icon = (GossipPoiIcon)packet.ReadInt32();
            WriteLine("Icon: " + icon);

            var data = packet.ReadInt32();
            WriteLine("Data: " + data);

            var iconName = packet.ReadCString();
            WriteLine("Icon Name: " + iconName);
        }
Exemplo n.º 10
0
        public void HandleItemQueryResponse(Parser packet)
        {
            var entry = packet.ReadEntry();
            WriteLine("Entry: " + entry.Key);

            if (entry.Value)
                return;

            var iClass = (ItemClass)packet.ReadInt32();
            WriteLine("Class: " + iClass);

            var subClass = packet.ReadInt32();
            WriteLine("Sub Class: " + subClass);

            var unk0 = packet.ReadInt32();
            WriteLine("Unk Int32: " + unk0);

            var name = new string[4];
            for (var i = 0; i < 4; i++)
            {
                name[i] = packet.ReadCString();
                WriteLine("Name " + i + ": " + name[i]);
            }

            var dispId = packet.ReadInt32();
            WriteLine("Display ID: " + dispId);

            var quality = (ItemQuality)packet.ReadInt32();
            WriteLine("Quality: " + quality);

            var flags = (ItemFlag)packet.ReadInt32();
            WriteLine("Flags: " + flags);

            var flags2 = (ItemFlagExtra)packet.ReadInt32();
            WriteLine("Extra Flags: " + flags2);

            var buyPrice = packet.ReadInt32();
            WriteLine("Buy Price: " + buyPrice);

            var sellPrice = packet.ReadInt32();
            WriteLine("Sell Price: " + sellPrice);

            var invType = (InventoryType)packet.ReadInt32();
            WriteLine("Inventory Type: " + invType);

            var allowClass = (ClassMask)packet.ReadInt32();
            WriteLine("Allowed Classes: " + allowClass);

            var allowRace = (RaceMask)packet.ReadInt32();
            WriteLine("Allowed Races: " + allowRace);

            var itemLvl = packet.ReadInt32();
            WriteLine("Item Level: " + itemLvl);

            var reqLvl = packet.ReadInt32();
            WriteLine("Required Level: " + reqLvl);

            var reqSkill = packet.ReadInt32();
            WriteLine("Required Skill ID: " + reqSkill);

            var reqSkLvl = packet.ReadInt32();
            WriteLine("Required Skill Level: " + reqSkLvl);

            var reqSpell = packet.ReadInt32();
            WriteLine("Required Spell: " + reqSpell);

            var reqHonor = packet.ReadInt32();
            WriteLine("Required Honor Rank: " + reqHonor);

            var reqCity = packet.ReadInt32();
            WriteLine("Required City Rank: " + reqCity);

            var reqRepFaction = packet.ReadInt32();
            WriteLine("Required Rep Faction: " + reqRepFaction);

            var reqRepValue = packet.ReadInt32();
            WriteLine("Required Rep Value: " + reqRepValue);

            var maxCount = packet.ReadInt32();
            WriteLine("Max Count: " + maxCount);

            var stacks = packet.ReadInt32();
            WriteLine("Max Stack Size: " + stacks);

            var contSlots = packet.ReadInt32();
            WriteLine("Container Slots: " + contSlots);

            var statsCount = packet.ReadInt32();
            WriteLine("Stats Count: " + statsCount);

            var type = new ItemModType[statsCount];
            var value = new int[statsCount];
            for (var i = 0; i < statsCount; i++)
            {
                type[i] = (ItemModType)packet.ReadInt32();
                WriteLine("Stat Type " + i + ": " + type[i]);

                value[i] = packet.ReadInt32();
                WriteLine("Stat Value " + i + ": " + value[i]);
            }

            var ssdId = packet.ReadInt32();
            WriteLine("SSD ID: " + ssdId);

            var ssdVal = packet.ReadInt32();
            WriteLine("SSD Value: " + ssdVal);

            var dmgMin = new float[2];
            var dmgMax = new float[2];
            var dmgType = new DamageType[2];
            for (var i = 0; i < 2; i++)
            {
                dmgMin[i] = packet.ReadSingle();
                WriteLine("Damage Min " + i + ": " + dmgMin[i]);

                dmgMax[i] = packet.ReadSingle();
                WriteLine("Damage Max " + i + ": " + dmgMax[i]);

                dmgType[i] = (DamageType)packet.ReadInt32();
                WriteLine("Damage Type " + i + ": " + dmgType[i]);
            }

            var resistance = new int[7];
            for (var i = 0; i < 7; i++)
            {
                resistance[i] = packet.ReadInt32();
                WriteLine((DamageType)i + " Resistance: " + resistance[i]);
            }

            var delay = packet.ReadInt32();
            WriteLine("Delay: " + delay);

            var ammoType = (AmmoType)packet.ReadInt32();
            WriteLine("Ammo Type: " + ammoType);

            var rangedMod = packet.ReadSingle();
            WriteLine("Ranged Mod: " + rangedMod);

            var spellId = new int[5];
            var spellTrigger = new ItemSpellTriggerType[5];
            var spellCharges = new int[5];
            var spellCooldown = new int[5];
            var spellCategory = new int[5];
            var spellCatCooldown = new int[5];
            for (var i = 0; i < 5; i++)
            {
                spellId[i] = packet.ReadInt32();
                WriteLine("Triggered Spell ID " + i + ": " + spellId[i]);

                spellTrigger[i] = (ItemSpellTriggerType)packet.ReadInt32();
                WriteLine("Triggered Spell Type " + i + ": " + spellTrigger[i]);

                spellCharges[i] = packet.ReadInt32();
                WriteLine("Triggered Spell Charges " + i + ": " + spellCharges[i]);

                spellCooldown[i] = packet.ReadInt32();
                WriteLine("Triggered Spell Cooldown " + i + ": " + spellCooldown[i]);

                spellCategory[i] = packet.ReadInt32();
                WriteLine("Triggered Spell Category " + i + ": " + spellCategory[i]);

                spellCatCooldown[i] = packet.ReadInt32();
                WriteLine("Triggered Spell Category Cooldown " + i + ": " + spellCatCooldown[i]);
            }

            var binding = (ItemBonding)packet.ReadInt32();
            WriteLine("Bonding: " + binding);

            var description = packet.ReadCString();
            WriteLine("Description: " + description);

            var pageText = packet.ReadInt32();
            WriteLine("Page Text: " + pageText);

            var langId = (Language)packet.ReadInt32();
            WriteLine("Language ID: " + langId);

            var pageMat = (PageMaterial)packet.ReadInt32();
            WriteLine("Page Material: " + pageMat);

            var startQuest = packet.ReadInt32();
            WriteLine("Start Quest: " + startQuest);

            var lockId = packet.ReadInt32();
            WriteLine("Lock ID: " + lockId);

            var material = (Material)packet.ReadInt32();
            WriteLine("Material: " + material);

            var sheath = (SheathType)packet.ReadInt32();
            WriteLine("Sheath Type: " + sheath);

            var randomProp = packet.ReadInt32();
            WriteLine("Random Property: " + randomProp);

            var randomSuffix = packet.ReadInt32();
            WriteLine("Random Suffix: " + randomSuffix);

            var block = packet.ReadInt32();
            WriteLine("Block: " + block);

            var itemSet = packet.ReadInt32();
            WriteLine("Item Set: " + itemSet);

            var maxDura = packet.ReadInt32();
            WriteLine("Max Durability: " + maxDura);

            var area = packet.ReadInt32();
            WriteLine("Area: " + area);

            var map = packet.ReadInt32();
            WriteLine("Map: " + map);

            var bagFamily = (BagFamilyMask)packet.ReadInt32();
            WriteLine("Bag Family: " + bagFamily);

            var totemCat = (TotemCategory)packet.ReadInt32();
            WriteLine("Totem Category: " + totemCat);

            var color = new ItemSocketColor[3];
            var content = new int[3];
            for (var i = 0; i < 3; i++)
            {
                color[i] = (ItemSocketColor)packet.ReadInt32();
                WriteLine("Socket Color " + i + ": " + color[i]);

                content[i] = packet.ReadInt32();
                WriteLine("Socket Item " + i + ": " + content[i]);
            }

            var socketBonus = packet.ReadInt32();
            WriteLine("Socket Bonus: " + socketBonus);

            var gemProps = packet.ReadInt32();
            WriteLine("Gem Properties: " + gemProps);

            var reqDisEnchSkill = packet.ReadInt32();
            WriteLine("Required Disenchant Skill: " + reqDisEnchSkill);

            var armorDmgMod = packet.ReadSingle();
            WriteLine("Armor Damage Modifier: " + armorDmgMod);

            var duration = packet.ReadInt32();
            WriteLine("Duration: " + duration);

            var limitCategory = packet.ReadInt32();
            WriteLine("Limit Category: " + limitCategory);

            var holidayId = (Holiday)packet.ReadInt32();
            WriteLine("Holiday: " + holidayId);
        }
Exemplo n.º 11
0
 public void HandleAddVoiceIgnore(Parser packet)
 {
     var name = packet.ReadCString();
     WriteLine("Name: " + name);
 }
Exemplo n.º 12
0
        public void HandleQuestOfferReward(Parser packet)
        {
            var guid = packet.ReadInt64();

            var questId = packet.ReadInt32();
                WriteLine("Quest ID: " + questId);

            var title = packet.ReadCString();
                WriteLine("Title: " + title);

            var RewardText = packet.ReadCString();
                WriteLine("Reward Text: " + RewardText);

            var QGWT = packet.ReadCString();
                WriteLine("QuestStart Window Text: " + QGWT);

            var QTN = packet.ReadCString();
                WriteLine("QuestStart Window Name: " + QTN);

            var QTWT = packet.ReadCString();
                WriteLine("QuestEnd Window Text: " + QTWT);

            var QTN1 = packet.ReadCString();
                WriteLine("QuestEnd Window Name: " + QTN1);

            var QSMID = packet.ReadInt32();
                WriteLine("QuestStart ModelID: " + QSMID);

            var QEMID = packet.ReadInt32();
                WriteLine("QuestEnd ModelID: " + QEMID);

            var EnableNext = packet.ReadByte();
                WriteLine("Enable Next: " + EnableNext);

            var flags = (QuestFlag)(packet.ReadInt32() | 0xFFFF);
                WriteLine("Quest Flag: " + flags);

            var SP = packet.ReadInt32();
                WriteLine("Suggested Players: " + SP);

            var EmoteCount = packet.ReadInt32();
                WriteLine("Emote Count: " + EmoteCount);

            for (int i = 0; i < EmoteCount; ++i)
            {
                var EDelay = packet.ReadInt32();
                    WriteLine("Emote Delay: " + EDelay);
                var EID = packet.ReadInt32();
                    WriteLine("Emote Id: " + EID);
            }

            var RewCIC = packet.ReadInt32();
                WriteLine("Reward Choice Items Amount: " + RewCIC);

            for (int i = 0; i < 6; ++i)
            {
                var RCID = packet.ReadInt32();
                    WriteLine("Reward Choice ItemId: " + RCID);
            }
            for (int i = 0; i < 6; ++i)
            {
                var RCIC = packet.ReadInt32();
                    WriteLine("Reward Choice Item Count: " + RCIC);
            }
            for (int i = 0; i < 6; ++i)
            {
                var RCIDis = packet.ReadInt32();
                    WriteLine("Reward Choice Item DisplayId: " + RCIDis);
            }

            var RewItCount = packet.ReadInt32();
                WriteLine("Reward Item Count: " + RewItCount);

            for (int i = 0; i < 4; ++i)
            {
                var RewItemId = packet.ReadInt32("RewItemId");
                    WriteLine("Reward Item Id: " + RewItemId);
            }
            for (int i = 0; i < 4; ++i)
            {
                var RewItemCount = packet.ReadInt32("RewItemCount");
                   WriteLine("Reward Item Count: " + RewItemCount);
            }

            for (int i = 0; i < 4; ++i)
            {
                var RewItemDisplayID = packet.ReadInt32("RewItemDisplay");
                    WriteLine("Reward Item DisplayId: " + RewItemDisplayID);
            }

            var RewMoney = packet.ReadInt32();
                WriteLine("Reward Money: " + RewMoney);

            var RewExp = packet.ReadInt32();
                WriteLine("Reward Experience: " + RewExp);

            var TitleId = packet.ReadInt32();
                WriteLine("Reward Title Id: " + TitleId);

            packet.ReadInt32("Unknown");
            packet.ReadInt32("Unknown");
            var Talent = packet.ReadInt32();
                WriteLine("Reward Talent Point: " + Talent);

            packet.ReadInt32("Unknown");
            packet.ReadInt32("Unknown");

            for (int i = 0; i < 5; ++i)
                packet.ReadInt32("Reward Faction");
            for (int i = 0; i < 5; ++i)
                packet.ReadInt32("Reward Reputation ValueId");
            for (int i = 0; i < 5; ++i)
                packet.ReadInt32("Reward Reputation Value");

            packet.ReadInt32("Spell Learn");
            packet.ReadInt32("Spell Cast");

            for (int i = 0; i < 10; ++i)
                packet.ReadInt32("Unknown");
        }
Exemplo n.º 13
0
        public void QUESTGIVER_QUEST_DETAILS(Parser packet)
        {
            var Guid1 = packet.ReadInt64();
            var Guid2 = packet.ReadInt64();

            var QID = packet.ReadInt32("QuestID");
                WriteLine("Quest ID: " + QID);

            packet.ReadCString("Quest Name");
            packet.ReadCString("Quest Description");
            packet.ReadCString("Quest Progress");
            packet.ReadCString("QuestGiverWindowText");
            packet.ReadCString("QuestTargetName");
            packet.ReadCString("QuestGiverWindowText #2");
            packet.ReadCString("QuestTargetName #2");
            packet.ReadInt32("QuestTargetModelID");
            packet.ReadInt32("QuestTargetModelID #2");
            packet.ReadByte("AcceptActivate");
            packet.ReadEnum<QuestFlag>("Flags");
            packet.ReadInt32("SugesstedPlayers");
            packet.ReadByte("QuestStartType");
            packet.ReadByte("QuestStartType");
            packet.ReadInt32("Required Spell");

            packet.ReadInt32("GetRewChoiceItemsCount");

            for (int i = 0; i < 6; ++i)
                packet.ReadInt32("RewChoiceItemId");

            for (int i = 0; i < 6; ++i)
                packet.ReadInt32("RewChoiceItemCount");

            for (int i = 0; i < 6; ++i)
                packet.ReadInt32("RewChoiceItemDisplayId");

            packet.ReadInt32("GetRewItemsCount");

            for (int i = 0; i < 4; ++i)
                packet.ReadInt32("RewItemId");

            for (int i = 0; i < 4; ++i)
                packet.ReadInt32("RewItemCount");

            for (int i = 0; i < 4; ++i)
                packet.ReadInt32("RewItemDisplayId");

            packet.ReadInt32("Money Rew?");
            packet.ReadInt32("Exp Rew?");

            for (int i = 0; i < 6; i++)
                packet.ReadInt32("Unknown");

            for (int i = 0; i < 5; ++i)
                packet.ReadInt32("RewRepFaction");

            for (int i = 0; i < 5; ++i)
                packet.ReadInt32("RewRepValueId");

            for (int i = 0; i < 5; ++i)
                packet.ReadInt32("RewRepValue");

            packet.ReadInt32("Spell Cast");
            packet.ReadInt32("Silent Spell Cast");

            for (int i = 0; i < 4; i++)
                packet.ReadInt32("Unknown");

            for (int i = 0; i < 4; i++)
                packet.ReadInt32("Unknown");

            packet.ReadInt32("Unknown");
            packet.ReadInt32("Unknown");

            packet.ReadInt32("Something with Emote");

            for (int i = 0; i < 4; ++i)
            {
                packet.ReadInt32("EmoteId");
                packet.ReadInt32("EmoteDelay");
            }
        }
Exemplo n.º 14
0
        public void HandleQuestQueryResponse(Parser packet)
        {
            var id = packet.ReadInt32();
            WriteLine("Entry: " + id);

            var method = (QuestMethod)packet.ReadInt32();
            WriteLine("Method: " + method);

            var level = packet.ReadInt32();
            WriteLine("Level: " + level);

            var minLevel = packet.ReadInt32();
            WriteLine("Min Level: " + minLevel);

            var sort = (QuestSort)packet.ReadInt32();
            WriteLine("Sort: " + sort);

            var type = (QuestType)packet.ReadInt32();
            WriteLine("Type: " + type);

            var players = packet.ReadInt32();
            WriteLine("Suggested Players: " + players);

            var factId = new int[2];
            var factRep = new int[2];
            for (var i = 0; i < 2; i++)
            {
                factId[i] = packet.ReadInt32();
                WriteLine("Required Faction ID " + i + ": " + factId[i]);

                factRep[i] = packet.ReadInt32();
                WriteLine("Required Faction Rep " + i + ": " + factRep[i]);
            }

            var nextQuest = packet.ReadInt32();
            WriteLine("Next Chain Quest: " + nextQuest);

            var xpId = packet.ReadInt32();
            WriteLine("Quest XP ID: " + xpId);

            var rewReqMoney = packet.ReadInt32();
            WriteLine("Reward/Required Money: " + rewReqMoney);

            var rewMoneyMaxLvl = packet.ReadInt32();
            WriteLine("Reward Money Max Level: " + rewMoneyMaxLvl);

            var rewSpell = packet.ReadInt32();
            WriteLine("Reward Spell: " + rewSpell);

            var rewSpellCast = packet.ReadInt32();
            WriteLine("Reward Spell Cast: " + rewSpellCast);

            var rewHonor = packet.ReadInt32();
            WriteLine("Reward Honor: " + rewHonor);

            var rewHonorBonus = packet.ReadSingle();
            WriteLine("Reward Honor Multiplier: " + rewHonorBonus);

            var srcItemId = packet.ReadInt32();
            WriteLine("Source Item ID: " + srcItemId);

            var flags = (QuestFlag)(packet.ReadInt32() | 0xFFFF);
            WriteLine("Flags: " + flags);

            var unk1 = packet.ReadInt32();
            WriteLine("Unknown: " + unk1);

            var titleId = packet.ReadInt32();
            WriteLine("Title ID: " + titleId);

            var reqPlayerKills = packet.ReadInt32();
            WriteLine("Required Player Kills: " + reqPlayerKills);

            var bonusTalents = packet.ReadInt32();
            WriteLine("Bonus Talents: " + bonusTalents);

            var bonusArenaPoints = packet.ReadInt32();
            WriteLine("Bonus Arena Points: " + bonusArenaPoints);

            var bonusUnk = packet.ReadInt32();
            WriteLine("SkillLine: " + bonusUnk);

            var unk2 = packet.ReadInt32();
            WriteLine("SkillPoints: " + unk2);

            var unk3 = packet.ReadInt32();
            WriteLine("Reward Faction Mask: " + unk3);

            var QuestGiverPortrait = packet.ReadInt32();
            WriteLine("QuestGiverPortrait: " + QuestGiverPortrait);

            var QuestTurnPortrait = packet.ReadInt32();
            WriteLine("QuestTurnPortrait: " + QuestTurnPortrait);

            var rewItemId = new int[4];
            var rewItemCnt = new int[4];
            for (var i = 0; i < 4; i++)
            {
                rewItemId[i] = packet.ReadInt32();
                WriteLine("Reward Item ID " + i + ": " + rewItemId[i]);

                rewItemCnt[i] = packet.ReadInt32();
                WriteLine("Reward Item Count " + i + ": " + rewItemCnt[i]);
            }

            var rewChoiceItemId = new int[6];
            var rewChoiceItemCnt = new int[6];
            for (var i = 0; i < 6; i++)
            {
                rewChoiceItemId[i] = packet.ReadInt32();
                WriteLine("Reward Choice Item ID " + i + ": " + rewChoiceItemId[i]);

                rewChoiceItemCnt[i] = packet.ReadInt32();
                WriteLine("Reward Choice Item Count " + i + ": " + rewChoiceItemCnt[i]);
            }

            var rewFactionId = new int[5];
            for (var i = 0; i < 5; i++)
            {
                rewFactionId[i] = packet.ReadInt32();
                WriteLine("Reward Faction ID " + i + ": " + rewFactionId[i]);
            }

            var rewRepIdx = new int[5];
            for (var i = 0; i < 5; i++)
            {
                rewRepIdx[i] = packet.ReadInt32();
                WriteLine("Reward Reputation ID " + i + ": " + rewRepIdx[i]);
            }

            var rewRepOverride = new int[5];
            for (var i = 0; i < 5; i++)
            {
                rewRepOverride[i] = packet.ReadInt32();
                WriteLine("Reward Rep Override " + i + ": " + rewRepOverride[i]);
            }

            var pointMap = packet.ReadInt32();
            WriteLine("Point Map ID: " + pointMap);

            var pointX = packet.ReadSingle();
            WriteLine("Point X: " + pointX);

            var pointY = packet.ReadSingle();
            WriteLine("Point Y: " + pointY);

            var pointOpt = packet.ReadInt32();
            WriteLine("Point Opt: " + pointOpt);

            var title = packet.ReadCString();
            WriteLine("Title: " + title);

            var objectives = packet.ReadCString();
            WriteLine("Objectives: " + objectives);

            var details = packet.ReadCString();
            WriteLine("Details: " + details);

            var endText = packet.ReadCString();
            WriteLine("End Text: " + endText);

            var returnText = packet.ReadCString();
            WriteLine("Return Text: " + returnText);

            var reqId = new KeyValuePair<int, bool>[4];
            var reqCnt = new int[4];
            var srcId = new int[4];
            var srcCnt = new int[4];
            for (var i = 0; i < 4; i++)
            {
                reqId[i] = packet.ReadEntry();
                WriteLine("Required " + (reqId[i].Value ? "GO" : "NPC") +
                    " ID " + i + ": " + reqId[i].Key);

                reqCnt[i] = packet.ReadInt32();
                WriteLine("Required Count: " + i + ": " + reqCnt[i]);

                srcId[i] = packet.ReadInt32();
                WriteLine("Source ID: " + i + ": " + srcId[i]);

                srcCnt[i] = packet.ReadInt32();
                WriteLine("Source Count: " + i + ": " + srcCnt[i]);
            }

            var reqItemId = new int[6];
            var reqItemCnt = new int[6];
            for (var i = 0; i < 6; i++)
            {
                reqItemId[i] = packet.ReadInt32();
                WriteLine("Required Item ID " + i + ": " + reqItemId[i]);

                reqItemCnt[i] = packet.ReadInt32();
                WriteLine("Required Item Count: " + i + ": " + reqItemCnt[i]);
            }

            var objectiveText = new string[4];
            for (var i = 0; i < 4; i++)
            {
                objectiveText[i] = packet.ReadCString();
                WriteLine("Objective Text " + i + ": " + objectiveText[i]);
            }

            //SQLStore.WriteData(SQLStore.Quests.GetCommand(id, method, level, minLevel, sort, type,
            //    players, factId, factRep, nextQuest, xpId, rewReqMoney, rewMoneyMaxLvl,
            //    rewSpell, rewSpellCast, rewHonor, rewHonorBonus, srcItemId, flags, titleId,
            //    reqPlayerKills, bonusTalents, bonusArenaPoints, bonusUnk, rewItemId, rewItemCnt,
            //    rewChoiceItemId, rewChoiceItemCnt, rewFactionId, rewRepIdx, rewRepOverride,
            //    pointMap, pointX, pointY, pointOpt, title, objectives, details, endText,
            //    returnText, reqId, reqCnt, srcId, srcCnt, reqItemId, reqItemCnt, objectiveText));
        }
Exemplo n.º 15
0
        public void HandleNpcTextUpdate(Parser packet)
        {
            var entry = packet.ReadInt32();
            WriteLine("Entry: " + entry);

            var prob = new float[8];
            var text1 = new string[8];
            var text2 = new string[8];
            var lang = new Language[8];
            var emDelay = new int[8][];
            var emEmote = new int[8][];
            for (var i = 0; i < 8; i++)
            {
                prob[i] = packet.ReadSingle();
                WriteLine("Probability " + i + ": " + prob[i]);

                text1[i] = packet.ReadCString();
                WriteLine("Text 1 " + i + ": " + text1[i]);

                text2[i] = packet.ReadCString();
                WriteLine("Text 2 " + i + ": " + text2[i]);

                lang[i] = (Language)packet.ReadInt32();
                WriteLine("Language " + i + ": " + lang[i]);

                emDelay[i] = new int[3];
                emEmote[i] = new int[3];
                for (var j = 0; j < 3; j++)
                {
                    emDelay[i][j] = packet.ReadInt32();
                    WriteLine("Emote Delay " + j + ": " + emDelay[i][j]);

                    emEmote[i][j] = packet.ReadInt32();
                    WriteLine("Emote ID " + j + ": " + emEmote[i][j]);
                }
            }

            //SQLStore.WriteData(SQLStore.NpcTexts.GetCommand(entry, prob, text1, text2, lang, emDelay, emEmote));
        }
Exemplo n.º 16
0
        public void HandleCreatureQueryResponse(Parser packet)
        {
            var entry = packet.ReadEntry();
            WriteLine("Entry: " + entry.Key);

            if (entry.Value)
                return;

            var name = new string[8];
            for (var i = 0; i < 8; i++)
            {
                name[i] = packet.ReadCString();
                WriteLine("Name " + i + ": " + name[i]);
            }

            var subName = packet.ReadCString();
            WriteLine("Sub Name: " + subName);

            var iconName = packet.ReadCString();
            WriteLine("Icon Name: " + iconName);

            var typeFlags = (CreatureTypeFlag)packet.ReadInt32();
            WriteLine("Type Flags: " + typeFlags);

            //Allways 0?
            packet.ReadInt32("Unknown");

            var type = (CreatureType)packet.ReadInt32();
            WriteLine("Type: " + type);

            var family = (CreatureFamily)packet.ReadInt32();
            WriteLine("Family: " + family);

            var rank = (CreatureRank)packet.ReadInt32();
            WriteLine("Rank: " + rank);

            var killCredit = new int[2];
            for (var i = 0; i < 2; i++)
            {
                killCredit[i] = packet.ReadInt32();
                WriteLine("Kill Credit " + i + ": " + killCredit[i]);
            }

            var dispId = new int[4];
            for (var i = 0; i < 4; i++)
            {
                dispId[i] = packet.ReadInt32();
                WriteLine("Display ID " + i + ": " + dispId[i]);
            }

            var mod1 = packet.ReadSingle();
            WriteLine("Modifier 1: " + mod1);

            var mod2 = packet.ReadSingle();
            WriteLine("Modifier 2: " + mod2);

            var racialLeader = packet.ReadBoolean();
            WriteLine("Racial Leader: " + racialLeader);

            var qItem = new int[6];
            for (var i = 0; i < 6; i++)
            {
                qItem[i] = packet.ReadInt32();
                WriteLine("Quest Item " + i + ": " + qItem[i]);
            }

            var moveId = packet.ReadInt32();
            WriteLine("Movement ID: " + moveId);

            packet.ReadInt32("Unknown"); // 0 ?

               //SQLStore.WriteData(SQLStore.Creatures.GetCommand(entry.Key, name[0], subName, iconName, typeFlags,
               //     type, family, rank, killCredit, dispId, mod1, mod2, racialLeader, qItem, moveId));
        }
Exemplo n.º 17
0
        public void HandleNpcGossip(Parser packet)
        {
            var guid = packet.ReadGuid();
            WriteLine("GUID: " + guid);

            var entry = packet.ReadUInt32();
            WriteLine("Menu id: " + entry);

            var textid = packet.ReadUInt32();
            WriteLine("Text id: " + textid);

            var count = packet.ReadUInt32();
            WriteLine("- Amount of Options: " + count);

            for (var i = 0; i < count; i++)
            {
                if (i != 0)
                    WriteLine("\t--");

                var index = packet.ReadUInt32();
                WriteLine("\tIndex: " + index);

                var icon = packet.ReadByte();
                WriteLine("\tIcon: " + icon);

                var box = packet.ReadBoolean();
                WriteLine("\tBox: " + box);

                var boxMoney = packet.ReadUInt32();
                if (box) // Only print if there's a box. avaliable.
                    WriteLine("\tRequired money: " + boxMoney);

                var text = packet.ReadCString();
                WriteLine("\tText: " + text);

                var boxText = packet.ReadCString();
                if (box) // Only print if there's a box avaliable.
                    WriteLine("\tBox text: " + boxText);
            }

            var questgossips = packet.ReadUInt32();
            WriteLine("- Amount of Quest gossips: " + questgossips);

            for (var i = 0; i < questgossips; i++)
            {
                if (i != 0)
                    WriteLine("\t--");

                var questID = packet.ReadUInt32();
                WriteLine("\tQuest ID: " + questID);

                var questicon = packet.ReadUInt32();
                WriteLine("\tIcon: " + questicon);

                var questlevel = packet.ReadInt32();
                WriteLine("\tLevel: " + questlevel);

                var flags = (QuestFlag)(packet.ReadUInt32() | 0xFFFF);
                WriteLine("\tFlags: " + flags);

                var unk1 = packet.ReadBoolean();
                WriteLine("\tUnknown bool: " + unk1);

                var title = packet.ReadCString();
                WriteLine("\tTitle: " + title);
            }
        }
Exemplo n.º 18
0
        public void HandleServerTrainerList(Parser packet)
        {
            var guid = packet.ReadGuid();
            WriteLine("GUID: " + guid);

            var type = (TrainerType)packet.ReadInt32();
            WriteLine("Type: " + type);

            var count = packet.ReadInt32();
            WriteLine("Count: " + count);

            for (var i = 0; i < count; i++)
            {
                var spell = packet.ReadInt32();
                WriteLine("Spell ID " + i + ": " + spell);

                var state = (TrainerSpellState)packet.ReadByte();
                WriteLine("State " + i + ": " + state);

                var cost = packet.ReadInt32();
                WriteLine("Cost " + i + ": " + cost);

                var profDialog = packet.ReadBoolean();
                WriteLine("Profession Dialog " + i + ": " + profDialog);

                var profButton = packet.ReadBoolean();
                WriteLine("Profession Button " + i + ": " + profButton);

                var reqLevel = packet.ReadInt32();
                WriteLine("Required Level " + i + ": " + reqLevel);

                var reqSkill = packet.ReadInt32();
                WriteLine("Required Skill " + i + ": " + reqSkill);

                var reqSkLvl = packet.ReadInt32();
                WriteLine("Required Skill Level " + i + ": " + reqSkLvl);

                var chainNode1 = packet.ReadInt32();
                WriteLine("Chain Node 1 " + i + ": " + chainNode1);

                var chainNode2 = packet.ReadInt32();
                WriteLine("Chain Node 2 " + i + ": " + chainNode2);

                var unk = packet.ReadInt32();
                WriteLine("Unk Int32 " + i + ": " + unk);

                //SQLStore.WriteData(SQLStore.TrainerSpells.GetCommand(guid.GetEntry(), spell, cost, reqLevel,
                //    reqSkill, reqSkLvl));
            }

            var titleStr = packet.ReadCString();
            WriteLine("Title: " + titleStr);
        }
Exemplo n.º 19
0
        public void HandleNameQueryResponse(Parser packet)
        {
            var pguid = packet.ReadPackedGuid();
            WriteLine("GUID: " + pguid);

            var end = packet.ReadBoolean();
            WriteLine("Name Found: " + !end);

            if (end)
                return;

            var name = packet.ReadCString();
            WriteLine("Name: " + name);

            var realmName = packet.ReadCString();
            WriteLine("Realm Name: " + realmName);

            var race = (Race)packet.ReadByte();
            WriteLine("Race: " + race);

            var gender = (Gender)packet.ReadByte();
            WriteLine("Gender: " + gender);

            var cClass = (Class)packet.ReadByte();
            WriteLine("Class: " + cClass);

            var decline = packet.ReadBoolean();
            WriteLine("Name Declined: " + decline);

            if (!decline)
                return;

            for (var i = 0; i < 5; i++)
            {
                var declinedName = packet.ReadCString();
                WriteLine("Declined Name " + i + ": " + declinedName);
            }
        }
Exemplo n.º 20
0
        public void HandlePageTextResponse(Parser packet)
        {
            var entry = packet.ReadInt32();
            WriteLine("Entry: " + entry);

            var text = packet.ReadCString();
            WriteLine("Page Text: " + text);

            var pageId = packet.ReadInt32();
            WriteLine("Next Page: " + pageId);

            //SQLStore.WriteData(SQLStore.PageTexts.GetCommand(entry, text, pageId));
        }
Exemplo n.º 21
0
        public void HandleGroupList(Parser packet)
        {
            var grouptype = (GroupTypeFlag)packet.ReadByte();
            WriteLine("Group Type: " + grouptype);

            var subgroup = packet.ReadByte();
            WriteLine("Sub Group: " + subgroup);

            var flags = (GroupUpdateFlag)packet.ReadByte();
            WriteLine("Flags: " + flags);

            var isbg = packet.ReadBoolean();
            WriteLine("Is Battleground: " + isbg);

            if (grouptype.HasFlag(GroupTypeFlag.LookingForDungeon))
            {
                var dungeonStatus = (InstanceStatus)packet.ReadByte();
                WriteLine("Dungeon Status: " + dungeonStatus);

                var lfgentry = ReadInt32();//packet.ReadLfgEntry();
                WriteLine("LFG Entry: " + lfgentry);
            }

            var unkint2 = packet.ReadInt64();
            WriteLine("Unk Int64: " + unkint2);

            var counter = packet.ReadInt32();
            WriteLine("Counter: " + counter);

            var numFields = packet.ReadInt32();
            WriteLine("Member Count: " + numFields);

            for (var i = 0; i < numFields; i++)
            {
                var name = packet.ReadCString();
                WriteLine("Name " + i + ": " + name);

                var guid = packet.ReadGuid();
                WriteLine("GUID " + i + ": " + guid);

                var status = (GroupMemberStatusFlag)packet.ReadByte();
                WriteLine("Status " + i + ": " + status);

                var subgroup1 = packet.ReadByte();
                WriteLine("Sub Group" + i + ": " + subgroup1);

                var flags1 = (GroupUpdateFlag)packet.ReadByte();
                WriteLine("Update Flags " + i + ": " + flags1);

                var role = (LfgRoleFlag)packet.ReadByte();
                WriteLine("Role " + i + ": " + role);
            }

            var leaderGuid = packet.ReadGuid();
            WriteLine("Leader GUID: " + leaderGuid);

            if (numFields <= 0)
                return;

            var loot = (LootMethod)packet.ReadByte();
            WriteLine("Loot Method: " + loot);

            var looterGuid = packet.ReadGuid();
            WriteLine("Looter GUID: " + looterGuid);

            var item = (ItemQuality)packet.ReadByte();
            WriteLine("Loot Threshold: " + item);

            var dungeonDifficulty = (MapDifficulty)packet.ReadByte();
            WriteLine("Dungeon Difficulty: " + dungeonDifficulty);

            var raidDifficulty = (MapDifficulty)packet.ReadByte();
            WriteLine("Raid Difficulty: " + raidDifficulty);

            var unkbyte3 = packet.ReadByte();
            WriteLine("Unk Byte: " + unkbyte3);
        }
Exemplo n.º 22
0
        public void HandleGuildQueryResponse(Parser packet)
        {
            packet.ReadInt64("Guild ID");
            packet.ReadCString("Name");
            for (byte rank = 0; rank < 10; rank++)
                packet.ReadCString("Rank " + rank + " name");

            for (byte rank = 0; rank < 10; rank++)
                packet.ReadInt32("Rank " + rank + " real rank ID");

            // ignore these as they seem to always be identical to the above loop
            for (byte rank = 0; rank < 10; rank++)
                packet.ReadInt32();

            packet.ReadInt32("Emblem style");
            packet.ReadInt32("Emblem color");
            packet.ReadInt32("Emblem border style");
            packet.ReadInt32("Emblem border color");
            packet.ReadInt32("Emblem background color");
            packet.ReadInt32("Unk int from WotLK");
        }
Exemplo n.º 23
0
 public void HandleGroupSetLeader(Parser packet)
 {
     var name = packet.ReadCString();
     WriteLine("Name: " + name);
 }
Exemplo n.º 24
0
        public void HandleVoiceRosterUpdate(Parser packet)
        {
            var unk64 = packet.ReadInt64();
            WriteLine("Unk Int64: " + unk64);

            var chanId = packet.ReadInt16();
            WriteLine("Channel ID: " + chanId);

            var chanName = packet.ReadCString();
            WriteLine("Channel Name: " + chanName);

            var key = Encoding.UTF8.GetString(packet.ReadBytes(16));
            WriteLine("Encryption Key: " + key);

            var ip = packet.ReadInt32();
            WriteLine("Voice Server IP: " + ip);

            var count = packet.ReadByte();
            WriteLine("Player Count: " + count);

            var leaderGuid = packet.ReadGuid();
            WriteLine("Leader GUID: " + leaderGuid);

            var leaderFlags = packet.ReadByte();
            WriteLine("Leader Flags: 0x" + leaderFlags.ToString("X2"));

            var unk = packet.ReadByte();
            WriteLine("Unk Byte 1: " + unk);

            for (var i = 0; i < count - 1; i++)
            {
                var guid = packet.ReadGuid();
                WriteLine("Player GUID: " + guid);

                var idx = packet.ReadByte();
                WriteLine("Index: " + idx);

                var flags = packet.ReadByte();
                WriteLine("Flags: 0x" + flags.ToString("X2"));

                var unk2 = packet.ReadByte();
                WriteLine("Unk Byte 2: " + unk2);
            }
        }
Exemplo n.º 25
0
        public void HandleServerChatMessage(Parser packet)
        {
            var type = (ChatMessageType)packet.ReadByte();
            WriteLine("Type: " + type);

            var lang = (Language)packet.ReadInt32();
            WriteLine("Language: " + lang);

            var guid = packet.ReadGuid();
            WriteLine("GUID: " + guid);

            var unkInt = packet.ReadInt32();
            WriteLine("Unk Int32: " + unkInt);

            switch (type)
            {
                case ChatMessageType.Say:
                case ChatMessageType.Yell:
                case ChatMessageType.Party:
                case ChatMessageType.PartyLeader:
                case ChatMessageType.Raid:
                case ChatMessageType.RaidLeader:
                case ChatMessageType.RaidWarning:
                case ChatMessageType.Guild:
                case ChatMessageType.Officer:
                case ChatMessageType.Emote:
                case ChatMessageType.TextEmote:
                case ChatMessageType.Whisper:
                case ChatMessageType.WhisperInform:
                case ChatMessageType.System:
                case ChatMessageType.Channel:
                case ChatMessageType.Battleground:
                case ChatMessageType.BattlegroundNeutral:
                case ChatMessageType.BattlegroundAlliance:
                case ChatMessageType.BattlegroundHorde:
                case ChatMessageType.BattlegroundLeader:
                case ChatMessageType.Achievement:
                case ChatMessageType.GuildAchievement:
                {
                    if (type == ChatMessageType.Channel)
                    {
                        var chanName = packet.ReadCString();
                        WriteLine("Channel Name: " + chanName);
                    }

                    var senderGuid = packet.ReadGuid();
                    WriteLine("Sender GUID: " + senderGuid);
                    break;
                }
                case ChatMessageType.MonsterSay:
                case ChatMessageType.MonsterYell:
                case ChatMessageType.MonsterParty:
                case ChatMessageType.MonsterEmote:
                case ChatMessageType.MonsterWhisper:
                case ChatMessageType.RaidBossEmote:
                case ChatMessageType.RaidBossWhisper:
                case ChatMessageType.BattleNet:
                {
                    var nameLen = packet.ReadInt32();
                    WriteLine("Name Length: " + nameLen);

                    var name = packet.ReadCString();
                    WriteLine("Name: " + name);

                    var target = packet.ReadGuid();
                    WriteLine("Receiver GUID: " + guid);

                    if (target.Full != 0)
                    {
                        var tNameLen = packet.ReadInt32();
                        WriteLine("Receiver Name Length: " + tNameLen);

                        var tName = packet.ReadCString();
                        WriteLine("Receiver Name: " + tName);
                    }
                    break;
                }
            }

            var textLen = packet.ReadInt32();
            WriteLine("Text Length: " + textLen);

            var text = packet.ReadCString();
            WriteLine("Text: " + text);

            var chatTag = (ChatTag)packet.ReadByte();
            WriteLine("Chat Tag: " + chatTag);

            if (type != ChatMessageType.Achievement && type != ChatMessageType.GuildAchievement)
                return;

            var achId = packet.ReadInt32();
            WriteLine("Achievement ID: " + achId);
        }