mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 16:52:26 +08:00
机器人移动
This commit is contained in:
@@ -172,18 +172,31 @@ func clientLogic(account string, session *net.Session) {
|
|||||||
ReliableSeq: moveReliableSeq,
|
ReliableSeq: moveReliableSeq,
|
||||||
IsReliable: true,
|
IsReliable: true,
|
||||||
}
|
}
|
||||||
|
logger.Debug("EntityMoveInfo: %v, account: %v", entityMoveInfo, account)
|
||||||
combatData, err := pb.Marshal(entityMoveInfo)
|
combatData, err := pb.Marshal(entityMoveInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("marshal EntityMoveInfo error: %v, account: %v", err, account)
|
logger.Error("marshal EntityMoveInfo error: %v, account: %v", err, account)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
session.SendMsg(cmd.CombatInvocationsNotify, &proto.CombatInvocationsNotify{
|
combatInvocationsNotify := &proto.CombatInvocationsNotify{
|
||||||
InvokeList: []*proto.CombatInvokeEntry{{
|
InvokeList: []*proto.CombatInvokeEntry{{
|
||||||
CombatData: combatData,
|
CombatData: combatData,
|
||||||
ForwardType: proto.ForwardType_FORWARD_TO_ALL_EXCEPT_CUR,
|
ForwardType: proto.ForwardType_FORWARD_TO_ALL_EXCEPT_CUR,
|
||||||
ArgumentType: proto.CombatTypeArgument_ENTITY_MOVE,
|
ArgumentType: proto.CombatTypeArgument_ENTITY_MOVE,
|
||||||
}},
|
}},
|
||||||
})
|
}
|
||||||
|
body, err := pb.Marshal(combatInvocationsNotify)
|
||||||
|
if err != nil {
|
||||||
|
logger.Error("marshal CombatInvocationsNotify error: %v, account: %v", err, account)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
unionCmdNotify := &proto.UnionCmdNotify{
|
||||||
|
CmdList: []*proto.UnionCmd{{
|
||||||
|
Body: body,
|
||||||
|
MessageId: cmd.CombatInvocationsNotify,
|
||||||
|
}},
|
||||||
|
}
|
||||||
|
session.SendMsg(cmd.UnionCmdNotify, unionCmdNotify)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if tickCounter%5 != 0 {
|
if tickCounter%5 != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user