void Build(int UID) { var _db = new PangyaEntities(); foreach (var info in _db.ProcGetCaddies(UID)) { if (info.DAY_LEFT == null) { info.DAY_LEFT = 0; } var SkinHour = (info.SKIN_HOUR_LEFT == null ? (ushort)0 : (ushort)info.SKIN_HOUR_LEFT); var caddie = new PlayerCaddieData() { CaddieIdx = (uint)info.CID, CaddieTypeId = (uint)info.TYPEID, CaddieSkin = (uint)info.SKIN_TYPEID, CaddieSkinEndDate = GameTools.TCompare.IfCompare(info.SKIN_END_DATE == null, DateTime.MinValue, info.SKIN_END_DATE), CaddieLevel = info.cLevel, CaddieExp = (uint)info.EXP, CaddieType = (byte)info.RentFlag, CaddieDay = (ushort)info.DAY_LEFT,//DIAS RESTANTES CaddieSkinDay = SkinHour, CaddieAutoPay = (ushort)info.TriggerPay, CaddieDateEnd = (DateTime)info.END_DATE, CaddieNeedUpdate = false }; CadieAdd(caddie); } }