public List <PBDropInfo> EnterInstance(int instanceId) { if (m_InstanceDrop != null) { CacheSet.InstanceDropCache.Delete(m_InstanceDrop); } List <PBDropInfo> dropInfo; m_InstanceDrop = new PlayerInstanceDrop(); m_InstanceDrop.UserId = m_UserId; m_InstanceDrop.InstanceId = instanceId; DTInstance instanceData = CacheSet.InstanceTable.GetData(instanceId); m_InstanceDrop.ChestList.AddRange(instanceData.InInstanceChests); m_InstanceDrop.DropList = GenerateDropList(instanceId, false, out dropInfo); PlayerPackageLogic pp = new PlayerPackageLogic(); pp.SetUser(m_UserId); if (!pp.CheckPackageSlot(m_InstanceDrop.DropList)) { return(null); } CacheSet.InstanceDropCache.Add(m_InstanceDrop); return(dropInfo); //RedisConnectionPool.Process(c => c.Expire("$Genesis.GameServer.LobbyServer.PlayerInstanceDrop", 3600)); }
public void SetUser(int userId) { m_UserId = userId; m_InstanceDrop = CacheSet.InstanceDropCache.FindKey(userId.ToString(), userId); }
public PlayerInstanceLogic() { m_UserId = 0; m_InstanceDrop = null; m_RandomDrop = RandomDropLogic.GetInstance(); }