public static MatchWrestlerInfo CreateWrestlerInfo(int wID)
        {
            #region Variables
            int               num               = 0;
            SaveData          inst              = SaveData.inst;
            MatchSetting      matchSetting      = GlobalWork.inst.MatchSetting;
            MatchWrestlerInfo matchWrestlerInfo = new MatchWrestlerInfo();
            Player            plObj             = new Player();
            matchWrestlerInfo.entry           = true;
            matchWrestlerInfo.isSecond        = false;
            matchWrestlerInfo.isIntruder      = false;
            matchWrestlerInfo.assignedPad     = PadPort.Num;
            matchWrestlerInfo.wrestlerID      = (WrestlerID)wID;
            matchWrestlerInfo.InitialLifeRate = 1f;
            #endregion

            matchWrestlerInfo.editCtiticalMoveName = string.Empty;
            if (!GlobalParam.flg_IsOnline)
            {
                matchWrestlerInfo.param = DataBase.GetWrestlerParam(matchWrestlerInfo.wrestlerID);
                bool flag3 = matchWrestlerInfo.wrestlerID >= WrestlerID.EditWrestlerIDTop;
                if (flag3)
                {
                    EditWrestlerData       editWrestlerData       = SaveData.inst.GetEditWrestlerData(matchWrestlerInfo.wrestlerID);
                    WrestlerAppearanceData wrestlerAppearanceData = editWrestlerData.appearanceData;
                    matchWrestlerInfo.editCtiticalMoveName = editWrestlerData.criticalMoveName;
                }
                else
                {
                    WrestlerAppearanceData wrestlerAppearanceData = PresetWrestlerDataMan.inst.GetPresetAppearanceData(matchWrestlerInfo.wrestlerID);
                    PresetWrestlerData     presetWrestlerData     = PresetWrestlerDataMan.inst.GetPresetWrestlerData(matchWrestlerInfo.wrestlerID);
                    matchWrestlerInfo.editCtiticalMoveName = presetWrestlerData.criticalMoveName[(int)inst.optionSettings.language];
                }
            }
            else
            {
                int[] array = new int[8];
                MonoSingleton <Network> .instance.Online_Wrestler_CostumeSlot(array);

                Debug.Log(string.Concat(new object[]
                {
                    "table[i] ",
                    num,
                    " / ",
                    array[num]
                }));
                EditWrestlerData editWrestlerData2 = Online_WrestlerData.Online_EditWrestler[array[0]];
                matchWrestlerInfo.param = editWrestlerData2.wrestlerParam;
                WrestlerAppearanceData wrestlerAppearanceData = editWrestlerData2.appearanceData;
                matchWrestlerInfo.editCtiticalMoveName = editWrestlerData2.criticalMoveName;
            }
            matchWrestlerInfo.group = 0;
            bool flag4 = matchSetting.BattleRoyalKind == BattleRoyalKindEnum.Off;
            if (flag4)
            {
                matchWrestlerInfo.group = num;
            }
            else
            {
                matchWrestlerInfo.group = num;
            }
            matchWrestlerInfo.costume_no = 0;
            matchWrestlerInfo.alignment  = SaveData.inst.groupList[matchWrestlerInfo.param.groupID].alignment;
            bool flag5 = !matchSetting.isCarryOverHP;
            if (flag5)
            {
                matchWrestlerInfo.HP       = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.SP       = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Neck  = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Arm   = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Waist = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Leg   = 65535f * matchWrestlerInfo.InitialLifeRate;
            }

            return(matchWrestlerInfo);
        }
Esempio n. 2
0
        private Player ActivatePlayer(Player plObj, WresIDGroup wrestler)
        {
            plObj.FormRen.DestroySprite();

            #region Variables
            int                    idx            = plObj.PlIdx;
            MatchSetting           matchSetting   = GlobalWork.inst.MatchSetting;
            MatchWrestlerInfo      info           = MatchConfiguration.CreateWrestlerInfo(wrestler.ID);
            Player                 player         = PlayerMan.inst.CreatePlayer(idx, null);
            WrestlerAppearanceData appearanceData = SaveData.inst.GetEditWrestlerData(info.wrestlerID).appearanceData;
            #endregion

            #region Setting wrestler appearance
            player.Init((WrestlerID)wrestler.ID, PadPort.AI, wrestler.Group);
            player.FormRen.InitTexture(appearanceData.costumeData[info.costume_no], null);
            player.FormRen.InitSprite(false);
            for (int i = 0; i < 5; i++)
            {
                Menu_SoundManager.Sound_ClipWrestlerVoice_List[idx, i] = null;
            }
            for (int j = 0; j < 5; j++)
            {
                Menu_SoundManager.Load_WrestlerVoice(idx, j, info.param.voiceType[j], info.param.voiceID[j]);
            }
            #endregion

            player.finishMove_Atk.Clear();
            player.finishMove_Def[0].Clear();
            player.finishMove_Def[1].Clear();

            if (idx < 4)
            {
                player.MyGroupPlIdx_Start    = 0;
                player.MyGroupPlIdx_End      = 4;
                player.EnemyGroupPlIdx_Start = 4;
                player.EnemyGroupPlIdx_End   = 8;
                player.finishWewstlerID      = matchSetting.matchWrestlerInfo[4].wrestlerID;
            }
            else
            {
                player.MyGroupPlIdx_Start    = 4;
                player.MyGroupPlIdx_End      = 8;
                player.EnemyGroupPlIdx_Start = 0;
                player.EnemyGroupPlIdx_End   = 4;
                player.finishWewstlerID      = matchSetting.matchWrestlerInfo[0].wrestlerID;
            }

            player.animator.ReqBasicAnm(BasicSkillEnum.Stand_Power_S, false, -1);
            player.animator.UpdateAnimation();
            player.animator.CurrentSkill  = SkillDataMan.inst.GetSkillData_Standard(BasicSkillEnum.Stand_Power_S);
            player.animator.CurrentAnmIdx = 0;
            player.animator.AnmHostPlayer = player.PlIdx;
            player.ChangeState(PlStateEnum.Stand);
            player.animator.isAnmPause = false;

            #region Setting player to enter
            VenueSetting venueSetting = Ring.inst.venueSetting;
            player.moveSpeed             = player.WresParam.walkSpeed;
            player.isLoseAndStop         = false;
            player.isLose                = false;
            player.isEntranceWalking     = false;
            player.isEntrancePerformance = false;
            player.hasRight              = true;
            player.SetSleep(false);
            player.TargetPlIdx = player.PlIdx;
            player.Group       = idx;

            //player.PlPos.x = MatchData.PlayerInitialPosTbl[idx].x;
            //player.PlPos.y = MatchData.PlayerInitialPosTbl[idx].y;
            #endregion

            PlayerMan.inst.SetPlayer(idx, player);
            return(player);
        }