破产时间线优化
This commit is contained in:
parent
4dbb8de2e9
commit
a7b2b39fd2
@ -343,7 +343,9 @@ func (p *Player) handle(m *msg.Msg) error {
|
|||||||
m.Item[0].Num = min(m.Item[0].Num, starNum)
|
m.Item[0].Num = min(m.Item[0].Num, starNum)
|
||||||
if m.Item[0].Num >= starNum && gameId == playroom.GAME_TYPE_FILP {
|
if m.Item[0].Num >= starNum && gameId == playroom.GAME_TYPE_FILP {
|
||||||
bankruptcy = true
|
bankruptcy = true
|
||||||
p.AddLog(m.From, friend.LOG_TYPE_PLAYROOM_BANKRUPTCY, fmt.Sprintf("%d", m.Item[0].Num), m.SendT)
|
if m.Item[0].Num > 0 {
|
||||||
|
p.AddLog(m.From, friend.LOG_TYPE_PLAYROOM_BANKRUPTCY, fmt.Sprintf("%d", m.Item[0].Num), m.SendT)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
p.HandleLoseItem(m.Item, "HANDLE_TYPE_PLAYROOM_LOSE")
|
p.HandleLoseItem(m.Item, "HANDLE_TYPE_PLAYROOM_LOSE")
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -448,7 +448,7 @@ func (p *PlayroomMod) AddChip(uid int, time int64, emoji int) {
|
|||||||
|
|
||||||
func (p *PlayroomMod) SetTarget(target int) {
|
func (p *PlayroomMod) SetTarget(target int) {
|
||||||
p.Target = target
|
p.Target = target
|
||||||
p.Status = 1
|
p.Status = STATUS_VISIT
|
||||||
p.HasVisit[target] = GoUtil.Now()
|
p.HasVisit[target] = GoUtil.Now()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,6 +858,9 @@ func (p *PlayroomMod) FlipCard(pos int) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *PlayroomMod) GetFlipReward() ([]*item.Item, int, int, error) {
|
func (p *PlayroomMod) GetFlipReward() ([]*item.Item, int, int, error) {
|
||||||
|
if p.Status != STATUS_VISIT {
|
||||||
|
return nil, 0, 0, fmt.Errorf("GetFlipReward Status is not STATUS_VISIT")
|
||||||
|
}
|
||||||
check := make(map[int]int)
|
check := make(map[int]int)
|
||||||
var items []*item.Item
|
var items []*item.Item
|
||||||
target := p.Target
|
target := p.Target
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user