blob: 28f6c4cf5858979a539170e06409674cae9f2df8 (
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
using System;
using System.Collections.Generic;
using UnityEngine;
using XUtliPoolLib;
namespace XMainClient
{
internal class XAIDataRelated : XSingleton<XAIDataRelated>
{
public int GetProfIndex(GameObject go)
{
XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(ulong.Parse(go.transform.name));
bool flag = entity == null;
int result;
if (flag)
{
result = -1;
}
else
{
int num = (int)(entity.Attributes.TypeID % 10u - 1u);
int num2 = (int)(entity.Attributes.TypeID / 10u - 1u);
bool flag2 = entity.Attributes.TypeID >= 1000u || entity.Attributes.TypeID <= 10u;
if (flag2)
{
result = num * 2 + XSingleton<XCommon>.singleton.RandomInt(0, 2);
}
else
{
result = num * 2 + num2;
}
}
return result;
}
public List<uint> GetAssistSkillList(GameObject go, int profIndex)
{
List<uint> list = new List<uint>();
List<string> list2 = new List<string>();
XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(ulong.Parse(go.transform.name));
SkillCombo.RowData rowData = XArenaDocument.SkillComboTable.Table[profIndex + 6];
bool flag = rowData.nextskill0 != "";
if (flag)
{
list2.Add(rowData.nextskill0);
}
bool flag2 = rowData.nextskill1 != "";
if (flag2)
{
list2.Add(rowData.nextskill1);
}
bool flag3 = rowData.nextskill2 != "";
if (flag3)
{
list2.Add(rowData.nextskill2);
}
bool flag4 = rowData.nextskill3 != "";
if (flag4)
{
list2.Add(rowData.nextskill3);
}
bool flag5 = rowData.nextskill4 != "";
if (flag5)
{
list2.Add(rowData.nextskill4);
}
for (int i = 0; i < list2.Count; i++)
{
for (int j = 0; j < entity.SkillMgr.SkillOrder.Count; j++)
{
XSkillCore xskillCore = entity.SkillMgr.SkillOrder[j] as XSkillCore;
bool flag6 = xskillCore != null && xskillCore.Soul.Name == list2[i];
if (flag6)
{
list.Add(xskillCore.ID);
break;
}
}
}
return list;
}
public List<uint> GetStartSkillList(GameObject go, int prof)
{
List<uint> list = new List<uint>();
List<string> list2 = new List<string>();
XEntity entity = XSingleton<XEntityMgr>.singleton.GetEntity(ulong.Parse(go.transform.name));
SkillCombo.RowData rowData = XArenaDocument.SkillComboTable.Table[prof];
bool flag = rowData.nextskill0 != "";
if (flag)
{
list2.Add(rowData.nextskill0);
}
bool flag2 = rowData.nextskill1 != "";
if (flag2)
{
list2.Add(rowData.nextskill1);
}
bool flag3 = rowData.nextskill2 != "";
if (flag3)
{
list2.Add(rowData.nextskill2);
}
bool flag4 = rowData.nextskill3 != "";
if (flag4)
{
list2.Add(rowData.nextskill3);
}
bool flag5 = rowData.nextskill4 != "";
if (flag5)
{
list2.Add(rowData.nextskill4);
}
for (int i = 0; i < list2.Count; i++)
{
bool flag6 = entity.SkillMgr.GetPhysicalSkill().Soul.Name == list2[i];
if (flag6)
{
list.Add(entity.SkillMgr.GetPhysicalSkill().ID);
break;
}
for (int j = 0; j < entity.SkillMgr.SkillOrder.Count; j++)
{
XSkillCore xskillCore = entity.SkillMgr.SkillOrder[j] as XSkillCore;
bool flag7 = xskillCore != null && xskillCore.Soul.Name == list2[i];
if (flag7)
{
list.Add(xskillCore.ID);
break;
}
}
}
return list;
}
public bool DetectEnimyInSight(XEntity entity)
{
List<XEntity> opponent = XSingleton<XEntityMgr>.singleton.GetOpponent(entity);
for (int i = 0; i < opponent.Count; i++)
{
bool flag = !XEntity.ValideEntity(opponent[i]) || opponent[i].IsPuppet;
if (!flag)
{
float sqrMagnitude = (opponent[i].EngineObject.Position - entity.EngineObject.Position).sqrMagnitude;
bool flag2 = XSingleton<XCommon>.singleton.IsLess(sqrMagnitude, entity.AI.EnterFightRange * entity.AI.EnterFightRange);
if (flag2)
{
entity.AI.NotifyAllyIntoFight(opponent[i]);
return true;
}
}
}
return false;
}
}
}
|