2021-05-05 13:36:19 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2021-05-01 22:06:12 +08:00
|
|
|
|
using Cal;
|
|
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
|
using MongoDB.Bson.Serialization.Options;
|
|
|
|
|
|
|
|
|
|
namespace ET
|
|
|
|
|
{
|
|
|
|
|
public enum StarSoulItemSortType: byte
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 优先品质
|
|
|
|
|
/// </summary>
|
|
|
|
|
QualityFirst,
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 优先套装
|
|
|
|
|
/// </summary>
|
|
|
|
|
TypeFirst,
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 优先等级
|
|
|
|
|
/// </summary>
|
|
|
|
|
LevelFirst,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class StarSoulItem
|
|
|
|
|
{
|
|
|
|
|
public long Id;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 套装Id
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int typeId;
|
|
|
|
|
|
|
|
|
|
public byte level;
|
|
|
|
|
public int exp;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 装备栏
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EquipType posType;
|
|
|
|
|
public Quality quality;
|
|
|
|
|
public bool isUsed;
|
2021-05-05 13:36:19 +08:00
|
|
|
|
public bool isLocked;
|
2021-05-01 22:06:12 +08:00
|
|
|
|
|
|
|
|
|
// [BsonRepresentation(MongoDB.Bson.BsonType.Double, AllowTruncation = true)]
|
|
|
|
|
public int mainId;
|
|
|
|
|
public int[] viceIds = new int[4];
|
|
|
|
|
[BsonRepresentation(MongoDB.Bson.BsonType.Double, AllowTruncation = true)]
|
|
|
|
|
public float[] viceAdd = new float[4];
|
|
|
|
|
|
2021-05-02 23:18:14 +08:00
|
|
|
|
public byte addViceCount;
|
|
|
|
|
|
2021-05-05 13:36:19 +08:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return $"id={this.Id} type={this.typeId} {this.posType} {this.quality} level={this.level} isUsed={this.isUsed} islocked={this.isLocked}";
|
|
|
|
|
}
|
2021-05-01 22:06:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-05-05 13:36:19 +08:00
|
|
|
|
public class StarSoulSuit
|
|
|
|
|
{
|
|
|
|
|
[System.Flags]
|
|
|
|
|
public enum StarSoulSuitType:byte
|
|
|
|
|
{
|
|
|
|
|
None,
|
|
|
|
|
Suit4=1,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 不要使用,不存在这种情况
|
|
|
|
|
/// </summary>
|
|
|
|
|
Suit8=1<<1,
|
|
|
|
|
Suit4And8 = Suit4|Suit8,
|
|
|
|
|
}
|
|
|
|
|
public int Id;
|
|
|
|
|
public StarSoulSuitType type;
|
|
|
|
|
|
|
|
|
|
}
|
2021-05-01 22:06:12 +08:00
|
|
|
|
[BsonIgnoreExtraElements]
|
2021-05-05 13:36:19 +08:00
|
|
|
|
public class StarSoulBag: Entity,ICombatBounds
|
2021-05-01 22:06:12 +08:00
|
|
|
|
{
|
|
|
|
|
public const ushort MaxCount = 1000;
|
|
|
|
|
public int ItemCount;
|
|
|
|
|
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
|
|
|
|
public SortedDictionary<long, StarSoulItem> itemDic = new SortedDictionary<long, StarSoulItem>();
|
|
|
|
|
public long lastSortTime;
|
|
|
|
|
public const int sortTimeIntervel = 120 * 1000;
|
2021-05-05 13:36:19 +08:00
|
|
|
|
public List<StarSoulSuit> Suits = new List<StarSoulSuit>();
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 星魂数量,用于计算套装
|
|
|
|
|
/// </summary>
|
|
|
|
|
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
|
|
|
|
public Dictionary<int, int> typeStarSoulCount = new Dictionary<int, int>();
|
|
|
|
|
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
|
|
|
|
public Dictionary<byte, long> usedStarSoulDic = new Dictionary<byte, long>();
|
|
|
|
|
|
|
|
|
|
[BsonIgnore]
|
|
|
|
|
public Func<AttributeType, float> getAttributeFunc { get; set; }
|
2021-05-01 22:06:12 +08:00
|
|
|
|
}
|
|
|
|
|
}
|