567 lines
20 KiB
C#
567 lines
20 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BrewMonster.Scripts.Task;
|
|
|
|
namespace PerfectWorld.Scripts.Task
|
|
{
|
|
[Serializable]
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
public struct AWARD_DATA
|
|
{
|
|
/*/
|
|
public AWARD_DATA(bool initialize = true)
|
|
{
|
|
m_ulGoldNum = 0;
|
|
m_ulExp = 0;
|
|
m_ulRealmExp = 0;
|
|
m_bExpandRealmLevelMax = false;
|
|
m_ulNewTask = 0;
|
|
m_ulSP = 0;
|
|
m_lReputation = 0;
|
|
m_ulNewPeriod = 0;
|
|
m_ulNewRelayStation = 0;
|
|
m_ulStorehouseSize = 0;
|
|
m_ulStorehouseSize2 = 0;
|
|
m_ulStorehouseSize3 = 0;
|
|
m_ulStorehouseSize4 = 0;
|
|
m_lInventorySize = 0;
|
|
m_ulPetInventorySize = 0;
|
|
m_ulFuryULimit = 0;
|
|
m_ulTransWldId = 0;
|
|
m_TransPt = new ZONE_VERT();
|
|
m_lMonsCtrl = 0;
|
|
m_bTrigCtrl = false;
|
|
m_bUseLevCo = false;
|
|
m_bDivorce = false;
|
|
m_bSendMsg = false;
|
|
m_nMsgChannel = 0;
|
|
m_ulCandItems = 0;
|
|
m_CandItems = null;
|
|
m_ulSummonedMonsters = 0;
|
|
m_SummonedMonsters = new AWARD_MONSTERS_SUMMONED();
|
|
m_bAwardDeath = false;
|
|
m_bAwardDeathWithLoss = false;
|
|
m_ulDividend = 0;
|
|
m_bAwardSkill = false;
|
|
m_iAwardSkillID = 0;
|
|
m_iAwardSkillLevel = 0;
|
|
m_ulSpecifyContribTaskID = 0;
|
|
m_ulSpecifyContribSubTaskID = 0;
|
|
m_ulSpecifyContrib = 0;
|
|
m_ulContrib = 0;
|
|
m_ulRandContrib = 0;
|
|
m_ulLowestcontrib = 0;
|
|
m_iFactionContrib = 0;
|
|
m_iFactionExpContrib = 0;
|
|
m_ulPQRankingAwardCnt = 0;
|
|
m_PQRankingAward = new AWARD_PQ_RANKING();
|
|
m_bMulti = false;
|
|
m_nNumType = 0;
|
|
m_lNum = 0;
|
|
m_ulChangeKeyCnt = 0;
|
|
m_plChangeKey = null;
|
|
m_plChangeKeyValue = null;
|
|
m_pbChangeType = null;
|
|
m_ulHistoryChangeCnt = 0;
|
|
m_plHistoryChangeKey = null;
|
|
m_plHistoryChangeKeyValue = null;
|
|
m_pbHistoryChangeType = null;
|
|
m_ulDisplayKeyCnt = 0;
|
|
m_plDisplayKey = null;
|
|
m_ulExpCnt = 0;
|
|
m_pszExp = null;
|
|
m_pExpArr = null;
|
|
m_ulTaskCharCnt = 0;
|
|
m_pTaskChar = null;
|
|
m_iForceContribution = 0;
|
|
m_iForceReputation = 0;
|
|
m_iForceActivity = 0;
|
|
m_iForceSetRepu = 0;
|
|
m_iTaskLimit = 0;
|
|
m_ulTitleNum = 0;
|
|
m_pTitleAward = null;
|
|
m_iLeaderShip = 0;
|
|
m_iWorldContribution = 0;
|
|
|
|
#if TASK_TEMPL_EDITOR
|
|
m_CandItems = new AWARD_ITEMS_CAND[TaskTemplConstants.MAX_AWARD_CANDIDATES];
|
|
|
|
m_SummonedMonsters = new AWARD_MONSTERS_SUMMONED();
|
|
|
|
m_PQRankingAward = new AWARD_PQ_RANKING();
|
|
|
|
m_pTitleAward = new TITLE_AWARD[TaskTemplConstants.MAX_TITLE_NUM];
|
|
#endif
|
|
}
|
|
//*/
|
|
|
|
public uint m_ulGoldNum;
|
|
public uint m_ulExp;
|
|
public uint m_ulRealmExp; // 境界经验 // Realm experience
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bExpandRealmLevelMax; // 境界等级10整级时提升境界等级上限 // Increase realm level upper limit when realm level is at level 10
|
|
public uint m_ulNewTask;
|
|
public uint m_ulSP;
|
|
public int m_lReputation;
|
|
public uint m_ulNewPeriod;
|
|
public uint m_ulNewRelayStation;
|
|
public uint m_ulStorehouseSize;
|
|
public uint m_ulStorehouseSize2;
|
|
public uint m_ulStorehouseSize3;
|
|
public uint m_ulStorehouseSize4; // 账号仓库 // Account warehouse
|
|
public int m_lInventorySize;
|
|
public uint m_ulPetInventorySize;
|
|
public uint m_ulFuryULimit;
|
|
public uint m_ulTransWldId;
|
|
public ZONE_VERT m_TransPt;
|
|
public int m_lMonsCtrl;
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bTrigCtrl;
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bUseLevCo;
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bDivorce;
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bSendMsg;
|
|
public int m_nMsgChannel;
|
|
public uint m_ulCandItems;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0)]
|
|
public AWARD_ITEMS_CAND[] m_CandItems; //[MAX_AWARD_CANDIDATES];
|
|
public uint m_CandItems_ptr;
|
|
public uint m_ulSummonedMonsters;
|
|
[MarshalAs(UnmanagedType.SysInt)]
|
|
public AWARD_MONSTERS_SUMMONED m_SummonedMonsters;
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bAwardDeath;
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bAwardDeathWithLoss;
|
|
public uint m_ulDividend; // 鸿利值 // Dividend value
|
|
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bAwardSkill; // 是否奖励技能 // Whether to reward skill [Yongdong, 2010-1-6]
|
|
public int m_iAwardSkillID; // 技能ID // Skill ID
|
|
public int m_iAwardSkillLevel;// 技能等级 // Skill level
|
|
|
|
//////////////////////////////////////////////////// PQ任务奖励 start // PQ task reward start
|
|
|
|
public uint m_ulSpecifyContribTaskID; // 指定任务贡献度的任务id // Task ID for specified contribution
|
|
public uint m_ulSpecifyContribSubTaskID; // 指定任务贡献度的子任务ID // Subtask ID for specified contribution
|
|
public uint m_ulSpecifyContrib; // 指定任务贡献度 // Specified task contribution
|
|
|
|
// 仅PQ子任务专用 // Only for PQ subtasks
|
|
public uint m_ulContrib; // 贡献度 // Contribution
|
|
public uint m_ulRandContrib; // 随机贡献度 // Random contribution
|
|
public uint m_ulLowestcontrib; // 最低贡献度 // Minimum contribution
|
|
|
|
// 帮派贡献度 // Faction contribution
|
|
public int m_iFactionContrib;
|
|
public int m_iFactionExpContrib;
|
|
|
|
public uint m_ulPQRankingAwardCnt;
|
|
[MarshalAs(UnmanagedType.SysInt)]
|
|
public AWARD_PQ_RANKING m_PQRankingAward;
|
|
|
|
//////////////////////////////////////////////////// PQ任务奖励 end // PQ task reward end
|
|
|
|
// 改变全局key/value // Change global key/value
|
|
public uint m_ulChangeKeyCnt;
|
|
// [MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.TASK_AWARD_MAX_CHANGE_VALUE)]
|
|
[NonSerialized]
|
|
public int[] m_plChangeKey;
|
|
public uint m_plChangeKey_ptr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
// [NonSerialized]
|
|
public int[] m_plChangeKeyValue;
|
|
public uint m_plChangeKeyValue_ptr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
// [NonSerialized]
|
|
public bool[] m_pbChangeType;
|
|
public uint m_pbChangeType_ptr;
|
|
|
|
// 修改历史进度 // Modify historical progress
|
|
public uint m_ulHistoryChangeCnt;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
public int[] m_plHistoryChangeKey;
|
|
public uint m_plHistoryChangeKey_ptr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
public int[] m_plHistoryChangeKeyValue;
|
|
public uint m_plHistoryChangeKeyValue_ptr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
public bool[] m_pbHistoryChangeType;
|
|
public uint m_pbHistoryChangeType_ptr;
|
|
|
|
// 倍率 // Multiplier
|
|
[MarshalAs(UnmanagedType.U1)]
|
|
public bool m_bMulti;
|
|
public int m_nNumType;
|
|
public int m_lNum;
|
|
|
|
// 显示全局key/value // Display global key/value
|
|
public uint m_ulDisplayKeyCnt;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
public int[] m_plDisplayKey;
|
|
public uint m_plDisplayKey_ptr;
|
|
|
|
// 显示全局变量表达式 // Display global variable expressions
|
|
public uint m_ulExpCnt;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
public byte[] m_pszExp;
|
|
public byte m_pszExp_ptr;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0)]
|
|
public TASK_EXPRESSION[] m_pExpArr;
|
|
public uint m_pExpArr_ptr;
|
|
|
|
// 显示全局变量表达式提示字符串 // Display global variable expression prompt strings
|
|
public uint m_ulTaskCharCnt;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
|
public ushort[] m_pTaskChar;
|
|
public ushort m_pTaskChar_ptr;
|
|
|
|
// 势力相关 // Force-related
|
|
public int m_iForceContribution;
|
|
public int m_iForceReputation;
|
|
public int m_iForceActivity;
|
|
public int m_iForceSetRepu;
|
|
|
|
public int m_iTaskLimit;
|
|
public uint m_ulTitleNum;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0)]
|
|
public TITLE_AWARD[] m_pTitleAward;
|
|
public uint m_pTitleAward_ptr;
|
|
public int m_iLeaderShip;
|
|
|
|
public int m_iWorldContribution; // 世界贡献度 // World contribution
|
|
|
|
public bool HasAward()
|
|
{
|
|
return m_ulGoldNum != 0
|
|
|| m_ulExp != 0
|
|
|| m_ulNewTask != 0
|
|
|| m_ulSP != 0
|
|
|| m_lReputation != 0
|
|
|| m_ulNewPeriod != 0
|
|
|| m_ulNewRelayStation != 0
|
|
|| m_ulStorehouseSize != 0
|
|
|| m_ulStorehouseSize2 != 0
|
|
|| m_ulStorehouseSize3 != 0
|
|
|| m_ulStorehouseSize4 != 0
|
|
|| m_lInventorySize != 0
|
|
|| m_ulPetInventorySize != 0
|
|
|| m_ulFuryULimit != 0
|
|
|| m_bDivorce
|
|
|| m_bSendMsg
|
|
|| m_bAwardDeath
|
|
|| m_ulCandItems != 0
|
|
|| m_ulSummonedMonsters != 0
|
|
|| m_ulSpecifyContrib != 0
|
|
|| m_ulSpecifyContribTaskID != 0
|
|
|| m_ulContrib != 0
|
|
|| m_ulRandContrib != 0
|
|
|| m_ulDividend != 0
|
|
|| m_ulPQRankingAwardCnt != 0
|
|
|| m_ulSpecifyContribSubTaskID != 0
|
|
|| m_bAwardSkill
|
|
|| m_iFactionContrib != 0
|
|
|| m_iFactionExpContrib != 0
|
|
|| m_iForceActivity != 0
|
|
|| m_iForceContribution != 0
|
|
|| m_iForceReputation != 0
|
|
|| m_iForceSetRepu != 0
|
|
|| m_iTaskLimit != 0
|
|
|| m_ulRealmExp != 0
|
|
|| m_bExpandRealmLevelMax;
|
|
}
|
|
|
|
public int MarshalBasicData(byte[] pData)
|
|
{
|
|
int offset = 0;
|
|
|
|
int mask = 0;
|
|
BitConverter.GetBytes(mask).CopyTo(pData, offset);
|
|
offset += 4;
|
|
|
|
if (m_ulGoldNum != 0)
|
|
{
|
|
mask |= 1;
|
|
BitConverter.GetBytes((int)m_ulGoldNum).CopyTo(pData, offset);
|
|
offset += sizeof(int);
|
|
}
|
|
|
|
if (m_ulExp != 0)
|
|
{
|
|
mask |= 1 << 1;
|
|
BitConverter.GetBytes((int)m_ulExp).CopyTo(pData, offset);
|
|
offset += sizeof(int);
|
|
}
|
|
|
|
if (m_ulSP != 0)
|
|
{
|
|
mask |= 1 << 2;
|
|
BitConverter.GetBytes((int)m_ulSP).CopyTo(pData, offset);
|
|
offset += sizeof(int);
|
|
}
|
|
|
|
if (m_lReputation != 0)
|
|
{
|
|
mask |= 1 << 3;
|
|
BitConverter.GetBytes(m_lReputation).CopyTo(pData, offset);
|
|
offset += sizeof(int);
|
|
}
|
|
|
|
if (m_ulCandItems != 0)
|
|
{
|
|
mask |= 1 << 4;
|
|
|
|
pData[offset] = (byte)m_ulCandItems;
|
|
offset++;
|
|
|
|
for (int i = 0; i < m_ulCandItems; i++)
|
|
{
|
|
offset += m_CandItems[i].MarshalBasicData(pData.AsSpan(offset).ToArray());
|
|
}
|
|
}
|
|
|
|
if (m_ulSummonedMonsters != 0)
|
|
{
|
|
mask |= 1 << 5;
|
|
|
|
pData[offset] = (byte)m_ulSummonedMonsters;
|
|
offset++;
|
|
|
|
offset += m_SummonedMonsters.MarshalBasicData(pData.AsSpan(offset).ToArray());
|
|
}
|
|
|
|
if (m_ulPQRankingAwardCnt != 0)
|
|
{
|
|
mask |= 1 << 6;
|
|
|
|
pData[offset] = (byte)m_ulPQRankingAwardCnt;
|
|
offset++;
|
|
|
|
offset += m_PQRankingAward.MarshalBasicData(pData.AsSpan(offset).ToArray());
|
|
}
|
|
|
|
// Update the mask
|
|
BitConverter.GetBytes(mask).CopyTo(pData, 0);
|
|
|
|
return offset;
|
|
}
|
|
|
|
public int UnmarshalBasicData(byte[] pData)
|
|
{
|
|
int offset = 0;
|
|
|
|
int mask = BitConverter.ToInt32(pData, offset);
|
|
offset += sizeof(int);
|
|
|
|
if ((mask & 1) != 0)
|
|
{
|
|
m_ulGoldNum = (uint)BitConverter.ToInt32(pData, offset);
|
|
offset += 4;
|
|
}
|
|
|
|
if ((mask & (1 << 1)) != 0)
|
|
{
|
|
m_ulExp = (uint)BitConverter.ToInt32(pData, offset);
|
|
offset += 4;
|
|
}
|
|
|
|
if ((mask & (1 << 2)) != 0)
|
|
{
|
|
m_ulSP = (uint)BitConverter.ToInt32(pData, offset);
|
|
offset += 4;
|
|
}
|
|
|
|
if ((mask & (1 << 3)) != 0)
|
|
{
|
|
m_lReputation = BitConverter.ToInt32(pData, offset);
|
|
offset += 4;
|
|
}
|
|
|
|
if ((mask & (1 << 4)) != 0)
|
|
{
|
|
m_ulCandItems = pData[offset];
|
|
offset++;
|
|
|
|
if (m_ulCandItems != 0)
|
|
{
|
|
#if !TASK_TEMPL_EDITOR
|
|
m_CandItems = new AWARD_ITEMS_CAND[m_ulCandItems];
|
|
#endif
|
|
|
|
for (uint i = 0; i < m_ulCandItems; i++)
|
|
{
|
|
offset += m_CandItems[i].UnmarshalBasicData(pData.AsSpan(offset).ToArray());
|
|
}
|
|
}
|
|
}
|
|
|
|
if ((mask & (1 << 5)) != 0)
|
|
{
|
|
m_ulSummonedMonsters = pData[offset];
|
|
offset++;
|
|
|
|
if (m_ulSummonedMonsters != 0)
|
|
{
|
|
#if !TASK_TEMPL_EDITOR
|
|
m_SummonedMonsters = new AWARD_MONSTERS_SUMMONED();
|
|
#endif
|
|
|
|
offset += m_SummonedMonsters.UnmarshalBasicData(pData.AsSpan(offset).ToArray());
|
|
}
|
|
}
|
|
|
|
if ((mask & (1 << 6)) != 0)
|
|
{
|
|
m_ulPQRankingAwardCnt = pData[offset];
|
|
offset++;
|
|
|
|
if (m_ulPQRankingAwardCnt != 0)
|
|
{
|
|
#if !TASK_TEMPL_EDITOR
|
|
m_PQRankingAward = new AWARD_PQ_RANKING();
|
|
#endif
|
|
|
|
offset += m_PQRankingAward.UnmarshalBasicData(pData.AsSpan(offset).ToArray());
|
|
}
|
|
}
|
|
|
|
return offset;
|
|
}
|
|
|
|
public static bool CompareTwoPointer<T>(T p1, T p2) where T : class
|
|
{
|
|
if (p1 == null && p2 == null)
|
|
{
|
|
return true;
|
|
}
|
|
else if (p1 != null && p2 != null)
|
|
{
|
|
return p1.Equals(p2);
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
public static bool operator ==(AWARD_DATA a, AWARD_DATA b)
|
|
{
|
|
if (a.m_ulCandItems != b.m_ulCandItems || a.m_ulSummonedMonsters != b.m_ulSummonedMonsters ||
|
|
a.m_ulChangeKeyCnt != b.m_ulChangeKeyCnt || a.m_ulDisplayKeyCnt != b.m_ulDisplayKeyCnt ||
|
|
a.m_ulExpCnt != b.m_ulExpCnt || a.m_ulTaskCharCnt != b.m_ulTaskCharCnt ||
|
|
a.m_ulHistoryChangeCnt != b.m_ulHistoryChangeCnt)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
for (uint i = 0; i < a.m_ulCandItems; ++i)
|
|
{
|
|
if (!(a.m_CandItems[i] == b.m_CandItems[i]))
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (!TaskTemplUtils.CompareTwoPointer(a.m_SummonedMonsters, b.m_SummonedMonsters))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
for (uint i = 0; i < a.m_ulChangeKeyCnt; ++i)
|
|
{
|
|
if (a.m_plChangeKey[i] != b.m_plChangeKey[i] ||
|
|
a.m_plChangeKeyValue[i] != b.m_plChangeKeyValue[i] ||
|
|
a.m_pbChangeType[i] != b.m_pbChangeType[i])
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
for (uint i = 0; i < a.m_ulHistoryChangeCnt; ++i)
|
|
{
|
|
if (a.m_plHistoryChangeKey[i] != b.m_plHistoryChangeKey[i] ||
|
|
a.m_plHistoryChangeKeyValue[i] != b.m_plHistoryChangeKeyValue[i] ||
|
|
a.m_pbHistoryChangeType[i] != b.m_pbHistoryChangeType[i])
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
for (uint i = 0; i < a.m_ulDisplayKeyCnt; ++i)
|
|
{
|
|
if (a.m_plDisplayKey[i] != b.m_plDisplayKey[i])
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
if (!TaskTemplUtils.CompareTwoPointer(a.m_PQRankingAward, b.m_PQRankingAward))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return (a.m_ulGoldNum == b.m_ulGoldNum &&
|
|
a.m_ulExp == b.m_ulExp &&
|
|
a.m_ulNewTask == b.m_ulNewTask &&
|
|
a.m_ulSP == b.m_ulSP &&
|
|
a.m_lReputation == b.m_lReputation &&
|
|
a.m_ulNewPeriod == b.m_ulNewPeriod &&
|
|
a.m_ulNewRelayStation == b.m_ulNewRelayStation &&
|
|
a.m_ulStorehouseSize == b.m_ulStorehouseSize &&
|
|
a.m_ulStorehouseSize2 == b.m_ulStorehouseSize2 &&
|
|
a.m_ulStorehouseSize3 == b.m_ulStorehouseSize3 &&
|
|
a.m_ulStorehouseSize4 == b.m_ulStorehouseSize4 &&
|
|
a.m_lInventorySize == b.m_lInventorySize &&
|
|
a.m_ulPetInventorySize == b.m_ulPetInventorySize &&
|
|
a.m_ulFuryULimit == b.m_ulFuryULimit &&
|
|
a.m_ulTransWldId == b.m_ulTransWldId &&
|
|
a.m_TransPt.Equals(b.m_TransPt) &&
|
|
a.m_lMonsCtrl == b.m_lMonsCtrl &&
|
|
a.m_bTrigCtrl == b.m_bTrigCtrl &&
|
|
a.m_bUseLevCo == b.m_bUseLevCo &&
|
|
a.m_bDivorce == b.m_bDivorce &&
|
|
a.m_bSendMsg == b.m_bSendMsg &&
|
|
a.m_nMsgChannel == b.m_nMsgChannel &&
|
|
a.m_bAwardDeath == b.m_bAwardDeath &&
|
|
a.m_bAwardDeathWithLoss == b.m_bAwardDeathWithLoss &&
|
|
a.m_ulDividend == b.m_ulDividend &&
|
|
a.m_bAwardSkill == b.m_bAwardSkill &&
|
|
a.m_iAwardSkillID == b.m_iAwardSkillID &&
|
|
a.m_iAwardSkillLevel == b.m_iAwardSkillLevel &&
|
|
a.m_ulSpecifyContribTaskID == b.m_ulSpecifyContribTaskID &&
|
|
a.m_ulSpecifyContribSubTaskID == b.m_ulSpecifyContribSubTaskID &&
|
|
a.m_ulSpecifyContrib == b.m_ulSpecifyContrib &&
|
|
a.m_ulContrib == b.m_ulContrib &&
|
|
a.m_ulRandContrib == b.m_ulRandContrib &&
|
|
a.m_ulLowestcontrib == b.m_ulLowestcontrib &&
|
|
a.m_iFactionContrib == b.m_iFactionContrib &&
|
|
a.m_iFactionExpContrib == b.m_iFactionExpContrib &&
|
|
a.m_ulPQRankingAwardCnt == b.m_ulPQRankingAwardCnt &&
|
|
a.m_bMulti == b.m_bMulti &&
|
|
a.m_nNumType == b.m_nNumType &&
|
|
a.m_lNum == b.m_lNum
|
|
);
|
|
}
|
|
|
|
public static bool operator !=(AWARD_DATA a, AWARD_DATA b)
|
|
{
|
|
return !(a == b);
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj is AWARD_DATA)
|
|
{
|
|
return this == (AWARD_DATA)obj;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return m_ulGoldNum.GetHashCode() ^
|
|
m_ulExp.GetHashCode() ^
|
|
m_lReputation.GetHashCode() ^
|
|
m_ulSP.GetHashCode();
|
|
}
|
|
}
|
|
} |