|
|
转载
" M% N+ j- q* N, w* T0 ^) e自动合成的逻辑过于复杂就不给出了主要就是利用以下汇编点:; Y3 X# t# ^! Z' f' k
D2Client:
6 `' B. k+ v2 \: X& s0 q2 y6FB20AE1为拦截输入框(用于获得命令)# R# t. _0 l ~' t
6FB5E11C为客户端获得0x9C 0x04数据包位置 也就是进入储存的触发 F$ u7 D( J5 ?; |
6FB5E8D0为客户端获得0x9D 0x05数据包的位置 也是从储存中提起的触发2 T$ O8 W f. k0 C
6FAF4230为hackmap的loop点 我用的hackmap导出位置
$ p, Z( H2 J+ G) t2 Z# j& R& h$ j% ~& q q& P
! T( ~8 ?: f- S( C
发包函数:
9 _' b4 n7 E( Y: M# H0 I# ?class D2PKT_ITEM
; Z! ?& Z4 u6 `" I7 |0 [{
9 ]! Z6 g& r& U4 Z) g" v, f#define ITEM_ACTION_NEW_GROUND 0x00 //9c//新产生在地上 地上
+ W' p# N5 L/ z6 b# e! X#define ITEM_ACTION_PICK_UP 0x01 //9c//拾取 多5 g. _; k- u2 m
#define ITEM_ACTION_DROP 0x02 //9c//丢弃 地上) J' |& ^: B0 X% ^+ Z- S/ H$ l
#define ITEM_ACTION_OLD_GROUND 0x03 //9c//旧的地上 地上& Z: g: s4 ~5 h+ Y7 A, W. [' }
#define ITEM_ACTION_TO_STORAGE 0x04 //9c //到储存 STASH
1 _* r( j2 n: d! q#define ITEM_ACTION_FROM_STORAGE 0x05 //9d 从储存 手上* I0 w: p8 M: K# V
#define ITEM_ACTION_TO_EQUIP 0x06 //9d 装备 装备栏
2 y( t& t0 N E! X6 Y. K, ]#define ITEM_ACTION_FROM_EQUIP 0x08 //9d 从装备 手上" U4 r' W9 v# g3 ^
#define ITEM_ACTION_SWITCH_EQUIP 0x09 //9d 切装备 -; _" _+ M& M' B5 W0 v! g8 `
#define ITEM_ACTION_TO_STORE 0x0B //9c //到商店 商店
& b p* F3 W4 {#define ITEM_ACTION_FROM_STORE 0x0C //9c 从商店 INV
# H6 _0 v2 Q. O#define ITEM_ACTION_SWITCH_STORAGE 0x0d //9c 转换储存 不知道 ) b% g$ E% A9 J2 b8 v# f
#define ITEM_ACTION_TO_BELTSLOT 0x0E //9c 去腰带 腰带
9 d% {$ p" o: j. Q- d#define ITEM_ACTION_FROM_BELTSLOT 0x0F //9c 从腰带 手上
& s3 U, ]" F6 W/ d/ M$ C#define ITEM_ACTION_SWITCH_BELTSLOT 0x10 //9c 转换腰带 -* L) S! Z* ?9 a" N+ ]
#define ITEM_ACTION_TO_CURSOR 0x12 //9c 到受伤 手上+ N5 p" l, Y& p) Q ]
#define ITEM_ACTION_SHIFT_BELTSLOT 0x15 //9d 切换腰带 -& i- N2 [7 ^$ ?
4 G! a# m2 P. J/ R8 u#define PacketItemMaxTick 150, r5 X% ]/ J, i) r/ E
#define PacketItemPickUpTick 20/ O$ W* w- Q$ O @- `
. j8 {( o V) k
private:
8 m g! \; R3 j. z X4 F" L q static DWORD _PKTItemTick;
9 r5 ? c3 Y# N& t6 N1 ^ a+ \$ z static DWORD _PKTItemAction;- R7 @! S" [5 }, r6 y5 c
static DWORD _PKTItemID;
% E& y+ ?1 {1 v static BYTE _PKTPKTType;0 b' e* d- a4 r! u. v/ R
public:
& H: W3 G8 }4 ?( a1 ]! w" z static DWORD PKTItemGetTick() { return _PKTItemTick; }
* |' [6 I' d e" [ G4 d. W
6 k! G1 B* n4 { q1 d8 d static void PKTItemRelease() - a. t: N* r8 u. N
{. G9 H1 ]4 u3 Y
_PKTItemTick = 0;& z) S6 t$ ?" N$ P# v" g* t
_PKTItemAction = 0;
9 r. Z6 w8 I5 O; b' Q _PKTItemID = 0;
+ u6 `/ r5 f0 x9 D& m _PKTPKTType = 0;$ K% u9 N" E9 H* g5 Y
}2 q$ x# R. n$ m1 Z$ F$ Q* V; b& D
' @' f' u* g$ U9 o! ~+ Z; ^9 x static void PKTItemTellW8(BYTE aPacket0, DWORD dwItemID, DWORD ItemAction, DWORD tick) . E3 I0 G3 z: {$ L/ w& j
{" @ N* u2 j, i$ u$ F' ]
_PKTPKTType = aPacket0;" _0 O: e$ j! h1 r7 R9 p6 H
_PKTItemTick = tick;
, F+ g3 w7 O2 D7 A; o4 \' E' O _PKTItemAction = ItemAction;
0 C& q1 I4 f4 p$ Y% h9 v* C _PKTItemID = dwItemID;6 k4 A! n6 L3 l1 U' j3 I
}
. D0 b7 p& ]9 U
! H2 M# g. r* z3 {1 J' O9 c static void PKTItemTellW8(DWORD tick)
0 b h, `0 w. |! r1 u' Y {
9 E+ X4 y: e, @+ { D/ o _PKTItemTick = tick;; o; E R7 j6 P
}* O/ C$ j) G, N" V1 c! u) d
- J" f' X' Z6 o static void PKTItem9C04(BYTE* aPacket, DWORD aLength,UnitAny* pPlayer)//picktocursor6 J, ]. j' @; h _; w
{7 H. r. U' Q& s( `- Z( \
if (aLength >= 8)0 A0 s& u& @( I
{ T! I6 M! q6 N& J* a8 N9 X
DWORD dwItemId = 0;
8 P# y! ~. F2 o6 x memcpy(&dwItemId, aPacket + 4, sizeof(DWORD));
% ~ C! f1 y F- ~ if (aPacket[0] == PACKET_NEWITEM && aPacket[1] == ITEM_ACTION_TO_STORAGE
& e. \ Q- e% _$ N" U# f && _PKTItemAction == ITEM_ACTION_TO_STORAGE$ ]- N7 B( k3 z% ~- ~/ s" ]( Q
&& _PKTPKTType == PACKET_NEWITEM/ h- T1 S) @ b5 S
)7 F5 v- e: q3 l8 o, ~9 p
{
1 f, ^# O$ X; J( D2 k2 V, N$ q3 j! c# |2 [ if (_PKTItemID == 0 && _PKTItemTick); }2 ^8 n, e @) p" J
{* y* L! q% J2 Q( j5 X' T% A
PKTItemRelease();, e; w! F9 I5 M
}
( }# m6 c1 M7 B. F else if(_PKTItemID== dwItemId&& _PKTItemTick)
& h! F3 z: V" n# A, G) } {
) T1 l: [$ D% N, t1 [5 V( [ PKTItemRelease();( e9 m! B! J" [( f) `% S: l
}) p, k5 ^5 T( n, V9 J {
}5 N: ^$ V! m2 l" A7 F
, J1 ^1 V5 b7 N- t }
8 D6 Q f) g* `& R; d4 _ }
f8 i) ^. h# l e( M: i8 F7 b
5 X! u# L' B* ^! |0 J+ ] I5 J static void PKTItem9D05(BYTE* aPacket, DWORD aLength, UnitAny* pPlayer)//To Stored0 {+ p& z Z% P
{* c2 |: X9 x5 ?
if (aLength >= 8)8 q) Y$ v9 ~! W
{
3 Z- I( h$ s# W' ^ DWORD dwItemId = 0;
w/ J. O9 g. X% C: ]+ B7 w memcpy(&dwItemId, aPacket + 4, sizeof(DWORD));# s* d+ b# l* G% K
if (aPacket[0] == PACKET_ITEMACTION && aPacket[1] == ITEM_ACTION_FROM_STORAGE9 M' X; o* D8 |* [
&& _PKTItemAction == ITEM_ACTION_FROM_STORAGE' Y5 [2 H/ f7 j" f
&& _PKTPKTType == PACKET_ITEMACTION( R, l/ q8 S, ~. d3 D. X
)2 J" `7 l/ |) I6 L) l
{7 ^0 g" O' K5 Z c2 I/ N. C) x
if (dwItemId == 0 && _PKTItemTick)
' d! z( L. C/ c: _# n {1 w v" b+ m4 {5 @& R* v% O. O
PKTItemRelease();
/ V# W9 V+ F6 o5 ] }) u* L0 x2 g4 w& k( [
else if (dwItemId == _PKTItemID && _PKTItemTick)
" Z' p/ F8 b1 e. [& N {
3 j+ J. g) i2 |9 x8 p5 k PKTItemRelease();
4 `( P5 f$ X2 D }. e0 M; d* Q) A `# [9 [% k
}
4 ?4 g: Y- W8 U4 Y; M( @7 X% z; M , E; ]+ s% ?: }! z& u% l. ^9 G
}
' d @. y3 f( n }- w: F; C% V. r6 b; Z3 Y5 P
; O8 n0 ~4 p$ P, b& U static void PKTItemGameLoop()
# L/ r. V! d* g1 q# A {
( k/ W1 u V: b if (_PKTItemTick > 0)
4 @1 L+ `) q9 T4 l; n4 c" |1 f5 _ _PKTItemTick--;
5 \* G |1 @- L, q6 Y0 w. V% a! k3 U else if (_PKTItemTick == 0)
3 e( C1 L, t, {! ]9 \3 H PKTItemRelease();" e7 `- V( L' R
}
" [ ?6 h; j2 {. ?/ i: N w; b+ Q/ g, Z
static BOOL PKTItemCando()
2 @; G' O( n$ `4 n, L" H! T {
: J% Q/ ]0 \# r' b$ ? F. b if (_PKTItemTick == 0)return TRUE;, e2 a( w4 p) Z2 N" d
return FALSE;/ g6 D5 T. A' r4 T& Q
}
8 V- X- e) U: Z. t/ `4 G" a- p
$ S# c5 P: _# S/ v3 E8 J& l; p static BOOL BuyItem(DWORD ItemID, DWORD npcid)' n) r7 [( W+ O3 j/ L, L% t" b: i
{& k3 P% `* m7 [; x- B" s
PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);
1 a v6 I) s5 a. R BYTE aPacket[17] = { 0 };* T# b& r4 X2 Z' `6 _8 i7 i
aPacket[0] = 0x32;/ N+ ^2 D8 W8 p% D6 y
::memcpy(&aPacket[1], &npcid, 4);
: H3 M0 t& x$ [' A0 Z ::memcpy(&aPacket[5], &ItemID, 4);
% Z% B" f, q- p. r; W7 z //return D2Net::D2NetSendPacketToServer(0, aPacket, 17);
9 @( C2 P4 M$ C' J D2Net::D2SendToServer(17, 0, aPacket);& a% }& ]2 g9 L' _
return TRUE;
, ~ R% O) P; @) I! k+ w }
6 w: ]& B6 B( H; Y$ x' x+ A6 V$ q! S* {/ n
static BOOL SellItem(DWORD ItemID, DWORD npcid)
6 b9 A8 N- D" \/ ~ {$ N: F8 ` F6 d0 k; m% h3 M
PKTItemTellW8(PACKET_ITEMACTION, 0, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);
3 f/ {0 R6 y- B9 U BYTE aPacket[17] = { 0 };: n% V$ U7 f- j: c5 D( [( @
aPacket[0] = 0x33;
; q% J& \# M) b0 v1 j0 s ::memcpy(&aPacket[1], &npcid, 4);
: \% C/ C5 \) q# S% k$ ^ ::memcpy(&aPacket[5], &ItemID, 4);
7 c ~3 g1 h5 B2 g/ [8 M$ g, M //return D2Net::D2NetSendPacketToServer(0, aPacket, 17);4 G. G7 w, N3 Q3 n9 C: t
D2Net::D2SendToServer(17, 0, aPacket);
' ?3 s: b( x# L return TRUE;
" K t4 K/ {9 }+ L3 V1 \: d }1 D% D3 O2 N, w2 }" @2 f
/ n# J; C! a' N: Z static BOOL Interact(DWORD nUnitId, DWORD nUnitType);
+ h; x" G8 g' o) N+ Z; a. `: Y' h8 x9 ?
static BOOL PickGroundItem(UnitAny* pItem, BOOL bShowClientMove, BOOL bToCursor);+ F1 z4 ^: S; \# T4 K4 T
* ~; R V: }# Z' f9 |+ [
static BOOL OpenCube()# h$ i3 r8 J( e# @) n$ Z" \
{
0 C( I7 E, y' ?) } if (D2Client::D2GetUIToggle(UIVAR_CUBE))return TRUE;3 H, M9 K; g/ k3 |7 ^
- h+ |; R7 i1 H1 x$ v4 j3 r UnitAny* pCube = CountStorageItems(LOC_INV, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);
6 k. q3 m3 O# d9 T! A% R if (!pCube)5 h: v- A$ [3 a+ H* F
{
9 [+ ]) t* M) i. l9 A& o( h pCube = CountStorageItems(lOC_STASH, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);
$ s& T @0 ?) d/ K' g8 Q if (!pCube)
7 L" K6 S9 D- }# P4 V4 K1 h return FALSE;
( Z0 H3 y! K( N) y7 s }
3 ~4 C0 j6 D3 q* J/ { PKTItemTellW8(PacketItemMaxTick);
' K. b- j* g1 w6 V
% O- |9 i' o6 R0 ]- j: R D2CoordStrc mypst = { NULL };
z! G1 U8 e1 J/ P8 O& A" X7 V D2Common::D2GetUnitXY(*D2Client::ptPlayerClient, &mypst);4 b- n5 y) g0 D" H4 J- X. s% x7 ]
% p7 e, W2 p1 T% h. B BYTE aPacket[13] = { 0x20,0 };
$ {+ b) I. R; Q9 c9 i0 ~ ::memcpy(aPacket + 1, &pCube->nItemNum, 4);; }2 ` s+ }/ M( {+ R
::memcpy(aPacket + 5, &(mypst.nX), 4);
$ N. y: C& h& {# b. M; {4 d9 P1 R ::memcpy(aPacket + 9, &(mypst.nY), 4);# q* t4 ]/ H% `* @
D2Net::D2SendToServer(13, 0, aPacket);
- Y7 @/ Z& _( r6 ^! ?% R return TRUE; z# W$ D& e7 @
}
+ g, U2 ~$ |* K& b" R# k2 J; C! L
* A4 e v4 e) V u) w1 l5 n, D static BOOL ToInvxy(DWORD x, DWORD y)
8 U: F2 q4 M4 {: j$ C {
+ \- r- N: h# {# u* k" R: Q UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);( X) \7 f# }* R0 F6 K; B
1 q6 X* Y# U- I if (phand == NULL)* f& c9 F& Q% D' A
return FALSE;
* G" j. k6 l/ N9 O
^ x1 F% u) ?% t2 n* f PKTItemTellW8(PACKET_NEWITEM, phand->nUnitId, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);9 ~: S3 p1 t9 b. l8 \
9 K# V- U* Y# s9 ^+ J, [& t
BYTE aPacket[17] = { 0x18,0 };
2 r" k# M. q$ V i4 f ::memcpy(aPacket + 1, &phand->nItemNum, 4);
/ l5 U: V5 t; v1 G8 C ::memcpy(aPacket + 5, &x, 4);, b4 ?6 O1 A6 W2 G
::memcpy(aPacket + 9, &y, 4);
6 F0 K8 K% z, F- A D2Net::D2SendToServer(17, 0, aPacket);" v, ~8 P8 x4 m Z- Y
return TRUE;
; n: G. T) E& ^* S, }0 E }' U$ D9 N$ H, I! W3 h5 w
* x- a6 a9 d3 w: K9 x n( W* w+ @ static BOOL ToInvRandom(BOOL bBagFix = FALSE)
# |3 A; X1 S+ v x2 k! w {
2 f6 f% }$ ~% i" j: G UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);
2 e( ?+ D( [0 u8 b v7 v if (!phand)5 n. @0 |- E7 U% e0 N) B! v
return FALSE;& t2 g) X$ w: ^" A, C8 z
int desx = 0;( n1 Q% k5 F ~( l) r2 P
int desy = 0;9 K3 @4 A& b+ u* e) Y5 {- U2 M
if (GetTheFirstStoragePlace(LOC_INV, phand->dwTxtFileNo, &desx, &desy, bBagFix))! K3 N; W& K( s4 I
{+ k* x! @) G8 c0 O
ToInvxy(desx, desy);
# Z5 X" Q% J1 v/ U8 c* Z9 M8 C return TRUE;
. c, o. y/ `4 y% j5 ?* ~7 Q( [ }; p( H4 O# g# ^* a: X/ m
return FALSE;
! L; w3 x. M8 p! x0 X: |: j }
3 @3 j& ^4 }5 p3 K" _: h
# q* s% i* i5 c! y' J static BOOL ToCube()
& C5 ], U0 M# t" h: D o {" I9 l/ l0 ?7 R6 t; W
if (!(*D2Client::ptPlayerClient))return FALSE;9 L+ ~# [) [1 y: d0 ?2 L
, X5 ^5 R4 w% {5 P% i0 h
UnitAny* phand=D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);
8 t1 K. M8 ~: F) I* Z( ~ if (!phand)return FALSE;
) w9 B+ a/ v Y1 V# B$ q
) X+ V! X# c0 M8 u: V$ h& R UnitAny* pCube = CountStorageItems(LOC_INV, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);//枚举身上的方块
$ t5 ~; A% D" m; K+ O if (!pCube)) \* P n* |. B: \. c
{
6 r0 ?$ J* U8 _. e7 T: ] pCube = CountStorageItems(lOC_STASH, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);//枚举仓库里的方块: ^8 W, |1 F) l% t" h, s* l
if (!pCube || !pCube->nItemNum)
+ `8 d3 T8 i4 V! m% ^( D8 a return FALSE;
1 y2 Y- ~- ?/ G. x0 V }# i/ {5 m( x8 w4 C
/ s8 n) }' K! R if (!IsStorageCanStore(LOC_CUBE, phand->dwTxtFileNo, FALSE))
( u0 X% X) @4 T3 w" K+ | return FALSE;, {! E; V6 E( c, r
# A- d/ Z1 ?9 X! n PKTItemTellW8(PACKET_NEWITEM, phand->nItemNum, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);. r3 A9 ?1 L3 Y) \- E) }. U
/ O0 I! H5 z4 J1 c6 p; l
BYTE aPacket[9] = { 0x2A,0 };5 E8 P+ S& e- h3 p* a
::memcpy(aPacket + 1, &phand->nItemNum, 4);+ U5 ]; g7 s- B1 r+ f
::memcpy(aPacket + 5, &pCube->nItemNum, 4);/ R$ Z' q) Y1 k
D2Net::D2SendToServer(9, 0, aPacket);
8 Q* D2 x B9 k% O; I return TRUE;* G3 F7 H3 J% H |) W
) ^4 K; `$ F# E4 t
}6 W( Z0 F3 C+ ~# L3 F, K2 Z
, ~; G) p3 q. E6 l' m( K) u
static BOOL ToCube(DWORD dwhandID, DWORD dwtxtno);
1 C& H- M! b( H1 _5 I' j5 ~7 {( f/ Z/ t6 L1 g* Q
static BOOL RCBag(DWORD dwItemID)//使用之前一定要检查能不能储存
3 A" g& L7 q3 n+ d5 C {4 d* p. d+ J2 q9 x+ d% w" [
D2CoordStrc mypst = { NULL };
- ^8 ~# S4 i6 G8 l+ W' a D2Common::D2GetUnitXY(*D2Client::ptPlayerClient, &mypst);
5 P/ D3 `0 @# l. F2 `- D. |0 `; P& c" u w4 z2 v
if (!mypst.nX)return FALSE;
. w) A% }1 K! b6 r8 s, ~ 0 i6 N( Y1 N4 w6 Y- \! x
PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);5 x4 Z- x3 f0 W5 k; b0 K$ p
W$ E' \" v! m" @& p8 |7 [6 L; C8 V BYTE aPacket[13] = { 0x20,0 };$ O4 y+ G$ q0 b7 v% J7 O2 y w
::memcpy(aPacket + 1, &dwItemID, 4);% [+ ^# P) l+ _$ K ~: ^' _
::memcpy(aPacket + 5, &mypst.nX, 4);
+ r6 z- ^* H1 c ::memcpy(aPacket + 9, &mypst.nY, 4);: t- B2 K, f; ~/ c# v& P
//return D2Net::D2NetSendPacketToServer(0, aPacket, 13);2 l f$ Q9 X8 K _2 s$ u5 q
D2Net::D2SendToServer(13, 0, aPacket);1 U) m* z+ @% Y3 F
return TRUE;2 o I# Y1 S# z# E
}6 B- @% [1 a( Q4 ]' G( |* i+ L0 z
, P7 k. c5 \' u8 `- `: c
static BOOL DropCursorItemToGround()
4 U# U, T/ P6 V9 ?. r {
, V. m: ]2 Q) `0 e UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);
! k4 n/ Z5 C/ N( c( m if (!phand)
- P' [( c8 ^ u; k$ [( E3 s/ l8 X return FALSE;2 {9 _& d9 z/ x- ^2 s" A
) q+ G. s$ m7 M1 S$ G1 Z
PKTItemTellW8(PACKET_NEWITEM, phand->nItemNum, ITEM_ACTION_DROP, PacketItemMaxTick);
: L5 N( P$ j7 L. ?8 _: \/ o' d- R; I2 C& G8 A# H
BYTE aPacket[5] = { 0x17 };. R7 B, {/ ]9 ~% Y9 G, Q5 n6 q
::memcpy(aPacket + 1, &phand->nItemNum, 4);
. A' r) v c- j9 ^) s1 Y A) F D2Net::D2SendToServer(5, 0, aPacket);7 Z5 ?: P) b" _, M6 h0 d
return TRUE;
* d& v3 q4 b! Q, y9 ]( @$ O" s8 C5 a/ m0 s; c* d% @3 p; ]0 Y& S6 y
}, D5 k5 v; _3 \ i* J
5 ]4 t0 |/ A0 W' z# h) H$ l static BOOL PickStorageItemToCursor(DWORD dwItemID)) }, D' U0 k! h5 v( W; f& W7 x9 @
{. z' J/ h- p( a2 b$ v4 d( |
PKTItemTellW8(PACKET_ITEMACTION, dwItemID, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);$ }) T9 ~# z8 u2 M u& v
9 j2 E5 W4 s7 R, Y' B
BYTE aPacket[5] = { 0 };
8 p T- C* U# M aPacket[0] = 0x19;
# J/ a+ b a9 |2 b: F' y ::memcpy(aPacket + 1, &dwItemID, 4);
' A/ p8 R5 }# a$ N( A" M //return D2Net::D2NetSendPacketToServer(0, aPacket, 5);5 u: o5 q# g. m x
D2Net::D2SendToServer(5, 0, aPacket);2 p) n4 b" Q6 g/ P
return TRUE;( u% b$ W% r L' p4 j2 g
}" j1 v8 F/ o: N1 ^( x& [9 f
- J4 I& c G7 o# n/ `2 p* Y static BOOL InteractItem(DWORD ItemID1, DWORD ItemID2)
7 J( k& a+ w7 V& n {0 B+ }' M! f, _1 @& ]( P/ K
PKTItemTellW8(PACKET_ITEMACTION, ItemID1, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);
/ n! w/ k* l7 c# e$ M, g& } BYTE aPacket[17] = { 0x1f,0 };* R* _, z& D1 d! U
::memcpy(aPacket + 1, &ItemID1, 4);+ P0 w; x( d" j6 d. c
::memcpy(aPacket + 5, &ItemID2, 4);
) f6 @# E d6 d- R) t //return D2Net::D2NetSendPacketToServer(0, aPacket, 17);
6 L& f ^. C* `6 `) \- I& H D2Net::D2SendToServer(17, 0, aPacket);
" [: ~: d, h" A* x/ m return TRUE;
! A0 v9 S. p! Z5 s; F }0 v3 {; w( V5 a7 ]6 `
9 d8 H" Q" t: J: ^ Z" ^1 Q
static BOOL Transmute()0 d- h5 I" l2 k. u
{
5 @" c+ H3 p4 o, }" Q4 N if (!(*D2Client::ptPlayerClient))return FALSE;! C& z# @, D; K7 o/ G" u5 [
( z0 k( D7 ?5 F3 S! J- V w if (D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory))3 Q* N. T# m& x5 s) U8 ^9 D
return FALSE;/ o4 Z; o, F' h" i8 I( w3 l
2 f) [, D$ A- N2 _' z4 n- r+ `1 T
PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);0 c! U ^% Q/ O* b1 j
BYTE aPacket[7] = { 0 };
; D$ y. ~: u1 N, m3 _2 F/ k% v+ B' V7 o aPacket[0] = 0x4f;4 d6 X# a: i3 D/ P# m4 d4 `
aPacket[1] = 0x18;# o+ S+ o% F; D# G6 E
D2Net::D2SendToServer(7, 0, aPacket);5 x; S- \, x2 U _3 q Q
return TRUE;( M; ]% R9 O, K5 a3 T" b
}
3 X" B; Y: L5 |) I5 I};9 {, R, ~4 k& K9 A
- C1 L" N; g" A
|
|