词法修正和代码清理

This commit is contained in:
milimoe 2025-11-17 21:48:36 +08:00
parent 878fab93fb
commit 7b64ec028a
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
17 changed files with 172 additions and 175 deletions

View File

@ -21,7 +21,7 @@ namespace Oshima.FunGame.OshimaModules.Characters
int reduceGrowth = 0; int reduceGrowth = 0;
if (primaryAttribute != PrimaryAttribute.None) if (primaryAttribute != PrimaryAttribute.None)
{ {
int attribute= Random.Shared.Next(15, 31); int attribute = Random.Shared.Next(15, 31);
int growth = Random.Shared.Next(15, 31); int growth = Random.Shared.Next(15, 31);
switch (primaryAttribute) switch (primaryAttribute)
{ {

View File

@ -179,12 +179,12 @@
/// 数值攻击距离参数exatr /// 数值攻击距离参数exatr
/// </summary> /// </summary>
ExATR = 8034, ExATR = 8034,
/// <summary> /// <summary>
/// 数值移动距离参数exmov /// 数值移动距离参数exmov
/// </summary> /// </summary>
ExMOV = 8035, ExMOV = 8035,
/// <summary> /// <summary>
/// 生命偷取%参数exls /// 生命偷取%参数exls
/// </summary> /// </summary>

View File

@ -60,7 +60,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new (character, this, 55)); Skills.Passives.Add(new (character, this, 55));
} }
} }
public class 70 : Item public class 70 : Item
{ {
public override long Id => (long)AccessoryID.70; public override long Id => (long)AccessoryID.70;
@ -74,7 +74,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new (character, this, 70)); Skills.Passives.Add(new (character, this, 70));
} }
} }
public class 85 : Item public class 85 : Item
{ {
public override long Id => (long)AccessoryID.85; public override long Id => (long)AccessoryID.85;
@ -88,7 +88,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new (character, this, 85)); Skills.Passives.Add(new (character, this, 85));
} }
} }
public class 100 : Item public class 100 : Item
{ {
public override long Id => (long)AccessoryID.100; public override long Id => (long)AccessoryID.100;

View File

@ -364,7 +364,7 @@ namespace Oshima.FunGame.OshimaModules.Models
new (), new (), new (), new (), new 齿(), new (), new (), new (), new (), new (), new 齿(), new (),
new (), new (), new (), new (), new (), new () new (), new (), new (), new (), new (), new ()
]; ];
public static List<OshimaRegion> PlayerRegions { get; } = [ public static List<OshimaRegion> PlayerRegions { get; } = [
new () new ()
]; ];
@ -493,7 +493,7 @@ namespace Oshima.FunGame.OshimaModules.Models
{ QualityType.Green, 3 }, { QualityType.Green, 3 },
{ QualityType.White, 1 } { QualityType.White, 1 }
}; };
public static Dictionary<QualityType, double> ForgeNeedy { get; } = new() public static Dictionary<QualityType, double> ForgeNeedy { get; } = new()
{ {
{ QualityType.Red, 230 }, { QualityType.Red, 230 },
@ -503,7 +503,7 @@ namespace Oshima.FunGame.OshimaModules.Models
{ QualityType.Green, 50 }, { QualityType.Green, 50 },
{ QualityType.White, 30 } { QualityType.White, 30 }
}; };
public static Dictionary<RarityType, double> ForgeRegionCoefficient { get; } = new() public static Dictionary<RarityType, double> ForgeRegionCoefficient { get; } = new()
{ {
{ RarityType.OneStar, 0.5 }, { RarityType.OneStar, 0.5 },

View File

@ -1,5 +1,4 @@
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.Core.Constant;
namespace Oshima.FunGame.OshimaModules.Regions namespace Oshima.FunGame.OshimaModules.Regions
{ {

View File

@ -26,18 +26,18 @@ namespace Oshima.FunGame.OshimaModules.Regions
{ {
return null; return null;
} }
public virtual string GetCurrencyInfo(PluginConfig pc, User user, string storeName) public virtual string GetCurrencyInfo(PluginConfig pc, User user, string storeName)
{ {
return ""; return "";
} }
public virtual void SaveGlobalStore(Store store, string storeName) public virtual void SaveGlobalStore(Store store, string storeName)
{ {
} }
public virtual void UpdateNextRefreshGoods() public virtual void UpdateNextRefreshGoods()
{ {

View File

@ -170,7 +170,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
store.CopyGoodsToNextRefreshGoods(newStore.Goods); store.CopyGoodsToNextRefreshGoods(newStore.Goods);
} }
storeTemplate.Add("dokyo_horseracing", store); storeTemplate.Add("dokyo_horseracing", store);
store = storeTemplate.Get("dokyo_cooperative"); store = storeTemplate.Get("dokyo_cooperative");
if (store is null) if (store is null)
{ {

View File

@ -1,7 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
{ {

View File

@ -1,7 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
{ {

View File

@ -74,7 +74,7 @@ namespace Oshima.FunGame.OshimaServers.Model
/// 马匹当前正在生效的技能效果列表 /// 马匹当前正在生效的技能效果列表
/// </summary> /// </summary>
public List<ActiveSkillEffect> ActiveEffects { get; set; } = []; public List<ActiveSkillEffect> ActiveEffects { get; set; } = [];
public override string ToString() public override string ToString()
{ {
return Name; return Name;

View File

@ -51,7 +51,7 @@ namespace Oshima.FunGame.OshimaServers.Service
FunGameConstant.SuperSkills.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]); FunGameConstant.SuperSkills.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]);
FunGameConstant.PassiveSkills.AddRange([new META马(), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]); FunGameConstant.PassiveSkills.AddRange([new META马(), new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), new ()]);
FunGameConstant.CommonPassiveSkills.AddRange([new (), new (), new (), new (), new ()]); FunGameConstant.CommonPassiveSkills.AddRange([new (), new (), new (), new (), new ()]);
FunGameConstant.Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), FunGameConstant.Magics.AddRange([new (), new (), new (), new (), new (), new (), new (), new (),
@ -2260,7 +2260,7 @@ namespace Oshima.FunGame.OshimaServers.Service
return msg; return msg;
} }
public static string MarketBuyItem(Market market, MarketItem item, PluginConfig pc, User user, int count, out bool result) public static string MarketBuyItem(Market market, MarketItem item, PluginConfig pc, User user, int count, out bool result)
{ {
result = false; result = false;
@ -2276,12 +2276,12 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
return $"无法购买此商品,原因:该商品的状态是:{CommonSet.GetMarketItemStatus(item.Status)}。"; return $"无法购买此商品,原因:该商品的状态是:{CommonSet.GetMarketItemStatus(item.Status)}。";
} }
if (item.User == user.Id) if (item.User == user.Id)
{ {
return $"不能购买自己上架的商品!如需下架,请使用【市场下架+序号】指令。"; return $"不能购买自己上架的商品!如需下架,请使用【市场下架+序号】指令。";
} }
if (item.Stock != -1 && item.Stock - count < 0) if (item.Stock != -1 && item.Stock - count < 0)
{ {
return $"此商品【{item.Name}】库存不足,无法购买!\r\n你想要购买 {count} 件,但库存只有 {item.Stock} 件。"; return $"此商品【{item.Name}】库存不足,无法购买!\r\n你想要购买 {count} 件,但库存只有 {item.Stock} 件。";
@ -3730,7 +3730,7 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
EnhanceBoss(enemy_loop, weapons, armors, shoes, accessory, consumables, cLevel, sLevel, mLevel, naLevel, false, false, true); EnhanceBoss(enemy_loop, weapons, armors, shoes, accessory, consumables, cLevel, sLevel, mLevel, naLevel, false, false, true);
} }
// 开始战斗 // 开始战斗
Team team1 = new($"{user.Username}的小队", squad); Team team1 = new($"{user.Username}的小队", squad);
string team2Name = type switch string team2Name = type switch
@ -4215,7 +4215,7 @@ namespace Oshima.FunGame.OshimaServers.Service
return store; return store;
} }
public static void SaveRegionStore(Store store, string storeRegion, string storeName) public static void SaveRegionStore(Store store, string storeRegion, string storeName)
{ {
if (FunGameConstant.PlayerRegions.FirstOrDefault(r => r.Name == storeRegion) is OshimaRegion value) if (FunGameConstant.PlayerRegions.FirstOrDefault(r => r.Name == storeRegion) is OshimaRegion value)
@ -4223,7 +4223,7 @@ namespace Oshima.FunGame.OshimaServers.Service
value.SaveGlobalStore(store, storeName); value.SaveGlobalStore(store, storeName);
} }
} }
public static string CheckRegionStore(EntityModuleConfig<Store> stores, PluginConfig pc, User user, string storeRegion, string storeName, out bool exist) public static string CheckRegionStore(EntityModuleConfig<Store> stores, PluginConfig pc, User user, string storeRegion, string storeName, out bool exist)
{ {
string msg = ""; string msg = "";
@ -4721,7 +4721,7 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
} }
} }
public static void RefreshDailyQuest() public static void RefreshDailyQuest()
{ {
string directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/quests"; string directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/quests";
@ -4820,7 +4820,7 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
} }
} }
public static void RefreshMarketData() public static void RefreshMarketData()
{ {
// 刷新市场 // 刷新市场
@ -4936,7 +4936,7 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
public static void SetUserConfigAndReleaseSemaphoreSlim(long uid, PluginConfig pc, User user, bool updateLastTime = true) => SetUserConfig(uid.ToString(), pc, user, updateLastTime); public static void SetUserConfigAndReleaseSemaphoreSlim(long uid, PluginConfig pc, User user, bool updateLastTime = true) => SetUserConfig(uid.ToString(), pc, user, updateLastTime);
public static void SetUserConfigButNotRelease(long uid, PluginConfig pc, User user, bool updateLastTime = true) => SetUserConfig(uid.ToString(), pc, user, updateLastTime, false); public static void SetUserConfigButNotRelease(long uid, PluginConfig pc, User user, bool updateLastTime = true) => SetUserConfig(uid.ToString(), pc, user, updateLastTime, false);
public static PluginConfig GetUserConfig(string key, out bool isTimeout) public static PluginConfig GetUserConfig(string key, out bool isTimeout)

View File

@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaServers.Service
RoomSemaphoreSlim.Release(); RoomSemaphoreSlim.Release();
} }
} }
public static void GetHorseRacingSettleSemaphoreSlim() public static void GetHorseRacingSettleSemaphoreSlim()
{ {
HorseRacingSettleSemaphoreSlim.Wait(FunGameConstant.SemaphoreSlimTimeout); HorseRacingSettleSemaphoreSlim.Wait(FunGameConstant.SemaphoreSlimTimeout);
@ -263,7 +263,7 @@ namespace Oshima.FunGame.OshimaServers.Service
ReleaseRoomSemaphoreSlim(); ReleaseRoomSemaphoreSlim();
} }
} }
public static string RoomInfo(User user) public static string RoomInfo(User user)
{ {
string msg = ""; string msg = "";
@ -291,7 +291,7 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
return msg; return msg;
} }
public static string RoomInfo(Room room) public static string RoomInfo(Room room)
{ {
string username = ""; string username = "";
@ -332,7 +332,7 @@ namespace Oshima.FunGame.OshimaServers.Service
ReleaseRoomSemaphoreSlim(); ReleaseRoomSemaphoreSlim();
} }
} }
public static void ReSetRoomState(string roomid) public static void ReSetRoomState(string roomid)
{ {
try try

View File

@ -71,11 +71,11 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
return itemGuids; return itemGuids;
} }
public static List<Guid> GetUserItemGuids(SQLHelper helper, long userId) public static List<Guid> GetUserItemGuids(SQLHelper helper, long userId)
{ {
helper.Parameters["UserId"] = userId; helper.Parameters["UserId"] = userId;
DataSet ds = helper.ExecuteDataSet($"select {OfferItemsQuery.TableName}.{OfferItemsQuery.Column_ItemGuid} from {OffersQuery.TableName}\r\n" + DataSet ds = helper.ExecuteDataSet($"select {OfferItemsQuery.TableName}.{OfferItemsQuery.Column_ItemGuid} from {OffersQuery.TableName}\r\n" +
$"left join {OfferItemsQuery.TableName} on {OfferItemsQuery.TableName}.{OfferItemsQuery.Column_OfferId} = {OffersQuery.TableName}.{OffersQuery.Column_Id}\r\n" + $"left join {OfferItemsQuery.TableName} on {OfferItemsQuery.TableName}.{OfferItemsQuery.Column_OfferId} = {OffersQuery.TableName}.{OffersQuery.Column_Id}\r\n" +
$"where {OfferItemsQuery.Column_UserId} = @UserId and {OffersQuery.Column_Status} not in ({(int)OfferState.Cancelled}, {(int)OfferState.Rejected}, {(int)OfferState.Completed})"); $"where {OfferItemsQuery.Column_UserId} = @UserId and {OffersQuery.Column_Status} not in ({(int)OfferState.Cancelled}, {(int)OfferState.Rejected}, {(int)OfferState.Completed})");
List<Guid> list = []; List<Guid> list = [];
@ -85,11 +85,11 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
return list; return list;
} }
public static bool IsItemInOffers(SQLHelper helper, Guid itemGuid) public static bool IsItemInOffers(SQLHelper helper, Guid itemGuid)
{ {
helper.Parameters["ItemGuid"] = itemGuid.ToString(); helper.Parameters["ItemGuid"] = itemGuid.ToString();
helper.ExecuteDataSet($"select {OffersQuery.TableName}.{OffersQuery.Column_Id} from {OffersQuery.TableName}\r\n" + helper.ExecuteDataSet($"select {OffersQuery.TableName}.{OffersQuery.Column_Id} from {OffersQuery.TableName}\r\n" +
$"left join {OfferItemsQuery.TableName} on {OfferItemsQuery.TableName}.{OfferItemsQuery.Column_OfferId} = {OffersQuery.TableName}.{OffersQuery.Column_Id}\r\n" + $"left join {OfferItemsQuery.TableName} on {OfferItemsQuery.TableName}.{OfferItemsQuery.Column_OfferId} = {OffersQuery.TableName}.{OffersQuery.Column_Id}\r\n" +
$"where {OfferItemsQuery.Column_ItemGuid} = @ItemGuid and {OffersQuery.Column_Status} not in ({(int)OfferState.Cancelled}, {(int)OfferState.Rejected}, {(int)OfferState.Completed})"); $"where {OfferItemsQuery.Column_ItemGuid} = @ItemGuid and {OffersQuery.Column_Status} not in ({(int)OfferState.Cancelled}, {(int)OfferState.Rejected}, {(int)OfferState.Completed})");
return helper.Success; return helper.Success;
@ -227,7 +227,7 @@ namespace Oshima.FunGame.OshimaServers.Service
throw; throw;
} }
} }
public static void DeleteOfferItemsByOfferIdAndItemGuid(SQLHelper helper, long offerId, Guid itemGuid) public static void DeleteOfferItemsByOfferIdAndItemGuid(SQLHelper helper, long offerId, Guid itemGuid)
{ {
bool hasTransaction = helper.Transaction != null; bool hasTransaction = helper.Transaction != null;

View File

@ -30,7 +30,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return StatusCode(500, "获取活动信息时发生错误,请检查日志。"); return StatusCode(500, "获取活动信息时发生错误,请检查日志。");
} }
} }
[HttpGet("{id}")] [HttpGet("{id}")]
public IActionResult GetActivity(long id) public IActionResult GetActivity(long id)
{ {

View File

@ -470,7 +470,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
do do
{ {
username = "FunOsm-" + Verification.CreateVerifyCode(VerifyCodeType.MixVerifyCode, 8); username = "FunOsm-" + Verification.CreateVerifyCode(VerifyCodeType.MixVerifyCode, 8);
if (sqlHelper.ExecuteDataRow(UserQuery.Select_IsExistUsername(sqlHelper, username)) is null) if (sqlHelper.ExecuteDataRow(UserQuery.Select_UserByUsername(sqlHelper, username)) is null)
{ {
exist = false; exist = false;
} }
@ -7834,8 +7834,8 @@ namespace Oshima.FunGame.WebAPI.Controllers
} }
else else
{ {
string msg2 = FunGameService.CheckRegionStore(stores, pc, user, storeRegion, storeName, out bool exist); string msg2 = FunGameService.CheckRegionStore(stores, pc, user, storeRegion, storeName, out bool exists);
msg = exist ? $"正在获取最新商店数据,请稍后查看。" : msg2; msg = exists ? $"正在获取最新商店数据,请稍后查看。" : msg2;
} }
FunGameService.SetUserConfigAndReleaseSemaphoreSlim(userid, pc, user); FunGameService.SetUserConfigAndReleaseSemaphoreSlim(userid, pc, user);

View File

@ -53,9 +53,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
private async Task SendHelp(IBotMessage e, Dictionary<string, string> helpDict, string helpName, int currentPage) private async Task SendHelp(IBotMessage e, Dictionary<string, string> helpDict, string helpName, int currentPage)
{ {
e.UseNotice = false; e.UseNotice = false;
int pageSize = 15; int pageSize = 15;
int totalPages = (helpDict.Count + pageSize - 1) / pageSize; int totalPages = (helpDict.Count + pageSize - 1) / pageSize;
StringBuilder result = new($"《筽祀牻》{helpName}指令(第 {currentPage}/{totalPages} 页)\n"); StringBuilder result = new($"《筽祀牻》{helpName}指令(第 {currentPage}/{totalPages} 页)\n");
@ -149,7 +149,7 @@ namespace Oshima.FunGame.WebAPI.Services
if (!e.IsGroup && e.Detail == "获取接入码") if (!e.IsGroup && e.Detail == "获取接入码")
{ {
e.UseNotice = false; e.UseNotice = false;
await SendAsync(e, "获取接入码", $"你的接入码为 {openid},请妥善保存!"); await SendAsync(e, "获取接入码", $"你的接入码为 {openid},请妥善保存!");
return true; return true;
} }
@ -199,8 +199,8 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "公告") if (e.Detail == "公告")
{ {
e.UseNotice = false; e.UseNotice = false;
FunGameService.RefreshNotice(); FunGameService.RefreshNotice();
if (FunGameService.Notices.Count > 0) if (FunGameService.Notices.Count > 0)
{ {
@ -221,17 +221,17 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return true; return true;
} }
if (e.Detail == "刷新公告") if (e.Detail == "刷新公告")
{ {
e.UseNotice = false; e.UseNotice = false;
FunGameService.RefreshNotice(); FunGameService.RefreshNotice();
return true; return true;
} }
if (e.Detail.StartsWith("添加公告")) if (e.Detail.StartsWith("添加公告"))
{ {
e.UseNotice = false; e.UseNotice = false;
string author = "FunGame"; string author = "FunGame";
FunGameConstant.UserIdAndUsername.TryGetValue(uid, out User? user); FunGameConstant.UserIdAndUsername.TryGetValue(uid, out User? user);
if (user is null || (!user.IsAdmin && !user.IsOperator)) if (user is null || (!user.IsAdmin && !user.IsOperator))
@ -279,28 +279,28 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "添加公告", $"添加完毕,请查看【公告】列表!"); await SendAsync(e, "添加公告", $"添加完毕,请查看【公告】列表!");
return true; return true;
} }
if (e.Detail == "查询服务器启动时间") if (e.Detail == "查询服务器启动时间")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = TestController.GetLastLoginTime(); string msg = TestController.GetLastLoginTime();
await SendAsync(e, "查询服务器启动时间", msg); await SendAsync(e, "查询服务器启动时间", msg);
return true; return true;
} }
if (e.Detail.StartsWith("查询任务计划")) if (e.Detail.StartsWith("查询任务计划"))
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = TestController.GetTaskScheduler(e.Detail.Replace("查询任务计划", "")); string msg = TestController.GetTaskScheduler(e.Detail.Replace("查询任务计划", ""));
await SendAsync(e, "查询任务计划", msg); await SendAsync(e, "查询任务计划", msg);
return true; return true;
} }
// 指令处理 // 指令处理
if (e.Detail == "帮助") if (e.Detail == "帮助")
{ {
e.UseNotice = false; e.UseNotice = false;
await SendAsync(e, "筽祀牻", @$"欢迎使用《筽祀牻》游戏指令帮助系统! await SendAsync(e, "筽祀牻", @$"欢迎使用《筽祀牻》游戏指令帮助系统!
{FunGameInfo.FunGame_Version} {FunGameInfo.FunGame_Version}
@ -358,9 +358,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("FunGame模拟", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("FunGame模拟", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
if (!FunGameSimulation) if (!FunGameSimulation)
{ {
FunGameSimulation = true; FunGameSimulation = true;
List<string> msgs = await Controller.GetTest(false, maxRespawnTimesMix: 0); List<string> msgs = await Controller.GetTest(false, maxRespawnTimesMix: 0);
@ -381,9 +381,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("混战模拟")) if (e.Detail.StartsWith("混战模拟"))
{ {
e.UseNotice = false; e.UseNotice = false;
int maxRespawnTimesMix = 1; int maxRespawnTimesMix = 1;
string detail = e.Detail.Replace("混战模拟", "").Trim(); string detail = e.Detail.Replace("混战模拟", "").Trim();
if (int.TryParse(detail, out int times)) if (int.TryParse(detail, out int times))
{ {
@ -410,16 +410,16 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "上次的完整日志") if (e.Detail == "上次的完整日志")
{ {
e.UseNotice = false; e.UseNotice = false;
await SendAsync(e, "筽祀牻", string.Join("\r\n", Controller.GetLast())); await SendAsync(e, "筽祀牻", string.Join("\r\n", Controller.GetLast()));
return result; return result;
} }
if (e.Detail.StartsWith("FunGame团队模拟", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("FunGame团队模拟", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
if (!FunGameSimulation) if (!FunGameSimulation)
{ {
FunGameSimulation = true; FunGameSimulation = true;
List<string> msgs = await Controller.GetTest(false, true); List<string> msgs = await Controller.GetTest(false, true);
@ -440,9 +440,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查数据", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查数据", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
string detail = e.Detail.Replace("查数据", "").Trim(); string detail = e.Detail.Replace("查数据", "").Trim();
if (int.TryParse(detail, out int id)) if (int.TryParse(detail, out int id))
{ {
string msg = Controller.GetStats(id); string msg = Controller.GetStats(id);
@ -455,9 +455,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查团队数据", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查团队数据", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
string detail = e.Detail.Replace("查团队数据", "").Trim(); string detail = e.Detail.Replace("查团队数据", "").Trim();
if (int.TryParse(detail, out int id)) if (int.TryParse(detail, out int id))
{ {
string msg = Controller.GetTeamStats(id); string msg = Controller.GetTeamStats(id);
@ -470,9 +470,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查个人胜率", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查个人胜率", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
List<string> msgs = Controller.GetWinrateRank(); List<string> msgs = Controller.GetWinrateRank();
if (msgs.Count > 0) if (msgs.Count > 0)
{ {
await SendAsync(e, "查个人胜率", string.Join("\r\n\r\n", msgs)); await SendAsync(e, "查个人胜率", string.Join("\r\n\r\n", msgs));
@ -481,9 +481,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查团队胜率", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查团队胜率", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
List<string> msgs = Controller.GetWinrateRank(true); List<string> msgs = Controller.GetWinrateRank(true);
if (msgs.Count > 0) if (msgs.Count > 0)
{ {
await SendAsync(e, "查团队胜率", string.Join("\r\n\r\n", msgs)); await SendAsync(e, "查团队胜率", string.Join("\r\n\r\n", msgs));
@ -492,9 +492,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查角色", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查角色", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
string detail = e.Detail.Replace("查角色", "").Trim(); string detail = e.Detail.Replace("查角色", "").Trim();
if (int.TryParse(detail, out int id)) if (int.TryParse(detail, out int id))
{ {
string msg = Controller.GetCharacterInfo(id); string msg = Controller.GetCharacterInfo(id);
@ -507,9 +507,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查技能", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查技能", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
string detail = e.Detail.Replace("查技能", "").Trim(); string detail = e.Detail.Replace("查技能", "").Trim();
if (int.TryParse(detail, out int id)) if (int.TryParse(detail, out int id))
{ {
string msg = Controller.GetSkillInfo(uid, id); string msg = Controller.GetSkillInfo(uid, id);
@ -530,9 +530,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail.StartsWith("查物品", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("查物品", StringComparison.CurrentCultureIgnoreCase))
{ {
e.UseNotice = false; e.UseNotice = false;
string detail = e.Detail.Replace("查物品", "").Trim(); string detail = e.Detail.Replace("查物品", "").Trim();
if (int.TryParse(detail, out int id)) if (int.TryParse(detail, out int id))
{ {
string msg = Controller.GetItemInfo(uid, id); string msg = Controller.GetItemInfo(uid, id);
@ -646,9 +646,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "预览魔法卡包") if (e.Detail == "预览魔法卡包")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.GenerateMagicCardPack(); string msg = Controller.GenerateMagicCardPack();
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "预览魔法卡包", msg); await SendAsync(e, "预览魔法卡包", msg);
@ -656,9 +656,9 @@ namespace Oshima.FunGame.WebAPI.Services
return result; return result;
} }
else if (e.Detail == "预览魔法卡") else if (e.Detail == "预览魔法卡")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.GenerateMagicCard(); string msg = Controller.GenerateMagicCard();
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "预览魔法卡", msg); await SendAsync(e, "预览魔法卡", msg);
@ -667,9 +667,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "创建存档") if (e.Detail == "创建存档")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.CreateSaved(uid, openid); string msg = Controller.CreateSaved(uid, openid);
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "创建存档", "\r\n" + msg); await SendAsync(e, "创建存档", "\r\n" + msg);
@ -688,9 +688,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "我的主战") if (e.Detail == "我的主战")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.GetCharacterInfoFromInventory(uid, 0); string msg = Controller.GetCharacterInfoFromInventory(uid, 0);
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "我的主战", "\r\n" + msg); await SendAsync(e, "我的主战", "\r\n" + msg);
@ -699,9 +699,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "我的状态") if (e.Detail == "我的状态")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.ShowMainCharacterOrSquadStatus(uid); string msg = Controller.ShowMainCharacterOrSquadStatus(uid);
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "我的状态", "\r\n" + msg); await SendAsync(e, "我的状态", "\r\n" + msg);
@ -710,9 +710,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "小队状态" || e.Detail == "我的小队状态") if (e.Detail == "小队状态" || e.Detail == "我的小队状态")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.ShowMainCharacterOrSquadStatus(uid, true); string msg = Controller.ShowMainCharacterOrSquadStatus(uid, true);
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "我的小队状态", "\r\n" + msg); await SendAsync(e, "我的小队状态", "\r\n" + msg);
@ -721,9 +721,9 @@ namespace Oshima.FunGame.WebAPI.Services
} }
if (e.Detail == "我的小队") if (e.Detail == "我的小队")
{ {
e.UseNotice = false; e.UseNotice = false;
string msg = Controller.ShowSquad(uid); string msg = Controller.ShowSquad(uid);
if (msg != "") if (msg != "")
{ {
await SendAsync(e, "我的小队", "\r\n" + msg); await SendAsync(e, "我的小队", "\r\n" + msg);
@ -747,7 +747,7 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "还原存档", "\r\n请在该指令前添加【确认】二字即使用【确认还原存档】指令。"); await SendAsync(e, "还原存档", "\r\n请在该指令前添加【确认】二字即使用【确认还原存档】指令。");
return result; return result;
} }
if (e.Detail == "确认还原存档") if (e.Detail == "确认还原存档")
{ {
string msg = Controller.RestoreSaved(uid); string msg = Controller.RestoreSaved(uid);
@ -774,7 +774,7 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "改名", "\r\n为防止玩家手误更改自己的昵称请在该指令前添加【确认】二字即使用【确认角色改名】指令。"); await SendAsync(e, "改名", "\r\n为防止玩家手误更改自己的昵称请在该指令前添加【确认】二字即使用【确认角色改名】指令。");
return result; return result;
} }
if (e.Detail == "确认角色改名") if (e.Detail == "确认角色改名")
{ {
string msg = Controller.ReName(uid); string msg = Controller.ReName(uid);
@ -784,7 +784,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "查询改名") if (e.Detail == "查询改名")
{ {
string msg = Controller.GetReNameInfo(uid); string msg = Controller.GetReNameInfo(uid);
@ -813,7 +813,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("改名拒绝")) if (e.Detail.StartsWith("改名拒绝"))
{ {
string detail = e.Detail.Replace("改名拒绝", "").Trim(); string detail = e.Detail.Replace("改名拒绝", "").Trim();
@ -837,7 +837,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("改名批准")) if (e.Detail.StartsWith("改名批准"))
{ {
string detail = e.Detail.Replace("改名批准", "").Trim(); string detail = e.Detail.Replace("改名批准", "").Trim();
@ -899,7 +899,7 @@ namespace Oshima.FunGame.WebAPI.Services
"在审核期间,改名卡将会被系统锁定,无法取消、重复提交申请,也不能解锁、分解、交易、出售该改名卡。如已知悉请在该指令前添加【确认】二字,即使用【确认自定义改名】指令。"); "在审核期间,改名卡将会被系统锁定,无法取消、重复提交申请,也不能解锁、分解、交易、出售该改名卡。如已知悉请在该指令前添加【确认】二字,即使用【确认自定义改名】指令。");
return result; return result;
} }
if (e.Detail.StartsWith("确认自定义改名")) if (e.Detail.StartsWith("确认自定义改名"))
{ {
e.UseNotice = false; e.UseNotice = false;
@ -1567,7 +1567,7 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "使用", msg); await SendAsync(e, "使用", msg);
} }
} }
else if(!string.IsNullOrEmpty(itemPart)) else if (!string.IsNullOrEmpty(itemPart))
{ {
string msg = Controller.UseItem2(uid, itemPart, count, characterIds); string msg = Controller.UseItem2(uid, itemPart, count, characterIds);
if (msg != "") if (msg != "")
@ -1877,7 +1877,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("邀请加入", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("邀请加入", StringComparison.CurrentCultureIgnoreCase))
{ {
string detail = e.Detail.Replace("邀请加入", "").Trim(); string detail = e.Detail.Replace("邀请加入", "").Trim();
@ -1891,7 +1891,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("取消邀请加入", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("取消邀请加入", StringComparison.CurrentCultureIgnoreCase))
{ {
string detail = e.Detail.Replace("取消邀请加入", "").Trim(); string detail = e.Detail.Replace("取消邀请加入", "").Trim();
@ -2037,7 +2037,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("查看受邀人列表")) if (e.Detail.StartsWith("查看受邀人列表"))
{ {
string detail = e.Detail.Replace("查看受邀人列表", "").Trim(); string detail = e.Detail.Replace("查看受邀人列表", "").Trim();
@ -2266,7 +2266,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "世界地图") if (e.Detail == "世界地图")
{ {
List<string> msgs = Controller.GetRegion(); List<string> msgs = Controller.GetRegion();
@ -2338,7 +2338,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("小队探索")) if (e.Detail.StartsWith("小队探索"))
{ {
string detail = e.Detail.Replace("小队探索", "").Trim(); string detail = e.Detail.Replace("小队探索", "").Trim();
@ -2504,7 +2504,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("解锁")) if (e.Detail.StartsWith("解锁"))
{ {
string detail = e.Detail.Replace("解锁", "").Trim(); string detail = e.Detail.Replace("解锁", "").Trim();
@ -2543,7 +2543,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "我的报价")) if (e.Detail.StartsWith(value: "我的报价"))
{ {
string detail = e.Detail.Replace("我的报价", "").Trim(); string detail = e.Detail.Replace("我的报价", "").Trim();
@ -2562,7 +2562,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "查报价")) if (e.Detail.StartsWith(value: "查报价"))
{ {
string detail = e.Detail.Replace("查报价", "").Trim(); string detail = e.Detail.Replace("查报价", "").Trim();
@ -2577,7 +2577,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "发送报价")) if (e.Detail.StartsWith(value: "发送报价"))
{ {
string detail = e.Detail.Replace("发送报价", "").Trim(); string detail = e.Detail.Replace("发送报价", "").Trim();
@ -2592,7 +2592,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "取消报价")) if (e.Detail.StartsWith(value: "取消报价"))
{ {
string detail = e.Detail.Replace("取消报价", "").Trim(); string detail = e.Detail.Replace("取消报价", "").Trim();
@ -2607,7 +2607,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "接受报价")) if (e.Detail.StartsWith(value: "接受报价"))
{ {
string detail = e.Detail.Replace("接受报价", "").Trim(); string detail = e.Detail.Replace("接受报价", "").Trim();
@ -2622,7 +2622,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "拒绝报价")) if (e.Detail.StartsWith(value: "拒绝报价"))
{ {
string detail = e.Detail.Replace("拒绝报价", "").Trim(); string detail = e.Detail.Replace("拒绝报价", "").Trim();
@ -2637,7 +2637,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "报价添加物品")) if (e.Detail.StartsWith(value: "报价添加物品"))
{ {
string detail = e.Detail.Replace("报价添加物品", "").Trim(); string detail = e.Detail.Replace("报价添加物品", "").Trim();
@ -2665,7 +2665,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "报价添加对方物品")) if (e.Detail.StartsWith(value: "报价添加对方物品"))
{ {
string detail = e.Detail.Replace("报价添加对方物品", "").Trim(); string detail = e.Detail.Replace("报价添加对方物品", "").Trim();
@ -2693,7 +2693,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "报价移除物品")) if (e.Detail.StartsWith(value: "报价移除物品"))
{ {
string detail = e.Detail.Replace("报价移除物品", "").Trim(); string detail = e.Detail.Replace("报价移除物品", "").Trim();
@ -2721,7 +2721,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith(value: "报价移除对方物品")) if (e.Detail.StartsWith(value: "报价移除对方物品"))
{ {
string detail = e.Detail.Replace("报价移除对方物品", "").Trim(); string detail = e.Detail.Replace("报价移除对方物品", "").Trim();
@ -2784,7 +2784,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("挑战钻石秘境")) if (e.Detail.StartsWith("挑战钻石秘境"))
{ {
string detail = e.Detail.Replace("挑战钻石秘境", "").Trim(); string detail = e.Detail.Replace("挑战钻石秘境", "").Trim();
@ -2799,7 +2799,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("挑战经验秘境")) if (e.Detail.StartsWith("挑战经验秘境"))
{ {
string detail = e.Detail.Replace("挑战经验秘境", "").Trim(); string detail = e.Detail.Replace("挑战经验秘境", "").Trim();
@ -2814,7 +2814,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("挑战地区秘境")) if (e.Detail.StartsWith("挑战地区秘境"))
{ {
string detail = e.Detail.Replace("挑战地区秘境", "").Trim(); string detail = e.Detail.Replace("挑战地区秘境", "").Trim();
@ -2829,7 +2829,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("挑战突破秘境")) if (e.Detail.StartsWith("挑战突破秘境"))
{ {
string detail = e.Detail.Replace("挑战突破秘境", "").Trim(); string detail = e.Detail.Replace("挑战突破秘境", "").Trim();
@ -2844,7 +2844,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("挑战技能秘境")) if (e.Detail.StartsWith("挑战技能秘境"))
{ {
string detail = e.Detail.Replace("挑战技能秘境", "").Trim(); string detail = e.Detail.Replace("挑战技能秘境", "").Trim();
@ -2859,7 +2859,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("挑战魔法卡秘境")) if (e.Detail.StartsWith("挑战魔法卡秘境"))
{ {
string detail = e.Detail.Replace("挑战魔法卡秘境", "").Trim(); string detail = e.Detail.Replace("挑战魔法卡秘境", "").Trim();
@ -2884,7 +2884,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "武器商会") if (e.Detail == "武器商会")
{ {
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_weapons"); string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_weapons");
@ -2894,7 +2894,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "杂货铺") if (e.Detail == "杂货铺")
{ {
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_yuki"); string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_yuki");
@ -2904,7 +2904,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "基金会") if (e.Detail == "基金会")
{ {
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_welfare"); string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_welfare");
@ -2914,7 +2914,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "锻造商店") if (e.Detail == "锻造商店")
{ {
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_forge"); string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_forge");
@ -2934,7 +2934,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "共斗商店") if (e.Detail == "共斗商店")
{ {
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_cooperative"); string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_cooperative");
@ -3019,7 +3019,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("锻造配方")) if (e.Detail.StartsWith("锻造配方"))
{ {
string pattern = @"锻造配方\s*(?:(?<itemName>[^\d]+?)\s*(?<count>\d+)\s*)+"; string pattern = @"锻造配方\s*(?:(?<itemName>[^\d]+?)\s*(?<count>\d+)\s*)+";
@ -3048,7 +3048,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("模拟锻造")) if (e.Detail.StartsWith("模拟锻造"))
{ {
string msg = Controller.ForgeItem_Simulate(uid); string msg = Controller.ForgeItem_Simulate(uid);
@ -3058,7 +3058,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("取消锻造")) if (e.Detail.StartsWith("取消锻造"))
{ {
string msg = Controller.ForgeItem_Cancel(uid); string msg = Controller.ForgeItem_Cancel(uid);
@ -3068,7 +3068,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("确认开始锻造")) if (e.Detail.StartsWith("确认开始锻造"))
{ {
string msg = Controller.ForgeItem_Complete(uid); string msg = Controller.ForgeItem_Complete(uid);
@ -3078,7 +3078,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("锻造信息")) if (e.Detail.StartsWith("锻造信息"))
{ {
string msg = Controller.ForgeItem_Info(uid); string msg = Controller.ForgeItem_Info(uid);
@ -3169,7 +3169,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("市场下架")) if (e.Detail.StartsWith("市场下架"))
{ {
string detail = e.Detail.Replace("市场下架", "").Trim(); string detail = e.Detail.Replace("市场下架", "").Trim();
@ -3184,7 +3184,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("我的市场")) if (e.Detail.StartsWith("我的市场"))
{ {
string detail = e.Detail.Replace("我的市场", "").Trim(); string detail = e.Detail.Replace("我的市场", "").Trim();
@ -3229,7 +3229,7 @@ namespace Oshima.FunGame.WebAPI.Services
string[] strings = detail.Split(" ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries); string[] strings = detail.Split(" ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
long id = -1; long id = -1;
string name = ""; string name = "";
bool useId = false; bool useId = false;
if (strings.Length > 0) if (strings.Length > 0)
{ {
if (long.TryParse(strings[0].Trim(), out id)) if (long.TryParse(strings[0].Trim(), out id))
@ -3289,7 +3289,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "创建共斗") if (e.Detail == "创建共斗")
{ {
string groupId = ""; string groupId = "";
@ -3315,7 +3315,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "创建混战") if (e.Detail == "创建混战")
{ {
string groupId = ""; string groupId = "";
@ -3341,7 +3341,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "创建团战") if (e.Detail == "创建团战")
{ {
string groupId = ""; string groupId = "";
@ -3367,7 +3367,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "加入赛马") if (e.Detail == "加入赛马")
{ {
string groupId = ""; string groupId = "";
@ -3438,7 +3438,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("加入房间")) if (e.Detail.StartsWith("加入房间"))
{ {
string groupId = ""; string groupId = "";
@ -3511,7 +3511,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "退出房间") if (e.Detail == "退出房间")
{ {
string groupId = ""; string groupId = "";
@ -3537,7 +3537,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "房间列表") if (e.Detail == "房间列表")
{ {
string groupId = ""; string groupId = "";
@ -3563,7 +3563,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "房间信息") if (e.Detail == "房间信息")
{ {
string msg = Controller.RoomInfo(uid); string msg = Controller.RoomInfo(uid);
@ -3573,7 +3573,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == "排行榜" || e.Detail == "养成排行榜") if (e.Detail == "排行榜" || e.Detail == "养成排行榜")
{ {
string msg = Controller.GetRanking(uid, 2); string msg = Controller.GetRanking(uid, 2);
@ -3583,7 +3583,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == $"{General.GameplayEquilibriumConstant.InGameCurrency}排行榜") if (e.Detail == $"{General.GameplayEquilibriumConstant.InGameCurrency}排行榜")
{ {
string msg = Controller.GetRanking(uid, 0); string msg = Controller.GetRanking(uid, 0);
@ -3593,7 +3593,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == $"{General.GameplayEquilibriumConstant.InGameMaterial}排行榜") if (e.Detail == $"{General.GameplayEquilibriumConstant.InGameMaterial}排行榜")
{ {
string msg = Controller.GetRanking(uid, 1); string msg = Controller.GetRanking(uid, 1);
@ -3603,7 +3603,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == $"赛马排行榜") if (e.Detail == $"赛马排行榜")
{ {
string msg = Controller.GetRanking(uid, 3); string msg = Controller.GetRanking(uid, 3);
@ -3613,7 +3613,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == $"共斗排行榜") if (e.Detail == $"共斗排行榜")
{ {
string msg = Controller.GetRanking(uid, 4); string msg = Controller.GetRanking(uid, 4);
@ -3623,7 +3623,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail == $"锻造排行榜") if (e.Detail == $"锻造排行榜")
{ {
string msg = Controller.GetRanking(uid, 5); string msg = Controller.GetRanking(uid, 5);
@ -3661,7 +3661,7 @@ namespace Oshima.FunGame.WebAPI.Services
return result; return result;
} }
if (e.Detail.StartsWith("减物") || e.Detail.StartsWith("移除背包物品")) if (e.Detail.StartsWith("减物") || e.Detail.StartsWith("移除背包物品"))
{ {
string detail = e.Detail.Replace("减物", "").Replace("移除背包物品", "").Trim(); string detail = e.Detail.Replace("减物", "").Replace("移除背包物品", "").Trim();

View File

@ -26,7 +26,7 @@ namespace Oshima.FunGame.WebAPI.Services
return new UserDaily(0, 0, "今日运势列表为空,请联系管理员设定。"); return new UserDaily(0, 0, "今日运势列表为空,请联系管理员设定。");
} }
} }
public static OpenUserDaily GetOpenUserDaily(string user_id) public static OpenUserDaily GetOpenUserDaily(string user_id)
{ {
if (Daily.OpenUserDailys.TryGetValue(user_id, out string? value) && value != null && value.Trim() != "") if (Daily.OpenUserDailys.TryGetValue(user_id, out string? value) && value != null && value.Trim() != "")