mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-23 12:29:35 +08:00
添加活动和活动中心,添加单位,修改任务系统
This commit is contained in:
parent
d68a4c86ae
commit
27e281adc4
@ -143,6 +143,9 @@ namespace Oshima.FunGame.OshimaServers
|
||||
}
|
||||
}, true);
|
||||
TaskScheduler.Shared.AddTask("刷新每日任务", new TimeSpan(4, 0, 0), () =>
|
||||
{
|
||||
// 刷新每日任务
|
||||
Task.Run(() =>
|
||||
{
|
||||
string directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/quests";
|
||||
if (Directory.Exists(directoryPath))
|
||||
@ -158,8 +161,11 @@ namespace Oshima.FunGame.OshimaServers
|
||||
}
|
||||
Controller.WriteLine("刷新每日任务");
|
||||
}
|
||||
});
|
||||
Task.Run(() =>
|
||||
{
|
||||
// 刷新签到
|
||||
directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/saved";
|
||||
string directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/saved";
|
||||
if (Directory.Exists(directoryPath))
|
||||
{
|
||||
string[] filePaths = Directory.GetFiles(directoryPath);
|
||||
@ -173,8 +179,11 @@ namespace Oshima.FunGame.OshimaServers
|
||||
}
|
||||
Controller.WriteLine("刷新签到");
|
||||
}
|
||||
});
|
||||
Task.Run(() =>
|
||||
{
|
||||
// 刷新商店
|
||||
directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/stores";
|
||||
string directoryPath = $@"{AppDomain.CurrentDomain.BaseDirectory}configs/stores";
|
||||
if (Directory.Exists(directoryPath))
|
||||
{
|
||||
string[] filePaths = Directory.GetFiles(directoryPath);
|
||||
@ -189,6 +198,7 @@ namespace Oshima.FunGame.OshimaServers
|
||||
Controller.WriteLine("刷新签到");
|
||||
}
|
||||
});
|
||||
});
|
||||
TaskScheduler.Shared.AddRecurringTask("刷新boss", TimeSpan.FromHours(1), () =>
|
||||
{
|
||||
FunGameService.GenerateBoss();
|
||||
|
@ -1148,7 +1148,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
magic.Guid = magicCard.Guid;
|
||||
msg = $"此魔法卡的技能已经添加到未满三个魔法的卡包上。\r\n";
|
||||
}
|
||||
return $"魔法【{magic.Name}】在此魔法卡包中不存在或是已经升至满级!";
|
||||
else return $"魔法【{magic.Name}】在此魔法卡包中不存在或是已经升至满级!";
|
||||
}
|
||||
string containMagics = magicCardPack.Description.Split("增加角色属性")[0];
|
||||
magicCardPack.Description = $"包含魔法:{string.Join(",", magicCardPack.Skills.Magics.Select(m => m.Name + (m.Level > 1 ? $" +{m.Level - 1}" : "")))}\r\n" + magicCardPack.Description.Replace(containMagics, "");
|
||||
@ -1567,7 +1567,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
CreditsAward = maxProgress * 80,
|
||||
MaterialsAward = maxProgress / 2 * 1,
|
||||
Awards = items,
|
||||
AwardsCount = itemsCount
|
||||
AwardsCount = itemsCount,
|
||||
Status = QuestState.InProgress
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -3846,9 +3846,10 @@ namespace Oshima.FunGame.WebAPI.Controllers
|
||||
quests.LoadConfig();
|
||||
if (quests.Count > 0 && quests.Values.FirstOrDefault(q => q.Id == questid) is Quest quest)
|
||||
{
|
||||
if (quest.Status == QuestState.InProgress)
|
||||
IEnumerable<Quest> workingQuests = quests.Values.Where(q => q.QuestType != QuestType.Progressive && q.Status == QuestState.InProgress);
|
||||
if (workingQuests.Any())
|
||||
{
|
||||
msgs.Add($"你正在进行任务【{quest.Name}】,无法开始新任务!\r\n{quest}");
|
||||
msgs.Add($"你正在进行任务【{string.Join(",【", workingQuests.Select(q => q.Name))}】,无法开始新任务!\r\n{quest}");
|
||||
}
|
||||
else if (quest.Status == QuestState.Completed)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user