1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-02-13 03:34:37 +08:00
committed by cnb
parent a0e0822b5a
commit ef05dff851

View File

@@ -196,11 +196,14 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
if foi.Reason == 0 && foi.WinnerId == p.Info.UserID {
exp := uint32(xmlres.PetMAP[int(monster.ID)].YieldingExp) * monster.Level / 7
exp = uint32(p.CanGetExp()) * (exp)
leve := p.CanGetExp()
exp = uint32(leve) * (exp)
items := &info.S2C_GET_BOSS_MONSTER{
//EV: 45,
EXP: exp/2,
EXP: exp / 2,
}
p.Info.ExpPool += int64(exp)
p.AddPetExp(foi.Winpet, int64((exp)/2))
if refPet.Item != 0 {
count := int64(grand.Intn(2) + 1)
p.ItemAdd(refPet.Item, count)
@@ -212,12 +215,13 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
}
evs := gconv.Int64s(strings.Split(xmlres.PetMAP[int(monster.ID)].YieldingEV, " "))
items.EV = lo.Sum(evs) - 1
p.Info.EVPool += lo.Sum(evs) //给予累计学习力
foi.Winpet.AddEV(evs)
p.Info.ExpPool += int64(exp)
p.AddPetExp(foi.Winpet, int64((exp)/2))
foi.Winpet.AddEV(evs)
if leve == 8 {
items.EV = lo.Sum(evs) - 1
p.Info.EVPool += lo.Sum(evs) //给予累计学习力
}
p.SendPackCmd(8004, items)
}