playroom优化
This commit is contained in:
parent
f125c77a0d
commit
7a2f4de850
@ -149,6 +149,8 @@ func (f *FriendMgr) SetVarUserData(m *msg.Msg) (interface{}, error) {
|
|||||||
data.Upvote++
|
data.Upvote++
|
||||||
case VAR_OP_CHIP:
|
case VAR_OP_CHIP:
|
||||||
data.Chip += VarOp.Data.(int)
|
data.Chip += VarOp.Data.(int)
|
||||||
|
case VAR_OP_CHIP_SET:
|
||||||
|
data.Chip = VarOp.Data.(int)
|
||||||
case VAR_OP_KISS:
|
case VAR_OP_KISS:
|
||||||
data.Kiss = VarOp.Data.(int)
|
data.Kiss = VarOp.Data.(int)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,7 +320,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
|||||||
PlayroomBackData(player)
|
PlayroomBackData(player)
|
||||||
case "addChip":
|
case "addChip":
|
||||||
PlayroomMod := player.PlayMod.getPlayroomMod()
|
PlayroomMod := player.PlayMod.getPlayroomMod()
|
||||||
PlayroomMod.AddChip(1, 1, 0)
|
PlayroomMod.AddChip(100100001, 1, 0)
|
||||||
player.PushClientRes(PlayroomMod.NotifyLose())
|
player.PushClientRes(PlayroomMod.NotifyLose())
|
||||||
case "save":
|
case "save":
|
||||||
player.PlayMod.ClearData(player)
|
player.PlayMod.ClearData(player)
|
||||||
|
|||||||
@ -3526,7 +3526,7 @@ func ReqPlayroomChip(player *Player, buf []byte) error {
|
|||||||
"uid": req.Uid,
|
"uid": req.Uid,
|
||||||
})
|
})
|
||||||
|
|
||||||
G_GameLogicPtr.SetUserData(int(player.M_DwUin), VAR_OP_CHIP, -ChipNum)
|
G_GameLogicPtr.SetUserData(int(player.M_DwUin), VAR_OP_CHIP_SET, len(PlayroomMod.ChipList))
|
||||||
player.PlayMod.save()
|
player.PlayMod.save()
|
||||||
PlayroomBackData(player)
|
PlayroomBackData(player)
|
||||||
player.PushClientRes(&msg.ResPlayroomChip{
|
player.PushClientRes(&msg.ResPlayroomChip{
|
||||||
|
|||||||
@ -89,4 +89,8 @@ func init() {
|
|||||||
gob.Register(&msg.HandbookMsg{})
|
gob.Register(&msg.HandbookMsg{})
|
||||||
gob.Register(&limitedTimeEvent.CatTrick{})
|
gob.Register(&limitedTimeEvent.CatTrick{})
|
||||||
gob.Register(&VarOpration{})
|
gob.Register(&VarOpration{})
|
||||||
|
gob.Register(&VarUserData{})
|
||||||
|
gob.Register(&ActivityInfo{})
|
||||||
|
gob.Register(&ChargeExtra{})
|
||||||
|
gob.Register(&GameResult{})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,7 @@ const (
|
|||||||
VAR_OP_UPVOTE = 1
|
VAR_OP_UPVOTE = 1
|
||||||
VAR_OP_CHIP = 2
|
VAR_OP_CHIP = 2
|
||||||
VAR_OP_KISS = 3
|
VAR_OP_KISS = 3
|
||||||
|
VAR_OP_CHIP_SET = 4
|
||||||
)
|
)
|
||||||
|
|
||||||
func (f *VarMgr) Init() {
|
func (f *VarMgr) Init() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user