Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new client based on specified settings. Bot name determined by clientIndex
        /// using list of names found in settings.
        /// </summary>
        /// <param name="settings">Idleclient settings</param>
        /// <param name="clientIndex">Index of bot name from settings.BotNames</param>
        public ClientDriver(Config settings, int clientIndex)
        {
            this.settings    = settings;
            this.ClientIndex = clientIndex;

            ItemDefs.LoadItemDefs();
        }
Ejemplo n.º 2
0
 public ProcessInstanceBuilder AddItemDef(string id, ItemKinds itemKind, bool isCollection, string structuredRef)
 {
     ItemDefs.Add(new ItemDefinition {
         Id = id, ItemKind = itemKind, IsCollection = isCollection, StructureRef = structuredRef
     });
     return(this);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Disposes of resources.
        /// </summary>
        internal void Unload()
        {
            if (ContentHandler != null)
            {
                ContentHandler.Unload();
                ContentHandler = null;
            }

            if (BgmEntries != null)
            {
                BgmEntries.Clear();
                BgmEntries = null;
            }

            if (ItemDefs != null)
            {
                ItemDefs.Clear();
                ItemDefs = null;
            }

            if (NpcDefs != null)
            {
                NpcDefs.Clear();
                NpcDefs = null;
            }

            if (ProjectileDefs != null)
            {
                ProjectileDefs.Clear();
                ProjectileDefs = null;
            }

            if (TileDefs != null)
            {
                TileDefs.Clear();
                TileDefs = null;
            }

            if (RecipeDefs != null)
            {
                RecipeDefs.Clear();
                RecipeDefs = null;
            }
        }
 public override object Clone()
 {
     return(new ProcessInstanceAggregate
     {
         AggregateId = AggregateId,
         ProcessFileId = ProcessFileId,
         ProcessFileName = ProcessFileName,
         Version = Version,
         CreateDateTime = CreateDateTime,
         UpdateDateTime = UpdateDateTime,
         Status = Status,
         SequenceFlows = SequenceFlows.Select(_ => (SequenceFlow)_.Clone()).ToList(),
         SerializedElementDefs = SerializedElementDefs.Select(_ => (SerializedFlowNodeDefinition)_.Clone()).ToList(),
         ElementInstances = ElementInstances.Select(_ => (FlowNodeInstance)_.Clone()).ToList(),
         ExecutionPathLst = ExecutionPathLst.Select(_ => (ExecutionPath)_.Clone()).ToList(),
         ItemDefs = ItemDefs.Select(_ => (ItemDefinition)_.Clone()).ToList(),
         Messages = Messages.Select(_ => (Message)_.Clone()).ToList(),
         Interfaces = Interfaces.Select(_ => (BPMNInterface)_.Clone()).ToList(),
         StateTransitions = StateTransitions.Select(_ => (StateTransitionToken)_.Clone()).ToList()
     });
 }
Ejemplo n.º 5
0
        static void Main(string[] args)
        {
            ItemDefs.LoadItemDefs();

            //9C 04 17 10 B7 01 00 00 10 00 82 00 65 00 00 22 F6 86 07 82 80 F0 1F
            //box Horadric Cube
            byte[] packet = { 0x9C, 0x04, 0x1F, 0x01, 0xB8, 0x01, 0x00, 0x00, 0x10, 0x08, 0x80, 0x00, 0x65, 0x00, 0xC0, 0x72, 0x46, 0x87, 0x06, 0x02, 0x96, 0xD8, 0x86, 0x93, 0xBA, 0xE9, 0x18, 0xE8, 0x20, 0xFF, 0x01 };

            byte[] oreWith1Blue1Green       = { 0x9C, 0x02, 0x21, 0x10, 0x97, 0x01, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x65, 0x8C, 0x87, 0x22, 0xFF, 0xE2, 0x4D, 0xAE, 0x0C, 0x04, 0xC4, 0x63, 0x88, 0xB4, 0x07, 0x00, 0xB0, 0x3D, 0x00, 0x80, 0xFF };
            byte[] smcharm_5life_3psnResist = { 0x9C, 0x02, 0x21, 0x10, 0xB0, 0x01, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x65, 0x8C, 0x87, 0x22, 0xFF, 0x62, 0x0C, 0x2F, 0x06, 0x04, 0x13, 0x0A, 0xF6, 0x91, 0xCF, 0x81, 0x12, 0x2D, 0xD8, 0xFE, 0x03 };
            byte[] tomeOfIdentification     = { 0x9C, 0x02, 0x1B, 0x10, 0x89, 0x01, 0x00, 0x00, 0x10, 0x00, 0x82, 0x00, 0x65, 0x8C, 0x87, 0x22, 0xFF, 0x22, 0x4D, 0x6C, 0x0D, 0x04, 0x01, 0x21, 0xA0, 0xF8, 0x0F };
            byte[] tomeOfTP = { 0x9C, 0x02, 0x1B, 0x10, 0x88, 0x01, 0x00, 0x00, 0x10, 0x00, 0x82, 0x00, 0x65, 0x8C, 0x87, 0x22, 0xFF, 0x82, 0x4E, 0x6C, 0x0D, 0x04, 0x01, 0x01, 0x90, 0xF8, 0x0F };

            Item parsedItem = new Item(packet);

            Console.WriteLine(parsedItem);
            foreach (var item in parsedItem.Properties)
            {
                Console.WriteLine("\t" + item);
            }
        }
 public override object Clone()
 {
     return(new ProcessInstanceAggregate
     {
         AggregateId = AggregateId,
         ProcessFileId = ProcessFileId,
         ProcessFileName = ProcessFileName,
         Version = Version,
         CreateDateTime = CreateDateTime,
         UpdateDateTime = UpdateDateTime,
         Status = Status,
         SequenceFlows = new ConcurrentBag <SequenceFlow>(SequenceFlows.Select(_ => (SequenceFlow)_.Clone())),
         ElementDefs = new ConcurrentBag <BaseFlowNode>(ElementDefs.Select(_ => (BaseFlowNode)_.Clone())),
         ElementInstances = new ConcurrentBag <FlowNodeInstance>(ElementInstances.Select(_ => (FlowNodeInstance)_.Clone())),
         ExecutionPathLst = new ConcurrentBag <ExecutionPath>(ExecutionPathLst.Select(_ => (ExecutionPath)_.Clone())),
         ItemDefs = new ConcurrentBag <ItemDefinition>(ItemDefs.Select(_ => (ItemDefinition)_.Clone())),
         Messages = new ConcurrentBag <Message>(Messages.Select(_ => (Message)_.Clone())),
         Interfaces = new ConcurrentBag <BPMNInterface>(Interfaces.Select(_ => (BPMNInterface)_.Clone())),
         StateTransitions = new ConcurrentBag <StateTransitionNotification>(StateTransitions.Select(_ => (StateTransitionNotification)_.Clone()))
     });
 }
 public ItemDefinition GetItem(string itemRef)
 {
     return(ItemDefs.FirstOrDefault(_ => _.EltId == itemRef));
 }
Ejemplo n.º 8
0
 public ItemDisplayResponse(Item item)
 {
     Title         = ItemDefs.GetItemDescription(item.ItemCode);
     UniqueSetName = ItemDefs.GetUniqueSetName(item.ItemCode);
     ImageFile     = ItemDefs.GetItemImageFile(item);
 }