Merge branch 'main' of https://cnb.cool/blzing/blazing
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
This commit is contained in:
@@ -23,11 +23,11 @@ var Maincontroller = &Controller{} //注入service
|
||||
|
||||
// Controller 分发cmd逻辑实现
|
||||
type Controller struct {
|
||||
Port uint16
|
||||
Port uint32
|
||||
RPCClient *struct {
|
||||
Kick func(uint32) error
|
||||
|
||||
RegisterLogic func(uint16, uint16) error
|
||||
RegisterLogic func(uint32, uint32) error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -174,9 +174,9 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
|
||||
items.ADDitem(3, uint32(poolexp))
|
||||
|
||||
p.AddPetExp(foi.Winpet, int64(addexp))
|
||||
|
||||
if monster.IsShiny() && p.CanGetXUAN() {
|
||||
xuan := 400686 + int64(xmlres.PetMAP[int(refPet.GetID())].Type)
|
||||
pettype := int64(xmlres.PetMAP[int(refPet.GetID())].Type)
|
||||
if monster.IsShiny() && p.CanGetXUAN() && pettype < 16 {
|
||||
xuan := 400686 + pettype
|
||||
ok := p.ItemAdd(xuan, 1)
|
||||
if ok {
|
||||
items.ADDitem(uint32(xuan), 1)
|
||||
|
||||
@@ -97,7 +97,7 @@ func (h Controller) handleNeuronItem(currentPet *model.PetInfo, c *player.Player
|
||||
|
||||
// 炫彩碎片 处理神300212
|
||||
func (h Controller) handlexuancaiItem(currentPet *model.PetInfo, c *player.Player) errorcode.ErrorCode {
|
||||
r, _ := element.Calculator.GetCombination(int(currentPet.ID))
|
||||
r, _ := element.Calculator.GetCombination(int(xmlres.PetMAP[int(currentPet.ID)].Type))
|
||||
if r.Secondary != nil {
|
||||
return errorcode.ErrorCodes.ErrItemUnusable
|
||||
}
|
||||
|
||||
@@ -11,10 +11,6 @@ import (
|
||||
"github.com/jinzhu/copier"
|
||||
)
|
||||
|
||||
// PetEVDiy 自定义分配宠物努力值(EV)
|
||||
// data: 包含宠物捕获时间和EV分配数据的输入信息
|
||||
// c: 当前玩家对象
|
||||
// 返回: 分配结果和错误码
|
||||
func (h Controller) PetELV(data *pet.C2S_PET_EVOLVTION, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
_, currentPet, found := c.FindPet(data.CacthTime)
|
||||
if !found {
|
||||
@@ -26,6 +22,9 @@ func (h Controller) PetELV(data *pet.C2S_PET_EVOLVTION, c *player.Player) (resul
|
||||
if flag == 0 {
|
||||
return nil, errorcode.ErrorCodes.ErrPokemonNotEvolveReady
|
||||
}
|
||||
if xmlres.PetMAP[int(currentPet.ID)].EvolvingLv > int(currentPet.Level) {
|
||||
return nil, errorcode.ErrorCodes.ErrPokemonNotEvolveReady
|
||||
}
|
||||
evinfo := xmlres.EVOLVMAP[flag].Branches[data.Index-1]
|
||||
|
||||
if c.Service.Item.CheakItem(uint32(evinfo.EvolvItem)) < int64(evinfo.EvolvItemCount) {
|
||||
|
||||
Reference in New Issue
Block a user