//--------------------------------------------------------
|
// [Author]: 玩个游戏
|
// [ Date ]: Monday, July 31, 2017
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
|
|
public struct Item
|
{
|
public int id;
|
public int count; //兼容旧代码保留
|
public ulong countEx; //兼容旧代码count,当数量超过了32位无法表示时使用
|
public int quality;
|
public int bind;
|
|
public Item(int _id, ulong _count)
|
{
|
this.id = _id;
|
this.count = (int)_count;
|
this.quality = 0;
|
this.bind = 0;
|
this.countEx = _count;
|
}
|
|
public Item(int _id, ulong _count, int _quality)
|
{
|
this.id = _id;
|
this.count = (int)_count;
|
this.quality = _quality;
|
this.bind = 0;
|
this.countEx = _count;
|
}
|
|
public Item(int _id, ulong _count, int _bind = 0, int _quality = 0)
|
{
|
this.id = _id;
|
this.count = (int)_count;
|
this.quality = _quality;
|
this.bind = _bind;
|
this.countEx = _count;
|
}
|
|
#region 旧代码兼容 显示无法超过32位
|
|
public Item(int _id, int _count)
|
{
|
this.id = _id;
|
this.count = _count;
|
this.quality = 0;
|
this.bind = 0;
|
this.countEx = (ulong)_count;
|
}
|
|
public Item(int _id, int _count, int _quality)
|
{
|
this.id = _id;
|
this.count = _count;
|
this.quality = _quality;
|
this.bind = 0;
|
this.countEx = (ulong)_count;
|
}
|
|
|
public Item(int _id, int _count, int _bind = 0, int _quality = 0)
|
{
|
this.id = _id;
|
this.count = _count;
|
this.quality = _quality;
|
this.bind = _bind;
|
this.countEx = (ulong)_count;
|
}
|
#endregion
|
}
|