private void ShiZhuangActivity(int id, PlayerOperationActivityItem item, CharacterController character) { //时装特殊处理 var tbItem = Table.GetItemBase(id); if (null != tbItem) { if (10500 == tbItem.Type)//时装 { var tbStore = Table.GetStore(tbItem.StoreID); if (null != tbStore) { var exdata = character.GetExData(tbStore.DayCount); if (1 == exdata) { item.Aquire(); } } } } }
private PlayerOperationActivityItem MakeItem(OperationActivityItem item, DBOperActivityItem db, DateTime time) { var ret = new PlayerOperationActivityItem(); ret.mDBData = db; ret.Id = item.Id; ret.Need = (ulong)item.Params[0]; ret.TotalTimes = item.TotalTimes; ret.Condition = item.Condition; if (-1 == item.OpenDelayDays) { ret.Begin = DateTime.MinValue; ret.RewardBegin = ret.Begin; ret.End = DateTime.MaxValue; } else { ret.Begin = time.Date.AddDays(item.OpenDelayDays); ret.RewardBegin = time.Date.AddDays(item.RewardOpenDelay); if (ret.Begin > ret.RewardBegin) { ret.RewardBegin = ret.Begin; } ret.End = ret.Begin.AddDays(item.LastDays); } ret.Params = item.Params; ret.StrParams = item.StrParams; var idx = Controller.GetRole(); if (idx >= 0 && idx < item.Rewards.Count()) { ret.Rewards = item.Rewards[idx]; } return(ret); }