playroom bug

This commit is contained in:
hahwu 2025-02-17 11:45:54 +08:00
parent 6426cf266d
commit eb312084f1

View File

@ -207,8 +207,8 @@ func handle(p *Player, m *msg.Msg) error {
PlayroomMod.AddVisitor(m.From, m.SendT)
p.AddLog(m.From, friend.LOG_TYPE_PLAYROOM_VISIT, fmt.Sprintf("%d,%d", Items[0].Id, Items[0].Num))
if len(Items) > 0 && Items[0].Id == item.ITEM_STAR_ID {
ItemMod := p.PlayMod.getItemMod()
StarNum := ItemMod.GetItem(item.ITEM_STAR_ID)
BaseMod := p.PlayMod.getBaseMod()
StarNum := BaseMod.GetStar()
Items[0].Num = min(Items[0].Num, StarNum)
p.HandleLoseItem(Items, "")
} else {