blob: f5de4284e00b95978cd1a56979286e549574a6a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
using System;
using KKSG;
using UnityEngine;
using XUtliPoolLib;
namespace XMainClient
{
internal class XGuildRedPackageSendBrief : IComparable<XGuildRedPackageSendBrief>
{
public uint typeID;
public ulong uid;
public uint itemid;
public string senderName;
public uint fetchedCount;
public uint maxCount;
public float endTime;
public BonusSender senderType;
public GuildBonusTable.RowData bonusInfo;
public void SendData(GuildBonusAppear data)
{
this.typeID = data.bonusContentType;
this.uid = (ulong)data.bonusID;
this.itemid = data.bonusType;
this.senderName = data.sourceName;
this.fetchedCount = data.alreadyGetPeopleNum;
this.maxCount = data.maxPeopleNum;
this.endTime = Time.time + data.leftOpenTime;
this.bonusInfo = XGuildRedPacketDocument.GetRedPacketConfig(this.typeID);
this.senderType = ((XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID == data.sourceID) ? BonusSender.Bonus_Self : BonusSender.Bonus_Other);
}
public int CompareTo(XGuildRedPackageSendBrief other)
{
bool flag = this.senderType == other.senderType;
int result;
if (flag)
{
result = this.endTime.CompareTo(other.endTime);
}
else
{
result = this.senderType.CompareTo(other.senderType);
}
return result;
}
}
}
|