2501
|
1 #define _CRTDBG_MAP_ALLOC
|
|
2 #include <stdlib.h>
|
|
3 #include <crtdbg.h>
|
|
4
|
|
5 #define _CRT_SECURE_NO_WARNINGS
|
|
6 #include <algorithm>
|
2541
|
7
|
|
8 #include "Engine/Engine.h"
|
|
9
|
2501
|
10 #include "UICharacter.h"
|
|
11 #include "..\../Engine/MapInfo.h"
|
2502
|
12 #include "..\../GUI/GUIWindow.h"
|
|
13 #include "..\../GUI/GUIFont.h"
|
|
14 #include "..\../GUI/GUIProgressBar.h"
|
2501
|
15 #include "..\../Engine/Party.h"
|
2502
|
16 #include "..\../Media/Audio/AudioPlayer.h"
|
2501
|
17 #include "..\../Engine/Graphics/Render.h"
|
|
18 #include "..\../Engine/LOD.h"
|
|
19 #include "..\../Engine/Graphics/Viewport.h"
|
|
20 #include "..\../Engine/Timer.h"
|
|
21 #include "..\../Engine/Awards.h"
|
|
22 #include "..\../Engine/Spells/CastSpellInfo.h"
|
|
23 #include "..\../Engine/texts.h"
|
2502
|
24 #include "..\../IO/Mouse.h"
|
2501
|
25
|
2541
|
26
|
2501
|
27
|
|
28 int bRingsShownInCharScreen; // 5118E0
|
|
29
|
|
30 unsigned int ui_mainmenu_copyright_color;
|
|
31
|
|
32 unsigned int ui_character_tooltip_header_default_color;
|
|
33 unsigned int ui_character_default_text_color;
|
|
34 unsigned int ui_character_skill_highlight_color;
|
|
35 unsigned int ui_character_header_text_color;
|
|
36 unsigned int ui_character_bonus_text_color;
|
|
37 unsigned int ui_character_bonus_text_color_neg;
|
|
38 unsigned int ui_character_skill_upgradeable_color;
|
|
39 unsigned int ui_character_skill_default_color;
|
|
40 unsigned int ui_character_stat_default_color;
|
|
41 unsigned int ui_character_stat_buffed_color;
|
|
42 unsigned int ui_character_stat_debuffed_color;
|
|
43 unsigned int ui_character_skillinfo_can_learn;
|
|
44 unsigned int ui_character_skillinfo_can_learn_gm;
|
|
45 unsigned int ui_character_skillinfo_cant_learn;
|
|
46 unsigned int ui_character_condition_normal_color;
|
|
47 unsigned int ui_character_condition_light_color;
|
|
48 unsigned int ui_character_condition_moderate_color;
|
|
49 unsigned int ui_character_condition_severe_color;
|
|
50 std::array<unsigned int, 6> ui_character_award_color;
|
|
51
|
|
52 unsigned int ui_game_minimap_outline_color;
|
|
53 unsigned int ui_game_minimap_actor_friendly_color;
|
|
54 unsigned int ui_game_minimap_actor_hostile_color;
|
|
55 unsigned int ui_game_minimap_actor_corpse_color;
|
|
56 unsigned int ui_game_minimap_decoration_color_1;
|
|
57 unsigned int ui_game_minimap_projectile_color;
|
|
58 unsigned int ui_game_minimap_treasure_color;
|
|
59 std::array<unsigned int, 24> ui_game_character_record_playerbuff_colors;
|
|
60
|
|
61 unsigned int ui_gamemenu_video_gamma_title_color;
|
|
62 unsigned int ui_gamemenu_keys_action_name_color;
|
|
63 unsigned int ui_gamemenu_keys_key_selection_blink_color_1;
|
|
64 unsigned int ui_gamemenu_keys_key_selection_blink_color_2;
|
|
65 unsigned int ui_gamemenu_keys_key_default_color;
|
|
66
|
|
67 unsigned int ui_book_quests_title_color;
|
|
68 unsigned int ui_book_quests_text_color;
|
|
69 unsigned int ui_book_autonotes_title_color;
|
|
70 unsigned int ui_book_autonotes_text_color;
|
|
71 unsigned int ui_book_map_title_color;
|
|
72 unsigned int ui_book_map_coordinates_color;
|
|
73
|
|
74 unsigned int ui_book_calendar_title_color;
|
|
75 unsigned int ui_book_calendar_time_color;
|
|
76 unsigned int ui_book_calendar_day_color;
|
|
77 unsigned int ui_book_calendar_month_color;
|
|
78 unsigned int ui_book_calendar_year_color;
|
|
79 unsigned int ui_book_calendar_moon_color;
|
|
80 unsigned int ui_book_calendar_location_color;
|
|
81
|
|
82 unsigned int ui_book_journal_title_color;
|
|
83 unsigned int ui_book_journal_text_color;
|
|
84 unsigned int ui_book_journal_text_shadow;
|
|
85
|
|
86 unsigned int ui_game_dialogue_npc_name_color;
|
|
87 unsigned int ui_game_dialogue_option_highlight_color;
|
|
88 unsigned int ui_game_dialogue_option_normal_color;
|
|
89
|
|
90 unsigned int ui_house_player_cant_interact_color;
|
|
91
|
|
92
|
|
93 void set_default_ui_skin()
|
|
94 {
|
|
95 ui_mainmenu_copyright_color = Color16(255, 255, 255);
|
|
96
|
|
97 ui_character_tooltip_header_default_color = Color16(255, 255, 155);
|
|
98 ui_character_default_text_color = Color16(255, 255, 255);
|
|
99 ui_character_header_text_color = Color16(255, 255, 155);
|
|
100 ui_character_bonus_text_color = Color16(0, 255, 0);
|
|
101 ui_character_bonus_text_color_neg = Color16(255, 0, 0);
|
|
102
|
|
103 ui_character_skill_upgradeable_color = Color16(0, 175, 255);
|
|
104 ui_character_skill_default_color = Color16(255, 0, 0);
|
|
105 ui_character_skill_highlight_color = Color16(255, 0, 0);
|
|
106
|
|
107 ui_character_stat_default_color = Color16(255, 255, 255);
|
|
108 ui_character_stat_buffed_color = Color16(0, 255, 0);
|
|
109 ui_character_stat_debuffed_color = Color16(255, 35, 0);
|
|
110
|
|
111 ui_character_skillinfo_can_learn = Color16(255, 255, 255);
|
|
112 ui_character_skillinfo_can_learn_gm = Color16(255, 255, 0);
|
|
113 ui_character_skillinfo_cant_learn = Color16(255, 0, 0);
|
|
114
|
|
115 ui_character_condition_normal_color = Color16(255, 255, 255);
|
|
116 ui_character_condition_light_color = Color16(0, 255, 0);
|
|
117 ui_character_condition_moderate_color = Color16(225, 205, 35);
|
|
118 ui_character_condition_severe_color = Color16(255, 35, 0);
|
|
119
|
|
120 ui_character_award_color[0] = Color16(248, 108, 160);
|
|
121 ui_character_award_color[1] = Color16(112, 220, 248);
|
|
122 ui_character_award_color[2] = Color16(192, 192, 240);
|
|
123 ui_character_award_color[3] = Color16( 64, 244, 96);
|
|
124 ui_character_award_color[4] = Color16(232, 244, 96);
|
|
125 ui_character_award_color[5] = Color16(240, 252, 192);
|
|
126
|
|
127 ui_game_minimap_outline_color = Color16(0, 0, 255);
|
|
128 ui_game_minimap_actor_friendly_color = Color16(0, 255, 0);
|
|
129 ui_game_minimap_actor_hostile_color = Color16(255, 0, 0);
|
|
130 ui_game_minimap_actor_corpse_color = Color16(255, 255, 0);
|
|
131 ui_game_minimap_decoration_color_1 = Color16(255, 255, 255);
|
|
132 ui_game_minimap_projectile_color = Color16(255, 0, 0);
|
|
133 ui_game_minimap_treasure_color = Color16(0, 0, 255);
|
|
134
|
|
135 ui_game_character_record_playerbuff_colors[0] = Color16(150, 212, 255);
|
|
136 ui_game_character_record_playerbuff_colors[1] = Color16(225, 225, 225);
|
|
137 ui_game_character_record_playerbuff_colors[2] = Color16(255, 128, 0);
|
|
138 ui_game_character_record_playerbuff_colors[3] = Color16(128, 128, 128);
|
|
139 ui_game_character_record_playerbuff_colors[4] = Color16(225, 225, 225);
|
|
140 ui_game_character_record_playerbuff_colors[5] = Color16(255, 85, 0);
|
|
141 ui_game_character_record_playerbuff_colors[6] = Color16(255, 128, 0);
|
|
142 ui_game_character_record_playerbuff_colors[7] = Color16(255, 85, 0);
|
|
143 ui_game_character_record_playerbuff_colors[8] = Color16(225, 225, 225);
|
|
144 ui_game_character_record_playerbuff_colors[9] = Color16(235, 15, 255);
|
|
145 ui_game_character_record_playerbuff_colors[10] = Color16(192, 192, 240);
|
|
146 ui_game_character_record_playerbuff_colors[11] = Color16(225, 225, 225);
|
|
147 ui_game_character_record_playerbuff_colors[12] = Color16(255, 128, 0);
|
|
148 ui_game_character_record_playerbuff_colors[13] = Color16(150, 212, 255);
|
|
149 ui_game_character_record_playerbuff_colors[14] = Color16(128, 128, 128);
|
|
150 ui_game_character_record_playerbuff_colors[15] = Color16(255, 255, 155);
|
|
151 ui_game_character_record_playerbuff_colors[16] = Color16(255, 255, 155);
|
|
152 ui_game_character_record_playerbuff_colors[17] = Color16(255, 255, 155);
|
|
153 ui_game_character_record_playerbuff_colors[18] = Color16(255, 255, 155);
|
|
154 ui_game_character_record_playerbuff_colors[19] = Color16(255, 255, 155);
|
|
155 ui_game_character_record_playerbuff_colors[20] = Color16(255, 255, 155);
|
|
156 ui_game_character_record_playerbuff_colors[21] = Color16(255, 255, 155);
|
|
157 ui_game_character_record_playerbuff_colors[22] = Color16(0, 128, 255);
|
|
158 ui_game_character_record_playerbuff_colors[23] = Color16(0, 128, 255);
|
|
159
|
|
160 ui_gamemenu_video_gamma_title_color = Color16(255, 255, 155);
|
|
161 ui_gamemenu_keys_action_name_color = Color16(255, 255, 255);
|
|
162 ui_gamemenu_keys_key_selection_blink_color_1 = Color16(50, 0, 0);
|
|
163 ui_gamemenu_keys_key_selection_blink_color_2 = Color16(225, 205, 35);
|
|
164 ui_gamemenu_keys_key_default_color = Color16(255, 255, 255);
|
|
165
|
|
166 ui_book_quests_title_color = Color16(255, 255, 255);
|
|
167 ui_book_quests_text_color = Color16(255, 255, 255);
|
|
168 ui_book_autonotes_title_color = Color16(255, 255, 255);
|
|
169 ui_book_autonotes_text_color = Color16(255, 255, 255);
|
|
170 ui_book_map_title_color = Color16(255, 255, 255);
|
|
171 ui_book_map_coordinates_color = Color16(255, 255, 255);
|
|
172
|
|
173 ui_book_calendar_title_color = Color16(255, 255, 255);
|
|
174 ui_book_calendar_time_color = Color16(75, 75, 75);
|
|
175 ui_book_calendar_day_color = Color16(75, 75, 75);
|
|
176 ui_book_calendar_month_color = Color16(75, 75, 75);
|
|
177 ui_book_calendar_year_color = Color16(75, 75, 75);
|
|
178 ui_book_calendar_moon_color = Color16(75, 75, 75);
|
|
179 ui_book_calendar_location_color = Color16(75, 75, 75);
|
|
180
|
|
181 ui_book_journal_title_color = Color16(255, 255, 255);
|
|
182 ui_book_journal_text_color = Color16(255, 255, 255);
|
|
183 ui_book_journal_text_shadow = Color16(0, 0, 0);
|
|
184
|
|
185 ui_game_dialogue_npc_name_color = Color16(21, 153, 233);
|
|
186 ui_game_dialogue_option_highlight_color = Color16(225, 205, 35);
|
|
187 ui_game_dialogue_option_normal_color = Color16(255, 255, 255);
|
|
188
|
|
189 ui_house_player_cant_interact_color = Color16(255, 255, 155);
|
|
190 }
|
|
191
|
|
192 std::array<unsigned int, 16> papredoll_dbrds;
|
|
193 unsigned int papredoll_drhs[4];
|
|
194 unsigned int papredoll_dlhus[4];
|
|
195 unsigned int papredoll_dlhs[4];
|
|
196 unsigned int papredoll_dbods[5];
|
|
197 int paperdoll_armor_texture[4][17][3];//0x511294
|
|
198 //int paperdoll_array_51132C[165];
|
|
199 unsigned int papredoll_dlaus[5];
|
|
200 unsigned int papredoll_dlads[4];
|
|
201 int papredoll_flying_feet[22]; // 005115E0
|
|
202 int paperdoll_boots_texture[4][6];//511638
|
|
203 int paperdoll_cloak_collar_texture[4][10]; // weak
|
|
204 int paperdoll_cloak_texture[4][10];
|
|
205 int paperdoll_helm_texture[2][16]; //511698
|
|
206 int paperdoll_belt_texture[4][7]; //511718
|
|
207
|
|
208 const int paperdoll_Weapon[4][16][2] = {//4E4C30
|
|
209 {{128, 205}, {30, 144}, {88, 85}, {0, 0}, {0, 0}, {0, 0}, {17, 104}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
|
|
210 {{131, 201}, {38, 158}, {98, 87}, {0, 0}, {0, 0}, {0, 0}, {21, 100}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
|
|
211 {{131, 216}, {29, 186}, {88, 119}, {0, 0}, {0, 0}, {0, 0}, { 0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
|
|
212 {{123, 216}, {35, 184}, {98, 119}, {0, 0}, {0, 0}, {0, 0}, { 0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}},
|
|
213 };
|
|
214
|
|
215 const int paperdoll_Boot[4][7][2] = //4E5490
|
|
216 {
|
|
217 0xE, 0x11D, 0xD, 0x11D, 0xC, 0x10A, 0xA, 0xFF, 0xD, 0xF9, 0xD, 0x137, 0xC, 0x10E,
|
|
218 0x14, 0x125, 0x13, 0x122, 0x15, 0x120, 0x15, 0x114, 0x13, 0x10A, 0x11, 0x13E, 0x11, 0x116,
|
|
219 0x1D, 0x121, 0x1C, 0x11F, 0x1B, 0x11B, 0x1C, 0x117, 0x16, 0x116, 0x1B, 0x137, 0x1B, 0x11B,
|
|
220 0x1F, 0x127, 0x1F, 0x122, 0x1B, 0x11B, 0x1D, 0x117, 0x1D, 0x116, 0x1D, 0x137, 0x1B, 0x11F,
|
|
221 };
|
|
222 const int paperdoll_Cloak[4][10][2] = //4E5570
|
|
223 {
|
|
224 0x11, 0x68, 0xF, 0x68, 0x14, 0x71, 0x19, 0x6B, 0x21, 0x6F, 0x5, 0x68, 0x5, 0x68, 0x14, 0x71, 0x3, 0x6B, 0xF, 0x6F,
|
|
225 0x15, 0x64, 0xB, 0x6B, 0xE, 0x67, 0x15, 0x6B, 0x1B, 0x6F, 0x3, 0x6B, 0, 0x6B, 0xE, 0x67, 0, 0x6B, 0x3, 0x6F,
|
|
226 0x10, 0x8A, 0x9, 0x8B, 0x18, 0x98, 0x25, 0x91, 0x29, 0x90, 0x8, 0x8A, 0x9, 0x8B, 0x18, 0x98, 0x3, 0x91, 0x3, 0x90,
|
|
227 0x14, 0x92, 0x10, 0x92, 0x15, 0x98, 0x1F, 0x91, 0x22, 0x90, 0x8, 0x92, 0xC, 0x92, 0x15, 0x98, 0x3, 0x91, 0x3, 0x90,
|
|
228 };
|
|
229 const int paperdoll_CloakCollar[4][10][2] = //4E56B0
|
|
230 {
|
|
231 0x11, 0x68, 0x34, 0x64, 0x21, 0x69, 0x1D, 0x67, 0x20, 0x67, 0x21, 0x68, 0x34, 0x64, 0x21, 0x69, 0x1D, 0x67, 0x1F, 0x67,
|
|
232 0x13, 0x64, 0x35, 0x66, 0x29, 0x68, 0x1F, 0x68, 0x1F, 0x6A, 0x21, 0x6A, 0x2B, 0x66, 0x26, 0x68, 0x1F, 0x68, 0x1F, 0x6A,
|
|
233 0, 0, 0x30, 0x87, 0x1E, 0x86, 0x1B, 0x86, 0x1C, 0x8A, 0x21, 0x87, 0x30, 0x87, 0x1E, 0x86, 0x1B, 0x86, 0x1C, 0x8A,
|
|
234 0, 0, 0x38, 0x8A, 0x24, 0x8B, 0x1D, 0x8B, 0x21, 0x8C, 0x27, 0x8A, 0x34, 0x8A, 0x24, 0x8B, 0x25, 0x8B, 0x21, 0x8C,
|
|
235 };
|
|
236 //int dword_4E56B4; // weak
|
|
237 const int paperdoll_Belt[4][7][2] = //4E57F0
|
|
238 {
|
|
239 0x3A, 0xB6, 0x37, 0xB2, 0x34, 0xB9, 0x3A, 0xB9, 0x37, 0xB7, 0x38, 0xAC, 0x37, 0xB7,
|
|
240 0x3E, 0xAD, 0x3A, 0xAC, 0x37, 0xB0, 0x3A, 0xB1, 0x39, 0xB0, 0x3C, 0xA5, 0x39, 0xB0,
|
|
241 0x3B, 0xD5, 0x37, 0xD2, 0x31, 0xD5, 0x39, 0xD6, 0x37, 0xD8, 0x37, 0xD1, 0x37, 0xD8,
|
|
242 0x42, 0xD2, 0x3F, 0xD0, 0x3B, 0xD7, 0x3C, 0xD5, 0x3B, 0xD6, 0x3E, 0xCF, 0x36, 0xD6,
|
|
243 };
|
|
244 const int paperdoll_Helm[4][16][2] = //4E58D0
|
|
245 {
|
|
246 0x3E, 0x1F, 0x41, 0x2C, 0x37, 0x2F, 0x31, 0x32, 0x37, 0x2A, 0x39, 0x28, 0x36, 0x34, 0x41, 0x38, 0x40, 0x31, 0x40, 0x21, 0x40, 0x31, 0x3C, 0x33, 0x3D, 0x24, 0x3A, 0x1A, 0x37, 0x2A, 0x41, 0x48,
|
|
247 0x41, 0x1E, 0x42, 0x2B, 0x37, 0x2F, 0x34, 0x30, 0x39, 0x29, 0x3A, 0x26, 0x36, 0x34, 0x41, 0x37, 0x42, 0x32, 0x40, 0x21, 0x40, 0x31, 0x40, 0x2F, 0x3E, 0x22, 0x3B, 0x1A, 0x39, 0x29, 0x42, 0x47,
|
|
248 0x3F, 0x47, 0x41, 0x56, 0x37, 0x59, 0x32, 0x5E, 0x37, 0x58, 0x39, 0x54, 0x34, 0x61, 0x40, 0x61, 0x41, 0x5D, 0x3E, 0x4F, 0x3E, 0x5B, 0x3D, 0x5B, 0x3F, 0x4C, 0x3B, 0x45, 0x37, 0x58, 0x41, 0x74,
|
|
249 0x45, 0x45, 0x46, 0x54, 0x3A, 0x55, 0x38, 0x58, 0x3C, 0x54, 0x3F, 0x52, 0x39, 0x5B, 0x45, 0x5C, 0x47, 0x5C, 0x44, 0x4B, 0x44, 0x57, 0x43, 0x55, 0x44, 0x4A, 0x3E, 0x45, 0x3C, 0x54, 0x47, 0x70,
|
|
250 };
|
|
251 const int pPaperdoll_Beards[4] = //4E5AD0
|
|
252 {
|
|
253 52, 130, 56, 136,
|
|
254 };
|
|
255 const int pPaperdoll_LeftHand[4][2] = //4E5AE0
|
|
256 {
|
|
257 0x67, 0x6A,
|
|
258 0x65, 0x6C,
|
|
259 0x74, 0x8D,
|
|
260 0x74, 0x93,
|
|
261 };
|
|
262 const int pPaperdoll_SecondLeftHand[4][2] = //4E5B00
|
|
263 {
|
|
264 0x1A, 0x6B,
|
|
265 0x28, 0x6D,
|
|
266 0x19, 0x8D,
|
|
267 0x20, 0x92,
|
|
268 };
|
|
269 const int pPaperdoll_RightHand[4][2] = //4E5B20
|
|
270 {
|
|
271 0x1E, 0x90,
|
|
272 0x22, 0x9E,
|
|
273 0x19, 0xBA,
|
|
274 0x1F, 0xB8,
|
|
275 };
|
|
276 const int pPaperdollLeftEmptyHand[4][2] = //4E5B40
|
|
277 {
|
|
278 0x80, 0xCD,
|
|
279 0x83, 0xC9,
|
|
280 0x83, 0xD8,
|
|
281 0x7B, 0xD8,
|
|
282 };
|
|
283
|
|
284 int pPaperdoll_BodyX = 481; // 004E4C28
|
|
285 int pPaperdoll_BodyY = 0; // 004E4C2C
|
|
286 const int paperdoll_Armor_Coord[4][17][2] = //4E4E30
|
|
287 {
|
|
288 // X Y
|
|
289 0x2C, 0x67, 0x30, 0x69, 0x2D, 0x67, 0x2C, 0x64, 0x14, 0x66, 0x22, 0x67, 0x20, 0x66, 0x25, 0x66, 0x12, 0x66,//Human
|
|
290 0x0A, 0x66, 0x13, 0x64, 0x0E, 0x64, 0x0A, 0x63, 0x14, 0x66, 0x0A, 0x63, 0x0A, 0x66, 0x25, 0x66,
|
|
291
|
|
292 0x32, 0x68, 0x32, 0x69, 0x35, 0x69, 0x33, 0x68, 0x24, 0x67, 0x30, 0x69, 0x33, 0x68, 0x31, 0x69, 0x19, 0x69,
|
|
293 0x19, 0x6A, 0x16, 0x66, 0x16, 0x65, 0x0F, 0x6B, 0x24, 0x67, 0x0F, 0x6B, 0x19, 0x6A, 0x31, 0x69,
|
|
294
|
|
295 0x2A, 0x8C, 0x29, 0x8C, 0x2A, 0x89, 0x29, 0x86, 0x12, 0x87, 0x2D, 0x89, 0x2A, 0x88, 0x25, 0x87, 0x12, 0x8B,
|
|
296 0x12, 0x8B, 0x11, 0x8A, 0x15, 0x87, 0x09, 0x89, 0x12, 0x87, 0x09, 0x89, 0x12, 0x8B, 0x25, 0x87,
|
|
297
|
|
298 0x33, 0x90, 0x32, 0x90, 0x34, 0x91, 0x32, 0x8E, 0x21, 0x8B, 0x31, 0x8B, 0x33, 0x8E, 0x2F, 0x8F, 0x16, 0x8D,
|
|
299 0x18, 0x8C, 0x19, 0x8C, 0x1B, 0x8E, 0x0C, 0x8C, 0x21, 0x8B, 0x0C, 0x8C, 0x18, 0x8C, 0x2F, 0x8F,
|
|
300 };
|
|
301 const int paperdoll_shoulder_coord[4][17][2] = //4E5050
|
|
302 {
|
|
303 0x64, 0x67, 0x61, 0x67, 0x65, 0x68, 0x6E, 0x74, 0x6C, 0x68, 0x61, 0x67, 0x66, 0x68, 0x6C, 0x6A, 0x6E, 0x6D,
|
|
304 0x67, 0x69, 0x70, 0x67, 0x6E, 0x6D, 0x6C, 0x6F, 0x6C, 0x68, 0x6C, 0x6F, 0x67, 0x69, 0x6C, 0x6A,
|
|
305
|
|
306 0x60, 0x6B, 0x60, 0x6C, 0x60, 0x6B, 0x61, 0x6A, 0x60, 0x69, 0x60, 0x6A, 0x60, 0x6A, 0x61, 0x69, 0x63, 0x6A,
|
|
307 0x64, 0x6A, 0x61, 0x66, 0x66, 0x67, 0x64, 0x6C, 0x60, 0x69, 0x64, 0x6C, 0x64, 0x6A, 0x61, 0x69,
|
|
308
|
|
309 0x6D, 0x8C, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x6A, 0x89, 0, 0, 0x73, 0x8C, 0x69, 0x8C, 0x6E, 0x8D,
|
|
310 0x71, 0x8D, 0x70, 0x8D, 0x72, 0x8D, 0x74, 0x8E, 0x6A, 0x89, 0x74, 0x8E, 0x71, 0x8D, 0x69, 0x8C,
|
|
311
|
|
312 0x72, 0x91, 0x72, 0x91, 0, 0, 0x6E, 0x92, 0x6F, 0x91, 0, 0, 0, 0, 0x6E, 0x91, 0x71, 0x90,
|
|
313 0x72, 0x8D, 0x72, 0x90, 0x73, 0x93, 0x73, 0x90, 0x6F, 0x91, 0x73, 0x90, 0x72, 0x8D, 0x6E, 0x91,
|
|
314 };
|
|
315 const int paperdoll_shoulder_second_coord[4][17][2] = //dword_4E5270
|
|
316 {
|
|
317 0, 0, 0x61, 0x67, 0, 0, 0x64, 0x69, 0x64, 0x68, 0, 0, 0, 0, 0x5E, 0x66, 0x5F, 0x69,
|
|
318 0x55, 0x69, 0x5F, 0x67, 0x5F, 0x68, 0x32, 0x69, 0x64, 0x68, 0x32, 0x69, 0x55, 0x69, 0x5E, 0x66,
|
|
319
|
|
320 0, 0, 0x60, 0x6C, 0, 0, 0x60, 0x6C, 0x5E, 0x69, 0, 0, 0, 0, 0x5D, 0x6A, 0x5B, 0x6A,
|
|
321 0x5B, 0x6A, 0x59, 0x69, 0x56, 0x68, 0x38, 0x6E, 0x5E, 0x69, 0x38, 0x6E, 0x5B, 0x6A, 0x5D, 0x6A,
|
|
322
|
|
323 0, 0, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x62, 0x89, 0, 0, 0, 0, 0x69, 0x8C, 0x5E, 0x8D,
|
|
324 0x61, 0x8D, 0x5F, 0x8D, 0x60, 0x8D, 0x2E, 0x8C, 0x62, 0x89, 0x2E, 0x8C, 0x61, 0x8D, 0x69, 0x8C,
|
|
325
|
|
326 0, 0, 0x72, 0x91, 0, 0, 0x72, 0x91, 0x67, 0x8F, 0, 0, 0, 0, 0x6E, 0x91, 0x64, 0x93,
|
|
327 0x65, 0x8C, 0x65, 0x91, 0x67, 0x91, 0x36, 0x90, 0x67, 0x8F, 0x36, 0x90, 0x65, 0x8C, 0x6E, 0x91,
|
|
328 };
|
|
329
|
|
330 const char *dlad_texnames_by_face[25] =
|
|
331 {
|
|
332 "pc01lad", "pc02lad", "pc03lad", "pc04lad", "pc05lad", "pc06lad",
|
|
333 "pc07lad", "pc08lad", "pc09lad", "pc10lad", "pc11lad", "pc12lad",
|
|
334 "pc13lad", "pc14lad", "pc15lad", "pc16lad", "pc17lad", "pc18lad",
|
|
335 "pc19lad", "pc20lad", "pc21lad", "pc22lad", "pc23lad", "pc24lad",
|
|
336 "pc25lad"
|
|
337 };
|
|
338 const char *dlau_texnames_by_face[25] =
|
|
339 {
|
|
340 "pc01lau", "pc02lau", "pc03lau", "pc04lau", "pc05lau", "pc06lau",
|
|
341 "pc07lau", "pc08lau", "pc09lau", "pc10lau", "pc11lau", "pc12lau",
|
|
342 "pc13lau", "pc14lau", "pc15lau", "pc16lau", "pc17lau", "pc18lau",
|
|
343 "pc19lau", "pc20lau", "pc21lau", "pc22lau", "pc23lau", "pc24lau",
|
|
344 "pc25lau"
|
|
345 };
|
|
346 const char *dbod_texnames_by_face[25] =
|
|
347 {
|
|
348 "pc01bod", "pc02bod", "pc03bod", "pc04bod", "pc05bod", "pc06bod",
|
|
349 "pc07bod", "pc08bod", "pc09bod", "pc10bod", "pc11bod", "pc12bod",
|
|
350 "pc13bod", "pc14bod", "pc15bod", "pc16bod", "pc17bod", "pc18bod",
|
|
351 "pc19bod", "pc20bod", "pc21bod", "pc22bod", "pc23bod", "pc24bod",
|
|
352 "pc25bod"
|
|
353 };
|
|
354 const char *drh_texnames_by_face[25] =
|
|
355 {
|
|
356
|
|
357 "pc01rh", "pc02rh", "pc03rh", "pc04rh", "pc05rh", "pc06rh",
|
|
358 "pc07rh", "pc08rh", "pc09rh", "pc10rh", "pc11rh", "pc12rh",
|
|
359 "pc13rh", "pc14rh", "pc15rh", "pc16rh", "pc17rh", "pc18rh",
|
|
360 "pc19rh", "pc20rh", "pc21rh", "pc22rh", "pc23rh", "pc24rh",
|
|
361 "pc25rh"
|
|
362 };
|
|
363 const char *dlh_texnames_by_face[25] =
|
|
364 {
|
|
365 "pc01lh", "pc02lh", "pc03lh", "pc04lh", "pc05lh", "pc06lh",
|
|
366 "pc07lh", "pc08lh", "pc09lh", "pc10lh", "pc11lh", "pc12lh",
|
|
367 "pc13lh", "pc14lh", "pc15lh", "pc16lh", "pc17lh", "pc18lh",
|
|
368 "pc19lh", "pc20lh", "pc21lh", "pc22lh", "pc23lh", "pc24lh",
|
|
369 "pc25lh"
|
|
370 };
|
|
371 const char *dlhu_texnames_by_face[25] =
|
|
372 {
|
|
373 "pc01lhu", "pc02lhu", "pc03lhu", "pc04lhu", "pc05lhu", "pc06lhu",
|
|
374 "pc07lhu", "pc08lhu", "pc09lhu", "pc10lhu", "pc11lhu", "pc12lhu",
|
|
375 "pc13lhu", "pc14lhu", "pc15lhu", "pc16lhu", "pc17lhu", "pc18lhu",
|
|
376 "pc19lhu", "pc20lhu", "pc21lhu", "pc22lhu", "pc23lhu", "pc24lhu",
|
|
377 "pc25lhu"
|
|
378 };
|
|
379
|
|
380 const int pArmorSkills[5] = {PLAYER_SKILL_LEATHER, PLAYER_SKILL_CHAIN, PLAYER_SKILL_PLATE, PLAYER_SKILL_SHIELD, PLAYER_SKILL_DODGE};
|
|
381 const int pWeaponSkills[9] = {PLAYER_SKILL_AXE, PLAYER_SKILL_BOW, PLAYER_SKILL_DAGGER, PLAYER_SKILL_MACE, PLAYER_SKILL_SPEAR,
|
|
382 PLAYER_SKILL_STAFF, PLAYER_SKILL_SWORD, PLAYER_SKILL_UNARMED, PLAYER_SKILL_BLASTER};
|
|
383 const int pMiscSkills[12] = {PLAYER_SKILL_ALCHEMY, PLAYER_SKILL_ARMSMASTER, PLAYER_SKILL_BODYBUILDING, PLAYER_SKILL_ITEM_ID, PLAYER_SKILL_MONSTER_ID,
|
|
384 PLAYER_SKILL_LEARNING, PLAYER_SKILL_TRAP_DISARM, PLAYER_SKILL_MEDITATION, PLAYER_SKILL_MERCHANT, PLAYER_SKILL_PERCEPTION,
|
|
385 PLAYER_SKILL_REPAIR, PLAYER_SKILL_STEALING};
|
|
386 const int pMagicSkills[9] = {PLAYER_SKILL_FIRE, PLAYER_SKILL_AIR, PLAYER_SKILL_WATER, PLAYER_SKILL_EARTH, PLAYER_SKILL_SPIRIT,
|
|
387 PLAYER_SKILL_MIND, PLAYER_SKILL_BODY, PLAYER_SKILL_LIGHT, PLAYER_SKILL_DARK};
|
|
388
|
|
389 //----- (00421626) --------------------------------------------------------
|
2541
|
390 GUIWindow *CharacterUI_Initialize(enum CURRENT_SCREEN screen)
|
2501
|
391 {
|
|
392 ++pIcons_LOD->uTexturePacksCount;
|
|
393 if ( !pIcons_LOD->uNumPrevLoadedFiles )
|
|
394 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
|
|
395
|
|
396 pEventTimer->Pause();
|
|
397 pAudioPlayer->StopChannels(-1, -1);
|
|
398 bRingsShownInCharScreen = false;
|
|
399 CharacterUI_LoadPaperdollTextures();
|
2541
|
400 current_screen_type = screen;
|
2501
|
401
|
2541
|
402 auto wnd = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_CharacterRecord, uActiveCharacter, 0);
|
|
403 pCharacterScreen_StatsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308,
|
2501
|
404 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth,
|
|
405 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight,
|
|
406 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats
|
|
407 pIcons_LOD->GetTexture(papredoll_dbrds[10]),
|
|
408 pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0);
|
2541
|
409 pCharacterScreen_SkillsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308,
|
2501
|
410 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth,
|
|
411 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight,
|
|
412 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills
|
|
413 pIcons_LOD->GetTexture(papredoll_dbrds[8]),
|
|
414 pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0);
|
2541
|
415 pCharacterScreen_InventoryBtn = wnd->CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308,
|
2501
|
416 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth,
|
|
417 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight,
|
|
418 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory
|
|
419 pIcons_LOD->GetTexture(papredoll_dbrds[6]),
|
|
420 pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0);
|
2541
|
421 pCharacterScreen_AwardsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308,
|
2501
|
422 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth,
|
|
423 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight,
|
|
424 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards
|
|
425 pIcons_LOD->GetTexture(papredoll_dbrds[4]),
|
|
426 pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0);
|
2541
|
427 pCharacterScreen_ExitBtn = wnd->CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308,
|
2501
|
428 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth,
|
|
429 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight,
|
|
430 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit
|
|
431 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
|
|
432 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
|
2541
|
433 wnd->CreateButton(0, 0, 476, 345, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
|
|
434 pCharacterScreen_DetalizBtn = wnd->CreateButton(600, 300, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0);
|
|
435 pCharacterScreen_DollBtn = wnd->CreateButton(476, 0, 164, 345, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
|
2501
|
436
|
2541
|
437 wnd->CreateButton(61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
|
|
438 wnd->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
|
|
439 wnd->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
|
|
440 wnd->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
|
2501
|
441
|
2541
|
442 wnd->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0);
|
2501
|
443 FillAwardsData();
|
2541
|
444
|
|
445 return wnd;
|
2501
|
446 }
|
|
447
|
|
448 //----- (004219BE) --------------------------------------------------------
|
|
449 GUIWindow *CastSpellInfo::GetCastSpellInInventoryWindow()
|
|
450 {
|
|
451 GUIWindow *CS_inventory_window; // ebx@1
|
|
452
|
|
453 pEventTimer->Pause();
|
|
454 pAudioPlayer->StopChannels(-1, -1);
|
|
455 bRingsShownInCharScreen = 0;
|
|
456 CharacterUI_LoadPaperdollTextures();
|
2541
|
457 current_screen_type = SCREEN_CASTING;
|
2501
|
458 CS_inventory_window = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_CastSpell_InInventory, (int)this, 0);
|
|
459 pCharacterScreen_ExitBtn = CS_inventory_window->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0,
|
|
460 pGlobalTXT_LocalizationStrings[79], // Close
|
|
461 pIcons_LOD->GetTexture(papredoll_dbrds[2]),
|
|
462 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0);
|
|
463 CS_inventory_window->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0);
|
|
464 pCharacterScreen_DollBtn = CS_inventory_window->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0);
|
|
465
|
|
466 CS_inventory_window->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0);
|
|
467 CS_inventory_window->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0);
|
|
468 CS_inventory_window->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0);
|
|
469 CS_inventory_window->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0);
|
|
470
|
|
471 return CS_inventory_window;
|
|
472 }
|
|
473
|
|
474 static int CharacterUI_SkillsTab_Draw__DrawSkillTable(Player *player, int x, int y, const int *skill_list, int skill_list_size, int right_margin, const char *skill_group_name)
|
|
475 {
|
|
476 int y_offset = y;
|
|
477
|
|
478 sprintf(pTmpBuf.data(), "%s\r%03d%s", skill_group_name, right_margin, pGlobalTXT_LocalizationStrings[131]); //"Level"
|
|
479 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf.data(), 0, 0, 0);
|
|
480
|
|
481 int num_skills_drawn = 0;
|
|
482 for (int i = 0; i < skill_list_size; ++i)
|
|
483 {
|
|
484 PLAYER_SKILL_TYPE skill = (PLAYER_SKILL_TYPE)skill_list[i];
|
|
485 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j)
|
|
486 {
|
|
487 GUIButton* v8 = pGUIWindow_CurrentMenu->pControlsHead;
|
|
488
|
|
489 for (int v7 = j; v7 > 0; --v7)
|
|
490 v8 = v8->pNext;
|
|
491
|
|
492 int v9 = v8->field_1C;
|
|
493 if ((short)(v8->field_1C) >= 0)
|
|
494 continue;
|
|
495 if ( (v9 & 0x7FFF) != skill )
|
|
496 continue;
|
|
497
|
|
498 ++num_skills_drawn;
|
|
499 y_offset = v8->uY;
|
|
500
|
|
501 ushort skill_value = player->pActiveSkills[skill];
|
|
502 int skill_level = skill_value & 0x3F;
|
|
503
|
|
504 uint skill_color = 0;
|
|
505 uint skill_mastery_color = 0;
|
|
506 if (player->uSkillPoints > skill_level)
|
|
507 skill_color = ui_character_skill_upgradeable_color;
|
|
508
|
|
509 if (pGUIWindow_CurrentMenu->pCurrentPosActiveItem == j)
|
|
510 {
|
|
511 if (player->uSkillPoints > skill_level)
|
|
512 skill_mastery_color = ui_character_bonus_text_color;
|
|
513 else
|
|
514 skill_mastery_color = ui_character_skill_default_color;
|
|
515 skill_color = skill_mastery_color;
|
|
516 }
|
|
517
|
|
518 if (SkillToMastery(skill_value) == 1)
|
|
519 {
|
|
520 sprintfex(pTmpBuf.data(), "%s\r%03d%2d", pSkillNames[skill], right_margin, skill_level);
|
|
521 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf.data(), 0, 0, 0);
|
|
522 }
|
|
523 else
|
|
524 {
|
|
525 const char *skill_level_str = nullptr;
|
|
526
|
|
527 switch (SkillToMastery(skill_value))
|
|
528 {
|
|
529 case 4: skill_level_str = pGlobalTXT_LocalizationStrings[96]; break; // "Grand"
|
|
530 case 3: skill_level_str = pGlobalTXT_LocalizationStrings[432]; break; // Master
|
|
531 case 2: skill_level_str = pGlobalTXT_LocalizationStrings[433]; break; // Expert
|
|
532 }
|
|
533
|
|
534 if (!skill_mastery_color)
|
|
535 skill_mastery_color = ui_character_header_text_color;
|
|
536 sprintfex(pTmpBuf.data(), "%s \f%05d%s\f%05d\r%03d%2d", pSkillNames[skill], skill_mastery_color, skill_level_str, skill_color, right_margin, skill_level);
|
|
537 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf.data(), 0, 0, 0);
|
|
538 }
|
|
539 }
|
|
540 }
|
|
541
|
|
542 if (!num_skills_drawn)
|
|
543 {
|
|
544 y_offset += LOBYTE(pFontLucida->uFontHeight) - 3;
|
|
545 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, y_offset, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0); //"None"
|
|
546 }
|
|
547
|
|
548 return y_offset;
|
|
549 }
|
|
550
|
|
551 //----- (00419719) --------------------------------------------------------
|
|
552 void CharacterUI_SkillsTab_Draw(Player *player)
|
|
553 {
|
|
554 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE));
|
|
555
|
|
556 sprintfex(pTmpBuf.data(), "%s \f%05d^Pv[%s]\f00000\r177%s: \f%05d%d\f00000",
|
|
557 pGlobalTXT_LocalizationStrings[206], // Skills for
|
|
558 ui_character_header_text_color,
|
|
559 player->pName,
|
|
560 pGlobalTXT_LocalizationStrings[207], // Skill Points
|
|
561 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color,
|
|
562 player->uSkillPoints);
|
|
563 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0);
|
|
564
|
|
565 int y = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
566 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 24, y, pWeaponSkills, 9, 400, pGlobalTXT_LocalizationStrings[242]); // "Weapons"
|
|
567
|
|
568 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
|
|
569 CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 24, y, pMagicSkills, 9, 400, pGlobalTXT_LocalizationStrings[138]); // "Magic"
|
|
570
|
|
571 y = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
|
|
572 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pArmorSkills, 5, 177, pGlobalTXT_LocalizationStrings[11]); // "Armor"
|
|
573
|
|
574 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10;
|
|
575 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc"
|
|
576 }
|
|
577
|
|
578 //----- (0041A000) --------------------------------------------------------
|
|
579 void CharacterUI_AwardsTab_Draw(Player *player)
|
|
580 {
|
|
581 int items_per_page; // eax@1
|
|
582 char *v6; // ebx@15
|
|
583 char Source[100]; // [sp+Ch] [bp-C4h]@1
|
|
584 GUIWindow awards_window; // [sp+70h] [bp-60h]@1
|
|
585
|
|
586 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE));
|
|
587 sprintfex(pTmpBuf.data(), "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_character_header_text_color);
|
|
588 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]);
|
|
589 strcat(pTmpBuf.data(), Source);
|
|
590 strcat(pTmpBuf.data(), "\f00000");
|
|
591
|
|
592 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0);
|
|
593 items_per_page = books_primary_item_per_page;
|
|
594 awards_window.uFrameX = 12;
|
|
595 awards_window.uFrameY = 48;
|
|
596 awards_window.uFrameWidth = 424;
|
|
597 awards_window.uFrameHeight = 290;
|
|
598 awards_window.uFrameZ = 435;
|
|
599 awards_window.uFrameW = 337;
|
|
600 if (BtnDown_flag && num_achieved_awards + books_primary_item_per_page < full_num_items_in_book)
|
|
601 items_per_page = books_primary_item_per_page++ + 1;
|
|
602 if (BtnUp_flag && items_per_page)
|
|
603 {
|
|
604 --items_per_page;
|
|
605 books_primary_item_per_page = items_per_page;
|
|
606 }
|
|
607
|
|
608 if ( books_page_number < 0 )
|
|
609 {
|
|
610 items_per_page += num_achieved_awards;
|
|
611 books_primary_item_per_page = items_per_page;
|
|
612 if ( (signed int)(num_achieved_awards + items_per_page) > full_num_items_in_book )
|
|
613 {
|
|
614 items_per_page = full_num_items_in_book - num_achieved_awards;
|
|
615 books_primary_item_per_page = items_per_page;
|
|
616 }
|
|
617 }
|
|
618 else if ( books_page_number > 0 )
|
|
619 {
|
|
620 items_per_page -= num_achieved_awards;
|
|
621 books_primary_item_per_page = items_per_page;
|
|
622 if ( items_per_page < 0 )
|
|
623 {
|
|
624 items_per_page = 0;
|
|
625 books_primary_item_per_page = items_per_page;
|
|
626 }
|
|
627 }
|
|
628 BtnDown_flag = 0;
|
|
629 BtnUp_flag = 0;
|
|
630 num_achieved_awards = 0;
|
|
631 books_page_number = 0;
|
|
632
|
|
633 for ( int i = items_per_page; i < full_num_items_in_book; ++i)
|
|
634 {
|
|
635 v6 = (char *)pAwards[achieved_awards[i]].pText;//(char *)dword_723E80_award_related[v20 / 4];
|
|
636 pTmpBuf[0] = 0;
|
|
637 switch (achieved_awards[i])
|
|
638 {
|
|
639 case Award_Arena_PageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaPageWins); break;
|
|
640 case Award_Arena_SquireWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaSquireWins); break;
|
|
641 case Award_Arena_KnightWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaKnightWins); break;
|
|
642 case Award_Arena_LordWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaLordWins); break;
|
|
643 case Award_ArcomageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageWins); break;
|
|
644 case Award_ArcomageLoses: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageLoses); break;
|
|
645 case Award_Deaths: sprintf(pTmpBuf.data(), v6, pParty->uNumDeaths); break;
|
|
646 case Award_BountiesCollected: sprintf(pTmpBuf.data(), v6, pParty->uNumBountiesCollected); break;
|
|
647 case Award_Fine: sprintf(pTmpBuf.data(), v6, pParty->uFine); break;
|
|
648 case Award_PrisonTerms: sprintf(pTmpBuf.data(), v6, pParty->uNumPrisonTerms); break;
|
|
649 }
|
|
650
|
|
651 if (*pTmpBuf.data())
|
|
652 v6 = pTmpBuf.data();
|
|
653
|
|
654 awards_window.DrawText(pFontArrus, 0, 0, ui_character_award_color[pAwards[achieved_awards[i]].uPriority % 6], v6, 0, 0, 0);
|
|
655 awards_window.uFrameY = pFontArrus->CalcTextHeight(v6, &awards_window, 0, 0) + awards_window.uFrameY + 8;
|
|
656 if (awards_window.uFrameY > awards_window.uFrameHeight)
|
|
657 break;
|
|
658
|
|
659 ++num_achieved_awards;
|
|
660 }
|
|
661 }
|
|
662
|
|
663 //----- (0041A2C1) --------------------------------------------------------
|
|
664 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels)
|
|
665 {
|
|
666 if ( (signed int)uNumPixels < 14 )
|
|
667 uNumPixels = 14;
|
|
668 return ((signed int)(uNumPixels - 14) >> 5) + 1;
|
|
669 }
|
|
670
|
|
671 //----- (0041A556) --------------------------------------------------------
|
|
672 void draw_leather()
|
|
673 {
|
|
674 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather));
|
|
675 }
|
|
676
|
|
677 //----- (0041ABFD) --------------------------------------------------------
|
|
678 void CharacterUI_CharacterScreen_Draw(Player *player)
|
|
679 {
|
|
680 pRenderer->ClearZBuffer(0, 479);
|
|
681 switch (pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0])
|
|
682 {
|
|
683 case WINDOW_CharacterWindow_Stats: // stats
|
|
684 CharacterUI_ReleaseButtons();
|
|
685 ReleaseAwardsScrollBar();
|
|
686 CharacterUI_StatsTab_Draw(player);
|
|
687 pRenderer->DrawTextureIndexed(pCharacterScreen_StatsBtn->uX,
|
|
688 pCharacterScreen_StatsBtn->uY,
|
|
689 pIcons_LOD->LoadTexturePtr("ib-cd1-d", TEXTURE_16BIT_PALETTE));
|
|
690 break;
|
|
691
|
|
692 case WINDOW_CharacterWindow_Skills: // skills
|
|
693 if (dword_507CC0_activ_ch != uActiveCharacter)
|
|
694 {
|
|
695 CharacterUI_ReleaseButtons();
|
|
696 CharacterUI_SkillsTab_CreateButtons();
|
|
697 }
|
|
698 ReleaseAwardsScrollBar();
|
|
699 CharacterUI_SkillsTab_Draw(player);
|
|
700 pRenderer->DrawTextureIndexed(pCharacterScreen_SkillsBtn->uX,
|
|
701 pCharacterScreen_SkillsBtn->uY,
|
|
702 pIcons_LOD->LoadTexturePtr("ib-cd2-d", TEXTURE_16BIT_PALETTE));
|
|
703 break;
|
|
704
|
|
705 case WINDOW_CharacterWindow_Awards: // awards
|
|
706 CharacterUI_ReleaseButtons();
|
|
707 ReleaseAwardsScrollBar();
|
|
708 CreateAwardsScrollBar();
|
|
709 CharacterUI_AwardsTab_Draw(player);
|
|
710 pRenderer->DrawTextureIndexed(pCharacterScreen_AwardsBtn->uX,
|
|
711 pCharacterScreen_AwardsBtn->uY,
|
|
712 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE));
|
|
713 break;
|
|
714
|
|
715 case WINDOW_CharacterWindow_Inventory: // inventory and other
|
|
716 CharacterUI_ReleaseButtons();
|
|
717 ReleaseAwardsScrollBar();
|
|
718 CharacterUI_InventoryTab_Draw(player, false);
|
|
719 pRenderer->DrawTextureIndexed(pCharacterScreen_InventoryBtn->uX,
|
|
720 pCharacterScreen_InventoryBtn->uY,
|
|
721 pIcons_LOD->LoadTexturePtr("ib-cd3-d", TEXTURE_16BIT_PALETTE));
|
|
722 break;
|
|
723
|
|
724 default: break;
|
|
725 }
|
|
726
|
|
727 if (bRingsShownInCharScreen)
|
|
728 CharacterUI_DrawPaperdollWithRingOverlay(player);
|
|
729 else
|
|
730 CharacterUI_DrawPaperdoll(player);
|
|
731 }
|
|
732
|
|
733 //----- (0043CC7C) --------------------------------------------------------
|
|
734 void CharacterUI_DrawPaperdoll(Player *player)
|
|
735 {
|
|
736 ItemGen *item; // edi@38
|
|
737 int item_X; // ebx@38
|
|
738 int index; // eax@65
|
|
739 int v59; // ebx@129
|
|
740 unsigned int v75; // ebx@170
|
|
741 int v94; // ebx@214
|
|
742 unsigned int v127; // ebx@314
|
|
743 unsigned int v153; // eax@370
|
|
744 char *v166; // [sp-8h] [bp-54h]@16
|
|
745 const char *container; // [sp-8h] [bp-54h]@79
|
|
746 char *v181; // [sp-8h] [bp-54h]@337
|
|
747 int item_Y; // [sp+10h] [bp-3Ch]@38
|
|
748 int pBodyComplection; // [sp+24h] [bp-28h]@6
|
|
749 bool two_handed_left_fist; // [sp+34h] [bp-18h]@361
|
|
750 signed int IsDwarf; // [sp+40h] [bp-Ch]@4
|
|
751
|
|
752 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
|
|
753 if (player->GetRace() == CHARACTER_RACE_DWARF)
|
|
754 {
|
|
755 IsDwarf = 1;
|
|
756 pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 2 : 3;
|
|
757 }
|
|
758 else
|
|
759 {
|
|
760 IsDwarf = 0;
|
|
761 pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 0 : 1;
|
|
762 }
|
|
763
|
|
764 int uPlayerID = 0;
|
|
765 for (uint i = 0; i < 4; ++i)
|
|
766 if (pPlayers[i + 1] == player)
|
|
767 {
|
|
768 uPlayerID = i + 1;
|
|
769 break;
|
|
770 }
|
|
771
|
2524
|
772 pRenderer->ResetUIClipRect();
|
2501
|
773 pRenderer->DrawTextureIndexed(467, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Подложка
|
|
774 if ( IsPlayerWearingWatersuit[uPlayerID] )//акваланг
|
|
775 {
|
2524
|
776 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
|
2501
|
777 if ( !bRingsShownInCharScreen )
|
|
778 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor);
|
|
779 //Рука не занята или ...
|
|
780 if ( !player->GetItem(&PlayerEquipment::uMainHand)
|
|
781 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED)
|
|
782 && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR
|
|
783 || player->GetItem(&PlayerEquipment::uShield)) )
|
2524
|
784 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
|
2501
|
785 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
|
|
786 //-----------------------------------------------------(Hand/Рука)---------------------------------------------------------------
|
|
787 if ( player->GetItem(&PlayerEquipment::uMainHand) )
|
|
788 {
|
|
789 item = player->GetMainHandItem();
|
|
790 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX;
|
|
791 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY;
|
|
792 if ( item->uItemID == 64 ) //blaster
|
|
793 v166 = "item64v1";
|
|
794 else
|
|
795 v166 = item->GetIconName();
|
|
796
|
|
797 if ( item->ItemEnchanted() )
|
|
798 {
|
|
799 if ( item->AuraEffectRed() )
|
|
800 container = "sptext01";
|
|
801 else if ( item->AuraEffectBlue() )
|
|
802 container = "sp28a";
|
|
803 else if ( item->AuraEffectGreen() )
|
|
804 container = "sp30a";
|
|
805 else if ( item->AuraEffectPurple() )
|
|
806 container = "sp91a";
|
|
807 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
808 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
809 {
|
|
810 _50C9A8_item_enchantment_timer = 0;
|
|
811 item->ResetEnchantAnimation();
|
|
812 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
813 }
|
|
814 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)),
|
|
815 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
|
|
816 }
|
|
817 else if ( item->uAttributes & ITEM_BROKEN )
|
|
818 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
|
|
819 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
820 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
|
2501
|
821 else
|
|
822 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)));
|
|
823
|
|
824 if ( !bRingsShownInCharScreen )
|
|
825 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), player->pEquipment.uMainHand);
|
|
826 }
|
|
827 }
|
|
828 else// без акваланга
|
|
829 {
|
|
830 //----------------(Bow/ Лук)-------------------------------------------------
|
|
831 if ( player->GetItem(&PlayerEquipment::uBow) )
|
|
832 {
|
|
833 item = player->GetBowItem();
|
|
834 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[item->uItemID].uEquipX;
|
|
835 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[item->uItemID].uEquipY;
|
|
836
|
|
837 if ( item->ItemEnchanted() )// применён закл
|
|
838 {
|
|
839 if ( item->AuraEffectRed() )
|
|
840 container = "sptext01";
|
|
841 else if ( item->AuraEffectBlue() )
|
|
842 container = "sp28a";
|
|
843 else if ( item->AuraEffectGreen() )
|
|
844 container = "sp30a";
|
|
845 else if ( item->AuraEffectPurple() )
|
|
846 container = "sp91a";
|
|
847 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
848 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
849 {
|
|
850 _50C9A8_item_enchantment_timer = 0;
|
|
851 item->ResetEnchantAnimation();
|
|
852 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
853 }
|
|
854 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)),
|
|
855 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),GetTickCount() * 0.1, 0, 255);
|
|
856 }
|
|
857 else if ( item->uAttributes & ITEM_BROKEN )
|
|
858 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)));
|
|
859 else if ( !(item->uAttributes & ITEM_IDENTIFIED) )//не опознанный лук зелёный
|
|
860 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)));
|
|
861 else // опознанный лук
|
2524
|
862 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)));
|
2501
|
863
|
|
864 if ( !bRingsShownInCharScreen )
|
|
865 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)),
|
|
866 player->pEquipment.uBow);
|
|
867 }
|
|
868 //-----------------------------(Cloak/Плащ)---------------------------------------------------------
|
|
869 if ( player->GetItem(&PlayerEquipment::uCloak) )
|
|
870 {
|
|
871 item = player->GetCloakItem();
|
|
872 switch ( item->uItemID )
|
|
873 {
|
|
874 case ITEM_RELIC_TWILIGHT:
|
|
875 index = 5;
|
|
876 break;
|
|
877 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP:
|
|
878 index = 6;
|
|
879 break;
|
|
880 case ITEM_RARE_SUN_CLOAK:
|
|
881 index = 7;
|
|
882 break;
|
|
883 case ITEM_RARE_MOON_CLOAK:
|
|
884 index = 8;
|
|
885 break;
|
|
886 case ITEM_RARE_VAMPIRES_CAPE:
|
|
887 index = 9;
|
|
888 break;
|
|
889 default:
|
|
890 index = item->uItemID - 105;
|
|
891 break;
|
|
892 }
|
|
893 if ( index >= 0 && index < 10 )
|
|
894 {
|
|
895 item_X = pPaperdoll_BodyX + paperdoll_Cloak[pBodyComplection][index][0];
|
|
896 item_Y = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][index][1];
|
|
897
|
|
898 if ( item->ItemEnchanted() )
|
|
899 {
|
|
900 if ( item->AuraEffectRed() )
|
|
901 container = "sptext01";
|
|
902 else if ( item->AuraEffectBlue() )
|
|
903 container = "sp28a";
|
|
904 else if ( item->AuraEffectGreen() )
|
|
905 container = "sp30a";
|
|
906 else if ( item->AuraEffectPurple() )
|
|
907 container = "sp91a";
|
|
908 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
909 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
910 {
|
|
911 _50C9A8_item_enchantment_timer = 0;
|
|
912 item->ResetEnchantAnimation();//~0x000000F0
|
|
913 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
914 }
|
|
915 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
|
|
916 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
|
|
917 }
|
|
918 else if ( item->uAttributes & ITEM_BROKEN )
|
|
919 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]));
|
|
920 else
|
2524
|
921 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]));
|
2501
|
922
|
|
923 if ( !bRingsShownInCharScreen )
|
|
924 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
|
|
925 player->pEquipment.uCloak);
|
|
926 }
|
|
927 }
|
|
928 //-------------------------------(Paperdoll/Кукла)-------------------------------------------
|
2524
|
929 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
|
2501
|
930 //-------------------------------(Armor/Броня)-----------------------------------------------
|
|
931 if ( player->GetItem(&PlayerEquipment::uArmor) )
|
|
932 {
|
|
933 item = player->GetArmorItem();
|
|
934 switch ( item->uItemID )
|
|
935 {
|
|
936 case ITEM_ARTIFACT_GOVERNORS_ARMOR:
|
|
937 index = 15;
|
|
938 break;
|
|
939 case ITEM_ARTIFACT_YORUBA:
|
|
940 index = 14;
|
|
941 break;
|
|
942 case ITEM_RELIC_HARECS_LEATHER:
|
|
943 index = 13;
|
|
944 break;
|
|
945 case ITEM_ELVEN_CHAINMAIL:
|
|
946 index = 16;
|
|
947 break;
|
|
948 default:
|
|
949 index = item->uItemID - 66;
|
|
950 break;
|
|
951 }
|
|
952 if ( index >= 0 && index < 17 )
|
|
953 {
|
|
954 item_X = pPaperdoll_BodyX + paperdoll_Armor_Coord[pBodyComplection][index][0];
|
|
955 item_Y = pPaperdoll_BodyY + paperdoll_Armor_Coord[pBodyComplection][index][1];
|
|
956
|
|
957 if ( item->ItemEnchanted() )
|
|
958 {
|
|
959 if ( item->AuraEffectRed() )
|
|
960 container = "sptext01";
|
|
961 else if ( item->AuraEffectBlue() )
|
|
962 container = "sp28a";
|
|
963 else if ( item->AuraEffectGreen() )
|
|
964 container = "sp30a";
|
|
965 else if ( item->AuraEffectPurple() )
|
|
966 container = "sp91a";
|
|
967 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
968 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
969 {
|
|
970 _50C9A8_item_enchantment_timer = 0;
|
|
971 item->ResetEnchantAnimation();//~0x000000F0
|
|
972 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
973 }
|
|
974 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]),
|
|
975 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
|
|
976 }
|
|
977 else if ( item->uAttributes & ITEM_BROKEN )
|
|
978 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]));
|
|
979 else if ( !(item->uAttributes & ITEM_IDENTIFIED) )
|
|
980 pRenderer->DrawTransparentGreenShade(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]);
|
|
981 else
|
2524
|
982 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]);
|
2501
|
983
|
|
984 if ( !bRingsShownInCharScreen )
|
|
985 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]],
|
|
986 player->pEquipment.uArmor);
|
|
987 }
|
|
988 }
|
|
989 //----------------------------------(Boot/Обувь)--------------------------------------------------------
|
|
990 if ( player->GetItem(&PlayerEquipment::uBoot) )
|
|
991 {
|
|
992 item = player->GetBootItem();
|
|
993 switch ( item->uItemID )
|
|
994 {
|
|
995 case ITEM_ARTIFACT_HERMES_SANDALS:
|
|
996 index = 5;
|
|
997 v59 = papredoll_flying_feet[player->uCurrentFace];
|
|
998 break;
|
|
999 case ITEM_ARTIFACT_LEAGUE_BOOTS:
|
|
1000 index = 6;
|
|
1001 v59 = paperdoll_boots_texture[pBodyComplection][5];
|
|
1002 break;
|
|
1003 default:
|
|
1004 index = item->uItemID - 115;
|
|
1005 v59 = paperdoll_boots_texture[pBodyComplection][index];
|
|
1006 break;
|
|
1007 }
|
|
1008 if ( index >= 0 && index < 7 )
|
|
1009 {
|
|
1010 item_X = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][index][0];
|
|
1011 item_Y = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][index][1];
|
|
1012
|
|
1013 if ( item->ItemEnchanted() )
|
|
1014 {
|
|
1015 if ( item->AuraEffectRed() )
|
|
1016 container = "sptext01";
|
|
1017 else if ( item->AuraEffectBlue() )
|
|
1018 container = "sp28a";
|
|
1019 else if ( item->AuraEffectGreen() )
|
|
1020 container = "sp30a";
|
|
1021 else if ( item->AuraEffectPurple() )
|
|
1022 container = "sp91a";
|
|
1023 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1024 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1025 {
|
|
1026 _50C9A8_item_enchantment_timer = 0;
|
|
1027 item->ResetEnchantAnimation();//~0x000000F0
|
|
1028 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1029 }
|
|
1030 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v59), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
|
|
1031 GetTickCount() * 0.1, 0, 255);
|
|
1032 }
|
|
1033 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1034 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v59));
|
|
1035 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
1036 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v59));
|
2501
|
1037 else
|
|
1038 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v59));
|
|
1039
|
|
1040 if ( !bRingsShownInCharScreen )
|
|
1041 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), player->pEquipment.uBoot);
|
|
1042 }
|
|
1043 }
|
|
1044 //--------------------------------------------(Hand/Рука)------------------------------------------------------
|
|
1045 if ( !player->GetItem(&PlayerEquipment::uMainHand)
|
|
1046 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED)
|
|
1047 && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR
|
|
1048 || player->GetItem(&PlayerEquipment::uShield)) )
|
2524
|
1049 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
|
2501
|
1050 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
|
|
1051 //--------------------------------------------(Belt/Пояс)-------------------------------------------------------
|
|
1052 if ( player->GetItem(&PlayerEquipment::uBelt))
|
|
1053 {
|
|
1054 item = player->GetBeltItem();
|
|
1055 switch ( item->uItemID )
|
|
1056 {
|
|
1057 case ITEM_RILIC_TITANS_BELT:
|
|
1058 index = 5;
|
|
1059 break;
|
|
1060 case ITEM_ARTIFACT_HEROS_BELT:
|
|
1061 index = 6;
|
|
1062 break;
|
|
1063 default:
|
|
1064 index = item->uItemID - 100;
|
|
1065 break;
|
|
1066 }
|
|
1067 if ( index >= 0 && index < 7 )
|
|
1068 {
|
|
1069 item_X = pPaperdoll_BodyX + paperdoll_Belt[pBodyComplection][index][0];
|
|
1070 item_Y = pPaperdoll_BodyY + paperdoll_Belt[pBodyComplection][index][1];
|
|
1071 if ( IsDwarf != 1 || index == 5 )
|
|
1072 v75 = paperdoll_belt_texture[pBodyComplection][index];
|
|
1073 else
|
|
1074 v75 = paperdoll_belt_texture[pBodyComplection - 2][index];
|
|
1075
|
|
1076 if ( item->ItemEnchanted() )
|
|
1077 {
|
|
1078 if ( item->AuraEffectRed() )
|
|
1079 container = "sptext01";
|
|
1080 else if ( item->AuraEffectBlue() )
|
|
1081 container = "sp28a";
|
|
1082 else if ( item->AuraEffectGreen() )
|
|
1083 container = "sp30a";
|
|
1084 else if ( item->AuraEffectPurple() )
|
|
1085 container = "sp91a";
|
|
1086 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1087 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1088 {
|
|
1089 _50C9A8_item_enchantment_timer = 0;
|
|
1090 item->ResetEnchantAnimation();//~0x000000F0
|
|
1091 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1092 }
|
|
1093 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v75), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
|
|
1094 GetTickCount() * 0.1, 0, 255);
|
|
1095 }
|
|
1096 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1097 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v75));
|
|
1098 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
1099 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v75));
|
2501
|
1100 else
|
|
1101 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75));
|
|
1102
|
|
1103 if ( !bRingsShownInCharScreen )
|
|
1104 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), player->pEquipment.uBelt);
|
|
1105 }
|
|
1106 }
|
|
1107 //--------------------------------(Shoulder/Плечи)---------------------------------------------
|
|
1108 if (player->GetItem(&PlayerEquipment::uArmor))
|
|
1109 {
|
|
1110 item = player->GetArmorItem();
|
|
1111 switch ( item->uItemID )
|
|
1112 {
|
|
1113 case ITEM_ARTIFACT_GOVERNORS_ARMOR:
|
|
1114 index = 15;
|
|
1115 break;
|
|
1116 case ITEM_ARTIFACT_YORUBA:
|
|
1117 index = 14;
|
|
1118 break;
|
|
1119 case ITEM_RELIC_HARECS_LEATHER:
|
|
1120 index = 13;
|
|
1121 break;
|
|
1122 case ITEM_ELVEN_CHAINMAIL:
|
|
1123 index = 16;
|
|
1124 break;
|
|
1125 default:
|
|
1126 index = item->uItemID - 66;
|
|
1127 break;
|
|
1128 }
|
|
1129 if ( index >= 0 && index < 17 )
|
|
1130 {
|
|
1131 if ( player->GetItem(&PlayerEquipment::uMainHand) && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED
|
|
1132 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
|
|
1133 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита
|
|
1134 {
|
|
1135 v94 = paperdoll_armor_texture[pBodyComplection][index][2];
|
|
1136 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
|
|
1137 {
|
|
1138 v94 = paperdoll_armor_texture[pBodyComplection][index][1];
|
|
1139 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
|
|
1140 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
|
|
1141 }
|
|
1142 else
|
|
1143 {
|
|
1144 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0];
|
|
1145 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1];
|
|
1146 }
|
|
1147 if ( v94 != pIcons_LOD->FindTextureByName("pending") )
|
|
1148 {
|
|
1149 if ( item->ItemEnchanted() )
|
|
1150 {
|
|
1151 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") )
|
|
1152 {
|
|
1153 if ( item->AuraEffectRed() )
|
|
1154 container = "sptext01";
|
|
1155 else if ( item->AuraEffectBlue() )
|
|
1156 container = "sp28a";
|
|
1157 else if ( item->AuraEffectGreen() )
|
|
1158 container = "sp30a";
|
|
1159 else if ( item->AuraEffectPurple() )
|
|
1160 container = "sp91a";
|
|
1161 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1162 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1163 {
|
|
1164 _50C9A8_item_enchantment_timer = 0;
|
|
1165 item->ResetEnchantAnimation();//~0x000000F0
|
|
1166 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1167 }
|
|
1168 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
|
|
1169 GetTickCount() * 0.1, 0, 255);
|
|
1170 }
|
|
1171 }
|
|
1172 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1173 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
|
|
1174 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
1175 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v94));
|
2501
|
1176 else
|
|
1177 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
|
|
1178
|
|
1179 }
|
|
1180 }
|
|
1181 else//без ничего или с щитом
|
|
1182 {
|
|
1183 //v94 = paperdoll_armor_texture[pBodyComplection][index][1];
|
|
1184 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
|
|
1185 {
|
|
1186 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
|
|
1187 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
|
|
1188
|
|
1189 if ( item->ItemEnchanted() )
|
|
1190 {
|
|
1191 if ( item->AuraEffectRed() )
|
|
1192 container = "sptext01";
|
|
1193 else if ( item->AuraEffectBlue() )
|
|
1194 container = "sp28a";
|
|
1195 else if ( item->AuraEffectGreen() )
|
|
1196 container = "sp30a";
|
|
1197 else if ( item->AuraEffectPurple() )
|
|
1198 container = "sp91a";
|
|
1199 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1200 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1201 {
|
|
1202 _50C9A8_item_enchantment_timer = 0;
|
|
1203 item->ResetEnchantAnimation();//~0x000000F0
|
|
1204 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1205 }
|
|
1206 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
|
|
1207 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
|
|
1208 }
|
|
1209 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1210 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
|
|
1211 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
1212 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
|
2501
|
1213 else
|
|
1214 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
|
|
1215
|
|
1216 }
|
|
1217 }
|
|
1218 }
|
|
1219 }
|
|
1220 //----------------------------------------------(Cloak collar/воротник плаща)-------------------------------------
|
|
1221 if ( player->GetItem(&PlayerEquipment::uCloak) )
|
|
1222 {
|
|
1223 item = player->GetCloakItem();
|
|
1224 switch ( item->uItemID )
|
|
1225 {
|
|
1226 case ITEM_RELIC_TWILIGHT:
|
|
1227 index = 5;
|
|
1228 break;
|
|
1229 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP:
|
|
1230 index = 6;
|
|
1231 break;
|
|
1232 case ITEM_RARE_SUN_CLOAK:
|
|
1233 index = 7;
|
|
1234 break;
|
|
1235 case ITEM_RARE_MOON_CLOAK:
|
|
1236 index = 8;
|
|
1237 break;
|
|
1238 case ITEM_RARE_VAMPIRES_CAPE:
|
|
1239 index = 9;
|
|
1240 break;
|
|
1241 default:
|
|
1242 index = item->uItemID - 105;
|
|
1243 }
|
|
1244 if ( index >= 0 && index < 10 )
|
|
1245 {
|
|
1246 item_X = pPaperdoll_BodyX + paperdoll_CloakCollar[pBodyComplection][index][0];
|
|
1247 item_Y = pPaperdoll_BodyY + paperdoll_CloakCollar[pBodyComplection][index][1];
|
|
1248 signed int r = pIcons_LOD->FindTextureByName("item325v2a1");
|
|
1249
|
|
1250 if ( paperdoll_cloak_collar_texture[pBodyComplection][index] != pIcons_LOD->FindTextureByName("pending") )
|
|
1251 {
|
|
1252 if ( item->ItemEnchanted() )
|
|
1253 {
|
|
1254 if ( item->AuraEffectRed() )
|
|
1255 container = "sptext01";
|
|
1256 else if ( item->AuraEffectBlue() )
|
|
1257 container = "sp28a";
|
|
1258 else if ( item->AuraEffectGreen() )
|
|
1259 container = "sp30a";
|
|
1260 else if ( item->AuraEffectPurple() )
|
|
1261 container = "sp91a";
|
|
1262 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1263 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1264 {
|
|
1265 _50C9A8_item_enchantment_timer = 0;
|
|
1266 item->ResetEnchantAnimation();//~0x000000F0
|
|
1267 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1268 }
|
|
1269 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]),
|
|
1270 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
|
|
1271 }
|
|
1272 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1273 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
|
|
1274 else
|
2524
|
1275 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
|
2501
|
1276
|
|
1277 if ( !bRingsShownInCharScreen )
|
|
1278 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]),
|
|
1279 player->pEquipment.uCloak);
|
|
1280 }
|
|
1281 }
|
|
1282 }
|
|
1283 //--------------------------------------------(Beards/Борода)-------------------------------------------------------
|
|
1284 if ( player->uCurrentFace == 12 || player->uCurrentFace == 13 )
|
|
1285 {
|
|
1286 if ( papredoll_dbrds[player->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") )
|
2524
|
1287 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_Beards[2 * player->uCurrentFace - 24],
|
2501
|
1288 pPaperdoll_BodyY + pPaperdoll_Beards[2 * player->uCurrentFace - 23],
|
|
1289 pIcons_LOD->GetTexture(papredoll_dbrds[player->uCurrentFace]));
|
|
1290 }
|
|
1291 //--------------------------------------------(Helm/Шлем)------------------------------------------------------------
|
|
1292 if ( player->GetItem(&PlayerEquipment::uHelm) )
|
|
1293 {
|
|
1294 item = player->GetHelmItem();
|
|
1295 switch ( item->uItemID )
|
|
1296 {
|
|
1297 case ITEM_RELIC_TALEDONS_HELM:
|
|
1298 index = 11;
|
|
1299 break;
|
|
1300 case ITEM_RELIC_SCHOLARS_CAP:
|
|
1301 index = 12;
|
|
1302 break;
|
|
1303 case ITEM_RELIC_PHYNAXIAN_CROWN:
|
|
1304 index = 13;
|
|
1305 break;
|
|
1306 case ITEM_ARTIFACT_MINDS_EYE:
|
|
1307 index = 14;
|
|
1308 break;
|
|
1309 case ITEM_RARE_SHADOWS_MASK:
|
|
1310 index = 15;
|
|
1311 break;
|
|
1312 default:
|
|
1313 index = item->uItemID - 89;
|
|
1314 }
|
|
1315 if ( index >= 0 && index < 16 )
|
|
1316 {
|
|
1317 item_X = pPaperdoll_BodyX + paperdoll_Helm[pBodyComplection][index][0];
|
|
1318 item_Y = pPaperdoll_BodyY + paperdoll_Helm[pBodyComplection][index][1];
|
|
1319 if ( IsDwarf != 1 || item->uItemID != 92 )
|
|
1320 v127 = paperdoll_helm_texture[player->GetSexByVoice()][index];
|
|
1321 else
|
|
1322 v127 = papredoll_dbrds[11];
|
|
1323
|
|
1324 if ( item->ItemEnchanted() )
|
|
1325 {
|
|
1326 if ( item->AuraEffectRed() )
|
|
1327 container = "sptext01";
|
|
1328 else if ( item->AuraEffectBlue() )
|
|
1329 container = "sp28a";
|
|
1330 else if ( item->AuraEffectGreen() )
|
|
1331 container = "sp30a";
|
|
1332 else if ( item->AuraEffectPurple() )
|
|
1333 container = "sp91a";
|
|
1334 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1335 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1336 {
|
|
1337 _50C9A8_item_enchantment_timer = 0;
|
|
1338 item->ResetEnchantAnimation();
|
|
1339 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1340 }
|
|
1341 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v127), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
|
|
1342 GetTickCount() * 0.1, 0, 255);
|
|
1343 }
|
|
1344 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1345 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v127));
|
|
1346 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
1347 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v127));
|
2501
|
1348 else
|
|
1349 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v127));
|
|
1350
|
|
1351 if ( !bRingsShownInCharScreen )
|
|
1352 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), player->pEquipment.uHelm);
|
|
1353 }
|
|
1354 }
|
|
1355 //------------------------------------------------(Hand3/Рука3)-------------------------------------------
|
|
1356 if ( player->GetItem(&PlayerEquipment::uMainHand) )
|
|
1357 {
|
|
1358 item = player->GetMainHandItem();
|
|
1359 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX;
|
|
1360 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY;
|
|
1361 if ( item->uItemID == 64 )
|
|
1362 v181 = "item64v1";
|
|
1363 else
|
|
1364 v181 = item->GetIconName();
|
|
1365
|
|
1366 if ( item->ItemEnchanted() )
|
|
1367 {
|
|
1368 if ( item->AuraEffectRed() )
|
|
1369 container = "sptext01";
|
|
1370 else if ( item->AuraEffectBlue() )
|
|
1371 container = "sp28a";
|
|
1372 else if ( item->AuraEffectGreen() )
|
|
1373 container = "sp30a";
|
|
1374 else if ( item->AuraEffectPurple() )
|
|
1375 container = "sp91a";
|
|
1376 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1377 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1378 {
|
|
1379 _50C9A8_item_enchantment_timer = 0;
|
|
1380 item->ResetEnchantAnimation();
|
|
1381 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1382 }
|
|
1383 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)),
|
|
1384 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
|
|
1385 }
|
|
1386 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1387 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
|
|
1388 else if ( item->uAttributes & ITEM_IDENTIFIED )
|
2524
|
1389 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
|
2501
|
1390 else
|
|
1391 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)));
|
|
1392
|
|
1393 if ( !bRingsShownInCharScreen )
|
|
1394 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)),
|
|
1395 player->pEquipment.uMainHand);
|
|
1396 }
|
|
1397 //--------------------------------------------------(Shield/Щит)---------------------------------------------
|
|
1398 if ( player->GetItem(&PlayerEquipment::uShield) )
|
|
1399 {
|
|
1400 item = player->GetOffHandItem();
|
|
1401 if ( item->GetPlayerSkillType() == PLAYER_SKILL_DAGGER
|
|
1402 || item->GetPlayerSkillType() == PLAYER_SKILL_SWORD )
|
|
1403 {
|
|
1404 //v151 = item->uItemID - 400;
|
|
1405 item_X = 596;
|
|
1406 two_handed_left_fist = true;
|
|
1407 switch ( item->uItemID )
|
|
1408 {
|
|
1409 case 400:
|
|
1410 item_Y = 86;
|
|
1411 break;
|
|
1412 case 403:
|
|
1413 item_Y = 28;
|
|
1414 break;
|
|
1415 case 415:
|
|
1416 item_X = 595;
|
|
1417 item_Y = 33;
|
|
1418 break;
|
|
1419 default:
|
|
1420 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item->uItemID].uEquipX;
|
|
1421 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item->uItemID].uEquipY;
|
|
1422 break;
|
|
1423 }
|
|
1424 }
|
|
1425 else
|
|
1426 {
|
|
1427 two_handed_left_fist = false;
|
|
1428 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item->uItemID].uEquipX;
|
|
1429 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item->uItemID].uEquipY;
|
|
1430 }
|
|
1431 v153 = pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE);
|
|
1432
|
|
1433 if ( item->ItemEnchanted() )
|
|
1434 {
|
|
1435 if ( item->AuraEffectRed() )
|
|
1436 container = "sptext01";
|
|
1437 else if ( item->AuraEffectBlue() )
|
|
1438 container = "sp28a";
|
|
1439 else if ( item->AuraEffectGreen() )
|
|
1440 container = "sp30a";
|
|
1441 else if ( item->AuraEffectPurple() )
|
|
1442 container = "sp91a";
|
|
1443 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1444 if ( _50C9A8_item_enchantment_timer <= 0 )
|
|
1445 {
|
|
1446 _50C9A8_item_enchantment_timer = 0;
|
|
1447 item->ResetEnchantAnimation();
|
|
1448 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1449 }
|
|
1450 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v153), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
|
|
1451 GetTickCount() * 0.1, 0, 255);
|
|
1452 }
|
|
1453 else if ( item->uAttributes & ITEM_BROKEN )
|
|
1454 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v153));
|
|
1455 else if ( !(item->uAttributes & ITEM_IDENTIFIED) )
|
|
1456 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v153));
|
|
1457 else
|
2524
|
1458 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v153));
|
2501
|
1459
|
|
1460 if ( two_handed_left_fist )//two-handed - left fist/двуручие - левая кисть
|
2524
|
1461 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0],
|
2501
|
1462 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1]));
|
|
1463 if ( !bRingsShownInCharScreen )
|
|
1464 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), player->pEquipment.uShield);
|
|
1465 }
|
|
1466 }
|
|
1467 //--------------------------------------------------------(RightHand/Правая кисть)--------------------------------------------------
|
2524
|
1468 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
|
2501
|
1469 //---------------------------------------------(two-handed - hand/Двуручие - рука)--------------------------------------------------
|
|
1470 if ( player->GetItem(&PlayerEquipment::uMainHand) )
|
|
1471 {
|
|
1472 if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED
|
|
1473 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
|
|
1474 && !player->GetItem(&PlayerEquipment::uShield) )
|
2524
|
1475 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
|
2501
|
1476 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
|
|
1477 }
|
|
1478 //--------------------------------------------------------(two-handed - fist/двуручие - кисть)----------------------------------------------------
|
|
1479 if ( player->GetItem(&PlayerEquipment::uMainHand))
|
|
1480 {
|
|
1481 item = player->GetMainHandItem();
|
|
1482 if ( item->GetItemEquipType() == EQUIP_TWO_HANDED
|
|
1483 || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
|
|
1484 && !player->GetItem(&PlayerEquipment::uShield) )
|
2524
|
1485 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
|
2501
|
1486 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1],
|
|
1487 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
|
|
1488 }
|
|
1489 if ( !bRingsShownInCharScreen )//рисование лупы
|
2524
|
1490 pRenderer->DrawTextureIndexedAlpha(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B));
|
|
1491 pRenderer->DrawTextureIndexedAlpha(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//обрамление
|
2501
|
1492 }
|
|
1493
|
|
1494 //----- (0041A2D1) --------------------------------------------------------
|
|
1495 void CharacterUI_InventoryTab_Draw(Player *player, bool a2)
|
|
1496 {
|
|
1497 Texture *pTexture; // esi@6
|
|
1498 unsigned int v17; // edi@15
|
|
1499 unsigned int uCellX; // [sp+30h] [bp-8h]@5
|
|
1500 unsigned int uCellY; // [sp+34h] [bp-4h]@5
|
|
1501
|
|
1502 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground));
|
|
1503 if (a2)
|
|
1504 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE));
|
|
1505 for (uint i = 0; i < 126; ++i)
|
|
1506 {
|
|
1507 if ( player->pInventoryMatrix[i] <= 0 )
|
|
1508 continue;
|
|
1509 if ( !player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uItemID )
|
|
1510 continue;
|
|
1511 uCellY = 32 * (i / 14) + 17;
|
|
1512 uCellX = 32 * (i % 14) + 14;
|
|
1513 uint item_texture_id = pIcons_LOD->LoadTexture(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].GetIconName(), TEXTURE_16BIT_PALETTE);
|
|
1514 pTexture = pIcons_LOD->GetTexture(item_texture_id);
|
|
1515 if (pTexture->uTextureWidth < 14)
|
|
1516 pTexture->uTextureWidth = 14;
|
|
1517 if ( (pTexture->uTextureWidth - 14) / 32 == 0 && pTexture->uTextureWidth < 32)
|
|
1518 uCellX += (32 - pTexture->uTextureWidth) / 2;
|
|
1519 //v13 = pTexture->uTextureWidth - 14;
|
|
1520 //LOBYTE(v13) = v13 & 0xE0;
|
|
1521 //v15 = v13 + 32;
|
|
1522 if (pTexture->uTextureHeight < 14 )
|
|
1523 pTexture->uTextureHeight = 14;
|
|
1524 v17 = uCellX + (( (int)((pTexture->uTextureWidth - 14) & 0xE0) + 32 - pTexture->uTextureWidth) / 2)
|
|
1525 + pSRZBufferLineOffsets[uCellY + (( (int)((pTexture->uTextureHeight - 14) & 0xFFFFFFE0) - pTexture->uTextureHeight + 32) / 2)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up
|
|
1526 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION)
|
|
1527 {
|
|
1528 Texture *loadedTextureptr = nullptr;
|
|
1529 switch (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION)
|
|
1530 {
|
|
1531 case ITEM_AURA_EFFECT_RED: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break;
|
|
1532 case ITEM_AURA_EFFECT_BLUE: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break;
|
|
1533 case ITEM_AURA_EFFECT_GREEN: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break;
|
|
1534 case ITEM_AURA_EFFECT_PURPLE: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break;
|
|
1535 }
|
|
1536 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1537 if (_50C9A8_item_enchantment_timer <= 0)
|
|
1538 {
|
|
1539 _50C9A8_item_enchantment_timer = 0;
|
|
1540 LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF;
|
|
1541 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1542 }
|
|
1543
|
|
1544 pRenderer->DrawAura(uCellX, uCellY, pTexture, loadedTextureptr, GetTickCount() * 0.1, 0, 255);
|
|
1545 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]);
|
|
1546 }
|
|
1547 else
|
|
1548 {
|
2541
|
1549 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].IsIdentified() || current_screen_type != SCREEN_HOUSE)
|
2501
|
1550 {
|
|
1551 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].IsBroken())
|
|
1552 pRenderer->DrawTransparentRedShade(uCellX, uCellY, pTexture);
|
|
1553 else
|
2524
|
1554 pRenderer->DrawTextureIndexedAlpha(uCellX, uCellY, pTexture);
|
2501
|
1555 }
|
|
1556 else
|
|
1557 pRenderer->DrawTransparentGreenShade(uCellX, uCellY, pTexture);
|
|
1558 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]);
|
|
1559 continue;
|
|
1560 }
|
|
1561 }
|
|
1562 }
|
|
1563
|
|
1564 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id)
|
|
1565 {
|
|
1566 Texture* item_texture = pIcons_LOD->LoadTexturePtr(item->GetIconName(), TEXTURE_16BIT_PALETTE);
|
|
1567
|
|
1568 if (item->uAttributes & ITEM_ENCHANT_ANIMATION) // enchant animation
|
|
1569 {
|
|
1570 Texture *enchantment_texture = nullptr;
|
|
1571 switch (item->uAttributes & ITEM_ENCHANT_ANIMATION)
|
|
1572 {
|
|
1573 case ITEM_AURA_EFFECT_RED: enchantment_texture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break;
|
|
1574 case ITEM_AURA_EFFECT_BLUE: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break;
|
|
1575 case ITEM_AURA_EFFECT_GREEN: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break;
|
|
1576 case ITEM_AURA_EFFECT_PURPLE: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break;
|
|
1577 }
|
|
1578
|
|
1579 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
|
|
1580 if (_50C9A8_item_enchantment_timer <= 0)
|
|
1581 {
|
|
1582 _50C9A8_item_enchantment_timer = 0;
|
|
1583 item->uAttributes &= 0xFFFFFF0F;
|
|
1584 ptr_50C9A4_ItemToEnchant = nullptr;
|
|
1585 }
|
|
1586 pRenderer->DrawAura(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255);
|
|
1587 }
|
|
1588 else
|
|
1589 {
|
|
1590 if (item->IsBroken())
|
|
1591 pRenderer->DrawTransparentRedShade(x, y, item_texture);
|
|
1592 else if (!item->IsIdentified())
|
|
1593 pRenderer->DrawTransparentGreenShade(x, y, item_texture);
|
|
1594 else
|
2524
|
1595 pRenderer->DrawTextureIndexedAlpha(x, y, item_texture);
|
2501
|
1596
|
|
1597 pRenderer->ZBuffer_Fill_2(x, y, item_texture, id);
|
|
1598 }
|
|
1599 }
|
|
1600
|
|
1601 //----- (0043E825) --------------------------------------------------------
|
|
1602 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player)
|
|
1603 {
|
|
1604 CharacterUI_DrawPaperdoll(player);
|
2524
|
1605 pRenderer->DrawTextureIndexedAlpha(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND));
|
|
1606 pRenderer->DrawTextureIndexedAlpha(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));
|
2501
|
1607 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY,
|
|
1608 pIcons_LOD->GetTexture(uTextureID_detaliz_close_button));
|
|
1609 for (uint i = 0; i < 6; ++i)
|
|
1610 {
|
|
1611 if (!player->pEquipment.uRings[i])
|
|
1612 continue;
|
|
1613 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248};
|
|
1614 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA};
|
|
1615 CharacterUI_DrawItem(pPaperdollRingsX[i], pPaperdollRingsY[i], &player->pInventoryItemList[player->pEquipment.uRings[i] - 1],
|
|
1616 player->pEquipment.uRings[i]);
|
|
1617 }
|
|
1618 if (player->pEquipment.uAmulet)
|
|
1619 CharacterUI_DrawItem(493, 91, player->GetAmuletItem(), player->pEquipment.uAmulet);
|
|
1620 if (player->pEquipment.uGlove)
|
|
1621 CharacterUI_DrawItem(586, 88, player->GetGloveItem(), player->pEquipment.uGlove);
|
|
1622 }
|
|
1623
|
|
1624 //----- (0043BCA7) --------------------------------------------------------
|
|
1625 void CharacterUI_LoadPaperdollTextures()
|
|
1626 {
|
|
1627 int v3; // ebx@10
|
|
1628 Player *pPlayer; // edi@12
|
|
1629 signed int v32; // [sp+10h] [bp-28h]@75
|
|
1630 signed int v33; // [sp+10h] [bp-28h]@77
|
|
1631 int pItemTXTNum; // [sp+14h] [bp-24h]@75
|
|
1632 signed int v38; // [sp+14h] [bp-24h]@79
|
|
1633 char pContainer[128]; // [sp+24h] [bp-14h]@12
|
|
1634
|
|
1635 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
|
|
1636 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
|
|
1637 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
|
|
1638 uTextureID_right_panel_loop = uTextureID_right_panel;
|
|
1639 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE);
|
|
1640 uTextureID_detaliz_close_button = uExitCancelTextureId;
|
|
1641 for ( uint i = 0; i < 4; ++i )
|
|
1642 {
|
|
1643 if ( pPlayers[i + 1]->HasUnderwaterSuitEquipped() )
|
|
1644 {
|
|
1645 if ( pPlayers[i + 1]->GetRace() == CHARACTER_RACE_DWARF )
|
|
1646 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 3;
|
|
1647 else
|
|
1648 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 1;
|
|
1649 wsprintfA(pContainer, "pc23v%dBod", v3);
|
|
1650 papredoll_dbods[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture
|
|
1651 wsprintfA(pContainer, "pc23v%dlad", v3);
|
|
1652 papredoll_dlads[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand
|
|
1653 wsprintfA(pContainer, "pc23v%dlau", v3);
|
|
1654 papredoll_dlaus[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2
|
|
1655 wsprintfA(pContainer, "pc23v%drh", v3);
|
|
1656 papredoll_drhs[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand
|
|
1657 wsprintfA(pContainer, "pc23v%dlh", v3);
|
|
1658 papredoll_dlhs[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist
|
|
1659 wsprintfA(pContainer, "pc23v%dlhu", v3);
|
|
1660 papredoll_dlhus[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2
|
|
1661 pPlayer = pPlayers[i + 1];
|
|
1662 if ( pPlayer->uCurrentFace == 12 || pPlayer->uCurrentFace == 13 )
|
|
1663 papredoll_dbrds[(char)pPlayer->uCurrentFace] = 0;
|
|
1664 papredoll_flying_feet[pPlayer->uCurrentFace] = 0;
|
|
1665 IsPlayerWearingWatersuit[i + 1] = 1;
|
|
1666 }
|
|
1667 else
|
|
1668 {
|
|
1669 papredoll_dbods[i] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1670 papredoll_dlads[i] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1671 papredoll_dlaus[i] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1672 papredoll_drhs[i] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1673 papredoll_dlhs[i] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1674 papredoll_dlhus[i] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
1675 if ( pPlayers[i + 1]->uCurrentFace == 12 || pPlayers[i + 1]->uCurrentFace == 13 )
|
|
1676 {
|
|
1677 wsprintfA(pContainer, "pc%02dbrd", pPlayers[i + 1]->uCurrentFace + 1);
|
|
1678 papredoll_dbrds[pPlayers[i + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1679 }
|
|
1680 wsprintfA(pContainer, "item281pc%02d", pPlayers[i + 1]->uCurrentFace + 1);
|
|
1681 papredoll_flying_feet[pPlayers[i + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1682 IsPlayerWearingWatersuit[i + 1] = 0;
|
|
1683 }
|
|
1684 }
|
|
1685
|
|
1686 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE);
|
|
1687 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE);
|
|
1688 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE);
|
|
1689 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE);
|
|
1690 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
|
|
1691 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
|
|
1692 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
|
|
1693 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
|
|
1694 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE);
|
|
1695 for ( uint i = 0; i < 54; ++i )// test equipment
|
|
1696 {
|
|
1697 party_has_equipment[i] = 0;
|
|
1698 if ( pParty->pPickedItem.uItemID != i + 66 )
|
|
1699 {
|
|
1700 for ( uint j = 0; j < 4; ++j)
|
|
1701 {
|
|
1702 if ( pParty->pPlayers[j].HasItem(i + 66, 0) )
|
|
1703 party_has_equipment[i] = 1;
|
|
1704 }
|
|
1705 }
|
|
1706 }
|
|
1707 memset(byte_5111F6_OwnedArtifacts.data(), 0, sizeof(byte_5111F6_OwnedArtifacts));
|
|
1708 for (uint i = 0; i < 4; ++i)
|
|
1709 {
|
|
1710 Player* player = &pParty->pPlayers[i];
|
|
1711
|
|
1712 if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6_OwnedArtifacts[0] = 1;
|
|
1713 if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6_OwnedArtifacts[1] = 1;
|
|
1714 if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6_OwnedArtifacts[2] = 1;
|
|
1715 if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6_OwnedArtifacts[3] = 1;
|
|
1716 if (player->HasItem(ITEM_RELIC_TALEDONS_HELM, 1)) byte_5111F6_OwnedArtifacts[4] = 1;
|
|
1717 if (player->HasItem(ITEM_RELIC_SCHOLARS_CAP, 1)) byte_5111F6_OwnedArtifacts[5] = 1;
|
|
1718 if (player->HasItem(ITEM_RELIC_PHYNAXIAN_CROWN, 1)) byte_5111F6_OwnedArtifacts[6] = 1;
|
|
1719 if (player->HasItem(ITEM_ARTIFACT_MINDS_EYE, 1)) byte_5111F6_OwnedArtifacts[7] = 1;
|
|
1720 if (player->HasItem(ITEM_RARE_SHADOWS_MASK, 1)) byte_5111F6_OwnedArtifacts[8] = 1;
|
|
1721 if (player->HasItem(ITEM_RILIC_TITANS_BELT, 1)) byte_5111F6_OwnedArtifacts[9] = 1;
|
|
1722 if (player->HasItem(ITEM_ARTIFACT_HEROS_BELT, 1)) byte_5111F6_OwnedArtifacts[10] = 1;
|
|
1723 if (player->HasItem(ITEM_RELIC_TWILIGHT, 1)) byte_5111F6_OwnedArtifacts[11] = 1;
|
|
1724 if (player->HasItem(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, 1)) byte_5111F6_OwnedArtifacts[12] = 1;
|
|
1725 if (player->HasItem(ITEM_RARE_SUN_CLOAK, 1)) byte_5111F6_OwnedArtifacts[13] = 1;
|
|
1726 if (player->HasItem(ITEM_RARE_MOON_CLOAK, 1)) byte_5111F6_OwnedArtifacts[14] = 1;
|
|
1727 if (player->HasItem(ITEM_RARE_VAMPIRES_CAPE, 1)) byte_5111F6_OwnedArtifacts[15] = 1;
|
|
1728 if (player->HasItem(ITEM_ELVEN_CHAINMAIL, 1)) byte_5111F6_OwnedArtifacts[16] = 1;
|
|
1729 }
|
|
1730
|
|
1731 for (uint i = 0; i < 2; ++i)
|
|
1732 {
|
|
1733 for ( uint j = 0; j < 5; ++j )//Belt
|
|
1734 {
|
|
1735 GetItemTextureFilename(pContainer, j + 100, i + 1, 0);
|
|
1736 paperdoll_belt_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1737 }
|
|
1738 GetItemTextureFilename(pContainer, 535, i + 1, 0);
|
|
1739 paperdoll_belt_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1740 for ( uint j = 0; j < 11; ++j )//Helm
|
|
1741 {
|
|
1742 GetItemTextureFilename(pContainer, j + 89, i + 1, 0);
|
|
1743 paperdoll_helm_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1744 }
|
|
1745 GetItemTextureFilename(pContainer, 521, i + 1, 0);
|
|
1746 paperdoll_helm_texture[i][11] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1747 GetItemTextureFilename(pContainer, 522, i + 1, 0);
|
|
1748 paperdoll_helm_texture[i][12] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1749 GetItemTextureFilename(pContainer, 523, i + 1, 0);
|
|
1750 paperdoll_helm_texture[i][13] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1751 GetItemTextureFilename(pContainer, 532, i + 1, 0);
|
|
1752 paperdoll_helm_texture[i][14] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1753 GetItemTextureFilename(pContainer, 544, i + 1, 0);
|
|
1754 paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1755 if ( IsDwarfPresentInParty(true) ) //the phynaxian helm uses a slightly different graphic for dwarves
|
|
1756 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE);
|
|
1757 }
|
|
1758 //v43 = 0;
|
|
1759 for (uint i = 0; i < 4; ++i)
|
|
1760 {
|
|
1761 if ( ShouldLoadTexturesForRaceAndGender(i) )
|
|
1762 {
|
|
1763 GetItemTextureFilename(pContainer, 524, i + 1, 0);
|
|
1764 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt
|
|
1765 pItemTXTNum = 66;
|
|
1766 for ( v32 = 0; v32 < 13; ++v32 )//simple armor
|
|
1767 {
|
|
1768 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0);
|
|
1769 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// armor
|
|
1770 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1);
|
|
1771 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// shoulder 1
|
|
1772 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2);
|
|
1773 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// shoulder 2
|
|
1774 pItemTXTNum++;
|
|
1775 }
|
|
1776 GetItemTextureFilename(pContainer, 516, i + 1, 0);//artefacts
|
|
1777 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1778 GetItemTextureFilename(pContainer, 516, i + 1, 1);
|
|
1779 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1780 GetItemTextureFilename(pContainer, 516, i + 1, 2);
|
|
1781 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1782 GetItemTextureFilename(pContainer, 505, i + 1, 0);
|
|
1783 paperdoll_armor_texture[i][v32 + 1][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1784 GetItemTextureFilename(pContainer, 505, i + 1, 1);
|
|
1785 paperdoll_armor_texture[i][v32 + 1][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1786 GetItemTextureFilename(pContainer, 505, i + 1, 2);
|
|
1787 paperdoll_armor_texture[i][v32 + 1][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1788 GetItemTextureFilename(pContainer, 504, i + 1, 0);
|
|
1789 paperdoll_armor_texture[i][v32 + 2][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1790 GetItemTextureFilename(pContainer, 504, i + 1, 1);
|
|
1791 paperdoll_armor_texture[i][v32 + 2][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1792 GetItemTextureFilename(pContainer, 504, i + 1, 2);
|
|
1793 paperdoll_armor_texture[i][v32 + 2][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1794 GetItemTextureFilename(pContainer, 533, i + 1, 0);
|
|
1795 paperdoll_armor_texture[i][v32 + 3][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1796 GetItemTextureFilename(pContainer, 533, i + 1, 1);
|
|
1797 paperdoll_armor_texture[i][v32 + 3][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1798 GetItemTextureFilename(pContainer, 533, i + 1, 2);
|
|
1799 paperdoll_armor_texture[i][v32 + 3][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1800 for ( v33 = 0; v33 < 5; ++v33 )//boots
|
|
1801 {
|
|
1802 GetItemTextureFilename(pContainer, v33 + 115, i + 1, 0);
|
|
1803 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1804 }
|
|
1805 GetItemTextureFilename(pContainer, 512, i + 1, 0);
|
|
1806 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1807 for ( v38 = 0; v38 < 5; ++v38 )//Cloak
|
|
1808 {
|
|
1809 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 0);
|
|
1810 paperdoll_cloak_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1811 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 1);
|
|
1812 paperdoll_cloak_collar_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1813 }
|
|
1814 GetItemTextureFilename(pContainer, 525, i + 1, 0);
|
|
1815 paperdoll_cloak_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1816 GetItemTextureFilename(pContainer, 530, i + 1, 0);
|
|
1817 paperdoll_cloak_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1818 GetItemTextureFilename(pContainer, 547, i + 1, 0);
|
|
1819 paperdoll_cloak_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1820 GetItemTextureFilename(pContainer, 548, i + 1, 0);
|
|
1821 paperdoll_cloak_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1822 GetItemTextureFilename(pContainer, 550, i + 1, 0);
|
|
1823 paperdoll_cloak_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1824 GetItemTextureFilename(pContainer, 525, i + 1, 1);
|
|
1825 paperdoll_cloak_collar_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1826 GetItemTextureFilename(pContainer, 530, i + 1, 1);
|
|
1827 paperdoll_cloak_collar_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1828 GetItemTextureFilename(pContainer, 547, i + 1, 1);
|
|
1829 paperdoll_cloak_collar_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1830 GetItemTextureFilename(pContainer, 548, i + 1, 1);
|
|
1831 paperdoll_cloak_collar_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1832 GetItemTextureFilename(pContainer, 550, i + 1, 1);
|
|
1833 paperdoll_cloak_collar_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
1834 }
|
|
1835 //else
|
|
1836 //{
|
|
1837 //v26 = v43;
|
|
1838 //}
|
|
1839 //v43 = v26 + 40;
|
|
1840 }
|
|
1841 }
|
|
1842
|
|
1843 //----- (00419401) --------------------------------------------------------
|
|
1844 void CharacterUI_SkillsTab_CreateButtons()
|
|
1845 {
|
|
1846 GUIButton *pButton; // eax@3
|
|
1847 unsigned int current_Y; // esi@8
|
|
1848 int buttons_count; // [sp+10h] [bp-14h]@1
|
|
1849 int first_rows; // [sp+14h] [bp-10h]@19
|
|
1850 int skill_id; // [sp+18h] [bp-Ch]@8
|
|
1851 Player *curr_player; // [sp+1Ch] [bp-8h]@8
|
|
1852 int i;
|
|
1853 int uCurrFontHeght;
|
|
1854
|
|
1855 buttons_count = 0;
|
|
1856 if ( dword_507CC0_activ_ch )
|
|
1857 CharacterUI_ReleaseButtons();
|
|
1858 dword_507CC0_activ_ch = uActiveCharacter;
|
|
1859 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext )
|
|
1860 {
|
|
1861 if ( pButton->msg == UIMSG_InventoryLeftClick )
|
|
1862 {
|
|
1863 dword_50698C_uX = pButton->uX;
|
|
1864 dword_506988_uY = pButton->uY;
|
|
1865 dword_506984_uZ = pButton->uZ;
|
|
1866 dword_506980_uW = pButton->uW;
|
|
1867 pButton->uW = 0;
|
|
1868 pButton->uZ = 0;
|
|
1869 pButton->uY = 0;
|
|
1870 pButton->uX = 0;
|
|
1871 }
|
|
1872 }
|
|
1873 first_rows = 0;
|
|
1874 int a5 = pGUIWindow_CurrentMenu->uNumControls;
|
|
1875 curr_player = &pParty->pPlayers[uActiveCharacter-1];
|
|
1876
|
|
1877 uCurrFontHeght=pFontLucida->uFontHeight;
|
|
1878 current_Y = 2 *uCurrFontHeght + 13;
|
|
1879 for( i = 0; i < 9; ++i )
|
|
1880 {
|
|
1881 skill_id = pWeaponSkills[i];
|
|
1882 if ( curr_player->pActiveSkills[skill_id] & 0x3F )
|
|
1883 {
|
|
1884 current_Y += uCurrFontHeght - 3;
|
|
1885 ++buttons_count;
|
|
1886 ++first_rows;
|
|
1887 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
|
|
1888 }
|
|
1889 }
|
|
1890 if ( !first_rows )
|
|
1891 current_Y += uCurrFontHeght - 3;
|
|
1892 current_Y += 2 * uCurrFontHeght - 6;
|
|
1893 for ( i = 0; i < 9; ++i )
|
|
1894 {
|
|
1895 skill_id = pMagicSkills[i];
|
|
1896 if ( curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15 )
|
|
1897 {
|
|
1898 current_Y += uCurrFontHeght - 3;
|
|
1899 ++buttons_count;
|
|
1900 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
|
|
1901 }
|
|
1902 }
|
|
1903 first_rows = 0;
|
|
1904 current_Y = 2 * uCurrFontHeght + 13;
|
|
1905 for ( i = 0; i < 5; ++i )
|
|
1906 {
|
|
1907 skill_id = pArmorSkills[i];
|
|
1908 if ( curr_player->pActiveSkills[skill_id] & 0x3F )
|
|
1909 {
|
|
1910 current_Y+= uCurrFontHeght - 3;
|
|
1911 ++buttons_count;
|
|
1912 ++first_rows;
|
|
1913 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
|
|
1914 }
|
|
1915 }
|
|
1916 if ( !first_rows )
|
|
1917 current_Y += uCurrFontHeght - 3;
|
|
1918 current_Y += 2 * uCurrFontHeght - 6;
|
|
1919 for ( i = 0; i < 12; ++i )
|
|
1920 {
|
|
1921 skill_id = pMiscSkills[i];
|
|
1922 if ( curr_player->pActiveSkills[skill_id] & 0x3F )
|
|
1923 {
|
|
1924 current_Y += uCurrFontHeght - 3;
|
|
1925 ++buttons_count;
|
|
1926 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0);
|
|
1927 }
|
|
1928 }
|
|
1929
|
|
1930 if ( buttons_count )
|
|
1931 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, a5);
|
|
1932 }
|
|
1933
|
|
1934 //----- (00418511) --------------------------------------------------------
|
|
1935 void CharacterUI_StatsTab_Draw( Player *player )
|
|
1936 {
|
|
1937 int pY; // ST34_4@4
|
|
1938 const char *pText; // eax@9
|
|
1939 const char *text_format; // [sp+14h] [bp-Ch]@4
|
|
1940
|
|
1941 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE));
|
|
1942 sprintf(pTmpBuf.data(), "\f%05d", ui_character_header_text_color);
|
|
1943 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s"
|
|
1944 strcat(pTmpBuf.data(), pTmpBuf2.data());
|
|
1945 sprintfex(pTmpBuf2.data(), "\f00000\r180%s: \f%05d%d\f00000\n\n\n",
|
|
1946 pGlobalTXT_LocalizationStrings[207], // "Skill points"
|
|
1947 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color,
|
|
1948 player->uSkillPoints);
|
|
1949 strcat(pTmpBuf.data(), pTmpBuf2.data());
|
|
1950 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1951
|
|
1952 //First column(Первая колонка)
|
|
1953 pY = 53;
|
|
1954 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144],
|
|
1955 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualMight(), player->GetBaseStrength()),
|
|
1956 player->GetActualMight(), player->GetBaseStrength());//Might
|
|
1957 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1958
|
|
1959 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
1960 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116],
|
|
1961 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualIntelligence(), player->GetBaseIntelligence()),
|
|
1962 player->GetActualIntelligence(), player->GetBaseIntelligence());//Intellect
|
|
1963 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1964
|
|
1965 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
1966 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163],
|
|
1967 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualWillpower(), player->GetBaseWillpower()),
|
|
1968 player->GetActualWillpower(), player->GetBaseWillpower());//
|
|
1969 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1970
|
|
1971 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
1972 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75],
|
|
1973 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualEndurance(), player->GetBaseEndurance()),
|
|
1974 player->GetActualEndurance(), player->GetBaseEndurance());//
|
|
1975 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1976
|
|
1977 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
1978 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1],
|
|
1979 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAccuracy(), player->GetBaseAccuracy()),
|
|
1980 player->GetActualAccuracy(), player->GetBaseAccuracy());
|
|
1981 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1982
|
|
1983 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
1984 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211],
|
|
1985 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualSpeed(), player->GetBaseSpeed()),
|
|
1986 player->GetActualSpeed(), player->GetBaseSpeed());
|
|
1987 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1988
|
|
1989 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
1990 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136],
|
|
1991 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualLuck(), player->GetBaseLuck()),
|
|
1992 player->GetActualLuck(), player->GetBaseLuck());
|
|
1993 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
1994
|
|
1995 text_format = "%s\f%05u\r424%d\f00000 /\t185%d\n";
|
|
1996 if ( player->GetMaxHealth() >= 1000 )
|
|
1997 text_format = "%s\f%05u\r388%d\f00000 / %d\n";
|
|
1998 pY += 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
|
|
1999 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[108],
|
|
2000 UI_GetHealthManaAndOtherQualitiesStringColor(player->sHealth, player->GetMaxHealth()),
|
|
2001 player->sHealth, player->GetMaxHealth());
|
|
2002 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2003
|
|
2004 text_format = "%s\f%05u\r424%d\f00000 /\t185%d\n";
|
|
2005 if ( player->GetMaxMana() >= 1000 )
|
|
2006 text_format = "%s\f%05u\r388%d\f00000 / %d\n";
|
|
2007 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2008 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[212],
|
|
2009 UI_GetHealthManaAndOtherQualitiesStringColor(player->sMana, player->GetMaxMana()),
|
|
2010 player->sMana, player->GetMaxMana());
|
|
2011 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2012
|
|
2013 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2014 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12],
|
|
2015 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAC(), player->GetBaseAC()),
|
|
2016 player->GetActualAC(), player->GetBaseAC());
|
|
2017 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2018
|
|
2019 pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2020 sprintf(pTmpBuf.data(), "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], GetConditionDrawColor(player->GetMajorConditionIdx()),
|
|
2021 aCharacterConditionNames[player->GetMajorConditionIdx()]);//Состояние
|
|
2022 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0);
|
|
2023
|
|
2024 pY += LOBYTE(pFontArrus->uFontHeight) + - 1;
|
|
2025 pText = pGlobalTXT_LocalizationStrings[153];//Нет
|
|
2026 if (player->uQuickSpell)
|
|
2027 pText = pSpellStats->pInfos[player->uQuickSpell].pShortName;
|
|
2028 sprintf(pTmpBuf.data(), "%s: %s", pGlobalTXT_LocalizationStrings[172], pText);//Б. применение
|
|
2029 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0);
|
|
2030
|
|
2031 //Second column (Вторая колонка)
|
|
2032 pY = 50;
|
|
2033 text_format = Stat_string_format_2_column_less_100;
|
|
2034 if ( player->GetActualAge() > 99 )
|
|
2035 text_format = Stat_string_format_2_column_over_100;
|
|
2036 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[5],
|
|
2037 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAge(), player->GetBaseAge()),
|
|
2038 player->GetActualAge(), player->GetBaseAge());
|
|
2039 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2040
|
|
2041 text_format = Stat_string_format_2_column_less_100;
|
|
2042 if ( player->GetBaseLevel() > 99 )
|
|
2043 text_format = Stat_string_format_2_column_over_100;
|
|
2044 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2045 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[131],//Уров.
|
|
2046 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualLevel(), player->GetBaseLevel()),
|
|
2047 player->GetActualLevel(), player->GetBaseLevel());
|
|
2048 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2049
|
|
2050 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2051 pText = pGlobalTXT_LocalizationStrings[17]; // "Exp."
|
|
2052 if (player->uExperience <= 9999999)
|
|
2053 pText = pGlobalTXT_LocalizationStrings[83]; // "Experience"
|
|
2054 sprintf(pTmpBuf.data(), "%s\r180\f%05d%lu\f00000\n\n", pText, player->GetExperienceDisplayColor(), LODWORD(player->uExperience));
|
|
2055 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2056
|
|
2057 pY += 2 * LOBYTE(pFontArrus->uFontHeight);
|
|
2058 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], player->GetActualAttack(false));
|
|
2059 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2060
|
|
2061 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2062 sprintf(pTmpBuf.data(), "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], player->GetMeleeDamageString());
|
|
2063 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2064
|
|
2065 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2066 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], player->GetRangedAttack());
|
|
2067 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2068
|
|
2069 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2070 sprintf(pTmpBuf.data(), "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], player->GetRangedDamageString());
|
|
2071 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2072
|
|
2073 text_format = Stat_string_format_2_column_less_100;
|
|
2074 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 )
|
|
2075 text_format = Stat_string_format_2_column_over_100;
|
|
2076 pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
|
|
2077 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[87],
|
|
2078 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)),
|
|
2079 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE));
|
|
2080 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2081
|
|
2082 text_format = Stat_string_format_2_column_less_100;
|
|
2083 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 )
|
|
2084 text_format = Stat_string_format_2_column_over_100;
|
|
2085 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2086 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[6],
|
|
2087 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)),
|
|
2088 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR));
|
|
2089 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2090
|
|
2091 text_format = Stat_string_format_2_column_less_100;
|
|
2092 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 )
|
|
2093 text_format = Stat_string_format_2_column_over_100;
|
|
2094 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2095 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[240],
|
|
2096 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)),
|
|
2097 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER));
|
|
2098 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2099
|
|
2100 text_format = Stat_string_format_2_column_less_100;
|
|
2101 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH) > 99 )
|
|
2102 text_format = Stat_string_format_2_column_over_100;
|
|
2103 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2104 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[70],
|
|
2105 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)),
|
|
2106 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH));
|
|
2107 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2108
|
|
2109 text_format = Stat_string_format_2_column_less_100;
|
|
2110 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 )
|
|
2111 text_format = Stat_string_format_2_column_over_100;
|
|
2112 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2113 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[142],
|
|
2114 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)),
|
|
2115 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND));
|
|
2116 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) == 200 )
|
|
2117 sprintf(pTmpBuf.data(), Stat_string_format_2_column_text, pGlobalTXT_LocalizationStrings[142],
|
|
2118 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), 200), pGlobalTXT_LocalizationStrings[625]);
|
|
2119 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2120
|
|
2121 text_format = Stat_string_format_2_column_less_100;
|
|
2122 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 )
|
|
2123 text_format = Stat_string_format_2_column_over_100;
|
|
2124 pY += LOBYTE(pFontArrus->uFontHeight) - 2;
|
|
2125 int it = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
|
|
2126 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[29],
|
|
2127 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)),
|
|
2128 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY));
|
|
2129 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 )
|
|
2130 sprintf(pTmpBuf.data(), Stat_string_format_2_column_text, pGlobalTXT_LocalizationStrings[29],
|
|
2131 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), 200), pGlobalTXT_LocalizationStrings[625]);
|
|
2132 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
|
|
2133 }
|
|
2134
|
|
2135 bool awardSort (int i, int j)
|
|
2136 {
|
|
2137 if (pAwards[i].uPriority == 0) //none
|
|
2138 return false;
|
|
2139 else if (pAwards[j].uPriority == 0)
|
|
2140 return true;
|
|
2141 else if(pAwards[i].uPriority == 1) //fines,arena stuff,etc
|
|
2142 return false;
|
|
2143 else if(pAwards[j].uPriority == 1)
|
|
2144 return true;
|
|
2145 else if(pAwards[i].uPriority == 5) //joined guilds
|
|
2146 return false;
|
|
2147 else if(pAwards[j].uPriority == 5)
|
|
2148 return true;
|
|
2149 else
|
|
2150 return (pAwards[i].uPriority < pAwards[j].uPriority);
|
|
2151 }
|
|
2152
|
|
2153 //----- (00419100) --------------------------------------------------------
|
|
2154 void FillAwardsData()
|
|
2155 {
|
|
2156 Player* pPlayer = pPlayers[uActiveCharacter];
|
|
2157
|
|
2158 memset(achieved_awards.data(), 0, 4000);
|
|
2159 num_achieved_awards = 0;
|
|
2160
|
|
2161 memset(pTmpBuf2.data(), 0, 0x7D0u);
|
|
2162 BtnDown_flag = 0;
|
|
2163 BtnUp_flag = 0;
|
|
2164 books_page_number = 0;
|
|
2165 books_primary_item_per_page = 0;
|
|
2166 for ( int i = 1; i < 105; ++i )
|
|
2167 {
|
|
2168 if ( _449B57_test_bit(pPlayer->_achieved_awards_bits, i) && pAwards[i].pText )
|
|
2169 achieved_awards[num_achieved_awards++] = (AwardType)i;
|
|
2170 }
|
|
2171 full_num_items_in_book = num_achieved_awards;
|
|
2172 num_achieved_awards = 0;
|
|
2173
|
|
2174 //sort awards index
|
|
2175
|
|
2176 if (full_num_items_in_book>0)
|
|
2177 {
|
|
2178 for (int i = 0; i< full_num_items_in_book; ++i)
|
|
2179 achieved_awards[full_num_items_in_book+i] = (AwardType)(rand()%16);//случайные значения от 0 до 15
|
|
2180 for (int i = 1; i< full_num_items_in_book; ++i)
|
|
2181 {
|
|
2182 for (int j = i; j< full_num_items_in_book; ++j)
|
|
2183 {
|
|
2184 AwardType tmp;
|
|
2185 if (pAwards[achieved_awards[j]].uPriority < pAwards[achieved_awards[i]].uPriority)
|
|
2186 {
|
|
2187 tmp= achieved_awards[j];
|
|
2188 achieved_awards[j] = achieved_awards[i];
|
|
2189 achieved_awards[i] = tmp;
|
|
2190 }
|
|
2191 }
|
|
2192 }
|
|
2193 }
|
|
2194
|
|
2195 // if (full_num_items_in_book > 0)
|
|
2196 /* {
|
|
2197 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort);
|
|
2198 }*/
|
|
2199 }
|
|
2200
|
|
2201 //----- (0043EF2B) --------------------------------------------------------
|
|
2202 void WetsuitOn( unsigned int uPlayerID )
|
|
2203 {
|
|
2204 CHARACTER_RACE player_race; // edi@2
|
|
2205 signed int player_sex; // eax@2
|
|
2206 int texture_num; // ecx@5
|
|
2207 char pContainer[20]; // [sp+4h] [bp-1Ch]@7
|
|
2208
|
|
2209 if ( uPlayerID> 0 )
|
|
2210 {
|
|
2211 player_race = pPlayers[uPlayerID]->GetRace();
|
|
2212 player_sex = pPlayers[uPlayerID]->GetSexByVoice();
|
|
2213 if ( player_race == CHARACTER_RACE_DWARF )
|
|
2214 texture_num = (player_sex != 0) + 3;
|
|
2215 else
|
|
2216 texture_num = (player_sex != 0) + 1;
|
|
2217 wsprintfA(pContainer, "pc23v%dBod", texture_num);
|
|
2218 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2219 wsprintfA(pContainer, "pc23v%dlad", texture_num);
|
|
2220 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2221 wsprintfA(pContainer, "pc23v%dlau", texture_num);
|
|
2222 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2223 wsprintfA(pContainer, "pc23v%drh", texture_num);
|
|
2224 papredoll_drhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2225 wsprintfA(pContainer, "pc23v%dlh", texture_num);
|
|
2226 papredoll_dlhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2227 wsprintfA(pContainer, "pc23v%dlhu", texture_num);
|
|
2228 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2229
|
|
2230 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 )
|
|
2231 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = 0;
|
|
2232 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = 0;
|
|
2233 IsPlayerWearingWatersuit[uPlayerID] = 1;
|
|
2234 }
|
|
2235 }
|
|
2236
|
|
2237 //----- (0043F0BD) --------------------------------------------------------
|
|
2238 void WetsuitOff( unsigned int uPlayerID )
|
|
2239 {
|
|
2240 char pContainer[20]; // [sp+0h] [bp-18h]@4
|
|
2241
|
|
2242 if (uPlayerID > 0 )
|
|
2243 {
|
|
2244 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
2245 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
2246 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
2247 papredoll_drhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(drh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
2248 papredoll_dlhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(dlh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
2249 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE);
|
|
2250
|
|
2251 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 )
|
|
2252 {
|
|
2253 wsprintfA(pContainer, "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1);
|
|
2254 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2255 }
|
|
2256 wsprintfA(pContainer, "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1);
|
|
2257 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
|
|
2258 IsPlayerWearingWatersuit[uPlayerID] = 0;
|
|
2259 }
|
|
2260 }
|
|
2261
|
|
2262 //----- (00468F8A) --------------------------------------------------------
|
|
2263 void OnPaperdollLeftClick()
|
|
2264 {
|
|
2265 int v1; // ecx@1
|
|
2266 unsigned int v2; // edi@1
|
|
2267 unsigned int v3; // edx@4
|
|
2268 unsigned int pSkillType; // esi@5
|
|
2269 unsigned __int16 v5; // ax@7
|
|
2270 int v7; // esi@27
|
|
2271 int v8; // eax@29
|
|
2272 int v17; // eax@44
|
|
2273 //unsigned int v18; // ecx@55
|
|
2274 //unsigned int v19; // eax@55
|
|
2275 // unsigned int v22; // eax@61
|
|
2276 int v23; // eax@62
|
|
2277 int v26; // eax@69
|
|
2278 int v34; // esi@90
|
|
2279 ItemGen _this; // [sp+Ch] [bp-40h]@1
|
|
2280 // unsigned int v48; // [sp+30h] [bp-1Ch]@88
|
|
2281 unsigned int v50; // [sp+38h] [bp-14h]@50
|
|
2282 int v51; // [sp+3Ch] [bp-10h]@1
|
|
2283 int v52; // [sp+40h] [bp-Ch]@5
|
|
2284 ITEM_EQUIP_TYPE pEquipType;
|
|
2285 CastSpellInfo *pSpellInfo;
|
|
2286
|
|
2287 v51 = 0;
|
|
2288 _this.Reset();
|
|
2289 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand;
|
|
2290 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield;
|
|
2291 if ( v1 && pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1].GetItemEquipType() == EQUIP_TWO_HANDED )
|
|
2292 v51 = v1;
|
|
2293 v3 = pParty->pPickedItem.uItemID;
|
|
2294 if ( pParty->pPickedItem.uItemID )
|
|
2295 {
|
|
2296 pEquipType = pParty->pPickedItem.GetItemEquipType();
|
|
2297 pSkillType = pParty->pPickedItem.GetPlayerSkillType();
|
|
2298 if ( pSkillType == 4 )
|
|
2299 {
|
|
2300 if ( v2 )
|
|
2301 {
|
|
2302 LOBYTE(v5) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_SPEAR);
|
|
2303 if ( (signed int)SkillToMastery(v5) < 3 )
|
|
2304 {
|
|
2305 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2306 return;
|
|
2307 }
|
|
2308 v3 = pParty->pPickedItem.uItemID;
|
|
2309 }
|
|
2310 }
|
|
2311 else
|
|
2312 {
|
|
2313 if ( (pSkillType == 8 || pSkillType == 1 || pSkillType == 2)
|
|
2314 && v1
|
|
2315 && pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1].GetPlayerSkillType() == 4 )
|
|
2316 {
|
|
2317 LOBYTE(v5) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_SPEAR);
|
|
2318 if ( (signed int)SkillToMastery(v5) < 3 )
|
|
2319 {
|
|
2320 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2321 return;
|
|
2322 }
|
|
2323 }
|
|
2324 }
|
|
2325 if ( !pPlayers[uActiveCharacter]->CanEquip_RaceAndAlignmentCheck(v3) )
|
|
2326 {
|
|
2327
|
|
2328 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2329 return;
|
|
2330 }
|
|
2331 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT )
|
|
2332 {
|
|
2333 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3);
|
|
2334 WetsuitOn(uActiveCharacter);
|
|
2335 return;
|
|
2336 }
|
|
2337 switch ( pEquipType )
|
|
2338 {
|
|
2339 case EQUIP_BOW:
|
|
2340 case EQUIP_ARMOUR:
|
|
2341 case EQUIP_HELMET:
|
|
2342 case EQUIP_BELT:
|
|
2343 case EQUIP_CLOAK:
|
|
2344 case EQUIP_GAUNTLETS:
|
|
2345 case EQUIP_BOOTS:
|
|
2346 case EQUIP_AMULET:
|
|
2347 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка
|
|
2348 {
|
|
2349 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2350 return;
|
|
2351 }
|
|
2352 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() && (pEquipType != EQUIP_ARMOUR || bUnderwater) )
|
|
2353 {
|
|
2354 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2355 return;
|
|
2356 }
|
|
2357 pPlayers[uActiveCharacter]->EquipBody(pEquipType);
|
|
2358 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT )
|
|
2359 WetsuitOff(uActiveCharacter);
|
|
2360 return;
|
|
2361 //------------------------dress rings(одевание колец)----------------------------------
|
|
2362 case EQUIP_RING:
|
|
2363 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() )
|
|
2364 {
|
|
2365 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2366 return;
|
|
2367 }
|
|
2368 //слоты для колец
|
|
2369 v7 = 0;
|
|
2370 for ( v52 = 10; (signed int)v52 < 16; ++v52 )
|
|
2371 {
|
|
2372 if ( !pPlayers[uActiveCharacter]->pEquipment.uRings[v7] )
|
|
2373 {
|
|
2374 v8 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
|
|
2375 if ( v8 >= 0 )
|
|
2376 {
|
|
2377 pParty->pPickedItem.uBodyAnchor = v52 + 1;
|
|
2378 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8]));
|
|
2379 pPlayers[uActiveCharacter]->pEquipment.uRings[v7] = v8 + 1;
|
|
2380 pMouse->RemoveHoldingItem();
|
|
2381 break;
|
|
2382 }
|
|
2383 }
|
|
2384 v7++;
|
|
2385 }
|
|
2386 if ( v52 == 16 )//замещение последнего кольца
|
|
2387 {
|
|
2388 v52 = pPlayers[uActiveCharacter]->pEquipment.uRings[5] - 1;
|
|
2389 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2390 pPlayers[uActiveCharacter]->pInventoryItemList[v52].uBodyAnchor = 0;
|
|
2391 pParty->pPickedItem.Reset();
|
|
2392 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v52]);
|
|
2393 _this.uBodyAnchor = 16;
|
|
2394 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, 0x24u);
|
|
2395 pPlayers[uActiveCharacter]->pEquipment.uRings[5] = v52 + 1;
|
|
2396 }
|
|
2397 return;
|
|
2398 //------------------dress shield(одеть щит)------------------------------------------------------
|
|
2399 case EQUIP_SHIELD://Щит
|
|
2400 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() )//в акваланге
|
|
2401 {
|
|
2402 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2403 return;
|
|
2404 }
|
|
2405 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка
|
|
2406 {
|
|
2407 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2408 return;
|
|
2409 }
|
|
2410 if ( v2 )//смена щита щитом
|
|
2411 {
|
|
2412 --v2;
|
|
2413 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2414 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0;
|
|
2415 pParty->pPickedItem.Reset();
|
|
2416 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]);
|
|
2417 _this.uBodyAnchor = 1;
|
|
2418 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v2], &_this, 0x24u);
|
|
2419 pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1;
|
|
2420 if ( v51 == EQUIP_SINGLE_HANDED )
|
|
2421 return;
|
|
2422 }
|
|
2423 else
|
|
2424 {
|
|
2425 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
|
|
2426 if ( v52 < 0 )
|
|
2427 return;
|
|
2428 if ( !v51 )// обычная установка щита на пустую руку
|
|
2429 {
|
|
2430 pParty->pPickedItem.uBodyAnchor = 1;
|
|
2431 v17 = v52 + 1;
|
|
2432 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52]));
|
|
2433 pPlayers[uActiveCharacter]->pEquipment.uShield = v17;
|
|
2434 pMouse->RemoveHoldingItem();
|
|
2435 return;
|
|
2436 }
|
|
2437 v1--;//ставим щит когда держит двуручный меч
|
|
2438 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2439 pPlayers[uActiveCharacter]->pInventoryItemList[v1].uBodyAnchor = 0;
|
|
2440 pParty->pPickedItem.Reset();
|
|
2441 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v1]);
|
|
2442 _this.uBodyAnchor = 1;
|
|
2443 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52]));
|
|
2444 pPlayers[uActiveCharacter]->pEquipment.uShield = v52 + 1;
|
|
2445 }
|
|
2446 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0;
|
|
2447 return;
|
|
2448 //-------------------------taken in hand(взять в руку)-------------------------------------------
|
|
2449 case EQUIP_SINGLE_HANDED:
|
|
2450 case EQUIP_WAND:
|
|
2451 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped()
|
|
2452 && pParty->pPickedItem.uItemID != 64
|
|
2453 && pParty->pPickedItem.uItemID != 65 )
|
|
2454 {
|
|
2455 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2456 return;
|
|
2457 }
|
|
2458 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )
|
|
2459 {
|
|
2460 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2461 return;
|
|
2462 }
|
|
2463 v50 = 0;
|
|
2464 if ( pSkillType == 2 && (unsigned __int16)(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_DAGGER] & 0xFFC0)
|
|
2465 || pSkillType == 1 && (signed int)SkillToMastery(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_SWORD]) >= 3 )
|
|
2466 {
|
|
2467 //v18 = pMouse->uMouseClickX;
|
|
2468 //v19 = pMouse->uMouseClickY;
|
|
2469 if ( (signed int)pMouse->uMouseClickX >= 560 )
|
|
2470 {
|
|
2471 if ( !v51 )
|
|
2472 {
|
|
2473 if ( v2 )
|
|
2474 {
|
|
2475 --v2;
|
|
2476 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2477 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0;
|
|
2478 pParty->pPickedItem.Reset();
|
|
2479 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]);
|
|
2480 _this.uBodyAnchor = 1;
|
|
2481 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v2], &_this, 0x24u);
|
|
2482 pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1;
|
|
2483 if ( pEquipType != EQUIP_WAND )
|
|
2484 return;
|
|
2485 v50 = _this.uItemID;
|
|
2486 if ( _this.uItemID )
|
|
2487 {
|
|
2488 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5
|
|
2489 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[pPlayers[uActiveCharacter]->pInventoryItemList[v50].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9);
|
|
2490 }
|
|
2491 break;
|
|
2492 }
|
|
2493 v23 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
|
|
2494 if ( v23 < 0 )
|
|
2495 return;
|
|
2496 pParty->pPickedItem.uBodyAnchor = 1;
|
|
2497 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v23]));
|
|
2498 pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1;
|
|
2499 pMouse->RemoveHoldingItem();
|
|
2500 if ( pEquipType != EQUIP_WAND )
|
|
2501 return;
|
|
2502 v50 = pPlayers[uActiveCharacter]->pInventoryItemList[v23].uItemID;
|
|
2503 if ( v50 )
|
|
2504 {
|
|
2505 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5
|
|
2506 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[pPlayers[uActiveCharacter]->pInventoryItemList[v50].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9);
|
|
2507 }
|
|
2508 break;
|
|
2509 }
|
|
2510 }
|
|
2511 }
|
|
2512 if ( !v1 )
|
|
2513 {
|
|
2514 v26 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
|
|
2515 if ( v26 < 0 )
|
|
2516 return;
|
|
2517 pParty->pPickedItem.uBodyAnchor = 2;
|
|
2518 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26]));
|
|
2519 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1;
|
|
2520 pMouse->RemoveHoldingItem();
|
|
2521 if ( pEquipType != EQUIP_WAND )
|
|
2522 return;
|
|
2523 if ( pPlayers[uActiveCharacter]->pInventoryItemList[v26].uItemID )
|
|
2524 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[pPlayers[uActiveCharacter]->pInventoryItemList[v26].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9);
|
|
2525 break;
|
|
2526 }
|
|
2527 --v1;
|
|
2528 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2529 pPlayers[uActiveCharacter]->pInventoryItemList[v1].uBodyAnchor = 0;
|
|
2530 pParty->pPickedItem.Reset();
|
|
2531 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v1]);
|
|
2532 _this.uBodyAnchor = 2;
|
|
2533 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v1], &_this, 0x24);
|
|
2534 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v1 + 1;
|
|
2535 if ( pEquipType == EQUIP_WAND )
|
|
2536 v50 = _this.uItemID;
|
|
2537 if ( v51 )
|
|
2538 pPlayers[uActiveCharacter]->pEquipment.uShield = 0;
|
|
2539 if ( v50 )//взять жезл
|
|
2540 {
|
|
2541 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5
|
|
2542 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[v50 - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9);
|
|
2543 }
|
|
2544 break;
|
|
2545 //---------------------------take two hands(взять двумя руками)---------------------------------
|
|
2546 case EQUIP_TWO_HANDED:
|
|
2547 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() )
|
|
2548 {
|
|
2549 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2550 return;
|
|
2551 }
|
|
2552 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )
|
|
2553 {
|
|
2554 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0);
|
|
2555 return;
|
|
2556 }
|
|
2557 if ( v1 )//взять двуручный меч когда нет щита(замещение оружия)
|
|
2558 {
|
|
2559 if ( v2 )
|
|
2560 {
|
|
2561 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2562 return;
|
|
2563 }
|
|
2564 --v1;
|
|
2565 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2566 pPlayers[uActiveCharacter]->pInventoryItemList[v1].uBodyAnchor = 0;
|
|
2567 pParty->pPickedItem.Reset();
|
|
2568 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v1]);
|
|
2569 _this.uBodyAnchor = 2;
|
|
2570 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v1], &_this, 0x24u);
|
|
2571 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v1 + 1;
|
|
2572 }
|
|
2573 else
|
|
2574 {
|
|
2575 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot();
|
|
2576 if ( v52 >= 0 )
|
|
2577 {
|
|
2578 if ( v2 )//взять двуручный меч когда есть щит(замещение щитом)
|
|
2579 {
|
|
2580 v2--;
|
|
2581 memcpy(&_this, &pParty->pPickedItem, sizeof(_this));
|
|
2582 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0;
|
|
2583 pParty->pPickedItem.Reset();
|
|
2584 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]);
|
|
2585 _this.uBodyAnchor = 2;
|
|
2586 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52]));
|
|
2587 pPlayers[uActiveCharacter]->pEquipment.uShield = 0;
|
|
2588 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v52 + 1;
|
|
2589 }
|
|
2590 else
|
|
2591 {
|
|
2592 pParty->pPickedItem.uBodyAnchor = 2;
|
|
2593 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52]));
|
|
2594 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v52 + 1;
|
|
2595 pMouse->RemoveHoldingItem();
|
|
2596 }
|
|
2597 }
|
|
2598 }
|
|
2599 return;
|
|
2600 //-------------------------------------------------------------------------------
|
|
2601 default:
|
|
2602 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(uActiveCharacter, 0);//выпить напиток и др.
|
|
2603 return;
|
|
2604 }
|
|
2605 return;
|
|
2606 }
|
|
2607
|
|
2608 v34 = pRenderer->pActiveZBuffer[pMouse->uMouseClickX + pSRZBufferLineOffsets[pMouse->uMouseClickY]] & 0xFFFF;
|
|
2609 if ( v34 )
|
|
2610 {
|
|
2611 //v36 = v34 - 1;
|
|
2612 //v38 = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1];
|
|
2613 pEquipType = pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].GetItemEquipType();
|
|
2614 if ( pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uItemID == ITEM_WETSUIT )
|
|
2615 {
|
|
2616 if ( bUnderwater )
|
|
2617 {
|
|
2618 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
|
|
2619 return;
|
|
2620 }
|
|
2621 WetsuitOff(uActiveCharacter);
|
|
2622 }
|
|
2623 if ( _50C9A0_IsEnchantingInProgress )//наложить закл на экипировку
|
|
2624 {
|
|
2625 /* *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo
|
|
2626 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1;
|
|
2627 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36;
|
|
2628 *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType;*/
|
|
2629 pSpellInfo = (CastSpellInfo *)pGUIWindow_Settings->ptr_1C;
|
|
2630 pSpellInfo->uFlags &= 0x7F;
|
|
2631 pSpellInfo->uPlayerID_2 = uActiveCharacter - 1;
|
|
2632 pSpellInfo->spell_target_pid = v34 - 1;
|
|
2633 pSpellInfo->field_6 = pEquipType;
|
|
2634
|
|
2635 ptr_50C9A4_ItemToEnchant = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1];
|
|
2636 _50C9A0_IsEnchantingInProgress = 0;
|
|
2637 if ( pMessageQueue_50CBD0->uNumMessages )
|
|
2638 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
|
|
2639 pMouse->SetCursorBitmap("MICON1");
|
|
2640 _50C9D4_AfterEnchClickEventSecondParam = 0;
|
|
2641 _50C9D0_AfterEnchClickEventId = 113;
|
|
2642 _50C9D8_AfterEnchClickEventTimeout = 256;
|
|
2643 }
|
|
2644 else
|
|
2645 {
|
|
2646 if ( !ptr_50C9A4_ItemToEnchant )//снять вещь
|
|
2647 {
|
|
2648 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]);
|
|
2649 pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uBodyAnchor - 1] = 0;
|
|
2650 pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].Reset();
|
|
2651 }
|
|
2652 }
|
|
2653 }
|
|
2654 else//снять лук
|
|
2655 {
|
|
2656 if ( pPlayers[uActiveCharacter]->pEquipment.uBow )
|
|
2657 {
|
|
2658 _this = pPlayers[uActiveCharacter]->pInventoryItemList[pPlayers[uActiveCharacter]->pEquipment.uBow - 1];
|
|
2659 pParty->SetHoldingItem(&_this);
|
|
2660 _this.Reset();
|
|
2661 pPlayers[uActiveCharacter]->pEquipment.uBow = 0;
|
|
2662 }
|
|
2663 }
|
|
2664 }
|
|
2665
|
|
2666 //----- (004196A0) --------------------------------------------------------
|
|
2667 void CharacterUI_ReleaseButtons()
|
|
2668 {
|
|
2669 GUIButton *i; // esi@2
|
|
2670 GUIButton *j; // esi@7
|
|
2671
|
|
2672 if ( dword_507CC0_activ_ch )
|
|
2673 {
|
|
2674 dword_507CC0_activ_ch = 0;
|
|
2675 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = j )
|
|
2676 {
|
|
2677 j = i->pNext;
|
|
2678 if ( i->field_1C & 0x8000 )
|
|
2679 {
|
|
2680 i->Release();
|
|
2681 free(i);
|
|
2682 }
|
|
2683 }
|
|
2684 for ( j = pGUIWindow_CurrentMenu->pControlsHead; j; j = j->pNext )
|
|
2685 {
|
|
2686 if ( j->msg == UIMSG_InventoryLeftClick)
|
|
2687 {
|
|
2688 j->uX = dword_50698C_uX;
|
|
2689 j->uY = dword_506988_uY;
|
|
2690 j->uZ = dword_506984_uZ;
|
|
2691 j->uW = dword_506980_uW;
|
|
2692 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(1, 0, 0, 0);
|
|
2693 }
|
|
2694 }
|
|
2695 }
|
|
2696 } |