public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

                self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                if (self.mJoinPlayerParam == null)
                {
                    self.FailureLobby();
                }
                else
                {
                    int lrange = -1;
                    int frange = -1;
                    int lv     = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                    int versusTowerFloor = MonoSingleton <GameManager> .Instance.Player.VersusTowerFloor;
                    MonoSingleton <GameManager> .Instance.GetRankMatchCondition(out lrange, out frange);

                    if (instance.JoinRoomCheckParam(GlobalVars.MultiPlayVersusKey, self.mJoinPlayerParam.Serialize(), lrange, frange, lv, versusTowerFloor))
                    {
                        return;
                    }
                    DebugUtility.Log("error:" + (object)instance.LastError);
                    self.FailureLobby();
                }
            }
 public override void OnActivate(int pinID)
 {
     if (pinID == 100)
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         FlowNode_VersusAward.\u003COnActivate\u003Ec__AnonStorey218 activateCAnonStorey218 = new FlowNode_VersusAward.\u003COnActivate\u003Ec__AnonStorey218();
         // ISSUE: reference to a compiler-generated field
         activateCAnonStorey218.pt = PunMonoSingleton <MyPhoton> .Instance;
         JSON_MyPhotonPlayerParam data = (JSON_MyPhotonPlayerParam)null;
         // ISSUE: reference to a compiler-generated field
         List <MyPhoton.MyPlayer> roomPlayerList = activateCAnonStorey218.pt.GetRoomPlayerList();
         if (roomPlayerList != null)
         {
             if (this.MyPlayer)
             {
                 data = JSON_MyPhotonPlayerParam.Create(0, 0);
             }
             else
             {
                 // ISSUE: reference to a compiler-generated method
                 MyPhoton.MyPlayer myPlayer = roomPlayerList.Find(new Predicate <MyPhoton.MyPlayer>(activateCAnonStorey218.\u003C\u003Em__215));
                 if (myPlayer != null)
                 {
                     data = JSON_MyPhotonPlayerParam.Parse(myPlayer.json);
                 }
             }
         }
         if (data != null)
         {
             DataSource.Bind <JSON_MyPhotonPlayerParam>(this.BindObj, data);
         }
     }
     this.ActivateOutputLinks(200);
 }
 public override void Begin(FlowNode_MultiPlayJoinRoom self)
 {
   MyPhoton instance = PunMonoSingleton<MyPhoton>.Instance;
   if (string.IsNullOrEmpty(GlobalVars.SelectedMultiPlayRoomName))
   {
     self.FailureLobby();
   }
   else
   {
     QuestParam quest = MonoSingleton<GameManager>.Instance.FindQuest(GlobalVars.SelectedQuestID);
     if (quest == null)
     {
       DebugUtility.Log("illegal iname:" + GlobalVars.SelectedQuestID);
       self.IllegalQuest();
     }
     else
     {
       self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
       if (self.mJoinPlayerParam == null)
       {
         self.FailureLobby();
       }
       else
       {
         DebugUtility.Log("Joining name:" + GlobalVars.SelectedMultiPlayRoomName + " pnum:" + (object) quest.playerNum + " unum:" + (object) quest.unitNum);
         if (instance.JoinRoom(GlobalVars.SelectedMultiPlayRoomName, self.mJoinPlayerParam.Serialize(), GlobalVars.ResumeMultiplayPlayerID != 0))
           return;
         DebugUtility.Log("error:" + (object) instance.LastError);
         self.FailureLobby();
       }
     }
   }
 }
 public override void Begin(FlowNode_MultiPlayJoinRoom self)
 {
   MyPhoton instance = PunMonoSingleton<MyPhoton>.Instance;
   self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
   if (self.mJoinPlayerParam == null)
   {
     self.FailureLobby();
   }
   else
   {
     JSON_MyPhotonRoomParam myPhotonRoomParam = new JSON_MyPhotonRoomParam();
     myPhotonRoomParam.creatorName = MonoSingleton<GameManager>.Instance.Player.Name;
     myPhotonRoomParam.creatorLV = MonoSingleton<GameManager>.Instance.Player.CalcLevel();
     myPhotonRoomParam.creatorFUID = JSON_MyPhotonRoomParam.GetMyCreatorFUID();
     myPhotonRoomParam.roomid = GlobalVars.SelectedMultiPlayRoomID;
     myPhotonRoomParam.comment = GlobalVars.SelectedMultiPlayRoomComment;
     myPhotonRoomParam.passCode = GlobalVars.EditMultiPlayRoomPassCode;
     myPhotonRoomParam.iname = GlobalVars.SelectedQuestID;
     myPhotonRoomParam.type = (int) GlobalVars.SelectedMultiPlayRoomType;
     myPhotonRoomParam.isLINE = !self.IsLINE ? 0 : 1;
     QuestParam quest = MonoSingleton<GameManager>.Instance.FindQuest(GlobalVars.SelectedQuestID);
     MultiTowerFloorParam mtFloorParam = MonoSingleton<GameManager>.Instance.GetMTFloorParam(quest.iname);
     int selectedMultiTowerFloor = GlobalVars.SelectedMultiTowerFloor;
     if (instance.CreateRoom((int) quest.playerNum, GlobalVars.SelectedMultiPlayRoomName, myPhotonRoomParam.Serialize(), self.mJoinPlayerParam.Serialize(), mtFloorParam.tower_id, selectedMultiTowerFloor, -1, (string) null, (string) null, -1, true))
       return;
     self.FailureLobby();
   }
 }
Esempio n. 5
0
            public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

                self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                if (self.mJoinPlayerParam == null)
                {
                    self.FailureLobby();
                }
                else
                {
                    int lvRange = -1;
                    int lv      = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                    int    rankMatchScore = MonoSingleton <GameManager> .Instance.Player.RankMatchScore;
                    int    rankMatchClass = (int)MonoSingleton <GameManager> .Instance.Player.RankMatchClass;
                    string deviceId       = MonoSingleton <GameManager> .Instance.DeviceId;
                    if (instance.JoinRankMatchRoomCheckParam(self.mJoinPlayerParam.Serialize(), lv, lvRange, deviceId, rankMatchScore, 900, 100, rankMatchClass, MonoSingleton <GameManager> .Instance.RankMatchMatchedEnemies))
                    {
                        return;
                    }
                    DebugUtility.Log("error:" + (object)instance.LastError);
                    self.FailureLobby();
                }
            }
Esempio n. 6
0
            public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                GameManager instance1 = MonoSingleton <GameManager> .Instance;
                MyPhoton    instance2 = PunMonoSingleton <MyPhoton> .Instance;

                self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                if (self.mJoinPlayerParam == null)
                {
                    self.FailureLobby();
                }
                else
                {
                    JSON_MyPhotonRoomParam myPhotonRoomParam = new JSON_MyPhotonRoomParam();
                    myPhotonRoomParam.creatorName = MonoSingleton <GameManager> .Instance.Player.Name;
                    myPhotonRoomParam.creatorLV   = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                    myPhotonRoomParam.creatorFUID = JSON_MyPhotonRoomParam.GetMyCreatorFUID();
                    myPhotonRoomParam.roomid      = GlobalVars.SelectedMultiPlayRoomID;
                    myPhotonRoomParam.comment     = GlobalVars.SelectedMultiPlayRoomComment;
                    myPhotonRoomParam.passCode    = GlobalVars.EditMultiPlayRoomPassCode;
                    myPhotonRoomParam.iname       = GlobalVars.SelectedQuestID;
                    myPhotonRoomParam.type        = (int)GlobalVars.SelectedMultiPlayRoomType;
                    myPhotonRoomParam.isLINE      = !self.IsLINE ? 0 : 1;
                    myPhotonRoomParam.vsmode      = instance1.GetVSMode(-1L) != VS_MODE.THREE_ON_THREE ? 1 : 0;
                    int    creatorLv      = myPhotonRoomParam.creatorLV;
                    string deviceId       = MonoSingleton <GameManager> .Instance.DeviceId;
                    int    rankMatchScore = MonoSingleton <GameManager> .Instance.Player.RankMatchScore;
                    int    rankMatchClass = (int)MonoSingleton <GameManager> .Instance.Player.RankMatchClass;
                    if (instance2.CreateRoom(GlobalVars.SelectedMultiPlayRoomName, myPhotonRoomParam.Serialize(), self.mJoinPlayerParam.Serialize(), creatorLv, deviceId, rankMatchScore, rankMatchClass))
                    {
                        return;
                    }
                    self.FailureLobby();
                }
            }
Esempio n. 7
0
 public override void OnActivate(int pinID)
 {
     if (pinID == 100)
     {
         GameManager instance          = MonoSingleton <GameManager> .Instance;
         JSON_MyPhotonPlayerParam data = (JSON_MyPhotonPlayerParam)null;
         if (instance.AudienceMode)
         {
             MyPhoton.MyRoom audienceRoom = instance.AudienceRoom;
             if (audienceRoom != null)
             {
                 JSON_MyPhotonRoomParam myPhotonRoomParam = JSON_MyPhotonRoomParam.Parse(audienceRoom.json);
                 if (myPhotonRoomParam != null && myPhotonRoomParam.players != null && myPhotonRoomParam.players.Length >= this.ROOM_MAX_PLAYERCNT)
                 {
                     data = myPhotonRoomParam.players[!this.MyPlayer ? 1 : 0];
                 }
             }
         }
         else
         {
             // ISSUE: object of a compiler-generated type is created
             // ISSUE: variable of a compiler-generated type
             FlowNode_VersusAward.\u003COnActivate\u003Ec__AnonStorey2D6 activateCAnonStorey2D6 = new FlowNode_VersusAward.\u003COnActivate\u003Ec__AnonStorey2D6();
             // ISSUE: reference to a compiler-generated field
             activateCAnonStorey2D6.pt = PunMonoSingleton <MyPhoton> .Instance;
             // ISSUE: reference to a compiler-generated field
             List <MyPhoton.MyPlayer> roomPlayerList = activateCAnonStorey2D6.pt.GetRoomPlayerList();
             if (roomPlayerList != null)
             {
                 if (this.MyPlayer)
                 {
                     data = JSON_MyPhotonPlayerParam.Create(0, 0);
                 }
                 else
                 {
                     // ISSUE: reference to a compiler-generated method
                     MyPhoton.MyPlayer myPlayer = roomPlayerList.Find(new Predicate <MyPhoton.MyPlayer>(activateCAnonStorey2D6.\u003C\u003Em__2CB));
                     if (myPlayer != null)
                     {
                         data = JSON_MyPhotonPlayerParam.Parse(myPlayer.json);
                     }
                 }
             }
         }
         if (data != null)
         {
             DataSource.Bind <JSON_MyPhotonPlayerParam>(this.BindObj, data);
         }
     }
     this.ActivateOutputLinks(200);
 }
 public override void Begin(FlowNode_MultiPlayJoinRoom self)
 {
   MyPhoton instance = PunMonoSingleton<MyPhoton>.Instance;
   self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
   if (self.mJoinPlayerParam == null)
   {
     self.FailureLobby();
   }
   else
   {
     if (instance.JoinRandomRoom(self.VERSUS_PLAYER_MAX, self.mJoinPlayerParam.Serialize(), GlobalVars.MultiPlayVersusKey, GlobalVars.SelectedMultiPlayRoomName, -1, -1))
       return;
     DebugUtility.Log("error:" + (object) instance.LastError);
     self.FailureLobby();
   }
 }
 public override void OnActivate(int pinID)
 {
     if (pinID == 100)
     {
         GameManager instance          = MonoSingleton <GameManager> .Instance;
         JSON_MyPhotonPlayerParam data = (JSON_MyPhotonPlayerParam)null;
         if (instance.AudienceMode)
         {
             MyPhoton.MyRoom audienceRoom = instance.AudienceRoom;
             if (audienceRoom != null)
             {
                 JSON_MyPhotonRoomParam myPhotonRoomParam = JSON_MyPhotonRoomParam.Parse(audienceRoom.json);
                 if (myPhotonRoomParam != null && myPhotonRoomParam.players != null && myPhotonRoomParam.players.Length >= this.ROOM_MAX_PLAYERCNT)
                 {
                     data = myPhotonRoomParam.players[!this.MyPlayer ? 1 : 0];
                 }
             }
         }
         else
         {
             MyPhoton pt = PunMonoSingleton <MyPhoton> .Instance;
             List <MyPhoton.MyPlayer> roomPlayerList = pt.GetRoomPlayerList();
             if (roomPlayerList != null)
             {
                 if (this.MyPlayer)
                 {
                     data = JSON_MyPhotonPlayerParam.Create(0, 0);
                 }
                 else
                 {
                     MyPhoton.MyPlayer myPlayer = roomPlayerList.Find((Predicate <MyPhoton.MyPlayer>)(p => p.playerID != pt.GetMyPlayer().playerID));
                     if (myPlayer != null)
                     {
                         data = JSON_MyPhotonPlayerParam.Parse(myPlayer.json);
                     }
                 }
             }
         }
         if (data != null)
         {
             DataSource.Bind <JSON_MyPhotonPlayerParam>(this.BindObj, data);
         }
     }
     this.ActivateOutputLinks(200);
 }
Esempio n. 10
0
            public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                GameManager instance1 = MonoSingleton <GameManager> .Instance;
                MyPhoton    instance2 = PunMonoSingleton <MyPhoton> .Instance;

                self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                if (self.mJoinPlayerParam == null)
                {
                    self.FailureLobby();
                }
                else
                {
                    JSON_MyPhotonRoomParam myPhotonRoomParam = new JSON_MyPhotonRoomParam();
                    myPhotonRoomParam.creatorName = MonoSingleton <GameManager> .Instance.Player.Name;
                    myPhotonRoomParam.creatorLV   = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                    myPhotonRoomParam.creatorFUID = JSON_MyPhotonRoomParam.GetMyCreatorFUID();
                    myPhotonRoomParam.roomid      = GlobalVars.SelectedMultiPlayRoomID;
                    myPhotonRoomParam.comment     = GlobalVars.SelectedMultiPlayRoomComment;
                    myPhotonRoomParam.passCode    = GlobalVars.EditMultiPlayRoomPassCode;
                    myPhotonRoomParam.iname       = GlobalVars.SelectedQuestID;
                    myPhotonRoomParam.type        = (int)GlobalVars.SelectedMultiPlayRoomType;
                    myPhotonRoomParam.isLINE      = !self.IsLINE ? 0 : 1;
                    myPhotonRoomParam.vsmode      = instance1.GetVSMode(-1L) != VS_MODE.THREE_ON_THREE ? 1 : 0;
                    myPhotonRoomParam.draft_type  = !GlobalVars.IsVersusDraftMode ? 0 : 1;
                    int    plv         = -1;
                    int    floor       = -1;
                    int    audienceMax = (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.AudienceMax;
                    string uid         = (string)null;
                    string luid        = (string)null;
                    if (GlobalVars.SelectedMultiPlayVersusType == VERSUS_TYPE.Tower)
                    {
                        plv   = myPhotonRoomParam.creatorLV;
                        floor = MonoSingleton <GameManager> .Instance.Player.VersusTowerFloor;
                        uid   = MonoSingleton <GameManager> .Instance.DeviceId;
                        luid  = MonoSingleton <GameManager> .Instance.VersusLastUid;
                    }
                    if (instance2.CreateRoom((int)self.VERSUS_PLAYER_MAX, GlobalVars.SelectedMultiPlayRoomName, myPhotonRoomParam.Serialize(), self.mJoinPlayerParam.Serialize(), GlobalVars.MultiPlayVersusKey, floor, plv, luid, uid, audienceMax, false))
                    {
                        return;
                    }
                    self.FailureLobby();
                }
            }
 public override void Begin(FlowNode_MultiPlayJoinRoom self)
 {
   MyPhoton instance1 = PunMonoSingleton<MyPhoton>.Instance;
   self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
   if (self.mJoinPlayerParam == null)
   {
     self.FailureLobby();
   }
   else
   {
     GameManager instance2 = MonoSingleton<GameManager>.Instance;
     QuestParam quest = instance2.FindQuest(GlobalVars.SelectedQuestID);
     MultiTowerFloorParam mtFloorParam = instance2.GetMTFloorParam(GlobalVars.SelectedQuestID);
     if (instance1.JoinRandomRoom((byte) (short) quest.playerNum, self.mJoinPlayerParam.Serialize(), mtFloorParam.tower_id, (string) null, GlobalVars.SelectedMultiTowerFloor, 1))
       return;
     DebugUtility.Log("error:" + (object) instance1.LastError);
     self.FailureLobby();
   }
 }
Esempio n. 12
0
            public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                MyPhoton   instance = PunMonoSingleton <MyPhoton> .Instance;
                QuestParam quest    = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID);

                if (quest == null || !quest.IsMulti || ((int)quest.playerNum < 1 || (int)quest.unitNum < 1) || ((int)quest.unitNum > 11 || quest.map == null || quest.map.Count <= 0))
                {
                    DebugUtility.Log("illegal iname:" + GlobalVars.SelectedQuestID);
                    self.IllegalQuest();
                }
                else
                {
                    DebugUtility.Log("CreateRoom quest:" + quest.iname + " desc:" + quest.name);
                    self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                    if (self.mJoinPlayerParam == null)
                    {
                        self.FailureLobby();
                    }
                    else
                    {
                        JSON_MyPhotonRoomParam myPhotonRoomParam = new JSON_MyPhotonRoomParam();
                        myPhotonRoomParam.creatorName = MonoSingleton <GameManager> .Instance.Player.Name;
                        myPhotonRoomParam.creatorLV   = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                        myPhotonRoomParam.creatorFUID = JSON_MyPhotonRoomParam.GetMyCreatorFUID();
                        myPhotonRoomParam.roomid      = GlobalVars.SelectedMultiPlayRoomID;
                        myPhotonRoomParam.comment     = GlobalVars.SelectedMultiPlayRoomComment;
                        myPhotonRoomParam.passCode    = GlobalVars.EditMultiPlayRoomPassCode;
                        myPhotonRoomParam.iname       = GlobalVars.SelectedQuestID;
                        myPhotonRoomParam.type        = (int)GlobalVars.SelectedMultiPlayRoomType;
                        myPhotonRoomParam.isLINE      = !self.IsLINE ? 0 : 1;
                        myPhotonRoomParam.unitlv      = !GlobalVars.SelectedMultiPlayLimit ? 0 : GlobalVars.MultiPlayJoinUnitLv;
                        DebugUtility.Log("create isLINE:" + (object)myPhotonRoomParam.isLINE + " iname:" + myPhotonRoomParam.iname + " roomid:" + (object)myPhotonRoomParam.roomid + " appID:" + GlobalVars.SelectedMultiPlayPhotonAppID + " token:" + GlobalVars.SelectedMultiPlayRoomName + " comment:" + myPhotonRoomParam.comment + " pass:"******" type:" + (object)myPhotonRoomParam.type + " json:" + myPhotonRoomParam.Serialize());
                        if (instance.CreateRoom((int)quest.playerNum, GlobalVars.SelectedMultiPlayRoomName, myPhotonRoomParam.Serialize(), self.mJoinPlayerParam.Serialize(), (string)null, -1, -1, (string)null, (string)null, -1, false))
                        {
                            return;
                        }
                        self.FailureLobby();
                    }
                }
            }
            public override void Begin(FlowNode_MultiPlayJoinRoom self)
            {
                MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance;

                self.mJoinPlayerParam = JSON_MyPhotonPlayerParam.Create(0, 0);
                if (self.mJoinPlayerParam == null)
                {
                    self.FailureLobby();
                }
                else
                {
                    JSON_MyPhotonRoomParam myPhotonRoomParam = new JSON_MyPhotonRoomParam();
                    myPhotonRoomParam.creatorName = MonoSingleton <GameManager> .Instance.Player.Name;
                    myPhotonRoomParam.creatorLV   = MonoSingleton <GameManager> .Instance.Player.CalcLevel();

                    myPhotonRoomParam.creatorFUID = JSON_MyPhotonRoomParam.GetMyCreatorFUID();
                    myPhotonRoomParam.roomid      = GlobalVars.SelectedMultiPlayRoomID;
                    myPhotonRoomParam.comment     = GlobalVars.SelectedMultiPlayRoomComment;
                    myPhotonRoomParam.passCode    = GlobalVars.EditMultiPlayRoomPassCode;
                    myPhotonRoomParam.iname       = GlobalVars.SelectedQuestID;
                    myPhotonRoomParam.type        = (int)GlobalVars.SelectedMultiPlayRoomType;
                    myPhotonRoomParam.isLINE      = !self.IsLINE ? 0 : 1;
                    int plv   = -1;
                    int floor = -1;
                    if (GlobalVars.SelectedMultiPlayVersusType == VERSUS_TYPE.Tower)
                    {
                        plv   = myPhotonRoomParam.creatorLV;
                        floor = MonoSingleton <GameManager> .Instance.Player.VersusTowerFloor;
                    }
                    if (instance.CreateRoom((int)self.VERSUS_PLAYER_MAX, GlobalVars.SelectedMultiPlayRoomName, myPhotonRoomParam.Serialize(), self.mJoinPlayerParam.Serialize(), GlobalVars.MultiPlayVersusKey, floor, plv))
                    {
                        return;
                    }
                    self.FailureLobby();
                }
            }