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 {
if !GoUtil.InArray(Id, p.PetAir) {
return fmt.Errorf("pet air not found")
if _, ok := p.NewPetAir[Id]; !ok {
return fmt.Errorf("PlayroomPetAirSet Id is not ok")
}
p.PetAirSet = Id
return nil