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

This commit is contained in:
xinian
2026-02-13 03:04:04 +08:00
committed by cnb
parent dca4d4ffca
commit a0e0822b5a
9 changed files with 34 additions and 15 deletions

View File

@@ -195,13 +195,11 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
//p.Done.Exec(model.MilestoneMode.Moster, []uint32{p.Info.MapID, monsterInfo.PetList[0].ID, uint32(foi.Reason)}, nil)
if foi.Reason == 0 && foi.WinnerId == p.Info.UserID {
if !p.CanGetExp() {
return
}
exp := uint32(xmlres.PetMAP[int(monster.ID)].YieldingExp) * monster.Level / 7
exp = uint32(p.CanGetExp()) * (exp)
items := &info.S2C_GET_BOSS_MONSTER{
//EV: 45,
EXP: exp * 2,
EXP: exp/2,
}
if refPet.Item != 0 {
count := int64(grand.Intn(2) + 1)
@@ -218,8 +216,8 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf
p.Info.EVPool += lo.Sum(evs) //给予累计学习力
foi.Winpet.AddEV(evs)
p.Info.ExpPool += int64(exp) * 4
p.AddPetExp(foi.Winpet, int64((exp)*2))
p.Info.ExpPool += int64(exp)
p.AddPetExp(foi.Winpet, int64((exp)/2))
p.SendPackCmd(8004, items)
}

View File

@@ -16,6 +16,9 @@ func (h Controller) CDK(data *user.C2S_GET_GIFT_COMPLETE, player *player.Player)
if r == nil {
return nil, errorcode.ErrorCodes.ErrMolecularCodeNotExists
}
if r.BindUserId != 0 && r.BindUserId != data.Head.UserID {
return nil, errorcode.ErrorCodes.ErrMolecularCodeFrozen
}
if r.ValidEndTime.Compare(time.Now()) == -1 {
return nil, errorcode.ErrorCodes.ErrMolecularCodeExpired