194 lines
3.0 KiB
C#
194 lines
3.0 KiB
C#
// ***********************************************************************
|
||
// Assembly : Unity
|
||
// Author : Kimch
|
||
// Created :
|
||
//
|
||
// Last Modified By : Kimch
|
||
// Last Modified On :
|
||
// ***********************************************************************
|
||
// <copyright file= "Mail" company=""></copyright>
|
||
// <summary></summary>
|
||
// ***********************************************************************
|
||
using CodeStage.AntiCheat.ObscuredTypes;
|
||
using System.Collections;
|
||
using UnityEngine;
|
||
|
||
namespace G
|
||
{
|
||
/// <summary>
|
||
/// 邮件类型
|
||
/// </summary>
|
||
public enum MailType
|
||
{
|
||
/// <summary>
|
||
/// 系统邮件
|
||
/// </summary>
|
||
kSystem = 1,
|
||
}
|
||
|
||
/// <summary>
|
||
/// 邮件
|
||
/// </summary>
|
||
public class Mail
|
||
{
|
||
#region FIELD
|
||
|
||
/// <summary>
|
||
/// 邮件发送时间
|
||
/// </summary>
|
||
private int _sendTimestamp;
|
||
|
||
/// <summary>
|
||
/// 邮件剩余时间
|
||
/// </summary>
|
||
private int _remainTimestamp;
|
||
|
||
private ObscuredInt _multiple;
|
||
|
||
#endregion
|
||
|
||
#region PROPERTY
|
||
|
||
/// <summary>Gets the identifier.id</summary>
|
||
public int id
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
public int itemId
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
public string mailKey
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>Gets the type.邮件类型:1.普通邮件;2.求助;</summary>
|
||
public int mailType
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>Gets the avatar.邮件头像.系统默认头像.</summary>
|
||
public string headURL
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>Gets the title.邮件标题.</summary>
|
||
public string title
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>Gets the content.邮件内容.</summary>
|
||
public string content
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
public int senderId
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
/// <summary>Gets the sender.邮件发送人.</summary>
|
||
public string sender
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>Gets the give items.</summary>
|
||
public Item.ItemInfo[] giveItems
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>Gets the status.0:未打开,1:已打开,2:已操作</summary>
|
||
public int status
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
public int startTimestamp
|
||
{
|
||
get { return _sendTimestamp; }
|
||
set { _sendTimestamp = value; }
|
||
}
|
||
|
||
/// <summary>Gets the send time.邮件发送时间.显示秒数</summary>
|
||
public int sendTime
|
||
{
|
||
get { return Launch.Timestamp - _sendTimestamp; }
|
||
}
|
||
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public int endTimestamp
|
||
{
|
||
get { return _remainTimestamp; }
|
||
set { _remainTimestamp = value; }
|
||
}
|
||
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
public int remainTime
|
||
{
|
||
get { return _remainTimestamp - Launch.Timestamp; }
|
||
set { _remainTimestamp = Launch.Timestamp + value; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 倍数
|
||
/// </summary>
|
||
public int multiple
|
||
{
|
||
get { return _multiple; }
|
||
set { _multiple = value; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 本地邮件
|
||
/// </summary>
|
||
public bool isLocal
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 永久邮件
|
||
/// </summary>
|
||
public bool isForever
|
||
{
|
||
get;
|
||
set;
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region Method
|
||
|
||
public void ChangeStatus(int newstatus)
|
||
{
|
||
this.status = newstatus;
|
||
}
|
||
|
||
#endregion
|
||
}
|
||
}
|