// ------------------------------------------------------ // // RECEIVE // ------------------------------------------------------ // func (c *Connection) ReceivePlayerWalk(_packet *pnet.Packet) { msg := pnetmsg.NewWalkMessage(c.Owner) msg.ReadPacket(_packet) g_game.OnPlayerMove(msg.Creature, msg.Direction, msg.SendMap) }
func (c *Connection) SendCreatureMove(_creature pul.ICreature, _from *Tile, _to *Tile) { msg := pnetmsg.NewWalkMessage(_creature) msg.AddPositions(_from.Position, _to.Position) c.SendMessage(msg) }