Exemplo n.º 1
0
 /* 买挑战次数请求  */
 public static bool Send_CSID_BUY_PT_TIMES_REQ(int times)
 {
     CliProto.CS_BUY_PT_TIMES_REQ refMsg = new CliProto.CS_BUY_PT_TIMES_REQ();
     refMsg.m_BuyTimes = times;
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 2
0
    //请求深渊开启记录列表..
    public static bool Send_CS_GET_ABYSS_OPEN_REC_REQ()
    {
        CliProto.CS_GET_ABYSS_OPEN_REC_REQ refMSG = new CliProto.CS_GET_ABYSS_OPEN_REC_REQ();

        SDNetGlobal.SendMessage(refMSG);
        return(true);
    }
Exemplo n.º 3
0
    //进入世界boss请求..
    public static bool Send_CS_WB_ENTER_REQ()
    {
        CliProto.CS_WB_ENTER_REQ refMSG = new CliProto.CS_WB_ENTER_REQ();

        SDNetGlobal.SendMessage(refMSG);
        return(true);
    }
Exemplo n.º 4
0
    void OnAwardBoxBtn(GameObject go)
    {
        foreach (AwardBoxInfo item in m_awardBoxInfos)
        {
            if (item.goAwardBoxBtn == go)
            {
                if (item.goAwardBoxBtn.GetComponent <UIButton>().isEnabled&& item.needSocre <= m_curScore)
                {
                    CliProto.CS_GIFT_DAY_BOX_REQ netMsg = new CliProto.CS_GIFT_DAY_BOX_REQ();
                    netMsg.m_BoxID = item.awardBoxId;
                    SDNetGlobal.SendMessage(netMsg);


                    sdUICharacter.Instance.ShowSuccessPanel();
                    //sdUICharacter.Instance.ShowMsgLine("恭喜你获得奖励!", Color.white);
                }
                else if (item.finished)
                {
                    sdUICharacter.Instance.ShowMsgLine("你已经领过了!", Color.white);
                }
                else
                {
                    sdUICharacter.Instance.ShowMsgLine("达到" + item.needSocre.ToString() +
                                                       "积分才能领取哟!", Color.white);
                }
            }
        }
    }
Exemplo n.º 5
0
    void OnQuestBlockBtn(GameObject go)
    {
        foreach (QuestInfo item in m_questInfos)
        {
            if (item.goQuestBtn == go)
            {
                if (item.questFinishedTimes == item.questTotalTimes)
                {
                    CliProto.CS_GIFT_DAY_SCORE_REQ netMsg = new CliProto.CS_GIFT_DAY_SCORE_REQ();
                    netMsg.m_QuestId = item.questType;
                    SDNetGlobal.SendMessage(netMsg);

                    sdUICharacter.Instance.ShowMsgLine("获得" + item.questScroe.ToString() +
                                                       "积分", Color.white);


                    //_fx.SetActive(false);
                    //_fx.SetActive(true);
                    //_fx.GetComponentInChildren<ParticleSystem>().Stop();
                    //_fx.GetComponentInChildren<ParticleSystem>().Play();
                }
                else
                {
                }
            }
        }
    }
Exemplo n.º 6
0
 /* 获取声望奖励请求  */
 public static bool Send_CS_GET_PVP_REPUTE_REWARD_REQ(uint rewardID)
 {
     CliProto.CS_GET_PVP_REPUTE_REWARD_REQ refMsg = new CliProto.CS_GET_PVP_REPUTE_REWARD_REQ();
     refMsg.m_RewardId = rewardID;
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 7
0
 public static bool init()
 {
     SDGlobal.Log("sdPVPMsg.init");
     /* 角色PVP信息  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SELF_PVP_PRO_ACK, msg_SC_SELF_PVP_PRO_ACK);
     /* 获取pvp对手回应  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_GET_PVP_MATCH_ACK, msg_SC_GET_PVP_MATCH_ACK);
     /* 挑战反馈  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_ENTER_PVP_ACK, msg_SC_ENTER_PVP_ACK);
     /* PVP结算反馈  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_PVP_RETULT_ACK, msg_SC_PVP_RESULT_ACK);
     /* 获取军阶奖励反馈  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_GET_PVP_MILITARY_REWARD_ACK, msg_SC_GET_PVP_MILITARY_REWARD_ACK);
     /* 获取声望奖励反馈  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_GET_PVP_REPUTE_REWARD_ACK, msg_SC_GET_PVP_RETURN_REWARD_ACK);
     /* 获取排行榜反馈  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_GET_RANK_LIST_ACK, msg_SC_GET_RANK_LIST_ACK);
     /* 买挑战次数反馈  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_PVP_BUY_CHALLENGE_TIMES_ACK, msg_SC_PVP_BUY_CHALLENGE_TIMES_ACK);
     /* 通知pvp时间  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_PVP_TIME_NTF, msg_SC_PVP_TIME_ACK);
     /* 获取PVP角色信息请求  */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_GET_PVP_ROLE_INFO_ACK, msg_SC_GET_PVP_ROLE_INFO_ACK);
     return(true);
 }
Exemplo n.º 8
0
 /* 挑战请求  */
 public static bool Send_CSID_ENTER_PVP_REQ(ulong roleID)
 {
     CliProto.CS_ENTER_PVP_REQ refMsg = new CliProto.CS_ENTER_PVP_REQ();
     refMsg.m_RoleID = roleID;
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 9
0
 public static bool Send_GET_PVP_ROLE_INFO_REQ(ulong roleID)
 {
     CliProto.CS_GET_PVP_ROLE_INFO_REQ refMsg = new CliProto.CS_GET_PVP_ROLE_INFO_REQ();
     refMsg.m_RoleID = roleID;
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 10
0
    public void OpenPanel()
    {
        _bWndOpen = true;

        if (m_goWndRoot != null)
        {
            AwardCenterWnd.Instance.m_goWndRoot.SetActive(false);

            m_goWndRoot.SetActive(true);
            WndAni.ShowWndAni(m_goWndRoot, true, "bg_grey");

            m_goWndRoot.transform.FindChild("EverydayFoods/Eat/Empty").gameObject.SetActive(false);
            m_goWndRoot.transform.FindChild("EverydayFoods/Eat/FullCake").gameObject.SetActive(false);
            m_goWndRoot.transform.FindChild("EverydayFoods/Eat/FullChicken").gameObject.SetActive(false);

            _receiveEpAck = false;
            CliProto.CS_GIFT_EP_INFO_REQ netMsg = new CliProto.CS_GIFT_EP_INFO_REQ();
            SDNetGlobal.SendMessage(netMsg);
        }
        else
        {
            sdUILoading.ActiveSmallLoadingUI(true);
            ResLoadParams param = new ResLoadParams();
            param.info = "EverydayFoodsPanel";
            sdResourceMgr.Instance.LoadResource("UI/AwardCenter/$EverydayFoodsWnd.prefab",
                                                OnPanelLoaded,
                                                param,
                                                typeof(GameObject));
        }
    }
Exemplo n.º 11
0
    private static void OnMessage_GCID_SELECTROLE(int iMsgID, ref CMessage msg)
    {
        SDGlobal.Log("GC_SELECTROLE");
        if (SDNetGlobal.bReConnectGate)
        {
            SDNetGlobal.OnMessage_GCID_SELECTROLE(iMsgID, ref msg);
            return;
        }

        //游戏中宠物,邮件,深渊活动等管理器,数据在这里清空一下..
        sdNewPetMgr.Instance.ClearData();
        SDGlobal.Log("sdNewPetMgr.ClearData success!");
        sdActGameMgr.Instance.ClearData();
        SDGlobal.Log("sdActGameMgr.ClearData success!");
        sdMailMgr.Instance.ClearData();
        SDGlobal.Log("sdMailMgr.ClearData success!");
        sdGuideMgr.Instance.ClearData();

        sdLevelInfo.Clear();


        string rolename = SDNetGlobal.playerList[SDNetGlobal.lastSelectRole].mRoleName;

        GPUSH_API.SetUserInfo(0, rolename);
    }
Exemplo n.º 12
0
    void OnBackTown()
    {
        if (sdGameLevel.instance.levelType == sdGameLevel.LevelType.PVP)
        {
            sdPVPManager.Instance.KillMe(null);
            sdUICharacter.Instance.HideConfigWnd(true);
        }
        else if (sdGameLevel.instance.levelType == sdGameLevel.LevelType.WorldBoss ||
                 sdGameLevel.instance.levelType == sdGameLevel.LevelType.LapBoss)
        {
            //退出世界Boss场景..
            sdActGameMsg.Send_CS_WB_RESULT_REQ(1);
            sdUICharacter.Instance.HideConfigWnd(true);
            sdUICharacter.Instance.TuiTu_To_WorldMap();
        }
        else
        {
            CliProto.CS_LEVEL_RESULT_NTF refMSG = new CliProto.CS_LEVEL_RESULT_NTF();
            refMSG.m_Result = 1; // 主动放弃当前关卡.
            SDNetGlobal.SendMessage(refMSG);


            sdUICharacter.Instance.HideConfigWnd(true);
            sdUICharacter.Instance.TuiTu_To_WorldMap();
        }
    }
Exemplo n.º 13
0
 public static bool init()
 {
     SDGlobal.Log("sdLevelMsg.init");
     /* 推图数据 */
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_LEVEL_ACK, OnMessage_SCID_LEVEL_ACK);
     return(true);
 }
Exemplo n.º 14
0
 public static bool notifyUpdateConfig(string info)
 {
     CliProto.CS_CLIENT_CONFIG_UPDATE refMsg = new CliProto.CS_CLIENT_CONFIG_UPDATE();
     refMsg.m_ConfigInfo = Encoding.UTF8.GetBytes(info);
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 15
0
 public static bool init()
 {
     SDGlobal.Log("sdChatMsg.init");
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_CHAT, msg_SCID_CHAT);
     SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_CLIENT_CONFIG_NTF, msg_SCID_CLIENT_CONFIG_NTF);
     return(true);
 }
Exemplo n.º 16
0
 public static bool notifySelectFriAss(string id)
 {
     CliProto.CS_SELECT_FRIEND_ASSIST_REQ refMSG = new CliProto.CS_SELECT_FRIEND_ASSIST_REQ();
     refMSG.m_Info.m_RoleDBID = ulong.Parse(id);
     SDNetGlobal.SendMessage(refMSG);
     return(true);
 }
Exemplo n.º 17
0
 public static void Send_CS_SHOP_BUY_GOODS_REQ(uint nGoodsId, int nGoodsCount)
 {
     CliProto.CS_SHOP_BUY_GOODS_REQ refMSG = new CliProto.CS_SHOP_BUY_GOODS_REQ();
     refMSG.m_GoodsId    = nGoodsId;
     refMSG.m_GoodsCount = nGoodsCount;
     SDNetGlobal.SendMessage(refMSG);
 }
Exemplo n.º 18
0
 public static bool notifyReceiveAp(string id)
 {
     CliProto.CS_RECEIVE_ACTION_POINT_REQ refMSG = new CliProto.CS_RECEIVE_ACTION_POINT_REQ();
     refMSG.m_Info.m_RoleDBID = ulong.Parse(id);
     SDNetGlobal.SendMessage(refMSG);
     return(true);
 }
Exemplo n.º 19
0
    public static bool init()
    {
        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_ACTION_POINT_BOUGHT_NTF,
                                    msg_SCID_SHOP_ACTION_POINT_BOUGHT_NTF);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_BUY_ACTION_POINT_ACK,
                                    msg_SCID_SHOP_BUY_ACTION_POINT_ACK);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_BUY_PET_INFO_CHEAP_NTF,
                                    msg_SCID_SHOP_BUY_PET_INFO_CHEAP_NTF);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_BUY_PET_INFO_EXPENSIVE_NTF,
                                    msg_SCID_SHOP_BUY_PET_INFO_EXPENSIVE_NTF);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_BUY_PET_ACK,
                                    msg_SCID_SHOP_BUY_PET_ACK);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_GET_GOODSLIST_ACK,
                                    msg_SCID_SHOP_GET_GOODSLIST_ACK);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_SHOP_BUY_GOODS_ACK,
                                    msg_SCID_SHOP_BUY_GOODS_ACK);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_VIP_INFO_NTF,
                                    msg_SCID_VIP_INFO_NTF);

        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.SCID_VIP_RMBINFO_NTF,
                                    msg_SCID_VIP_RMBINFO_NTF);

        return(true);
    }
Exemplo n.º 20
0
    public static bool notifyMakeUp()
    {
        CliProto.CS_ROLE_PROD_REQ refMsg = new CliProto.CS_ROLE_PROD_REQ();
        refMsg.m_DBID = sdGameItemMgr.Instance.upItem.instanceID;
        Hashtable makeTable = sdConfDataMgr.Instance().GetFormula(sdGameItemMgr.Instance.upItem.templateID.ToString());

        if (makeTable != null)
        {
            List <UInt64> list  = new List <UInt64>();
            int           count = 0;
            for (int i = 1; i <= 5; ++i)
            {
                string name = string.Format("U{0}.ItemID", i);
                string id   = makeTable[name].ToString();
                if (id == "0")
                {
                    break;
                }
                UInt64 insId = sdGameItemMgr.Instance.getItemUIDByTID(int.Parse(id));
                ++count;
                list.Add(insId);
            }

            refMsg.m_Count     = count;
            refMsg.m_OtherDBID = new ulong[count];
            int num = 0;
            foreach (UInt64 id in list)
            {
                refMsg.m_OtherDBID[num] = id;
                ++num;
            }
        }
        SDNetGlobal.SendMessage(refMsg);
        return(true);
    }
Exemplo n.º 21
0
 public static bool notifyUseItem()
 {
     CliProto.CS_ROLE_USEITEM_REQ refMsg = new CliProto.CS_ROLE_USEITEM_REQ();
     refMsg.m_UUID = ulong.Parse(sdUICharacter.Instance.lastTipId);
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 22
0
 /* 神秘商店购买物品请求 */
 public static bool Send_SHOP_SECRET_BUY_REQ(int uid)
 {
     CliProto.CS_SHOP_SECRET_BUY_REQ msg = new CliProto.CS_SHOP_SECRET_BUY_REQ();
     msg.m_UID = uid;
     SDNetGlobal.SendMessage(msg);
     return(true);
 }
Exemplo n.º 23
0
    // 进入角色选择界面aa
    public void EnterSelectUI()
    {
        // 服务器刷新角色列表的消息回调aa
        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.GCID_ROLELIST, OnMessage_GCID_ROLELIST);

        // 服务器返回角色选择成功的消息回调aa
        SDNetGlobal.setCallBackFunc((ushort)CliProto.EN_CliProto_MessageID.GCID_SELECTROLE, OnMessage_GCID_SELECTROLE);
    }
Exemplo n.º 24
0
 public static bool notifyGemMerge(string uuid1, int num)
 {
     CliProto.CS_ROLE_HOLE_MERGE2_REQ refMsg = new CliProto.CS_ROLE_HOLE_MERGE2_REQ();
     refMsg.m_Hole.m_ItemUUID = ulong.Parse(uuid1);
     refMsg.m_Hole.m_Count    = num;
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 25
0
 public static bool notifyGemReplace(string uuid1, string uuid2)
 {
     CliProto.CS_ROLE_HOLE_REFRESH_REQ refMsg = new CliProto.CS_ROLE_HOLE_REFRESH_REQ();
     refMsg.m_Hole.m_ItemUUID  = ulong.Parse(uuid1);
     refMsg.m_Hole.m_Item2UUID = ulong.Parse(uuid2);
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 26
0
 public static bool notifyGemOff(int index, string itemId)
 {
     CliProto.CS_ROLE_HOLE_OFF_REQ refMsg = new CliProto.CS_ROLE_HOLE_OFF_REQ();
     refMsg.m_Hole.m_HoleIndex = (byte)index;
     refMsg.m_Hole.m_ItemUUID  = ulong.Parse(itemId);
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 27
0
 public static bool notifyProcessItem(string uuid, int type)
 {
     CliProto.CS_ROLE_EVENT_REQ refMsg = new CliProto.CS_ROLE_EVENT_REQ();
     refMsg.m_ItemUUID  = ulong.Parse(uuid);
     refMsg.m_EventType = (byte)type;
     SDNetGlobal.SendMessage(refMsg);
     return(true);
 }
Exemplo n.º 28
0
    public static bool notifyLearnSkill(int id)
    {
        CliProto.CS_LEARN_SKILL refMSG = new CliProto.CS_LEARN_SKILL();
        refMSG.m_SkillID = (uint)id;

        SDNetGlobal.SendMessage(refMSG);
        return(true);
    }
Exemplo n.º 29
0
    //碎片合成请求..
    public static bool Send_CS_GATHER_ITEM_MERGE_REQ(int iGId)
    {
        CliProto.CS_GATHER_ITEM_MERGE_REQ refMSG = new CliProto.CS_GATHER_ITEM_MERGE_REQ();
        refMSG.m_TID = iGId;

        SDNetGlobal.SendMessage(refMSG);
        return(true);
    }
Exemplo n.º 30
0
    void OnFail()
    {
        CliProto.CS_LEVEL_RESULT_NTF refMSG = new CliProto.CS_LEVEL_RESULT_NTF();
        refMSG.m_Result = 1; // 主动放弃当前关卡.
        SDNetGlobal.SendMessage(refMSG);

        sdUICharacter.Instance.ShowPTWnd(true);
    }