Exemple #1
0
 public void CopyFrom(BattleNet.DllPresenceUpdate update)
 {
     this.entityId    = update.entityId;
     this.programId   = update.programId;
     this.groupId     = update.groupId;
     this.fieldId     = update.fieldId;
     this.index       = update.index;
     this.boolVal     = update.boolVal;
     this.intVal      = update.intVal;
     this.stringVal   = MemUtils.StringFromUtf8Ptr(update.stringVal);
     this.entityIdVal = update.entityIdVal;
     this.blobVal     = MemUtils.PtrToBytes(update.blobVal, update.blobValSize);
     this.valCleared  = update.valCleared;
 }
Exemple #2
0
    public static BnetNotification CreateFromDll(BattleNet.DllNotification src)
    {
        BnetNotification notification = new BnetNotification {
            NotificationType = MemUtils.StringFromUtf8Ptr(src.notificationType),
            MessageType      = src.messageId,
            MessageSize      = src.blobSize,
            BlobMessage      = MemUtils.PtrToBytes(src.blobMessage, src.blobSize)
        };

        if (notification.BlobMessage == null)
        {
            notification.BlobMessage = new byte[0];
        }
        return(notification);
    }