Merge branch 'develop' into sdk
This commit is contained in:
commit
8817b293ea
@ -207,11 +207,14 @@ func handle(p *Player, m *msg.Msg) error {
|
||||
SyncMailMsg(p)
|
||||
case msg.HANDLE_TYPE_PLAYROOM_LOSE: // # 玩家输了
|
||||
PlayroomMod := p.PlayMod.getPlayroomMod()
|
||||
Items := make([]*item.Item, 0)
|
||||
Items := m.Item
|
||||
IsChip := false
|
||||
if m.Extra != nil {
|
||||
Items = m.Extra.([]*item.Item)
|
||||
IsChip = m.Extra.(bool)
|
||||
}
|
||||
if IsChip {
|
||||
PlayroomMod.AddChip(m.From, m.SendT)
|
||||
}
|
||||
PlayroomMod.AddMood(playroom.MOOD_TYPE_FOOD, -50)
|
||||
PlayroomMod.AddMood(playroom.MOOD_TYPE_CLEAN, -50)
|
||||
PlayroomMod.AddVisitor(m.From, m.SendT)
|
||||
|
||||
@ -3289,7 +3289,8 @@ func ReqPlayroomSelectReward(player *Player, buf []byte) error {
|
||||
To: Target,
|
||||
Type: MsqMod.HANDLE_TYPE_PLAYROOM_LOSE,
|
||||
SendT: GoUtil.Now(),
|
||||
Extra: Items,
|
||||
Item: Items,
|
||||
Extra: true,
|
||||
})
|
||||
G_GameLogicPtr.SetUserData(Target, VAR_OP_CHIP, 1)
|
||||
PlayroomMod.ResetGame()
|
||||
@ -3479,7 +3480,8 @@ func ReqPlayroomFlipReward(player *Player, buf []byte) error {
|
||||
To: Target,
|
||||
Type: MsqMod.HANDLE_TYPE_PLAYROOM_LOSE,
|
||||
SendT: GoUtil.Now(),
|
||||
Extra: Items,
|
||||
Item: Items,
|
||||
Extra: false,
|
||||
})
|
||||
player.PlayMod.save()
|
||||
PlayroomBackData(player)
|
||||
|
||||
@ -40,22 +40,6 @@ func AdminProcess(Func string, args []interface{}) {
|
||||
}
|
||||
|
||||
func VerifyUser(accountInfo *db.Db_Account, detail *msg.ReqLogin) (ResLogin *msg.ResLogin) {
|
||||
if accountInfo == nil {
|
||||
ResLogin = &msg.ResLogin{
|
||||
ResultCode: MergeConst.Protocol_Error_Account_NoExsit,
|
||||
DwUin: 0,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if detail.Type == msg.LOGIN_TYPE_ACCOUNT_LOGIN && accountInfo.UserPassword != detail.UserPwd {
|
||||
ResLogin = &msg.ResLogin{
|
||||
ResultCode: MergeConst.Protocol_Error_Account_OR_PWD_ERROR,
|
||||
DwUin: 0,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if detail.Type == msg.LOGIN_TYPE_CODE_LOGIN {
|
||||
err := VerifyCode(detail.UserName, detail.Code)
|
||||
if err != nil {
|
||||
@ -66,6 +50,20 @@ func VerifyUser(accountInfo *db.Db_Account, detail *msg.ReqLogin) (ResLogin *msg
|
||||
return
|
||||
}
|
||||
}
|
||||
if accountInfo == nil {
|
||||
ResLogin = &msg.ResLogin{
|
||||
ResultCode: MergeConst.Protocol_Error_Account_NoExsit,
|
||||
DwUin: 0,
|
||||
}
|
||||
return
|
||||
}
|
||||
if detail.Type == msg.LOGIN_TYPE_ACCOUNT_LOGIN && accountInfo.UserPassword != detail.UserPwd {
|
||||
ResLogin = &msg.ResLogin{
|
||||
ResultCode: MergeConst.Protocol_Error_Account_OR_PWD_ERROR,
|
||||
DwUin: 0,
|
||||
}
|
||||
return
|
||||
}
|
||||
if detail.Type == msg.LOGIN_TYPE_DEVICE_LOGIN {
|
||||
if detail.Device != accountInfo.DeviceId {
|
||||
ResLogin = &msg.ResLogin{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user