feat: 实现每日签到功能并优化战斗和道具逻辑

This commit is contained in:
xinian
2026-04-06 02:06:11 +08:00
committed by cnb
parent f433a26a6d
commit 5b37d9493b
17 changed files with 1066 additions and 86 deletions

View File

@@ -166,14 +166,7 @@ func refreshPetPaneKeepHP(currentPet *model.PetInfo, hp uint32) {
// handleRegularPetItem 处理普通宠物道具
func (h Controller) handleRegularPetItem(itemID uint32, currentPet *model.PetInfo) errorcode.ErrorCode {
handler := item.PetItemRegistry.GetHandler(itemID)
if handler == nil {
return errorcode.ErrorCodes.ErrItemUnusable
}
if !handler(itemID, currentPet) {
return errorcode.ErrorCodes.ErrItemUnusable
}
return 0
return item.PetItemRegistry.Handle(itemID, currentPet)
}
// ResetNature 重置宠物性格