Files
bl/logic/service/fight/info/over.go
xinian 8dec37a474
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构怪物掉落和闪光处理逻辑
移除OgrePetInfo中与物品和闪光相关的冗余代码,将闪光处理逻辑整合到HandleNPCFightSpecial方法中
新增CanGetXUAN和CanGetItem方法用于判断是否获得特殊物品
添加S2C_GET_BOSS_MONSTER的ADD
2026-02-27 14:48:10 +08:00

25 lines
979 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package info
import "blazing/common/data"
type S2C_GET_BOSS_MONSTER struct {
BonusID uint32 // 激活前端任务的ID
// EXP uint32 `json:"exp" description:"奖励经验"`
// EV int64 `struc:"uint32"`
PetID uint32 // 发放精灵的ID
CaptureTm uint32 // 发放精灵的捕获时间
ItemListLen uint32 `struc:"sizeof=ItemList"`
ItemList []data.ItemInfo // 发放物品的数组:
// 特殊说明:
// 1. 仅发放精灵不发放物品时ItemList 无需填充元素,但序列化时需先写入 uint 类型的长度值为0
// 2. 发放多个物品时:序列化时先写入 uint 类型的数组长度再依次写入每个ItemInfo元素
// 3. 该List结构参考PetInfo的特性List长度为Uint型非int
}
func (s *S2C_GET_BOSS_MONSTER) ADDitem(id, count uint32) {
s.ItemList = append(s.ItemList, data.ItemInfo{
ItemId: int64(id),
ItemCnt: int64(count),
})
}