Ejemplo n.º 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);
                }
            }
Ejemplo n.º 2
0
 private static string ReplaceTargetInfo(string str, GuildQuest quest, GuildQuestTarget target)
 {
     str = str.Replace("{target_current_count}", target.CountQuest.ToString());
     str = str.Replace("{target_total_count}", target.TotalQuest.ToString());
     str = str.Replace("{target_remaining}", (target.TotalQuest - target.CountQuest).ToString());
     var targetName = "";
     switch (quest.GuildQuestType1)
     {
         case Tera.Game.Messages.S_GUILD_QUEST_LIST.GuildQuestType.Hunt:
             targetName = BasicTeraData.Instance.MonsterDatabase.GetAreaName((ushort)target.ZoneId);
             break;
         case Tera.Game.Messages.S_GUILD_QUEST_LIST.GuildQuestType.Battleground:
         case Tera.Game.Messages.S_GUILD_QUEST_LIST.GuildQuestType.Gathering:
             targetName += BasicTeraData.Instance.QuestInfoDatabase.Get((int)target.TargetId);
             break;
     }
     str = str.Replace("{target_name}", targetName);
     return str;
 }