feat(battle-engine): copy-loop closure to 3282 files (member-surface frontier)
This commit is contained in:
60
SVSim.BattleEngine/Engine/Wizard/GatheringEntryTask.cs
Normal file
60
SVSim.BattleEngine/Engine/Wizard/GatheringEntryTask.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class GatheringEntryTask : BaseTask
|
||||
{
|
||||
public class DeckEntry
|
||||
{
|
||||
public int deck_no;
|
||||
|
||||
public string deck_name;
|
||||
|
||||
public DeckEntry(DeckData deck)
|
||||
{
|
||||
deck_no = deck.GetDeckID();
|
||||
deck_name = deck.GetDeckName();
|
||||
}
|
||||
}
|
||||
|
||||
public class GatheringEntryTaskParam : BaseParam
|
||||
{
|
||||
public string gathering_id;
|
||||
|
||||
public Dictionary<string, DeckEntry> deck_list = new Dictionary<string, DeckEntry>();
|
||||
}
|
||||
|
||||
public GatheringEntryTask()
|
||||
{
|
||||
base.type = ApiType.Type.GatheringEntry;
|
||||
}
|
||||
|
||||
public void SetParameter(string id, List<DeckData> deckList)
|
||||
{
|
||||
GatheringEntryTaskParam gatheringEntryTaskParam = new GatheringEntryTaskParam();
|
||||
gatheringEntryTaskParam.gathering_id = id;
|
||||
if (deckList != null)
|
||||
{
|
||||
for (int i = 0; i < deckList.Count; i++)
|
||||
{
|
||||
gatheringEntryTaskParam.deck_list[i.ToString()] = new DeckEntry(deckList[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gatheringEntryTaskParam.deck_list = null;
|
||||
}
|
||||
base.Params = gatheringEntryTaskParam;
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
Data.MyPageNotifications.data.IsInviteGathering = false;
|
||||
return num;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user