a question about charm zone

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
User avatar
huohuowu2
Junior Member
Paladin
Posts: 145
Joined: Sat Feb 28, 2015 4:20 am
China

a question about charm zone

Post by huohuowu2 » Tue Jun 25, 2019 2:52 pm

Hello, everybody.
I succeeded in making a charm zone.
But it's not that perfect.
Equipment can still be placed in this charm zone.
I just want this charm zone to have only charms. What can I do?

User avatar
weapon-x
Forum Legend
Arch-Angel
Posts: 1047
Joined: Wed Mar 18, 2009 4:52 am
Location: Mindanao, Philippines
Contact:
Philippines

Re: a question about charm zone

Post by weapon-x » Thu Jul 04, 2019 4:32 am

necro posting:

well just compare the zone with item-types
" It's not the size of the dog in the fight, it's the size of the fight in the dog. "

~Mark Twain

User avatar
huohuowu2
Junior Member
Paladin
Posts: 145
Joined: Sat Feb 28, 2015 4:20 am
China

Re: a question about charm zone

Post by huohuowu2 » Sat Jul 06, 2019 12:30 am

weapon-x wrote:
Thu Jul 04, 2019 4:32 am
necro posting:

well just compare the zone with item-types

Code: Select all

CPU Disasm
Address   Hex dump          Command                                  Comments
6F65FE70  /$  56            PUSH ESI                                 ; D2Common.#10840(guessed Arg1,Arg2)
6F65FE71  |.  8B7424 08     MOV ESI,DWORD PTR SS:[ARG.1]             ; pItem
6F65FE75  |.  85F6          TEST ESI,ESI
6F65FE77  |.  74 32         JZ SHORT 6F65FEAB
6F65FE79  |.  8B0E          MOV ECX,DWORD PTR DS:[ESI]               ; pItem->eType
6F65FE7B  |.  83F9 04       CMP ECX,4                                ; eType == ITEM
6F65FE7E  |.  75 31         JNE SHORT 6F65FEB1
6F65FE80  |.  8B46 14       MOV EAX,DWORD PTR DS:[ESI+14]            ; pitem->pItemData
6F65FE83  |.  85C0          TEST EAX,EAX
6F65FE85  |.  74 0C         JZ SHORT 6F65FE93
6F65FE87  |.  8B40 18       MOV EAX,DWORD PTR DS:[EAX+18]            ; pItemData->Flags
6F65FE8A  |.  25 00010000   AND EAX,00000100                         ; 0x100 == ITEMFLAG_BROKEN
6F65FE8F  |.  85C0          TEST EAX,EAX
6F65FE91  |.  75 18         JNZ SHORT 6F65FEAB
6F65FE93  |>  83F9 04       CMP ECX,4                                ; eType == ITEM
6F65FE96  |.  75 19         JNE SHORT 6F65FEB1
6F65FE98  |.  8B46 14       MOV EAX,DWORD PTR DS:[ESI+14]            ; pItem->pItemData
6F65FE9B  |.  85C0          TEST EAX,EAX
6F65FE9D  |.  74 12         JZ SHORT 6F65FEB1
6F65FE9F  |.  8B40 18       MOV EAX,DWORD PTR DS:[EAX+18]            ; pItemData->Flags
6F65FEA2  |.  25 00400000   AND EAX,00004000                         ; 0x4000 == ITEMFLAG_NOEQUIP
6F65FEA7  |.  85C0          TEST EAX,EAX
6F65FEA9  |.  74 06         JZ SHORT 6F65FEB1
6F65FEAB  |>  33C0          XOR EAX,EAX                              ; return FALSE
6F65FEAD  |.  5E            POP ESI
6F65FEAE  |.  C2 0800       RETN 8
6F65FEB1  |>  6A 0D         PUSH 0D                                  ; /Arg2 = 0D, 0xD == ITEMTYPE_CHARM
6F65FEB3  |.  56            PUSH ESI                                 ; |Arg1 => [ARG.1], pItem
6F65FEB4  |.  E8 27DEFFFF   CALL #10731                              ; \D2Common.#10731, IsItemOfItemType
6F65FEB9  |.  85C0          TEST EAX,EAX
6F65FEBB  |.  75 04         JNZ SHORT 6F65FEC1
6F65FEBD  |.  5E            POP ESI                                  ; return FALSE if item is no charm
6F65FEBE  |.  C2 0800       RETN 8
6F65FEC1  |>  833E 04       CMP DWORD PTR DS:[ESI],4                 ; pItem->eType == ITEM
6F65FEC4  |.  75 0E         JNE SHORT 6F65FED4
6F65FEC6  |.  8B46 14       MOV EAX,DWORD PTR DS:[ESI+14]            ; pItem->pItemData
6F65FEC9  |.  85C0          TEST EAX,EAX
6F65FECB  |.  74 07         JZ SHORT 6F65FED4
6F65FECD  |.  8A48 45       MOV CL,BYTE PTR DS:[EAX+45]              ; pItemData->InvPage
6F65FED0  |.  84C9          TEST CL,CL                               ; InvPage == 0 (0x0 == INVPAGE_INVENTORY)
6F65FED2  |.  74 06         JZ SHORT 6F65FEDA
6F65FED4  |>  33C0          XOR EAX,EAX                              ; return FALSE
6F65FED6  |.  5E            POP ESI
6F65FED7  |.  C2 0800       RETN 8
6F65FEDA  |>  8B4424 0C     MOV EAX,DWORD PTR SS:[ARG.2]             ; pUnit
6F65FEDE  |.  6A 00         PUSH 0                                   ; /Arg6 = 0, pbLvl
6F65FEE0  |.  6A 00         PUSH 0                                   ; |Arg5 = 0, pbDex
6F65FEE2  |.  6A 00         PUSH 0                                   ; |Arg4 = 0, pbStr
6F65FEE4  |.  6A 00         PUSH 0                                   ; |Arg3 = 0, bEquip
6F65FEE6  |.  50            PUSH EAX                                 ; |Arg2 => [ARG.2], pUnit
6F65FEE7  |.  56            PUSH ESI                                 ; |Arg1 => [ARG.1], pItem
6F65FEE8  |.  E8 5398FFFF   CALL #10756                              ; \D2Common.#10756, CheckItemRequirements
6F65FEED  |.  F7D8          NEG EAX                                  ; converts whether the reqs are met to TRUE or FALSE
6F65FEEF  |.  1BC0          SBB EAX,EAX
6F65FEF1  |.  5E            POP ESI
6F65FEF2  |.  F7D8          NEG EAX
6F65FEF4  \.  C2 0800       RETN 8
6F65FEF7      90            NOP
6F65FEF8      90            NOP
---------------------------------------------
how to compare the zone with item-types?
I have no idea about this problem.

Post Reply

Return to “Code Editing”