示例#1
0
 void OnClickpvp(ButtonScript obj, object args, int param1, int param2)
 {
     if (Prebattle.Instance.FindPlayer((int)PlayerInst.instId_) == null)
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("duifangbuzaichangjing"));
         return;
     }
     if (Prebattle.Instance.FindPlayer((int)PlayerInst.instId_) != null && Prebattle.Instance.FindPlayer((int)PlayerInst.instId_).playerData_.isInBattle_)
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("zhengzaizhandou"));
         return;
     }
     if (GuildSystem.IsMyGuildMember((int)PlayerInst.instId_) && ssd.sceneType_ == SceneType.SCT_GuildBattleScene)
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("bunenggongjibenjiazu"));
         return;
     }
     if (/*ssd.sceneType_ == SceneType.SCT_TeamPK||ssd.sceneType_ == SceneType.SCT_AlonePK &&*/ TeamSystem.isTeamMember((int)PlayerInst.instId_))
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("bunenggongji"));
         return;
     }
     if (GuildSystem.battleState == 1 && ssd.sceneType_ == SceneType.SCT_GuildBattleScene)
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("jiazuzhanopen"));
         return;
     }
     if (GuildSystem.battleState == 3)
     {
         PopText.Instance.Show(LanguageManager.instance.GetValue("jiazuzhanojieshu"));
         return;
     }
     NetConnection.Instance.requestPk((uint)PlayerInst.instId_);
 }
示例#2
0
 bool IsTeamMemberInGuild()
 {
     if (!TeamSystem.IsInTeam())
     {
         return(false);
     }
     for (int i = 0; i < TeamSystem.GetTeamMembers().Length; i++)
     {
         if (GuildSystem.IsMyGuildMember((int)TeamSystem.GetTeamMembers()[i].instId_))
         {
             continue;
         }
         else
         {
             return(false);
         }
     }
     return(true);
 }