diff --git a/OshimaModules/Characters/CustomCharacter.cs b/OshimaModules/Characters/CustomCharacter.cs
index b6ae76e..a0b6cba 100644
--- a/OshimaModules/Characters/CustomCharacter.cs
+++ b/OshimaModules/Characters/CustomCharacter.cs
@@ -21,7 +21,7 @@ namespace Oshima.FunGame.OshimaModules.Characters
int reduceGrowth = 0;
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);
switch (primaryAttribute)
{
diff --git a/OshimaModules/Effects/EffectID.cs b/OshimaModules/Effects/EffectID.cs
index 1d22b0a..c2322fe 100644
--- a/OshimaModules/Effects/EffectID.cs
+++ b/OshimaModules/Effects/EffectID.cs
@@ -179,12 +179,12 @@
/// 数值攻击距离,参数:exatr
///
ExATR = 8034,
-
+
///
/// 数值移动距离,参数:exmov
///
ExMOV = 8035,
-
+
///
/// 生命偷取%,参数:exls
///
diff --git a/OshimaModules/Items/Accessory/攻击之爪.cs b/OshimaModules/Items/Accessory/攻击之爪.cs
index 17e22d4..b86cc1a 100644
--- a/OshimaModules/Items/Accessory/攻击之爪.cs
+++ b/OshimaModules/Items/Accessory/攻击之爪.cs
@@ -60,7 +60,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new 攻击之爪技能(character, this, 55));
}
}
-
+
public class 攻击之爪70 : Item
{
public override long Id => (long)AccessoryID.攻击之爪70;
@@ -74,7 +74,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new 攻击之爪技能(character, this, 70));
}
}
-
+
public class 攻击之爪85 : Item
{
public override long Id => (long)AccessoryID.攻击之爪85;
@@ -88,7 +88,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new 攻击之爪技能(character, this, 85));
}
}
-
+
public class 攻击之爪100 : Item
{
public override long Id => (long)AccessoryID.攻击之爪100;
diff --git a/OshimaModules/Models/FunGameConstant.cs b/OshimaModules/Models/FunGameConstant.cs
index 1d0c6aa..50d7504 100644
--- a/OshimaModules/Models/FunGameConstant.cs
+++ b/OshimaModules/Models/FunGameConstant.cs
@@ -364,7 +364,7 @@ namespace Oshima.FunGame.OshimaModules.Models
new 银辉城(), new 瑟兰薇歌林海(), new 永燃坩埚(), new 永霜裂痕(), new 齿轮坟场(), new 千瞳镜湖(),
new 时之荒漠(), new 谵妄海市(), new 腐萤沼渊(), new 双生月崖(), new 棱镜骨桥(), new 泰坦遗迹()
];
-
+
public static List PlayerRegions { get; } = [
new 铎京城()
];
@@ -493,7 +493,7 @@ namespace Oshima.FunGame.OshimaModules.Models
{ QualityType.Green, 3 },
{ QualityType.White, 1 }
};
-
+
public static Dictionary ForgeNeedy { get; } = new()
{
{ QualityType.Red, 230 },
@@ -503,7 +503,7 @@ namespace Oshima.FunGame.OshimaModules.Models
{ QualityType.Green, 50 },
{ QualityType.White, 30 }
};
-
+
public static Dictionary ForgeRegionCoefficient { get; } = new()
{
{ RarityType.OneStar, 0.5 },
diff --git a/OshimaModules/Regions/Anomaly.cs b/OshimaModules/Regions/Anomaly.cs
index 3228d98..23c00b5 100644
--- a/OshimaModules/Regions/Anomaly.cs
+++ b/OshimaModules/Regions/Anomaly.cs
@@ -1,5 +1,4 @@
using Milimoe.FunGame.Core.Library.Constant;
-using Oshima.Core.Constant;
namespace Oshima.FunGame.OshimaModules.Regions
{
diff --git a/OshimaModules/Regions/OshimaRegion.cs b/OshimaModules/Regions/OshimaRegion.cs
index 488f1a0..ffbfbbf 100644
--- a/OshimaModules/Regions/OshimaRegion.cs
+++ b/OshimaModules/Regions/OshimaRegion.cs
@@ -26,18 +26,18 @@ namespace Oshima.FunGame.OshimaModules.Regions
{
return null;
}
-
+
public virtual string GetCurrencyInfo(PluginConfig pc, User user, string storeName)
{
return "";
}
-
+
public virtual void SaveGlobalStore(Store store, string storeName)
{
}
-
+
public virtual void UpdateNextRefreshGoods()
{
diff --git a/OshimaModules/Regions/Players.cs b/OshimaModules/Regions/Players.cs
index 23b31fb..32048e6 100644
--- a/OshimaModules/Regions/Players.cs
+++ b/OshimaModules/Regions/Players.cs
@@ -170,7 +170,7 @@ namespace Oshima.FunGame.OshimaModules.Regions
store.CopyGoodsToNextRefreshGoods(newStore.Goods);
}
storeTemplate.Add("dokyo_horseracing", store);
-
+
store = storeTemplate.Get("dokyo_cooperative");
if (store is null)
{
diff --git a/OshimaModules/Skills/魔法/时间减速复.cs b/OshimaModules/Skills/魔法/时间减速复.cs
index 677c639..e2742c4 100644
--- a/OshimaModules/Skills/魔法/时间减速复.cs
+++ b/OshimaModules/Skills/魔法/时间减速复.cs
@@ -1,7 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
-using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
diff --git a/OshimaModules/Skills/魔法/时间减速改.cs b/OshimaModules/Skills/魔法/时间减速改.cs
index 820337f..cc7c716 100644
--- a/OshimaModules/Skills/魔法/时间减速改.cs
+++ b/OshimaModules/Skills/魔法/时间减速改.cs
@@ -1,7 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
-using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{
diff --git a/OshimaServers/Model/Horse.cs b/OshimaServers/Model/Horse.cs
index ee927f0..29d87c8 100644
--- a/OshimaServers/Model/Horse.cs
+++ b/OshimaServers/Model/Horse.cs
@@ -74,7 +74,7 @@ namespace Oshima.FunGame.OshimaServers.Model
/// 马匹当前正在生效的技能效果列表
///
public List ActiveEffects { get; set; } = [];
-
+
public override string ToString()
{
return Name;
diff --git a/OshimaServers/Service/FunGameService.cs b/OshimaServers/Service/FunGameService.cs
index ff869a1..5195a53 100644
--- a/OshimaServers/Service/FunGameService.cs
+++ b/OshimaServers/Service/FunGameService.cs
@@ -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.PassiveSkills.AddRange([new META马(), new 心灵之火(), new 魔法震荡(), new 灵能反射(), new 智慧与力量(), new 致命打击(), new 毁灭之势(), new 枯竭打击(), new 破釜沉舟(), new 累积之压(), new 敏捷之刃(), new 弱者猎手()]);
-
+
FunGameConstant.CommonPassiveSkills.AddRange([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;
}
-
+
public static string MarketBuyItem(Market market, MarketItem item, PluginConfig pc, User user, int count, out bool result)
{
result = false;
@@ -2276,12 +2276,12 @@ namespace Oshima.FunGame.OshimaServers.Service
{
return $"无法购买此商品,原因:该商品的状态是:{CommonSet.GetMarketItemStatus(item.Status)}。";
}
-
+
if (item.User == user.Id)
{
return $"不能购买自己上架的商品!如需下架,请使用【市场下架+序号】指令。";
}
-
+
if (item.Stock != -1 && item.Stock - count < 0)
{
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);
}
-
+
// 开始战斗
Team team1 = new($"{user.Username}的小队", squad);
string team2Name = type switch
@@ -4215,7 +4215,7 @@ namespace Oshima.FunGame.OshimaServers.Service
return store;
}
-
+
public static void SaveRegionStore(Store store, string storeRegion, string storeName)
{
if (FunGameConstant.PlayerRegions.FirstOrDefault(r => r.Name == storeRegion) is OshimaRegion value)
@@ -4223,7 +4223,7 @@ namespace Oshima.FunGame.OshimaServers.Service
value.SaveGlobalStore(store, storeName);
}
}
-
+
public static string CheckRegionStore(EntityModuleConfig stores, PluginConfig pc, User user, string storeRegion, string storeName, out bool exist)
{
string msg = "";
@@ -4721,7 +4721,7 @@ namespace Oshima.FunGame.OshimaServers.Service
}
}
}
-
+
public static void RefreshDailyQuest()
{
string directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/quests";
@@ -4820,7 +4820,7 @@ namespace Oshima.FunGame.OshimaServers.Service
}
}
}
-
+
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 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)
diff --git a/OshimaServers/Service/OnlineService.cs b/OshimaServers/Service/OnlineService.cs
index fbf34c2..890c2e9 100644
--- a/OshimaServers/Service/OnlineService.cs
+++ b/OshimaServers/Service/OnlineService.cs
@@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaServers.Service
RoomSemaphoreSlim.Release();
}
}
-
+
public static void GetHorseRacingSettleSemaphoreSlim()
{
HorseRacingSettleSemaphoreSlim.Wait(FunGameConstant.SemaphoreSlimTimeout);
@@ -263,7 +263,7 @@ namespace Oshima.FunGame.OshimaServers.Service
ReleaseRoomSemaphoreSlim();
}
}
-
+
public static string RoomInfo(User user)
{
string msg = "";
@@ -291,7 +291,7 @@ namespace Oshima.FunGame.OshimaServers.Service
}
return msg;
}
-
+
public static string RoomInfo(Room room)
{
string username = "";
@@ -332,7 +332,7 @@ namespace Oshima.FunGame.OshimaServers.Service
ReleaseRoomSemaphoreSlim();
}
}
-
+
public static void ReSetRoomState(string roomid)
{
try
diff --git a/OshimaServers/Service/SQLService.cs b/OshimaServers/Service/SQLService.cs
index ff00d0a..ddd8112 100644
--- a/OshimaServers/Service/SQLService.cs
+++ b/OshimaServers/Service/SQLService.cs
@@ -71,11 +71,11 @@ namespace Oshima.FunGame.OshimaServers.Service
}
return itemGuids;
}
-
+
public static List GetUserItemGuids(SQLHelper helper, long 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" +
$"where {OfferItemsQuery.Column_UserId} = @UserId and {OffersQuery.Column_Status} not in ({(int)OfferState.Cancelled}, {(int)OfferState.Rejected}, {(int)OfferState.Completed})");
List list = [];
@@ -85,11 +85,11 @@ namespace Oshima.FunGame.OshimaServers.Service
}
return list;
}
-
+
public static bool IsItemInOffers(SQLHelper helper, Guid itemGuid)
{
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" +
$"where {OfferItemsQuery.Column_ItemGuid} = @ItemGuid and {OffersQuery.Column_Status} not in ({(int)OfferState.Cancelled}, {(int)OfferState.Rejected}, {(int)OfferState.Completed})");
return helper.Success;
@@ -227,7 +227,7 @@ namespace Oshima.FunGame.OshimaServers.Service
throw;
}
}
-
+
public static void DeleteOfferItemsByOfferIdAndItemGuid(SQLHelper helper, long offerId, Guid itemGuid)
{
bool hasTransaction = helper.Transaction != null;
diff --git a/OshimaWebAPI/Controllers/ActivityController.cs b/OshimaWebAPI/Controllers/ActivityController.cs
index de13893..6809016 100644
--- a/OshimaWebAPI/Controllers/ActivityController.cs
+++ b/OshimaWebAPI/Controllers/ActivityController.cs
@@ -30,7 +30,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return StatusCode(500, "获取活动信息时发生错误,请检查日志。");
}
}
-
+
[HttpGet("{id}")]
public IActionResult GetActivity(long id)
{
diff --git a/OshimaWebAPI/Controllers/FunGameController.cs b/OshimaWebAPI/Controllers/FunGameController.cs
index d8f1683..da9125a 100644
--- a/OshimaWebAPI/Controllers/FunGameController.cs
+++ b/OshimaWebAPI/Controllers/FunGameController.cs
@@ -470,7 +470,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
do
{
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;
}
@@ -7834,8 +7834,8 @@ namespace Oshima.FunGame.WebAPI.Controllers
}
else
{
- string msg2 = FunGameService.CheckRegionStore(stores, pc, user, storeRegion, storeName, out bool exist);
- msg = exist ? $"正在获取最新商店数据,请稍后查看。" : msg2;
+ string msg2 = FunGameService.CheckRegionStore(stores, pc, user, storeRegion, storeName, out bool exists);
+ msg = exists ? $"正在获取最新商店数据,请稍后查看。" : msg2;
}
FunGameService.SetUserConfigAndReleaseSemaphoreSlim(userid, pc, user);
diff --git a/OshimaWebAPI/Services/RainBOTService.cs b/OshimaWebAPI/Services/RainBOTService.cs
index ff33dbc..3fdabf8 100644
--- a/OshimaWebAPI/Services/RainBOTService.cs
+++ b/OshimaWebAPI/Services/RainBOTService.cs
@@ -53,9 +53,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
private async Task SendHelp(IBotMessage e, Dictionary helpDict, string helpName, int currentPage)
- {
- e.UseNotice = false;
- int pageSize = 15;
+ {
+ e.UseNotice = false;
+ int pageSize = 15;
int totalPages = (helpDict.Count + pageSize - 1) / pageSize;
StringBuilder result = new($"《筽祀牻》{helpName}指令(第 {currentPage}/{totalPages} 页)\n");
@@ -149,7 +149,7 @@ namespace Oshima.FunGame.WebAPI.Services
if (!e.IsGroup && e.Detail == "获取接入码")
{
e.UseNotice = false;
- await SendAsync(e, "获取接入码", $"你的接入码为 {openid},请妥善保存!");
+ await SendAsync(e, "获取接入码", $"你的接入码为 {openid},请妥善保存!");
return true;
}
@@ -199,8 +199,8 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "公告")
- {
- e.UseNotice = false;
+ {
+ e.UseNotice = false;
FunGameService.RefreshNotice();
if (FunGameService.Notices.Count > 0)
{
@@ -221,17 +221,17 @@ namespace Oshima.FunGame.WebAPI.Services
}
return true;
}
-
+
if (e.Detail == "刷新公告")
- {
- e.UseNotice = false;
- FunGameService.RefreshNotice();
+ {
+ e.UseNotice = false;
+ FunGameService.RefreshNotice();
return true;
}
-
+
if (e.Detail.StartsWith("添加公告"))
- {
- e.UseNotice = false;
+ {
+ e.UseNotice = false;
string author = "FunGame";
FunGameConstant.UserIdAndUsername.TryGetValue(uid, out User? user);
if (user is null || (!user.IsAdmin && !user.IsOperator))
@@ -279,28 +279,28 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "添加公告", $"添加完毕,请查看【公告】列表!");
return true;
}
-
+
if (e.Detail == "查询服务器启动时间")
- {
- e.UseNotice = false;
- string msg = TestController.GetLastLoginTime();
+ {
+ e.UseNotice = false;
+ string msg = TestController.GetLastLoginTime();
await SendAsync(e, "查询服务器启动时间", msg);
return true;
}
if (e.Detail.StartsWith("查询任务计划"))
- {
- e.UseNotice = false;
- string msg = TestController.GetTaskScheduler(e.Detail.Replace("查询任务计划", ""));
+ {
+ e.UseNotice = false;
+ string msg = TestController.GetTaskScheduler(e.Detail.Replace("查询任务计划", ""));
await SendAsync(e, "查询任务计划", msg);
return true;
}
// 指令处理
if (e.Detail == "帮助")
- {
- e.UseNotice = false;
- await SendAsync(e, "筽祀牻", @$"欢迎使用《筽祀牻》游戏指令帮助系统!
+ {
+ e.UseNotice = false;
+ await SendAsync(e, "筽祀牻", @$"欢迎使用《筽祀牻》游戏指令帮助系统!
核心库版本号:{FunGameInfo.FunGame_Version}
《筽祀牻》是一款奇幻冒险回合制角色扮演游戏。
在游戏中,你可以和其他角色组成小队,收集物品,在数十个独具风格的地区中冒险并战斗。
@@ -358,9 +358,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("FunGame模拟", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- if (!FunGameSimulation)
+ {
+ e.UseNotice = false;
+ if (!FunGameSimulation)
{
FunGameSimulation = true;
List msgs = await Controller.GetTest(false, maxRespawnTimesMix: 0);
@@ -381,9 +381,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("混战模拟"))
- {
- e.UseNotice = false;
- int maxRespawnTimesMix = 1;
+ {
+ e.UseNotice = false;
+ int maxRespawnTimesMix = 1;
string detail = e.Detail.Replace("混战模拟", "").Trim();
if (int.TryParse(detail, out int times))
{
@@ -410,16 +410,16 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "上次的完整日志")
- {
- e.UseNotice = false;
- await SendAsync(e, "筽祀牻", string.Join("\r\n", Controller.GetLast()));
+ {
+ e.UseNotice = false;
+ await SendAsync(e, "筽祀牻", string.Join("\r\n", Controller.GetLast()));
return result;
}
if (e.Detail.StartsWith("FunGame团队模拟", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- if (!FunGameSimulation)
+ {
+ e.UseNotice = false;
+ if (!FunGameSimulation)
{
FunGameSimulation = true;
List msgs = await Controller.GetTest(false, true);
@@ -440,9 +440,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("查数据", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- string detail = e.Detail.Replace("查数据", "").Trim();
+ {
+ e.UseNotice = false;
+ string detail = e.Detail.Replace("查数据", "").Trim();
if (int.TryParse(detail, out int id))
{
string msg = Controller.GetStats(id);
@@ -455,9 +455,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("查团队数据", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- string detail = e.Detail.Replace("查团队数据", "").Trim();
+ {
+ e.UseNotice = false;
+ string detail = e.Detail.Replace("查团队数据", "").Trim();
if (int.TryParse(detail, out int id))
{
string msg = Controller.GetTeamStats(id);
@@ -470,9 +470,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("查个人胜率", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- List msgs = Controller.GetWinrateRank();
+ {
+ e.UseNotice = false;
+ List msgs = Controller.GetWinrateRank();
if (msgs.Count > 0)
{
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))
- {
- e.UseNotice = false;
- List msgs = Controller.GetWinrateRank(true);
+ {
+ e.UseNotice = false;
+ List msgs = Controller.GetWinrateRank(true);
if (msgs.Count > 0)
{
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))
- {
- e.UseNotice = false;
- string detail = e.Detail.Replace("查角色", "").Trim();
+ {
+ e.UseNotice = false;
+ string detail = e.Detail.Replace("查角色", "").Trim();
if (int.TryParse(detail, out int id))
{
string msg = Controller.GetCharacterInfo(id);
@@ -507,9 +507,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("查技能", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- string detail = e.Detail.Replace("查技能", "").Trim();
+ {
+ e.UseNotice = false;
+ string detail = e.Detail.Replace("查技能", "").Trim();
if (int.TryParse(detail, out int id))
{
string msg = Controller.GetSkillInfo(uid, id);
@@ -530,9 +530,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail.StartsWith("查物品", StringComparison.CurrentCultureIgnoreCase))
- {
- e.UseNotice = false;
- string detail = e.Detail.Replace("查物品", "").Trim();
+ {
+ e.UseNotice = false;
+ string detail = e.Detail.Replace("查物品", "").Trim();
if (int.TryParse(detail, out int id))
{
string msg = Controller.GetItemInfo(uid, id);
@@ -646,9 +646,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "预览魔法卡包")
- {
- e.UseNotice = false;
- string msg = Controller.GenerateMagicCardPack();
+ {
+ e.UseNotice = false;
+ string msg = Controller.GenerateMagicCardPack();
if (msg != "")
{
await SendAsync(e, "预览魔法卡包", msg);
@@ -656,9 +656,9 @@ namespace Oshima.FunGame.WebAPI.Services
return result;
}
else if (e.Detail == "预览魔法卡")
- {
- e.UseNotice = false;
- string msg = Controller.GenerateMagicCard();
+ {
+ e.UseNotice = false;
+ string msg = Controller.GenerateMagicCard();
if (msg != "")
{
await SendAsync(e, "预览魔法卡", msg);
@@ -667,9 +667,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "创建存档")
- {
- e.UseNotice = false;
- string msg = Controller.CreateSaved(uid, openid);
+ {
+ e.UseNotice = false;
+ string msg = Controller.CreateSaved(uid, openid);
if (msg != "")
{
await SendAsync(e, "创建存档", "\r\n" + msg);
@@ -688,9 +688,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "我的主战")
- {
- e.UseNotice = false;
- string msg = Controller.GetCharacterInfoFromInventory(uid, 0);
+ {
+ e.UseNotice = false;
+ string msg = Controller.GetCharacterInfoFromInventory(uid, 0);
if (msg != "")
{
await SendAsync(e, "我的主战", "\r\n" + msg);
@@ -699,9 +699,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "我的状态")
- {
- e.UseNotice = false;
- string msg = Controller.ShowMainCharacterOrSquadStatus(uid);
+ {
+ e.UseNotice = false;
+ string msg = Controller.ShowMainCharacterOrSquadStatus(uid);
if (msg != "")
{
await SendAsync(e, "我的状态", "\r\n" + msg);
@@ -710,9 +710,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "小队状态" || e.Detail == "我的小队状态")
- {
- e.UseNotice = false;
- string msg = Controller.ShowMainCharacterOrSquadStatus(uid, true);
+ {
+ e.UseNotice = false;
+ string msg = Controller.ShowMainCharacterOrSquadStatus(uid, true);
if (msg != "")
{
await SendAsync(e, "我的小队状态", "\r\n" + msg);
@@ -721,9 +721,9 @@ namespace Oshima.FunGame.WebAPI.Services
}
if (e.Detail == "我的小队")
- {
- e.UseNotice = false;
- string msg = Controller.ShowSquad(uid);
+ {
+ e.UseNotice = false;
+ string msg = Controller.ShowSquad(uid);
if (msg != "")
{
await SendAsync(e, "我的小队", "\r\n" + msg);
@@ -747,7 +747,7 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "还原存档", "\r\n请在该指令前添加【确认】二字,即使用【确认还原存档】指令。");
return result;
}
-
+
if (e.Detail == "确认还原存档")
{
string msg = Controller.RestoreSaved(uid);
@@ -774,7 +774,7 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "改名", "\r\n为防止玩家手误更改自己的昵称,请在该指令前添加【确认】二字,即使用【确认角色改名】指令。");
return result;
}
-
+
if (e.Detail == "确认角色改名")
{
string msg = Controller.ReName(uid);
@@ -784,7 +784,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "查询改名")
{
string msg = Controller.GetReNameInfo(uid);
@@ -813,7 +813,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("改名拒绝"))
{
string detail = e.Detail.Replace("改名拒绝", "").Trim();
@@ -837,7 +837,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("改名批准"))
{
string detail = e.Detail.Replace("改名批准", "").Trim();
@@ -899,7 +899,7 @@ namespace Oshima.FunGame.WebAPI.Services
"在审核期间,改名卡将会被系统锁定,无法取消、重复提交申请,也不能解锁、分解、交易、出售该改名卡。如已知悉请在该指令前添加【确认】二字,即使用【确认自定义改名】指令。");
return result;
}
-
+
if (e.Detail.StartsWith("确认自定义改名"))
{
e.UseNotice = false;
@@ -1567,7 +1567,7 @@ namespace Oshima.FunGame.WebAPI.Services
await SendAsync(e, "使用", msg);
}
}
- else if(!string.IsNullOrEmpty(itemPart))
+ else if (!string.IsNullOrEmpty(itemPart))
{
string msg = Controller.UseItem2(uid, itemPart, count, characterIds);
if (msg != "")
@@ -1877,7 +1877,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("邀请加入", StringComparison.CurrentCultureIgnoreCase))
{
string detail = e.Detail.Replace("邀请加入", "").Trim();
@@ -1891,7 +1891,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("取消邀请加入", StringComparison.CurrentCultureIgnoreCase))
{
string detail = e.Detail.Replace("取消邀请加入", "").Trim();
@@ -2037,7 +2037,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("查看受邀人列表"))
{
string detail = e.Detail.Replace("查看受邀人列表", "").Trim();
@@ -2266,7 +2266,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "世界地图")
{
List msgs = Controller.GetRegion();
@@ -2338,7 +2338,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("小队探索"))
{
string detail = e.Detail.Replace("小队探索", "").Trim();
@@ -2504,7 +2504,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("解锁"))
{
string detail = e.Detail.Replace("解锁", "").Trim();
@@ -2543,7 +2543,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "我的报价"))
{
string detail = e.Detail.Replace("我的报价", "").Trim();
@@ -2562,7 +2562,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "查报价"))
{
string detail = e.Detail.Replace("查报价", "").Trim();
@@ -2577,7 +2577,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "发送报价"))
{
string detail = e.Detail.Replace("发送报价", "").Trim();
@@ -2592,7 +2592,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "取消报价"))
{
string detail = e.Detail.Replace("取消报价", "").Trim();
@@ -2607,7 +2607,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "接受报价"))
{
string detail = e.Detail.Replace("接受报价", "").Trim();
@@ -2622,7 +2622,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "拒绝报价"))
{
string detail = e.Detail.Replace("拒绝报价", "").Trim();
@@ -2637,7 +2637,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "报价添加物品"))
{
string detail = e.Detail.Replace("报价添加物品", "").Trim();
@@ -2665,7 +2665,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "报价添加对方物品"))
{
string detail = e.Detail.Replace("报价添加对方物品", "").Trim();
@@ -2693,7 +2693,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "报价移除物品"))
{
string detail = e.Detail.Replace("报价移除物品", "").Trim();
@@ -2721,7 +2721,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith(value: "报价移除对方物品"))
{
string detail = e.Detail.Replace("报价移除对方物品", "").Trim();
@@ -2784,7 +2784,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("挑战钻石秘境"))
{
string detail = e.Detail.Replace("挑战钻石秘境", "").Trim();
@@ -2799,7 +2799,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("挑战经验秘境"))
{
string detail = e.Detail.Replace("挑战经验秘境", "").Trim();
@@ -2814,7 +2814,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("挑战地区秘境"))
{
string detail = e.Detail.Replace("挑战地区秘境", "").Trim();
@@ -2829,7 +2829,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("挑战突破秘境"))
{
string detail = e.Detail.Replace("挑战突破秘境", "").Trim();
@@ -2844,7 +2844,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("挑战技能秘境"))
{
string detail = e.Detail.Replace("挑战技能秘境", "").Trim();
@@ -2859,7 +2859,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("挑战魔法卡秘境"))
{
string detail = e.Detail.Replace("挑战魔法卡秘境", "").Trim();
@@ -2884,7 +2884,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "武器商会")
{
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_weapons");
@@ -2894,7 +2894,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "杂货铺")
{
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_yuki");
@@ -2904,7 +2904,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "基金会")
{
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_welfare");
@@ -2914,7 +2914,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "锻造商店")
{
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_forge");
@@ -2934,7 +2934,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "共斗商店")
{
string msg = Controller.ShowSystemStore(uid, "铎京城", "dokyo_cooperative");
@@ -3019,7 +3019,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("锻造配方"))
{
string pattern = @"锻造配方\s*(?:(?[^\d]+?)\s*(?\d+)\s*)+";
@@ -3048,7 +3048,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("模拟锻造"))
{
string msg = Controller.ForgeItem_Simulate(uid);
@@ -3058,7 +3058,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("取消锻造"))
{
string msg = Controller.ForgeItem_Cancel(uid);
@@ -3068,7 +3068,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("确认开始锻造"))
{
string msg = Controller.ForgeItem_Complete(uid);
@@ -3078,7 +3078,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("锻造信息"))
{
string msg = Controller.ForgeItem_Info(uid);
@@ -3169,7 +3169,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("市场下架"))
{
string detail = e.Detail.Replace("市场下架", "").Trim();
@@ -3184,7 +3184,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("我的市场"))
{
string detail = e.Detail.Replace("我的市场", "").Trim();
@@ -3229,7 +3229,7 @@ namespace Oshima.FunGame.WebAPI.Services
string[] strings = detail.Split(" ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries);
long id = -1;
string name = "";
- bool useId = false;
+ bool useId = false;
if (strings.Length > 0)
{
if (long.TryParse(strings[0].Trim(), out id))
@@ -3289,7 +3289,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "创建共斗")
{
string groupId = "";
@@ -3315,7 +3315,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "创建混战")
{
string groupId = "";
@@ -3341,7 +3341,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "创建团战")
{
string groupId = "";
@@ -3367,7 +3367,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "加入赛马")
{
string groupId = "";
@@ -3438,7 +3438,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail.StartsWith("加入房间"))
{
string groupId = "";
@@ -3511,7 +3511,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "退出房间")
{
string groupId = "";
@@ -3537,7 +3537,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "房间列表")
{
string groupId = "";
@@ -3563,7 +3563,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "房间信息")
{
string msg = Controller.RoomInfo(uid);
@@ -3573,7 +3573,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == "排行榜" || e.Detail == "养成排行榜")
{
string msg = Controller.GetRanking(uid, 2);
@@ -3583,7 +3583,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == $"{General.GameplayEquilibriumConstant.InGameCurrency}排行榜")
{
string msg = Controller.GetRanking(uid, 0);
@@ -3593,7 +3593,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == $"{General.GameplayEquilibriumConstant.InGameMaterial}排行榜")
{
string msg = Controller.GetRanking(uid, 1);
@@ -3603,7 +3603,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == $"赛马排行榜")
{
string msg = Controller.GetRanking(uid, 3);
@@ -3613,7 +3613,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == $"共斗排行榜")
{
string msg = Controller.GetRanking(uid, 4);
@@ -3623,7 +3623,7 @@ namespace Oshima.FunGame.WebAPI.Services
}
return result;
}
-
+
if (e.Detail == $"锻造排行榜")
{
string msg = Controller.GetRanking(uid, 5);
@@ -3661,7 +3661,7 @@ namespace Oshima.FunGame.WebAPI.Services
return result;
}
-
+
if (e.Detail.StartsWith("减物") || e.Detail.StartsWith("移除背包物品"))
{
string detail = e.Detail.Replace("减物", "").Replace("移除背包物品", "").Trim();
diff --git a/OshimaWebAPI/Services/UserDailyService.cs b/OshimaWebAPI/Services/UserDailyService.cs
index 4ed963d..933d4c7 100644
--- a/OshimaWebAPI/Services/UserDailyService.cs
+++ b/OshimaWebAPI/Services/UserDailyService.cs
@@ -26,7 +26,7 @@ namespace Oshima.FunGame.WebAPI.Services
return new UserDaily(0, 0, "今日运势列表为空,请联系管理员设定。");
}
}
-
+
public static OpenUserDaily GetOpenUserDaily(string user_id)
{
if (Daily.OpenUserDailys.TryGetValue(user_id, out string? value) && value != null && value.Trim() != "")