Esempio n. 1
0
 public void UpdateBlackMarketInfo(BlackMarketGoodsProto proto)
 {
     if (BlackMarketInfoDictionary.ContainsKey(proto.marketId))
     {
         BlackMarketInfo info = BlackMarketInfoDictionary[proto.marketId];
         info.Set(proto.goodsNo, proto.remainBuyTimes);
         if (info.marketData == null || info.ruleData == null)
         {
             BlackMarketInfoDictionary.Remove(proto.marketId);
         }
     }
     else
     {
         BlackMarketInfo info = new BlackMarketInfo(proto.marketId, proto.goodsNo, proto.remainBuyTimes);
         if (info.marketData != null && info.ruleData != null)
         {
             BlackMarketInfoDictionary.Add(proto.marketId, info);
         }
     }
 }