Example #1
0
        private void getCardsCode()
        {
            debug.Log(string.Concat(new object[]
            {
                "请求获得新卡:",
                this.cacheGetCode.Count,
                "   ",
                this.curTransing
            }));
            bool flag = this.cacheGetCode.Count == 0;

            if (flag)
            {
                foreach (GiftCardData current in this.lGiftCards)
                {
                    debug.Log("判断有新:" + this.beginLoadingTimer + current.creattimer);
                    bool flag2 = this.beginLoadingTimer <= current.creattimer;
                    if (flag2)
                    {
                        HttpAppMgr.instance.onGetnewCard();
                        bool flag3 = current.cardType.functp == 4;
                        if (flag3)
                        {
                            ArrayList arrayList = new ArrayList();
                            arrayList.Add(current);
                            InterfaceMgr.getInstance().open(InterfaceMgr.A3_GIFTCARD, arrayList, false);
                        }
                        break;
                    }
                }
            }
            else
            {
                bool flag4 = this.curTransing != null;
                if (!flag4)
                {
                    this.curTransing = this.cacheGetCode[0];
                    this.cacheGetCode.RemoveAt(0);
                    string text = string.Concat(new object[]
                    {
                        "sid=",
                        Globle.curServerD.sid,
                        "&uid=",
                        ModelBase <PlayerModel> .getInstance().uid,
                        "&cid=",
                        ModelBase <PlayerModel> .getInstance().cid,
                        "&tp="
                    });
                    debug.Log(string.Concat(new object[]
                    {
                        "请求激活码::::::::::::::::::",
                        Globle.curServerD.do_url,
                        "?card",
                        text,
                        this.curTransing.id
                    }));
                    HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?card", text + this.curTransing.id, new Action <string>(this.onHttpCallback), true, "POST");
                }
            }
        }
Example #2
0
        public void getSevenCardsCode(string code)
        {
            string path = "sid=" + Globle.curServerD.sid + "&cid=" + PlayerModel.getInstance().cid + "&shortcode=";

            debug.Log("请求激活码::::::::::::::::::" + Globle.curServerD.do_url + "?receive_card=2" + path + code);
            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?receive_card=2", path + code, onHttpSevenCards);
        }
Example #3
0
        public void getRechangeCard()
        {
            if (PlayerModel.getInstance().lvl < 10)
            {
                return;
            }

            string path = "sid=" + Globle.curServerD.sid + "&uid=" + PlayerModel.getInstance().uid + "&cid=" + PlayerModel.getInstance().cid + "&cust=2";

            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?paycard", path, onRechageHandle);
        }
Example #4
0
        public void getFirstRechangeCard()
        {
            string param = string.Concat(new object[]
            {
                "sid=",
                Globle.curServerD.sid,
                "&uid=",
                ModelBase <PlayerModel> .getInstance().uid,
                "&cid=",
                ModelBase <PlayerModel> .getInstance().cid,
                "&tp=2"
            });

            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?card", param, new Action <string>(this.onFirstRechange), true, "POST");
        }
Example #5
0
        public void getRechangeCard()
        {
            bool flag = ModelBase <PlayerModel> .getInstance().lvl < 10u;

            if (!flag)
            {
                string param = string.Concat(new object[]
                {
                    "sid=",
                    Globle.curServerD.sid,
                    "&uid=",
                    ModelBase <PlayerModel> .getInstance().uid,
                    "&cid=",
                    ModelBase <PlayerModel> .getInstance().cid,
                    "&cust=2"
                });
                HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?paycard", param, new Action <string>(this.onRechageHandle), true, "POST");
            }
        }
Example #6
0
        public void getShortCardsCode(string code)
        {
            string text = string.Concat(new object[]
            {
                "sid=",
                Globle.curServerD.sid,
                "&cid=",
                ModelBase <PlayerModel> .getInstance().cid,
                "&shortcode="
            });

            debug.Log(string.Concat(new string[]
            {
                "请求激活码::::::::::::::::::",
                Globle.curServerD.do_url,
                "?card=2",
                text,
                code
            }));
            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?card=2", text + code, new Action <string>(this.onHttpShortCars), true, "POST");
        }
Example #7
0
        public void sendMsg(string words, string name, uint type, bool isvoice, uint xtp = 0)
        {
            Variant msg = new Variant();

            msg["tp"]   = type;
            msg["name"] = name;


            if (isvoice)
            {
                msg["msg"] = "";
                msg["url"] = words;
            }
            else
            {
                msg["msg"] = words;
            }

            if (xtp != 0)
            {
                msg["xtp"] = xtp;
            }
            else
            {
                analysisStr(words, msg);
            }
            sendRPC(PKG_NAME.S2C_CHAT_MSG, msg);


            //屏蔽装备和坐标
            //if (msg.ContainsKey("coordinate") || msg.ContainsKey("itm_ids"))
            //    return;

            //添加聊天上报
            string path = "sid=" + Globle.curServerD.sid + "&uid=" + PlayerModel.getInstance().uid + "&cid=" + PlayerModel.getInstance().cid + "&tp=" + type
                          + "&cname=" + name + "&vip=" + PlayerModel.getInstance().vip + "&content=" + words;

            //debug.Log("聊天上报::::::::::::::::::" + Globle.curServerD.do_url + "?msg=1" + path);
            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?msg=1", path, onHttpChatMsg);
        }
Example #8
0
        private void getCardsCode()
        {
            debug.Log("请求获得新卡:" + cacheGetCode.Count + "   " + curTransing);
            if (cacheGetCode.Count == 0)
            {
                foreach (GiftCardData d in lGiftCards)
                {
                    debug.Log("判断有新:" + beginLoadingTimer + d.creattimer);
                    if (beginLoadingTimer <= d.creattimer)
                    {
                        HttpAppMgr.instance.onGetnewCard();
                        if (d.cardType.functp == 4)
                        {
                            ArrayList arr = new ArrayList();
                            arr.Add(d);
                            InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_GIFTCARD, arr);
                        }
                        return;
                    }
                }
                return;
            }
            if (curTransing != null)
            {
                return;
            }

            curTransing = cacheGetCode[0];
            cacheGetCode.RemoveAt(0);


            string path = "sid=" + Globle.curServerD.sid + "&uid=" + PlayerModel.getInstance().uid + "&cid=" + PlayerModel.getInstance().cid + "&tp=";

            debug.Log("请求激活码::::::::::::::::::" + Globle.curServerD.do_url + "?card" + path + curTransing.id);
            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?card", path + curTransing.id, onHttpCallback);
        }
Example #9
0
        public void getFirstRechangeCard()
        {
            string path = "sid=" + Globle.curServerD.sid + "&uid=" + PlayerModel.getInstance().uid + "&cid=" + PlayerModel.getInstance().cid + "&tp=2";

            HttpAppMgr.POSTSvrstr(Globle.curServerD.do_url + "?card", path, onFirstRechange);
        }