Exemple #1
0
        protected virtual void HandleServerSetObjectOwner(LiteNetLibMessageHandler messageHandler)
        {
            ServerSetObjectOwner message = messageHandler.ReadMessage <ServerSetObjectOwner>();

            if (!IsServer)
            {
                Assets.SetObjectOwner(message.objectId, message.connectionId);
            }
        }
Exemple #2
0
        public void SendServerSetObjectOwner(long connectionId, uint objectId, long ownerConnectionId)
        {
            if (!IsServer)
            {
                return;
            }
            ServerSetObjectOwner message = new ServerSetObjectOwner();

            message.objectId     = objectId;
            message.connectionId = ownerConnectionId;
            ServerSendPacket(connectionId, DeliveryMethod.ReliableOrdered, GameMsgTypes.ServerSetObjectOwner, message);
        }