playroom优化

This commit is contained in:
hahwu 2025-03-26 09:48:02 +08:00
parent 5e6e29cca9
commit a803e6c284
3 changed files with 5 additions and 5 deletions

View File

@ -666,7 +666,7 @@ func PlayroomVisit(p *Player, Uid int) {
r.Defense = Work
r.Emoji = GoUtil.MapIntToInt32(PlayerData.Emoji)
r.Chip = int32(PlayerData.Chip)
r.PetName = p.PlayMod.getBaseMod().GetPetName()
r.PetName = PlayerData.PetName
Items := make(map[int32]*proto.ItemInfo, 0)
for k, v := range PlayroomMod.GameReward {
Items[int32(k)] = &proto.ItemInfo{

View File

@ -2556,7 +2556,7 @@ func ReqSetPetName(player *Player, buf []byte) error {
req := &msg.ReqSetPetName{}
proto.Unmarshal(buf, req)
BaseMod := player.PlayMod.getBaseMod()
BaseMod.SetNickName(req.Name)
BaseMod.SetPetName(req.Name)
player.PushClientRes(&msg.ResSetPetName{
ResultCode: msg.RES_CODE_SUCCESS,
})

View File

@ -396,9 +396,9 @@ func (p *PlayroomMod) GetVisitorInfo(Id int) (int, int64) {
return v.Times, v.Time
}
func (p *PlayroomMod) Draw() (int, []*item.Item, error) {
if p.AllMood < 100 {
return 0, nil, fmt.Errorf("Draw AllMood < 100")
}
// if p.AllMood < 100 {
// return 0, nil, fmt.Errorf("Draw AllMood < 100")
// }
if p.JackpotNum == 0 {
return 0, nil, fmt.Errorf("Draw JackpotNum is 0")
}