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