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));
        }
        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));
        }
Beispiel #3
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));
        }
Beispiel #4
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));
        }
Beispiel #5
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);
        }