playroom interact bug fix
This commit is contained in:
parent
85a5273c10
commit
1f41975ba2
@ -290,6 +290,7 @@ func (p *Player) InitPlayer(UserName string) error {
|
||||
p.FixOrderBug()
|
||||
p.FixDecorate()
|
||||
p.FixPlayroomPyhical()
|
||||
p.FixPlayroomInteract()
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1484,6 +1485,14 @@ func (p *Player) FixPlayroomPyhical() {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Player) FixPlayroomInteract() {
|
||||
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||
BaseMod := p.PlayMod.getBaseMod()
|
||||
if BaseMod.GetLevel() < playroomCfg.GetInteractNum() {
|
||||
PlayroomMod.InteractNum = 0
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Player) GetOrderFactor() int {
|
||||
return orderCfg.GetOrderFactor(p.GetDecorateMod().AreaId)
|
||||
}
|
||||
|
||||
@ -11,3 +11,10 @@ func TestPlayroomVisit(t *testing.T) {
|
||||
player.InitPlayerOnly()
|
||||
player.GetVisitorPlayer()
|
||||
}
|
||||
|
||||
func TestInteract(t *testing.T) {
|
||||
player := getTestPlayer()
|
||||
BaseMod := player.GetBaseMod()
|
||||
PlayroomMod := player.GetPlayroomMod()
|
||||
PlayroomMod.AddInteractNum(BaseMod.GetLevel())
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user