标题: 修复交换错误 [打印本页] 作者: 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 ! ^ t$ p8 Q: f/ k/ e9 P: A; k
I posted this because someone kinda posted a youtube thingy about it :O.: I" C' T& g1 f/ r
- l' ?/ j; ~1 _3 H( h6 X! k/ D
Find this in DPSrv.cpp @ worldserver / |+ T. J$ m+ n+ r* E$ ?: i1 ?$ g2 [
Code: ! o; t) `3 x# c/ Z, pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* Z- S/ {+ T% A# h' }- S' c9 H
{ ( v0 y# [ O' I9 P& i- S- d, Y1 @ DWORD nId;% p8 _: c: h; n% W2 L/ B. \8 J9 M9 [' V8 h
int nPart;: p$ {& X" p" s/ H- v* v- b+ b7 ~
9 ^& @) v P: K ar >> nId;3 F9 K2 q0 E1 C* I: ~: |! |& o( }
ar >> nPart; * m: y+ K4 d/ B# [2 C1 S ) ?1 D/ N: C2 J5 W0 i
if( nPart >= MAX_HUMAN_PARTS ) 6 V& P& n& T" a+ z; i1 l
return;, _2 `) q* n' r X2 x
& K* z* }: `1 X6 M0 h5 K# u
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( v- U" d3 ^+ D$ k( T& P
# @7 p) [3 C' i
& Z! u" r9 o! O/ U/ q& v- _
Code: * ~/ ]! F* t2 d5 W) b" Y! t#ifdef __QUGET_SWAP_FIX % c3 c6 t. B- l/ Z* T3 A( `" b : {5 p* H) J, `+ z; [0 I if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 U% e, X8 O4 Z
pUser->SetHitPoint( pUser->GetMaxHitPoint());! r' C+ H/ @+ z
) Z/ i) h! V6 n8 ^% k& s if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) ; H, X" \& O1 d' r% v, x' z pUser->SetManaPoint( pUser->GetMaxManaPoint() ); . m6 ^3 l3 i* A& N6 G% `) a7 c" i1 J0 n" E
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) 5 S/ P3 ] s2 U* f7 ?& {: r pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 H! U6 F r+ W0 e
0 L% X" N; }9 _7 r) A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp 9 I4 G a! P! \5 v8 g, vand add under & ]$ _+ r. k* C : P3 \. G) P8 v8 e6 GCode:/ F& Z0 C* [6 l" n6 W- R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) ' J' o7 x0 z2 E) w { 6 D8 u- K) y; @7 k 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 ); 0 _5 R" H# r0 T }this 5 M8 t' R1 s* Q $ Y# G4 Y0 d0 y1 m. g0 `9 n- h5 P, [Code: & H/ ^4 S! |0 z x3 _7 Z#ifdef __QUGET_SWAP_FIX3 T. |6 X. C3 k# R1 T# T
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) : B% @' V' n6 M0 I( U pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); 9 b$ x E. C! v7 K: c, {2 F( r( z# C% K& h s
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) * p# s& V7 b* ^ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ M4 \ \) ^- ]& q