标题: 修复交换错误 [打印本页] 作者: 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 5 \2 B8 _$ O2 M/ n- m
I posted this because someone kinda posted a youtube thingy about it :O. ! I4 k4 h* F: a! D4 P, ?7 Z& E; g/ [ Q. L7 L* s
Find this in DPSrv.cpp @ worldserver 0 r# _/ `+ d; U# V, w% f9 U: o1 Y+ ?5 `* o
Code: - b0 P8 m! f* o; ~/ c) bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 Q! O* T* i. |
{4 a! l o! h% s2 j& t$ Z
DWORD nId; , k0 y m% C1 D" A int nPart; * O: Y0 ]' R" N2 }1 J. _5 h/ w$ ~ 9 x6 r) P3 z2 t* t7 J9 _ ar >> nId; 6 l4 _2 x6 \% k4 G) }$ J ar >> nPart; 1 p u. C# r% P
3 D, z U* ^2 T; o' n2 V if( nPart >= MAX_HUMAN_PARTS ) ( r" o+ k7 G' I a; [' O return;1 c: _1 X4 V, Z' U% D3 e: g
2 P( }/ c. T+ X& l8 c, z9 C+ \ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; C+ V9 c# y$ i; ^
! o* U4 [& l* T. [# W- y, n' v( Z2 B4 b0 E
Code: . V: A+ L& s* w3 u, r. e6 o#ifdef __QUGET_SWAP_FIX/ R8 D$ d+ g/ K- O
1 }! h+ b) g: h2 W- R
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) 8 A# C- N0 F6 i8 I9 o5 H; F pUser->SetHitPoint( pUser->GetMaxHitPoint()); " h S7 A% W# J& C% N2 r$ O5 U3 E6 C& b7 C% M+ n
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( r' K4 _' B9 K; |% R
pUser->SetManaPoint( pUser->GetMaxManaPoint() ); # l1 L: k5 _+ B+ I& t, p' s9 B3 F8 ]/ k3 U3 X0 D
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 k6 [: f5 l; h% @
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); + u9 g) O% P N! f7 [ y- Q: W m$ p3 |8 p" q' i, }8 K' { P
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp - J1 i2 E5 X) M2 R$ S) ~and add under! I1 o7 y/ D2 R, k
. V+ A, E- b" v4 B) ^8 JCode:# n! L; l7 k9 B" `; P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ W3 _0 I+ ^8 X* x# e- v( j l
{( z& A$ v! }4 c% r# D! q
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 ); . J9 s+ I. p6 |9 M- [5 } }this$ j& y1 V. V* S8 X& l) H
* ~0 i9 {2 u3 S* k- r. v. x+ X
Code:* x5 _* |& f0 \- D
#ifdef __QUGET_SWAP_FIX & Q1 ^. g4 g# C1 I, A, c+ [$ u5 w if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) + {1 S9 H8 [0 w pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); ( L. s4 A. T+ y- Q3 H; v, M. t* K& d6 T- l Q" _5 ~
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) + C3 k& B& ?$ S4 {. E pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 t5 w7 M0 [4 \. F
4 g! D+ {% y' V. v. ~# U
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) 4 k) Y# J, P3 S; `$ w/ t' R pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* n# A3 `3 }" X2 {' @
* X$ e6 K, h/ d4 s: A3 j, b. z4 z1 `& c#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # y: m; c8 C9 `3 v! h1 G k3 \: @