// Go go maximum code duplication (for now)
        public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
        {
            QuestDefiniton def = new QuestDefiniton();
            def.dateOrSomething = "2012/01/05";
            def.needsToBeNonzero = 0x00000020;
            def.getsSetToWord = 0x0000000B;
            def.questNameString = 30010;
            def.playTime = (byte)QuestListPacket.EstimatedTime.Short;
            def.partyType = (byte)QuestListPacket.PartyType.SinglePartyQuest;
            def.difficulties = (byte)QuestListPacket.Difficulties.Normal | (byte)QuestListPacket.Difficulties.hard | (byte)QuestListPacket.Difficulties.VeryHard | (byte)QuestListPacket.Difficulties.SuperHard;
            def.requiredLevel = 1;
            // Not sure why but these need to be set for the quest to be enabled
            def.field_FF = 0xF1;
            def.field_101 = 1;

            QuestDifficultyPacket.QuestDifficulty diff = new QuestDifficultyPacket.QuestDifficulty();
            diff.dateOrSomething = "2012/01/05";
            diff.something = 0x20;
            diff.something2 = 0x0B;
            diff.questNameString = 30010;

            // These are likely bitfields
            diff.something3 = 0x00030301;

            var quest = new Quest("arks_010120");
            quest.questDef = def;
            context.currentParty.currentQuest = quest;
            context.SendPacket(new SetQuestPacket(def, context.User));
            context.SendPacket(new QuestStartPacket(def, diff));
        }
Пример #2
0
 public QuestListPacket(QuestDefiniton[] questdefs)
 {
     this.questdefs = questdefs;
 }
Пример #3
0
 public SetQuestPacket(QuestDefiniton questdef, Database.Player p)
 {
     this.questdef = questdef;
     this.p = p;
 }
Пример #4
0
 public QuestStartPacket(QuestDefiniton data, QuestDifficultyPacket.QuestDifficulty difficulty)
 {
     this.data = data;
     this.difficulty = difficulty;
 }
        public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
        {
            // What am I doing
            QuestDefiniton[] defs = new QuestDefiniton[1];
            for (int i = 0; i < defs.Length; i++)
            {
                defs[i].dateOrSomething = "2012/01/05";
                defs[i].needsToBeNonzero = 0x00000020;
                defs[i].getsSetToWord = 0x0000000B;
                defs[i].questNameString = 30010;
                defs[i].playTime = (byte)QuestListPacket.EstimatedTime.Short;
                defs[i].partyType = (byte)QuestListPacket.PartyType.SinglePartyQuest;
                defs[i].difficulties = (byte)QuestListPacket.Difficulties.Normal | (byte)QuestListPacket.Difficulties.hard | (byte)QuestListPacket.Difficulties.VeryHard | (byte)QuestListPacket.Difficulties.SuperHard;
                defs[i].requiredLevel = 1;
                // Not sure why but these need to be set for the quest to be enabled
                defs[i].field_FF = 0xF1;
                defs[i].field_101 = 1;
            }

            context.SendPacket(new QuestListPacket(defs));
            context.SendPacket(new NoPayloadPacket(0xB, 0x1B));
        }