|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- N( t! `& Y, `+ @5 E) TI posted this because someone kinda posted a youtube thingy about it :O.( l# b' \2 U+ |* O2 T
" s' X. S0 t$ w+ f) S
Find this in DPSrv.cpp @ worldserver
! U2 R" Y; _; l/ `$ L. M8 W1 Q% i5 p8 g. ?
Code:
+ {. t( i1 [0 p) Y( s7 xvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). ^% x% W) g( h4 m9 `* B
{
8 O+ Q' ~( z. w; z5 w$ ]/ Y/ | DWORD nId;& e# _! Z, m4 j' ]1 }4 [% }
int nPart;# c& N; E4 x# \4 \9 h8 n
5 Z* j+ s) X" s7 A4 [1 I1 Q ar >> nId;
3 `6 O$ ^" H& @4 W/ ] ar >> nPart; 0 M. a9 e2 V, l6 ?! W3 C/ m2 F
4 X9 C% x# L, g5 X4 }) X if( nPart >= MAX_HUMAN_PARTS ) ( l( B! j) |* O) E/ z$ G+ I/ l
return;
4 N7 Z8 L) E+ G. K8 s1 \; ^% A6 k+ M$ j# m, b/ \+ C
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' i3 e" m; o: W
7 G. [9 x4 f n( r0 v
- q3 Y7 P, e9 Y9 s8 D$ i; ^Code:
5 L9 O8 \- y( p; H7 m0 v, a3 ?7 y#ifdef __QUGET_SWAP_FIX# b7 e1 {+ W: W' Y- e! u. d' @
$ y$ ~( T; }# z, |3 R/ |
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )+ h( Z/ \2 S; T% h. [# \
pUser->SetHitPoint( pUser->GetMaxHitPoint());! K% k1 Y) I: c2 S
6 V5 i0 o; L( v5 x, V/ E
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )" L, ?2 c5 A+ D5 e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );, h+ S$ F% V, c0 }
5 y- q% _) P# \) t# |$ p3 Z
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- c$ D& e# _. R" z* x
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; }0 V& L5 |8 a. \1 _6 e, C$ {
3 y- u6 m& N6 m3 V#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 ]6 ~* l' i, D, f1 jand add under6 F6 y6 z% I9 b8 c1 }' {
: v; K3 Q' t; P7 Q& x; \, U& Y zCode:2 U( {5 `7 R5 f2 u h- [$ k
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 T, K+ q! ^2 G* q+ i4 k% R
{$ |1 R$ S4 I5 O" f8 d% d- O: j! a9 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 );
1 Z. b( [4 p6 ~5 P }this
+ T- [7 t. Z$ f$ g( d/ J' z; a" g$ w0 ?: ?7 r& U
Code:1 a& Q) m5 l5 A) n" n" R, K ?# _
#ifdef __QUGET_SWAP_FIX c8 A t8 \3 C: {
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ x& H9 E& o# t7 C
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ U0 e* y! r; B, {2 |
/ t1 l \" C! p: A+ X
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 e( m* r" p, b5 m' C, }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* c; k/ H% O6 e8 S
" N# k+ X- e, @8 z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 ?' G! }* q( Z5 z6 e" K8 X
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% j1 l$ Y# O+ T0 R+ M6 Q8 t# g) q0 p; h; M6 _- L* q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 q- A9 p( |$ O6 }
) ~2 _+ {5 e) E5 c- @7 g/ O
1 s6 g5 W1 _; d8 h: | |
|