|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
. b5 D: O8 r2 U% II posted this because someone kinda posted a youtube thingy about it :O.
" V! X3 B- f# D6 v6 a4 {! u& p% L8 V) V- i9 k2 p/ K/ u# e4 G
Find this in DPSrv.cpp @ worldserver" z" [7 }; Q! s2 O
/ g. c$ u! R( }" S
Code:
/ U% f% I7 N6 T% I5 {9 ~7 L3 {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! x1 _- c3 H( {# o3 J
{) J9 }+ z& C3 w1 J8 P
DWORD nId;
" `6 W" O6 y* r int nPart;
8 i# M2 a' K6 M- `# o/ e1 j5 D1 ^; I0 S& p4 v
ar >> nId;8 s+ c* k2 m" K2 S% y' v8 }
ar >> nPart;
7 X" [9 m- p. R! d- i4 E9 A7 P. ~
# ~3 E; L( e9 p0 h if( nPart >= MAX_HUMAN_PARTS ) ' w& e+ t" d1 i& p% F4 A# U0 m D
return;
9 u+ Q, y& U1 N: O$ X
- r- F& v% ^( v( O; t5 ~- V% h1 D' c& ` CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ Q. a2 R; U5 m2 f4 ?0 L" _' M5 S5 S5 _8 ?( {1 p% j' U% T! A
% K; ^0 l t- a& S4 pCode:6 B, Z; P. C) r4 J) U
#ifdef __QUGET_SWAP_FIX
+ U5 C0 A) ^# G- v) ]7 M8 A! S* f* } W; O: @/ F
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ D8 T- l1 @ G0 h* A. P( \
pUser->SetHitPoint( pUser->GetMaxHitPoint());1 h n5 M5 z1 w/ x! a" |! [
& l; s* ?3 V0 X# q0 ^* y# o+ t
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) X I+ }$ I7 d. e7 a: T
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- g. ?' s: A" {: `, |0 i; P. s+ H, j
8 H/ k* j7 |. w) K( w0 ` if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
; `6 L& y' q% Q+ U8 ~4 O pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( ?4 b7 ?/ Y2 }" T
7 d+ L, }% l! y: {' S9 W7 Z2 z
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
M" J J* X" ], o% Yand add under& M, x, S+ ]* h
. h9 t* ?" F. n$ n2 l
Code:
0 d) C2 \# p! b2 l9 a7 B: Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) n# `+ ^( t) o3 y1 A
{1 h4 U' B: ^! ^1 v$ A
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 );
" ]( Y/ [8 w0 X5 U }this7 z z0 P, h# t D# K( s" p# H6 J
$ `: E. a9 d1 Z1 O7 y
Code:8 ]2 d" K3 U R
#ifdef __QUGET_SWAP_FIX
+ C: u1 X% U# m+ @5 I# }, R if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )" v |* s2 O. g
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ o' D, K f- m3 R
3 \* ]( G. q1 n$ _6 r if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
0 [7 `9 ]7 n/ q/ P pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- R, G% |# y6 a" J7 f2 O
2 D; {+ z! e6 j9 k# T9 L if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ n5 ~; [$ U6 [# s pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
" }, c2 V0 P; a$ o
. k8 J. q: F% O#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- [- K' S5 F4 J2 T' b7 s# {% D- d3 n4 ^% n
2 o7 h* q9 U4 Q0 R8 j" r
|
|