public Action2108(ActionGetter actionGetter) : base((short)2108, actionGetter) { m_RequestPacket = null; m_ResponsePacket = new LCPerformFoundry(); m_UserId = 0; }
public void PushRoomProgressChangedNotify() { var roomInfo = CacheSet.FoundryRoomCache.FindKey(m_Foundry.CurrentRoomId); LCPerformFoundry package = new LCPerformFoundry(); int userId = m_UserId; foreach (int playerId in roomInfo.Players) { var target = GameSession.Get(playerId); if (target != null && playerId != userId) { SetUser(playerId); package.RewardFlags.AddRange(m_Foundry.CanReceiveRewards); package.PerformerPlayerId = userId; var room = CacheSet.FoundryRoomCache.FindKey(m_Foundry.CurrentRoomId); package.Progress = new PBGearFoundryProgressInfo() { CurrentLevel = room.Level, CurrentProgress = room.Progress }; byte[] buffer = CustomActionDispatcher.GeneratePackageStream(2108, ProtoBufUtils.Serialize(package)); target.SendAsync(buffer, 0, buffer.Length); } } SetUser(userId); }