121212
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
namespace Application.Domain;
|
||||
|
||||
public interface IGameCdkService
|
||||
{
|
||||
Task<game_cdk> GetCdkInfo(int cdkId);
|
||||
|
||||
Task<game_cdk_item> GetCdkItemInfo(string cdk);
|
||||
|
||||
Task<bool> UpdateCdkUser(string cdk, string userId);
|
||||
|
||||
Task<int> GetUserCdkCount(int cdkId, string userId);
|
||||
|
||||
Task<bool> AddCdkItem(List<game_cdk_item> data);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Application.Domain;
|
||||
|
||||
public interface IGameMagicService
|
||||
{
|
||||
Task UpdateUserMagicTime(string userId,int areaId);
|
||||
Task UpdateUserMagicEndTime(string userId, bool isWin);
|
||||
Task<bool> CheckInMagic(string userId);
|
||||
Task HandleMagicData();
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public interface IGameMapService
|
||||
Task<string> GetUserOnMapId(string userId);
|
||||
Task<game_city_map> GetUserOnToMapInfo(string userId);
|
||||
Task<unit_user_online> GetUserOnMap(string userId);
|
||||
Task UpdateUserOnMap(string userId);
|
||||
Task UpdateUserOnMap(string userId, string mapId = "");
|
||||
Task UpdateUserOnMap(string userId, string ip, string mapId);
|
||||
Task<bool> UpdateUserOnMap(unit_user_online data, string mapId);
|
||||
Task<UserOnMap> GetUserOnMapInfo(string userId);
|
||||
@@ -34,6 +34,8 @@ public interface IGameMapService
|
||||
|
||||
#region 其他相关
|
||||
|
||||
Task<List<UserModel>> GetMapUserByAll(string mapId, int area, int showArea, List<string> noUser);
|
||||
Task<List<UserModel>> GetMapUser(string mapId, int area, int showArea, List<string> noUser);
|
||||
Task<List<UserModel>> GetMapUser(string mapId, int area, int showArea, List<string> noUser, int take);
|
||||
|
||||
Task<List<UserModel>> GetMapUser(string mapId, int area, int showArea, List<string> noUser, int page,
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
public interface IGameDicService
|
||||
{
|
||||
Task<game_dic> GetDicInfo(string code);
|
||||
Task<string> GetDicInfoContent(string code);
|
||||
}
|
||||
@@ -2,9 +2,19 @@
|
||||
|
||||
public interface IGameMaxNameService
|
||||
{
|
||||
#region 资源
|
||||
|
||||
Task<game_maxname> GetMaxNameInfo(string mnId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region unit_user_maxname
|
||||
|
||||
Task<bool> AddMaxName(string userId, string mnId, int addCount);
|
||||
Task<bool> UpdateUserMaxname(unit_user_maxname name);
|
||||
Task<unit_user_maxname> GetUserMaxnameInfo(string umnId);
|
||||
Task<List<unit_user_maxname>> GetUserMaxnameList(string userId, int page, int limit, RefAsync<int> total);
|
||||
Task<List<unit_user_maxname>> GetUserMaxNameData(string userId);
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public interface IMessageService
|
||||
#region 广播消息
|
||||
|
||||
Task<List<game_broadcast>> GetBroadcastData(int area);
|
||||
Task<bool> SendBroadcast(string userId, string code, string msg);
|
||||
Task<bool> SendBroadcast(string userId, string code, string msg, int area = 0);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace Application.Domain;
|
||||
|
||||
public class GameCdkService(ISqlSugarClient DbClient, IRedisCache redis) : IGameCdkService, ITransient
|
||||
{
|
||||
public async Task<game_cdk> GetCdkInfo(int cdkId)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_cdk>();
|
||||
return await db.Queryable<game_cdk>().Where(it => it.cdkId == cdkId).SingleAsync();
|
||||
}
|
||||
|
||||
public async Task<game_cdk_item> GetCdkItemInfo(string cdk)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_cdk_item>();
|
||||
return await db.Queryable<game_cdk_item>().Where(it => it.ciId == cdk).SingleAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateCdkUser(string cdk, string userId)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_cdk_item>();
|
||||
return await db.Updateable<game_cdk_item>().SetColumns(it => it.userId == userId)
|
||||
.SetColumns(it => it.upTime == DateTime.Now)
|
||||
.Where(it => it.ciId == cdk).ExecuteCommandAsync() > 0;
|
||||
}
|
||||
|
||||
public async Task<int> GetUserCdkCount(int cdkId, string userId)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_cdk_item>();
|
||||
return await db.Queryable<game_cdk_item>().Where(it => it.cdkId == cdkId && it.userId == userId).CountAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> AddCdkItem(List<game_cdk_item> data)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_cdk_item>();
|
||||
return await db.Insertable(data).ExecuteCommandAsync() > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Application.Domain;
|
||||
|
||||
public class GameMagicService(ISqlSugarClient DbClient, IRedisCache redis) : IGameMagicService, ITransient
|
||||
{
|
||||
public async Task UpdateUserMagicTime(string userId, int areaId)
|
||||
{
|
||||
string time = TimeAssist.GetDateTimeYMDString(0);
|
||||
long upTime = TimeExtend.GetTimeStampMilliseconds;
|
||||
game_magic data = new game_magic()
|
||||
{
|
||||
userId = userId,
|
||||
areaId = areaId,
|
||||
time = time,
|
||||
isWin = 0,
|
||||
uptime = upTime
|
||||
};
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_magic>();
|
||||
await db.Storageable(data).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
public async Task UpdateUserMagicEndTime(string userId, bool isWin)
|
||||
{
|
||||
long upTime = TimeExtend.GetTimeStampMilliseconds;
|
||||
if (isWin)
|
||||
{
|
||||
upTime = TimeExtend.GetTimeStampByMilliseconds(TimeAssist.GetDateTimeYMD(7));
|
||||
}
|
||||
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_magic>();
|
||||
await db.Updateable<game_magic>().SetColumns(it => it.uptime == upTime)
|
||||
.SetColumns(it => it.isWin == (isWin ? 1 : 0))
|
||||
.Where(it => it.userId == userId)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> CheckInMagic(string userId)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_magic>();
|
||||
var myInfo = await db.Queryable<game_magic>().Where(it => it.userId == userId).SingleAsync();
|
||||
if (myInfo == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (myInfo.isWin == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
long time = TimeExtend.GetTimeStampMilliseconds;
|
||||
if (myInfo.uptime < time)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public async Task HandleMagicData()
|
||||
{
|
||||
List<RankAwardModel> magicAward = new List<RankAwardModel>();
|
||||
var mapService = App.GetService<IGameMapService>();
|
||||
var userService = App.GetService<IUnitUserService>();
|
||||
var areaService = App.GetService<IAreaService>();
|
||||
var dicService = App.GetService<IGameDicService>();
|
||||
var messageService = App.GetService<IMessageService>();
|
||||
|
||||
|
||||
string time = TimeAssist.GetDateTimeYMDString(0);
|
||||
|
||||
var dicData = await dicService.GetDicInfoContent(nameof(GameEnum.DicCode.MagicAward));
|
||||
if (!string.IsNullOrEmpty(dicData))
|
||||
{
|
||||
magicAward = JsonConvert.DeserializeObject<List<RankAwardModel>>(dicData);
|
||||
}
|
||||
|
||||
var areaData = await areaService.GetAreaData();
|
||||
foreach (var area in areaData)
|
||||
{
|
||||
//清退处理
|
||||
var users = await mapService.GetMapUserByAll(GameConfig.GameMagicMapId, area.areaId, 1, []);
|
||||
if (users.Count > 0)
|
||||
{
|
||||
for (int i = 1; i <= users.Count; i++)
|
||||
{
|
||||
string userId = users[i - 1].userId;
|
||||
bool isWin = false;
|
||||
if (i == users.Count)
|
||||
{
|
||||
isWin = true;
|
||||
}
|
||||
|
||||
await UpdateUserMagicEndTime(userId, isWin);
|
||||
await mapService.UpdateUserOnMap(userId, GameConfig.GameMagicInMapId);
|
||||
}
|
||||
}
|
||||
|
||||
//发放奖励
|
||||
if (magicAward.Count > 0)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_magic>();
|
||||
var userData = await db.Queryable<game_magic>().Where(it => it.areaId == area.areaId && it.time == time)
|
||||
.OrderByDescending(it => it
|
||||
.isWin).OrderByDescending(it => it.uptime).ToListAsync();
|
||||
if (userData.Any(it => it.isWin == 1))
|
||||
{
|
||||
string msg = "魔城争霸赛已结束,前三名分别是:";
|
||||
int rank = 1;
|
||||
foreach (var user in userData)
|
||||
{
|
||||
var onAward = magicAward.Find(it => it.min <= rank && it.max >= rank);
|
||||
if (onAward != null)
|
||||
{
|
||||
string mailContent = $"恭喜您获得魔城争霸赛第【{rank}】名奖励,再接再厉噢!";
|
||||
await messageService.SendMaill(user.userId, "魔城争霸赛奖励发放通知", mailContent, onAward.award);
|
||||
if (rank <= 3)
|
||||
{
|
||||
var userInfo = await userService.GetUserInfoByUserId(user.userId);
|
||||
msg += $"{UbbTool.HomeUbb(userInfo.userNo, userInfo.nick)}、";
|
||||
}
|
||||
|
||||
rank++;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
msg = msg.TrimEnd('、');
|
||||
await messageService.SendBroadcast("0", nameof(MessageEnum.BroadcastCode.System), msg, area.areaId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -233,9 +233,10 @@ public class GameFightService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
||||
{
|
||||
await UserStateTool.SetUserMapDefault(lowUser);
|
||||
}
|
||||
|
||||
//战败后,结束挂机
|
||||
var hookService = App.GetService<IOnHookService>();
|
||||
await hookService.StopOnHook(lowUser);
|
||||
await hookService.StopOnHook(lowUser);
|
||||
|
||||
fightData.state = 1;
|
||||
fightData.winCode = nameof(UserEnum.AttrCode.Person);
|
||||
@@ -427,7 +428,7 @@ public class GameFightService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
||||
string noticeMsg =
|
||||
$"您在{cityInfo.cityName}·{mapInfo.mapName}被[{UbbTool.HomeUbb(winUserInfo.userNo, winUserInfo.nick)}]击杀!";
|
||||
await chatService.SendChat(lowUser, (int)lowUserInfo.areaId, nameof(GameChatEnum.Code.Notice), noticeMsg);
|
||||
if (mapInfo.isPk == 1 && fightData.userId == winUser)
|
||||
if (mapInfo.isPk == 1 && fightData.userId == winUser && fightData.scene == nameof(MapEnum.MapCode.DEF_MAP))
|
||||
{
|
||||
var relationService = App.GetService<IUnitUserRelationService>();
|
||||
if (await relationService.CheckUserEnemy(winUser, lowUser) == false)
|
||||
@@ -436,6 +437,16 @@ public class GameFightService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
||||
await accService.UpdateUserData(winUser, 1, nameof(AccEnum.AccType.enemy), 5, "击杀玩家"); //加罪恶
|
||||
}
|
||||
}
|
||||
|
||||
#region 场景处理
|
||||
|
||||
if (fightData.scene == nameof(MapEnum.MapCode.Magic_Map)) //魔城
|
||||
{
|
||||
var magicService = App.GetService<IGameMagicService>();
|
||||
await magicService.UpdateUserMagicEndTime(lowUser, false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -140,7 +140,7 @@ public class GameMapService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
||||
};
|
||||
if (item.code == nameof(MapEnum.NpcCode.Task))
|
||||
{
|
||||
var task = await taskService.GetTaskDataByNpc(userId,item.npcId);
|
||||
var task = await taskService.GetTaskDataByNpc(userId, item.npcId);
|
||||
if (task.Count > 0)
|
||||
{
|
||||
temp.state = task.Any(it => it.state == 0) ? 1 : 2;
|
||||
@@ -218,9 +218,14 @@ public class GameMapService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
||||
};
|
||||
}
|
||||
|
||||
public async Task UpdateUserOnMap(string userId)
|
||||
public async Task UpdateUserOnMap(string userId, string mapId = "")
|
||||
{
|
||||
unit_user_online onLine = await GetUserOnMap(userId);
|
||||
if (!string.IsNullOrEmpty(mapId))
|
||||
{
|
||||
onLine.mapId = mapId;
|
||||
}
|
||||
|
||||
onLine.upTime = TimeExtend.GetTimeStampSeconds;
|
||||
string key = string.Format(UserCache.BaseCacheKey, "UserOnline");
|
||||
if (await redis.AddHashAsync(key, userId, onLine))
|
||||
@@ -400,7 +405,28 @@ public class GameMapService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
||||
|
||||
#region 其他相关
|
||||
|
||||
private async Task<List<UserModel>> GetMapUser(string mapId, int area, int showArea, List<string> noUser)
|
||||
public async Task<List<UserModel>> GetMapUserByAll(string mapId, int area, int showArea, List<string> noUser)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_online>();
|
||||
var data = await db.Queryable<unit_user_online>().Where(it => it.mapId == mapId)
|
||||
.WhereIF(noUser.Count > 0, it => !noUser.Contains(it.userId))
|
||||
.OrderByDescending(it => it.upTime)
|
||||
.ToListAsync();
|
||||
|
||||
List<UserModel> result = new List<UserModel>();
|
||||
data.ForEach(async it =>
|
||||
{
|
||||
var temp = await UserModelTool.GetUserView(it.userId);
|
||||
bool isAdd = showArea == 1 && area != temp.area ? false : true;
|
||||
if (isAdd)
|
||||
{
|
||||
result.Add(temp);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<List<UserModel>> GetMapUser(string mapId, int area, int showArea, List<string> noUser)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_online>();
|
||||
long time = TimeExtend.GetTimeStampBySeconds(DateTime.Now.AddMinutes(0 - GameConfig.OnLineTime));
|
||||
|
||||
@@ -15,5 +15,15 @@ public class GameDicService(ISqlSugarClient DbClient, IRedisCache redis) : IGame
|
||||
await redis.AddHashAsync(key, code, data);
|
||||
return data;
|
||||
}
|
||||
public async Task<string> GetDicInfoContent(string code)
|
||||
{
|
||||
string result = string.Empty;
|
||||
var data = await GetDicInfo(code);
|
||||
if (data != null)
|
||||
{
|
||||
result = data.sign;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -2,39 +2,127 @@
|
||||
|
||||
public class GameMaxNameService(ISqlSugarClient DbClient, IRedisCache redis) : IGameMaxNameService, ITransient
|
||||
{
|
||||
#region 资源
|
||||
|
||||
public async Task<game_maxname> GetMaxNameInfo(string mnId)
|
||||
{
|
||||
string key = string.Format(BaseCache.BaseCacheKey, "GameMaxName");
|
||||
if (await redis.HExistsHashAsync(key, mnId))
|
||||
{
|
||||
return await redis.GetHashAsync<game_maxname>(key, mnId);
|
||||
}
|
||||
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<game_maxname>();
|
||||
var data = await db.Queryable<game_maxname>().Where(i => i.mnId == mnId).SingleAsync();
|
||||
if (data != null)
|
||||
{
|
||||
await redis.AddHashAsync(key, mnId, data);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region unit_user_maxname
|
||||
|
||||
public async Task<bool> AddMaxName(string userId, string mnId, int addCount)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_maxname>();
|
||||
bool isok = false;
|
||||
string umnId = $"{userId}_{mnId}";
|
||||
var data = await GetUserMaxnameInfo(umnId);
|
||||
if (data == null)
|
||||
{
|
||||
var mnInfo = await GetMaxNameInfo(mnId);
|
||||
if (mnInfo != null)
|
||||
{
|
||||
unit_user_maxname mu = new unit_user_maxname();
|
||||
mu.umnId = umnId;
|
||||
mu.userId = userId;
|
||||
mu.mnId = mnId;
|
||||
mu.name = mnInfo.name;
|
||||
mu.img = mnInfo.img;
|
||||
mu.attr = mnInfo.attr;
|
||||
mu.count = 1;
|
||||
mu.addTime = DateTime.Now;
|
||||
mu.endTime = DateTime.Now.AddDays(addCount);
|
||||
mu.show = 0;
|
||||
isok = db.Insertable(mu).ExecuteCommand() > 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data.count = data.count + 1;
|
||||
if (data.endTime > DateTime.Now)
|
||||
{
|
||||
data.endTime = Convert.ToDateTime(data.endTime).AddDays(addCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
data.show = 0;
|
||||
data.endTime = DateTime.Now.AddDays(addCount);
|
||||
}
|
||||
|
||||
isok = db.Updateable(data).IgnoreColumns(true, true).Where(i => i.umnId == data.umnId).ExecuteCommand() > 0;
|
||||
}
|
||||
|
||||
if (isok)
|
||||
{
|
||||
await ClearUserMaxNameCache(userId);
|
||||
}
|
||||
|
||||
return isok;
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateUserMaxname(unit_user_maxname name)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_maxname>();
|
||||
bool isok = await db.Updateable(name).ExecuteCommandAsync() > 0;
|
||||
if (isok)
|
||||
{
|
||||
string key = string.Format(BaseCache.BaseCacheKeys, "UserMaxname", "MaxnameInfo");
|
||||
await redis.DelHashAsync(key, name.umnId);
|
||||
}
|
||||
|
||||
return isok;
|
||||
}
|
||||
|
||||
public async Task<unit_user_maxname> GetUserMaxnameInfo(string umnId)
|
||||
{
|
||||
string key = string.Format(BaseCache.BaseCacheKeys, "UserMaxname", "MaxnameInfo");
|
||||
var data = await redis.GetHashAsync<unit_user_maxname>(key, umnId);
|
||||
if (data == null)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_maxname>();
|
||||
data = await db.Queryable<unit_user_maxname>().Where(i => i.umnId == umnId).SingleAsync();
|
||||
if (data != null)
|
||||
{
|
||||
await redis.AddHashAsync(key, umnId, data);
|
||||
}
|
||||
}
|
||||
return data;
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_maxname>();
|
||||
return await db.Queryable<unit_user_maxname>().Where(i => i.umnId == umnId).SingleAsync();
|
||||
}
|
||||
public async Task<List<unit_user_maxname>> GetUserMaxnameList(string userId, int page, int limit, RefAsync<int> total)
|
||||
|
||||
public async Task<List<unit_user_maxname>> GetUserMaxnameList(string userId, int page, int limit,
|
||||
RefAsync<int> total)
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_maxname>();
|
||||
return await db.Queryable<unit_user_maxname>().Where(i => i.userId == userId).OrderBy(i => i.addTime)
|
||||
.ToPageListAsync(page, limit, total);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public async Task<List<unit_user_maxname>> GetUserMaxNameData(string userId)
|
||||
{
|
||||
string key = string.Format(UserCache.BaseCacheKey, "UserMaxName");
|
||||
List<unit_user_maxname> data = new List<unit_user_maxname>();
|
||||
if (await redis.HExistsHashAsync(key, userId))
|
||||
{
|
||||
data = await redis.GetHashAsync<List<unit_user_maxname>>(key, userId);
|
||||
}
|
||||
else
|
||||
{
|
||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_maxname>();
|
||||
data = await db.Queryable<unit_user_maxname>().Where(i => i.userId == userId).ToListAsync();
|
||||
if (data == null)
|
||||
{
|
||||
data = new List<unit_user_maxname>();
|
||||
}
|
||||
await redis.AddHashAsync(key, userId, data);
|
||||
}
|
||||
return data.FindAll(it=>it.endTime > DateTime.Now);
|
||||
}
|
||||
|
||||
private async Task ClearUserMaxNameCache(string userId)
|
||||
{
|
||||
string key = string.Format(UserCache.BaseCacheKey, "UserMaxName");
|
||||
await redis.DelHashAsync(key,userId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -404,17 +404,16 @@ public class MessageService(ISqlSugarClient DbClient, IRedisCache redis) : IMess
|
||||
return data;
|
||||
}
|
||||
|
||||
public async Task<bool> SendBroadcast(string userId, string code, string msg)
|
||||
public async Task<bool> SendBroadcast(string userId, string code, string msg, int area = 0)
|
||||
{
|
||||
game_broadcast add = new game_broadcast();
|
||||
add.Id = StringAssist.NewGuid;
|
||||
add.userId = userId;
|
||||
add.code = code;
|
||||
add.msg = msg;
|
||||
int area = 0;
|
||||
if (add.userId == "0")
|
||||
{
|
||||
add.area = 0;
|
||||
add.area = area;
|
||||
add.userNo = "0";
|
||||
add.nick = "海精灵";
|
||||
}
|
||||
@@ -425,7 +424,6 @@ public class MessageService(ISqlSugarClient DbClient, IRedisCache redis) : IMess
|
||||
add.area = (int)userInfo.areaId;
|
||||
add.userNo = userInfo.userNo;
|
||||
add.nick = userInfo.nick;
|
||||
area = add.area;
|
||||
}
|
||||
|
||||
add.endTime = TimeExtend.GetTimeStampSeconds + 300;
|
||||
|
||||
@@ -83,6 +83,16 @@ public class UnitUserAttrService(ISqlSugarClient DbClient, IRedisCache redis) :
|
||||
|
||||
#endregion
|
||||
|
||||
#region 称号加层
|
||||
var maxNameService = App.GetService<IGameMaxNameService>();
|
||||
var userMaxName = await maxNameService.GetUserMaxNameData(userId);
|
||||
foreach (var maxName in userMaxName)
|
||||
{
|
||||
ExtendAttrData.AddRange(maxName.attr);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Buff加层
|
||||
|
||||
|
||||
Reference in New Issue
Block a user