mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
添加任务
This commit is contained in:
+40
-1
@@ -148,7 +148,7 @@ func (g *GameManager) LoginNotify(userId uint32, player *model.Player, clientSeq
|
||||
g.SendMsg(cmd.PlayerStoreNotify, userId, clientSeq, g.PacketPlayerStoreNotify(player))
|
||||
g.SendMsg(cmd.AvatarDataNotify, userId, clientSeq, g.PacketAvatarDataNotify(player))
|
||||
g.SendMsg(cmd.OpenStateUpdateNotify, userId, clientSeq, g.PacketOpenStateUpdateNotify())
|
||||
g.GCGLogin(player) // 发送GCG登录相关的通知包
|
||||
// g.GCGLogin(player) // 发送GCG登录相关的通知包
|
||||
playerLoginRsp := &proto.PlayerLoginRsp{
|
||||
IsUseAbilityHash: true,
|
||||
AbilityHashCode: 0,
|
||||
@@ -160,6 +160,45 @@ func (g *GameManager) LoginNotify(userId uint32, player *model.Player, clientSeq
|
||||
TotalTickTime: 0.0,
|
||||
}
|
||||
g.SendMsg(cmd.PlayerLoginRsp, userId, clientSeq, playerLoginRsp)
|
||||
|
||||
questListNotify := &proto.QuestListNotify{
|
||||
QuestList: make([]*proto.Quest, 0),
|
||||
}
|
||||
|
||||
for _, questDataConfig := range gdconf.GetQuestDataMap() {
|
||||
if questDataConfig.QuestId == 35104 {
|
||||
questListNotify.QuestList = append(questListNotify.QuestList, &proto.Quest{
|
||||
QuestId: 35104,
|
||||
State: 2,
|
||||
StartTime: uint32(time.Now().Unix()),
|
||||
ParentQuestId: 351,
|
||||
StartGameTime: 438,
|
||||
AcceptTime: uint32(time.Now().Unix()),
|
||||
FinishProgressList: []uint32{0},
|
||||
})
|
||||
continue
|
||||
}
|
||||
finishProgressList := make([]uint32, 0)
|
||||
if questDataConfig.FinishCondType1 != 0 {
|
||||
finishProgressList = append(finishProgressList, 0)
|
||||
}
|
||||
if questDataConfig.FinishCondType2 != 0 {
|
||||
finishProgressList = append(finishProgressList, 0)
|
||||
}
|
||||
if questDataConfig.FinishCondType3 != 0 {
|
||||
finishProgressList = append(finishProgressList, 0)
|
||||
}
|
||||
questListNotify.QuestList = append(questListNotify.QuestList, &proto.Quest{
|
||||
QuestId: uint32(questDataConfig.QuestId),
|
||||
State: 1,
|
||||
StartTime: uint32(time.Now().Unix()),
|
||||
ParentQuestId: uint32(questDataConfig.ParentQuestId),
|
||||
StartGameTime: 0,
|
||||
AcceptTime: uint32(time.Now().Unix()),
|
||||
FinishProgressList: finishProgressList,
|
||||
})
|
||||
}
|
||||
g.SendMsg(cmd.QuestListNotify, userId, clientSeq, questListNotify)
|
||||
}
|
||||
|
||||
func (g *GameManager) PacketPlayerDataNotify(player *model.Player) *proto.PlayerDataNotify {
|
||||
|
||||
Reference in New Issue
Block a user