private void OnSureBtnClick(GameObject go)
 {
     if (Globals.Instance.Player.GuildSystem.HasGuild())
     {
         GuildInfo info = Globals.Instance.AttDB.GuildDict.GetInfo(Globals.Instance.Player.GuildSystem.Guild.Level);
         if (info != null && Globals.Instance.Player.GuildSystem.Guild.Score >= info.Score * (this.mIndex + 1))
         {
             MC2S_TakeScoreReward mC2S_TakeScoreReward = new MC2S_TakeScoreReward();
             mC2S_TakeScoreReward.Index = this.mIndex;
             Globals.Instance.CliSession.Send(932, mC2S_TakeScoreReward);
         }
     }
 }
示例#2
0
 private void OnBoxClicked(GameObject go)
 {
     GuildInfo info = Globals.Instance.AttDB.GuildDict.GetInfo(Globals.Instance.Player.GuildSystem.Guild.Level);
     if (info != null)
     {
         string name = go.name;
         if (name.Contains("0") && !this.IsBoxRewardTaken(0))
         {
             if (Globals.Instance.Player.GuildSystem.Guild.Score >= info.Score * 1)
             {
                 MC2S_TakeScoreReward mC2S_TakeScoreReward = new MC2S_TakeScoreReward();
                 mC2S_TakeScoreReward.Index = 0;
                 Globals.Instance.CliSession.Send(932, mC2S_TakeScoreReward);
             }
             else
             {
                 this.mGUIGuildMagicRewardPopUp.ShowMe(0);
             }
         }
         else if (name.Contains("1") && !this.IsBoxRewardTaken(1))
         {
             if (Globals.Instance.Player.GuildSystem.Guild.Score >= info.Score * 2)
             {
                 MC2S_TakeScoreReward mC2S_TakeScoreReward2 = new MC2S_TakeScoreReward();
                 mC2S_TakeScoreReward2.Index = 1;
                 Globals.Instance.CliSession.Send(932, mC2S_TakeScoreReward2);
             }
             else
             {
                 this.mGUIGuildMagicRewardPopUp.ShowMe(1);
             }
         }
         else if (name.Contains("2") && !this.IsBoxRewardTaken(2))
         {
             if (Globals.Instance.Player.GuildSystem.Guild.Score >= info.Score * 3)
             {
                 MC2S_TakeScoreReward mC2S_TakeScoreReward3 = new MC2S_TakeScoreReward();
                 mC2S_TakeScoreReward3.Index = 2;
                 Globals.Instance.CliSession.Send(932, mC2S_TakeScoreReward3);
             }
             else
             {
                 this.mGUIGuildMagicRewardPopUp.ShowMe(2);
             }
         }
         else if (name.Contains("3") && !this.IsBoxRewardTaken(3))
         {
             if (Globals.Instance.Player.GuildSystem.Guild.Score >= info.Score * 4)
             {
                 MC2S_TakeScoreReward mC2S_TakeScoreReward4 = new MC2S_TakeScoreReward();
                 mC2S_TakeScoreReward4.Index = 3;
                 Globals.Instance.CliSession.Send(932, mC2S_TakeScoreReward4);
             }
             else
             {
                 this.mGUIGuildMagicRewardPopUp.ShowMe(3);
             }
         }
     }
 }