Exemplo n.º 1
0
        public override void Pay(rechargeData data)
        {
            debug.Log("begin-pay");
            Variant variant = new Variant();

            debug.Log("serverId:" + Globle.curServerD.sid);
            variant["serverId"]   = Globle.curServerD.sid;
            variant["serverName"] = Globle.curServerD.server_name;
            variant["serverDesc"] = Globle.curServerD.sid;
            variant["roleId"]     = ModelBase <PlayerModel> .getInstance().cid;

            variant["roleName"] = ModelBase <PlayerModel> .getInstance().name;

            variant["productId"] = data.payid;
            debug.Log("rechargeData:" + ModelBase <RechargeModel> .getInstance().getRechargeDataById(data.id));
            debug.Log("name:" + data.name);
            variant["productName"]  = data.name;
            variant["productPrice"] = data.golden;
            variant["productCount"] = 1;
            variant["productDesc"]  = "description";
            variant["change_rate"]  = 0;
            variant["roleLvl"]      = ModelBase <PlayerModel> .getInstance().lvl;

            debug.Log("end-pay");
            string jstr = JsonManager.VariantToString(variant);

            AnyPlotformSDK.Call_Cmd("pay", "lanPay", jstr, true);
        }
Exemplo n.º 2
0
        public override void record_login()
        {
            Variant variant = new Variant();

            variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid;

            variant["roleName"] = ModelBase <PlayerModel> .getInstance().name;

            variant["roleLevel"] = this.getlv(ModelBase <PlayerModel> .getInstance().up_lvl, ModelBase <PlayerModel> .getInstance().lvl);
            variant["roleGold"]  = ModelBase <PlayerModel> .getInstance().money;

            variant["roleYb"] = ModelBase <PlayerModel> .getInstance().gold;

            variant["roleCreateTime"] = ModelBase <PlayerModel> .getInstance().crttm;

            variant["roleServerId"]   = Globle.curServerD.sid;
            variant["roleServerName"] = Globle.curServerD.server_name;
            variant["rolevip"]        = ModelBase <PlayerModel> .getInstance().vip;

            variant["rolePartyName"] = "";
            variant["rolePartyId"]   = ModelBase <PlayerModel> .getInstance().clanid;

            variant["rolePower"] = ModelBase <PlayerModel> .getInstance().combpt;

            variant["rolePartyRoleId"]   = "";
            variant["rolePartyRoleName"] = "";
            variant["roleProfessionId"]  = ModelBase <PlayerModel> .getInstance().profession;

            variant["roleProfession"] = "";
            variant["roleFriendlist"] = "";
            string text = JsonManager.VariantToString(variant);

            AnyPlotformSDK.Call_Cmd("enterGame", "lanRole", text, false);
            debug.Log("[record]login:" + text);
        }
Exemplo n.º 3
0
        public override void record_quit()
        {
            bool flag = Globle.Lan != "zh_cn";

            if (!flag)
            {
                Variant variant = new Variant();
                variant["roleId"] = ModelBase <PlayerModel> .getInstance().cid;

                variant["roleName"] = ModelBase <PlayerModel> .getInstance().name;

                variant["roleLevel"] = ModelBase <PlayerModel> .getInstance().lvl;

                variant["roleGold"] = ModelBase <PlayerModel> .getInstance().gold;

                variant["roleleveluptime"] = "";
                variant["rolecreatetime"]  = "";
                variant["rolevip"]         = ModelBase <PlayerModel> .getInstance().vip;

                variant["roleYb"] = ModelBase <PlayerModel> .getInstance().money;

                variant["roleServerId"]   = Globle.curServerD.sid;
                variant["roleServerName"] = Globle.curServerD.server_name;
                string text = JsonManager.VariantToString(variant);
                AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", text, false);
                debug.Log("[record]quit:" + text);
            }
        }
Exemplo n.º 4
0
        public override void Pay(rechargeData data)
        {
            debug.Log("begin-pay");
            Variant v = new Variant();

            debug.Log("serverId:" + Globle.curServerD.sid);
            v["serverId"]   = Globle.curServerD.sid;
            v["serverIds"]  = Globle.curServerD.sids;
            v["serverName"] = Globle.curServerD.server_name;
            v["serverDesc"] = Globle.curServerD.sid;
            v["roleId"]     = PlayerModel.getInstance().cid;
            v["roleName"]   = PlayerModel.getInstance().name;
            v["productId"]  = data.payid;
            debug.Log("rechargeData:" + RechargeModel.getInstance().getRechargeDataById(data.id));

            debug.Log("name:" + data.name);
            v["productName"]  = data.name;
            v["productPrice"] = data.golden;
            v["productCount"] = 1;
            v["productDesc"]  = "description";
            v["change_rate"]  = 0;
            v["productyb"]    = data.golden_value;

            debug.Log("end-pay");

            string LanPayInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("pay", "lanPay", LanPayInfoJsonString);
        }
Exemplo n.º 5
0
        public override void record_quit()
        {
            Variant v = new Variant();

            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);
            v["roleGold"]       = PlayerModel.getInstance().money;
            v["roleYb"]         = PlayerModel.getInstance().gold;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            //v["roleleveluptime"] = PlayerModel.getInstance().crttm;
            v["roleServerId"]        = Globle.curServerD.sid;
            v["roleServerName"]      = Globle.curServerD.server_name;
            v["rolevip"]             = PlayerModel.getInstance().vip;
            v["roleLevelUpTime"]     = NetClient.instance.CurServerTimeStamp;
            v["rolePartyName"]       = "";
            v["rolePartyId"]         = PlayerModel.getInstance().clanid;
            v["rolePower"]           = PlayerModel.getInstance().combpt;
            v["rolePartyRoleId"]     = "";
            v["rolePartyRoleName"]   = "";
            v["roleProfessionId"]    = PlayerModel.getInstance().profession;
            v["roleProfession"]      = "";
            v["roleFriendlist"]      = "";
            v["rolePartyMasterID"]   = "";
            v["rolePartyMasterName"] = "";
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]exitPage:" + serverInfoJsonString);
        }
Exemplo n.º 6
0
        public override void record_quit()
        {
            // "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"1\",\"roleGold\":\"300\",
            // \"roleleveluptime\":\"1464537600\",\"roleCreateTime\":\"1464537600\",\"rolevip\":\"0\",
            // \"roleYb\":\"200\",\"roleServerId\":\"1\",\"roleServerName\":\"servername\"}";

            Variant v = new Variant();

            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);
            v["roleGold"]       = PlayerModel.getInstance().money;
            v["roleYb"]         = PlayerModel.getInstance().gold;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            //v["roleleveluptime"] = PlayerModel.getInstance().crttm;
            v["roleServerId"]      = Globle.curServerD.sid;
            v["roleServerName"]    = Globle.curServerD.server_name;
            v["rolevip"]           = PlayerModel.getInstance().vip;
            v["rolePartyName"]     = "";
            v["rolePartyId"]       = PlayerModel.getInstance().clanid;
            v["rolePower"]         = PlayerModel.getInstance().combpt;
            v["rolePartyRoleId"]   = "";
            v["rolePartyRoleName"] = "";
            v["roleProfessionId"]  = PlayerModel.getInstance().profession;
            v["roleProfession"]    = "";
            v["roleFriendlist"]    = "";

            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]exitPage:" + serverInfoJsonString);
        }
        public override void record_quit()
        {
            if (Globle.Lan != "zh_cn")
            {
                return;
            }

            //string exitRoleInfoJsonString = "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"101\",\"roleGold\":\"300\",\"roleYb\":\"200\",\"roleServerId\":\"1\",\"roleServerName\":\"servername\"}";
            //AndroidJavaMethodInfoCall("lanRole", exitRoleInfoJsonString);
            //AndroidJavaMethodCall("exitPage");
            Variant v = new Variant();

            v["roleId"]          = PlayerModel.getInstance().cid;
            v["roleName"]        = PlayerModel.getInstance().name;
            v["roleLevel"]       = PlayerModel.getInstance().lvl;
            v["roleGold"]        = PlayerModel.getInstance().gold;
            v["roleleveluptime"] = "";
            v["rolecreatetime"]  = "";
            v["rolevip"]         = PlayerModel.getInstance().vip;
            v["roleYb"]          = PlayerModel.getInstance().money;
            v["roleServerId"]    = Globle.curServerD.sid;
            v["roleServerName"]  = Globle.curServerD.server_name;
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("exitPage", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]quit:" + serverInfoJsonString);
        }
Exemplo n.º 8
0
        public virtual void sharemsg(string sharemsg, string sharetype, string shareappid, string shareappkey)
        {
            Variant v = new Variant();

            v["sharemsg"]    = sharemsg;
            v["sharetype"]   = sharetype;
            v["shareappid"]  = shareappid;
            v["shareappkey"] = shareappkey;

            string LanPayInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("gameShare", "lanShare", LanPayInfoJsonString, false);
        }
Exemplo n.º 9
0
        public override void record_createRole(Variant data)
        {
            // "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"1\",\"roleGold\":\"300\",\"roleYb\":\"200\",
            // \"roleServerId\":\"1\",\"roleServerName\":\"servername\",\"rolevip\":\"1\",\"rolePartyName\":\"哈利噶多\",
            // \"rolePartyId\":\"123\",\"rolePower\":\"1234\",\"rolePartyRoleId\":\"1231\",\"rolePartyRoleName\":\"哈利波特\",
            // \"roleProfessionId\":\"12\",\"roleProfession\":\"无敌法师\",\"roleFriendlist\":\" \"}";

            Globle.YR_role_enter_time = Globle.getStrTimeNomal(NetClient.instance.CurServerTimeStamp);

            int    cid  = data["cid"];
            string name = data["name"];

            if (name.Length > 2)
            {
                name = name.Remove(name.Length - 2);
            }

            uint zhuan        = data["zhua"];
            uint lvl          = data["lvl"];
            int  professionId = data["carr"];

            Variant v = new Variant();

            v["roleId"]         = cid;
            v["roleName"]       = name;
            v["roleLevel"]      = getlv(zhuan, lvl);
            v["roleGold"]       = 0;
            v["roleYb"]         = 0;
            v["roleCreateTime"] = NetClient.instance.CurServerTimeStamp;
            //v["roleleveluptime"] = NetClient.instance.CurServerTimeStamp;
            v["roleServerId"]      = Globle.curServerD.sid;
            v["roleServerName"]    = Globle.curServerD.server_name;
            v["rolevip"]           = 0;
            v["rolePartyName"]     = "";
            v["rolePartyId"]       = "";
            v["rolePower"]         = 0;
            v["rolePartyRoleId"]   = "";
            v["rolePartyRoleName"] = "";
            v["roleProfessionId"]  = professionId;
            v["roleProfession"]    = "";
            v["roleFriendlist"]    = "";
            v["gpuid"]             = Globle.YR_srvlists__platuid;
            v["roleEnterTime"]     = Globle.YR_role_enter_time;
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("createRole", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]createRole:" + serverInfoJsonString);
        }
Exemplo n.º 10
0
        public virtual void stopVoice(string path)
        {
            connInfo info = NetClient.instance.getObject(OBJECT_NAME.DATA_CONN) as connInfo;
            Variant  v    = new Variant();

            v["sid"] = Globle.curServerD.sid;

            v["platid"] = Globle.YR_srvlists__platuid;
            v["uid"]    = PlayerModel.getInstance().uid;
            v["token"]  = info.token == "" ? "76b03211848f7db9b922a39fbe1d1978_2015-09-26 15:11:20-100000503" : info.token;
            v["url"]    = path;
            string voicejsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("stopVoice", "lanVoice", voicejsonString, false);
        }
Exemplo n.º 11
0
        public override void Pay(rechargeData data)
        {
            // "{\"serverId\":\"300001\",\"serverName\":\"双线1区\",\"serverDesc\":\"s1\",
            // \"roleId\":\"1\",\"roleName\":\"haha\",\"productId\":\"1\",\"productName\":\"asdf\",
            // \"productPrice\":\"1\",\"productCount\":\"1\",\"productDesc\":\"description\",\"change_rate\":\"0\",\"productyb\":\"10\"}";

            debug.Log("begin-pay");
            Variant v = new Variant();

            debug.Log("serverId:" + Globle.curServerD.sid);
            v["gpuid"]          = Globle.YR_srvlists__platuid;
            v["serverId"]       = Globle.curServerD.sid;
            v["serverIds"]      = Globle.curServerD.sids;
            v["serverName"]     = Globle.curServerD.server_name;
            v["serverDesc"]     = Globle.curServerD.sid;
            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["productId"]      = data.payid;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);

            if (Application.platform == RuntimePlatform.Android)
            {
                v["productShopId"] = data.pay_android_id;
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                v["productShopId"] = data.pay_ios_id;
            }

            debug.Log("rechargeData:" + RechargeModel.getInstance().getRechargeDataById(data.id));

            debug.Log("name:" + data.name);
            v["productName"]  = data.name;
            v["productPrice"] = data.golden;
            v["productCount"] = 1;
            v["productDesc"]  = data.desc1;
            v["change_rate"]  = 0;
            v["productyb"]    = data.golden_value;

            debug.Log("end-pay");

            string LanPayInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("pay", "lanPay", LanPayInfoJsonString);
        }
Exemplo n.º 12
0
        public override void record_createRole(Variant data)
        {
            int    cid  = data["cid"];
            string name = data["name"];

            if (name.Length > 2)
            {
                name = name.Remove(name.Length - 2);
            }

            uint zhuan        = data["zhua"];
            uint lvl          = data["lvl"];
            int  professionId = data["carr"];

            Variant v = new Variant();

            v["roleId"]         = cid;
            v["roleName"]       = name;
            v["roleLevel"]      = getlv(zhuan, lvl);
            v["roleGold"]       = 0;
            v["roleYb"]         = 0;
            v["roleCreateTime"] = NetClient.instance.CurServerTimeStamp;
            //v["roleleveluptime"] = NetClient.instance.CurServerTimeStamp;
            v["roleServerId"]        = Globle.curServerD.sid;
            v["roleServerName"]      = Globle.curServerD.server_name;
            v["rolevip"]             = 0;
            v["roleLevelUpTime"]     = NetClient.instance.CurServerTimeStamp;
            v["rolePartyName"]       = "";
            v["rolePartyId"]         = "";
            v["rolePower"]           = 0;
            v["rolePartyRoleId"]     = "";
            v["rolePartyRoleName"]   = "";
            v["roleProfessionId"]    = professionId;
            v["roleProfession"]      = "";
            v["roleFriendlist"]      = "";
            v["rolePartyMasterID"]   = "";
            v["rolePartyMasterName"] = "";
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("createRole", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]createRole:" + serverInfoJsonString);
        }
Exemplo n.º 13
0
        public virtual void record_selectionSever()
        {
            if (Globle.Lan != "zh_cn")
            {
                return;
            }

            Variant v = new Variant();

            v["serverId"]  = Globle.curServerD.sid;
            v["serverIds"] = Globle.curServerD.sids;


            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("selectServer", "lanServer", serverInfoJsonString, false);

            debug.Log("[record]selectionSever:" + serverInfoJsonString);
        }
Exemplo n.º 14
0
        public override void record_login()
        {
            // "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"1\",\"roleGold\":\"300\",\"roleYb\":\"200\",
            // \"roleServerId\":\"1\",\"roleServerName\":\"servername\",\"rolevip\":\"1\",\"rolePartyName\":\"哈利噶多\",
            // \"rolePartyId\":\"123\",\"rolePower\":\"1234\",\"rolePartyRoleId\":\"1231\",\"rolePartyRoleName\":\"哈利波特\",
            //\"roleProfessionId\":\"12\",\"roleProfession\":\"无敌法师\",\"roleFriendlist\":\" \"}";

            Globle.YR_role_enter_time = Globle.getStrTimeNomal(NetClient.instance.CurServerTimeStamp);


            Variant v = new Variant();

            v["roleId"]         = PlayerModel.getInstance().cid;
            v["roleName"]       = PlayerModel.getInstance().name;
            v["roleLevel"]      = getlv(PlayerModel.getInstance().up_lvl, PlayerModel.getInstance().lvl);
            v["roleGold"]       = PlayerModel.getInstance().money;
            v["roleYb"]         = PlayerModel.getInstance().gold;
            v["roleCreateTime"] = PlayerModel.getInstance().crttm;
            //v["roleleveluptime"] = PlayerModel.getInstance().crttm;
            v["roleServerId"]      = Globle.curServerD.sid;
            v["roleServerName"]    = Globle.curServerD.server_name;
            v["rolevip"]           = PlayerModel.getInstance().vip;
            v["rolePartyName"]     = "";
            v["rolePartyId"]       = PlayerModel.getInstance().clanid;
            v["rolePower"]         = PlayerModel.getInstance().combpt;
            v["rolePartyRoleId"]   = "";
            v["rolePartyRoleName"] = "";
            v["roleProfessionId"]  = PlayerModel.getInstance().profession;
            v["roleProfession"]    = "";
            v["roleFriendlist"]    = "";
            v["gpuid"]             = Globle.YR_srvlists__platuid;
            v["roleEnterTime"]     = Globle.YR_role_enter_time;
            string serverInfoJsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("enterGame", "lanRole", serverInfoJsonString, false);

            debug.Log("[record]login:" + serverInfoJsonString);
        }
Exemplo n.º 15
0
        public virtual void endVoiceRecord()
        {
            if (!recordingVoice)
            {
                return;
            }

            recordingVoice = false;
            connInfo info = NetClient.instance.getObject(OBJECT_NAME.DATA_CONN) as connInfo;
            Variant  v    = new Variant();

            v["sid"] = Globle.curServerD.sid;

            v["platid"] = Globle.YR_srvlists__platuid;
            v["uid"]    = PlayerModel.getInstance().uid;
            v["token"]  = info.token == "" ? "76b03211848f7db9b922a39fbe1d1978_2015-09-26 15:11:20-100000503" : info.token;
            v["url"]    = m_voice_url;
            string voicejsonString = JsonManager.VariantToString(v);

            AnyPlotformSDK.Call_Cmd("finishRecord", "lanVoice", voicejsonString, false);

            // recordingVoice = false;
        }
Exemplo n.º 16
0
        public override void record_createRole(Variant data)
        {
            int    val  = data["cid"];
            string text = data["name"];
            bool   flag = text.Length > 2;

            if (flag)
            {
                text = text.Remove(text.Length - 2);
            }
            uint    up_lv   = data["zhua"];
            uint    lv      = data["lvl"];
            int     val2    = data["carr"];
            Variant variant = new Variant();

            variant["roleId"]            = val;
            variant["roleName"]          = text;
            variant["roleLevel"]         = this.getlv(up_lv, lv);
            variant["roleGold"]          = 0;
            variant["roleYb"]            = 0;
            variant["roleCreateTime"]    = NetClient.instance.CurServerTimeStamp;
            variant["roleServerId"]      = Globle.curServerD.sid;
            variant["roleServerName"]    = Globle.curServerD.server_name;
            variant["rolevip"]           = 0;
            variant["rolePartyName"]     = "";
            variant["rolePartyId"]       = "";
            variant["rolePower"]         = 0;
            variant["rolePartyRoleId"]   = "";
            variant["rolePartyRoleName"] = "";
            variant["roleProfessionId"]  = val2;
            variant["roleProfession"]    = "";
            variant["roleFriendlist"]    = "";
            string text2 = JsonManager.VariantToString(variant);

            AnyPlotformSDK.Call_Cmd("createRole", "lanRole", text2, false);
            debug.Log("[record]createRole:" + text2);
        }