Merge branch 'dev' of git.kingsome.cn:server/game2006go into dev
This commit is contained in:
commit
3b1bbffc6c
@ -14,7 +14,7 @@ var Friend = new (friend)
|
|||||||
|
|
||||||
func (this *friend) Force(accountId1 string, accountId2 string, nowTime int64,
|
func (this *friend) Force(accountId1 string, accountId2 string, nowTime int64,
|
||||||
cb func (error, int64, int64)) {
|
cb func (error, int64, int64)) {
|
||||||
f5.GetJsStyleDb().Upsert(
|
f5.GetJsStyleDb().UpsertEx(
|
||||||
constant.FRIEND_DB,
|
constant.FRIEND_DB,
|
||||||
"t_friend_relationship",
|
"t_friend_relationship",
|
||||||
[][]string{
|
[][]string{
|
||||||
@ -33,7 +33,14 @@ func (this *friend) Force(accountId1 string, accountId2 string, nowTime int64,
|
|||||||
{"createtime", q5.ToString(nowTime)},
|
{"createtime", q5.ToString(nowTime)},
|
||||||
{"modifytime", q5.ToString(nowTime)},
|
{"modifytime", q5.ToString(nowTime)},
|
||||||
},
|
},
|
||||||
cb)
|
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||||
|
cb(err, lastInsertId, rowsAffected)
|
||||||
|
this.updateAddFriendTask(accountId1, nowTime)
|
||||||
|
this.updateAddFriendTask(accountId2, nowTime)
|
||||||
|
},
|
||||||
|
func (ds *f5.DataSet) bool {
|
||||||
|
return true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *friend) DeleteSoft(accountId1 string, accountId2 string,
|
func (this *friend) DeleteSoft(accountId1 string, accountId2 string,
|
||||||
@ -51,3 +58,26 @@ func (this *friend) DeleteSoft(accountId1 string, accountId2 string,
|
|||||||
},
|
},
|
||||||
cb)
|
cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *friend) updateAddFriendTask(accountId string, nowTime int64) {
|
||||||
|
f5.GetJsStyleDb().Upsert(
|
||||||
|
constant.GAME_DB,
|
||||||
|
"t_rookie_task_value",
|
||||||
|
[][]string{
|
||||||
|
{"account_id", accountId},
|
||||||
|
{"task_type", "16"},
|
||||||
|
},
|
||||||
|
[][]string{
|
||||||
|
{"!value", "value + 1"},
|
||||||
|
{"modifytime", q5.ToString(nowTime)},
|
||||||
|
},
|
||||||
|
[][]string{
|
||||||
|
{"account_id", accountId},
|
||||||
|
{"task_type", "16"},
|
||||||
|
{"value", "1"},
|
||||||
|
{"createtime", q5.ToString(nowTime)},
|
||||||
|
{"modifytime", q5.ToString(nowTime)},
|
||||||
|
},
|
||||||
|
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -56,7 +56,7 @@ func (this *historyMgr) PushLastBattleInfo(hum common.Player) {
|
|||||||
|
|
||||||
func (this *historyMgr) CanStart(accountId string, mapId int32, modeId int32) bool {
|
func (this *historyMgr) CanStart(accountId string, mapId int32, modeId int32) bool {
|
||||||
u := this.getUser(accountId)
|
u := this.getUser(accountId)
|
||||||
if u == nil && modeId == jccommon.MAP_MODE_CIRCUIT {
|
if u != nil && modeId == jccommon.MAP_MODE_CIRCUIT {
|
||||||
key := q5.MkInt64(mapId, modeId)
|
key := q5.MkInt64(mapId, modeId)
|
||||||
if startTime, ok := u.mapAndModeHash[key]; ok {
|
if startTime, ok := u.mapAndModeHash[key]; ok {
|
||||||
nowTime := q5.ToInt32(f5.GetApp().GetRealSeconds())
|
nowTime := q5.ToInt32(f5.GetApp().GetRealSeconds())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user