Exemplo n.º 1
0
        private bool TryCreatePreOrderItem(PropertyBool propertyBool, WeenieClassName weenieClassName)
        {
            var rcvdBlackmoorsFavor = GetProperty(propertyBool) ?? false;

            if (!rcvdBlackmoorsFavor)
            {
                if (GetInventoryItemsOfWCID((uint)weenieClassName).Count == 0)
                {
                    var cachedWeenie = Database.DatabaseManager.World.GetCachedWeenie((uint)weenieClassName);
                    if (cachedWeenie == null)
                    {
                        return(false);
                    }

                    var wo = Factories.WorldObjectFactory.CreateNewWorldObject(cachedWeenie);
                    if (wo == null)
                    {
                        return(false);
                    }

                    if (TryAddToInventory(wo))
                    {
                        SetProperty(propertyBool, true);
                        return(true);
                    }
                }
                else
                {
                    SetProperty(propertyBool, true); // already had the item, set the property to reflect item was received
                }
            }

            return(false);
        }
Exemplo n.º 2
0
 public static bool Contains(WeenieClassName wcid)
 {
     return(_combined.Contains(wcid));
 }
Exemplo n.º 3
0
 public GemResult(WeenieClassName className, MaterialType materialType)
 {
     ClassName    = className;
     MaterialType = materialType;
 }