feat(fight_pvp_king): 新增宠物王者对战模式支持 - 添加战斗类型11的处理逻辑,支持单人模式 - 验证宠物类型与对战类型的匹配性 - 根据战斗结果发放相应奖励物品 - 增加ItemAdd接口用于物品添加功能 - 扩展PetInfo结构体增加战斗类型字段 ```
This commit is contained in:
@@ -11,7 +11,7 @@ type PlayerI interface {
|
||||
Roll(int, int) (bool, float64, float64)
|
||||
//SendPack(b []byte) error
|
||||
Getfightinfo() info.Fightinfo
|
||||
|
||||
ItemAdd(ItemId, ItemCnt int64) (result bool)
|
||||
GetInfo() *model.PlayerInfo
|
||||
InvitePlayer(PlayerI)
|
||||
SetFightC(FightI)
|
||||
|
||||
@@ -49,7 +49,8 @@ type Fightinfo struct {
|
||||
Mode uint32
|
||||
//Type uint32 //战斗类型
|
||||
|
||||
Status uint32
|
||||
Status uint32
|
||||
FightType uint32
|
||||
}
|
||||
|
||||
// FightPetInfo 战斗精灵信息结构体,FightPetInfo类
|
||||
|
||||
@@ -86,6 +86,9 @@ func (p *baseplayer) GetPetInfo() []model.PetInfo {
|
||||
|
||||
return p.Info.PetList
|
||||
}
|
||||
func (p *baseplayer) ItemAdd(ItemId, ItemCnt int64) (result bool) {
|
||||
return true
|
||||
}
|
||||
|
||||
func (lw *baseplayer) SendLoadPercent(info.LoadPercentOutboundInfo) {
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ func (o *OgrePetInfo) GetLevel() int {
|
||||
|
||||
// handleNPCFightSpecial 处理NPC战斗特殊情况
|
||||
func (o *OgrePetInfo) HandleNPCFightSpecial(can int) {
|
||||
if can == 0 && o.Ext == 0 {//不能抓并且不是尼尔
|
||||
if can == 0 && o.Ext == 0 { //不能抓并且不是尼尔
|
||||
o.IsCapture = 0
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user