예제 #1
0
파일: Program.cs 프로젝트: sheshuo2/pvpgift
        private static void sendgift(int rangking, int uId, string token, string user_id)
        {
            int[] gem = new int[] {550,500,450,400,350,340,330,320,310,300,250,200,150,130,110,100,90,80,70,60,50};
            int[] gold = new int[]{100000,95000,90000,85000,80000,75000,70000,65000,60000,55000,50000,45000,40000,35000,30000,27500,25000,22500,20000,17500,15000};
            int[] piece = new int[]{12,10,10,8,8,8,8,8,8,8,6,6,6,6,6,6,4,4,4,4,4};
            int[] hpbox = new int[]{4,4,4,3,3,3,3,3,3,3,2,2,2,2,2,2,1,1,1,1,1};
            int[] pvpcorn = new int[]{800,775,750,725,700,680,660,640,620,600,590,580,570,560,550,540,530,520,510,500,490};
            string token1 = token;
            string userid = user_id;
            string body1 = "";

               if(rangking == 1)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[0] + "|A,A3," + gem[0] + "|A,A6," + pvpcorn[0] + "|D,400001," + piece[0] + "|D,500001," + hpbox[0] + "|||||";

               }
            else if(rangking == 2)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[1] + "|A,A3," + gem[1] + "|A,A6," + pvpcorn[1] + "|D,400001," + piece[1] + "|D,500001," + hpbox[1] + "|||||";

            }
            else if(rangking == 3)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[2] + "|A,A3," + gem[2] + "|A,A6," + pvpcorn[2] + "|D,400001," + piece[2] + "|D,500001," + hpbox[2] + "|||||";

            }
            else if(rangking == 4)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[3] + "|A,A3," + gem[3] + "|A,A6," + pvpcorn[3] + "|D,400001," + piece[3] + "|D,500001," + hpbox[3] + "|||||";

            }
             else if(rangking == 5)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[4] + "|A,A3," + gem[4] + "|A,A6," + pvpcorn[4] + "|D,400001," + piece[4] + "|D,500001," + hpbox[4] + "|||||";

            }
             else if(rangking == 6)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[5] + "|A,A3," + gem[5] + "|A,A6," + pvpcorn[5] + "|D,400001," + piece[5] + "|D,500001," + hpbox[5] + "|||||";

            }
             else if(rangking == 7)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[6] + "|A,A3," + gem[6] + "|A,A6," + pvpcorn[6] + "|D,400001," + piece[6] + "|D,500001," + hpbox[6] + "|||||";

            }
             else if(rangking == 8)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[7] + "|A,A3," + gem[7] + "|A,A6," + pvpcorn[7] + "|D,400001," + piece[7] + "|D,500001," + hpbox[7] + "|||||";

            }
             else if(rangking == 9)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[8] + "|A,A3," + gem[8] + "|A,A6," + pvpcorn[8] + "|D,400001," + piece[8] + "|D,500001," + hpbox[8] + "|||||";

            }
             else if(rangking == 10)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[9] + "|A,A3," + gem[9] + "|A,A6," + pvpcorn[9] + "|D,400001," + piece[9] + "|D,500001," + hpbox[9] + "|||||";

            }
             else if(rangking >= 11 && rangking <= 20)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[10] + "|A,A3," + gem[10] + "|A,A6," + pvpcorn[10] + "|D,400001," + piece[10] + "|D,500001," + hpbox[10] + "|||||";

            }
             else if(rangking >= 21 && rangking <= 30)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[11] + "|A,A3," + gem[11] + "|A,A6," + pvpcorn[11] + "|D,400001," + piece[11] + "|D,500001," + hpbox[11] + "|||||";

            }
             else if(rangking >= 31 && rangking <= 40)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[12] + "|A,A3," + gem[12] + "|A,A6," + pvpcorn[12] + "|D,400001," + piece[12] + "|D,500001," + hpbox[12] + "|||||";

            }
             else if(rangking >= 41 && rangking <= 50)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[13] + "|A,A3," + gem[13] + "|A,A6," + pvpcorn[13] + "|D,400001," + piece[13] + "|D,500001," + hpbox[13] + "|||||";

            }
             else if(rangking >= 51 && rangking <= 70)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[14] + "|A,A3," + gem[14] + "|A,A6," + pvpcorn[14] + "|D,400001," + piece[14] + "|D,500001," + hpbox[14] + "|||||";

            }
             else if(rangking >= 71 && rangking <= 100)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[15] + "|A,A3," + gem[15] + "|A,A6," + pvpcorn[15] + "|D,400001," + piece[15] + "|D,500001," + hpbox[15] + "|||||";

            }
             else if(rangking >= 101 && rangking <= 200)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[16] + "|A,A3," + gem[16] + "|A,A6," + pvpcorn[16] + "|D,400001," + piece[16] + "|D,500001," + hpbox[16] + "|||||";

            }
             else if(rangking >= 201 && rangking <= 300)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[17] + "|A,A3," + gem[17] + "|A,A6," + pvpcorn[17] + "|D,400001," + piece[17] + "|D,500001," + hpbox[17] + "|||||";

            }
             else if(rangking >= 301 && rangking <= 400)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[18] + "|A,A3," + gem[18] + "|A,A6," + pvpcorn[18] + "|D,400001," + piece[18] + "|D,500001," + hpbox[18] + "|||||";

            }
            else if(rangking >= 401 && rangking <= 500)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[19] + "|A,A3," + gem[19] + "|A,A6," + pvpcorn[19] + "|D,400001," + piece[19] + "|D,500001," + hpbox[19] + "|||||";

            }
            else if(rangking >= 501)
               {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[20] + "|A,A3," + gem[20] + "|A,A6," + pvpcorn[20] + "|D,400001," + piece[20] + "|D,500001," + hpbox[20] + "|||||";

            }

               if (body1 != "")
               {
               pvpdbDataContext DB = new pvpdbDataContext();
               sendmail sm = new sendmail();
               string flag = sm.systemSendMail(token1, userid, body1);
               t_pvp_giftlog gl = new t_pvp_giftlog();
               gl.userID = uId;
               gl.rank = rangking;
               gl.flag = flag;
               gl.date = DateTime.Now;
               DB.t_pvp_giftlog.InsertOnSubmit(gl);
               DB.SubmitChanges();
               }
        }
예제 #2
0
파일: Program.cs 프로젝트: sheshuo2/pvpgift
        private static void sendgift(int rangking, int uId, string token, string user_id)
        {
            int[]  gem     = new int[] { 550, 500, 450, 400, 350, 340, 330, 320, 310, 300, 250, 200, 150, 130, 110, 100, 90, 80, 70, 60, 50 };
            int[]  gold    = new int[] { 100000, 95000, 90000, 85000, 80000, 75000, 70000, 65000, 60000, 55000, 50000, 45000, 40000, 35000, 30000, 27500, 25000, 22500, 20000, 17500, 15000 };
            int[]  piece   = new int[] { 12, 10, 10, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4 };
            int[]  hpbox   = new int[] { 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1 };
            int[]  pvpcorn = new int[] { 800, 775, 750, 725, 700, 680, 660, 640, 620, 600, 590, 580, 570, 560, 550, 540, 530, 520, 510, 500, 490 };
            string token1  = token;
            string userid  = user_id;
            string body1   = "";

            if (rangking == 1)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[0] + "|A,A3," + gem[0] + "|A,A6," + pvpcorn[0] + "|D,400001," + piece[0] + "|D,500001," + hpbox[0] + "|||||";
            }
            else if (rangking == 2)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[1] + "|A,A3," + gem[1] + "|A,A6," + pvpcorn[1] + "|D,400001," + piece[1] + "|D,500001," + hpbox[1] + "|||||";
            }
            else if (rangking == 3)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[2] + "|A,A3," + gem[2] + "|A,A6," + pvpcorn[2] + "|D,400001," + piece[2] + "|D,500001," + hpbox[2] + "|||||";
            }
            else if (rangking == 4)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[3] + "|A,A3," + gem[3] + "|A,A6," + pvpcorn[3] + "|D,400001," + piece[3] + "|D,500001," + hpbox[3] + "|||||";
            }
            else if (rangking == 5)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[4] + "|A,A3," + gem[4] + "|A,A6," + pvpcorn[4] + "|D,400001," + piece[4] + "|D,500001," + hpbox[4] + "|||||";
            }
            else if (rangking == 6)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[5] + "|A,A3," + gem[5] + "|A,A6," + pvpcorn[5] + "|D,400001," + piece[5] + "|D,500001," + hpbox[5] + "|||||";
            }
            else if (rangking == 7)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[6] + "|A,A3," + gem[6] + "|A,A6," + pvpcorn[6] + "|D,400001," + piece[6] + "|D,500001," + hpbox[6] + "|||||";
            }
            else if (rangking == 8)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[7] + "|A,A3," + gem[7] + "|A,A6," + pvpcorn[7] + "|D,400001," + piece[7] + "|D,500001," + hpbox[7] + "|||||";
            }
            else if (rangking == 9)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[8] + "|A,A3," + gem[8] + "|A,A6," + pvpcorn[8] + "|D,400001," + piece[8] + "|D,500001," + hpbox[8] + "|||||";
            }
            else if (rangking == 10)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[9] + "|A,A3," + gem[9] + "|A,A6," + pvpcorn[9] + "|D,400001," + piece[9] + "|D,500001," + hpbox[9] + "|||||";
            }
            else if (rangking >= 11 && rangking <= 20)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[10] + "|A,A3," + gem[10] + "|A,A6," + pvpcorn[10] + "|D,400001," + piece[10] + "|D,500001," + hpbox[10] + "|||||";
            }
            else if (rangking >= 21 && rangking <= 30)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[11] + "|A,A3," + gem[11] + "|A,A6," + pvpcorn[11] + "|D,400001," + piece[11] + "|D,500001," + hpbox[11] + "|||||";
            }
            else if (rangking >= 31 && rangking <= 40)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[12] + "|A,A3," + gem[12] + "|A,A6," + pvpcorn[12] + "|D,400001," + piece[12] + "|D,500001," + hpbox[12] + "|||||";
            }
            else if (rangking >= 41 && rangking <= 50)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[13] + "|A,A3," + gem[13] + "|A,A6," + pvpcorn[13] + "|D,400001," + piece[13] + "|D,500001," + hpbox[13] + "|||||";
            }
            else if (rangking >= 51 && rangking <= 70)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[14] + "|A,A3," + gem[14] + "|A,A6," + pvpcorn[14] + "|D,400001," + piece[14] + "|D,500001," + hpbox[14] + "|||||";
            }
            else if (rangking >= 71 && rangking <= 100)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[15] + "|A,A3," + gem[15] + "|A,A6," + pvpcorn[15] + "|D,400001," + piece[15] + "|D,500001," + hpbox[15] + "|||||";
            }
            else if (rangking >= 101 && rangking <= 200)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[16] + "|A,A3," + gem[16] + "|A,A6," + pvpcorn[16] + "|D,400001," + piece[16] + "|D,500001," + hpbox[16] + "|||||";
            }
            else if (rangking >= 201 && rangking <= 300)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[17] + "|A,A3," + gem[17] + "|A,A6," + pvpcorn[17] + "|D,400001," + piece[17] + "|D,500001," + hpbox[17] + "|||||";
            }
            else if (rangking >= 301 && rangking <= 400)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[18] + "|A,A3," + gem[18] + "|A,A6," + pvpcorn[18] + "|D,400001," + piece[18] + "|D,500001," + hpbox[18] + "|||||";
            }
            else if (rangking >= 401 && rangking <= 500)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[19] + "|A,A3," + gem[19] + "|A,A6," + pvpcorn[19] + "|D,400001," + piece[19] + "|D,500001," + hpbox[19] + "|||||";
            }
            else if (rangking >= 501)
            {
                body1 = uId + "|竞技场排名奖励|截至今日21:00.你的竞技场排名为" + rangking + ",你将获得以下竞技场排名奖励。|A,A2," + gold[20] + "|A,A3," + gem[20] + "|A,A6," + pvpcorn[20] + "|D,400001," + piece[20] + "|D,500001," + hpbox[20] + "|||||";
            }

            if (body1 != "")
            {
                pvpdbDataContext DB   = new pvpdbDataContext();
                sendmail         sm   = new sendmail();
                string           flag = sm.systemSendMail(token1, userid, body1);
                t_pvp_giftlog    gl   = new t_pvp_giftlog();
                gl.userID = uId;
                gl.rank   = rangking;
                gl.flag   = flag;
                gl.date   = DateTime.Now;
                DB.t_pvp_giftlog.InsertOnSubmit(gl);
                DB.SubmitChanges();
            }
        }