summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XRoleAttributes.cs
blob: 7327a8b0d036c1d9aeee0d17eab87971ba975f5c (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using System;
using System.Collections.Generic;
using KKSG;
using XUtliPoolLib;

namespace XMainClient
{
	internal class XRoleAttributes : XAttributes
	{
		public override uint ID
		{
			get
			{
				return XRoleAttributes.uuID;
			}
		}

		public RoleType Profession
		{
			get
			{
				return this._profession;
			}
			set
			{
				this._profession = value;
				bool flag = XAttributes.IsPlayer(base.RoleID);
				if (flag)
				{
					XFileLog.RoleProf = XFastEnumIntEqualityComparer<RoleType>.ToInt(this._profession);
				}
			}
		}

		public string GuildName { get; set; }

		public ulong GuildID { get; set; }

		public uint DesignationID { get; set; }

		public string SpecialDesignation { get; set; }

		public List<uint> PrerogativeSetID { get; set; }

		public uint PrerogativeScore { get; set; }

		public uint MilitaryRank { get; set; }

		public uint GuildPortrait { get; set; }

		public override uint TypeID
		{
			get
			{
				return (uint)XFastEnumIntEqualityComparer<RoleType>.ToInt(this.Profession);
			}
		}

		public override uint BasicTypeID
		{
			get
			{
				return this.TypeID % 10u;
			}
		}

		public override uint Tag
		{
			get
			{
				return EntityMask.Role;
			}
		}

		public bool IsLocalFake
		{
			get
			{
				return this._isLocalFake;
			}
			set
			{
				this._isLocalFake = value;
			}
		}

		public new static readonly uint uuID = XSingleton<XCommon>.singleton.XHash("Role_Attributes");

		private RoleType _profession = RoleType.Role_INVALID;

		private bool _isLocalFake = false;

		public XRoleAttributes()
		{
			this._battle_Statistics = default(XBattleStatistics);
		}

		public override bool IsBindedSkill(uint id)
		{
			for (int i = 0; i < this.skillSlot.Length; i++)
			{
				bool flag = this.skillSlot[i] == id;
				if (flag)
				{
					return true;
				}
			}
			return false;
		}

		public override void InitAttribute(KKSG.Attribute attr)
		{
			this.SkillLevelInfo.SetDefaultLevel(0u);
			base.InitAttribute(attr);
		}
	}
}