public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_PAOSHANGINFO packet = (GC_RET_PAOSHANGINFO)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
//            if (GuildPaoShang.Instance() !=null)
//            {
//                GuildPaoShang.Instance().UpdatePaoShangInfo(packet);
//            }
//
//            // 更新下 可领取次数吧
//            GameManager.gameManager.PlayerDataPool.GuildInfo.PSCanAcceptTimes = packet.CurCanAcceptTimes;
//            if (MenuBarLogic.Instance() != null)
//            {
//                MenuBarLogic.Instance().UpdateGuildAndMasterReserveMember();
//            }
//            if (PlayerFrameLogic.Instance() != null)
//            {
//                PlayerFrameLogic.Instance().UpdateRemainNum();
//            }
//            if (GuildWindow.Instance() != null)
//            {
//                GuildWindow.Instance().UpdatePaoShangTip();
//            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Example #2
0
    // 更新界面
    public void UpdatePaoShangInfo(GC_RET_PAOSHANGINFO retPak)
    {
        //个人劫持信息
        m_RobPercentumText.text = retPak.CurRobCoin.ToString() + "/" + retPak.MaxRobCoin.ToString();

        //跑商信息
        CleanUpRobInfo();
        int vaildIndex = 0;

        for (int i = retPak.robberNameCount - 1; i >= 0; i--)
        {
            if (retPak.robberGuildNameCount <= i)
            {
                continue;
            }
            string RobberName      = retPak.GetRobberName(i);
            string RobberGuildName = retPak.GetRobberGuildName(i);
            if (RobberName == "")
            {
                continue;
            }
            if (vaildIndex >= m_RobInfo.Length)
            {
                continue;
            }
            if (m_RobInfo[vaildIndex] == null)
            {
                continue;
            }
            if (RobberGuildName == "")
            {
                //玩家{0}截杀本帮跑商成员
                m_RobInfo[vaildIndex++].text = StrDictionary.GetClientDictionaryString("#{3952}", RobberName);
            }
            else
            {
                //{0}帮会的玩家{1}截杀本帮跑商成员
                m_RobInfo[vaildIndex++].text = StrDictionary.GetClientDictionaryString("#{3951}", RobberGuildName, RobberName);
            }
        }
        //可以分配信息
        m_AssignInfo.text = retPak.CurAssignTimes.ToString() + "/" + retPak.MaxAssignTimes.ToString();
        //可以接取的次数
        m_AcceptInfo.text = retPak.CurCanAcceptTimes.ToString();
        //m_AutoOpenFlag.value = (retPak.IsAutoAssign==1);
        m_GuildWealth.text = retPak.WealthNum.ToString();
    }