playroom优化

This commit is contained in:
hahwu 2025-08-15 17:58:04 +08:00
parent 3cfef77824
commit 0e526cadfd

View File

@ -980,8 +980,8 @@ func (p *PlayroomMod) AddUpvote() {
} }
func (p *PlayroomMod) PlayroomPetAirSet(Id int) error { func (p *PlayroomMod) PlayroomPetAirSet(Id int) error {
if !GoUtil.InArray(Id, p.PetAir) { if _, ok := p.NewPetAir[Id]; !ok {
return fmt.Errorf("pet air not found") return fmt.Errorf("PlayroomPetAirSet Id is not ok")
} }
p.PetAirSet = Id p.PetAirSet = Id
return nil return nil