Example #1
0
 public static bool isInventoryObject(this Hashtable hash)
 {
     if (hash.ContainsKey((int)SPC.PlacingType))
     {
         PlacingType placingType = (PlacingType)(int)hash[(int)SPC.PlacingType];
         if (placingType == PlacingType.Inventory)
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
 public PlanePositioningOptions(
     GameObject[] gameObjects      = null,
     IndicatorType indicatorType   = IndicatorType.onlyIndicator,
     PlacingType placingType       = PlacingType.activate,
     GameObject placementIndicator = null,
     Material highlightMaterial    = null
     )
 {
     ObjectsToActivateFirst = gameObjects;
     IndicatorType          = indicatorType;
     PlacingType            = placingType;
     PlacementIndicator     = placementIndicator;
     HightlightMaterial     = highlightMaterial;
 }
        public override bool Check(AuctionItem auctionItem)
        {
            if (auctionItem.objectInfo.ContainsKey((int)SPC.PlacingType))
            {
                PlacingType placingType = (PlacingType)(int)auctionItem.objectInfo[(int)SPC.PlacingType];

                if (auctionItem.objectInfo.ContainsKey((int)SPC.ItemType))
                {
                    InventoryObjectType itemType = (InventoryObjectType)(byte)(int)auctionItem.objectInfo[(int)SPC.ItemType];
                    if (itemType == InventoryObjectType.Weapon && mAuctionObjectType == AuctionObjectType.Weapon)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.Scheme && mAuctionObjectType == AuctionObjectType.Scheme)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.Material && mAuctionObjectType == AuctionObjectType.Ore)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.Module && mAuctionObjectType == AuctionObjectType.Module)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.nebula_element && mAuctionObjectType == AuctionObjectType.nebula_element)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.craft_resource && mAuctionObjectType == AuctionObjectType.craft_resource)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.pet_scheme && mAuctionObjectType == AuctionObjectType.pet_scheme)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Example #4
0
 public static Hashtable ItemHash(string id, int level, ObjectColor color, InventoryObjectType type, PlacingType placingType, bool binded, bool splittable)
 {
     return(new Hashtable {
         { (int)SPC.Id, id },
         { (int)SPC.Level, level },
         { (int)SPC.Color, (int)(byte)color },
         { (int)SPC.ItemType, (int)(byte)type },
         { (int)SPC.PlacingType, (int)placingType },
         { (int)SPC.Binded, binded },
         { (int)SPC.Splittable, splittable }
     });
 }