-
Notifications
You must be signed in to change notification settings - Fork 0
/
Entity.java
executable file
·200 lines (191 loc) · 3.86 KB
/
Entity.java
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
import java.util.Random;
public class Entity extends Animable {
public final void setPos(int i, int j, boolean flag)
{
if(anim != -1 && Animation.anims[anim].anInt364 == 1)
anim = -1;
if(!flag)
{
int k = i - smallX[0];
int l = j - smallY[0];
if(k >= -8 && k <= 8 && l >= -8 && l <= 8)
{
if(smallXYIndex < 9)
smallXYIndex++;
for(int i1 = smallXYIndex; i1 > 0; i1--)
{
smallX[i1] = smallX[i1 - 1];
smallY[i1] = smallY[i1 - 1];
aBooleanArray1553[i1] = aBooleanArray1553[i1 - 1];
}
smallX[0] = i;
smallY[0] = j;
aBooleanArray1553[0] = false;
return;
}
}
smallXYIndex = 0;
anInt1542 = 0;
anInt1503 = 0;
smallX[0] = i;
smallY[0] = j;
x = smallX[0] * 128 + anInt1540 * 64;
y = smallY[0] * 128 + anInt1540 * 64;
}
public final void method446()
{
smallXYIndex = 0;
anInt1542 = 0;
}
public final void updateHitData(int j, int k, int l)
{
for(int i1 = 0; i1 < 4; i1++)
if(hitsLoopCycle[i1] <= l)
{
hitArray[i1] = k * ((client.newDamage == true && k > 0) ? 10 : 1);
if (client.newDamage && k > 0) {
hitArray[i1] += new java.util.Random().nextInt(9);
}
hitMarkTypes[i1] = j;
hitsLoopCycle[i1] = l + 70;
return;
}
}
public final void moveInDir(boolean flag, int i)
{
int j = smallX[0];
int k = smallY[0];
if(i == 0)
{
j--;
k++;
}
if(i == 1)
k++;
if(i == 2)
{
j++;
k++;
}
if(i == 3)
j--;
if(i == 4)
j++;
if(i == 5)
{
j--;
k--;
}
if(i == 6)
k--;
if(i == 7)
{
j++;
k--;
}
if(anim != -1 && Animation.anims[anim].anInt364 == 1)
anim = -1;
if(smallXYIndex < 9)
smallXYIndex++;
for(int l = smallXYIndex; l > 0; l--)
{
smallX[l] = smallX[l - 1];
smallY[l] = smallY[l - 1];
aBooleanArray1553[l] = aBooleanArray1553[l - 1];
}
smallX[0] = j;
smallY[0] = k;
aBooleanArray1553[0] = flag;
}
public int entScreenX;
public int entScreenY;
public final int index = -1;
public boolean isVisible()
{
return false;
}
Entity()
{
smallX = new int[10];
smallY = new int[10];
interactingEntity = -1;
anInt1504 = 32;
anInt1505 = -1;
height = 200;
anInt1511 = -1;
anInt1512 = -1;
hitArray = new int[4];
hitMarkTypes = new int[4];
hitsLoopCycle = new int[4];
anInt1517 = -1;
anInt1520 = -1;
anim = -1;
loopCycleStatus = -1000;
textCycle = 100;
anInt1540 = 1;
aBoolean1541 = false;
aBooleanArray1553 = new boolean[10];
anInt1554 = -1;
anInt1555 = -1;
anInt1556 = -1;
anInt1557 = -1;
}
public final int[] smallX;
public final int[] smallY;
public int interactingEntity;
int anInt1503;
int anInt1504;
int anInt1505;
public String textSpoken;
public int height;
public int turnDirection;
int anInt1511;
int anInt1512;
int anInt1513;
final int[] hitArray;
final int[] hitMarkTypes;
final int[] hitsLoopCycle;
int anInt1517;
int anInt1518;
int anInt1519;
int anInt1520;
int anInt1521;
int anInt1522;
int anInt1523;
int anInt1524;
int smallXYIndex;
public int anim;
int anInt1527;
int anInt1528;
int anInt1529;
int anInt1530;
int anInt1531;
public int loopCycleStatus;
public int currentHealth;
public int maxHealth;
int textCycle;
int anInt1537;
int anInt1538;
int anInt1539;
int anInt1540;
boolean aBoolean1541;
int anInt1542;
int anInt1543;
int anInt1544;
int anInt1545;
int anInt1546;
int anInt1547;
int anInt1548;
int anInt1549;
public int x;
public int y;
int anInt1552;
final boolean[] aBooleanArray1553;
int anInt1554;
int anInt1555;
int anInt1556;
int anInt1557;
}