Merge branch 'main' of https://cnb.cool/blzing/blazing
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
昔念
2026-03-02 21:56:34 +08:00
32 changed files with 344 additions and 126 deletions

View File

@@ -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
}
}

View File

@@ -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)

View File

@@ -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
}

View File

@@ -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) {