|
转载6 w! h$ X1 v2 e9 _& }# G* Q8 a3 g
自动合成的逻辑过于复杂就不给出了主要就是利用以下汇编点:
" M. [+ d+ p% PD2Client:
- m" o8 ?- x3 d6FB20AE1为拦截输入框(用于获得命令)
+ t- g/ C" u$ d6FB5E11C为客户端获得0x9C 0x04数据包位置 也就是进入储存的触发$ z$ W! }) K1 X ~6 K0 B
6FB5E8D0为客户端获得0x9D 0x05数据包的位置 也是从储存中提起的触发
0 ?) X+ x6 h1 N' A+ _. W* a" d6FAF4230为hackmap的loop点 我用的hackmap导出位置
, n3 u# t( R- g. O5 ?7 V
+ B" S: r: g% d. E
. {& V& p; @$ s- k) {: m发包函数:/ W, N9 i/ f, P! @# C/ P) B8 T# n
class D2PKT_ITEM
$ w; |# e% D2 Y+ p3 B* ^{: f+ E! V; A5 u7 A# X% a
#define ITEM_ACTION_NEW_GROUND 0x00 //9c//新产生在地上 地上) y$ i0 [/ X) G$ x
#define ITEM_ACTION_PICK_UP 0x01 //9c//拾取 多
! d, H( D/ t* L1 i# x2 b/ M3 r9 Z#define ITEM_ACTION_DROP 0x02 //9c//丢弃 地上5 U3 @& \; N1 i5 ?' t; Q2 j9 P/ v
#define ITEM_ACTION_OLD_GROUND 0x03 //9c//旧的地上 地上
0 N6 d2 ]+ N8 V2 b' e#define ITEM_ACTION_TO_STORAGE 0x04 //9c //到储存 STASH
: l* ]1 {8 k0 z0 K. D#define ITEM_ACTION_FROM_STORAGE 0x05 //9d 从储存 手上3 v/ s# M/ R M! [
#define ITEM_ACTION_TO_EQUIP 0x06 //9d 装备 装备栏
) x& }. \2 J7 `8 Y1 ]9 L3 |#define ITEM_ACTION_FROM_EQUIP 0x08 //9d 从装备 手上
9 V0 z1 U7 P' ], {#define ITEM_ACTION_SWITCH_EQUIP 0x09 //9d 切装备 -9 s4 o% G4 y3 _0 f; \
#define ITEM_ACTION_TO_STORE 0x0B //9c //到商店 商店1 D; d, t2 y+ n+ V4 g& ]
#define ITEM_ACTION_FROM_STORE 0x0C //9c 从商店 INV- J. _ ?& @# U
#define ITEM_ACTION_SWITCH_STORAGE 0x0d //9c 转换储存 不知道
" t) N2 j+ m }- `% ~8 W: V( `3 O#define ITEM_ACTION_TO_BELTSLOT 0x0E //9c 去腰带 腰带& x* R6 d5 m& O, N9 |
#define ITEM_ACTION_FROM_BELTSLOT 0x0F //9c 从腰带 手上' e3 W( i1 V, B' \% h6 }* T
#define ITEM_ACTION_SWITCH_BELTSLOT 0x10 //9c 转换腰带 -
, j6 z! [. L' K#define ITEM_ACTION_TO_CURSOR 0x12 //9c 到受伤 手上
3 a6 x/ C5 j, B' A* `6 Z* o# r* X% z#define ITEM_ACTION_SHIFT_BELTSLOT 0x15 //9d 切换腰带 -* y0 E, p+ Y- y- Y0 X" z
3 j: B2 T8 e1 w) Z4 }; r
#define PacketItemMaxTick 150
/ @4 p- g+ ]$ } H" J' W#define PacketItemPickUpTick 205 K" g. }! o' r, v; ]* _5 x5 I
) C5 h9 J1 z1 g9 z
private:
. ^6 e. p6 o% A/ X2 e8 J static DWORD _PKTItemTick;) c3 V( j3 I# Q3 A# x6 k7 R
static DWORD _PKTItemAction;1 M# z* G. L( s, @! [. n4 y! M
static DWORD _PKTItemID;* c6 w0 v% j2 H/ r2 G
static BYTE _PKTPKTType;
: y3 E5 f! C; D# ipublic:( D- L5 Z/ F# q
static DWORD PKTItemGetTick() { return _PKTItemTick; }7 g% Z4 t/ e( O- ^$ j# W5 @
. `8 U& g9 e( C) {; I
static void PKTItemRelease()
2 `, l9 J5 m- w) U8 Y" E {
- x4 z7 m# ~0 w( k _PKTItemTick = 0;
, n6 S" J f6 g" _8 d) _+ A" d6 d; z _PKTItemAction = 0;# M1 G: y' ?$ H# f3 Y' k
_PKTItemID = 0;. p& k2 `) ^3 E9 K; P/ T
_PKTPKTType = 0;
7 y6 N0 P# h5 R9 h7 D" r% A }( x& C; x4 q& G) E7 z; O' Y: t
6 E0 }9 d: S% Z$ ?3 r9 Z$ B' R static void PKTItemTellW8(BYTE aPacket0, DWORD dwItemID, DWORD ItemAction, DWORD tick) * S4 A0 B2 a9 D
{
7 d# f! |* r1 R" Q& U) B% {6 T! w _PKTPKTType = aPacket0;
" {; E2 `, Y" t# l _PKTItemTick = tick; @: B. @' y! i: n1 a
_PKTItemAction = ItemAction;* q, _0 }% G/ T3 ~. V
_PKTItemID = dwItemID; v2 |4 v# W5 g' X& f3 Z
}
1 Q' n$ R6 w- R7 L9 D# d% O" U8 W/ b, g2 B
static void PKTItemTellW8(DWORD tick): U0 o: Q. X# A a5 X: X- u
{
( } c" Q5 s$ V- o _PKTItemTick = tick;6 _8 \) ~; f, j1 j/ n
}& m: f& L, w6 E: U
' b u2 t) k, I- D- d: T) q$ G
static void PKTItem9C04(BYTE* aPacket, DWORD aLength,UnitAny* pPlayer)//picktocursor! g/ v" z2 {: f2 r. k% V9 k+ A
{5 B# L* d& W3 ]
if (aLength >= 8)
6 G6 g, t. `5 S& \; u% K. s& ~ {3 o& v# r6 ]5 b/ Q
DWORD dwItemId = 0;
) _2 y4 {0 b. F+ C' T6 J. [& x memcpy(&dwItemId, aPacket + 4, sizeof(DWORD));1 C) j0 `; }, g2 X
if (aPacket[0] == PACKET_NEWITEM && aPacket[1] == ITEM_ACTION_TO_STORAGE& W1 G5 a9 o$ v* ^9 [ r; k
&& _PKTItemAction == ITEM_ACTION_TO_STORAGE
6 Q( ?) p; P5 V0 z. { && _PKTPKTType == PACKET_NEWITEM) C% g( z0 i) A
)
! }) a- F, g( W* ]+ x2 t6 @ {
# u5 R9 V! S6 [# \8 y6 l if (_PKTItemID == 0 && _PKTItemTick), A& [3 H+ N' ?2 q9 ]" P0 y
{) w+ t& e" O( ]: c9 N. a0 ]
PKTItemRelease();
; X" o2 l& a9 R9 `) d% d }
! ^, B5 S: l1 y" R; C0 O else if(_PKTItemID== dwItemId&& _PKTItemTick)8 g2 A- O7 \7 n9 t3 O$ F1 ]; } k- U
{+ i' u5 r( z T6 q) x
PKTItemRelease();
9 p/ K& f; b" ^# D/ T }* [# ?, z! v' _9 L: Z; A7 \; j, x
}- g+ c( e1 f' o/ I
! p1 P* E" d9 Y+ }) X: O }
. C3 ?/ J5 b6 z3 |/ x6 r }0 N5 o1 M% D# a' d
; P* ?# ?, p3 A/ G0 O
static void PKTItem9D05(BYTE* aPacket, DWORD aLength, UnitAny* pPlayer)//To Stored
( K+ j6 D( ^8 o: J. b9 ` {1 A5 o! f$ V1 w: ]7 |
if (aLength >= 8)- _- k+ Y/ |; w
{
- Y4 y# r2 v& ^& J0 F% _ DWORD dwItemId = 0;4 V( G! v0 }4 t5 ]
memcpy(&dwItemId, aPacket + 4, sizeof(DWORD));
( v1 L0 E' C/ D K& }% ?( h if (aPacket[0] == PACKET_ITEMACTION && aPacket[1] == ITEM_ACTION_FROM_STORAGE
7 L+ k/ w( m7 I; s) i% N1 T/ R+ R && _PKTItemAction == ITEM_ACTION_FROM_STORAGE
7 U& Q4 B& n9 f7 `3 x1 s Y && _PKTPKTType == PACKET_ITEMACTION
& R2 K6 a7 G0 ^$ X" J) m )
. B) v8 m' [& g" g o {
0 L3 B' G- P4 l8 ?8 O6 d3 |, t# k if (dwItemId == 0 && _PKTItemTick)- A, W3 h. M; ?( w' G
{. {) W! e4 }% M$ ]1 K+ M
PKTItemRelease();+ ]% y* n1 |7 T! Q
}
& g$ D8 }& ]$ G9 J6 U4 D9 {2 n3 H else if (dwItemId == _PKTItemID && _PKTItemTick)
1 x M# w. @% |0 b4 @7 S- S& B" u+ Q {3 J6 G) ^1 N. V# T$ }2 @
PKTItemRelease();
1 I& m0 x; r$ r }6 Z: u" K/ o' M6 ~. S' b4 K3 ?
}, \6 p: O1 i% Z: x3 B$ X Q, a
% `9 {4 E% D" h* L. i# ~& [
}
4 W: e' h! w, s% V8 ?% b+ f }1 `2 R/ L A2 U; ~ e, J
+ j ^/ E9 h4 u2 K8 V static void PKTItemGameLoop()
5 k$ D$ I3 k7 m {
4 l$ L4 h2 m0 W7 ^: \- n! W if (_PKTItemTick > 0)
6 Z# O0 }1 n1 n. z2 h% V( c _PKTItemTick--;
/ @# H7 b$ X0 { }4 A else if (_PKTItemTick == 0)
2 A; }' h/ ]/ ]3 j PKTItemRelease();
2 S d5 L: J7 E }
# d5 {. \ d6 `, f7 d; N, N$ O
1 [0 f0 h% \* s static BOOL PKTItemCando() % K" |) f/ D1 F! |0 f) y+ V
{& F* M# q1 U6 Q1 w3 A& k3 `2 K
if (_PKTItemTick == 0)return TRUE;
* x, o8 f, a7 f7 K1 H4 E) i, d return FALSE;; I! t+ f; n& W& P
}
9 Z3 J- }4 E! l, z' f" J+ N! J
" Q8 Y- b8 `# i6 ]/ v' n p static BOOL BuyItem(DWORD ItemID, DWORD npcid)* C9 {6 q* E) Y3 _5 v/ }3 u. J% \
{
9 p1 S, H- r& p$ D) r* U, t PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);! t6 h, v: I+ @9 ]0 ^, ~
BYTE aPacket[17] = { 0 };
: [) M- g# Y. k; F$ T+ m aPacket[0] = 0x32;
' o& E3 e" S. G7 T' s' d ::memcpy(&aPacket[1], &npcid, 4);1 q1 S i4 b1 k; H
::memcpy(&aPacket[5], &ItemID, 4);" k: C( E% U5 j
//return D2Net::D2NetSendPacketToServer(0, aPacket, 17);
& i' b7 r1 R+ ? D2Net::D2SendToServer(17, 0, aPacket);3 U5 g% i( n. G7 O. b# N7 Q& x
return TRUE;
% C+ C; D+ v0 j }
& P' Y# g$ B2 z& I- a: D' E& F; G- T# b( W& E$ c7 x: k1 [
static BOOL SellItem(DWORD ItemID, DWORD npcid)/ T1 e6 U* c" a- w3 v+ w
{ A0 Y' N0 V \0 [; |% |% P& h: N- f
PKTItemTellW8(PACKET_ITEMACTION, 0, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);$ o$ d2 @. u5 d! s% ]1 }3 e3 Y5 n
BYTE aPacket[17] = { 0 };
3 {& ^" _) ]# [- v: q* P* A aPacket[0] = 0x33;3 b; l* J3 ^2 U/ c* Y1 y
::memcpy(&aPacket[1], &npcid, 4);
% {. m8 t6 U! o% ?+ j% m- T. { ::memcpy(&aPacket[5], &ItemID, 4);
+ ^# i! s$ r. [7 G( l$ {3 }7 @ //return D2Net::D2NetSendPacketToServer(0, aPacket, 17);5 ~; w+ F* z, R( @
D2Net::D2SendToServer(17, 0, aPacket);7 I8 I8 h. t' x' B' d' {# Y+ M" S6 ?
return TRUE;
) A1 e3 v& K& e4 | }
' g7 J" J! Z, K; _9 g/ l) S2 i* G2 S& c
static BOOL Interact(DWORD nUnitId, DWORD nUnitType);
: l I% q3 h Z$ x) Y- W& `
1 X. J9 w @6 Q! [( H" c# ~5 | static BOOL PickGroundItem(UnitAny* pItem, BOOL bShowClientMove, BOOL bToCursor);
5 h2 a& Z, d8 @5 f$ o4 |5 U: c' ]7 M+ D# J( e2 Y9 j: [/ |- _
static BOOL OpenCube(); E8 V1 {' _" D) L$ j& H1 B6 U
{
0 {- i8 f( R4 t4 R- B( \ if (D2Client::D2GetUIToggle(UIVAR_CUBE))return TRUE;5 z- r2 u" c/ U, p
/ ^6 D C+ S$ c% G& I& J
UnitAny* pCube = CountStorageItems(LOC_INV, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);! C6 n( ` d" C3 {
if (!pCube)
- u" W+ ^# @! B {0 f* g+ @# {6 q& P
pCube = CountStorageItems(lOC_STASH, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);
+ g& @8 l* \- M* B if (!pCube)6 _ O6 u$ W3 ]; T2 C4 {5 H+ B$ m/ s
return FALSE;5 ?1 `; h. `# k
}0 y( W7 c7 o$ Q7 Y
PKTItemTellW8(PacketItemMaxTick);7 Y7 \' }# O; W* c4 H8 O- J7 Z
) ~2 }4 t/ W9 [, D7 T& H D2CoordStrc mypst = { NULL };
2 `, U, W$ r2 n- t D2Common::D2GetUnitXY(*D2Client::ptPlayerClient, &mypst);6 k' [& [4 `" B+ o1 w7 g: R
' p/ |, L# c! K$ Y
BYTE aPacket[13] = { 0x20,0 };7 y; V7 p# |+ ~: {4 K# K
::memcpy(aPacket + 1, &pCube->nItemNum, 4);
* {" f2 R9 f4 k. L ::memcpy(aPacket + 5, &(mypst.nX), 4);. k3 s0 O( e; R. {5 a! K. f
::memcpy(aPacket + 9, &(mypst.nY), 4);$ w# w2 a* t/ p% q) A1 ?
D2Net::D2SendToServer(13, 0, aPacket);. M0 C" _* N6 m( s# ]
return TRUE;- c# b; T& i& e
}
! M0 {1 s4 Y: Y' k
1 U" T) Z/ T" b- L2 v% R static BOOL ToInvxy(DWORD x, DWORD y). q3 \* O; l% H7 w/ }" t
{
) h' b* E! k0 { UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);1 n% _4 x7 e4 ?1 _1 F: d; P; ^
! p8 C6 F7 V1 Q9 r, ^/ V5 w! ?
if (phand == NULL)* a; j' p2 P: D' ^5 i/ a' N
return FALSE;
9 O# o$ o6 ?1 Y5 Q+ a
! B) E9 O! |3 ^; _ PKTItemTellW8(PACKET_NEWITEM, phand->nUnitId, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);
0 E2 ~* K5 n% |( A m
& ?+ F6 p6 _, O) z* h7 i* s5 ~) s BYTE aPacket[17] = { 0x18,0 };8 p! L+ I5 p s4 a
::memcpy(aPacket + 1, &phand->nItemNum, 4);. T. P# c7 T6 `7 R# k4 S3 \3 `
::memcpy(aPacket + 5, &x, 4);$ r9 f1 v- S- U8 Z
::memcpy(aPacket + 9, &y, 4);3 S4 P: V; o8 L: i& F/ s2 f
D2Net::D2SendToServer(17, 0, aPacket);
6 ?+ a( M0 j0 J9 c o return TRUE;3 }; k0 [; o3 Y' O+ G: v/ m
}
( o8 M' i( v' K& r4 b! {' ?' g; A3 p e. C
static BOOL ToInvRandom(BOOL bBagFix = FALSE) " s! Q C3 M4 P
{: H9 G$ \$ p2 m$ `1 O
UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);+ i5 {2 S4 r2 h
if (!phand)
% S, p7 F' X# W9 ]% I4 r# _( o* K return FALSE;( Z6 m# ~' E6 J4 t9 c' T/ v
int desx = 0;0 V) P4 ^" R2 I4 G, E: `) |
int desy = 0;
) F; {% ]4 \8 V1 l( k7 S if (GetTheFirstStoragePlace(LOC_INV, phand->dwTxtFileNo, &desx, &desy, bBagFix))& A0 D4 i) s( j: r9 _ N3 k9 m
{4 B# R; N+ |7 m5 f
ToInvxy(desx, desy); g; X8 u) m& Q" o
return TRUE;
* e* i" J6 a+ C$ N }" ?) _5 m" K) b4 o; [7 o% V6 c
return FALSE;# J4 Y/ w& N( m' ]8 Y/ D
}7 a$ P8 K5 z# T" w9 I
: b0 B. K( F; n7 K$ W; } static BOOL ToCube()
7 a$ A% j9 ~' ^4 j& t! S, t J {
: ~0 s# n) W' N+ {& Y5 A$ t: |% H1 C if (!(*D2Client::ptPlayerClient))return FALSE;
7 J5 z. {3 p9 H# o* j7 K0 n( z1 |7 L( K' X- |) H
UnitAny* phand=D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);9 |% L! i) m% G' z* y9 m0 ~
if (!phand)return FALSE;
! j) P6 `: h8 e5 [7 F
; C9 N5 A2 G b6 x* ]+ ? UnitAny* pCube = CountStorageItems(LOC_INV, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);//枚举身上的方块
" B6 X; G( t/ b# u/ S if (!pCube): k! J# D" _2 z
{
9 ?5 l3 l( J! i: R9 Q7 N, A2 R- l& C pCube = CountStorageItems(lOC_STASH, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);//枚举仓库里的方块" c c; Y4 O) @" j9 A* z
if (!pCube || !pCube->nItemNum)
& g/ R* w+ W) u return FALSE;
4 m* z: F7 a$ f$ n6 j# h& v) j }' Q, [8 B! j" k; s( \8 O0 C
) k2 }$ d/ r: R" K1 C8 @2 Z& M if (!IsStorageCanStore(LOC_CUBE, phand->dwTxtFileNo, FALSE))1 i6 |3 U/ I2 M# w1 {7 d9 O
return FALSE;0 A& h# s m+ w5 ?5 H
7 f+ ]4 y. Y$ w% w k: u9 K1 T$ O PKTItemTellW8(PACKET_NEWITEM, phand->nItemNum, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);. r) C+ S( Q+ B6 i2 J& v' d
# u5 d' o% U+ i" ], R) m2 d
BYTE aPacket[9] = { 0x2A,0 };! \0 p4 @* r1 J, x$ Q# ?( Y
::memcpy(aPacket + 1, &phand->nItemNum, 4);
3 g8 B9 F% c% k3 a: L% o/ ` ::memcpy(aPacket + 5, &pCube->nItemNum, 4);
1 c7 S( A; Y1 J# l$ `* L# d3 z' \1 U D2Net::D2SendToServer(9, 0, aPacket);
) j* B! n9 ~* p7 y" K9 b) m' x return TRUE;% T$ x9 l# j& d
: z: @. s" H! m+ E8 _6 e O, q
}
6 {1 \5 T; L4 b
2 Q9 c- m5 S/ K2 E* M( m6 }. b: e static BOOL ToCube(DWORD dwhandID, DWORD dwtxtno);7 Y4 K# Y+ l: w1 C$ u4 Z
; g4 ~, H8 }! V+ O, K% v9 N
static BOOL RCBag(DWORD dwItemID)//使用之前一定要检查能不能储存
: H3 d" F% Y( O, Q8 A/ I {
( y; b* P9 B- I( [- S, p. v2 X D2CoordStrc mypst = { NULL };! P+ L! q8 ~3 \" x; z3 z
D2Common::D2GetUnitXY(*D2Client::ptPlayerClient, &mypst);
" r/ p! [& L1 H7 g# s$ p: _3 O6 T4 Z% n/ |6 J0 s6 t
if (!mypst.nX)return FALSE;
2 E- i }+ w) e- N$ M ( j5 w5 ]3 p+ D) H
PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);: E2 T' J4 f! g- J1 x) d
9 d$ F; W% K* h' b9 O; J" ^, k* z0 B0 @
BYTE aPacket[13] = { 0x20,0 };
8 o& M8 V: {/ W- j/ Q1 G& U ::memcpy(aPacket + 1, &dwItemID, 4);
* ^9 P9 N1 N4 x ::memcpy(aPacket + 5, &mypst.nX, 4);
5 d( u7 R# ~4 s ::memcpy(aPacket + 9, &mypst.nY, 4);$ Q/ V7 o. o' v: w6 O8 H5 I
//return D2Net::D2NetSendPacketToServer(0, aPacket, 13);' a& N$ Y& c Y0 X/ [3 j
D2Net::D2SendToServer(13, 0, aPacket);* y: I0 g, e$ W" \: z# Q
return TRUE;
8 @3 d) A& d- k8 `! c0 i }$ O8 z, n0 `) c( N& z2 L: Q+ Y
' U7 ?5 C' p, J3 ? static BOOL DropCursorItemToGround(): U" a% _! Z, q, [
{
& t6 n# B0 W: D UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);
$ W$ }* n4 @* m6 B) \8 L if (!phand)' D3 ?$ K- v% U6 V7 y3 j2 A Y8 F
return FALSE;
! v) Q$ `- f- E! x- u+ a$ k$ i1 j3 C/ Z3 H2 S! o
PKTItemTellW8(PACKET_NEWITEM, phand->nItemNum, ITEM_ACTION_DROP, PacketItemMaxTick);7 H, {( B: ~, h
. Q) p f. s, @2 ~( B( n0 N BYTE aPacket[5] = { 0x17 };" o% K* O+ q; Z
::memcpy(aPacket + 1, &phand->nItemNum, 4);
/ e. i- _) f* C) X7 m D2Net::D2SendToServer(5, 0, aPacket);
7 Q8 i, @( c2 p1 t return TRUE;
6 ^; R- B" n* X# ?; Q9 ^ Z/ {* v4 S3 l
}
! S) G1 G b5 W2 W; e4 ~
. d7 d4 g0 M- E) c+ X' L t) \1 T static BOOL PickStorageItemToCursor(DWORD dwItemID)) m1 o1 x# G- G2 E: L* m: a4 E
{
8 } i4 X& H- H PKTItemTellW8(PACKET_ITEMACTION, dwItemID, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);3 o# D$ e. o2 T H9 K
% F4 h* c# [8 D& G: g6 s( S BYTE aPacket[5] = { 0 };" t/ e+ h" ?, s T1 p! |, n7 L; M
aPacket[0] = 0x19;
* h% [+ s0 P2 m7 T2 J7 p ::memcpy(aPacket + 1, &dwItemID, 4);$ i, m* r& \! p% Z. U* E% k, K6 C
//return D2Net::D2NetSendPacketToServer(0, aPacket, 5);4 N- z0 S/ l, c( o9 q5 s/ _+ b
D2Net::D2SendToServer(5, 0, aPacket);- B8 e: M" B. F/ j, b: R
return TRUE;, P7 d! U s3 p# }
}
! l* N( }- l. i+ G9 I& t1 r8 C( p) |1 Q- _2 {9 T! i
static BOOL InteractItem(DWORD ItemID1, DWORD ItemID2)
& E: G9 g8 }$ t {5 N" H3 m4 g/ N- c
PKTItemTellW8(PACKET_ITEMACTION, ItemID1, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);
7 ?0 A/ k% t5 S& a' P( S BYTE aPacket[17] = { 0x1f,0 };
9 d8 D+ d" a6 d8 q! q2 F$ d ::memcpy(aPacket + 1, &ItemID1, 4);0 P- Z& f7 C* l _; M- P
::memcpy(aPacket + 5, &ItemID2, 4);" D4 C/ j$ {: d( u$ Z' A
//return D2Net::D2NetSendPacketToServer(0, aPacket, 17);0 L' J5 J3 @5 I. Q) L% V! K5 f) M
D2Net::D2SendToServer(17, 0, aPacket);& Q2 @8 {/ S$ r7 l
return TRUE;
; N3 i" ^6 c! w5 ~7 K }0 \6 m9 n) v" V! }$ j
1 Q) Z( x @, T- _/ s1 Q, A& a
static BOOL Transmute()/ t3 ?4 I9 [* `2 O; [) h3 U
{
6 y1 k+ O- T0 X! g! y+ E if (!(*D2Client::ptPlayerClient))return FALSE;
, G7 e! G# M0 B' j( A8 `& M+ g: M; k
if (D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory))' ]2 t; t3 P; e& P* E5 w
return FALSE;
7 B& T# s! }9 c, M+ X4 b
# H5 n. Y9 H7 G+ { PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);: T0 k* F) m* D+ O9 w
BYTE aPacket[7] = { 0 };
* m" q% |+ N) F4 n5 S6 R% R aPacket[0] = 0x4f;
* s. l! p* i& b! ?' V1 \: D aPacket[1] = 0x18;
. v0 m% X8 t( C: K D2Net::D2SendToServer(7, 0, aPacket);9 k( w* L u; y& g1 h+ F
return TRUE;' p+ j& S5 C% u7 C& I
}: _( \$ U/ _( Z. p3 R4 g
};
3 x& }* V& t7 a6 a; a0 Q" Y. _& ?9 V( r( |. Q
|
|