コード例 #1
0
    public void SaveBattle(int teamIndex, int chapterId, int mapId, Warehouse ware, List <CharacterInfo> infos, EventInfoCollection eventInfo)
    {
        BattleInfoCollection battleInfo = new BattleInfoCollection();

        battleInfo.Slot             = -1;
        battleInfo.CurrentTeamIndex = teamIndex;
        battleInfo.MapID            = mapId;
        ChapterRecordCollection.TeamCollection teamData = new ChapterRecordCollection.TeamCollection();
        teamData.AfterStartSequence = true;
        teamData.Chapter            = chapterId;
        teamData.Ware        = ware;
        teamData.PlayersInfo = new PlayerInfoCollection();
        foreach (var v in infos)
        {
            teamData.PlayersInfo.AddContent(v);
        }
        battleInfo.team[teamIndex] = teamData;
        battleInfo.Event           = eventInfo;
        battleInfo.Save();
    }