Example #1
0
 void OnClickPvp(ButtonScript obj, object args, int param1, int param2)
 {
     if (GamePlayer.Instance.GetProperty(PropertyType.PT_Level) < 20)
     {
         //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("cannotopen"));
         PopText.Instance.Show(LanguageManager.instance.GetValue("cannotopen"));
         return;
     }
     if (!TeamSystem.IsTeamOpenPvp())
     {
         //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("teamlevelpvp"));
         PopText.Instance.Show(LanguageManager.instance.GetValue("teamlevelpvp"));
         return;
     }
     if (!TeamSystem.IsTeamLeader())
     {
         //ErrorTipsUI.ShowMe(LanguageManager.instance.GetValue("teamopen"));
         PopText.Instance.Show(LanguageManager.instance.GetValue("teamopen"));
         return;
     }
     else
     {
         NetConnection.Instance.requestMyJJCTeamMsg();
         NetConnection.Instance.joinPvpLobby();
     }
 }