标题: 修复交换错误 [打印本页] 作者: admin 时间: 2016-1-10 03:43 标题: 修复交换错误 Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! X( M: t- a0 c* J# [I posted this because someone kinda posted a youtube thingy about it :O.# f4 w" h8 ~$ x$ }
% y7 H% ?$ C! S& zFind this in DPSrv.cpp @ worldserver4 g% L0 d9 h) }! ?/ ?" g; h" g
/ U- n5 @" m2 ZCode:; r8 L$ ], w. [' B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) H$ z2 @+ s3 g, l
{0 N, G! v3 ^( C! ?/ f X9 Z
DWORD nId; " R! x m$ }- L; f6 x int nPart;4 {! b [9 t4 | w, g
0 R% E4 x1 ?. H6 k2 R3 ]
ar >> nId; ! S5 Q2 R" w6 @2 `, y ar >> nPart; # u/ r- h6 k3 i, i; T) d
, ?1 ]# s8 q/ g- }. A3 F if( nPart >= MAX_HUMAN_PARTS ) ; d' y/ g7 @/ n( \! K% [6 @1 p return; 5 K# R2 c( X/ f0 F. v+ P8 a; L" p! y) i; I- p! j3 ^5 ?- h
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it ; k' u& c, h2 e : K ?# ]) y1 Y# K" g* m9 }7 c1 I% w) `/ {0 G: u p
Code: ' l0 I. R# P" P J. j! U' V# h#ifdef __QUGET_SWAP_FIX 1 |* ]6 `, A8 U% \% j! C, ^6 A0 @8 @, V
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) * D6 F9 J' `4 X# l0 y4 K pUser->SetHitPoint( pUser->GetMaxHitPoint());; r1 {/ \: H+ M3 S2 i
" j h% o6 O0 y5 L( e$ c5 t
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) 9 u; P8 d/ u+ |8 s4 c pUser->SetManaPoint( pUser->GetMaxManaPoint() ); & k' {, a' L6 c: `% s2 b% s1 y7 I : _/ N( ^6 l; w0 |. d `/ d5 j if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! B* i' h4 f/ j1 E" Z2 P9 V1 O; r
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); 0 ?& _- \7 d6 i( T2 V. h1 y8 f7 _. Q( { 0 A3 k9 X, y/ Y& i2 V( ^% f- s) S#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp' ?5 \% D$ w3 G3 r% G
and add under. ?* e9 N/ A$ |1 T! `# c9 C
" k5 w" j( K8 B% c4 V" S2 ?* a
Code:. N7 i6 E1 T2 M% Y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) ! ?4 ]2 W$ I T' b; s/ `2 u { ( i4 z) w& c% Z. F/ H9 c3 U; K$ t+ V CMover::UpdateParts( pPlayer->GetSex(), pPlayer->m_dwSkinSet, pPlayer->m_dwFace, pPlayer->m_dwHairMesh, pPlayer->m_dwHeadMesh, pPlayer->m_aEquipInfo, g_WndMng.m_pWndBeautyShop->m_pModel, &pPlayer->m_Inventory ); / b* A/ r1 u& l% K- N3 Y8 U) @ }this! V3 v0 u+ ]7 Y# J
" K, Z6 A7 |& [6 d# fCode: 1 m* ~/ c. ~5 r0 |, m! [#ifdef __QUGET_SWAP_FIX , P, j7 d' M; q) p. w# _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) : ~5 R# h9 z; p' e pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 q. i5 v3 F) x8 C- Y! d
9 j" g, ^( K, C" X# [+ [3 ] if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) }4 W9 m: U8 V; {$ p. D) i2 y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 j. E2 r8 F1 }; H3 D5 Y* u
- y3 ?2 W. \: n6 A9 S# n if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 C* z" b1 C0 n( N8 s
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); , | ]6 S* y- [* \, F% O; C$ g" b& C% t6 o C( A1 M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' R/ t) Y: m$ w; @- `$ C) D