修复时间线bug
This commit is contained in:
parent
d916df4428
commit
6ace9fa701
@ -513,22 +513,22 @@ func (f *FriendMod) AgreeApply(UId int) {
|
||||
}
|
||||
|
||||
// 增加好友日志
|
||||
func (f *FriendMod) AddLog(Uid, Type int, Param string) int {
|
||||
func (f *FriendMod) AddLog(uid, ltype int, param string, send int64) int {
|
||||
f.AutoId++
|
||||
f.Log = append(f.Log, &LogInfo{
|
||||
Id: f.AutoId,
|
||||
Uid: Uid,
|
||||
Type: Type,
|
||||
Time: GoUtil.Now(),
|
||||
Param: Param,
|
||||
Uid: uid,
|
||||
Type: ltype,
|
||||
Time: send,
|
||||
Param: param,
|
||||
})
|
||||
switch Type {
|
||||
switch ltype {
|
||||
case LOG_TYPE_HANDBOOK_UPVOTE, LOG_TYPE_PLAYROOM_UPVOTE:
|
||||
f.AddBubble(f.AutoId, Type, nil)
|
||||
f.AddBubble(f.AutoId, ltype, nil)
|
||||
case LOG_TYPE_TREASURE_HELP:
|
||||
ItemNum := GoUtil.RandNum(2, 5)
|
||||
ItemList := []*item.Item{item.NewItem(item.ITEM_STAR_ID, ItemNum)}
|
||||
f.AddBubble(f.AutoId, Type, ItemList)
|
||||
f.AddBubble(f.AutoId, ltype, ItemList)
|
||||
}
|
||||
if len(f.Log) > 30 {
|
||||
f.Log = f.Log[len(f.Log)-30:]
|
||||
|
||||
@ -1170,17 +1170,17 @@ func (p *Player) HandleInChampshipRank() {
|
||||
SendMsgToCenterAsync(m)
|
||||
}
|
||||
|
||||
func (p *Player) AddLog(Uid int, Type int, Param string, Time int64) {
|
||||
func (p *Player) AddLog(uid int, ltype int, param string, send int64) {
|
||||
FriendMod := p.PlayMod.getFriendMod()
|
||||
Id := FriendMod.AddLog(Uid, Type, Param)
|
||||
Id := FriendMod.AddLog(uid, ltype, param, send)
|
||||
p.PlayMod.save()
|
||||
p.PushClientRes(&msg.NotifyFriendLog{
|
||||
Info: &msg.ResFriendLog{
|
||||
Player: G_GameLogicPtr.GetResSimplePlayerByUid(Uid),
|
||||
Type: int32(Type),
|
||||
Param: Param,
|
||||
Player: G_GameLogicPtr.GetResSimplePlayerByUid(uid),
|
||||
Type: int32(ltype),
|
||||
Param: param,
|
||||
Id: int32(Id),
|
||||
Time: int32(Time),
|
||||
Time: int32(send),
|
||||
},
|
||||
Bubble: FriendMod.GetBubble(Id),
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user