Exemple #1
0
    void NotificaPlayerPut(ulong playerId, ulong lastOperationId, MsgActionType type, bool isYbq)
    {
        ArgsPlayerPut args = new ArgsPlayerPut();

        args.playerId        = playerId;
        args.lastOperationId = lastOperationId;
        args.type            = type;
        args.isYbq           = isYbq;
        NotificationCenter.Instance().PostDispatchEvent((uint)ENotificationMsgType.EPlayerPlayingStatus, args);
    }
Exemple #2
0
        public static byte[] Create2(YiObj player, int param, MsgActionType type)
        {
            MsgAction *msgP = stackalloc MsgAction[1];

            msgP->Size      = (ushort)sizeof(MsgAction);
            msgP->Id        = 1010;
            msgP->Timestamp = Environment.TickCount;
            msgP->UniqueId  = player.UniqueId;
            msgP->Param     = param;
            msgP->Type      = type;
            var buffer = BufferPool.GetBuffer();

            Marshal.Copy((IntPtr)msgP, buffer, 0, sizeof(MsgAction));
            return(buffer);
        }
Exemple #3
0
        public static byte[] Create(int timestamp, int uniqueId, int param, ushort x, ushort y, ushort direction, MsgActionType type)
        {
            MsgAction *msgP = stackalloc MsgAction[1];

            msgP->Size      = (ushort)sizeof(MsgAction);
            msgP->Id        = 1010;
            msgP->Timestamp = timestamp;
            msgP->UniqueId  = uniqueId;
            msgP->Param     = param;
            msgP->X         = x;
            msgP->Y         = y;
            msgP->Direction = direction;
            msgP->Type      = type;

            var buffer = BufferPool.GetBuffer();

            Marshal.Copy((IntPtr)msgP, buffer, 0, sizeof(MsgAction));
            return(buffer);
        }