Ejemplo n.º 1
0
        public override bool TakeAction()
        {
            PlayerFoundryLogic pf = new PlayerFoundryLogic();

            pf.SetUser(m_UserId);
            if (!pf.Foundry())
            {
                ErrorCode = (int)ErrorType.RequireNotMet;
                ErrorInfo = "You can not foundry now";
                return(false);
            }
            m_ResponsePacket.NextFoundryTimeInTicks = pf.MyFoundry.NextFoundryTime;
            m_ResponsePacket.PerformerPlayerId      = m_UserId;
            m_ResponsePacket.RewardFlags.AddRange(pf.MyFoundry.CanReceiveRewards);
            var room = CacheSet.FoundryRoomCache.FindKey(pf.MyFoundry.CurrentRoomId);

            m_ResponsePacket.Progress = new PBGearFoundryProgressInfo()
            {
                CurrentLevel    = room.Level,
                CurrentProgress = room.Progress
            };
            pf.PushRoomProgressChangedNotify();
            return(true);
        }