annotate Monsters.cpp @ 102:3b5267621a5b

trash globals
author Nomad
date Tue, 06 Nov 2012 06:42:58 +0200
parents 51a5b0dc3f30
children
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include <stdlib.h>
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include <stdio.h>
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 #include <string.h>
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "Monsters.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6 #include "FrameTableInc.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "Allocator.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 #include "LOD.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 struct MonsterStats *pMonsterStats;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 struct MonsterList *pMonsterList;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 //----- (004598FC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 bool MonsterList::FromFileTxt(const char *Args)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23 MonsterList *v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24 FILE *v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 unsigned int v4; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26 void *v5; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27 FILE *v6; // ST14_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28 char *i; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29 signed int v8; // esi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 unsigned __int16 v9; // ax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
31 const char *v10; // ST18_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 unsigned __int16 v11; // ax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33 const char *v12; // ST14_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 unsigned __int16 v13; // ax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35 const char *v14; // ST10_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36 __int16 v15; // ax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 const char *v16; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 int v17; // esi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 unsigned __int8 v18; // al@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 signed int v19; // esi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 unsigned __int16 v20; // ax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42 int v21; // ecx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 char Buf; // [sp+4h] [bp-304h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 FrameTableTxtLine v24; // [sp+1F8h] [bp-110h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 FrameTableTxtLine v25; // [sp+274h] [bp-94h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 int v26; // [sp+2F0h] [bp-18h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 char v27; // [sp+2F4h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 char v28; // [sp+2F5h] [bp-13h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 char v29; // [sp+2F6h] [bp-12h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 char v30; // [sp+2F7h] [bp-11h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 char v31; // [sp+2F8h] [bp-10h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 char v32; // [sp+2F9h] [bp-Fh]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 char v33; // [sp+2FAh] [bp-Eh]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 char v34; // [sp+2FBh] [bp-Dh]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 char v35; // [sp+2FCh] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 char v36; // [sp+2FDh] [bp-Bh]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 char v37; // [sp+2FEh] [bp-Ah]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 char v38; // [sp+2FFh] [bp-9h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 char v39; // [sp+300h] [bp-8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 char v40; // [sp+301h] [bp-7h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 char v41; // [sp+302h] [bp-6h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 char v42; // [sp+303h] [bp-5h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 FILE *File; // [sp+304h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 unsigned int Argsa; // [sp+310h] [bp+8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65 int Argsb; // [sp+310h] [bp+8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 v3 = fopen(Args, "r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 File = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 if ( !v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 Abortf("MonsterRaceListStruct::load - Unable to open file: %s.");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 Argsa = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 if ( fgets(&Buf, 490, v3) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 *strchr(&Buf, 10) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 memcpy(&v25, frame_table_txt_parser(&Buf, &v24), sizeof(v25));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 if ( v25.field_0 && *v25.pProperties[0] != 47 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 ++Argsa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 while ( fgets(&Buf, 490, File) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 v4 = Argsa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 v2->uNumMonsters = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 v5 = pAllocator->AllocNamedChunk(v2->pMonsters, 152 * v4, "Mon Race");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 v2->pMonsters = (MonsterDesc *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 if ( !v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90 Abortf("MonsterRaceListStruct::load - Out of Memory!");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 v6 = File;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 v2->uNumMonsters = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 fseek(v6, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 for ( i = fgets(&Buf, 490, File); i; i = fgets(&Buf, 490, File) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 *strchr(&Buf, 10) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 memcpy(&v25, frame_table_txt_parser(&Buf, &v24), sizeof(v25));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 if ( v25.field_0 && *v25.pProperties[0] != 47 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 strcpy(v2->pMonsters[v2->uNumMonsters].pMonsterName, v25.pProperties[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 v35 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 v36 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 v37 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 v38 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 v39 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 v40 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 v41 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 v42 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 v27 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
111 v28 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 v29 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 v30 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 v31 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 v32 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 v33 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 v34 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 strcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 v2->pMonsters[v2->uNumMonsters].pSpriteNames[(unsigned __int8)*(&v35 + v8)],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 v25.pProperties[(unsigned __int8)*(&v27 + v8)]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 while ( v8 < 8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 v9 = atoi(v25.pProperties[8]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 v10 = v25.pProperties[9];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 v2->pMonsters[v2->uNumMonsters].uMonsterHeight = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 v11 = atoi(v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 v12 = v25.pProperties[10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 v2->pMonsters[v2->uNumMonsters].uMovementSpeed = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 v13 = atoi(v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 v14 = v25.pProperties[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 v2->pMonsters[v2->uNumMonsters].uMonsterRadius = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 v15 = atoi(v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 v16 = v25.pProperties[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 v2->pMonsters[v2->uNumMonsters].uToHitRadius = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 v17 = (unsigned __int8)atoi(v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 Argsb = atoi(v25.pProperties2[0]) & 0xFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 v26 = atoi(v25.pProperties2[1]) & 0xFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 v18 = atoi(v25.pProperties2[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 v2->pMonsters[v2->uNumMonsters].uTintColor = v18 | ((v26 | ((Argsb | (v17 << 8)) << 8)) << 8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146 v20 = atoi(v25.pProperties2[v19 + 4]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 v21 = v19++ + 76 * v2->uNumMonsters;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 v2->pMonsters->pSoundSampleIDs[v21] = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 while ( v19 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 ++v2->uNumMonsters;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 fclose(File);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 //----- (004598AF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 void MonsterList::FromFile(void *pSerialized)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 uNumMonsters = *(int *)pSerialized;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 pMonsters = (MonsterDesc *)pAllocator->AllocNamedChunk(pMonsters, 152 * uNumMonsters, "Mon Race");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 memcpy(pMonsters, (char *)pSerialized + 4, 152 * uNumMonsters);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 //----- (00459860) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 void MonsterList::ToFile()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 MonsterList *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 FILE *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 FILE *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 v2 = fopen("data\\dmonlist.bin", "wb");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 v3 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 if ( !v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 Abortf("Unable to save dmonlist.bin!");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 fwrite(v1, 4u, 1u, v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 fwrite(v1->pMonsters, 0x98u, v1->uNumMonsters, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 fclose(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 //----- (004563FF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 signed int MonsterStats::_4563FF(const char *Str2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 MonsterStats *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 MonsterInfo *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 signed int result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 v3 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 if ( (signed int)this->uNumMonsters <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 result = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 v4 = &this->pInfos[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 while ( !v4->pName || _strcmpi(v4->pTexture, Str2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 if ( v3 >= (signed int)v2->uNumMonsters )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 goto LABEL_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 result = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 //----- (00454F4E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 void MonsterStats::InitializePlacements()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 char *v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 MonsterStats *v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 char *v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 char v4; // dl@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 char *v5; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
223 int v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 signed int v7; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 char **v8; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 signed int v9; // [sp+14h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 char *v10; // [sp+18h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 pMonsterPlacementTXT_Raw = (char *)pEvents_LOD->LoadRaw("placemon.txt", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 strtok(pMonsterPlacementTXT_Raw, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 v2->uNumPlacements = 31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 v8 = v2->pPlacement.pSubstrings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 v7 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 v3 = strtok(v1, "\r") + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 v10 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 v9 = (signed int)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 v4 = *v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 if ( *v3 != 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 v4 = v3[(unsigned int)v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 while ( v4 != 9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
257 v6 = (int)&v3[(unsigned int)v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
258 if ( v3[(unsigned int)v5] == (unsigned char)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 v9 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
260 *(unsigned char *)v6 = (unsigned char)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 if ( v5 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 v9 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
265 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 if ( v10 == (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 *v8 = (char *)RemoveQuotes(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
271 v3 = (char *)(v6 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
273 while ( (signed int)(v10 - 1) <= 31 && (char *)v9 == v1 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 while ( v7 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 v2->uNumPlacements = 31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 //----- (0045501E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 void MonsterStats::Initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
283 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 MonsterStats *v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 int v2; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 char v3; // cl@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 int v4; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 size_t v5; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 signed int v6; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 MonsterStats *v7; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 int v8; // eax@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 unsigned int *pHP; // esi@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 size_t v10; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 signed int v11; // edi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 MonsterStats *v12; // ecx@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 int v13; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 unsigned int *pExp; // esi@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 signed int v15; // edi@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 size_t v16; // esi@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 int v17; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 MonsterInfo *v18; // esi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 size_t v19; // edi@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 int v20; // eax@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 unsigned __int8 v21; // al@55
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 size_t v22; // edi@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 char v23; // cl@63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 const char *v24; // edi@63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 unsigned __int16 *v25; // esi@114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 int v26; // eax@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 size_t v27; // eax@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 int v28; // edi@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 MonsterStats *v29; // esi@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 int v30; // eax@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314 int v31; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315 int v32; // eax@143
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 int v33; // eax@144
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 int v34; // eax@151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
318 int v35; // eax@152
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319 int v36; // eax@153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 int v37; // eax@162
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321 int v38; // eax@163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322 int v39; // eax@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 int v40; // eax@171
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 int v41; // eax@172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 size_t v42; // eax@180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 int v43; // edi@180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327 MonsterInfo *v44; // esi@180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 int v45; // edi@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 MonsterInfo *v46; // eax@232
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
330 char *v47; // edx@232
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
331 char *v48; // ecx@232
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 MonsterInfo *v49; // eax@236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
333 FrameTableTxtLine *v50; // esi@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 int v51; // eax@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 int v52; // eax@241
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
336 int v53; // esi@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 int v54; // edi@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 char v55; // al@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
339 char *v56; // edi@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
340 FrameTableTxtLine *v57; // esi@249
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 int v58; // eax@249
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
342 MonsterInfo *v59; // eax@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 MonsterInfo *v60; // esi@251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344 int v61; // edi@251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345 char v62; // al@251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 char *v63; // edi@251
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 char v64; // al@258
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 char v65; // al@262
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 char v66; // al@266
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 char v67; // al@270
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 char v68; // al@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352 char v69; // al@278
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 char v70; // al@282
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 char v71; // al@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 char v72; // al@290
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 unsigned __int8 v73; // al@294
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 int v74; // edi@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 MonsterInfo *v75; // esi@300
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359 MonsterInfo *v76; // esi@302
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360 char **v77; // edi@306
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361 __int16 v78; // ax@316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 MonsterInfo *v79; // esi@323
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 const char *v80; // ecx@323
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 std::string v81; // [sp-14h] [bp-46Ch]@317
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
365 const char *v82; // [sp-8h] [bp-460h]@306
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 char *v83; // [sp-4h] [bp-45Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 char *v84; // [sp+0h] [bp-458h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 FrameTableTxtLine v85; // [sp+10h] [bp-448h]@297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 FrameTableTxtLine v86; // [sp+8Ch] [bp-3CCh]@249
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 FrameTableTxtLine v87; // [sp+108h] [bp-350h]@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 char Src[120]; // [sp+184h] [bp-2D4h]@317
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
372 FrameTableTxtLine v89; // [sp+1FCh] [bp-25Ch]@249
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 FrameTableTxtLine v90; // [sp+278h] [bp-1E0h]@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 char Str[64]; // [sp+2F4h] [bp-164h]@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 char Dest[64]; // [sp+334h] [bp-124h]@249
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 char v93[64]; // [sp+374h] [bp-E4h]@297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 FrameTableTxtLine v94; // [sp+3B4h] [bp-A4h]@297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 int v95; // [sp+430h] [bp-28h]@317
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 int v96; // [sp+434h] [bp-24h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 int v97; // [sp+438h] [bp-20h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 char a3[5]; // [sp+43Fh] [bp-19h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 int a2; // [sp+444h] [bp-14h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383 int v100; // [sp+448h] [bp-10h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 size_t v101; // [sp+44Ch] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 MonsterStats *v102; // [sp+450h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 int v103; // [sp+454h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 v102 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 if ( pMonstersTXT_Raw )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 pAllocator->FreeChunk(pMonstersTXT_Raw);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 pMonstersTXT_Raw = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 pMonstersTXT_Raw = (char *)pEvents_LOD->LoadRaw("monsters.txt", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 strtok(pMonstersTXT_Raw, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 strtok(0, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 strtok(0, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 strtok(0, "\r");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 v103 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 v1->uNumMonsters = 265;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 v2 = (int)(strtok(0, "\r") + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 *(_DWORD *)&a3[1] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 v97 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
406 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 v3 = *(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
409 while ( v3 != 9 && v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 v3 = *(_BYTE *)(v4 + v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 v96 = v4 + v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 if ( !*(_BYTE *)(v4 + v2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 v97 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 *(_BYTE *)(v4 + v2) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 switch ( *(_DWORD *)&a3[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423 v103 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
424 v102->pInfos[v103].uID = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
425 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
427 v102->pInfos[v103].pTexture = RemoveQuotes((char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 v102->pInfos[v103].pName = RemoveQuotes((char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 v102->pInfos[v103].uLevel = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
434 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
435 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 if ( *(_BYTE *)v2 == 34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
437 *(_BYTE *)v2 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
438 v5 = strlen((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 v101 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 if ( (signed int)v5 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 while ( *(_BYTE *)(v6 + v2) != 44 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 if ( v6 >= (signed int)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 v7 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450 v8 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451 *(_BYTE *)(v6 + v2) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
452 pHP = &v7->pInfos[v8].uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453 *pHP = 1000 * atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 v83 = (char *)(v6 + v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
455 *(_BYTE *)(v6 + v2) = 44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 *pHP += atoi(v83);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 if ( v6 == v101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 v102->pInfos[v103].uHP = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
460 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
461 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
462 v102->pInfos[v103].uAC = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 if ( *(_BYTE *)v2 == 34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466 *(_BYTE *)v2 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
467 v10 = strlen((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469 v101 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 if ( (signed int)v10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 while ( *(_BYTE *)(v11 + v2) != 44 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 ++v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 if ( v11 >= (signed int)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 v12 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479 v13 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480 *(_BYTE *)(v11 + v2) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481 pExp = &v12->pInfos[v13].uExp;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482 *pExp = 1000 * atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 v83 = (char *)(v11 + v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 *(_BYTE *)(v11 + v2) = 44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485 *pExp += atoi(v83);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487 if ( v11 == v101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488 v102->pInfos[v103].uExp = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 v15 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493 v100 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 v101 = strlen((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 if ( (signed int)v101 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 v84 = (char *)*(_BYTE *)(v16 + v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501 v17 = tolower((int)v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
502 switch ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504 case 37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
507 case 100:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
508 v100 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
509 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
510 case 108:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
511 a2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
512 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
513 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
514 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
516 while ( (signed int)v16 < (signed int)v101 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
517 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
518 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
519 v18 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
520 v18->uTreasureDropChance = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
521 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
522 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524 if ( !v100 && !a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 v18 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
527 v18->uTreasureDropChance = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
529 if ( v100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
531 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
532 v100 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
533 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
534 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
535 v84 = (char *)*(_BYTE *)(v19 + v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
536 v20 = tolower((int)v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
537 if ( v20 == 37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
538 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
539 v84 = (char *)(v19 + v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
540 v18->uTreasureDiceRolls = atoi(v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
541 v100 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
542 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
543 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
544 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
545 if ( v20 == 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
546 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
547 if ( !v100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 v18->uTreasureDiceRolls = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 v84 = (char *)(v19 + v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 v21 = atoi(v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551 v19 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
552 v18->uTreasureDiceSides = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
555 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
557 while ( (signed int)v19 < (signed int)v101 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
559 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
561 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
562 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
564 v84 = (char *)*(_BYTE *)(v22 + v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
565 if ( tolower((int)v84) == 108 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
566 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 ++v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
568 if ( (signed int)v22 >= (signed int)v101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
569 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
571 v23 = *(_BYTE *)(v22 + v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
572 v24 = (const char *)(v22 + v2 + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
573 v18->uTreasureLevel = v23 - 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
574 if ( *v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
576 if ( _strcmpi(v24, "WEAPON") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 if ( _strcmpi(v24, "ARMOR") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
579 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
580 if ( _strcmpi(v24, "MISC") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
581 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
582 if ( _strcmpi(v24, "SWORD") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
584 if ( _strcmpi(v24, "DAGGER") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
586 if ( _strcmpi(v24, "AXE") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
587 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
588 if ( _strcmpi(v24, "SPEAR") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
590 if ( _strcmpi(v24, "BOW") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
592 if ( _strcmpi(v24, "MACE") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
593 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
594 if ( _strcmpi(v24, "CLUB") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
595 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
596 if ( _strcmpi(v24, "STAFF") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
598 if ( _strcmpi(v24, "LEATHER") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
599 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
600 if ( _strcmpi(v24, "CHAIN") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
601 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
602 if ( _strcmpi(v24, "PLATE") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
603 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 if ( _strcmpi(v24, "SHIELD") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
605 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 if ( _strcmpi(v24, "HELM") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
608 if ( _strcmpi(v24, "BELT") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
610 if ( _strcmpi(v24, "CAPE") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
612 if ( _strcmpi(v24, "GAUNTLETS") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
614 if ( _strcmpi(v24, "BOOTS") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
615 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
616 if ( _strcmpi(v24, "RING") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
617 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
618 if ( _strcmpi(v24, "AMULET") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
619 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
620 if ( _strcmpi(v24, "WAND") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
622 if ( _strcmpi(v24, "SCROLL") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
624 if ( !_strcmpi(v24, "GEM") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
625 v18->uTreasureType = 46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
628 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
629 v18->uTreasureType = 43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
632 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 v18->uTreasureType = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
636 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
637 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 v18->uTreasureType = 41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
640 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
644 v18->uTreasureType = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
645 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
646 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
647 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
648 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
649 v18->uTreasureType = 39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
652 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
654 v18->uTreasureType = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
655 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
657 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
658 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
659 v18->uTreasureType = 37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
660 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
661 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
662 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
664 v18->uTreasureType = 36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
665 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
666 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
667 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
668 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
669 v18->uTreasureType = 35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
670 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
671 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
672 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
673 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
674 v18->uTreasureType = 34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
679 v18->uTreasureType = 33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
680 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
681 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
682 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684 v18->uTreasureType = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
686 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
687 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
688 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
689 v18->uTreasureType = 31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
692 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
693 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
694 v18->uTreasureType = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
695 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
696 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
697 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
699 v18->uTreasureType = 29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
700 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
701 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
702 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
703 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
704 v18->uTreasureType = 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
705 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
706 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
707 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 v18->uTreasureType = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
711 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
714 v18->uTreasureType = 26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
715 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
716 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
717 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
718 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
719 v18->uTreasureType = 25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
723 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 v18->uTreasureType = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
725 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729 v18->uTreasureType = 23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 v18->uTreasureType = 22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 v18->uTreasureType = 21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 v18->uTreasureType = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750 v84 = (char *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 v25 = &v102->pInfos[v103].bQuestMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 *v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 if ( atoi(v84) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 *(_BYTE *)v25 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 v102->pInfos[v103].uFlying = _strnicmp((const char *)v2, "n", 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 case 0xA:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 v101 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 if ( tolower((int)v84) == 's' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 v84 = (char *)*(_BYTE *)(v2 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 v26 = tolower((int)v84) != 'h' ? 5 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 if ( tolower((int)v84) == 'm' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 v101 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
775 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
777 if ( tolower((int)v84) == 'l' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
779 v101 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
781 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
782 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 if ( tolower((int)v84) == 'g' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
785 v101 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
788 LOBYTE(v26) = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 v102->pInfos[v103].uMovementType = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
791 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
792 case 0xB:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
793 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
794 v101 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
795 if ( tolower((int)v84) == 's' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
796 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
797 v101 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
798 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
799 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
800 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
801 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
802 if ( tolower((int)v84) == 'w' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
804 v101 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
805 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
806 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
807 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
808 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
809 if ( tolower((int)v84) == 'n' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
810 v101 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 v102->pInfos[v103].uAIType = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 case 0xC:
29
e62134245ab0 On BLV loading.
Nomad
parents: 0
diff changeset
816 v102->pInfos[v103].uHostilityType = (MonsterInfo::HostilityRadius)atoi((const char *)v2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 case 0xD:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 v102->pInfos[v103].uBaseSpeed = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 case 0xF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 v27 = strlen((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 v100 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 v101 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
825 if ( (signed int)v27 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 v28 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 v29 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 v84 = (char *)*(_BYTE *)(v100 + v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 v30 = tolower((int)v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 if ( v30 > 107 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 if ( v30 > 115 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 v40 = v30 - 116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 if ( v40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 v41 = v40 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 if ( v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 if ( v41 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 BYTE1(v29->pInfos[v28].uAttackPreference) |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 BYTE1(v29->pInfos[v28].uAttackPreference) |= 0x20u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 LOBYTE(v29->pInfos[v28].uAttackPreference) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 if ( v30 == 115 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 v29->pInfos[v28].uAttackPreference |= 0x20u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 v37 = v30 - 109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 if ( v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 v38 = v37 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 if ( v38 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 v39 = v38 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 if ( v39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 if ( v39 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
874 v29->pInfos[v28].uAttackPreference |= 0x40u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
877 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 v29->pInfos[v28].uAttackPreference |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 BYTE1(v29->pInfos[v28].uAttackPreference) |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 BYTE1(v29->pInfos[v28].uAttackPreference) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
890 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
894 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 if ( v30 == 107 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
897 v29->pInfos[v28].uAttackPreference |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 if ( v30 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
903 v34 = v30 - 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 if ( v34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 v35 = v34 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 v36 = v35 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 if ( v36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 if ( v36 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 BYTE1(v29->pInfos[v28].uAttackPreference) |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
916 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 BYTE1(v29->pInfos[v28].uAttackPreference) |= 0x40u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 BYTE1(v29->pInfos[v28].uAttackPreference) |= 0x10u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
924 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 v29->pInfos[v28].uAttackPreference |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
929 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 if ( v30 == 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 v29->pInfos[v28].uAttackPreference |= 0x10u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
935 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 v31 = v30 - 50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
939 if ( v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
940 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
941 v32 = v31 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
942 if ( v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
943 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
944 v33 = v32 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
945 if ( v33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
946 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
947 if ( v33 == 45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
948 v29->pInfos[v28].uAttackPreference |= 4u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
949 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
950 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
951 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
952 v29->pInfos[v28].uNumCharactersAttackedPerSpecialAbility = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
955 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
956 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
957 v29->pInfos[v28].uNumCharactersAttackedPerSpecialAbility = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
958 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
960 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
961 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
962 v29->pInfos[v28].uNumCharactersAttackedPerSpecialAbility = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
963 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
964 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
965 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
966 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
968 ++v100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
969 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
970 while ( v100 < (signed int)v101 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
971 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
972 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
973 case 0xE:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
974 v102->pInfos[v103].uRecoveryTime = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
975 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
976 case 0x10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
977 v42 = strlen((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
978 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
979 v44 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
980 v100 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
981 v44->uSpecialAttackType = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
982 if ( (signed int)v42 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
983 goto LABEL_185;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
984 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
985 case 0x11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
986 v102->pInfos[v103].uAttack1Type = ParseAttackType((unsigned __int8 *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
987 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
988 case 0x12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
989 v46 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
990 v47 = (char *)&v46->uAttack1DamageDiceRolls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
991 v84 = (char *)&v46->uAttack1DamageBonus;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
992 v48 = (char *)&v46->uAttack1DamageDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
993 goto LABEL_237;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
994 case 0x13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
995 v102->pInfos[v103].uMissleAttack1Type = ParseMissleAttackType((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
996 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
997 case 0x14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
998 v102->pInfos[v103].uAttack2Chance = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
999 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1000 case 0x15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1001 v102->pInfos[v103].uAttack2Type = ParseAttackType((unsigned __int8 *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1002 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1003 case 0x16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1004 v49 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1005 v47 = (char *)&v49->uAttack2DamageDiceRolls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1006 v84 = (char *)&v49->uAttack2DamageBonus;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1007 v48 = (char *)&v49->uAttack2DamageDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1008 LABEL_237:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1009 ParseDamage((const char *)v2, (int)v47, (int)v48, (int)v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1010 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1011 case 0x17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1012 v102->pInfos[v103].uMissleAttack2Type = ParseMissleAttackType((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1013 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1014 case 0x18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1015 v102->pInfos[v103].uSpell1UseChance = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1016 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1017 case 0x19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1018 strcpy(Str, (const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1019 Str[0] = ' ';
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1020 Str[strlen(Str) - 1] = ' ';
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1021 v50 = texture_frame_table_txt_parser(Str, &v87);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1022 v51 = 88 * v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1023 memcpy(&v90, v50, sizeof(v90));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1024 if ( v90.field_0 >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1025 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1026 v53 = (int)((char *)v102 + v51);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1027 a2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1028 v102->pInfos[v51 / 0x58u].uSpell1ID = ParseSpellType(&v90, (int)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1029 v54 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1030 v84 = (char *)v90.pProperties[a2 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1031 v55 = atoi(v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1032 v56 = (char *)v90.pProperties[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1033 v84 = "E";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1034 v83 = v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1035 *(_WORD *)(v53 + 56) = v55 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1036 if ( _strcmpi(v83, v84) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1037 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1038 if ( _strcmpi(v56, "M") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1039 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1040 if ( !_strcmpi(v56, "G") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1041 *(_BYTE *)(v53 + 57) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1043 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1044 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1045 *(_BYTE *)(v53 + 56) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1046 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1047 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1048 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1049 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1050 *(_BYTE *)(v53 + 56) |= 0x40u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1051 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1052 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1053 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1054 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1055 v52 = (int)((char *)v102 + v51);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1056 *(_BYTE *)(v52 + 33) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1057 *(_WORD *)(v52 + 56) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1058 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1059 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1060 case 0x1A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1061 v102->pInfos[v103].uSpell2UseChance = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1062 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1063 case 0x1B:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1064 strcpy(Dest, (const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1065 Dest[0] = ' ';
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1066 Dest[strlen(Dest) - 1] = ' ';
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1067 v57 = texture_frame_table_txt_parser(Dest, &v86);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1068 v58 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1069 memcpy(&v89, v57, sizeof(v89));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1070 if ( v89.field_0 >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1072 v60 = &v102->pInfos[v58];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1073 a2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1074 v102->pInfos[v58].uSpell2ID = ParseSpellType(&v89, (int)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1075 v61 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1076 v84 = (char *)v89.pProperties[a2 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1077 v62 = atoi(v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1078 v63 = (char *)v89.pProperties[v61];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1079 v84 = "E";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1080 v83 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1081 v60->uSpellSkillAndMastery2 = v62 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1082 if ( _strcmpi(v83, v84) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1084 if ( _strcmpi(v63, "M") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1085 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1086 if ( !_strcmpi(v63, "G") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1087 HIBYTE(v60->uSpellSkillAndMastery2) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1088 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1089 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1090 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1091 LOBYTE(v60->uSpellSkillAndMastery2) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1092 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1093 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1094 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1095 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1096 LOBYTE(v60->uSpellSkillAndMastery2) |= 0x40u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1098 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1099 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1101 v59 = &v102->pInfos[v58];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1102 v59->uSpell2ID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1103 v59->uSpellSkillAndMastery2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1104 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1105 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1106 case 0x1C:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1107 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1108 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1109 v64 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1110 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1111 v64 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1112 v102->pInfos[v103].uResFire = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1113 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1114 case 0x1D:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1115 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1116 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1117 v65 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1118 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1119 v65 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1120 v102->pInfos[v103].uResAir = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1121 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1122 case 0x1E:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1123 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1124 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1125 v66 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1126 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1127 v66 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1128 v102->pInfos[v103].uResWater = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1129 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1130 case 0x1F:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1131 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1132 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1133 v67 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1134 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1135 v67 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1136 v102->pInfos[v103].uResEarth = v67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1137 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1138 case 0x20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1139 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1140 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1141 v68 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1142 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1143 v68 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1144 v102->pInfos[v103].uResMind = v68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1145 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1146 case 0x21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1147 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1148 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1149 v69 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1150 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1151 v69 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1152 v102->pInfos[v103].uResSpirit = v69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1153 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1154 case 0x22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1155 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1156 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1157 v70 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1158 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1159 v70 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1160 v102->pInfos[v103].uResBody = v70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1161 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1162 case 0x23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1163 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1164 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1165 v71 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1166 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1167 v71 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1168 v102->pInfos[v103].uResLight = v71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1169 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1170 case 0x24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1171 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1172 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1173 v72 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1174 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1175 v72 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1176 v102->pInfos[v103].uResDark = v72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1177 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1178 case 0x25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1179 v84 = (char *)*(_BYTE *)v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1180 if ( tolower((int)v84) == 'i' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1181 v73 = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1182 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1183 v73 = atoi((const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1184 v102->pInfos[v103].uResPhysical = v73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1185 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1186 case 0x26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1187 strcpy(v93, (const char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1188 v93[0] = ' ';
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1189 v93[strlen(v93) - 1] = ' ';
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1190 memcpy(&v94, texture_frame_table_txt_parser(v93, &v85), sizeof(v94));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1191 if ( v94.field_0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1192 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1193 v74 = v94.field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1194 if ( v94.field_0 < 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1196 if ( _strcmpi(v94.pProperties[0], "shot") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1197 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1198 if ( _strcmpi(v94.pProperties[0], "summon") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1199 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1200 if ( !_strcmpi(v94.pProperties[0], "explode") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1202 v79 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1203 v80 = v94.pProperties[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1204 v84 = (char *)&v79->uSpecialAbilityDamageDiceBonus;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1205 v83 = (char *)&v79->uSpecialAbilityDamageDiceSides;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1206 v79->uSpecialAbilityType = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1207 ParseDamage(v80, (int)&v79->uSpecialAbilityDamageDiceRolls, (int)v83, (int)v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1208 v79->field_3C_some_special_attack = ParseAttackType((unsigned __int8 *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1209 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1211 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1213 v76 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1214 v76->uSpecialAbilityType = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1215 if ( v74 > 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1216 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1217 pTmpBuf[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1218 strcpy(pTmpBuf, v94.pProperties[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1219 if ( v74 > 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1220 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1221 v100 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1222 if ( v74 > 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1224 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1226 strcat(pTmpBuf, " ");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1227 v77 = (char **)v94.pProperties[v100];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1228 v82 = v94.pProperties[v100];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1229 strcat(pTmpBuf, v82);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1230 if ( v100 == v94.field_0 - 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1232 v84 = (char *)*(_BYTE *)v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1233 if ( tolower((int)v84) == 'a' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1234 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1235 v76->uSpecialAbilityDamageDiceRolls = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1236 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1237 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1239 v84 = (char *)*(_BYTE *)v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1240 if ( tolower((int)v84) == 'b' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1241 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1242 v76->uSpecialAbilityDamageDiceRolls = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1244 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1246 v84 = (char *)*(_BYTE *)v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1247 if ( tolower((int)v84) == 'c' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1248 v76->uSpecialAbilityDamageDiceRolls = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1249 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1250 v76->uSpecialAbilityDamageDiceRolls = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1251 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1254 ++v100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1255 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1256 while ( v100 < v94.field_0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1259 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1261 v76->uSpecialAbilityDamageDiceRolls = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1263 if ( pMonsterList->uNumMonsters )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1264 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1265 v78 = pMonsterList->GetMonsterByName(pTmpBuf) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1266 v76->field_3C_some_special_attack = v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1267 if ( v78 == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1268 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 29
diff changeset
1269 sprintf(Src, "Can't create random monster: '%s' See MapStats!", Src);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1270 MessageBoxA(nullptr, Src, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:2239", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1271 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1273 v76->uSpecialAbilityDamageDiceSides = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1274 if ( !_strcmpi(v94.pProperties[1], "ground") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1275 v76->uSpecialAbilityDamageDiceSides = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1276 if ( v76->field_3C_some_special_attack == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1277 v76->uSpecialAbilityType = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1278 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1281 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1283 v75 = &v102->pInfos[v103];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1284 v84 = (char *)(v94.pProperties[1] + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1285 v75->uSpecialAbilityType = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1286 v75->uSpecialAbilityDamageDiceBonus = atoi(v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1290 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1291 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1292 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1294 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1296 v84 = (char *)*(_BYTE *)(v43 + v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1297 if ( tolower((int)v84) == 'x' )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1298 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1299 ++v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1300 if ( v43 >= v100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1301 goto LABEL_185;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1302 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1303 v45 = v2 + v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1304 *(_BYTE *)v45 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1305 v44->uSpecialAttackType = atoi((const char *)(v45 + 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1306 *(_BYTE *)v45 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1307 LABEL_185:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1308 _strlwr((char *)v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1309 if ( strstr((const char *)v2, "curse") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1310 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1311 v44->uSpecialAttack = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1312 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1313 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1314 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1315 if ( strstr((const char *)v2, "weak") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1316 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1317 v44->uSpecialAttack = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1318 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1319 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1320 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1321 if ( strstr((const char *)v2, "asleep") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1323 v44->uSpecialAttack = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1324 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1325 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1326 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1327 if ( strstr((const char *)v2, "afraid") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1328 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1329 v44->uSpecialAttack = 23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1330 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1331 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1332 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1333 if ( strstr((const char *)v2, "drunk") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1334 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1335 v44->uSpecialAttack = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1336 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1337 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1338 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1339 if ( strstr((const char *)v2, "insane") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1340 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1341 v44->uSpecialAttack = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1342 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1343 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1344 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1345 if ( strstr((const char *)v2, "poison1") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1346 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1347 v44->uSpecialAttack = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1349 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1351 if ( strstr((const char *)v2, "poison2") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1352 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1353 v44->uSpecialAttack = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1354 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1355 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1356 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1357 if ( strstr((const char *)v2, "poison3") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1358 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1359 v44->uSpecialAttack = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1360 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1361 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1362 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1363 if ( strstr((const char *)v2, "disease1") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1364 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1365 v44->uSpecialAttack = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1366 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1367 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1368 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1369 if ( strstr((const char *)v2, "disease2") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1371 v44->uSpecialAttack = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1373 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1375 if ( strstr((const char *)v2, "disease3") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1376 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1377 v44->uSpecialAttack = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1379 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1380 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1381 if ( strstr((const char *)v2, "paralyze") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1382 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1383 v44->uSpecialAttack = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1384 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1385 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1386 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1387 if ( strstr((const char *)v2, "uncon") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1389 v44->uSpecialAttack = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1390 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1391 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1392 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1393 if ( strstr((const char *)v2, "dead") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1395 v44->uSpecialAttack = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1396 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1397 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1398 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1399 if ( strstr((const char *)v2, "stone") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1400 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1401 v44->uSpecialAttack = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1402 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1403 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1404 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1405 if ( strstr((const char *)v2, "errad") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1406 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1407 v44->uSpecialAttack = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1409 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1411 if ( strstr((const char *)v2, "brkitem") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1412 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1413 v44->uSpecialAttack = 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1414 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1415 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1416 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1417 if ( strstr((const char *)v2, "brkarmor") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1419 v44->uSpecialAttack = 18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1420 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1421 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1423 if ( strstr((const char *)v2, "brkweapon") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1424 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1425 v44->uSpecialAttack = 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1426 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1427 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1428 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1429 if ( strstr((const char *)v2, "steal") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1430 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1431 v44->uSpecialAttack = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1432 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1433 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1434 {
102
3b5267621a5b trash globals
Nomad
parents: 96
diff changeset
1435 if ( strstr((const char *)v2, "age") )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1436 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1437 v44->uSpecialAttack = 21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1439 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1441 if ( strstr((const char *)v2, "drainsp") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1442 v44->uSpecialAttack = 22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1444 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1447 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1450 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1452 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1453 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1454 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1455 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1456 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1460 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1461 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1462 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1466 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1467 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1468 v97 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1469 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1470 LABEL_325:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1471 ++*(_DWORD *)&a3[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1472 v2 = v96 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1473 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1474 while ( *(_DWORD *)&a3[1] - 1 <= (signed int)v102->uNumMonsters && !v97 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1475 ++v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1476 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1477 while ( v103 < 265 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1478 v102->uNumMonsters = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1479 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1480
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1481
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1482
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1483
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1484 //----- (0044FA08) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1485 unsigned __int16 MonsterList::GetMonsterByName(const char *pMonsterName)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1487 signed int v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1488 MonsterList *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1489 int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1490 unsigned __int16 result; // ax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1491
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1492 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1493 v3 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1494 if ( pMonsterName && (signed int)this->uNumMonsters > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1496 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1497 while ( _strcmpi(pMonsterName, v3->pMonsters[v4].pMonsterName) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1498 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1499 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1500 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1501 if ( v2 >= (signed int)v3->uNumMonsters )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1502 goto LABEL_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1503 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1504 result = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1505 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1506 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1507 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1508 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1509 result = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1511 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1512 }