summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XOthersAttributes.cs
blob: 73c7336b8f98da60e48559d825186db82c8a3dc2 (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
using System;
using XUtliPoolLib;

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

		public float NormalAttackProb { get; set; }

		public float EnterFightRange { get; set; }

		public float FloatingMax { get; set; }

		public float FloatingMin { get; set; }

		public float AIStartTime { get; set; }

		public float AIActionGap { get; set; }

		public bool Blocked { get; set; }

		public bool IsWander { get; set; }

		public bool IsFixedInCD { get; set; }

		public bool Outline { get; set; }

		public int UseMyMesh { get; set; }

		public int SummonGroup { get; set; }

		public bool EndShow { get; set; }

		public bool GeneralCutScene { get; set; }

		public bool SameBillBoardByMaster { get; set; }

		public uint Fov { get; set; }

		public uint FashionTemplate { get; set; }

		public short LinkCombo { get; set; }

		public override uint Tag
		{
			get
			{
				return this.m_Tag;
			}
		}

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

		private uint m_Tag;

		public XOthersAttributes()
		{
			this._security_Statistics = new XSecurityStatistics();
		}

		public override void InitAttribute(XEntityStatistics.RowData data)
		{
			base.InitAttribute(data);
			this.Init(data);
		}

		private void Init(XEntityStatistics.RowData data)
		{
			this.NormalAttackProb = data.AttackProb;
			this.EnterFightRange = data.Sight;
			this.IsWander = data.IsWander;
			this.Blocked = data.Block;
			base.BeLocked = data.BeLocked;
			this.AIStartTime = data.AIStartTime;
			this.AIActionGap = data.AIActionGap;
			this.IsFixedInCD = data.IsFixedInCD;
			this.Outline = data.Highlight;
			this.UseMyMesh = (int)data.UseMyMesh;
			this.FloatingMin = ((data.FloatHeight != null && data.FloatHeight.Length != 0) ? data.FloatHeight[0] : 0f);
			this.FloatingMax = ((data.FloatHeight != null && data.FloatHeight.Length != 0) ? data.FloatHeight[1] : 0f);
			this.EndShow = data.EndShow;
			base.SoloShow = data.SoloShow;
			this.GeneralCutScene = data.UsingGeneralCutscene;
			this.SameBillBoardByMaster = data.SameBillBoard;
			this.FashionTemplate = (uint)data.FashionTemplate;
			this.Fov = (uint)data.Fov;
			this.SummonGroup = (int)data.SummonGroup;
			this.LinkCombo = data.LinkCombo;
			this._inborn_buff = data.InBornBuff;
			this._CreateTag(data);
		}

		private void _CreateTag(XEntityStatistics.RowData data)
		{
			this.m_Tag = 0u;
			bool flag = data.Tag == null;
			if (!flag)
			{
				for (int i = 0; i < data.Tag.Length; i++)
				{
					this.m_Tag |= 1u << (int)data.Tag[i];
				}
			}
		}
	}
}