Mercurial > mm7
comparison UI/UICharacter.cpp @ 1463:b330df6a2183
Слияние
author | Ritor1 |
---|---|
date | Sun, 11 Aug 2013 12:09:33 +0600 |
parents | f682c853200d bfe342ae0c1f |
children | b870630761df |
comparison
equal
deleted
inserted
replaced
1462:f682c853200d | 1463:b330df6a2183 |
---|---|
1 #ifdef _MSC_VER | 1 #ifdef _MSC_VER |
2 #define _CRT_SECURE_NO_WARNINGS | 2 #define _CRT_SECURE_NO_WARNINGS |
3 #endif | 3 #endif |
4 | 4 |
5 #include <assert.h> | 5 #include <assert.h> |
6 | |
7 #include <algorithm> | 6 #include <algorithm> |
8 | |
9 #include "..\MM7.h" | 7 #include "..\MM7.h" |
10 | |
11 #include "..\MapInfo.h" | 8 #include "..\MapInfo.h" |
12 #include "..\Game.h" | 9 #include "..\Game.h" |
13 #include "..\GUIWindow.h" | 10 #include "..\GUIWindow.h" |
14 #include "..\GUIFont.h" | 11 #include "..\GUIFont.h" |
15 #include "..\GUIProgressBar.h" | 12 #include "..\GUIProgressBar.h" |
21 #include "..\Viewport.h" | 18 #include "..\Viewport.h" |
22 #include "..\Time.h" | 19 #include "..\Time.h" |
23 #include "..\Awards.h" | 20 #include "..\Awards.h" |
24 #include "..\CastSpellInfo.h" | 21 #include "..\CastSpellInfo.h" |
25 #include "..\texts.h" | 22 #include "..\texts.h" |
26 | |
27 #include "..\mm7_data.h" | 23 #include "..\mm7_data.h" |
28 #include "..\Mouse.h" | 24 #include "..\Mouse.h" |
29 #include "..\Allocator.h" | 25 #include "..\Allocator.h" |
30 | 26 |
31 | 27 |
32 int bRingsShownInCharScreen; // 5118E0 | 28 int bRingsShownInCharScreen; // 5118E0 |
33 | |
34 | 29 |
35 unsigned int ui_mainmenu_copyright_color; | 30 unsigned int ui_mainmenu_copyright_color; |
36 | 31 |
37 unsigned int ui_character_tooltip_header_default_color; | 32 unsigned int ui_character_tooltip_header_default_color; |
38 unsigned int ui_character_default_text_color; | 33 unsigned int ui_character_default_text_color; |
87 unsigned int ui_game_dialogue_npc_name_color; | 82 unsigned int ui_game_dialogue_npc_name_color; |
88 unsigned int ui_game_dialogue_option_highlight_color; | 83 unsigned int ui_game_dialogue_option_highlight_color; |
89 unsigned int ui_game_dialogue_option_normal_color; | 84 unsigned int ui_game_dialogue_option_normal_color; |
90 | 85 |
91 unsigned int ui_house_player_cant_interact_color; | 86 unsigned int ui_house_player_cant_interact_color; |
92 | |
93 | 87 |
94 | 88 |
95 void set_default_ui_skin() | 89 void set_default_ui_skin() |
96 { | 90 { |
97 ui_mainmenu_copyright_color = TargetColor(255, 255, 255); | 91 ui_mainmenu_copyright_color = TargetColor(255, 255, 255); |
184 ui_game_dialogue_option_normal_color = TargetColor(255, 255, 255); | 178 ui_game_dialogue_option_normal_color = TargetColor(255, 255, 255); |
185 | 179 |
186 ui_house_player_cant_interact_color = TargetColor(255, 255, 155); | 180 ui_house_player_cant_interact_color = TargetColor(255, 255, 155); |
187 } | 181 } |
188 | 182 |
189 | |
190 | |
191 | |
192 | |
193 | |
194 std::array<unsigned int, 16> papredoll_dbrds; | 183 std::array<unsigned int, 16> papredoll_dbrds; |
195 unsigned int papredoll_drhs[4]; | 184 unsigned int papredoll_drhs[4]; |
196 unsigned int papredoll_dlhus[4]; | 185 unsigned int papredoll_dlhus[4]; |
197 unsigned int papredoll_dlhs[4]; | 186 unsigned int papredoll_dlhs[4]; |
198 unsigned int papredoll_dbods[5]; | 187 unsigned int papredoll_dbods[5]; |
205 int paperdoll_cloak_collar_texture[4][10]; // weak | 194 int paperdoll_cloak_collar_texture[4][10]; // weak |
206 int paperdoll_cloak_texture[4][10]; | 195 int paperdoll_cloak_texture[4][10]; |
207 int paperdoll_helm_texture[2][16]; //511698 | 196 int paperdoll_helm_texture[2][16]; //511698 |
208 int paperdoll_belt_texture[4][7]; //511718 | 197 int paperdoll_belt_texture[4][7]; //511718 |
209 | 198 |
210 | |
211 const int paperdoll_Weapon[4][16][2] = {//4E4C30 | 199 const int paperdoll_Weapon[4][16][2] = {//4E4C30 |
212 {{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}}, | 200 {{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}}, |
213 {{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}}, | 201 {{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}}, |
214 {{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}}, | 202 {{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}}, |
215 {{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}}, | 203 {{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}}, |
216 }; | 204 }; |
217 | |
218 | |
219 | 205 |
220 const int paperdoll_Boot[4][7][2] = //4E5490 | 206 const int paperdoll_Boot[4][7][2] = //4E5490 |
221 { | 207 { |
222 0xE, 0x11D, 0xD, 0x11D, 0xC, 0x10A, 0xA, 0xFF, 0xD, 0xF9, 0xD, 0x137, 0xC, 0x10E, | 208 0xE, 0x11D, 0xD, 0x11D, 0xC, 0x10A, 0xA, 0xFF, 0xD, 0xF9, 0xD, 0x137, 0xC, 0x10E, |
223 0x14, 0x125, 0x13, 0x122, 0x15, 0x120, 0x15, 0x114, 0x13, 0x10A, 0x11, 0x13E, 0x11, 0x116, | 209 0x14, 0x125, 0x13, 0x122, 0x15, 0x120, 0x15, 0x114, 0x13, 0x10A, 0x11, 0x13E, 0x11, 0x116, |
381 const int pMiscSkills[12] = {PLAYER_SKILL_ALCHEMY, PLAYER_SKILL_ARMSMASTER, PLAYER_SKILL_BODYBUILDING, PLAYER_SKILL_ITEM_ID, PLAYER_SKILL_MONSTER_ID, | 367 const int pMiscSkills[12] = {PLAYER_SKILL_ALCHEMY, PLAYER_SKILL_ARMSMASTER, PLAYER_SKILL_BODYBUILDING, PLAYER_SKILL_ITEM_ID, PLAYER_SKILL_MONSTER_ID, |
382 PLAYER_SKILL_LEARNING, PLAYER_SKILL_TRAP_DISARM, PLAYER_SKILL_MEDITATION, PLAYER_SKILL_MERCHANT, PLAYER_SKILL_PERCEPTION, | 368 PLAYER_SKILL_LEARNING, PLAYER_SKILL_TRAP_DISARM, PLAYER_SKILL_MEDITATION, PLAYER_SKILL_MERCHANT, PLAYER_SKILL_PERCEPTION, |
383 PLAYER_SKILL_REPAIR, PLAYER_SKILL_STEALING}; | 369 PLAYER_SKILL_REPAIR, PLAYER_SKILL_STEALING}; |
384 const int pMagicSkills[9] = {PLAYER_SKILL_FIRE, PLAYER_SKILL_AIR, PLAYER_SKILL_WATER, PLAYER_SKILL_EARTH, PLAYER_SKILL_SPIRIT, | 370 const int pMagicSkills[9] = {PLAYER_SKILL_FIRE, PLAYER_SKILL_AIR, PLAYER_SKILL_WATER, PLAYER_SKILL_EARTH, PLAYER_SKILL_SPIRIT, |
385 PLAYER_SKILL_MIND, PLAYER_SKILL_BODY, PLAYER_SKILL_LIGHT, PLAYER_SKILL_DARK}; | 371 PLAYER_SKILL_MIND, PLAYER_SKILL_BODY, PLAYER_SKILL_LIGHT, PLAYER_SKILL_DARK}; |
386 | |
387 | |
388 | |
389 | 372 |
390 //----- (00421626) -------------------------------------------------------- | 373 //----- (00421626) -------------------------------------------------------- |
391 GUIWindow *CharacterUI_Initialize(unsigned int _this) | 374 GUIWindow *CharacterUI_Initialize(unsigned int _this) |
392 { | 375 { |
393 GUIWindow *pWindow; // edi@3 | 376 GUIWindow *pWindow; // edi@3 |
446 FillAwardsData(); | 429 FillAwardsData(); |
447 return pWindow; | 430 return pWindow; |
448 } | 431 } |
449 | 432 |
450 //----- (004219BE) -------------------------------------------------------- | 433 //----- (004219BE) -------------------------------------------------------- |
451 GUIWindow *CastSpellInfo::sub_4219BE() | 434 GUIWindow *CastSpellInfo::GetCastSpellInInventoryWindow() |
452 { | 435 { |
453 GUIWindow *v2; // ebx@1 | 436 GUIWindow *CS_inventory_window; // ebx@1 |
454 | 437 |
455 pEventTimer->Pause(); | 438 pEventTimer->Pause(); |
456 pAudioPlayer->StopChannels(-1, -1); | 439 pAudioPlayer->StopChannels(-1, -1); |
457 bRingsShownInCharScreen = 0; | 440 bRingsShownInCharScreen = 0; |
458 CharacterUI_LoadPaperdollTextures(); | 441 CharacterUI_LoadPaperdollTextures(); |
459 pCurrentScreen = SCREEN_CASTING; | 442 pCurrentScreen = SCREEN_CASTING; |
460 v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell_InInventory, (int)this, 0); | 443 CS_inventory_window = GUIWindow::Create(0, 0, 640, 480, WINDOW_CastSpell_InInventory, (int)this, 0); |
461 pCharacterScreen_ExitBtn = v2->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, | 444 pCharacterScreen_ExitBtn = CS_inventory_window->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, |
462 pGlobalTXT_LocalizationStrings[79], // Close | 445 pGlobalTXT_LocalizationStrings[79], // Close |
463 pIcons_LOD->GetTexture(papredoll_dbrds[2]), | 446 pIcons_LOD->GetTexture(papredoll_dbrds[2]), |
464 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); | 447 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); |
465 v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); | 448 CS_inventory_window->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); |
466 pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); | 449 pCharacterScreen_DollBtn = CS_inventory_window->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); |
467 | 450 |
468 v2->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); | 451 CS_inventory_window->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); |
469 v2->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); | 452 CS_inventory_window->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); |
470 v2->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); | 453 CS_inventory_window->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); |
471 v2->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | 454 CS_inventory_window->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); |
472 | 455 |
473 return v2; | 456 return CS_inventory_window; |
474 } | 457 } |
475 | |
476 | |
477 | |
478 | |
479 | |
480 | 458 |
481 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) | 459 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) |
482 { | 460 { |
483 int y_offset = y; | 461 int y_offset = y; |
484 | 462 |
485 sprintf(pTmpBuf.data(), "%s\r%03d%s", skill_group_name, right_margin, pGlobalTXT_LocalizationStrings[131]); //"Level" | 463 sprintf(pTmpBuf.data(), "%s\r%03d%s", skill_group_name, right_margin, pGlobalTXT_LocalizationStrings[131]); //"Level" |
486 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf.data(), 0, 0, 0); | 464 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf.data(), 0, 0, 0); |
487 | 465 |
488 int num_skills_drawn = 0; | 466 int num_skills_drawn = 0; |
489 for (uint i = 0; i < skill_list_size; ++i) | 467 for (int i = 0; i < skill_list_size; ++i) |
490 { | 468 { |
491 auto skill = (PLAYER_SKILL_TYPE)skill_list[i]; | 469 auto skill = (PLAYER_SKILL_TYPE)skill_list[i]; |
492 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j) | 470 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j) |
493 { | 471 { |
494 auto v8 = pGUIWindow_CurrentMenu->pControlsHead; | 472 auto v8 = pGUIWindow_CurrentMenu->pControlsHead; |
538 case 2: skill_level_str = pGlobalTXT_LocalizationStrings[433]; break; // Expert | 516 case 2: skill_level_str = pGlobalTXT_LocalizationStrings[433]; break; // Expert |
539 } | 517 } |
540 | 518 |
541 if (!skill_mastery_color) | 519 if (!skill_mastery_color) |
542 skill_mastery_color = ui_character_header_text_color; | 520 skill_mastery_color = ui_character_header_text_color; |
543 | |
544 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); | 521 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); |
545 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf.data(), 0, 0, 0); | 522 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf.data(), 0, 0, 0); |
546 } | 523 } |
547 } | 524 } |
548 } | 525 } |
553 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, y_offset, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0); //"None" | 530 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, y_offset, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0); //"None" |
554 } | 531 } |
555 | 532 |
556 return y_offset; | 533 return y_offset; |
557 } | 534 } |
558 | |
559 | |
560 | 535 |
561 //----- (00419719) -------------------------------------------------------- | 536 //----- (00419719) -------------------------------------------------------- |
562 void CharacterUI_SkillsTab_Draw(Player *player) | 537 void CharacterUI_SkillsTab_Draw(Player *player) |
563 { | 538 { |
564 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE)); | 539 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE)); |
583 | 558 |
584 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10; | 559 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10; |
585 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc" | 560 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc" |
586 } | 561 } |
587 | 562 |
588 | |
589 | |
590 | |
591 | |
592 | |
593 | |
594 | |
595 | |
596 | |
597 //----- (0041A000) -------------------------------------------------------- | 563 //----- (0041A000) -------------------------------------------------------- |
598 void CharacterUI_AwardsTab_Draw(Player *player) | 564 void CharacterUI_AwardsTab_Draw(Player *player) |
599 { | 565 { |
600 //unsigned int v1; // esi@1 | 566 unsigned int result; // eax@1 |
601 //unsigned int v2; // ebx@1 | 567 char *v6; // ebx@15 |
602 //unsigned int award_texture_id; // eax@1 | 568 char Source[100]; // [sp+Ch] [bp-C4h]@1 |
603 unsigned int result; // eax@1 | 569 GUIWindow awards_window; // [sp+70h] [bp-60h]@1 |
604 int v5; // eax@15 | |
605 char *v6; // ebx@15 | |
606 int v7; // eax@23 | |
607 int v8; // eax@24 | |
608 int v9; // eax@25 | |
609 //int v10; // eax@27 | |
610 int v11; // eax@32 | |
611 int v12; // eax@33 | |
612 int v13; // eax@34 | |
613 //signed int v14; // eax@43 | |
614 //unsigned int v15; // eax@43 | |
615 //int v16; // eax@43 | |
616 //int v17; // [sp-4h] [bp-D4h]@16 | |
617 char Source[100]; // [sp+Ch] [bp-C4h]@1 | |
618 GUIWindow a1; // [sp+70h] [bp-60h]@1 | |
619 //unsigned int v20; // [sp+C4h] [bp-Ch]@15 | |
620 //int v21; // [sp+C8h] [bp-8h]@14 | |
621 //int v22; // [sp+CCh] [bp-4h]@40 | |
622 | 570 |
623 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE)); | 571 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE)); |
624 sprintfex(pTmpBuf.data(), "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_character_header_text_color); | 572 sprintfex(pTmpBuf.data(), "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_character_header_text_color); |
625 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); | 573 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); |
626 strcat(pTmpBuf.data(), Source); | 574 strcat(pTmpBuf.data(), Source); |
627 strcat(pTmpBuf.data(), "\f00000"); | 575 strcat(pTmpBuf.data(), "\f00000"); |
628 | 576 |
629 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); | 577 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); |
630 result = books_primary_item_per_page; | 578 result = books_primary_item_per_page; |
631 a1.uFrameX = 12; | 579 awards_window.uFrameX = 12; |
632 a1.uFrameY = 48; | 580 awards_window.uFrameY = 48; |
633 a1.uFrameWidth = 424; | 581 awards_window.uFrameWidth = 424; |
634 a1.uFrameHeight = 290; | 582 awards_window.uFrameHeight = 290; |
635 a1.uFrameZ = 435; | 583 awards_window.uFrameZ = 435; |
636 a1.uFrameW = 337; | 584 awards_window.uFrameW = 337; |
637 if (BtnDown_flag && num_achieved_awards + books_primary_item_per_page < full_num_items_in_book) | 585 if (BtnDown_flag && num_achieved_awards + books_primary_item_per_page < full_num_items_in_book) |
638 result = books_primary_item_per_page++ + 1; | 586 result = books_primary_item_per_page++ + 1; |
639 if (BtnUp_flag && result) | 587 if (BtnUp_flag && result) |
640 { | 588 { |
641 --result; | 589 --result; |
642 books_primary_item_per_page = result; | 590 books_primary_item_per_page = result; |
643 } | 591 } |
644 | 592 |
645 if ( books_page_number < 0 ) | 593 if ( books_page_number < 0 ) |
646 { | 594 { |
647 result += num_achieved_awards; | 595 result += num_achieved_awards; |
648 books_primary_item_per_page = result; | 596 books_primary_item_per_page = result; |
649 if ( (signed int)(num_achieved_awards + result) > full_num_items_in_book ) | 597 if ( (signed int)(num_achieved_awards + result) > full_num_items_in_book ) |
650 { | 598 { |
651 result = full_num_items_in_book - num_achieved_awards; | 599 result = full_num_items_in_book - num_achieved_awards; |
652 books_primary_item_per_page = result; | 600 books_primary_item_per_page = result; |
653 } | 601 } |
654 } | 602 } |
655 else if ( books_page_number > 0 ) | 603 else if ( books_page_number > 0 ) |
656 { | 604 { |
657 result -= num_achieved_awards; | 605 result -= num_achieved_awards; |
658 books_primary_item_per_page = result; | 606 books_primary_item_per_page = result; |
659 if ( (result & 0x80000000u) != 0 ) | 607 if ( (result & 0x80000000u) != 0 ) |
660 { | 608 { |
661 result = 0; | 609 result = 0; |
662 books_primary_item_per_page = result; | 610 books_primary_item_per_page = result; |
663 } | 611 } |
664 } | 612 } |
665 //LABEL_14: | 613 BtnDown_flag = 0; |
666 BtnDown_flag = 0; | 614 BtnUp_flag = 0; |
667 BtnUp_flag = 0; | 615 num_achieved_awards = 0; |
668 num_achieved_awards = 0; | 616 books_page_number = 0; |
669 books_page_number = 0; | 617 |
670 | 618 for ( int i = result; i < full_num_items_in_book; ++i) |
671 | 619 { |
672 for (uint i = result; i < full_num_items_in_book; ++i) | 620 v6 = (char *)pAwards[achieved_awards[i]].pText;//(char *)dword_723E80_award_related[v20 / 4]; |
673 { | 621 pTmpBuf[0] = 0; |
674 v5 = achieved_awards[i]; | 622 switch (achieved_awards[i]) |
675 v6 = (char *)pAwards[v5].pText;//(char *)dword_723E80_award_related[v20 / 4]; | 623 { |
676 | 624 case Award_Arena_PageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaPageWins); break; |
677 pTmpBuf[0] = 0; | 625 case Award_Arena_SquireWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaSquireWins); break; |
678 switch (v5) | 626 case Award_Arena_KnightWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaKnightWins); break; |
679 { | 627 case Award_Arena_LordWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaLordWins); break; |
680 case Award_Arena_PageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaPageWins); break; | 628 case Award_ArcomageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageWins); break; |
681 case Award_Arena_SquireWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaSquireWins); break; | 629 case Award_ArcomageLoses: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageLoses); break; |
682 case Award_Arena_KnightWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaKnightWins); break; | 630 case Award_Deaths: sprintf(pTmpBuf.data(), v6, pParty->uNumDeaths); break; |
683 case Award_Arena_LordWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaLordWins); break; | 631 case Award_BountiesCollected: sprintf(pTmpBuf.data(), v6, pParty->uNumBountiesCollected); break; |
684 case Award_ArcomageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageWins); break; | 632 case Award_Fine: sprintf(pTmpBuf.data(), v6, pParty->uFine); break; |
685 case Award_ArcomageLoses: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageLoses); break; | 633 case Award_PrisonTerms: sprintf(pTmpBuf.data(), v6, pParty->uNumPrisonTerms); break; |
686 case Award_Deaths: sprintf(pTmpBuf.data(), v6, pParty->uNumDeaths); break; | 634 } |
687 case Award_BountiesCollected: sprintf(pTmpBuf.data(), v6, pParty->uNumBountiesCollected); break; | 635 |
688 case Award_Fine: sprintf(pTmpBuf.data(), v6, pParty->uFine); break; | 636 if (*pTmpBuf.data()) |
689 case Award_PrisonTerms: sprintf(pTmpBuf.data(), v6, pParty->uNumPrisonTerms); break; | 637 v6 = pTmpBuf.data(); |
690 } | 638 |
691 | 639 awards_window.DrawText(pFontArrus, 0, 0, ui_character_award_color[pAwards[achieved_awards[i]].uPriority % 6], v6, 0, 0, 0); |
692 if (*pTmpBuf.data()) | 640 awards_window.uFrameY = pFontArrus->CalcTextHeight(v6, &awards_window, 0, 0) + awards_window.uFrameY + 8; |
693 v6 = pTmpBuf.data(); | 641 if (awards_window.uFrameY > awards_window.uFrameHeight) |
694 | 642 break; |
695 | 643 |
696 a1.DrawText(pFontArrus, 0, 0, ui_character_award_color[pAwards[v5].uPriority % 6], v6, 0, 0, 0); | 644 ++num_achieved_awards; |
697 a1.uFrameY = pFontArrus->CalcTextHeight(v6, &a1, 0, 0) + a1.uFrameY + 4; | 645 } |
698 if (a1.uFrameY > a1.uFrameHeight) | 646 } |
699 break; | |
700 | |
701 ++num_achieved_awards; | |
702 } | |
703 } | |
704 | |
705 | |
706 | |
707 | |
708 | |
709 | 647 |
710 //----- (0041A2C1) -------------------------------------------------------- | 648 //----- (0041A2C1) -------------------------------------------------------- |
711 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels) | 649 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels) |
712 { | 650 { |
713 if ( (signed int)uNumPixels < 14 ) | 651 if ( (signed int)uNumPixels < 14 ) |
714 uNumPixels = 14; | 652 uNumPixels = 14; |
715 return ((signed int)(uNumPixels - 14) >> 5) + 1; | 653 return ((signed int)(uNumPixels - 14) >> 5) + 1; |
716 } | 654 } |
717 | 655 |
718 | |
719 | |
720 //----- (0041A556) -------------------------------------------------------- | 656 //----- (0041A556) -------------------------------------------------------- |
721 void draw_leather() | 657 void draw_leather() |
722 { | 658 { |
723 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather)); | 659 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather)); |
724 } | 660 } |
725 | |
726 | 661 |
727 //----- (0041ABFD) -------------------------------------------------------- | 662 //----- (0041ABFD) -------------------------------------------------------- |
728 void CharacterUI_CharacterScreen_Draw(Player *player) | 663 void CharacterUI_CharacterScreen_Draw(Player *player) |
729 { | 664 { |
730 pRenderer->ClearZBuffer(0, 479); | 665 pRenderer->ClearZBuffer(0, 479); |
753 break; | 688 break; |
754 | 689 |
755 case WINDOW_CharacterWindow_Awards: // awards | 690 case WINDOW_CharacterWindow_Awards: // awards |
756 CharacterUI_ReleaseButtons(); | 691 CharacterUI_ReleaseButtons(); |
757 sub_419379(); | 692 sub_419379(); |
758 sub_419220(); | 693 CreateAwardsScrollBar(); |
759 CharacterUI_AwardsTab_Draw(player); | 694 CharacterUI_AwardsTab_Draw(player); |
760 pRenderer->DrawTextureIndexed(pCharacterScreen_AwardsBtn->uX, | 695 pRenderer->DrawTextureIndexed(pCharacterScreen_AwardsBtn->uX, |
761 pCharacterScreen_AwardsBtn->uY, | 696 pCharacterScreen_AwardsBtn->uY, |
762 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE)); | 697 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE)); |
763 break; | 698 break; |
781 } | 716 } |
782 | 717 |
783 //----- (0043CC7C) -------------------------------------------------------- | 718 //----- (0043CC7C) -------------------------------------------------------- |
784 void CharacterUI_DrawPaperdoll(Player *player) | 719 void CharacterUI_DrawPaperdoll(Player *player) |
785 { | 720 { |
786 //signed int pSex; // eax@1 | 721 ItemGen *item; // edi@38 |
787 unsigned int v6; // ecx@9 | 722 int item_X; // ebx@38 |
788 int v7; // ecx@10 | 723 int index; // eax@65 |
789 unsigned int pMainHandNum4; // eax@14 | |
790 ItemGen *item_MainHand4; // eax@15 | |
791 int v10; // edx@15 | |
792 unsigned int pX_MainHand4; // edi@15 | |
793 unsigned int v14; // ebx@18 | |
794 Texture *v16; // ebp@27 | |
795 double v17; // st7@29 | |
796 int v18; // edi@30 | |
797 char *v19; // eax@30 | |
798 unsigned int pBowNum; // eax@37 | |
799 ItemGen *itemBow; // edi@38 | |
800 int pX_Bow; // ebx@38 | |
801 double v28; // st7@51 | |
802 char *v30; // eax@54 | |
803 unsigned int pCloakNum; // eax@59 | |
804 ItemGen *item_Cloak; // edx@60 | |
805 int v33; // eax@65 | |
806 int v34; // eax@74 | |
807 int v35; // ebx@74 | |
808 LODFile_IconsBitmaps *v38; // ecx@78 | |
809 Texture *v39; // edi@85 | |
810 double v40; // st7@87 | |
811 int v41; // edi@88 | |
812 unsigned int pArmorNum; // eax@93 | |
813 ItemGen *item_Armor; // edx@94 | |
814 int v45; // eax@98 | |
815 int v48; // ebx@106 | |
816 LODFile_IconsBitmaps *v50; // ecx@110 | |
817 Texture *v51; // edi@117 | |
818 double v52; // st7@119 | |
819 int v53; // edi@120 | |
820 char *v55; // eax@122 | |
821 unsigned int pBootNum; // eax@127 | |
822 ItemGen *item_Boot; // edi@128 | |
823 int v59; // ebx@129 | 724 int v59; // ebx@129 |
824 int v60; // ecx@132 | |
825 Texture *v63; // edi@145 | |
826 double v64; // st7@147 | |
827 int v65; // edi@148 | |
828 char *v66; // eax@148 | |
829 unsigned int pMainHandNum; // edx@155 | |
830 int v70; // edx@156 | |
831 unsigned int pBeltNum; // eax@160 | |
832 ItemGen *item_Belt; // edi@161 | |
833 int v73; // edx@163 | |
834 unsigned int v75; // ebx@170 | 725 unsigned int v75; // ebx@170 |
835 Texture *v77; // edi@181 | |
836 double v78; // st7@183 | |
837 int v79; // edi@184 | |
838 char *v80; // eax@184 | |
839 unsigned int pMainHandNum2; // eax@192 | |
840 int v83; // eax@193 | |
841 int pArmorShoulderNum; // eax@197 | 726 int pArmorShoulderNum; // eax@197 |
842 int v87; // eax@197 | |
843 int v88; // eax@198 | |
844 int v89; // eax@199 | |
845 int v94; // ebx@214 | 727 int v94; // ebx@214 |
846 int v95; // eax@214 | 728 unsigned int v127; // ebx@314 |
847 char *v96; // edi@226 | 729 unsigned int v153; // eax@370 |
848 double v97; // st7@228 | 730 char *v166; // [sp-8h] [bp-54h]@16 |
849 int v98; // edi@229 | 731 const char *container; // [sp-8h] [bp-54h]@79 |
850 char *v99; // eax@229 | 732 char *v181; // [sp-8h] [bp-54h]@337 |
851 int pX_ArmorShoulder; // eax@237 | 733 int item_Y; // [sp+10h] [bp-3Ch]@38 |
852 int pY_ArmorShoulder; // ecx@237 | 734 int pBodyComplection; // [sp+24h] [bp-28h]@6 |
853 int v106; // edx@238 | 735 signed int v245; // [sp+34h] [bp-18h]@361 |
854 int v107; // edx@239 | 736 signed int IsDwarf; // [sp+40h] [bp-Ch]@4 |
855 int v108; // edx@240papredoll_flying_feet | |
856 int v109; // edi@250 | |
857 char *v110; // edx@250 | |
858 unsigned int pCloakCollarNum; // eax@259 | |
859 ItemGen *item_CloakCollar; // eax@260 | |
860 int v114; // eax@265 | |
861 int v116; // ebx@274 | |
862 double v118; // st7@286 | |
863 int v119; // edi@287 | |
864 char *v120; // eax@287 | |
865 unsigned int v122; // edi@295 | |
866 int pHelmNum; // ebx@297 | |
867 ItemGen *item_Helm; // edi@298 | |
868 int v125; // ecx@303 | |
869 unsigned int v127; // ebx@314 | |
870 Texture *v129; // edi@325 | |
871 double v130; // st7@327 | |
872 int v131; // edi@328 | |
873 char *v132; // eax@328 | |
874 unsigned int pMainHandNum3; // eax@335 | |
875 ItemGen *item_MainHand3; // eax@336 | |
876 unsigned int v138; // ebx@339 | |
877 Texture *v140; // edi@348 | |
878 double v141; // st7@350 | |
879 int v142; // edi@351 | |
880 char *v143; // eax@351 | |
881 unsigned int pShieldNum; // eax@358 | |
882 ItemGen *item_Shield; // eax@359 | |
883 int v149; // edx@359 | |
884 int pX_Shield; // ebx@362 | |
885 int v151; // ecx@363 | |
886 int v152; // ecx@364 | |
887 unsigned int v153; // eax@370 | |
888 Texture *v157; // ebp@381 | |
889 double v158; // st7@383 | |
890 char *v160; // eax@386 | |
891 unsigned int pMainHandNum5; // eax@393 | |
892 ItemGen *item_MainHand5; // eax@394 | |
893 char *v166; // [sp-8h] [bp-54h]@16 | |
894 const char *v167; // [sp-8h] [bp-54h]@23 | |
895 const char *v168; // [sp-8h] [bp-54h]@43 | |
896 const char *v169; // [sp-8h] [bp-54h]@79 | |
897 const char *v170; // [sp-8h] [bp-54h]@111 | |
898 const char *v171; // [sp-8h] [bp-54h]@141 | |
899 const char *v172; // [sp-8h] [bp-54h]@177 | |
900 const char *v173; // [sp-8h] [bp-54h]@222 | |
901 const char *v178; // [sp-8h] [bp-54h]@242 | |
902 const char *v179; // [sp-8h] [bp-54h]@280 | |
903 const char *v180; // [sp-8h] [bp-54h]@321 | |
904 char *v181; // [sp-8h] [bp-54h]@337 | |
905 const char *v182; // [sp-8h] [bp-54h]@344 | |
906 const char *v183; // [sp-8h] [bp-54h]@375 | |
907 signed int v186; // [sp-4h] [bp-50h]@202 | |
908 signed int v191; // [sp-4h] [bp-50h]@266 | |
909 signed int v192; // [sp-4h] [bp-50h]@304 | |
910 int pY_MainHand4; // [sp+10h] [bp-3Ch]@15 | |
911 int pY_Bow; // [sp+10h] [bp-3Ch]@38 | |
912 unsigned int pY_Cloak; // [sp+10h] [bp-3Ch]@74 | |
913 unsigned int pY_Armor; // [sp+10h] [bp-3Ch]@106 | |
914 int pY_Boot; // [sp+10h] [bp-3Ch]@129 | |
915 int pY_Belt; // [sp+10h] [bp-3Ch]@168 | |
916 unsigned int pY_shoulder; // [sp+10h] [bp-3Ch]@216 | |
917 unsigned int pY_CloakCollar; // [sp+10h] [bp-3Ch]@274 | |
918 int pY_Helm; // [sp+10h] [bp-3Ch]@312 | |
919 int pY_MainHand3; // [sp+10h] [bp-3Ch]@336 | |
920 int pY_Shield; // [sp+10h] [bp-3Ch]@362 | |
921 Texture *a2b; // [sp+14h] [bp-38h]@49 | |
922 int pX_Cloak; // [sp+14h] [bp-38h]@74 | |
923 int pX_Armor; // [sp+14h] [bp-38h]@106 | |
924 int pX_Boot; // [sp+14h] [bp-38h]@129 | |
925 int pX_Belt; // [sp+14h] [bp-38h]@168 | |
926 int pX_shoulder; // [sp+14h] [bp-38h]@214 | |
927 int pX_CloakCollar; // [sp+14h] [bp-38h]@274 | |
928 Texture *a2i; // [sp+14h] [bp-38h]@284 | |
929 int pX_Helm; // [sp+14h] [bp-38h]@312 | |
930 int pX_MainHand3; // [sp+14h] [bp-38h]@336 | |
931 int pBodyComplection; // [sp+24h] [bp-28h]@6 | |
932 unsigned int pBowTextureNum; // [sp+2Ch] [bp-20h]@38 | |
933 signed int v245; // [sp+34h] [bp-18h]@361 | |
934 signed int IsDwarf; // [sp+40h] [bp-Ch]@4 | |
935 | 737 |
936 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); | 738 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); |
937 if (player->GetRace() == CHARACTER_RACE_DWARF) | 739 if (player->GetRace() == CHARACTER_RACE_DWARF) |
938 { | 740 { |
939 IsDwarf = 1; | 741 IsDwarf = 1; |
958 if ( IsPlayerWearingWatersuit[uPlayerID] )// | 760 if ( IsPlayerWearingWatersuit[uPlayerID] )// |
959 { | 761 { |
960 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); | 762 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
961 if ( !bRingsShownInCharScreen ) | 763 if ( !bRingsShownInCharScreen ) |
962 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); | 764 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); |
963 v6 = player->pEquipment.uMainHand; | 765 // ... |
964 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItemList[v6-1], pItemsTable->pItems[v7].uEquipType != 1) | 766 if ( !player->pEquipment.uMainHand |
965 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) | 767 || ( pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[player->pEquipment.uMainHand - 1].uItemID].uEquipType != EQUIP_MAIN_HAND) |
966 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], | 768 && (pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[player->pEquipment.uMainHand - 1].uItemID].uSkillType != PLAYER_SKILL_SPEAR |
967 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); | 769 || pPlayers[uPlayerID]->pEquipment.uShield) ) |
968 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 770 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], |
969 if ( pMainHandNum4 ) | 771 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
970 { | 772 //-----------------------------------------------------(Hand/)--------------------------------------------------------------- |
971 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum4 - 1]; | 773 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) |
972 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX; | 774 { |
973 pY_MainHand4 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipY; | 775 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1]; |
974 if ( item_MainHand4->uItemID == 64 ) //blaster | 776 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX; |
777 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY; | |
778 if ( item->uItemID == 64 ) //blaster | |
975 v166 = "item64v1"; | 779 v166 = "item64v1"; |
976 else | 780 else |
977 v166 = pItemsTable->pItems[item_MainHand4->uItemID].pIconName; | 781 v166 = pItemsTable->pItems[item->uItemID].pIconName; |
978 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE); | 782 if ( !( item->uAttributes & 0xF0 ) ) |
979 if ( !( item_MainHand4->uAttributes & 0xF0 ) ) | 783 { |
980 { | 784 if ( item->uAttributes & 2 ) |
981 v18 = v14 + 1; | 785 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE))); |
982 v19 = (char *)pIcons_LOD->GetTexture(v14); | |
983 if ( item_MainHand4->uAttributes & 2 ) | |
984 pRenderer->DrawTransparentRedShade(pX_MainHand4, pY_MainHand4, (Texture *)v19); | |
985 else | 786 else |
986 { | 787 { |
987 if ( item_MainHand4->uAttributes & 1 ) | 788 if ( item->uAttributes & 1 ) |
988 pRenderer->DrawTextureTransparent(pX_MainHand4, pY_MainHand4, (Texture *)v19); | 789 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE))); |
989 else | 790 else |
990 pRenderer->DrawTransparentGreenShade(pX_MainHand4, pY_MainHand4, (Texture *)v19); | 791 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE))); |
991 } | 792 } |
992 } | 793 } |
993 if ( item_MainHand4->uAttributes & 0xF0 ) | 794 if ( item->uAttributes & 0xF0 ) |
994 { | 795 { |
995 if ( ( item_MainHand4->uAttributes & 0xF0) == 16 ) | 796 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
996 v167 = "sptext01"; | 797 container = "sptext01"; |
997 if ( ( item_MainHand4->uAttributes & 0xF0) == 32 ) | 798 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
998 v167 = "sp28a"; | 799 container = "sp28a"; |
999 if ( (item_MainHand4->uAttributes & 0xF0) == 64 ) | 800 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1000 v167 = "sp30a"; | 801 container = "sp30a"; |
1001 if ( (item_MainHand4->uAttributes & 0xF0) == 128 ) | 802 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1002 v167 = "sp91a"; | 803 container = "sp91a"; |
1003 v16 = pIcons_LOD->LoadTexturePtr(v167, TEXTURE_16BIT_PALETTE); | |
1004 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 804 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1005 if ( _50C9A8_item_enchantment_timer <= 0 ) | 805 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1006 { | 806 { |
1007 _50C9A8_item_enchantment_timer = 0; | 807 _50C9A8_item_enchantment_timer = 0; |
1008 item_MainHand4->uAttributes &= 0xFFFFFF0Fu; | 808 item->uAttributes &= 0xFFFFFF0Fu; |
1009 ptr_50C9A4 = 0; | 809 ptr_50C9A4 = 0; |
1010 } | 810 } |
1011 v17 = (double)GetTickCount() * 0.1; | 811 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), |
1012 pRenderer->_4A63E6(pX_MainHand4, pY_MainHand4, pIcons_LOD->GetTexture(v14), v16, (signed __int64)v17, 0, 255); | 812 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1013 } | 813 } |
1014 if ( !bRingsShownInCharScreen ) | 814 if ( !bRingsShownInCharScreen ) |
1015 pRenderer->DrawMaskToZBuffer(pX_MainHand4, pY_MainHand4, (Texture *)v19, pMainHandNum4); | 815 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), pPlayers[uPlayerID]->pEquipment.uMainHand); |
1016 } | 816 } |
1017 } | 817 } |
1018 else// | 818 else// |
1019 { | 819 { |
1020 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; // | 820 //----------------(Bow/ )------------------------------------------------- |
1021 if ( pBowNum ) | 821 if ( pPlayers[uPlayerID]->pEquipment.uBow ) |
1022 { | 822 { |
1023 itemBow = &pPlayers[uPlayerID]->pInventoryItemList[pBowNum - 1]; | 823 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBow - 1]; |
1024 pX_Bow = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[itemBow->uItemID].uEquipX; | 824 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[item->uItemID].uEquipX; |
1025 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY; | 825 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[item->uItemID].uEquipY; |
1026 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 826 if ( !(item->uAttributes & 0xF0) )// |
1027 if ( !(itemBow->uAttributes & 0xF0) )// | 827 { |
1028 { | 828 if ( item->uAttributes & 2 ) |
1029 if ( itemBow->uAttributes & 2 ) | 829 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE))); |
1030 pRenderer->DrawTransparentRedShade(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum)); | |
1031 else | 830 else |
1032 { | 831 { |
1033 v30 = (char *)pIcons_LOD->GetTexture(pBowTextureNum); | 832 if ( !(item->uAttributes & 1) )// |
1034 if ( !(itemBow->uAttributes & 1) )// | 833 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE))); |
1035 pRenderer->DrawTransparentGreenShade(pX_Bow, pY_Bow, (Texture *)v30); | |
1036 else // | 834 else // |
1037 pRenderer->DrawTextureTransparent(pX_Bow, pY_Bow, (Texture *)v30); | 835 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE))); |
1038 } | 836 } |
1039 } | 837 } |
1040 else | 838 else |
1041 { | 839 { |
1042 if ( (itemBow->uAttributes & 0xF0) == 16 ) | 840 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1043 v168 = "sptext01"; | 841 container = "sptext01"; |
1044 if ( (itemBow->uAttributes & 0xF0) == 32 ) | 842 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1045 v168 = "sp28a"; | 843 container = "sp28a"; |
1046 if ( (itemBow->uAttributes & 0xF0) == 64 ) | 844 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1047 v168 = "sp30a"; | 845 container = "sp30a"; |
1048 if ( (itemBow->uAttributes & 0xF0) == 128 ) | 846 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1049 v168 = "sp91a"; | 847 container = "sp91a"; |
1050 a2b = pIcons_LOD->LoadTexturePtr(v168, TEXTURE_16BIT_PALETTE); | |
1051 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 848 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1052 if ( _50C9A8_item_enchantment_timer <= 0 ) | 849 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1053 { | 850 { |
1054 _50C9A8_item_enchantment_timer = 0; | 851 _50C9A8_item_enchantment_timer = 0; |
1055 itemBow->uAttributes &= 0xFFFFFF0Fu; | 852 item->uAttributes &= 0xFFFFFF0Fu; |
1056 ptr_50C9A4 = 0; | 853 ptr_50C9A4 = 0; |
1057 } | 854 } |
1058 v28 = (double)GetTickCount() * 0.1; | 855 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)), |
1059 pRenderer->_4A63E6(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), a2b, (signed __int64)v28, 0, 255); | 856 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
857 GetTickCount() * 0.1, 0, 255); | |
1060 } | 858 } |
1061 if ( !bRingsShownInCharScreen ) | 859 if ( !bRingsShownInCharScreen ) |
1062 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum); | 860 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)), |
1063 } | 861 pPlayers[uPlayerID]->pEquipment.uBow); |
1064 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// | 862 } |
1065 if ( pCloakNum ) | 863 //-----------------------------(Cloak/)--------------------------------------------------------- |
1066 { | 864 if ( pPlayers[uPlayerID]->pEquipment.uCloak ) |
1067 item_Cloak = &pPlayers[uPlayerID]->pInventoryItemList[pCloakNum - 1]; | 865 { |
1068 switch ( item_Cloak->uItemID ) | 866 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1]; |
867 switch ( item->uItemID ) | |
1069 { | 868 { |
1070 case ITEM_RELIC_TWILIGHT: | 869 case ITEM_RELIC_TWILIGHT: |
1071 v33 = 5; | 870 index = 5; |
1072 break; | 871 break; |
1073 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: | 872 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: |
1074 v33 = 6; | 873 index = 6; |
1075 break; | 874 break; |
1076 case ITEM_RARE_SUN_CLOAK: | 875 case ITEM_RARE_SUN_CLOAK: |
1077 v33 = 7; | 876 index = 7; |
1078 break; | 877 break; |
1079 case ITEM_RARE_MOON_CLOAK: | 878 case ITEM_RARE_MOON_CLOAK: |
1080 v33 = 8; | 879 index = 8; |
1081 break; | 880 break; |
1082 case ITEM_RARE_VAMPIRES_CAPE: | 881 case ITEM_RARE_VAMPIRES_CAPE: |
1083 v33 = 9; | 882 index = 9; |
1084 break; | 883 break; |
1085 default: | 884 default: |
1086 v33 = item_Cloak->uItemID - 105; | 885 index = item->uItemID - 105; |
1087 break; | 886 break; |
1088 } | 887 } |
1089 if ( v33 >= 0 && v33 < 10 ) | 888 if ( index >= 0 && index < 10 ) |
1090 { | 889 { |
1091 v35 = paperdoll_cloak_texture[pBodyComplection][v33];//Texture_Cloak | 890 item_X = pPaperdoll_BodyX + paperdoll_Cloak[pBodyComplection][index][0]; |
1092 pX_Cloak = pPaperdoll_BodyX + paperdoll_Cloak[pBodyComplection][v33][0]; | 891 item_Y = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][index][1]; |
1093 pY_Cloak = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][v33][1]; | 892 if ( !(item->uAttributes & 0xF0) ) |
1094 if ( !(item_Cloak->uAttributes & 0xF0) ) | 893 { |
1095 { | 894 if ( item->uAttributes & 2 ) |
1096 v41 = v35 + 1; | 895 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index])); |
1097 if ( item_Cloak->uAttributes & 2 ) | |
1098 pRenderer->DrawTransparentRedShade(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35)); | |
1099 else | 896 else |
1100 pRenderer->DrawTextureTransparent(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35)); | 897 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index])); |
1101 } | 898 } |
1102 else | 899 else |
1103 { | 900 { |
1104 if ( (item_Cloak->uAttributes & 0xF0) == 16 ) | 901 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1105 v169 = "sptext01"; | 902 container = "sptext01"; |
1106 if ( (item_Cloak->uAttributes & 0xF0) == 32 ) | 903 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1107 v169 = "sp28a"; | 904 container = "sp28a"; |
1108 if ( (item_Cloak->uAttributes & 0xF0) != 64 ) | 905 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1109 v169 = "sp30a"; | 906 container = "sp30a"; |
1110 if ( (item_Cloak->uAttributes & 0xF0) == 128 ) | 907 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1111 v169 = "sp91a"; | 908 container = "sp91a"; |
1112 v39 = pIcons_LOD->LoadTexturePtr(v169, TEXTURE_16BIT_PALETTE); | |
1113 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 909 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1114 if ( _50C9A8_item_enchantment_timer <= 0 ) | 910 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1115 { | 911 { |
1116 _50C9A8_item_enchantment_timer = 0; | 912 _50C9A8_item_enchantment_timer = 0; |
1117 item_Cloak->uAttributes &= 0xFFFFFF0Fu; | 913 item->uAttributes &= 0xFFFFFF0Fu; |
1118 ptr_50C9A4 = 0; | 914 ptr_50C9A4 = 0; |
1119 } | 915 } |
1120 v40 = (double)GetTickCount() * 0.1; | 916 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]), |
1121 pRenderer->_4A63E6(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), v39, (signed __int64)v40, 0, 255); | 917 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1122 } | 918 } |
1123 if ( !bRingsShownInCharScreen ) | 919 if ( !bRingsShownInCharScreen ) |
1124 pRenderer->DrawMaskToZBuffer(pX_Cloak, pY_Cloak, pIcons_LOD->GetTexture(v35), pCloakNum); | 920 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]), |
1125 } | 921 pPlayers[uPlayerID]->pEquipment.uCloak); |
1126 } | 922 } |
1127 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,// | 923 } |
1128 pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); | 924 //-------------------------------(Paperdoll/)------------------------------------------- |
1129 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// | 925 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
1130 if ( pArmorNum ) | 926 //-------------------------------(Armor/)----------------------------------------------- |
1131 { | 927 if ( pPlayers[uPlayerID]->pEquipment.uArmor ) |
1132 item_Armor = &pPlayers[uPlayerID]->pInventoryItemList[pArmorNum - 1]; | 928 { |
1133 switch ( item_Armor->uItemID ) | 929 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uArmor - 1]; |
1134 { | 930 switch ( item->uItemID ) |
1135 case 504: | 931 { |
1136 v45 = 15; | 932 case ITEM_ARTICACT_GOVERNONS_ARMOR: |
933 index = 15; | |
1137 break; | 934 break; |
1138 case ITEM_ARTIFACT_YORUBA: | 935 case ITEM_ARTIFACT_YORUBA: |
1139 v45 = 14; | 936 index = 14; |
1140 break; | 937 break; |
1141 case ITEM_RELIC_HARECS_LEATHER: | 938 case ITEM_RELIC_HARECS_LEATHER: |
1142 v45 = 13; | 939 index = 13; |
1143 break; | 940 break; |
1144 case ITEM_ELVEN_CHAINMAIL: | 941 case ITEM_ELVEN_CHAINMAIL: |
1145 v45 = 16; | 942 index = 16; |
1146 break; | 943 break; |
1147 default: | 944 default: |
1148 v45 = item_Armor->uItemID - 66; | 945 index = item->uItemID - 66; |
1149 break; | 946 break; |
1150 } | 947 } |
1151 if ( v45 >= 0 && v45 < 17 ) | 948 if ( index >= 0 && index < 17 ) |
1152 { | 949 { |
1153 pX_Armor = pPaperdoll_BodyX + paperdoll_Armor[pBodyComplection][v45][0]; | 950 item_X = pPaperdoll_BodyX + paperdoll_Armor[pBodyComplection][index][0]; |
1154 pY_Armor = pPaperdoll_BodyY + paperdoll_Armor[pBodyComplection][v45][1]; | 951 item_Y = pPaperdoll_BodyY + paperdoll_Armor[pBodyComplection][index][1]; |
1155 v48 = paperdoll_armor_texture[pBodyComplection][v45][0]; | 952 if ( !(item->uAttributes & 0xF0) ) |
1156 if ( !(item_Armor->uAttributes & 0xF0) ) | 953 { |
1157 { | 954 if ( item->uAttributes & 2 ) |
1158 v53 = v48 + 1; | 955 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0])); |
1159 if ( item_Armor->uAttributes & 2 ) | |
1160 pRenderer->DrawTransparentRedShade(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48)); | |
1161 else | 956 else |
1162 { | 957 { |
1163 v55 = (char *)&pIcons_LOD->pTextures[v48]; | 958 if ( !(item->uAttributes & 1) ) |
1164 if ( !(item_Armor->uAttributes & 1) ) | 959 pRenderer->DrawTransparentGreenShade(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]); |
1165 pRenderer->DrawTransparentGreenShade(pX_Armor, pY_Armor, (Texture *)v55); | |
1166 else | 960 else |
1167 pRenderer->DrawTextureTransparent(pX_Armor, pY_Armor, (Texture *)v55); | 961 pRenderer->DrawTextureTransparent(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]); |
1168 } | 962 } |
1169 } | 963 } |
1170 else | 964 else |
1171 { | 965 { |
1172 if ( (item_Armor->uAttributes & 0xF0) == 16 ) | 966 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1173 v170 = "sptext01"; | 967 container = "sptext01"; |
1174 if ( (item_Armor->uAttributes & 0xF0) == 32 ) | 968 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1175 v170 = "sp28a"; | 969 container = "sp28a"; |
1176 if ( (item_Armor->uAttributes & 0xF0) == 64 ) | 970 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1177 v170 = "sp30a"; | 971 container = "sp30a"; |
1178 if ( (item_Armor->uAttributes & 0xF0) == 128 ) | 972 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1179 v170 = "sp91a"; | 973 container = "sp91a"; |
1180 v51 = pIcons_LOD->LoadTexturePtr(v170, TEXTURE_16BIT_PALETTE); | |
1181 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 974 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1182 if ( _50C9A8_item_enchantment_timer <= 0 ) | 975 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1183 { | 976 { |
1184 _50C9A8_item_enchantment_timer = 0; | 977 _50C9A8_item_enchantment_timer = 0; |
1185 item_Armor->uAttributes &= 0xFFFFFF0Fu; | 978 item->uAttributes &= 0xFFFFFF0Fu; |
1186 ptr_50C9A4 = 0; | 979 ptr_50C9A4 = 0; |
1187 } | 980 } |
1188 v52 = (double)GetTickCount() * 0.1; | 981 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]), |
1189 pRenderer->_4A63E6(pX_Armor, pY_Armor, pIcons_LOD->GetTexture(v48), v51, (signed __int64)v52, 0, 255); | 982 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1190 } | 983 } |
1191 if ( pPlayers[uPlayerID]->pEquipment.uMainHand // | 984 //--------------------------------(Shoulder/)--------------------------------------------- |
985 if ( pPlayers[uPlayerID]->pEquipment.uMainHand | |
1192 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND || | 986 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND || |
1193 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD && | 987 pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD && |
1194 !pPlayers[uPlayerID]->pEquipment.uShield) ) | 988 !pPlayers[uPlayerID]->pEquipment.uShield) )// |
1195 { | 989 { |
1196 v94 = paperdoll_armor_texture[pBodyComplection][v45][2]; | 990 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; |
1197 if ( v94 == pIcons_LOD->FindTextureByName("pending") ) | 991 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) |
1198 { | 992 { |
1199 v94 = paperdoll_armor_texture[pBodyComplection][v45][1]; | 993 v94 = paperdoll_armor_texture[pBodyComplection][index][1]; |
1200 pX_shoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0]; | 994 item_X = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][index][0]; |
1201 pY_shoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1]; | 995 item_Y = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][index][1]; |
1202 } | 996 } |
1203 else | 997 else |
1204 { | 998 { |
1205 pX_shoulder = pPaperdoll_BodyX + dword_4E5270[v45][0]; | 999 item_X = pPaperdoll_BodyX + dword_4E5270[index][0]; |
1206 pY_shoulder = pPaperdoll_BodyY + dword_4E5270[v45][1]; | 1000 item_Y = pPaperdoll_BodyY + dword_4E5270[index][1]; |
1207 } | 1001 } |
1208 if ( !(item_Armor->uAttributes & 0xF0) ) | 1002 if ( !(item->uAttributes & 0xF0) ) |
1209 { | 1003 { |
1210 v98 = v94 + 1; | 1004 //v98 = v94 + 1; |
1211 v99 = (char *)pIcons_LOD->GetTexture(v94); | 1005 if ( item->uAttributes & 2 ) |
1212 if ( item_Armor->uAttributes & 2 ) | 1006 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); |
1213 pRenderer->DrawTransparentRedShade(pX_shoulder, pY_shoulder, (Texture *)v99); | |
1214 else | 1007 else |
1215 { | 1008 { |
1216 if ( item_Armor->uAttributes & 1 ) | 1009 if ( item->uAttributes & 1 ) |
1217 pRenderer->DrawTextureTransparent(pX_shoulder, pY_shoulder, (Texture *)v99); | 1010 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94)); |
1218 else | 1011 else |
1219 pRenderer->DrawTransparentGreenShade(pX_shoulder, pY_shoulder, (Texture *)v99); | 1012 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); |
1220 } | 1013 } |
1221 } | 1014 } |
1222 else | 1015 else |
1223 { | 1016 { |
1224 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) | 1017 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) |
1225 { | 1018 { |
1226 if ( item_Armor->uAttributes & 0xF0 ) | 1019 if ( item->uAttributes & 0xF0 ) |
1227 { | 1020 { |
1228 if ( (item_Armor->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) | 1021 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1229 v173 = "sptext01"; | 1022 container = "sptext01"; |
1230 if ( (item_Armor->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) | 1023 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1231 v173 = "sp28a"; | 1024 container = "sp28a"; |
1232 if ( ( item_Armor->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) | 1025 if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1233 v173 = "sp30a"; | 1026 container = "sp30a"; |
1234 if ( (item_Armor->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) | 1027 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1235 v173 = "sp91a"; | 1028 container = "sp91a"; |
1236 v96 = (char *)pIcons_LOD->LoadTexturePtr(v173, TEXTURE_16BIT_PALETTE); | |
1237 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1029 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1238 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1030 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1239 { | 1031 { |
1240 _50C9A8_item_enchantment_timer = 0; | 1032 _50C9A8_item_enchantment_timer = 0; |
1241 item_Armor->uAttributes &= 0xFFFFFF0Fu; | 1033 item->uAttributes &= 0xFFFFFF0Fu; |
1242 ptr_50C9A4 = 0; | 1034 ptr_50C9A4 = 0; |
1243 } | 1035 } |
1244 v97 = (double)GetTickCount(); | 1036 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1245 pRenderer->_4A63E6(pX_shoulder, pY_shoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); | 1037 GetTickCount() * 0.1, 0, 255); |
1246 } | 1038 } |
1247 } | 1039 } |
1248 } | 1040 } |
1249 } | 1041 } |
1250 else | 1042 else// |
1251 { | 1043 { |
1252 v94 = paperdoll_armor_texture[pBodyComplection][v45][1]; | 1044 //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; |
1253 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) | 1045 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") ) |
1254 { | 1046 { |
1255 pX_ArmorShoulder = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][v45][0]; | 1047 item_X = pPaperdoll_BodyX + paperdoll_shoulder[pBodyComplection][index][0]; |
1256 pY_ArmorShoulder = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][v45][1]; | 1048 item_Y = pPaperdoll_BodyY + paperdoll_shoulder[pBodyComplection][index][1]; |
1257 if ( !(item_Armor->uAttributes & 0xF0) ) | 1049 if ( !(item->uAttributes & 0xF0) ) |
1258 { | 1050 { |
1259 v109 = v94 + 1; | 1051 if ( item->uAttributes & 2 ) |
1260 v110 = (char *)pIcons_LOD->GetTexture(v94); | 1052 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][2])); |
1261 if ( item_Armor->uAttributes & 2 ) | |
1262 pRenderer->DrawTransparentRedShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); | |
1263 else | 1053 else |
1264 { | 1054 { |
1265 if ( item_Armor->uAttributes & 1 ) | 1055 if ( item->uAttributes & 1 ) |
1266 pRenderer->DrawTextureTransparent(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); | 1056 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][2])); |
1267 else | 1057 else |
1268 pRenderer->DrawTransparentGreenShade(pX_ArmorShoulder, pY_ArmorShoulder, (Texture *)v110); | 1058 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][2])); |
1269 } | 1059 } |
1270 } | 1060 } |
1271 else | 1061 else |
1272 { | 1062 { |
1273 if ( (item_Armor->uAttributes & 0xF0) == 16 ) | 1063 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1274 v178 = "sptext01"; | 1064 container = "sptext01"; |
1275 if ( (item_Armor->uAttributes & 0xF0) == 32 ) | 1065 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1276 v178 = "sp28a"; | 1066 container = "sp28a"; |
1277 if ( (item_Armor->uAttributes & 0xF0) == 64 ) | 1067 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1278 v178 = "sp30a"; | 1068 container = "sp30a"; |
1279 if ( (item_Armor->uAttributes & 0xF0) == 128 ) | 1069 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1280 v178 = "sp91a"; | 1070 container = "sp91a"; |
1281 v96 = (char *)pIcons_LOD->LoadTexturePtr(v178, TEXTURE_16BIT_PALETTE); | |
1282 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1071 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1283 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1072 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1284 { | 1073 { |
1285 _50C9A8_item_enchantment_timer = 0; | 1074 _50C9A8_item_enchantment_timer = 0; |
1286 item_Armor->uAttributes &= 0xFFFFFF0Fu; | 1075 item->uAttributes &= 0xFFFFFF0Fu; |
1287 ptr_50C9A4 = 0; | 1076 ptr_50C9A4 = 0; |
1288 } | 1077 } |
1289 v97 = (double)GetTickCount(); | 1078 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), |
1290 pRenderer->_4A63E6(pX_ArmorShoulder, pY_ArmorShoulder, pIcons_LOD->GetTexture(v94), (Texture *)v96, (signed __int64)(v97 * 0.1), 0, 255); | 1079 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1291 } | 1080 } |
1292 } | 1081 } |
1293 } | 1082 } |
1083 | |
1294 if ( !bRingsShownInCharScreen ) | 1084 if ( !bRingsShownInCharScreen ) |
1295 pRenderer->DrawMaskToZBuffer(pX_Armor, pY_Armor, (Texture *)v55, pArmorNum); | 1085 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]], |
1296 } | 1086 pPlayers[uPlayerID]->pEquipment.uArmor); |
1297 } | 1087 } |
1298 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;// | 1088 } |
1299 if ( pBootNum ) | 1089 //----------------------------------(End of Armor/ )------------------------------------------ |
1300 { | 1090 //----------------------------------(Boot/)-------------------------------------------------------- |
1301 item_Boot = &pPlayers[uPlayerID]->pInventoryItemList[pBootNum - 1]; | 1091 if ( pPlayers[uPlayerID]->pEquipment.uBoot ) |
1302 switch ( item_Boot->uItemID ) | 1092 { |
1303 { | 1093 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBoot - 1]; |
1304 case 529: | 1094 switch ( item->uItemID ) |
1305 v60 = 5; | 1095 { |
1096 case ITEM_ARTIFACT_HERMES_SANDALS: | |
1097 index = 5; | |
1306 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace]; | 1098 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace]; |
1307 break; | 1099 break; |
1308 case 512: | 1100 case ITEM_ARTIFACT_LEAGUE_BOOTS: |
1309 v60 = 6; | 1101 index = 6; |
1310 v59 = paperdoll_boots_texture[pBodyComplection][5]; | 1102 v59 = paperdoll_boots_texture[pBodyComplection][5]; |
1311 break; | 1103 break; |
1312 default: | 1104 default: |
1313 v60 = item_Boot->uItemID - 115; | 1105 index = item->uItemID - 115; |
1314 v59 = paperdoll_boots_texture[pBodyComplection][v60]; | 1106 v59 = paperdoll_boots_texture[pBodyComplection][index]; |
1315 break; | 1107 break; |
1316 } | 1108 } |
1317 if ( v60 >= 0 && v60 < 7 ) | 1109 if ( index >= 0 && index < 7 ) |
1318 { | 1110 { |
1319 pX_Boot = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][v60][0]; | 1111 item_X = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][index][0]; |
1320 pY_Boot = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][v60][1]; | 1112 item_Y = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][index][1]; |
1321 if ( !(item_Boot->uAttributes & 0xF0) ) | 1113 if ( !(item->uAttributes & 0xF0) ) |
1322 { | 1114 { |
1323 v65 = v59 + 1; | 1115 if ( item->uAttributes & 2 ) |
1324 v66 = (char *)pIcons_LOD->GetTexture(v59); | 1116 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v59)); |
1325 if ( item_Boot->uAttributes & 2 ) | |
1326 pRenderer->DrawTransparentRedShade(pX_Boot, pY_Boot, (Texture *)v66); | |
1327 else | 1117 else |
1328 { | 1118 { |
1329 if ( item_Boot->uAttributes & 1 ) | 1119 if ( item->uAttributes & 1 ) |
1330 pRenderer->DrawTextureTransparent(pX_Boot, pY_Boot, (Texture *)v66); | 1120 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v59)); |
1331 else | 1121 else |
1332 pRenderer->DrawTransparentGreenShade(pX_Boot, pY_Boot, (Texture *)v66); | 1122 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v59)); |
1333 } | 1123 } |
1334 } | 1124 } |
1335 else | 1125 else |
1336 { | 1126 { |
1337 if ( (item_Boot->uAttributes & 0xF0) == 16 ) | 1127 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1338 v171 = "sptext01"; | 1128 container = "sptext01"; |
1339 if ( (item_Boot->uAttributes & 0xF0) == 32 ) | 1129 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1340 v171 = "sp28a"; | 1130 container = "sp28a"; |
1341 if ( (item_Boot->uAttributes & 0xF0) == 64 ) | 1131 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1342 v171 = "sp30a"; | 1132 container = "sp30a"; |
1343 if ( (item_Boot->uAttributes & 0xF0) == 128 ) | 1133 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1344 v171 = "sp91a"; | 1134 container = "sp91a"; |
1345 v63 = pIcons_LOD->LoadTexturePtr(v171, TEXTURE_16BIT_PALETTE); | |
1346 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1135 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1347 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1136 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1348 { | 1137 { |
1349 _50C9A8_item_enchantment_timer = 0; | 1138 _50C9A8_item_enchantment_timer = 0; |
1350 item_Boot->uAttributes &= 0xFFFFFF0Fu; | 1139 item->uAttributes &= 0xFFFFFF0Fu; |
1351 ptr_50C9A4 = 0; | 1140 ptr_50C9A4 = 0; |
1352 } | 1141 } |
1353 v64 = (double)GetTickCount() * 0.1; | 1142 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v59), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1354 pRenderer->_4A63E6(pX_Boot, pY_Boot, pIcons_LOD->GetTexture(v59), v63, (signed __int64)v64, 0, 255); | 1143 GetTickCount() * 0.1, 0, 255); |
1355 } | 1144 } |
1356 if ( !bRingsShownInCharScreen ) | 1145 if ( !bRingsShownInCharScreen ) |
1357 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum); | 1146 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), pPlayers[uPlayerID]->pEquipment.uBoot); |
1358 } | 1147 } |
1359 } | 1148 } |
1360 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1149 //--------------------------------------------(Hand/)------------------------------------------------------ |
1361 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1) | 1150 if ( !pPlayers[uPlayerID]->pEquipment.uMainHand |
1362 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) | 1151 || ( pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand -1].uItemID].uEquipType != EQUIP_MAIN_HAND) |
1363 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], | 1152 && (pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand -1].uItemID].uSkillType != PLAYER_SKILL_SPEAR |
1364 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], | 1153 || pPlayers[uPlayerID]->pEquipment.uShield) ) |
1365 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); | 1154 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], |
1366 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// | 1155 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
1367 if ( pBeltNum ) | 1156 //--------------------------------------------(Belt/)------------------------------------------------------- |
1368 { | 1157 if ( pPlayers[uPlayerID]->pEquipment.uBelt ) |
1369 item_Belt = &pPlayers[uPlayerID]->pInventoryItemList[pBeltNum - 1]; | 1158 { |
1370 switch ( item_Belt->uItemID ) | 1159 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBelt - 1]; |
1160 switch ( item->uItemID ) | |
1371 { | 1161 { |
1372 case ITEM_RILIC_TITANS_BELT: | 1162 case ITEM_RILIC_TITANS_BELT: |
1373 v73 = 5; | 1163 index = 5; |
1374 break; | 1164 break; |
1375 case ITEM_ARTIFACT_HEROS_BELT: | 1165 case ITEM_ARTIFACT_HEROS_BELT: |
1376 v73 = 6; | 1166 index = 6; |
1377 break; | 1167 break; |
1378 default: | 1168 default: |
1379 v73 = item_Belt->uItemID - 100; | 1169 index = item->uItemID - 100; |
1380 break; | 1170 break; |
1381 } | 1171 } |
1382 if ( v73 >= 0 && v73 < 7 ) | 1172 if ( index >= 0 && index < 7 ) |
1383 { | 1173 { |
1384 pX_Belt = pPaperdoll_BodyX + paperdoll_Belt[pBodyComplection][v73][0]; | 1174 item_X = pPaperdoll_BodyX + paperdoll_Belt[pBodyComplection][index][0]; |
1385 pY_Belt = pPaperdoll_BodyY + paperdoll_Belt[pBodyComplection][v73][1]; | 1175 item_Y = pPaperdoll_BodyY + paperdoll_Belt[pBodyComplection][index][1]; |
1386 if ( IsDwarf != 1 || v73 == 5 ) | 1176 if ( IsDwarf != 1 || index == 5 ) |
1387 v75 = paperdoll_belt_texture[pBodyComplection][v73]; | 1177 v75 = paperdoll_belt_texture[pBodyComplection][index]; |
1388 else | 1178 else |
1389 v75 = paperdoll_belt_texture[pBodyComplection - 2][v73]; | 1179 v75 = paperdoll_belt_texture[pBodyComplection - 2][index]; |
1390 if ( !(item_Belt->uAttributes & 0xF0) ) | 1180 if ( !(item->uAttributes & 0xF0) ) |
1391 { | 1181 { |
1392 v79 = v75 + 1; | 1182 if ( item->uAttributes & 2 ) |
1393 v80 = (char *)pIcons_LOD->GetTexture(v75); | 1183 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v75)); |
1394 if ( item_Belt->uAttributes & 2 ) | |
1395 pRenderer->DrawTransparentRedShade(pX_Belt, pY_Belt, (Texture *)v80); | |
1396 else | 1184 else |
1397 { | 1185 { |
1398 if ( item_Belt->uAttributes & 1 ) | 1186 if ( item->uAttributes & 1 ) |
1399 pRenderer->DrawTextureTransparent(pX_Belt, pY_Belt, (Texture *)v80); | 1187 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v75)); |
1400 else | 1188 else |
1401 pRenderer->DrawTransparentGreenShade(pX_Belt, pY_Belt, (Texture *)v80); | 1189 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75)); |
1402 } | 1190 } |
1403 if ( !bRingsShownInCharScreen ) | 1191 if ( !bRingsShownInCharScreen ) |
1404 pRenderer->DrawMaskToZBuffer(pX_Belt, pY_Belt, (Texture *)v80, pBeltNum); | 1192 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), pPlayers[uPlayerID]->pEquipment.uBelt); |
1405 } | 1193 } |
1406 else | 1194 else |
1407 { | 1195 { |
1408 if ( (item_Belt->uAttributes & 0xF0) == 16 ) | 1196 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1409 v172 = "sptext01"; | 1197 container = "sptext01"; |
1410 if ( (item_Belt->uAttributes & 0xF0) == 32 ) | 1198 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1411 v172 = "sp28a"; | 1199 container = "sp28a"; |
1412 if ( (item_Belt->uAttributes & 0xF0) == 64 ) | 1200 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1413 v172 = "sp30a"; | 1201 container = "sp30a"; |
1414 if ( (item_Belt->uAttributes & 0xF0) == 128 ) | 1202 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1415 v172 = "sp91a"; | 1203 container = "sp91a"; |
1416 v77 = pIcons_LOD->LoadTexturePtr(v172, TEXTURE_16BIT_PALETTE); | |
1417 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1204 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1418 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1205 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1419 { | 1206 { |
1420 _50C9A8_item_enchantment_timer = 0; | 1207 _50C9A8_item_enchantment_timer = 0; |
1421 item_Belt->uAttributes &= 0xFFFFFF0Fu; | 1208 item->uAttributes &= 0xFFFFFF0Fu; |
1422 ptr_50C9A4 = 0; | 1209 ptr_50C9A4 = 0; |
1423 } | 1210 } |
1424 v78 = (double)GetTickCount() * 0.1; | 1211 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v75), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1425 pRenderer->_4A63E6(pX_Belt, pY_Belt, pIcons_LOD->GetTexture(v75), v77, (signed __int64)v78, 0, 255); | 1212 GetTickCount() * 0.1, 0, 255); |
1426 } | 1213 } |
1427 } | 1214 } |
1428 } | 1215 } |
1429 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1216 //---------------------------------------------(Hand2/2)-------------------------------------------------- |
1430 if ( pMainHandNum2 ) | 1217 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) |
1431 { | 1218 { |
1432 v83 = pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum2 - 1].uItemID; | 1219 if ( pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].uItemID].uEquipType == EQUIP_MAIN_HAND |
1433 if ( pItemsTable->pItems[v83].uEquipType == 1 | 1220 || pItemsTable->pItems[pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].uItemID].uSkillType == PLAYER_SKILL_SPEAR |
1434 || pItemsTable->pItems[v83].uSkillType == PLAYER_SKILL_SPEAR && !pPlayers[uPlayerID]->pEquipment.uShield ) | 1221 && !pPlayers[uPlayerID]->pEquipment.uShield ) |
1435 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], | 1222 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
1436 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], | 1223 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); |
1437 pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); | 1224 } |
1438 } | 1225 //----------------------------------------------(Cloak collar/ )------------------------------------- |
1439 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;// | 1226 if ( pPlayers[uPlayerID]->pEquipment.uCloak ) |
1440 if ( pCloakCollarNum ) | 1227 { |
1441 { | 1228 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1]; |
1442 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItemList[pCloakCollarNum - 1]; | 1229 switch ( item->uItemID ) |
1443 switch ( item_CloakCollar->uItemID ) | 1230 { |
1444 { | 1231 case ITEM_RELIC_TWILIGHT: |
1445 case 525: | 1232 index = 5; |
1446 v114 = 5; | |
1447 break; | 1233 break; |
1448 case 530: | 1234 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: |
1449 v114 = 6; | 1235 index = 6; |
1450 break; | 1236 break; |
1451 case 547: | 1237 case ITEM_RARE_SUN_CLOAK: |
1452 v114 = 7; | 1238 index = 7; |
1453 break; | 1239 break; |
1454 case 548: | 1240 case ITEM_RARE_MOON_CLOAK: |
1455 v114 = 8; | 1241 index = 8; |
1456 break; | 1242 break; |
1457 case 550: | 1243 case ITEM_RARE_VAMPIRES_CAPE: |
1458 v114 = 9; | 1244 index = 9; |
1459 break; | 1245 break; |
1460 default: | 1246 default: |
1461 v114 = item_CloakCollar->uItemID - 105; | 1247 index = item->uItemID - 105; |
1462 } | 1248 } |
1463 if ( v114 >= 0 && v114 < 10 ) | 1249 if ( index >= 0 && index < 10 ) |
1464 { | 1250 { |
1465 v116 = paperdoll_cloak_collar_texture[pBodyComplection][v114]; | 1251 item_X = pPaperdoll_BodyX + paperdoll_CloakCollar[pBodyComplection][index][0]; |
1466 pX_CloakCollar = pPaperdoll_BodyX + paperdoll_CloakCollar[pBodyComplection][v114][0]; | 1252 item_Y = pPaperdoll_BodyY + paperdoll_CloakCollar[pBodyComplection][index][1]; |
1467 pY_CloakCollar = pPaperdoll_BodyY + paperdoll_CloakCollar[pBodyComplection][v114][1]; | 1253 if ( paperdoll_cloak_collar_texture[pBodyComplection][index] != pIcons_LOD->FindTextureByName("pending") ) |
1468 if ( v116 != pIcons_LOD->FindTextureByName("pending") ) | |
1469 { | 1254 { |
1470 if ( !(item_CloakCollar->uAttributes & 0xF0) ) | 1255 if ( !(item->uAttributes & 0xF0) ) |
1471 { | 1256 { |
1472 v119 = v116 + 1; | 1257 if ( item->uAttributes & 2 ) |
1473 v120 = (char *)pIcons_LOD->GetTexture(v116); | 1258 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index])); |
1474 if ( item_CloakCollar->uAttributes & 2 ) | |
1475 pRenderer->DrawTransparentRedShade(pX_CloakCollar, pY_CloakCollar, (Texture *)v120); | |
1476 else | 1259 else |
1477 pRenderer->DrawTextureTransparent(pX_CloakCollar, pY_CloakCollar, (Texture *)v120); | 1260 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index])); |
1478 if ( !bRingsShownInCharScreen ) | 1261 if ( !bRingsShownInCharScreen ) |
1479 pRenderer->DrawMaskToZBuffer(pX_CloakCollar, pY_CloakCollar, (Texture *)v120, pCloakCollarNum); | 1262 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), |
1263 pPlayers[uPlayerID]->pEquipment.uCloak); | |
1480 } | 1264 } |
1481 else | 1265 else |
1482 { | 1266 { |
1483 if ( (item_CloakCollar->uAttributes & 0xF0) == 16 ) | 1267 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1484 v179 = "sptext01"; | 1268 container = "sptext01"; |
1485 if ( (item_CloakCollar->uAttributes & 0xF0) == 32 ) | 1269 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1486 v179 = "sp28a"; | 1270 container = "sp28a"; |
1487 if ( (item_CloakCollar->uAttributes & 0xF0) == 64 ) | 1271 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1488 v179 = "sp30a"; | 1272 container = "sp30a"; |
1489 if ( (item_CloakCollar->uAttributes & 0xF0) == 128 ) | 1273 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1490 v179 = "sp91a"; | 1274 container = "sp91a"; |
1491 a2i = pIcons_LOD->LoadTexturePtr(v179, TEXTURE_16BIT_PALETTE); | |
1492 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1275 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1493 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1276 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1494 { | 1277 { |
1495 _50C9A8_item_enchantment_timer = 0; | 1278 _50C9A8_item_enchantment_timer = 0; |
1496 item_CloakCollar->uAttributes &= 0xFFFFFF0Fu; | 1279 item->uAttributes &= 0xFFFFFF0Fu; |
1497 ptr_50C9A4 = 0; | 1280 ptr_50C9A4 = 0; |
1498 } | 1281 } |
1499 v118 = (double)GetTickCount() * 0.1; | 1282 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), |
1500 pRenderer->_4A63E6(pX_CloakCollar, pY_CloakCollar, pIcons_LOD->GetTexture(v116), a2i, (signed __int64)v118, 0, 255); | 1283 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1501 } | 1284 } |
1502 } | 1285 } |
1503 } | 1286 } |
1504 } | 1287 } |
1288 //--------------------------------------------(Beards/)------------------------------------------------------- | |
1505 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) | 1289 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) |
1506 { | 1290 { |
1507 v122 = papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace]; | 1291 if ( papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") ) |
1508 if ( v122 != pIcons_LOD->FindTextureByName("Pending") ) | |
1509 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 24], | 1292 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 24], |
1510 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 23], | 1293 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 23], |
1511 pIcons_LOD->GetTexture(v122)); | 1294 pIcons_LOD->GetTexture(papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace])); |
1512 } | 1295 } |
1513 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;// | 1296 //--------------------------------------------(Helm/)------------------------------------------------------------ |
1514 if ( pHelmNum ) | 1297 if ( pPlayers[uPlayerID]->pEquipment.uHelm ) |
1515 { | 1298 { |
1516 item_Helm = &pPlayers[uPlayerID]->pInventoryItemList[pHelmNum-1]; | 1299 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uHelm - 1]; |
1517 switch ( item_Helm->uItemID ) | 1300 switch ( item->uItemID ) |
1518 { | 1301 { |
1519 case 521: | 1302 case ITEM_RELIC_TALEDONS_HELM: |
1520 v125 = 11; | 1303 index = 11; |
1521 break; | 1304 break; |
1522 case 522: | 1305 case ITEM_RELIC_SCHOLARS_CAP: |
1523 v125 = 12; | 1306 index = 12; |
1524 break; | 1307 break; |
1525 case 523: | 1308 case ITEM_RELIC_PHYNAXIAN_CROWN: |
1526 v125 = 13; | 1309 index = 13; |
1527 break; | 1310 break; |
1528 case 532: | 1311 case ITEM_ARTIFACT_MINDS_EYE: |
1529 v125 = 14; | 1312 index = 14; |
1530 break; | 1313 break; |
1531 case 544: | 1314 case ITEM_RARE_SHADOWS_MASK: |
1532 v125 = 15; | 1315 index = 15; |
1533 break; | 1316 break; |
1534 default: | 1317 default: |
1535 v125 = item_Helm->uItemID - 89; | 1318 index = item->uItemID - 89; |
1536 } | 1319 } |
1537 if ( v125 >= 0 && v125 < 16 ) | 1320 if ( index >= 0 && index < 16 ) |
1538 { | 1321 { |
1539 pX_Helm = pPaperdoll_BodyX + paperdoll_Helm[pBodyComplection][v125][0]; | 1322 item_X = pPaperdoll_BodyX + paperdoll_Helm[pBodyComplection][index][0]; |
1540 pY_Helm = pPaperdoll_BodyY + paperdoll_Helm[pBodyComplection][v125][1]; | 1323 item_Y = pPaperdoll_BodyY + paperdoll_Helm[pBodyComplection][index][1]; |
1541 if ( IsDwarf != 1 || item_Helm->uItemID != 92 ) | 1324 if ( IsDwarf != 1 || item->uItemID != 92 ) |
1542 v127 = paperdoll_helm_texture[player->GetSexByVoice()][v125]; | 1325 v127 = paperdoll_helm_texture[player->GetSexByVoice()][index]; |
1543 else | 1326 else |
1544 v127 = papredoll_dbrds[11]; | 1327 v127 = papredoll_dbrds[11]; |
1545 if ( item_Helm->uAttributes & 0xF0 ) | 1328 if ( item->uAttributes & 0xF0 ) |
1546 { | 1329 { |
1547 if ( (item_Helm->uAttributes & 0xF0) == 16 ) | 1330 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1548 v180 = "sptext01"; | 1331 container = "sptext01"; |
1549 if ( (item_Helm->uAttributes & 0xF0) == 32 ) | 1332 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1550 v180 = "sp28a"; | 1333 container = "sp28a"; |
1551 if ( (item_Helm->uAttributes & 0xF0) == 64 ) | 1334 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1552 v180 = "sp30a"; | 1335 container = "sp30a"; |
1553 if ( (item_Helm->uAttributes & 0xF0) == 128 ) | 1336 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1554 v180 = "sp91a"; | 1337 container = "sp91a"; |
1555 v129 = pIcons_LOD->LoadTexturePtr(v180, TEXTURE_16BIT_PALETTE); | |
1556 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1338 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1557 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1339 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1558 { | 1340 { |
1559 _50C9A8_item_enchantment_timer = 0; | 1341 _50C9A8_item_enchantment_timer = 0; |
1560 item_Helm->uAttributes &= 0xFFFFFF0Fu; | 1342 item->uAttributes &= 0xFFFFFF0Fu; |
1561 ptr_50C9A4 = 0; | 1343 ptr_50C9A4 = 0; |
1562 } | 1344 } |
1563 v130 = (double)GetTickCount() * 0.1; | 1345 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v127), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1564 pRenderer->_4A63E6(pX_Helm, pY_Helm, pIcons_LOD->GetTexture(v127), v129, (signed __int64)v130, 0, 255); | 1346 GetTickCount() * 0.1, 0, 255); |
1565 } | 1347 } |
1566 else | 1348 else |
1567 { | 1349 { |
1568 v131 = v127 + 1; | 1350 if ( item->uAttributes & 2 ) |
1569 v132 = (char *)pIcons_LOD->GetTexture(v127); | 1351 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v127)); |
1570 if ( item_Helm->uAttributes & 2 ) | |
1571 pRenderer->DrawTransparentRedShade(pX_Helm, pY_Helm, (Texture *)v132); | |
1572 else | 1352 else |
1573 { | 1353 { |
1574 if ( item_Helm->uAttributes & 1 ) | 1354 if ( item->uAttributes & 1 ) |
1575 pRenderer->DrawTextureTransparent(pX_Helm, pY_Helm, (Texture *)v132); | 1355 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v127)); |
1576 else | 1356 else |
1577 pRenderer->DrawTransparentGreenShade(pX_Helm, pY_Helm, (Texture *)v132); | 1357 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v127)); |
1578 } | 1358 } |
1579 } | 1359 } |
1580 if ( !bRingsShownInCharScreen ) | 1360 if ( !bRingsShownInCharScreen ) |
1581 pRenderer->DrawMaskToZBuffer(pX_Helm, pY_Helm, (Texture *)v132, pHelmNum); | 1361 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), pPlayers[uPlayerID]->pEquipment.uHelm); |
1582 } | 1362 } |
1583 } | 1363 } |
1584 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand | 1364 //------------------------------------------------(Hand3/3)------------------------------------------- |
1585 if ( pMainHandNum3 ) | 1365 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) |
1586 { | 1366 { |
1587 item_MainHand3 = &pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum3 - 1]; | 1367 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1]; |
1588 pX_MainHand3 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipX; | 1368 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX; |
1589 pY_MainHand3 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipY; | 1369 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY; |
1590 if ( item_MainHand3->uItemID == 64 ) | 1370 if ( item->uItemID == 64 ) |
1591 v181 = "item64v1"; | 1371 v181 = "item64v1"; |
1592 else | 1372 else |
1593 v181 = pItemsTable->pItems[item_MainHand3->uItemID].pIconName; | 1373 v181 = pItemsTable->pItems[item->uItemID].pIconName; |
1594 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE); | 1374 if ( !(item->uAttributes & 0xF0) ) |
1595 if ( !(item_MainHand3->uAttributes & 0xF0) ) | 1375 { |
1596 { | 1376 if ( item->uAttributes & 2 ) |
1597 v142 = v138 + 1; | 1377 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE))); |
1598 v143 = (char *)pIcons_LOD->GetTexture(v138); | |
1599 if ( item_MainHand3->uAttributes & 2 ) | |
1600 pRenderer->DrawTransparentRedShade(pX_MainHand3, pY_MainHand3, (Texture *)v143); | |
1601 else | 1378 else |
1602 { | 1379 { |
1603 if ( item_MainHand3->uAttributes & 1 ) | 1380 if ( item->uAttributes & 1 ) |
1604 pRenderer->DrawTextureTransparent(pX_MainHand3, pY_MainHand3, (Texture *)v143); | 1381 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE))); |
1605 else | 1382 else |
1606 pRenderer->DrawTransparentGreenShade(pX_MainHand3, pY_MainHand3, (Texture *)v143); | 1383 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE))); |
1607 } | 1384 } |
1608 } | 1385 } |
1609 else | 1386 else |
1610 { | 1387 { |
1611 if ( (item_MainHand3->uAttributes & 0xF0) == 16 ) | 1388 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1612 v182 = "sptext01"; | 1389 container = "sptext01"; |
1613 if ( (item_MainHand3->uAttributes & 0xF0) == 32 ) | 1390 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1614 v182 = "sp28a"; | 1391 container = "sp28a"; |
1615 if ( (item_MainHand3->uAttributes & 0xF0) == 64 ) | 1392 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1616 v182 = "sp30a"; | 1393 container = "sp30a"; |
1617 if ( (item_MainHand3->uAttributes & 0xF0) == 128 ) | 1394 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1618 v182 = "sp91a"; | 1395 container = "sp91a"; |
1619 v140 = pIcons_LOD->LoadTexturePtr(v182, TEXTURE_16BIT_PALETTE); | |
1620 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1396 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1621 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1397 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1622 { | 1398 { |
1623 _50C9A8_item_enchantment_timer = 0; | 1399 _50C9A8_item_enchantment_timer = 0; |
1624 item_MainHand3->uAttributes &= 0xFFFFFF0Fu; | 1400 item->uAttributes &= 0xFFFFFF0Fu; |
1625 ptr_50C9A4 = 0; | 1401 ptr_50C9A4 = 0; |
1626 } | 1402 } |
1627 v141 = (double)GetTickCount() * 0.1; | 1403 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)), |
1628 pRenderer->_4A63E6(pX_MainHand3, pY_MainHand3, pIcons_LOD->GetTexture(v138), v140, (signed __int64)v141, 0, 255); | 1404 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1629 } | 1405 } |
1630 if ( !bRingsShownInCharScreen ) | 1406 if ( !bRingsShownInCharScreen ) |
1631 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3); | 1407 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)), |
1632 } | 1408 pPlayers[uPlayerID]->pEquipment.uMainHand); |
1633 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// | 1409 } |
1634 if ( pShieldNum ) | 1410 //--------------------------------------------------(Shield/)--------------------------------------------- |
1635 { | 1411 if ( pPlayers[uPlayerID]->pEquipment.uShield ) |
1636 item_Shield = &pPlayers[uPlayerID]->pInventoryItemList[pShieldNum - 1]; | 1412 { |
1637 v149 = pItemsTable->pItems[item_Shield->uItemID].uSkillType; | 1413 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uShield - 1]; |
1638 if ( v149 == 2 || v149 == 1 ) | 1414 if ( pItemsTable->pItems[item->uItemID].uSkillType == PLAYER_SKILL_DAGGER |
1639 { | 1415 || pItemsTable->pItems[item->uItemID].uSkillType == PLAYER_SKILL_SWORD ) |
1640 v151 = item_Shield->uItemID - 400; | 1416 { |
1641 pX_Shield = 596; | 1417 //v151 = item->uItemID - 400; |
1418 item_X = 596; | |
1642 v245 = 1; | 1419 v245 = 1; |
1643 switch ( item_Shield->uItemID ) | 1420 switch ( item->uItemID ) |
1644 { | 1421 { |
1645 case 400: | 1422 case 400: |
1646 pY_Shield = 86; | 1423 item_Y = 86; |
1647 break; | 1424 break; |
1648 case 403: | 1425 case 403: |
1649 pY_Shield = 28; | 1426 item_Y = 28; |
1650 break; | 1427 break; |
1651 case 415: | 1428 case 415: |
1652 pX_Shield = 595; | 1429 item_X = 595; |
1653 pY_Shield = 33; | 1430 item_Y = 33; |
1654 break; | 1431 break; |
1655 default: | 1432 default: |
1656 pX_Shield = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item_Shield->uItemID].uEquipX; | 1433 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item->uItemID].uEquipX; |
1657 pY_Shield = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item_Shield->uItemID].uEquipY; | 1434 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item->uItemID].uEquipY; |
1658 break; | 1435 break; |
1659 } | 1436 } |
1660 } | 1437 } |
1661 else | 1438 else |
1662 { | 1439 { |
1663 v245 = 0; | 1440 v245 = 0; |
1664 pX_Shield = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item_Shield->uItemID].uEquipX; | 1441 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item->uItemID].uEquipX; |
1665 pY_Shield = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item_Shield->uItemID].uEquipY; | 1442 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item->uItemID].uEquipY; |
1666 } | 1443 } |
1667 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[item_Shield->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 1444 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
1668 if ( !(item_Shield->uAttributes & 0xF0) ) | 1445 if ( !(item->uAttributes & 0xF0) ) |
1669 { | 1446 { |
1670 if ( item_Shield->uAttributes & 2 ) | 1447 if ( item->uAttributes & 2 ) |
1671 pRenderer->DrawTransparentRedShade(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153)); | 1448 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v153)); |
1672 else | 1449 else |
1673 { | 1450 { |
1674 v160 = (char *)pIcons_LOD->GetTexture(v153); | 1451 //v160 = (char *)pIcons_LOD->GetTexture(v153); |
1675 if ( !(item_Shield->uAttributes & 1) ) | 1452 if ( !(item->uAttributes & 1) ) |
1676 pRenderer->DrawTransparentGreenShade(pX_Shield, pY_Shield, (Texture *)v160); | 1453 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v153)); |
1677 else | 1454 else |
1678 pRenderer->DrawTextureTransparent(pX_Shield, pY_Shield, (Texture *)v160); | 1455 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v153)); |
1679 } | 1456 } |
1680 } | 1457 } |
1681 else | 1458 else |
1682 { | 1459 { |
1683 if ( (item_Shield->uAttributes & 0xF0) == 16 ) | 1460 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) |
1684 v183 = "sptext01"; | 1461 container = "sptext01"; |
1685 if ( (item_Shield->uAttributes & 0xF0) == 32 ) | 1462 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE ) |
1686 v183 = "sp28a"; | 1463 container = "sp28a"; |
1687 if ( (item_Shield->uAttributes & 0xF0) == 64 ) | 1464 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN ) |
1688 v183 = "sp30a"; | 1465 container = "sp30a"; |
1689 if ( (item_Shield->uAttributes & 0xF0) == 128 ) | 1466 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE ) |
1690 v183 = "sp91a"; | 1467 container = "sp91a"; |
1691 v157 = pIcons_LOD->LoadTexturePtr(v183, TEXTURE_16BIT_PALETTE); | |
1692 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1468 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1693 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1469 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1694 { | 1470 { |
1695 _50C9A8_item_enchantment_timer = 0; | 1471 _50C9A8_item_enchantment_timer = 0; |
1696 item_Shield->uAttributes &= 0xFFFFFF0Fu; | 1472 item->uAttributes &= 0xFFFFFF0Fu; |
1697 ptr_50C9A4 = 0; | 1473 ptr_50C9A4 = 0; |
1698 } | 1474 } |
1699 v158 = (double)GetTickCount() * 0.1; | 1475 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v153), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1700 pRenderer->_4A63E6(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), v157, (signed __int64)v158, 0, 255); | 1476 GetTickCount() * 0.1, 0, 255); |
1701 if ( v245 ) | 1477 if ( v245 ) |
1702 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], | 1478 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], |
1703 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1])); | 1479 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1])); |
1704 } | 1480 } |
1705 if ( !bRingsShownInCharScreen ) | 1481 if ( !bRingsShownInCharScreen ) |
1706 pRenderer->DrawMaskToZBuffer(pX_Shield, pY_Shield, pIcons_LOD->GetTexture(v153), pShieldNum); | 1482 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), pPlayers[uPlayerID]->pEquipment.uShield); |
1707 } | 1483 } |
1708 } | 1484 } |
1485 //--------------------------------------------------------(RightHand/ )-------------------------------------------------- | |
1709 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); | 1486 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); |
1710 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1487 //--------------------------------------------------------(LeftHand/ )---------------------------------------------------- |
1711 if ( pMainHandNum5 ) | 1488 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) |
1712 { | 1489 { |
1713 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum5 - 1]; | 1490 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1]; |
1714 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || | 1491 if ( pItemsTable->pItems[item->uItemID].uEquipType == EQUIP_MAIN_HAND |
1715 pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == PLAYER_SKILL_SPEAR && | 1492 || pItemsTable->pItems[item->uItemID].uSkillType == PLAYER_SKILL_SPEAR |
1716 !pPlayers[uPlayerID]->pEquipment.uShield ) | 1493 && !pPlayers[uPlayerID]->pEquipment.uShield ) |
1717 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], | 1494 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
1718 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], | 1495 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], |
1719 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); | 1496 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); |
1720 } | 1497 } |
1721 if ( !bRingsShownInCharScreen )// | 1498 if ( !bRingsShownInCharScreen )// |
1722 pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B)); | 1499 pRenderer->DrawTextureTransparent(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B)); |
1723 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));// | 1500 pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));// |
1724 } | 1501 } |
1725 | |
1726 | |
1727 | |
1728 | |
1729 | |
1730 | |
1731 | 1502 |
1732 //----- (0041A2D1) -------------------------------------------------------- | 1503 //----- (0041A2D1) -------------------------------------------------------- |
1733 void CharacterUI_InventoryTab_Draw(Player *player, bool a2) | 1504 void CharacterUI_InventoryTab_Draw(Player *player, bool a2) |
1734 { | 1505 { |
1735 Texture *v7; // esi@6 | 1506 Texture *v7; // esi@6 |
1794 _50C9A8_item_enchantment_timer = 0; | 1565 _50C9A8_item_enchantment_timer = 0; |
1795 LOBYTE(item->uAttributes) &= 0xF; | 1566 LOBYTE(item->uAttributes) &= 0xF; |
1796 ptr_50C9A4 = 0; | 1567 ptr_50C9A4 = 0; |
1797 } | 1568 } |
1798 | 1569 |
1799 pRenderer->_4A63E6(uCellX, uCellY, v7, pTexture, GetTickCount() * 0.1, 0, 255); | 1570 pRenderer->DrawAura(uCellX, uCellY, v7, pTexture, GetTickCount() * 0.1, 0, 255); |
1800 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, item_idx); | 1571 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, item_idx); |
1801 } | 1572 } |
1802 else | 1573 else |
1803 { | 1574 { |
1804 if (item->Identified() || pCurrentScreen != SCREEN_HOUSE) | 1575 if (item->Identified() || pCurrentScreen != SCREEN_HOUSE) |
1839 { | 1610 { |
1840 _50C9A8_item_enchantment_timer = 0; | 1611 _50C9A8_item_enchantment_timer = 0; |
1841 item->uAttributes &= 0xFFFFFF0F; | 1612 item->uAttributes &= 0xFFFFFF0F; |
1842 ptr_50C9A4 = 0; | 1613 ptr_50C9A4 = 0; |
1843 } | 1614 } |
1844 pRenderer->_4A63E6(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255); | 1615 pRenderer->DrawAura(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255); |
1845 } | 1616 } |
1846 else | 1617 else |
1847 { | 1618 { |
1848 if (item->Broken()) | 1619 if (item->Broken()) |
1849 pRenderer->DrawTransparentRedShade(x, y, item_texture); | 1620 pRenderer->DrawTransparentRedShade(x, y, item_texture); |