1222
This commit is contained in:
@@ -24,6 +24,7 @@ public static class GoodsEnum
|
|||||||
Practise,//修炼道具
|
Practise,//修炼道具
|
||||||
Durability,//耐久道具
|
Durability,//耐久道具
|
||||||
AddExp,//扣除经验获得道具
|
AddExp,//扣除经验获得道具
|
||||||
|
Collect,//收集的物品
|
||||||
GetExp//使用后获得经验
|
GetExp//使用后获得经验
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -448,7 +448,7 @@ public class GameFightService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
|||||||
List<TowerGet> AddMapGoods = new List<TowerGet>();
|
List<TowerGet> AddMapGoods = new List<TowerGet>();
|
||||||
var opGoods = JsonConvert.DeserializeObject<List<TowerGet>>(fightAward.award.ToString());
|
var opGoods = JsonConvert.DeserializeObject<List<TowerGet>>(fightAward.award.ToString());
|
||||||
string addGoodsUser = fightData.areaCode == nameof(GameEnum.AreaCode.Public) ? "0" : fightData.winUser;
|
string addGoodsUser = fightData.areaCode == nameof(GameEnum.AreaCode.Public) ? "0" : fightData.winUser;
|
||||||
if (userConfig.autoBag == 1)
|
if (userConfig.autoBag != 0)
|
||||||
{
|
{
|
||||||
var weightService = App.GetService<IUnitUserWeight>();
|
var weightService = App.GetService<IUnitUserWeight>();
|
||||||
bool auto = true;
|
bool auto = true;
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ public class UnitUserAttrService(ISqlSugarClient DbClient, IRedisCache redis) :
|
|||||||
#region 个人属性
|
#region 个人属性
|
||||||
|
|
||||||
public async Task<UserAttrModel> GetUserAttrModel(string userId, string scene = "Default")
|
public async Task<UserAttrModel> GetUserAttrModel(string userId, string scene = "Default")
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
UserAttrModel result = new UserAttrModel();
|
UserAttrModel result = new UserAttrModel();
|
||||||
result.id = userId;
|
result.id = userId;
|
||||||
@@ -130,6 +132,12 @@ public class UnitUserAttrService(ISqlSugarClient DbClient, IRedisCache redis) :
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"错误ID:{userId},错误信息:{e.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async Task<UserAttrModel> ReviseUserRoleAttr(UserAttrModel result)
|
private async Task<UserAttrModel> ReviseUserRoleAttr(UserAttrModel result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,6 +112,11 @@ public class UnitUserWeight(ISqlSugarClient DbClient, IRedisCache redis) : IUnit
|
|||||||
|
|
||||||
public async Task<bool> CheckUserWeight(string userId, int useWeight)
|
public async Task<bool> CheckUserWeight(string userId, int useWeight)
|
||||||
{
|
{
|
||||||
|
if (useWeight <= 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
var weightInfo = await GetUserWeightInfo(userId);
|
var weightInfo = await GetUserWeightInfo(userId);
|
||||||
if (weightInfo != null)
|
if (weightInfo != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user