Exemple #1
0
    public void exitCallback(string result)
    {
        Debug.Log("exitCallback:" + result);
        int exitCode = 1;
        int level    = PlayerData.Instance.BaseAttr.Level;

        if (Account.Instance.RoleInfoList != null)
        {
            MsgData_sLoginRole roleInfo = Account.Instance.RoleInfoList.Find(s => s.ID == PlayerData.Instance.RoleID);
            if (roleInfo != null)
            {
                level = roleInfo.Level;
            }
        }
        //进入游戏
        System.Collections.Generic.Dictionary <string, string> data = new System.Collections.Generic.Dictionary <string, string>();
        data["dataType"]  = "4";
        data["roleLevel"] = level.ToString();
        data["roleId"]    = PlayerData.Instance.RoleID.ToString();
        data["roleName"]  = PlayerData.Instance.Name;
        data["vipLevel"]  = PlayerData.Instance.BaseAttr.VIPLevel.ToString();
        //金币
        data["roleBalance"] = PlayerData.Instance.BindGold.ToString();
        data["serverName"]  = Account.Instance.ServerName;
        data["serverId"]    = Account.Instance.ServerId.ToString();
        data["society"]     = PlayerData.Instance.GuildData.GuildName;
        if (data["society"] == "")
        {
            data["society"] = "无";
        }
        this.SetExtData(data);
        CoreEntry.gEventMgr.TriggerEvent(GameEvent.GE_THIRDPARTY_EXIT, EventParameter.Get(exitCode));
        DYBSDK.isLogin = false;
    }
Exemple #2
0
        public void GE_PLAYER_INFO(GameEvent ge, EventParameter param)
        {
            if (PlayerData.Instance.BaseAttr.Level < 1)
            {
                return;
            }

            if (!bFirstEnter)
            {
                return;
            }
            if (bFirstEnter)
            {
                bFirstEnter = false;
            }

            if (bSDK && mSKDType == 1)
            {
                SDKMgr.Instance.addBatchDataEvent(1, SG.Account.Instance.ServerId, "10240", "获取角色信息成功,进入场景");

                int level = PlayerData.Instance.BaseAttr.Level;

                if (Account.Instance.RoleInfoList != null)
                {
                    MsgData_sLoginRole roleInfo = Account.Instance.RoleInfoList.Find(s => s.ID == PlayerData.Instance.RoleID);
                    if (roleInfo != null)
                    {
                        //level = roleInfo.Level;
                    }
                }
                //进入游戏
                System.Collections.Generic.Dictionary <string, string> data = new System.Collections.Generic.Dictionary <string, string>();
                data["dataType"]  = "1";
                data["roleID"]    = PlayerData.Instance.RoleID.ToString();
                data["roleName"]  = PlayerData.Instance.Name;
                data["roleLevel"] = level.ToString();
                data["zoneId"]    = Account.Instance.ZoneID.ToString();
                data["zoneName"]  = Account.Instance.ServerName;
                data["MoneyNum"]  = PlayerData.Instance.UnbindMoney.ToString();
                this.SetExtData(data);
            }

            else if (bSDK && mSKDType == 2)
            {
                SendDYBData("1");
                //上报登录信息
                reportDYBUserData();
            }
        }
Exemple #3
0
    public void exitCallback(string result)
    {
        Debug.Log("exitCallback:" + result);
        int exitCode = 1;
        int level    = PlayerData.Instance.BaseAttr.Level;

        if (Account.Instance.RoleInfoList != null)
        {
            MsgData_sLoginRole roleInfo = Account.Instance.RoleInfoList.Find(s => s.ID == PlayerData.Instance.RoleID);
            if (roleInfo != null)
            {
                level = roleInfo.Level;
            }
        }
        //进入游戏
        SetExtUpData(4);
        SQWSDK.isLogin = false;
    }
Exemple #4
0
        /// <summary>
        /// 第一波SDK数据同步
        /// </summary>
        /// <param name="type">数据类型 1进入游戏 2创建角色 3 升级 4 退出</param>
        public void SendDYBData(string type, string createRoleName = "", long craeteRoleID = 0)
        {
            int level = PlayerData.Instance.BaseAttr.Level;

            if (Account.Instance.RoleInfoList != null)
            {
                MsgData_sLoginRole roleInfo = Account.Instance.RoleInfoList.Find(s => s.ID == PlayerData.Instance.RoleID);
                if (roleInfo != null)
                {
                    if (type == "2")
                    {
                        level = roleInfo.Level;
                    }
                }
            }

            //进入游戏
            System.Collections.Generic.Dictionary <string, string> data = new System.Collections.Generic.Dictionary <string, string>();
            data["dataType"]  = type;
            data["roleLevel"] = level.ToString();
            data["roleId"]    = type == "2" ? craeteRoleID.ToString() : PlayerData.Instance.RoleID.ToString();
            data["roleName"]  = type == "2" ? createRoleName : PlayerData.Instance.Name;
            data["vipLevel"]  = PlayerData.Instance.BaseAttr.VIPLevel.ToString();
            //金币
            data["roleBalance"] = PlayerData.Instance.BindGold.ToString();
            data["serverName"]  = Account.Instance.ServerName;
            data["serverId"]    = Account.Instance.ServerId.ToString();

            Debug.Log("传送当前服务器serverId: " + Account.Instance.ServerId.ToString());

            data["society"] = PlayerData.Instance.GuildData.GuildName;
            if (data["society"] == "")
            {
                data["society"] = "无";
            }

            this.SetExtData(data);
        }
Exemple #5
0
        private void GE_SC_CREATE_ROLE(GameEvent ge, EventParameter parameter)
        {
            MsgData_sCreateRole data = parameter.msgParameter as MsgData_sCreateRole;

            LogMgr.Log("GE_SC_CREATE_ROLE: Result : " + data.Result);
            if (0 != data.Result)
            {
                return;
            }

            MsgData_sLoginRole info = new MsgData_sLoginRole();

            info.ID         = data.ID;
            info.Job        = data.Job;
            info.Name       = data.Name;
            info.Level      = 1;
            info.CreateTime = data.createtime;
            roleInfoList.Add(info);
            mSelectIndex = roleInfoList.Count - 1;

            AddEverServer();
            SDKMgr.Instance.SetExtUpData(2);
        }