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