Skip to content

Commit

Permalink
refactor dungeon battle grid selection
Browse files Browse the repository at this point in the history
  • Loading branch information
moonheart committed Dec 23, 2023
1 parent f6c0861 commit f59996f
Show file tree
Hide file tree
Showing 6 changed files with 283 additions and 187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,17 @@

namespace MementoMori.Ortega.Share.Data.ApiInterface.DungeonBattle
{
[MessagePackObject(true)]
public class GetBattleGridDataResponse : ApiResponseBase
{
public List<DungeonBattleEnemyInfo> EnemyInfos
{
get;
set;
}
[MessagePackObject(true)]
public class GetBattleGridDataResponse : ApiResponseBase
{
public List<DungeonBattleEnemyInfo> EnemyInfos { get; set; }

public List<UserItem> NormalRewardItemList
{
get;
set;
}
public List<UserItem> NormalRewardItemList { get; set; }

public List<UserItem> SpecialRewardItemList
{
get;
set;
}
public List<UserItem> SpecialRewardItemList { get; set; }

public GetBattleGridDataResponse()
{
}
}
}
public GetBattleGridDataResponse()
{
}
}
}
40 changes: 12 additions & 28 deletions MementoMori.Ortega/Share/Data/DungeonBattle/DungeonBattleGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,19 @@

namespace MementoMori.Ortega.Share.Data.DungeonBattle
{
[MessagePackObject(true)]
public class DungeonBattleGrid
{
public string DungeonGridGuid
{
get;
set;
}
[MessagePackObject(true)]
public class DungeonBattleGrid
{
public string DungeonGridGuid { get; set; }

public long DungeonGridId
{
get;
set;
}
public long DungeonGridId { get; set; }

public int X
{
get;
set;
}
public int X { get; set; }

public int Y
{
get;
set;
}
public int Y { get; set; }

public DungeonBattleGrid()
{
}
}
}
public DungeonBattleGrid()
{
}
}
}
66 changes: 21 additions & 45 deletions MementoMori.Ortega/Share/Master/Data/DungeonBattleEnemyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,30 @@

namespace MementoMori.Ortega.Share.Master.Data
{
[Description("時空の洞窟 敵情報")]
[MessagePackObject(true)]
public class DungeonBattleEnemyInfo
{
[Description("戦闘力")]
public long BattlePower
{
get;
set;
}
[Description("時空の洞窟 敵情報")]
[MessagePackObject(true)]
public class DungeonBattleEnemyInfo
{
[Description("戦闘力")]
public long BattlePower { get; set; }

[Description("レアリティ")]
public CharacterRarityFlags CharacterRarityFlags
{
get;
set;
}
[Description("レアリティ")]
public CharacterRarityFlags CharacterRarityFlags { get; set; }

[Description("属性")]
public ElementType ElementType
{
get;
set;
}
[Description("属性")]
public ElementType ElementType { get; set; }

[Description("レベル")]
public long Level
{
get;
set;
}
[Description("レベル")]
public long Level { get; set; }

[Description("ユニットアイコンID")]
public long UnitIconId
{
get;
set;
}
[Description("ユニットアイコンID")]
public long UnitIconId { get; set; }

[Description("ユニットアイコンタイプ")]
public UnitIconType UnitIconType
{
get;
set;
}
[Description("ユニットアイコンタイプ")]
public UnitIconType UnitIconType { get; set; }

public DungeonBattleEnemyInfo()
{
}
}
}
public DungeonBattleEnemyInfo()
{
}
}
}
63 changes: 35 additions & 28 deletions MementoMori.Ortega/Share/Master/Data/DungeonBattleGridMB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,41 @@

namespace MementoMori.Ortega.Share.Master.Data
{
[MessagePackObject(true)]
[Description("時空の洞窟 マス詳細")]
public class DungeonBattleGridMB : MasterBookBase
{
[Description("マス名キー")]
[PropertyOrder(1)]
public string DungeonGridNameKey
{
get;
}
[MessagePackObject(true)]
[Description("時空の洞窟 マス詳細")]
public class DungeonBattleGridMB : MasterBookBase
{
[Description("マス名キー")]
[PropertyOrder(1)]
public string DungeonGridNameKey { get; }

[Description("マス種別")]
[PropertyOrder(2)]
public DungeonBattleGridType DungeonGridType
{
get;
}
[Description("マス種別")]
[PropertyOrder(2)]
public DungeonBattleGridType DungeonGridType { get; }

[SerializationConstructor]
public DungeonBattleGridMB(long id, bool? isIgnore, string memo, string dungeonGridNameKey, DungeonBattleGridType dungeonGridType)
:base(id, isIgnore, memo)
{
DungeonGridNameKey = dungeonGridNameKey;
DungeonGridType = dungeonGridType;
}
[SerializationConstructor]
public DungeonBattleGridMB(long id, bool? isIgnore, string memo, string dungeonGridNameKey, DungeonBattleGridType dungeonGridType)
: base(id, isIgnore, memo)
{
DungeonGridNameKey = dungeonGridNameKey;
DungeonGridType = dungeonGridType;
}

public DungeonBattleGridMB() : base(0, false, "")
{
}
}
}
public DungeonBattleGridMB() : base(0, false, "")
{
}

public bool IsBattleType()
{
return DungeonGridType == DungeonBattleGridType.BattleAndRelicReinforce ||
DungeonGridType == DungeonBattleGridType.BattleBoss ||
DungeonGridType == DungeonBattleGridType.BattleBossNoRelic ||
DungeonGridType == DungeonBattleGridType.BattleElite ||
DungeonGridType == DungeonBattleGridType.BattleNormal ||
DungeonGridType == DungeonBattleGridType.EventBattleElite ||
DungeonGridType == DungeonBattleGridType.EventBattleNormal ||
DungeonGridType == DungeonBattleGridType.EventBattleSpecial
;
}
}
}
8 changes: 8 additions & 0 deletions MementoMori/MementoMoriFuncs.Ops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@ private bool IsBossBattleQuickAvailable
}
}

private bool IsDungeonBattleHardModeAvailable
{
get
{
return UserSyncData.UserBattleBossDtoInfo.BossClearMaxQuestId >= OpenContentTable.GetByOpenCommandType(OpenCommandType.DungeonBattleHardMode).OpenContentValue;
}
}

private bool IsGuildRaidQuickAvailable
{
get
Expand Down
Loading

0 comments on commit f59996f

Please sign in to comment.