Merge branch 'develop' into release
This commit is contained in:
commit
e686334c57
|
@ -3173,20 +3173,14 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
|
|||
return nil
|
||||
}
|
||||
if msg.GuideId == common.GuideIdNewPlayer {
|
||||
if p.GuideStep >= 0 && p.GuideStep < model.GameParamData.GuideStepMaxNum {
|
||||
p.GuideStep = -1 // 跳过引导为 -1
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
} else {
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
if len(msg.Param) > 0 {
|
||||
p.GuideData[msg.GuideId] = int32(msg.Param[0])
|
||||
}
|
||||
send()
|
||||
return nil
|
||||
p.GuideStep = -1 // 跳过引导为 -1
|
||||
}
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
if len(msg.Param) > 0 {
|
||||
p.GuideData[msg.GuideId] = int32(msg.Param[0])
|
||||
}
|
||||
send()
|
||||
return nil
|
||||
case common.AttributeGuideTest:
|
||||
if !common.Config.IsDevMode {
|
||||
return nil
|
||||
|
|
|
@ -1367,12 +1367,7 @@ func (this *Player) Time2Save() {
|
|||
return
|
||||
}
|
||||
|
||||
isForce := false
|
||||
if common.Config.IsDevMode {
|
||||
isForce = true // 开发模式下强制保存
|
||||
}
|
||||
|
||||
PlayerMgrSington.SavePlayer(this, true, isForce)
|
||||
PlayerMgrSington.SavePlayer(this, true, false)
|
||||
|
||||
if this.isDelete || (!this.IsOnLine() && !this.dirty && time.Now().Sub(this.lastSaved) > time.Minute*5 && this.scene == nil) {
|
||||
PlayerMgrSington.DelPlayer(this.SnId)
|
||||
|
|
|
@ -173,7 +173,6 @@ func (this *PlayerMgr) SavePlayer(p *Player, isCopy, force bool) {
|
|||
|
||||
t1 := time.Now()
|
||||
|
||||
p.dirty = true
|
||||
// 跨天任务依赖LastLogoutTime的准确性,跨天任务是定时器common.ClockMgrSington触发的,所以这里要用定时器的触发时间
|
||||
p.LastLogoutTime = common.ClockMgrSingleton.LastTickTime
|
||||
pd.LastLogoutTime = common.ClockMgrSingleton.LastTickTime
|
||||
|
|
Loading…
Reference in New Issue