Вопрос How to get facet name

Начинающий
Статус
Оффлайн
Регистрация
16 Авг 2022
Сообщения
36
Реакции[?]
4
Поинты[?]
4K
Hello there.

C++:
std::string iconPath = std::format("assets\\spellicons\\{0}_png.png", abilityName);
const auto texture = TextureManager::StoreAndGetTexture(iconPath.c_str());
This is how I'm getting the ability icon. but now, there are some spells that have different version based on hero facet.
for example chen:
chen_summon_convert_hellbear_png.png
chen_summon_convert_centaur_png.png
...
My question is, is there any simple why that I can get facet of the ability/hero?
 
Последнее редактирование:
Участник
Статус
Оффлайн
Регистрация
23 Май 2019
Сообщения
781
Реакции[?]
331
Поинты[?]
63K
Hello there.

C++:
std::string iconPath = std::format("assets\\spellicons\\{0}_png.png", abilityName);
const auto texture = TextureManager::StoreAndGetTexture(iconPath.c_str());
This is how I'm getting the ability icon. but now, there are some spells that have different version based on hero facet.
for example chen:
chen_summon_convert_hellbear_png.png
chen_summon_convert_centaur_png.png
...
My question is, is there any simple why that I can get facet of the ability/hero?
facet is C_DOTA_BaseNPC_Hero::m_iHeroFacetID (keep in mind that it's a 1-based index)
scripts/npc/npc_heroes.txt
hero definition describes facets, facet descriptions may have a list called AbilityIconReplacements that described pairs (ability_name: new_icon)
npc_heroes.txt is parsed by the game; C_DOTAGameManager stores DOTAHeroDefinition_t's in a map
C++:
        "Facets"
        {
            "chen_centaur_convert"
            {
                "Icon"                "area_of_effect"
                "Color"                "Blue"
                "GradientID"        "3"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert"    "chen_summon_convert_centaur"
                }

            }
            "chen_wolf_convert"
            {
                "Icon"                "damage"
                "Color"                "Yellow"
                "GradientID"        "2"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert"    "chen_summon_convert_wolf"
                }
            }
            "chen_hellbear_convert"
            {
                "Icon"                "slow"
                "Color"                "Red"
                "GradientID"        "0"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert"    "chen_summon_convert_hellbear"
                }
            }
            "chen_troll_convert"
            {
                "Icon"                "summons"
                "Color"                "Green"
                "GradientID"        "0"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert"    "chen_summon_convert_troll"
                }
            }
            "chen_satyr_convert"
            {
                "Icon"                "mana"
                "Color"                "Purple"
                "GradientID"        "1"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert"    "chen_summon_convert_satyr"
                }
            }
        }
cf. function that updates panorama icons on the hero loadout page
C++:
$ ==>            | 48:895C24 20               | mov qword ptr ss:[rsp+20],rbx
$+5              | 55                         | push rbp
$+6              | 56                         | push rsi
$+7              | 57                         | push rdi
$+8              | 41:54                      | push r12
$+A              | 41:55                      | push r13
$+C              | 41:56                      | push r14
$+E              | 41:57                      | push r15
$+10             | 48:8DAC24 70FFFFFF         | lea rbp,qword ptr ss:[rsp-90]
$+18             | 48:81EC 90010000           | sub rsp,190
$+1F             | 6548:8B0425 58000000       | mov rax,qword ptr gs:[58]
$+28             | 4C:8BF9                    | mov r15,rcx
$+2B             | 8B15 AF3CCF02              | mov edx,dword ptr ds:[7FFDE766EEB0]
$+31             | BF 40000000                | mov edi,40
$+36             | 48:8B1CD0                  | mov rbx,qword ptr ds:[rax+rdx*8]
$+3A             | 8B043B                     | mov eax,dword ptr ds:[rbx+rdi]
$+3D             | 3905 294FC502              | cmp dword ptr ds:[7FFDE75D013C],eax                                    | 00007FFDE75D013C:"<."
$+43             | 0F8F C5080000              | jg client.7FFDE497BADE
$+49             | 8B043B                     | mov eax,dword ptr ds:[rbx+rdi]
$+4C             | 3905 224FC502              | cmp dword ptr ds:[7FFDE75D0144],eax                                    | 00007FFDE75D0144:"=."
$+52             | 0F8F F3080000              | jg client.7FFDE497BB1B
$+58             | 8B043B                     | mov eax,dword ptr ds:[rbx+rdi]
$+5B             | 3905 1B4FC502              | cmp dword ptr ds:[7FFDE75D014C],eax                                    | 00007FFDE75D014C:">."
$+61             | 0F8F 21090000              | jg client.7FFDE497BB58
$+67             | 8B043B                     | mov eax,dword ptr ds:[rbx+rdi]
$+6A             | 3905 144FC502              | cmp dword ptr ds:[7FFDE75D0154],eax                                    | 00007FFDE75D0154:"?."
$+70             | 0F8F 5B080000              | jg client.7FFDE497BAA1
$+76             | 49:8B4F 08                 | mov rcx,qword ptr ds:[r15+8]
$+7A             | 0FB715 E74EC502            | movzx edx,word ptr ds:[7FFDE75D0138]
$+81             | 48:8B01                    | mov rax,qword ptr ds:[rcx]
$+84             | FF90 60040000              | call qword ptr ds:[rax+460]
$+8A             | 33C0                       | xor eax,eax
$+8C             | 48:8D15 B178AE00           | lea rdx,qword ptr ds:[7FFDE5462B14]                                    | 00007FFDE5462B14:"empty"
$+93             | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+9A             | 48:8985 D8000000           | mov qword ptr ss:[rbp+D8],rax
$+A1             | FF15 1153A800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+A7             | 41:B5 01                   | mov r13b,1
$+AA             | C685 D0000000 00           | mov byte ptr ss:[rbp+D0],0
$+B1             | 40:32F6                    | xor sil,sil
$+B4             | 40:32FF                    | xor dil,dil
$+B7             | 32DB                       | xor bl,bl
$+B9             | E8 D26AD7FE                | call client.7FFDE36F1D60
$+BE             | 3898 700A0000              | cmp byte ptr ds:[rax+A70],bl
$+C4             | 75 15                      | jne client.7FFDE497B2AB
$+C6             | 3898 710A0000              | cmp byte ptr ds:[rax+A71],bl
$+CC             | 75 0D                      | jne client.7FFDE497B2AB
$+CE             | B9 70000000                | mov ecx,70
$+D3             | 3898 730A0000              | cmp byte ptr ds:[rax+A73],bl
$+D9             | 74 05                      | je client.7FFDE497B2B0
$+DB             | B9 780B0000                | mov ecx,B78
$+E0             | 41:8B97 EC000000           | mov edx,dword ptr ds:[r15+EC]
$+E7             | 48:03C8                    | add rcx,rax
$+EA             | E8 111CD4FE                | call client.7FFDE36BCED0
$+EF             | 4C:8D25 34E0AB00           | lea r12,qword ptr ds:[7FFDE54392FA]
$+F6             | 4C:8BF0                    | mov r14,rax
$+F9             | 48:85C0                    | test rax,rax
$+FC             | 0F84 07020000              | je client.7FFDE497B4D9
$+102            | 41:8B8F E8000000           | mov ecx,dword ptr ds:[r15+E8]
$+109            | 83F9 FF                    | cmp ecx,FFFFFFFF
$+10C            | 74 42                      | je client.7FFDE497B320
$+10E            | 4C:8B05 FBF69502           | mov r8,qword ptr ds:[7FFDE72DA9E0]
$+115            | 4D:85C0                    | test r8,r8
$+118            | 74 36                      | je client.7FFDE497B320
$+11A            | 83F9 FE                    | cmp ecx,FFFFFFFE
$+11D            | 74 31                      | je client.7FFDE497B320
$+11F            | 8BC1                       | mov eax,ecx
$+121            | 25 FF7F0000                | and eax,7FFF
$+126            | 8BD0                       | mov edx,eax
$+128            | 48:C1E8 09                 | shr rax,9
$+12C            | 4D:8B0CC0                  | mov r9,qword ptr ds:[r8+rax*8]
$+130            | 4D:85C9                    | test r9,r9
$+133            | 74 1B                      | je client.7FFDE497B320
$+135            | 81E2 FF010000              | and edx,1FF
$+13B            | 48:6BC2 78                 | imul rax,rdx,78
$+13F            | 49:03C1                    | add rax,r9
$+142            | 74 0C                      | je client.7FFDE497B320
$+144            | 3948 10                    | cmp dword ptr ds:[rax+10],ecx
$+147            | 75 07                      | jne client.7FFDE497B320
$+149            | 48:8B08                    | mov rcx,qword ptr ds:[rax]
$+14C            | 33F6                       | xor esi,esi
$+14E            | EB 04                      | jmp client.7FFDE497B324
$+150            | 33F6                       | xor esi,esi
$+152            | 8BCE                       | mov ecx,esi
$+154            | 4C:8D0D 756B7B02           | lea r9,qword ptr ds:[7FFDE7131EA0]
$+15B            | 897424 20                  | mov dword ptr ss:[rsp+20],esi
$+15F            | 4C:8D05 42108102           | lea r8,qword ptr ds:[7FFDE718C378]
$+166            | 33D2                       | xor edx,edx
$+168            | E8 DF229C00                | call client.7FFDE533D61C
$+16D            | 48:8BC8                    | mov rcx,rax
$+170            | 48:85C0                    | test rax,rax
$+173            | 0F85 02010000              | jne client.7FFDE497B44B
$+179            | 49:8BCE                    | mov rcx,r14
$+17C            | E8 3FE7D5FE                | call client.7FFDE36D9A90
$+181            | 84C0                       | test al,al
$+183            | 0F85 03010000              | jne client.7FFDE497B45C
$+189            | 41:83BF 18010000 00        | cmp dword ptr ds:[r15+118],0
$+191            | 0F8E 2C010000              | jle client.7FFDE497B493
$+197            | 41:83BF 1C010000 00        | cmp dword ptr ds:[r15+11C],0
$+19F            | 0F84 1E010000              | je client.7FFDE497B493
$+1A5            | E8 E669D7FE                | call client.7FFDE36F1D60
$+1AA            | 3898 700A0000              | cmp byte ptr ds:[rax+A70],bl
$+1B0            | 75 15                      | jne client.7FFDE497B397
$+1B2            | 3898 710A0000              | cmp byte ptr ds:[rax+A71],bl
$+1B8            | 75 0D                      | jne client.7FFDE497B397
$+1BA            | B9 88020000                | mov ecx,288
$+1BF            | 3898 730A0000              | cmp byte ptr ds:[rax+A73],bl
$+1C5            | 74 05                      | je client.7FFDE497B39C
$+1C7            | B9 900D0000                | mov ecx,D90
$+1CC            | 41:8B97 18010000           | mov edx,dword ptr ds:[r15+118]
$+1D3            | 48:03C8                    | add rcx,rax
$+1D6            | E8 4587DCFE                | call client.7FFDE3743AF0                                |   <----- gets hero definition
$+1DB            | 48:85C0                    | test rax,rax
$+1DE            | 0F84 DF000000              | je client.7FFDE497B493
$+1E4            | 41:8B97 1C010000           | mov edx,dword ptr ds:[r15+11C]
$+1EB            | 48:8BC8                    | mov rcx,rax
$+1EE            | E8 8D84DCFE                | call client.7FFDE3743850                                |   <----- gets facet definition
$+1F3            | 49:8B16                    | mov rdx,qword ptr ds:[r14]
$+1F6            | 48:8D8D E0000000           | lea rcx,qword ptr ss:[rbp+E0]
$+1FD            | 48:8BF8                    | mov rdi,rax
$+200            | 48:89B5 E0000000           | mov qword ptr ss:[rbp+E0],rsi
$+207            | FF15 AB51A800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+20D            | 48:8D4F 40                 | lea rcx,qword ptr ds:[rdi+40]
$+211            | 48:8D95 E0000000           | lea rdx,qword ptr ss:[rbp+E0]
$+218            | E8 F37FFEFF                | call client.7FFDE49633E0
$+21D            | 48:83BD E0000000 00        | cmp qword ptr ss:[rbp+E0],0
$+225            | 48:63D8                    | movsxd rbx,eax
$+228            | 74 0D                      | je client.7FFDE497B407
$+22A            | 48:8D8D E0000000           | lea rcx,qword ptr ss:[rbp+E0]
$+231            | FF15 9151A800              | call qword ptr ds:[<&private: void __cdecl CUtlString::FreeMemoryBlock
$+237            | 83FB FF                    | cmp ebx,FFFFFFFF
$+23A            | 0F84 83000000              | je client.7FFDE497B493
$+240            | 48:8B47 48                 | mov rax,qword ptr ds:[rdi+48]                           |   <----- gets replacement icon list
$+244            | 48:8BCB                    | mov rcx,rbx
$+247            | 48:C1E1 05                 | shl rcx,5
$+24B            | 45:32ED                    | xor r13b,r13b
$+24E            | 48:8B5401 18               | mov rdx,qword ptr ds:[rcx+rax+18]                       |   <----- gets replacement icon by index
$+253            | 48:85D2                    | test rdx,rdx
$+256            | 74 54                      | je client.7FFDE497B47C
$+258            | 48:C7C0 FFFFFFFF           | mov rax,FFFFFFFFFFFFFFFF
$+25F            | 90                         | nop
$+260            | 48:FFC0                    | inc rax
$+263            | 44:382C02                  | cmp byte ptr ds:[rdx+rax],r13b
$+267            | 75 F7                      | jne client.7FFDE497B430
$+269            | 44:8BC0                    | mov r8d,eax
$+26C            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+273            | FF15 0756A800              | call qword ptr ds:[<&public: void __cdecl CUtlString::SetDirect(char c
$+279            | EB 59                      | jmp client.7FFDE497B4A4
$+27B            | 48:8B00                    | mov rax,qword ptr ds:[rax]
$+27E            | FF90 B00A0000              | call qword ptr ds:[rax+AB0]
$+284            | 84C0                       | test al,al
$+286            | 0F84 FDFEFFFF              | je client.7FFDE497B359
$+28C            | 45:32ED                    | xor r13b,r13b
$+28F            | 48:8D15 6AF7BB01           | lea rdx,qword ptr ds:[7FFDE653ABD0]                                    | 00007FFDE653ABD0:"file://{images}/hud/facets/innate_icon_large.png"
$+296            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+29D            | FF15 1551A800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+2A3            | C685 D0000000 01           | mov byte ptr ss:[rbp+D0],1
$+2AA            | EB 28                      | jmp client.7FFDE497B4A4
$+2AC            | 8BC6                       | mov eax,esi
$+2AE            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+2B5            | 44:8BC0                    | mov r8d,eax
$+2B8            | 49:8BD4                    | mov rdx,r12
$+2BB            | FF15 BF55A800              | call qword ptr ds:[<&public: void __cdecl CUtlString::SetDirect(char c
$+2C1            | EB 11                      | jmp client.7FFDE497B4A4
$+2C3            | 49:8B56 08                 | mov rdx,qword ptr ds:[r14+8]
$+2C7            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+2CE            | FF15 E450A800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+2D4            | 41:837E 44 01              | cmp dword ptr ds:[r14+44],1
$+2D9            | BA 00000000                | mov edx,0
$+2DE            | 41:8B46 7C                 | mov eax,dword ptr ds:[r14+7C]
$+2E2            | 41:0FB69E 4C020000         | movzx ebx,byte ptr ds:[r14+24C]
$+2EA            | 40:0F94C6                  | sete sil
$+2EE            | 41:3987 10010000           | cmp dword ptr ds:[r15+110],eax
$+2F5            | 0F94C0                     | sete al
$+2F8            | 80E3 01                    | and bl,1
$+2FB            | 41:817E 40 8A130000        | cmp dword ptr ds:[r14+40],138A
$+303            | 0FB6F8                     | movzx edi,al
$+306            | 0F44FA                     | cmove edi,edx
$+309            | 49:8B4F 08                 | mov rcx,qword ptr ds:[r15+8]
$+30D            | 44:0FB6C6                  | movzx r8d,sil
$+311            | 0FB715 584CC502            | movzx edx,word ptr ds:[7FFDE75D0140]
$+318            | 48:8B01                    | mov rax,qword ptr ds:[rcx]
$+31B            | FF90 C8040000              | call qword ptr ds:[rax+4C8]
$+321            | 49:8B4F 08                 | mov rcx,qword ptr ds:[r15+8]
$+325            | 44:0FB6C7                  | movzx r8d,dil
$+329            | 0FB715 484CC502            | movzx edx,word ptr ds:[7FFDE75D0148]
$+330            | 48:8B01                    | mov rax,qword ptr ds:[rcx]
$+333            | FF90 C8040000              | call qword ptr ds:[rax+4C8]
$+339            | 49:8B4F 08                 | mov rcx,qword ptr ds:[r15+8]
$+33D            | 44:0FB685 D0000000         | movzx r8d,byte ptr ss:[rbp+D0]
$+345            | 0FB715 344CC502            | movzx edx,word ptr ds:[7FFDE75D0150]
$+34C            | 48:8B01                    | mov rax,qword ptr ds:[rcx]
$+34F            | FF90 C8040000              | call qword ptr ds:[rax+4C8]
$+355            | 45:84ED                    | test r13b,r13b
$+358            | 0F84 05030000              | je client.7FFDE497B833
$+35E            | 49:8B87 08010000           | mov rax,qword ptr ds:[r15+108]
$+365            | 45:33ED                    | xor r13d,r13d
$+368            | 41:8BF5                    | mov esi,r13d
$+36B            | 48:85C0                    | test rax,rax
$+36E            | 74 08                      | je client.7FFDE497B548
$+370            | 48:8BF0                    | mov rsi,rax
$+373            | E9 BA010000                | jmp client.7FFDE497B702
$+378            | 41:8B8F E8000000           | mov ecx,dword ptr ds:[r15+E8]
$+37F            | 83F9 FF                    | cmp ecx,FFFFFFFF
$+382            | 0F84 DE020000              | je client.7FFDE497B836
$+388            | 4C:8B0D 81F49502           | mov r9,qword ptr ds:[7FFDE72DA9E0]
$+38F            | 4D:85C9                    | test r9,r9
$+392            | 0F84 CE020000              | je client.7FFDE497B836
$+398            | 83F9 FE                    | cmp ecx,FFFFFFFE
$+39B            | 0F84 C5020000              | je client.7FFDE497B836
$+3A1            | 44:8BC1                    | mov r8d,ecx
$+3A4            | 41:81E0 FF7F0000           | and r8d,7FFF
$+3AB            | 41:8BC0                    | mov eax,r8d
$+3AE            | 48:C1E8 09                 | shr rax,9
$+3B2            | 41:8BD0                    | mov edx,r8d
$+3B5            | 4D:8B14C1                  | mov r10,qword ptr ds:[r9+rax*8]
$+3B9            | 4D:85D2                    | test r10,r10
$+3BC            | 0F84 A4020000              | je client.7FFDE497B836
$+3C2            | 81E2 FF010000              | and edx,1FF
$+3C8            | 48:6BC2 78                 | imul rax,rdx,78
$+3CC            | 49:03C2                    | add rax,r10
$+3CF            | 0F84 91020000              | je client.7FFDE497B836
$+3D5            | 3948 10                    | cmp dword ptr ds:[rax+10],ecx
$+3D8            | 0F85 88020000              | jne client.7FFDE497B836
$+3DE            | 4C:3928                    | cmp qword ptr ds:[rax],r13
$+3E1            | 0F84 7F020000              | je client.7FFDE497B836
$+3E7            | 41:8BC0                    | mov eax,r8d
$+3EA            | 33D2                       | xor edx,edx
$+3EC            | 25 FF010000                | and eax,1FF
$+3F1            | 41:8BC8                    | mov ecx,r8d
$+3F4            | 48:C1E9 09                 | shr rcx,9
$+3F8            | 4C:8D05 A90D8102           | lea r8,qword ptr ds:[7FFDE718C378]
$+3FF            | 48:6BC0 78                 | imul rax,rax,78
$+403            | 44:896C24 20               | mov dword ptr ss:[rsp+20],r13d
$+408            | 49:0304C9                  | add rax,qword ptr ds:[r9+rcx*8]
$+40C            | 4C:8D0D 1DA78202           | lea r9,qword ptr ds:[7FFDE71A5D00]
$+413            | 48:8B08                    | mov rcx,qword ptr ds:[rax]
$+416            | E8 31209C00                | call client.7FFDE533D61C
$+41B            | 48:85C0                    | test rax,rax
$+41E            | 74 07                      | je client.7FFDE497B5F7
$+420            | 48:8BB0 980A0000           | mov rsi,qword ptr ds:[rax+A98]
$+427            | 41:8B8F E8000000           | mov ecx,dword ptr ds:[r15+E8]
$+42E            | 83F9 FF                    | cmp ecx,FFFFFFFF
$+431            | 74 40                      | je client.7FFDE497B643
$+433            | 4C:8B05 D6F39502           | mov r8,qword ptr ds:[7FFDE72DA9E0]
$+43A            | 4D:85C0                    | test r8,r8
$+43D            | 74 34                      | je client.7FFDE497B643
$+43F            | 83F9 FE                    | cmp ecx,FFFFFFFE
$+442            | 74 2F                      | je client.7FFDE497B643
$+444            | 8BC1                       | mov eax,ecx
$+446            | 25 FF7F0000                | and eax,7FFF
$+44B            | 8BD0                       | mov edx,eax
$+44D            | 48:C1E8 09                 | shr rax,9
$+451            | 4D:8B0CC0                  | mov r9,qword ptr ds:[r8+rax*8]
$+455            | 4D:85C9                    | test r9,r9
$+458            | 74 19                      | je client.7FFDE497B643
$+45A            | 81E2 FF010000              | and edx,1FF
$+460            | 48:6BC2 78                 | imul rax,rdx,78
$+464            | 49:03C1                    | add rax,r9
$+467            | 74 0A                      | je client.7FFDE497B643
$+469            | 3948 10                    | cmp dword ptr ds:[rax+10],ecx
$+46C            | 75 05                      | jne client.7FFDE497B643
$+46E            | 48:8B08                    | mov rcx,qword ptr ds:[rax]
$+471            | EB 03                      | jmp client.7FFDE497B646
$+473            | 49:8BCD                    | mov rcx,r13
$+476            | 4C:8D0D 53687B02           | lea r9,qword ptr ds:[7FFDE7131EA0]
$+47D            | 44:896C24 20               | mov dword ptr ss:[rsp+20],r13d
$+482            | 4C:8D05 1F0D8102           | lea r8,qword ptr ds:[7FFDE718C378]
$+489            | 33D2                       | xor edx,edx
$+48B            | E8 BC1F9C00                | call client.7FFDE533D61C
$+490            | 48:8BF8                    | mov rdi,rax
$+493            | 48:85C0                    | test rax,rax
$+496            | 0F84 8D000000              | je client.7FFDE497B6F9
$+49C            | 48:8BCF                    | mov rcx,rdi
$+49F            | 48:8B00                    | mov rax,qword ptr ds:[rax]
$+4A2            | 4C:8B80 08070000           | mov r8,qword ptr ds:[rax+708]
$+4A9            | 45:38AF 21010000           | cmp byte ptr ds:[r15+121],r13b
$+4B0            | 74 53                      | je client.7FFDE497B6D5
$+4B2            | 33D2                       | xor edx,edx
$+4B4            | 41:FFD0                    | call r8
$+4B7            | 4C:8BC0                    | mov r8,rax
$+4BA            | 48:8D15 77F5BB01           | lea rdx,qword ptr ds:[7FFDE653AC08]                                    | 00007FFDE653AC08:"%s_secondary"
$+4C1            | 48:8D4D 80                 | lea rcx,qword ptr ss:[rbp-80]
$+4C5            | E8 2695E4FD                | call client.7FFDE27C4BC0
$+4CA            | 8B48 04                    | mov ecx,dword ptr ds:[rax+4]
$+4CD            | 0FBAE1 1E                  | bt ecx,1E
$+4D1            | 73 06                      | jae client.7FFDE497B6A9
$+4D3            | 48:8D50 08                 | lea rdx,qword ptr ds:[rax+8]
$+4D7            | EB 11                      | jmp client.7FFDE497B6BA
$+4D9            | F7C1 FFFFFF3F              | test ecx,3FFFFFFF
$+4DF            | 76 06                      | jbe client.7FFDE497B6B7
$+4E1            | 48:8B50 08                 | mov rdx,qword ptr ds:[rax+8]
$+4E5            | EB 03                      | jmp client.7FFDE497B6BA
$+4E7            | 49:8BD4                    | mov rdx,r12
$+4EA            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+4F1            | FF15 C14EA800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+4F7            | 33D2                       | xor edx,edx
$+4F9            | 48:8D4D 80                 | lea rcx,qword ptr ss:[rbp-80]
$+4FD            | FF15 FD4DA800              | call qword ptr ds:[<&public: void __cdecl CBufferString::Purge(int)>]
$+503            | EB 15                      | jmp client.7FFDE497B6EA
$+505            | B2 01                      | mov dl,1
$+507            | 41:FFD0                    | call r8
$+50A            | 48:8BD0                    | mov rdx,rax
$+50D            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+514            | FF15 9E4EA800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+51A            | 48:8B07                    | mov rax,qword ptr ds:[rdi]
$+51D            | 48:8BCF                    | mov rcx,rdi
$+520            | FF90 20080000              | call qword ptr ds:[rax+820]
$+526            | 0FB6D8                     | movzx ebx,al
$+529            | 48:85F6                    | test rsi,rsi
$+52C            | 0F84 34010000              | je client.7FFDE497B836
$+532            | 4D:85F6                    | test r14,r14
$+535            | 0F84 2B010000              | je client.7FFDE497B836
$+53B            | 49:8B06                    | mov rax,qword ptr ds:[r14]
$+53E            | 48:8985 E0000000           | mov qword ptr ss:[rbp+E0],rax
$+545            | E8 363B4300                | call client.7FFDE4DAF250
$+54A            | 0FB756 28                  | movzx edx,word ptr ds:[rsi+28]
$+54E            | 41:BA FFFF0000             | mov r10d,FFFF
$+554            | 0FBFC8                     | movsx ecx,ax
$+557            | 6641:3BD2                  | cmp dx,r10w
$+55B            | 74 3E                      | je client.7FFDE497B76B
$+55D            | 4C:8B4E 18                 | mov r9,qword ptr ds:[rsi+18]
$+561            | 0FB7C2                     | movzx eax,dx
$+564            | 4C:8D0440                  | lea r8,qword ptr ds:[rax+rax*2]
$+568            | 43:3B4CC1 08               | cmp ecx,dword ptr ds:[r9+r8*8+8]
$+56D            | 73 0D                      | jae client.7FFDE497B74C
$+56F            | 6641:3BD2                  | cmp dx,r10w
$+573            | 74 1D                      | je client.7FFDE497B762
$+575            | 43:0FB714C1                | movzx edx,word ptr ds:[r9+r8*8]
$+57A            | EB 0E                      | jmp client.7FFDE497B75A
$+57C            | 76 1D                      | jbe client.7FFDE497B76B
$+57E            | 6641:3BD2                  | cmp dx,r10w
$+582            | 74 13                      | je client.7FFDE497B767
$+584            | 43:0FB754C1 02             | movzx edx,word ptr ds:[r9+r8*8+2]
$+58A            | 6641:3BD2                  | cmp dx,r10w
$+58E            | 75 D1                      | jne client.7FFDE497B731
$+590            | EB 09                      | jmp client.7FFDE497B76B
$+592            | 41:8BD2                    | mov edx,r10d
$+595            | EB 04                      | jmp client.7FFDE497B76B
$+597            | 41:0FB7D2                  | movzx edx,r10w
$+59B            | 48:6346 20                 | movsxd rax,dword ptr ds:[rsi+20]
$+59F            | 44:0FB7C2                  | movzx r8d,dx
$+5A3            | 4C:3BC0                    | cmp r8,rax
$+5A6            | 0F8D BA000000              | jge client.7FFDE497B836
$+5AC            | 66:3B56 2E                 | cmp dx,word ptr ds:[rsi+2E]
$+5B0            | 0F87 B0000000              | ja client.7FFDE497B836
$+5B6            | 6641:3BD2                  | cmp dx,r10w
$+5BA            | 0F84 A6000000              | je client.7FFDE497B836
$+5C0            | 48:8B46 18                 | mov rax,qword ptr ds:[rsi+18]
$+5C4            | 4F:8D2C40                  | lea r13,qword ptr ds:[r8+r8*2]
$+5C8            | 6642:3914E8                | cmp word ptr ds:[rax+r13*8],dx
$+5CD            | 0F84 90000000              | je client.7FFDE497B833
$+5D3            | 4E:8B6CE8 10               | mov r13,qword ptr ds:[rax+r13*8+10]
$+5D8            | 4D:85ED                    | test r13,r13
$+5DB            | 0F84 82000000              | je client.7FFDE497B833
$+5E1            | 41:8B45 00                 | mov eax,dword ptr ds:[r13]
$+5E5            | 33D2                       | xor edx,edx
$+5E7            | 8BF2                       | mov esi,edx
$+5E9            | 85C0                       | test eax,eax
$+5EB            | 7E 76                      | jle client.7FFDE497B833
$+5ED            | 8BFA                       | mov edi,edx
$+5EF            | 90                         | nop
$+5F0            | 48:85FF                    | test rdi,rdi
$+5F3            | 78 25                      | js client.7FFDE497B7EA
$+5F5            | 3BF0                       | cmp esi,eax
$+5F7            | 7D 21                      | jge client.7FFDE497B7EA
$+5F9            | 49:8B45 08                 | mov rax,qword ptr ds:[r13+8]
$+5FD            | 4C:8B34F8                  | mov r14,qword ptr ds:[rax+rdi*8]
$+601            | 4D:85F6                    | test r14,r14
$+604            | 74 14                      | je client.7FFDE497B7EA
$+606            | 49:8B06                    | mov rax,qword ptr ds:[r14]
$+609            | 49:8BCE                    | mov rcx,r14
$+60C            | 48:8B95 E0000000           | mov rdx,qword ptr ss:[rbp+E0]
$+613            | FF50 28                    | call qword ptr ds:[rax+28]
$+616            | 84C0                       | test al,al
$+618            | 75 0F                      | jne client.7FFDE497B7F9
$+61A            | 41:8B45 00                 | mov eax,dword ptr ds:[r13]
$+61E            | FFC6                       | inc esi
$+620            | 48:FFC7                    | inc rdi
$+623            | 3BF0                       | cmp esi,eax
$+625            | 7C C9                      | jl client.7FFDE497B7C0
$+627            | EB 33                      | jmp client.7FFDE497B82C
$+629            | 49:8B46 10                 | mov rax,qword ptr ds:[r14+10]
$+62D            | 48:8D15 F6DAAB00           | lea rdx,qword ptr ds:[7FFDE54392FA]
$+634            | 48:85C0                    | test rax,rax
$+637            | 48:8D8D D8000000           | lea rcx,qword ptr ss:[rbp+D8]
$+63E            | 48:0F45D0                  | cmovne rdx,rax
$+642            | FF15 704DA800              | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+648            | 49:8B4F 08                 | mov rcx,qword ptr ds:[r15+8]
$+64C            | 0FB715 1549C502            | movzx edx,word ptr ds:[7FFDE75D0138]
$+653            | 48:8B01                    | mov rax,qword ptr ds:[rcx]
$+656            | FF90 48040000              | call qword ptr ds:[rax+448]
$+65C            | 4C:8D25 C7DAAB00           | lea r12,qword ptr ds:[7FFDE54392FA]
$+663            | 45:33ED                    | xor r13d,r13d
$+666            | 48:8D95 D8000000           | lea rdx,qword ptr ss:[rbp+D8]
$+66D            | 49:8D8F F0000000           | lea rcx,qword ptr ds:[r15+F0]
$+674            | FF15 2E51A800              | call qword ptr ds:[<&public: bool __cdecl CUtlString::operator==(class
$+67A            | 84C0                       | test al,al
$+67C            | 0F85 1D020000              | jne client.7FFDE497BA6F
$+682            | 49:8B87 F8000000           | mov rax,qword ptr ds:[r15+F8]
$+689            | 49:8BFD                    | mov rdi,r13
$+68C            | 48:85C0                    | test rax,rax
$+68F            | 74 0A                      | je client.7FFDE497B86B
$+691            | 8038 00                    | cmp byte ptr ds:[rax],0
$+694            | 74 05                      | je client.7FFDE497B86B
$+696            | 48:8BF8                    | mov rdi,rax
$+699            | EB 3C                      | jmp client.7FFDE497B8A7
$+69B            | 49:8B8F E0000000           | mov rcx,qword ptr ds:[r15+E0]
$+6A2            | 48:85C9                    | test rcx,rcx
$+6A5            | 74 30                      | je client.7FFDE497B8A7
$+6A7            | 8039 00                    | cmp byte ptr ds:[rcx],0
$+6AA            | 74 2B                      | je client.7FFDE497B8A7
$+6AC            | 48:8D15 552BB001           | lea rdx,qword ptr ds:[7FFDE647E3D8]                                    | 00007FFDE647E3D8:"special_bonus_"
$+6B3            | E8 143B9C00                | call client.7FFDE533F39C
$+6B8            | 49:8B8F E0000000           | mov rcx,qword ptr ds:[r15+E0]
$+6BF            | 48:8D3D 82F3BB01           | lea rdi,qword ptr ds:[7FFDE653AC18]                                    | 00007FFDE653AC18:"file://{images}/spellicons/attribute_bonus.png"
$+6C6            | 48:85C9                    | test rcx,rcx
$+6C9            | 49:8BD4                    | mov rdx,r12
$+6CC            | 48:0F45D1                  | cmovne rdx,rcx
$+6D0            | 48:3BC2                    | cmp rax,rdx
 
Начинающий
Статус
Оффлайн
Регистрация
16 Авг 2022
Сообщения
36
Реакции[?]
4
Поинты[?]
4K
facet is C_DOTA_BaseNPC_Hero::m_iHeroFacetID (keep in mind that it's a 1-based index)
scripts/npc/npc_heroes.txt
hero definition describes facets, facet descriptions may have a list called AbilityIconReplacements that described pairs (ability_name: new_icon)
npc_heroes.txt is parsed by the game; C_DOTAGameManager stores DOTAHeroDefinition_t's in a map
C++:
 "Facets"
        {
            "chen_centaur_convert"
            {
                "Icon" "area_of_effect"
                "Color" "Blue"
                "GradientID" "3"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert" "chen_summon_convert_centaur"
                }

            }
            "chen_wolf_convert"
            {
                "Icon" "damage"
                "Color" "Yellow"
                "GradientID" "2"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert" "chen_summon_convert_wolf"
                }
            }
            "chen_hellbear_convert"
            {
                "Icon" "slow"
                "Color" "Red"
                "GradientID" "0"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert" "chen_summon_convert_hellbear"
                }
            }
            "chen_troll_convert"
            {
                "Icon" "summons"
                "Color" "Green"
                "GradientID" "0"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert" "chen_summon_convert_troll"
                }
            }
            "chen_satyr_convert"
            {
                "Icon" "mana"
                "Color" "Purple"
                "GradientID" "1"
                "AbilityIconReplacements"
                {
                    "chen_summon_convert" "chen_summon_convert_satyr"
                }
            }
        }
cf. function that updates panorama icons on the hero loadout page
C++:
$ ==> | 48:895C24 20 | mov qword ptr ss:[rsp+20],rbx
$+5 | 55 | push rbp
$+6 | 56 | push rsi
$+7 | 57 | push rdi
$+8 | 41:54 | push r12
$+A | 41:55 | push r13
$+C | 41:56 | push r14
$+E | 41:57 | push r15
$+10 | 48:8DAC24 70FFFFFF | lea rbp,qword ptr ss:[rsp-90]
$+18 | 48:81EC 90010000 | sub rsp,190
$+1F | 6548:8B0425 58000000 | mov rax,qword ptr gs:[58]
$+28 | 4C:8BF9 | mov r15,rcx
$+2B | 8B15 AF3CCF02 | mov edx,dword ptr ds:[7FFDE766EEB0]
$+31 | BF 40000000 | mov edi,40
$+36 | 48:8B1CD0 | mov rbx,qword ptr ds:[rax+rdx*8]
$+3A | 8B043B | mov eax,dword ptr ds:[rbx+rdi]
$+3D | 3905 294FC502 | cmp dword ptr ds:[7FFDE75D013C],eax | 00007FFDE75D013C:"<."
$+43 | 0F8F C5080000 | jg client.7FFDE497BADE
$+49 | 8B043B | mov eax,dword ptr ds:[rbx+rdi]
$+4C | 3905 224FC502 | cmp dword ptr ds:[7FFDE75D0144],eax | 00007FFDE75D0144:"=."
$+52 | 0F8F F3080000 | jg client.7FFDE497BB1B
$+58 | 8B043B | mov eax,dword ptr ds:[rbx+rdi]
$+5B | 3905 1B4FC502 | cmp dword ptr ds:[7FFDE75D014C],eax | 00007FFDE75D014C:">."
$+61 | 0F8F 21090000 | jg client.7FFDE497BB58
$+67 | 8B043B | mov eax,dword ptr ds:[rbx+rdi]
$+6A | 3905 144FC502 | cmp dword ptr ds:[7FFDE75D0154],eax | 00007FFDE75D0154:"?."
$+70 | 0F8F 5B080000 | jg client.7FFDE497BAA1
$+76 | 49:8B4F 08 | mov rcx,qword ptr ds:[r15+8]
$+7A | 0FB715 E74EC502 | movzx edx,word ptr ds:[7FFDE75D0138]
$+81 | 48:8B01 | mov rax,qword ptr ds:[rcx]
$+84 | FF90 60040000 | call qword ptr ds:[rax+460]
$+8A | 33C0 | xor eax,eax
$+8C | 48:8D15 B178AE00 | lea rdx,qword ptr ds:[7FFDE5462B14] | 00007FFDE5462B14:"empty"
$+93 | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+9A | 48:8985 D8000000 | mov qword ptr ss:[rbp+D8],rax
$+A1 | FF15 1153A800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+A7 | 41:B5 01 | mov r13b,1
$+AA | C685 D0000000 00 | mov byte ptr ss:[rbp+D0],0
$+B1 | 40:32F6 | xor sil, sil
$+B4 | 40:32FF | xor dil,dil
$+B7 | 32DB | xor bl,bl
$+B9 | E8 D26AD7FE | call client.7FFDE36F1D60
$+BE | 3898 700A0000 | cmp byte ptr ds:[rax+A70],bl
$+C4 | 75 15 | jne client.7FFDE497B2AB
$+C6 | 3898 710A0000 | cmp byte ptr ds:[rax+A71],bl
$+CC | 75 0D | jne client.7FFDE497B2AB
$+CE | B9 70000000 | mov ecx,70
$+D3 | 3898 730A0000 | cmp byte ptr ds:[rax+A73],bl
$+D9 | 74 05 | je client.7FFDE497B2B0
$+DB | B9 780B0000 | mov ecx,B78
$+E0 | 41:8B97 EC000000 | mov edx,dword ptr ds:[r15+EC]
$+E7 | 48:03C8 | add rcx,rax
$+EA | E8 111CD4FE | call client.7FFDE36BCED0
$+EF | 4C:8D25 34E0AB00 | lea r12,qword ptr ds:[7FFDE54392FA]
$+F6 | 4C:8BF0 | mov r14,rax
$+F9 | 48:85C0 | test rax,rax
$+FC | 0F84 07020000 | je client.7FFDE497B4D9
$+102 | 41:8B8F E8000000 | mov ecx,dword ptr ds:[r15+E8]
$+109 | 83F9FF | cmp ecx,FFFFFFFF
$+10C | 74 42 | je client.7FFDE497B320
$+10E | 4C:8B05 FBF69502 | mov r8,qword ptr ds:[7FFDE72DA9E0]
$+115 | 4D:85C0 | test r8,r8
$+118 | 74 36 | je client.7FFDE497B320
$+11A | 83F9 FE | cmp ecx,FFFFFFFE
$+11D | 74 31 | je client.7FFDE497B320
$+11F | 8BC1 | mov eax,ecx
$+121 | 25 FF7F0000 | and eax,7FFF
$+126 | 8BD0 | mov edx,eax
$+128 | 48:C1E8 09 | shr rax,9
$+12C | 4D:8B0CC0 | mov r9,qword ptr ds:[r8+rax*8]
$+130 | 4D:85C9 | test r9,r9
$+133 | 74 1B | je client.7FFDE497B320
$+135 | 81E2 FF010000 | and edx,1FF
$+13B | 48:6BC2 78 | imul rax,rdx,78
$+13F | 49:03C1 | add rax,r9
$+142 | 74 0C | je client.7FFDE497B320
$+144 | 3948 10 | cmp dword ptr ds:[rax+10],ecx
$+147 | 75 07 | jne client.7FFDE497B320
$+149 | 48:8B08 | mov rcx,qword ptr ds:[rax]
$+14C | 33F6 | xor esi,esi
$+14E | EB 04 | jmp client.7FFDE497B324
$+150 | 33F6 | xor esi,esi
$+152 | 8BCE | mov ecx,esi
$+154 | 4C:8D0D 756B7B02 | lea r9,qword ptr ds:[7FFDE7131EA0]
$+15B | 897424 20 | mov dword ptr ss:[rsp+20],esi
$+15F | 4C:8D05 42108102 | lea r8,qword ptr ds:[7FFDE718C378]
$+166 | 33D2 | xor edx,edx
$+168 | E8 DF229C00 | call client.7FFDE533D61C
$+16D | 48:8BC8 | mov rcx,rax
$+170 | 48:85C0 | test rax,rax
$+173 | 0F85 02010000 | jne client.7FFDE497B44B
$+179 | 49:8BCE | mov rcx,r14
$+17C | E8 3FE7D5FE | call client.7FFDE36D9A90
$+181 | 84C0 | test al,al
$+183 | 0F85 03010000 | jne client.7FFDE497B45C
$+189 | 41:83BF 18010000 00 | cmp dword ptr ds:[r15+118],0
$+191 | 0F8E 2C010000 | jle client.7FFDE497B493
$+197 | 41:83BF 1C010000 00 | cmp dword ptr ds:[r15+11C],0
$+19F | 0F84 1E010000 | je client.7FFDE497B493
$+1A5 | E8 E669D7FE | call client.7FFDE36F1D60
$+1AA | 3898 700A0000 | cmp byte ptr ds:[rax+A70],bl
$+1B0 | 75 15 | jne client.7FFDE497B397
$+1B2 | 3898 710A0000 | cmp byte ptr ds:[rax+A71],bl
$+1B8 | 75 0D | jne client.7FFDE497B397
$+1BA | B9 88020000 | mov ecx,288
$+1BF | 3898 730A0000 | cmp byte ptr ds:[rax+A73],bl
$+1C5 | 74 05 | je client.7FFDE497B39C
$+1C7 | B9 900D0000 | mov ecx,D90
$+1CC | 41:8B97 18010000 | mov edx,dword ptr ds:[r15+118]
$+1D3 | 48:03C8 | add rcx,rax
$+1D6 | E8 4587DCFE | call client.7FFDE3743AF0 | <----- gets hero definition
$+1DB | 48:85C0 | test rax,rax
$+1DE | 0F84 DF000000 | je client.7FFDE497B493
$+1E4 | 41:8B97 1C010000 | mov edx,dword ptr ds:[r15+11C]
$+1EB | 48:8BC8 | mov rcx,rax
$+1EE | E8 8D84DCFE | call client.7FFDE3743850 | <----- gets facet definition
$+1F3 | 49:8B16 | mov rdx,qword ptr ds:[r14]
$+1F6 | 48:8D8D E0000000 | lea rcx,qword ptr ss:[rbp+E0]
$+1FD | 48:8BF8 | mov rdi,rax
$+200 | 48:89B5 E0000000 | mov qword ptr ss:[rbp+E0],rsi
$+207 | FF15 AB51A800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+20D | 48:8D4F 40 | lea rcx,qword ptr ds:[rdi+40]
$+211 | 48:8D95 E0000000 | lea rdx,qword ptr ss:[rbp+E0]
$+218 | E8 F37FFEFF | call client.7FFDE49633E0
$+21D | 48:83BD E0000000 00 | cmp qword ptr ss:[rbp+E0],0
$+225 | 48:63D8 | movsxd rbx,eax
$+228 | 74 0D | je client.7FFDE497B407
$+22A | 48:8D8D E0000000 | lea rcx,qword ptr ss:[rbp+E0]
$+231 | FF15 9151A800 | call qword ptr ds:[<&private: void __cdecl CUtlString::FreeMemoryBlock
$+237 | 83FB FF | cmp ebx,FFFFFFFF
$+23A | 0F84 83000000 | je client.7FFDE497B493
$+240 | 48:8B47 48 | mov rax,qword ptr ds:[rdi+48] | <----- gets replacement icon list
$+244 | 48:8BCB | mov rcx,rbx
$+247 | 48:C1E1 05 | shl rcx,5
$+24B | 45:32ED | xor r13b,r13b
$+24E | 48:8B5401 18 | mov rdx,qword ptr ds:[rcx+rax+18] | <----- gets replacement icon by index
$+253 | 48:85D2 | test rdx,rdx
$+256 | 74 54 | je client.7FFDE497B47C
$+258 | 48:C7C0 FFFFFFFF | mov rax,FFFFFFFFFFFFFFFF
$+25F | 90 | nop
$+260 | 48:FFC0 | inc rax
$+263 | 44:382C02 | cmp byte ptr ds:[rdx+rax],r13b
$+267 | 75 F7 | jne client.7FFDE497B430
$+269 | 44:8BC0 | mov r8d,eax
$+26C | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+273 | FF15 0756A800 | call qword ptr ds:[<&public: void __cdecl CUtlString::SetDirect(char c
$+279 | EB 59 | jmp client.7FFDE497B4A4
$+27B | 48:8B00 | mov rax,qword ptr ds:[rax]
$+27E | FF90 B00A0000 | call qword ptr ds:[rax+AB0]
$+284 | 84C0 | test al,al
$+286 | 0F84 FDFEFFFF | je client.7FFDE497B359
$+28C | 45:32ED | xor r13b,r13b
$+28F | 48:8D15 6AF7BB01 | lea rdx,qword ptr ds:[7FFDE653ABD0] | 00007FFDE653ABD0:"file://{images}/hud/facets/innate_icon_large.png"
$+296 | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+29D | FF15 1551A800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+2A3 | C685 D0000000 01 | mov byte ptr ss:[rbp+D0],1
$+2AA | EB 28 | jmp client.7FFDE497B4A4
$+2AC | 8BC6 | mov eax,esi
$+2AE | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+2B5 | 44:8BC0 | mov r8d,eax
$+2B8 | 49:8BD4 | mov rdx,r12
$+2BB | FF15 BF55A800 | call qword ptr ds:[<&public: void __cdecl CUtlString::SetDirect(char c
$+2C1 | EB 11 | jmp client.7FFDE497B4A4
$+2C3 | 49:8B56 08 | mov rdx,qword ptr ds:[r14+8]
$+2C7 | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+2CE | FF15 E450A800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+2D4 | 41:837E 44 01 | cmp dword ptr ds:[r14+44],1
$+2D9 | BA 00000000 | mov edx,0
$+2DE | 41:8B46 7C | mov eax,dword ptr ds:[r14+7C]
$+2E2 | 41:0FB69E 4C020000 | movzx ebx,byte ptr ds:[r14+24C]
$+2EA | 40:0F94C6 | sete sil
$+2EE | 41:3987 10010000 | cmp dword ptr ds:[r15+110],eax
$+2F5 | 0F94C0 | sete al
$+2F8 | 80E3 01 | andbl,1
$+2FB | 41:817E 40 8A130000 | cmp dword ptr ds:[r14+40],138A
$+303 | 0FB6F8 | movzx edi,al
$+306 | 0F44FA | cmove edi,edx
$+309 | 49:8B4F 08 | mov rcx,qword ptr ds:[r15+8]
$+30D | 44:0FB6C6 | movzx r8d,sil
$+311 | 0FB715 584CC502 | movzx edx,word ptr ds:[7FFDE75D0140]
$+318 | 48:8B01 | mov rax,qword ptr ds:[rcx]
$+31B | FF90 C8040000 | call qword ptr ds:[rax+4C8]
$+321 | 49:8B4F 08 | mov rcx,qword ptr ds:[r15+8]
$+325 | 44:0FB6C7 | movzx r8d,dil
$+329 | 0FB715 484CC502 | movzx edx,word ptr ds:[7FFDE75D0148]
$+330 | 48:8B01 | mov rax,qword ptr ds:[rcx]
$+333 | FF90 C8040000 | call qword ptr ds:[rax+4C8]
$+339 | 49:8B4F 08 | mov rcx,qword ptr ds:[r15+8]
$+33D | 44:0FB685 D0000000 | movzx r8d,byte ptr ss:[rbp+D0]
$+345 | 0FB715 344CC502 | movzx edx,word ptr ds:[7FFDE75D0150]
$+34C | 48:8B01 | mov rax,qword ptr ds:[rcx]
$+34F | FF90 C8040000 | call qword ptr ds:[rax+4C8]
$+355 | 45:84ED | test r13b,r13b
$+358 | 0F84 05030000 | je client.7FFDE497B833
$+35E | 49:8B87 08010000 | mov rax,qword ptr ds:[r15+108]
$+365 | 45:33ED | xor r13d,r13d
$+368 | 41:8BF5 | mov esi,r13d
$+36B | 48:85C0 | test rax,rax
$+36E | 74 08 | je client.7FFDE497B548
$+370 | 48:8BF0 | mov rsi,rax
$+373 | E9 BA010000 | jmp client.7FFDE497B702
$+378 | 41:8B8F E8000000 | mov ecx,dword ptr ds:[r15+E8]
$+37F | 83F9FF | cmp ecx,FFFFFFFF
$+382 | 0F84 DE020000 | je client.7FFDE497B836
$+388 | 4C:8B0D 81F49502 | mov r9,qword ptr ds:[7FFDE72DA9E0]
$+38F | 4D:85C9 | test r9,r9
$+392 | 0F84 CE020000 | je client.7FFDE497B836
$+398 | 83F9 FE | cmp ecx,FFFFFFFE
$+39B | 0F84 C5020000 | je client.7FFDE497B836
$+3A1 | 44:8BC1 | mov r8d,ecx
$+3A4 | 41:81E0 FF7F0000 | and r8d,7FFF
$+3AB | 41:8BC0 | mov eax,r8d
$+3AE | 48:C1E8 09 | shr rax,9
$+3B2 | 41:8BD0 | mov edx,r8d
$+3B5 | 4D:8B14C1 | mov r10,qword ptr ds:[r9+rax*8]
$+3B9 | 4D:85D2 | test r10,r10
$+3BC | 0F84 A4020000 | je client.7FFDE497B836
$+3C2 | 81E2 FF010000 | and edx,1FF
$+3C8 | 48:6BC2 78 | imul rax,rdx,78
$+3CC | 49:03C2 | add rax,r10
$+3CF | 0F84 91020000 | je client.7FFDE497B836
$+3D5 | 3948 10 | cmp dword ptr ds:[rax+10],ecx
$+3D8 | 0F85 88020000 | jne client.7FFDE497B836
$+3DE | 4C:3928 | cmp qword ptr ds:[rax],r13
$+3E1 | 0F84 7F020000 | je client.7FFDE497B836
$+3E7 | 41:8BC0 | mov eax,r8d
$+3EA | 33D2 | xor edx,edx
$+3EC | 25 FF010000 | and eax,1FF
$+3F1 | 41:8BC8 | mov ecx,r8d
$+3F4 | 48:C1E9 09 | shr rcx,9
$+3F8 | 4C:8D05 A90D8102 | lea r8,qword ptr ds:[7FFDE718C378]
$+3FF | 48:6BC0 78 | imul rax,rax,78
$+403 | 44:896C24 20 | mov dword ptr ss:[rsp+20],r13d
$+408 | 49:0304C9 | add rax,qword ptr ds:[r9+rcx*8]
$+40C | 4C:8D0D 1DA78202 | lea r9,qword ptr ds:[7FFDE71A5D00]
$+413 | 48:8B08 | mov rcx,qword ptr ds:[rax]
$+416 | E8 31209C00 | call client.7FFDE533D61C
$+41B | 48:85C0 | test rax,rax
$+41E | 74 07 | je client.7FFDE497B5F7
$+420 | 48:8BB0 980A0000 | mov rsi,qword ptr ds:[rax+A98]
$+427 | 41:8B8F E8000000 | mov ecx,dword ptr ds:[r15+E8]
$+42E | 83F9FF | cmp ecx,FFFFFFFF
$+431 | 74 40 | je client.7FFDE497B643
$+433 | 4C:8B05 D6F39502 | mov r8,qword ptr ds:[7FFDE72DA9E0]
$+43A | 4D:85C0 | test r8,r8
$+43D | 74 34 | je client.7FFDE497B643
$+43F | 83F9 FE | cmp ecx,FFFFFFFE
$+442 | 74 2F | je client.7FFDE497B643
$+444 | 8BC1 | mov eax,ecx
$+446 | 25 FF7F0000 | and eax,7FFF
$+44B | 8BD0 | mov edx,eax
$+44D | 48:C1E8 09 | shr rax,9
$+451 | 4D:8B0CC0 | mov r9,qword ptr ds:[r8+rax*8]
$+455 | 4D:85C9 | test r9,r9
$+458 | 74 19 | je client.7FFDE497B643
$+45A | 81E2 FF010000 | and edx,1FF
$+460 | 48:6BC2 78 | imul rax,rdx,78
$+464 | 49:03C1 | add rax,r9
$+467 | 74 0A | je client.7FFDE497B643
$+469 | 3948 10 | cmp dword ptr ds:[rax+10],ecx
$+46C | 75 05 | jne client.7FFDE497B643
$+46E | 48:8B08 | mov rcx,qword ptr ds:[rax]
$+471 | EB 03 | jmp client.7FFDE497B646
$+473 | 49:8BCD | mov rcx,r13
$+476 | 4C:8D0D 53687B02 | lea r9,qword ptr ds:[7FFDE7131EA0]
$+47D | 44:896C24 20 | mov dword ptr ss:[rsp+20],r13d
$+482 | 4C:8D05 1F0D8102 | lea r8,qword ptr ds:[7FFDE718C378]
$+489 | 33D2 | xor edx,edx
$+48B | E8 BC1F9C00 | call client.7FFDE533D61C
$+490 | 48:8BF8 | mov rdi,rax
$+493 | 48:85C0 | test rax,rax
$+496 | 0F84 8D000000 | je client.7FFDE497B6F9
$+49C | 48:8BCF | mov rcx,rdi
$+49F | 48:8B00 | mov rax,qword ptr ds:[rax]
$+4A2 | 4C:8B80 08070000 | mov r8,qword ptr ds:[rax+708]
$+4A9 | 45:38AF 21010000 | cmp byte ptr ds:[r15+121],r13b
$+4B0 | 74 53 | je client.7FFDE497B6D5
$+4B2 | 33D2 | xor edx,edx
$+4B4 | 41:FFD0 | call r8
$+4B7 | 4C:8BC0 | mov r8,rax
$+4BA | 48:8D15 77F5BB01 | lea rdx,qword ptr ds:[7FFDE653AC08] | 00007FFDE653AC08:"%s_secondary"
$+4C1 | 48:8D4D 80 | lea rcx,qword ptr ss:[rbp-80]
$+4C5 | E8 2695E4FD | call client.7FFDE27C4BC0
$+4CA | 8B48 04 | mov ecx,dword ptr ds:[rax+4]
$+4CD | 0FBAE1 1E | bt ecx,1E
$+4D1 | 73 06 | jae client.7FFDE497B6A9
$+4D3 | 48:8D50 08 | lea rdx,qword ptr ds:[rax+8]
$+4D7 | EB 11 | jmp client.7FFDE497B6BA
$+4D9 | F7C1 FFFFFF3F | test ecx,3FFFFFFFF
$+4DF | 76 06 | jbe client.7FFDE497B6B7
$+4E1 | 48:8B50 08 | mov rdx,qword ptr ds:[rax+8]
$+4E5 | EB 03 | jmp client.7FFDE497B6BA
$+4E7 | 49:8BD4 | mov rdx,r12
$+4EA | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+4F1 | FF15 C14EA800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+4F7 | 33D2 | xor edx,edx
$+4F9 | 48:8D4D 80 | lea rcx,qword ptr ss:[rbp-80]
$+4FD | FF15 FD4DA800 | call qword ptr ds:[<&public: void __cdecl CBufferString::Purge(int)>]
$+503 | EB 15 | jmp client.7FFDE497B6EA
$+505 | B2 01 | mov dl,1
$+507 | 41:FFD0 | call r8
$+50A | 48:8BD0 | mov rdx,rax
$+50D | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+514 | FF15 9E4EA800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+51A | 48:8B07 | mov rax,qword ptr ds:[rdi]
$+51D | 48:8BCF | mov rcx,rdi
$+520 | FF90 20080000 | call qword ptr ds:[rax+820]
$+526 | 0FB6D8 | movzx ebx,al
$+529 | 48:85F6 | test rsi,rsi
$+52C | 0F84 34010000 | je client.7FFDE497B836
$+532 | 4D:85F6 | test r14,r14
$+535 | 0F84 2B010000 | je client.7FFDE497B836
$+53B | 49:8B06 | mov rax,qword ptr ds:[r14]
$+53E | 48:8985 E0000000 | mov qword ptr ss:[rbp+E0],rax
$+545 | E8 363B4300 | call client.7FFDE4DAF250
$+54A | 0FB756 28 | movzx edx,word ptr ds:[rsi+28]
$+54E | 41:BA FFFF0000 | mov r10d,FFFF
$+554 | 0FBFC8 | movsx ecx,ax
$+557 | 6641:3BD2 | cmp dx,r10w
$+55B | 74 3E | je client.7FFDE497B76B
$+55D | 4C:8B4E 18 | mov r9,qword ptr ds:[rsi+18]
$+561 | 0FB7C2 | movzx eax,dx
$+564 | 4C:8D0440 | lea r8,qword ptr ds:[rax+rax*2]
$+568 | 43:3B4CC1 08 | cmp ecx,dword ptr ds:[r9+r8*8+8]
$+56D | 73 0D | jae client.7FFDE497B74C
$+56F | 6641:3BD2 | cmp dx,r10w
$+573 | 74 1D | je client.7FFDE497B762
$+575 | 43:0FB714C1 | movzx edx,word ptr ds:[r9+r8*8]
$+57A | EB 0E | jmp client.7FFDE497B75A
$+57C | 76 1D | jbe client.7FFDE497B76B
$+57E | 6641:3BD2 | cmp dx,r10w
$+582 | 74 13 | je client.7FFDE497B767
$+584 | 43:0FB754C1 02 | movzx edx,word ptr ds:[r9+r8*8+2]
$+58A | 6641:3BD2 | cmp dx,r10w
$+58E | 75 D1 | jne client.7FFDE497B731
$+590 | EB 09 | jmp client.7FFDE497B76B
$+592 | 41:8BD2 | mov edx,r10d
$+595 | EB 04 | jmp client.7FFDE497B76B
$+597 | 41:0FB7D2 | movzx edx,r10w
$+59B | 48:6346 20 | movsxd rax,dword ptr ds:[rsi+20]
$+59F | 44:0FB7C2 | movzx r8d,dx
$+5A3 | 4C:3BC0 | cmp r8,rax
$+5A6 | 0F8D BA000000 | jge client.7FFDE497B836
$+5AC | 66:3B56 2E | cmp dx,word ptr ds:[rsi+2E]
$+5B0 | 0F87 B0000000 | ja client.7FFDE497B836
$+5B6 | 6641:3BD2 | cmp dx,r10w
$+5BA | 0F84 A6000000 | je client.7FFDE497B836
$+5C0 | 48:8B46 18 | mov rax,qword ptr ds:[rsi+18]
$+5C4 | 4F:8D2C40 | lea r13,qword ptr ds:[r8+r8*2]
$+5C8 | 6642:3914E8 | cmp word ptr ds:[rax+r13*8],dx
$+5CD | 0F84 90000000 | je client.7FFDE497B833
$+5D3 | 4E:8B6CE8 10 | mov r13,qword ptr ds:[rax+r13*8+10]
$+5D8 | 4D:85ED | test r13,r13
$+5DB | 0F84 82000000 | je client.7FFDE497B833
$+5E1 | 41:8B45 00 | mov eax,dword ptr ds:[r13]
$+5E5 | 33D2 | xor edx,edx
$+5E7 | 8BF2 | mov esi,edx
$+5E9 | 85C0 | test eax,eax
$+5EB | 7E 76 | jle client.7FFDE497B833
$+5ED | 8BFA | mov edi,edx
$+5EF | 90 | nop
$+5F0 | 48:85FF | test rdi,rdi
$+5F3 | 78 25 | js client.7FFDE497B7EA
$+5F5 | 3BF0 | cmp esi,eax
$+5F7 | 7D 21 | jge client.7FFDE497B7EA
$+5F9 | 49:8B45 08 | mov rax,qword ptr ds:[r13+8]
$+5FD | 4C:8B34F8 | mov r14,qword ptr ds:[rax+rdi*8]
$+601 | 4D:85F6 | test r14,r14
$+604 | 74 14 | je client.7FFDE497B7EA
$+606 | 49:8B06 | mov rax,qword ptr ds:[r14]
$+609 | 49:8BCE | mov rcx,r14
$+60C | 48:8B95 E0000000 | mov rdx,qword ptr ss:[rbp+E0]
$+613 | FF50 28 | call qword ptr ds:[rax+28]
$+616 | 84C0 | test al,al
$+618 | 75 0F | jne client.7FFDE497B7F9
$+61A | 41:8B45 00 | mov eax,dword ptr ds:[r13]
$+61E | FFC6 | inc esi
$+620 | 48:FFC7 | inc rdi
$+623 | 3BF0 | cmp esi,eax
$+625 | 7C C9 | jl client.7FFDE497B7C0
$+627 | EB 33 | jmp client.7FFDE497B82C
$+629 | 49:8B46 10 | mov rax,qword ptr ds:[r14+10]
$+62D | 48:8D15 F6DAAB00 | lea rdx,qword ptr ds:[7FFDE54392FA]
$+634 | 48:85C0 | test rax,rax
$+637 | 48:8D8D D8000000 | lea rcx,qword ptr ss:[rbp+D8]
$+63E | 48:0F45D0 | cmovne rdx,rax
$+642 | FF15 704DA800 | call qword ptr ds:[<&public: void __cdecl CUtlString::Set(char const *
$+648 | 49:8B4F 08 | mov rcx,qword ptr ds:[r15+8]
$+64C | 0FB715 1549C502 | movzx edx,word ptr ds:[7FFDE75D0138]
$+653 | 48:8B01 | mov rax,qword ptr ds:[rcx]
$+656 | FF90 48040000 | call qword ptr ds:[rax+448]
$+65C | 4C:8D25 C7DAAB00 | lea r12,qword ptr ds:[7FFDE54392FA]
$+663 | 45:33ED | xor r13d,r13d
$+666 | 48:8D95 D8000000 | lea rdx,qword ptr ss:[rbp+D8]
$+66D | 49:8D8F F0000000 | lea rcx,qword ptr ds:[r15+F0]
$+674 | FF15 2E51A800 | call qword ptr ds:[<&public: bool __cdecl CUtlString::operator==(class
$+67A | 84C0 | test al,al
$+67C | 0F85 1D020000 | jne client.7FFDE497BA6F
$+682 | 49:8B87 F8000000 | mov rax,qword ptr ds:[r15+F8]
$+689 | 49:8BFD | mov rdi,r13
$+68C | 48:85C0 | test rax,rax
$+68F | 74 0A | je client.7FFDE497B86B
$+691 | 8038 00 | cmp byte ptr ds:[rax],0
$+694 | 74 05 | je client.7FFDE497B86B
$+696 | 48:8BF8 | mov rdi,rax
$+699 | EB 3C | jmp client.7FFDE497B8A7
$+69B | 49:8B8F E0000000 | mov rcx,qword ptr ds:[r15+E0]
$+6A2 | 48:85C9 | test rcx,rcx
$+6A5 | 74 30 | je client.7FFDE497B8A7
$+6A7 | 8039 00 | cmp byte ptr ds:[rcx],0
$+6AA | 74 2B | je client.7FFDE497B8A7
$+6AC | 48:8D15 552BB001 | lea rdx,qword ptr ds:[7FFDE647E3D8] | 00007FFDE647E3D8:"special_bonus_"
$+6B3 | E8 143B9C00 | call client.7FFDE533F39C
$+6B8 | 49:8B8F E0000000 | mov rcx,qword ptr ds:[r15+E0]
$+6BF | 48:8D3D 82F3BB01 | lea rdi,qword ptr ds:[7FFDE653AC18] | 00007FFDE653AC18:"file://{images}/spellicons/attribute_bonus.png"
$+6C6 | 48:85C9 | test rcx,rcx
$+6C9 | 49:8BD4 | mov rdx,r12
$+6CC | 48:0F45D1 | cmovne rdx,rcx
$+6D0 | 48:3BC2 | cmp rax,rdx

Wow, thanks!
in ExistedGit code, I saw this piece of code:

C++:
 GETTER(DOTAAbilityDefinition_t*, GetDefinition, 0x538);
DOTAAbilityDefinition_t has a m_pszTextureName attribute. maybe it has the new_icon name? if it has, it would be simpler to do in that way
But I couldn't find GetDefinition function inside CDOTABaseAbility to check if it is the case or not.
 
Участник
Статус
Оффлайн
Регистрация
23 Май 2019
Сообщения
781
Реакции[?]
331
Поинты[?]
63K
Wow, thanks!
in ExistedGit code, I saw this piece of code:

C++:
 GETTER(DOTAAbilityDefinition_t*, GetDefinition, 0x538);
DOTAAbilityDefinition_t has a m_pszTextureName attribute. maybe it has the new_icon name? if it has, it would be simpler to do in that way
But I couldn't find GetDefinition function inside CDOTABaseAbility to check if it is the case or not.
those definitions merely reflect what's inside the scripts
check scripts\npc\heroes\npc_dota_hero_chen.txt
C++:
"chen_summon_convert"
    {
        "AbilityBehavior"                "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_NOT_LEARNABLE"
        "AbilityTextureName"            "chen_test_of_faith_teleport"
        "AbilityCooldown"                "30"
            ...
AbilityTextureName will just be "chen_test_of_faith_teleport"...
the definition itself is @ offset 0x560. it's the unexposed member right at the beginning of C_DOTABaseAbility's portion.
C++:
...
    
-----members of class C_DOTABaseAbility-----
    uint8_t[8] unaccounted(offset 0x560)
    bool m_bAuxCastState(offset 0x568, size 0x1, align 0x1)
    ...
 
Начинающий
Статус
Оффлайн
Регистрация
16 Авг 2022
Сообщения
36
Реакции[?]
4
Поинты[?]
4K
those definitions merely reflect what's inside the scripts
check scripts\npc\heroes\npc_dota_hero_chen.txt
C++:
"chen_summon_convert"
    {
        "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_NOT_LEARNABLE"
        "AbilityTextureName" "chen_test_of_faith_teleport"
        "AbilityCooldown" "30"
            ...
AbilityTextureName will just be "chen_test_of_faith_teleport"...
the definition itself is @ offset 0x560. it's the unexposed member right at the beginning of C_DOTABaseAbility's portion.
C++:
...
  
-----members of class C_DOTABaseAbility-----
    uint8_t[8] unaccounted(offset 0x560)
    bool m_bAuxCastState(offset 0x568, size 0x1, align 0x1)
    ...
Thank you.
I found out that there is a "GetAbilityTextureName" function that we can use.
C_DOTABaseAbility (index 225)

C++:
const char *__fastcall sub_18581C0(__int64 a1, unsigned int a2)
{
  __int64 v2; // rcx
  int v3; // ecx
  __int64 v4; // rax
  __int64 v5; // rax
  __int64 v6; // rdx

  if ( qword_4F51A58 )
  {
    v2 = *(int *)(qword_4F51A58 + 124);
    v3 = (unsigned int)v2 > 0xC ? 0 : dword_4A50548[v2];
    if ( v3 > dword_4A50550 && ((*(_DWORD *)(qword_4F51A58 + 228) - 15) & 0xFFFFFFFB) != 0 )
      return Str1;
  }
  v4 = sub_13CE3E0(a2);
  if ( !v4 )
    return Str1;
  v5 = _RTDynamicCast(v4, 0i64, &C_BaseEntity `RTTI Type Descriptor', &C_DOTABaseAbility `RTTI Type Descriptor', 0);
  if ( !v5 )
    return Str1;
  LOBYTE(v6) = 1;
  return (const char *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 1800i64))(v5, v6);
}
 
Сверху Снизу