feat(login): 重构登录逻辑并迁移每日重置功能到 Personself 方法

将原本在 Controller.Login 中处理的每日重置逻辑(如电池、任务等)迁移到
service.Info.Personself 方法中,并移除对 gtime.Now().Time 的旧引用。同时更新了
相关的时间判断函数 IsToday,使其支持 *gtime.Time 类型。

此外,清理无用导入包,优化日志打印方式,并修复部分结构体字段定义与使用问题。
This commit is contained in:
2025-12-07 19:23:44 +08:00
parent eef702e25a
commit 294cb2e3fd
9 changed files with 64 additions and 38 deletions

View File

@@ -50,6 +50,7 @@ func (h Controller) ItemUsePet(data *item.C2S_USE_PET_ITEM_OUT_OF_FIGHT, c *play
copier.CopyWithOption(onpet, oldpet.Data, copier.Option{DeepCopy: true})
onpet.CatchTime = oldpetc
onpet.EffectInfo = oldpet.Data.EffectInfo
} else {
hd := item.PetItemRegistry.GetHandler(data.ItemID)
if hd == nil {