|
|
转载9 \- E2 W8 e; V* I3 N. n
自动合成的逻辑过于复杂就不给出了主要就是利用以下汇编点:
m- S @3 g/ S" \, r( |3 QD2Client:
2 F) |6 H' ~) `9 z u T6FB20AE1为拦截输入框(用于获得命令)+ @' A I/ a+ n* U" _0 n
6FB5E11C为客户端获得0x9C 0x04数据包位置 也就是进入储存的触发1 ~5 L8 ]! Y( S: }
6FB5E8D0为客户端获得0x9D 0x05数据包的位置 也是从储存中提起的触发( c3 b3 i( K% `/ t; a1 S) U
6FAF4230为hackmap的loop点 我用的hackmap导出位置1 ]4 [% L7 Z% j. e
2 v+ X" K+ q. }" J
! j! ]2 A4 A, _$ \" g发包函数:/ \1 ~& \( p9 }
class D2PKT_ITEM& {9 @3 a0 V# H+ {
{; w5 m- t+ j9 B/ t
#define ITEM_ACTION_NEW_GROUND 0x00 //9c//新产生在地上 地上4 x# N1 Z8 B' {/ y9 `8 [
#define ITEM_ACTION_PICK_UP 0x01 //9c//拾取 多1 j! w, ^' O* ]5 ^, s3 D: U
#define ITEM_ACTION_DROP 0x02 //9c//丢弃 地上6 b& L9 [2 Q3 E
#define ITEM_ACTION_OLD_GROUND 0x03 //9c//旧的地上 地上
. }* @6 H0 t& Q; o( h0 g- J#define ITEM_ACTION_TO_STORAGE 0x04 //9c //到储存 STASH; m, A1 q; n% z. |2 f6 @* \ X
#define ITEM_ACTION_FROM_STORAGE 0x05 //9d 从储存 手上
6 c% o, s+ s# z6 D/ c( ~# ^1 y#define ITEM_ACTION_TO_EQUIP 0x06 //9d 装备 装备栏
# I: P* Z4 y$ A' Q- {+ _$ @. X$ V#define ITEM_ACTION_FROM_EQUIP 0x08 //9d 从装备 手上
* E2 a/ ~# O9 D U# P' J#define ITEM_ACTION_SWITCH_EQUIP 0x09 //9d 切装备 -- v: \. L- t# \1 ?7 n& p
#define ITEM_ACTION_TO_STORE 0x0B //9c //到商店 商店, x+ C8 a" Z" v2 L3 B. t
#define ITEM_ACTION_FROM_STORE 0x0C //9c 从商店 INV9 R, G4 O( m% P( `# X
#define ITEM_ACTION_SWITCH_STORAGE 0x0d //9c 转换储存 不知道 . u9 r4 t7 z" V$ v3 g
#define ITEM_ACTION_TO_BELTSLOT 0x0E //9c 去腰带 腰带
1 S+ n. p7 P; _: r#define ITEM_ACTION_FROM_BELTSLOT 0x0F //9c 从腰带 手上; R3 [' z3 L$ F5 D! S& f. e8 U/ C0 P
#define ITEM_ACTION_SWITCH_BELTSLOT 0x10 //9c 转换腰带 -
/ |5 A# b* H, l- ^+ ]$ }/ B/ p2 y#define ITEM_ACTION_TO_CURSOR 0x12 //9c 到受伤 手上
2 b2 Q& ]: b: I5 ]* j( ^& c R#define ITEM_ACTION_SHIFT_BELTSLOT 0x15 //9d 切换腰带 -
% U1 I1 q! q* e0 m r$ `. I- p3 Z9 M+ F! N) p/ E; |7 C0 |
#define PacketItemMaxTick 150" @$ s$ U; x) a' C0 D
#define PacketItemPickUpTick 204 u5 Z+ j3 v: _3 @6 ?3 C& s- E7 W
* o1 Z) X6 R9 w! }. w
private:8 \, t! c" \ K+ N( s& f
static DWORD _PKTItemTick;
0 H5 @- V# M( a static DWORD _PKTItemAction;5 a! z2 L5 u( b$ w6 L4 I
static DWORD _PKTItemID;4 ~# X# G2 M4 L8 q2 z
static BYTE _PKTPKTType;4 q D. B. [7 H/ y% i
public:
% ^+ P# `; ?* v4 r, \ static DWORD PKTItemGetTick() { return _PKTItemTick; }
! m( K# z& G; O. A
4 z& C" e. w2 f static void PKTItemRelease()
7 k- c# z: {# U5 i/ } {
/ d! ^8 {! i) ~. ^ _PKTItemTick = 0;8 G2 N5 Q: P. d V% H6 \4 ?
_PKTItemAction = 0;! a: }5 d# O) i; ^" c' G
_PKTItemID = 0;5 [* Q; g9 A _5 R* j
_PKTPKTType = 0;( w$ @6 G3 q+ Q+ O" E% }. G- ?
}
- \+ V( V. z2 u$ j4 d3 ^. g1 }$ I" G1 K" n
static void PKTItemTellW8(BYTE aPacket0, DWORD dwItemID, DWORD ItemAction, DWORD tick)
* J% i. j* W1 w2 w, A9 W {
7 U. H! T% I# q0 S% K _PKTPKTType = aPacket0;$ L! S. @+ K* G% L
_PKTItemTick = tick;
}5 A1 Y6 o4 r _PKTItemAction = ItemAction;
7 i7 K8 L! D2 q/ m/ n _PKTItemID = dwItemID;
; z7 L, J5 M g6 F }9 Y# T- s- i) s
+ A/ X# t% B0 Y' D9 O' X- M- G6 _3 _
static void PKTItemTellW8(DWORD tick)
: B4 U; b1 Q+ m2 h, g {' W8 T% C: a* _6 @; i
_PKTItemTick = tick;
( k! l8 Q. L9 ~ \& ?* ? `; k }
5 r3 c& T% e7 i% x
" m0 z& b0 `6 I, { e v, e static void PKTItem9C04(BYTE* aPacket, DWORD aLength,UnitAny* pPlayer)//picktocursor, r9 z. Q0 u& r4 e9 j: q! X
{5 ~, H- X+ u# f7 p- Y5 l
if (aLength >= 8)
# N4 l2 Y% p q2 ?. E! C6 ?0 f' ?2 w {; B5 S. s* R) v5 @
DWORD dwItemId = 0;
7 B0 o9 B8 {" a9 r* H' J# z! c' T; } memcpy(&dwItemId, aPacket + 4, sizeof(DWORD));) o: U$ a$ R8 q3 U& A( B
if (aPacket[0] == PACKET_NEWITEM && aPacket[1] == ITEM_ACTION_TO_STORAGE+ Z, H+ T6 c0 b9 K6 u
&& _PKTItemAction == ITEM_ACTION_TO_STORAGE- {" }7 X/ |& C. M% t
&& _PKTPKTType == PACKET_NEWITEM
; p5 z* L6 L* G Q )" W) }1 ~9 e# C r
{
" t- n5 F( h% ~, W3 ?2 d6 B- Z if (_PKTItemID == 0 && _PKTItemTick)
' k5 w$ H" W4 Z {
( P7 ~ W4 s. ]# C4 B! P6 i PKTItemRelease();) j5 r$ [3 G* q' c" I5 e& J1 @9 p
}
* o e- _3 m& m# y. @, T2 c3 d2 j else if(_PKTItemID== dwItemId&& _PKTItemTick)
* x9 | s( M( N {
" w: h. A+ M' O5 Q( ?# e) g1 ^9 ^ PKTItemRelease();% U- M u0 z9 n1 b1 f7 y
}
1 b- n1 x3 |$ ]" Y: k }
0 V' _3 _- a) _! E* j0 L % D" ?% ~: ~6 r ]4 I
}
- m) q0 M' a) M$ T6 O4 Z }/ Y5 J; f0 P1 Z9 z0 O# A
1 ]8 f: t* f. Q& E4 D# f4 V
static void PKTItem9D05(BYTE* aPacket, DWORD aLength, UnitAny* pPlayer)//To Stored! ^- f7 }# X9 p. c
{
' ^" F' v6 `; I* z# w3 B, l0 L z: ] if (aLength >= 8)% n# f7 P g3 ^2 a# a
{ d8 P% E# U+ C- W0 ] K' I8 j
DWORD dwItemId = 0;
1 i/ ]& Y2 T" ]. O) K0 y memcpy(&dwItemId, aPacket + 4, sizeof(DWORD));# l: U" T2 g4 k4 b% E
if (aPacket[0] == PACKET_ITEMACTION && aPacket[1] == ITEM_ACTION_FROM_STORAGE2 l. S2 f/ D$ C; o
&& _PKTItemAction == ITEM_ACTION_FROM_STORAGE" t/ x7 V4 m6 ]- u$ Q6 B
&& _PKTPKTType == PACKET_ITEMACTION
- S4 l* _7 b" P# u. S+ O5 F )8 z% q/ ?' R; s! R2 H
{% l9 r! H& c+ a% n+ ~
if (dwItemId == 0 && _PKTItemTick)! s3 R& x) V; q# w: O4 a
{
4 `. r6 Y/ F' a" j8 c, z PKTItemRelease();
% H5 }0 n8 g$ ^* a% B) ` }
% W: m$ C; o% P8 I! T4 ]3 ^ else if (dwItemId == _PKTItemID && _PKTItemTick)
6 `4 I, J0 p3 u {9 q: r' I! |3 S, @/ P \: |
PKTItemRelease();
' j* K# u$ P; Z7 v. s }- R1 P" e1 M7 K& k% K$ D
}9 L- o0 c X+ @
1 [1 h8 C! Q) x' `& L* Z# v( C }
& o! i! M [ O# V( C2 M: B& y }% _8 ?+ e" @1 s4 g5 _) p
( h/ w5 x# O+ ~. |& h3 b, U6 k
static void PKTItemGameLoop()
/ q& K6 n/ Q9 A/ H7 J% G5 a/ j8 ^ {
9 y' R" f0 i' |7 D3 X j I if (_PKTItemTick > 0)# N+ y8 I- g3 u/ M3 c2 Y, |. r d
_PKTItemTick--;" f9 C" v* H* m: Y- D3 y ^* f
else if (_PKTItemTick == 0)
( u: x7 {, d2 T. T# t PKTItemRelease();2 o& b- [. ?- a: o# U
} q( u' v8 |% ^5 e
, S$ V" R5 d+ n+ _4 h static BOOL PKTItemCando() ! p' o8 k; H' i
{) o5 I/ V d. }( y6 r. [
if (_PKTItemTick == 0)return TRUE;8 i: N" e# Q. ?) c% g: t
return FALSE;8 @& G) S* p9 Q$ Y
}
6 c, r' u. ^+ y9 P2 e' @ E( X9 r ^ E3 C v7 l
static BOOL BuyItem(DWORD ItemID, DWORD npcid)
( w% m* n- ^- B2 W1 d {3 R& v! v$ w' {$ D% _6 |1 r
PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);
f- K7 T& @- P& \ x5 e/ j BYTE aPacket[17] = { 0 };8 G- p( D) B2 a" G
aPacket[0] = 0x32;4 \9 V$ q4 N" R4 x" t, y) P8 }: N( g
::memcpy(&aPacket[1], &npcid, 4);
9 y4 h. @. _: H) ~! X& t+ M) p, o ::memcpy(&aPacket[5], &ItemID, 4); u: j; L( Y8 e& t5 I4 Y; l
//return D2Net::D2NetSendPacketToServer(0, aPacket, 17);9 T F2 \* v+ |& G+ x+ w/ r1 Z' e
D2Net::D2SendToServer(17, 0, aPacket);
8 U. ]8 {) ~1 V: R N7 Y! p) a( p2 M" c return TRUE;
& b8 Y% O- @$ n, b9 X2 n }1 g3 t0 a" i1 M# Q
" Q2 D) b( C4 z2 n8 D# Z+ K5 J static BOOL SellItem(DWORD ItemID, DWORD npcid)
( }. ^+ a! S8 c/ S { w9 W4 s/ ]( O' \7 j' F
PKTItemTellW8(PACKET_ITEMACTION, 0, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);
]9 E) P- }, `1 w" C BYTE aPacket[17] = { 0 };
9 Z [ F; r- I2 \8 b# d aPacket[0] = 0x33;
d" o. W; Z/ Q) H) Y3 e7 y" F ::memcpy(&aPacket[1], &npcid, 4);
) O' W. U. W9 d, U ::memcpy(&aPacket[5], &ItemID, 4);
+ |+ w! [( l# ?# L$ G2 A" y6 H //return D2Net::D2NetSendPacketToServer(0, aPacket, 17);- D( r$ v% A1 |5 Q
D2Net::D2SendToServer(17, 0, aPacket);* s+ d( i% N, p- Z
return TRUE;/ G8 [5 ^* d: G( v2 S
}2 F1 @0 q# i) z" T8 O
( ~2 h l) F% S3 C+ d9 k8 U static BOOL Interact(DWORD nUnitId, DWORD nUnitType);% |, ^' n7 ?, }9 [% f
( j/ D' i# |* o% R7 L/ |+ w1 q$ M2 _
static BOOL PickGroundItem(UnitAny* pItem, BOOL bShowClientMove, BOOL bToCursor);- [0 t8 U* L6 }# S6 Y
7 N7 K- [! C- ?0 o2 H: t4 d1 H
static BOOL OpenCube()* J: N, H* n' P
{) s0 X2 r }( k% V( t, ~3 L* Q+ G
if (D2Client::D2GetUIToggle(UIVAR_CUBE))return TRUE;1 T( G H7 K6 r) v2 r8 C/ y: x8 u
+ t) X: ~$ p" A0 M! J, O
UnitAny* pCube = CountStorageItems(LOC_INV, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);( d, G3 _% j8 e4 |$ u5 ~( Y6 |
if (!pCube)! Y; `' z, t" u/ [) A
{
/ @1 r o3 y* h pCube = CountStorageItems(lOC_STASH, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);: L- g) R" @- z( a+ X- g
if (!pCube)4 {6 m4 g j' i3 b5 W6 r$ l
return FALSE;
/ |0 J) ?( j% p% }8 m2 r& I% ^ }% |/ b' g* d9 E- z2 ^
PKTItemTellW8(PacketItemMaxTick);# \: b9 |9 O" \9 N' _6 U) B+ h7 i
* d' L% o2 Q3 n
D2CoordStrc mypst = { NULL };0 M9 J* Q! m) Q1 J9 f' T
D2Common::D2GetUnitXY(*D2Client::ptPlayerClient, &mypst);
/ O1 V8 e5 C- T2 ~; ]* n$ G) w1 Y/ l* U% _
BYTE aPacket[13] = { 0x20,0 };
- @/ |% g5 j9 E& S/ r- b8 B7 B8 L5 H ::memcpy(aPacket + 1, &pCube->nItemNum, 4);
; A! H X- D9 f7 P6 u& G! W ::memcpy(aPacket + 5, &(mypst.nX), 4);# [- z% D- _5 M; d, X* M
::memcpy(aPacket + 9, &(mypst.nY), 4);
1 u( v# ~2 K, K+ W! m3 _ D2Net::D2SendToServer(13, 0, aPacket);: y7 k* \* z" K+ V6 z7 `
return TRUE;
- o; s' u' l0 a: G' E }
. c9 v6 q) Z8 i% ]- |3 s% A$ Y8 _
/ h$ h% R) h) \" k, p; `1 E8 z static BOOL ToInvxy(DWORD x, DWORD y)
_; `% H5 v! [ {
! B- q' |' o8 h! s) O% l! e UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);1 Q5 ^" p$ I+ Z
$ |/ ~8 ]5 C! I: S% s$ F1 m+ A8 _ if (phand == NULL)& s5 d; w! s! i3 w
return FALSE;4 v X ]: ~9 U) c( n) R u
3 n V$ U: b2 W1 y5 j
PKTItemTellW8(PACKET_NEWITEM, phand->nUnitId, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);
) M( @, w$ C/ X. K! N& Q- c
% A% u0 i7 H" C1 e3 z/ q) [, Q1 z. ? BYTE aPacket[17] = { 0x18,0 };
t9 c& c3 H: }# V2 F+ p {# |, k- o ::memcpy(aPacket + 1, &phand->nItemNum, 4);
" z% o1 o* D# ]* }' ` ::memcpy(aPacket + 5, &x, 4);
! f# H6 H0 @! K. ~; Q* a* w i3 u ::memcpy(aPacket + 9, &y, 4);
* T' g6 g9 e! W5 k" N' B D2Net::D2SendToServer(17, 0, aPacket);0 B$ f0 {3 ~( j
return TRUE;$ S0 y/ V, J& B2 H3 c8 `9 j
}' U9 m d0 t8 _' a
( a1 d5 A k1 ]8 V# w2 d, e8 w/ R static BOOL ToInvRandom(BOOL bBagFix = FALSE)
5 k" c, Z" T1 } {5 }8 E( y: A( [ p
UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);
: D2 @3 M G \ if (!phand)( t9 I1 G5 y6 | \% A4 v
return FALSE;$ C# h0 |7 h4 [8 b
int desx = 0;
3 u* e! B& H( c2 V/ t9 @. l int desy = 0;
1 I$ d3 ^ |. O* K if (GetTheFirstStoragePlace(LOC_INV, phand->dwTxtFileNo, &desx, &desy, bBagFix))
5 w9 e& k2 N& C3 w) q {
) N8 Y8 {3 ]5 C ToInvxy(desx, desy);
; i3 _% A$ w. _* `: a2 ] return TRUE;
J' x: [& w \; I9 C7 a% v# w6 | }' `. Z5 g% H( L9 J2 v
return FALSE;
/ t2 ~ Q1 _' ?" Z7 V$ [# k }& V6 l% D" x5 l# }
, w7 W1 ^5 b3 f3 o0 @ z2 e7 b static BOOL ToCube()% t& b% v' K# Y0 m+ R7 t- c% s
{
8 w2 A- {& E, s! o# U if (!(*D2Client::ptPlayerClient))return FALSE;
2 Q2 m2 {5 X' [, m8 S
7 J) ]9 k4 K* w! ] UnitAny* phand=D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);' T) S5 B5 F8 `! ?% y! s
if (!phand)return FALSE;
) ~1 M2 z0 m! B6 g# z
! F6 c3 P5 M* }, m1 S UnitAny* pCube = CountStorageItems(LOC_INV, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);//枚举身上的方块
1 ~, o* n# \% q+ o9 M4 H if (!pCube)
1 x) h) F4 ]- {/ T% ?) m" _) T {
2 S" v3 ]) y2 `% S pCube = CountStorageItems(lOC_STASH, D2TXTCODE('box '), ITEMQUALITY_NORMAL, NULL);//枚举仓库里的方块
0 c( r @# o: X/ I if (!pCube || !pCube->nItemNum)( p5 D) i4 \8 s/ |4 N- v/ T+ a5 `
return FALSE;: q# T& ]" g4 t! X
}
! C9 E7 M; p |/ H
, ]& D, P6 }% ]( F if (!IsStorageCanStore(LOC_CUBE, phand->dwTxtFileNo, FALSE))- [) q+ H: E, A# p
return FALSE;
5 Y7 ~1 }# F$ n2 F) T1 g5 K" b7 ~. ? Q6 w# l3 ~. S3 b
PKTItemTellW8(PACKET_NEWITEM, phand->nItemNum, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);
9 r7 ^0 k" [- ^' i
+ F C2 t! s% i, l4 Z' ^3 F2 ? BYTE aPacket[9] = { 0x2A,0 };
7 A! ^: K9 B# a3 B1 p6 [ ::memcpy(aPacket + 1, &phand->nItemNum, 4);
( @8 w' e, H9 K. d" Y% b6 n ::memcpy(aPacket + 5, &pCube->nItemNum, 4);
( O" |# E1 A9 Q% @ D2Net::D2SendToServer(9, 0, aPacket);6 M2 }% `9 Q, |: x& K' p# g& i1 f v
return TRUE;, ?1 f# _; J U6 U# b& l
/ b8 G* o& c9 x
}% {; @8 L9 R6 u: r
' a, m5 @% L V, B, N, ~
static BOOL ToCube(DWORD dwhandID, DWORD dwtxtno);/ ]4 P; A s6 v! p6 p
' X! m1 K- h( l. m @ static BOOL RCBag(DWORD dwItemID)//使用之前一定要检查能不能储存1 A# o! H) X/ J& g1 O* M
{& q' a3 d- F7 u; ]0 V7 t' z! b$ J
D2CoordStrc mypst = { NULL };8 X) d K# J5 j" n# C
D2Common::D2GetUnitXY(*D2Client::ptPlayerClient, &mypst);, S" H) N" t4 e Z$ t6 |3 ^
f/ s( B, j. L. m4 h! k6 ^ if (!mypst.nX)return FALSE;9 Z4 Y2 Q6 V; M. T( u
4 U2 [0 y# q' E) A+ c# r PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick);
( ^5 E( ~- }0 g! q$ N5 h$ t6 C- j
BYTE aPacket[13] = { 0x20,0 };
4 {% e1 ?& i* [/ { ::memcpy(aPacket + 1, &dwItemID, 4);
" S; d$ `, A4 U0 N7 [ ::memcpy(aPacket + 5, &mypst.nX, 4);4 s6 d0 j9 j6 a7 o: h2 A* n0 T
::memcpy(aPacket + 9, &mypst.nY, 4);
& x/ A6 Q, t: }* y+ W$ S. I //return D2Net::D2NetSendPacketToServer(0, aPacket, 13);
$ E! b& c' e$ ~ D2Net::D2SendToServer(13, 0, aPacket);
1 @. q! s0 e- X$ N return TRUE;
: n! X9 O# E* P- `6 r( h0 M }$ A: @; ?: [$ z% ~8 x5 j8 R
0 \3 Z+ S& F K1 P static BOOL DropCursorItemToGround()
: x- v! k0 m% n# F' {& V& d$ t$ V7 V z {6 s1 J6 m7 y I2 D3 ^' u
UnitAny* phand = D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory);$ q- v' z- I" y# g. m* o3 ~$ j$ Z
if (!phand); r8 R% R; s: v0 X, h% i
return FALSE;
4 s* B) Y! N5 Q0 `
6 k8 e$ U$ r0 C% p PKTItemTellW8(PACKET_NEWITEM, phand->nItemNum, ITEM_ACTION_DROP, PacketItemMaxTick);
^7 k: k, _$ y) O& l& B' M. ^$ ^* j+ ?7 T" E" p
BYTE aPacket[5] = { 0x17 };
4 W/ C' N1 u- b3 G% g$ B# D9 K ::memcpy(aPacket + 1, &phand->nItemNum, 4);
7 B5 u6 b% K2 P: U D2Net::D2SendToServer(5, 0, aPacket);1 [1 c* b+ R5 `: P
return TRUE;* C5 Q+ e/ y% }! O
2 G1 t" z. g J; E0 l+ V
}7 D& Z+ Z* J9 c" {4 m5 l* l
G/ I* n4 P/ {/ h4 @& K% X
static BOOL PickStorageItemToCursor(DWORD dwItemID)
9 F7 V k* f' I- ]5 ]# E {# J. s7 O- o8 F& s3 N
PKTItemTellW8(PACKET_ITEMACTION, dwItemID, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);( c* v; `4 N/ o) o4 x
( p! v: {; V9 [$ G% x5 d [. F) @ BYTE aPacket[5] = { 0 };
; H& T9 o- R; V* G9 B aPacket[0] = 0x19;3 b/ i* \2 g9 x6 c9 `, y3 \
::memcpy(aPacket + 1, &dwItemID, 4);; X$ D$ F5 d$ [9 i
//return D2Net::D2NetSendPacketToServer(0, aPacket, 5);
4 X6 T) l0 W3 I( L0 ?$ t" E# | D2Net::D2SendToServer(5, 0, aPacket);4 g! ]1 u; A7 Z) G/ c) ^7 ^6 W
return TRUE;
" v. Q& A' @' p- `9 g+ w0 T }' l% t. y1 u; v+ n
/ m; q! Q8 R c1 b
static BOOL InteractItem(DWORD ItemID1, DWORD ItemID2)7 Z! M* _, ?& x) C1 ^4 k: m
{
9 H/ ?1 K2 C& r- T. n. e, L& J# M PKTItemTellW8(PACKET_ITEMACTION, ItemID1, ITEM_ACTION_FROM_STORAGE, PacketItemMaxTick);! n+ W# Y1 c9 v
BYTE aPacket[17] = { 0x1f,0 };3 f' i2 |* q) H3 H9 Y. u
::memcpy(aPacket + 1, &ItemID1, 4);
8 N% y c& w/ k! }; @+ N ::memcpy(aPacket + 5, &ItemID2, 4);, D' n) J, f' Z. j' N
//return D2Net::D2NetSendPacketToServer(0, aPacket, 17);
+ ?1 h( `6 z. m D2Net::D2SendToServer(17, 0, aPacket);, U% U1 f) M% q; Q% o4 f/ M
return TRUE;
. t" A1 ?* x# v2 I0 N/ { }
m, X% h! M, {4 W. T
2 E7 Z: y: w1 A9 j1 ?5 { static BOOL Transmute()! b2 ]9 ?4 P8 \
{, x8 x# k& z; C. y8 c
if (!(*D2Client::ptPlayerClient))return FALSE;
! q3 k: \0 [2 w# z$ c; g' X' G! Q4 A* |8 y) z5 u4 A1 G! E
if (D2Common::D2GetCursorItem((*D2Client::ptPlayerClient)->ptInventory))
: Q# e9 Y! j% H8 M& N8 Q) L% j return FALSE;# O5 y4 n, R2 } L* d4 ^# G; t
) {1 _1 r1 }6 m PKTItemTellW8(PACKET_NEWITEM, 0, ITEM_ACTION_TO_STORAGE, PacketItemMaxTick); h M5 _2 s1 b
BYTE aPacket[7] = { 0 };" O5 _* M" r2 K6 k9 m6 O4 N
aPacket[0] = 0x4f;
" g: D- h' {- R/ R2 q aPacket[1] = 0x18;" a- R. Y0 X4 { I# ~
D2Net::D2SendToServer(7, 0, aPacket);7 [8 g/ n% h5 h
return TRUE;$ U: E; I! M; Z
}: M: D2 Z1 A$ l) ]: W) M
};
4 a4 _; P/ C# ]4 v+ K' i& d; C: h7 F( D( I
|
|