Esempio n. 1
0
        public Dictionary <Material, ushort> GetOrderRewardMaterial(OrderContent.OrderReward reward)
        {
            Dictionary <Material, ushort> result = new Dictionary <Material, ushort>();

            foreach (KeyValuePair <string, ushort> kvp in reward.Reward_Mateiral)
            {
                var ma = MaterialModule.GetMaterialByMaterialID(Utility.TryParseInt(kvp.Key));
                if (ma != null)
                {
                    result.Add(ma, kvp.Value);
                }
            }
            return(result);
        }
Esempio n. 2
0
        public OrderItemBase(int orderID)
        {
            var data = OrderModule.GetOrderDataByID(orderID);

            if (data == null)
            {
                return;
            }
            OrderID         = data.OrderID;
            belongDataModel = OrderModule.GetOrganizationBelong(OrderID);
            dataModel       = new OrderDataModel();
            dataModel.Create(OrderID);

            typeInfo   = OrderModule.GetOrderTypeInfo(data);
            orderState = OrderState.Create;
            OrderTime  = data.TimeLimit;
            remainTime = OrderTime;

            rewardData = OrderModule.Instance.GetOrderRewardData(data);

            appearData    = OrderModule.Instance.GetOrderAppearData(data.OrderID);
            disAppearData = OrderModule.Instance.GetOrderDisAppearData(data.OrderID);
        }