diff --git a/logic/controller/fight_boss野怪和地图怪.go b/logic/controller/fight_boss野怪和地图怪.go index 600ac7e5b..9b53738ea 100644 --- a/logic/controller/fight_boss野怪和地图怪.go +++ b/logic/controller/fight_boss野怪和地图怪.go @@ -201,11 +201,11 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf exp := uint32(xmlres.PetMAP[int(monster.ID)].YieldingExp) * monster.Level / 7 addlevel, poolevel := p.CanGetExp() - addexp := uint32(addlevel) * (exp) - poolexp := uint32(poolevel) * (exp) + addexp := gconv.Float32(addlevel * gconv.Float32(exp)) + poolexp := gconv.Float32(poolevel) * gconv.Float32((exp)) items := &info.S2C_GET_BOSS_MONSTER{ //EV: 45, - EXP: poolexp, + EXP: uint32(poolexp), } p.Info.ExpPool += int64(poolexp + addexp) p.AddPetExp(foi.Winpet, int64(addexp)) diff --git a/logic/service/player/save.go b/logic/service/player/save.go index 6a1bbd355..c0f4ea1d9 100644 --- a/logic/service/player/save.go +++ b/logic/service/player/save.go @@ -64,7 +64,7 @@ func (p *Player) Save() { } // 经验倍数返回 -func (p *Player) CanGetExp() (int, int) { +func (p *Player) CanGetExp() (float32, float32) { if p.Info.TimeToday >= p.Info.TimeLimit { return 0, 0 } @@ -74,7 +74,7 @@ func (p *Player) CanGetExp() (int, int) { if islogintime > (p.Info.TimeLimit - p.Info.TimeToday) { return 0, 0 } - base := 1 + var base float32 = 1 if p.Info.TwoTimes != 0 { p.Info.TwoTimes-- base *= 2 @@ -85,5 +85,5 @@ func (p *Player) CanGetExp() (int, int) { base *= 3 } - return base, 1 + return (base), 0.2 }