Example #1
0
            public GuildQuest(Tera.Game.TeraMessageReader r) : base(r)
            {
                targetsCount    = r.ReadUInt16();
                targetsOffset   = r.ReadUInt16();
                unk1            = r.ReadUInt16();
                unk2            = r.ReadUInt16();
                rewardsCount    = r.ReadUInt16();
                rewardsOffset   = r.ReadUInt16();
                unkOffset       = r.ReadUInt16();
                questIdOffset   = r.ReadUInt16();
                guildNameOffset = r.ReadUInt16();
                questId         = r.ReadUInt16();
                unk3            = r.ReadUInt16();
                questType       = r.ReadUInt16();
                unk5            = r.ReadUInt16();
                guildSize       = r.ReadUInt16();
                unk6            = r.ReadUInt16();
                unk7            = r.ReadUInt16();
                unk8            = r.ReadUInt16();
                unk9            = r.ReadUInt16();
                unk10           = r.ReadUInt16();
                questStatus     = r.ReadUInt32();
                timeLeft        = r.ReadUInt32();
                unk11           = r.ReadUInt32();
                unk12           = r.ReadUInt32();
                completed       = r.ReadByte();
                s1        = r.ReadTeraString();
                s2        = r.ReadTeraString();
                guildName = r.ReadTeraString();

                Targets = new List <GuildQuestTarget>();

                for (int i = 0; i < targetsCount; i++)
                {
                    var t = new GuildQuestTarget();
                    r.Skip(4);
                    t.ZoneId         = r.ReadUInt32();
                    t.TemplateId     = r.ReadUInt32();
                    t.AmountDone     = r.ReadUInt32();
                    t.AmountRequired = r.ReadUInt32();

                    Targets.Add(t);
                }

                Rewards = new List <GuildQuestReward>();

                for (int i = 0; i < rewardsCount; i++)
                {
                    var re = new GuildQuestReward();
                    r.Skip(4);
                    re.Id     = r.ReadUInt32();
                    re.Amount = r.ReadUInt32();
                    re.Unk16  = r.ReadUInt32();

                    Rewards.Add(re);
                }
            }