You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
using System.Collections.Generic;
|
|
using Sog;
|
|
|
|
|
|
namespace Battle
|
|
{
|
|
public class MainlandBattleInfo
|
|
{
|
|
public int mainlandScene;
|
|
|
|
public long lastReqTime;
|
|
|
|
// 同一个mainland id生成的battleInfo
|
|
public List<ProtoCSClass.BattleInfoAll> battleList = new List<ProtoCSClass.BattleInfoAll>();
|
|
}
|
|
|
|
public class BattleInfoCache
|
|
{
|
|
public long uid;
|
|
|
|
public int mainlandId;
|
|
|
|
// 一个mainland记录一个battleInfo的list, 最多同时不超过n个mainland, 超过移除最早的一组
|
|
// mainland -> List<BattleInfoAll>
|
|
public List<MainlandBattleInfo> mainlandBattle = new List<MainlandBattleInfo>();
|
|
}
|
|
|
|
public class BattleTable : IServerDataObj
|
|
{
|
|
// uid -> battleInfoCache
|
|
public Dictionary<long, BattleInfoCache> m_battleTable;
|
|
|
|
// uid -> BattleInfoAll 只记录自动挑战
|
|
public Dictionary<long, ProtoCSClass.BattleInfoAll> m_autoChallenge_battleTable;
|
|
|
|
public BattleTable()
|
|
{
|
|
m_battleTable = new Dictionary<long, BattleInfoCache>();
|
|
m_autoChallenge_battleTable = new Dictionary<long, ProtoCSClass.BattleInfoAll>();
|
|
}
|
|
|
|
public override int GetDataType()
|
|
{
|
|
return BattleDataObjType.BattleTable;
|
|
}
|
|
}
|
|
}
|