|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" d# W* c4 s$ m5 x4 rI posted this because someone kinda posted a youtube thingy about it :O.
1 C# [$ B2 K3 Y, g8 u. W# g
( S2 r9 {# Y! _6 K0 BFind this in DPSrv.cpp @ worldserver
. x6 e+ Q3 Y3 q. n ]& E9 @2 H2 j! c$ j4 `2 ~
Code:' R0 t& s- I: o5 L* _+ _
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), Z3 Y: G: ~5 d2 Q$ ?4 Q. \+ l
{: k6 {: p) P: O; ?" r4 V
DWORD nId;0 B- b! Z4 B/ h4 P- n( ~- n
int nPart;# c" L: V2 x; W9 ]$ U3 H9 c2 n& U
" l$ ^ o* ?# W3 g) V6 k ar >> nId;
$ ?, D* ` K' }' q0 K8 v3 X ar >> nPart;
/ e% B! t- r6 ]) I* y; s
5 Z6 f$ K% E! r5 V) y6 o if( nPart >= MAX_HUMAN_PARTS ) / E: k- V8 ]. x% e2 B6 a; c
return;
! Q+ ^3 i; w- ^" _" X, h4 L! E7 w! f- g+ K+ ?: `( z& O
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. e; A6 c8 {8 f5 n' W0 B4 g @% c; E- e& L$ T
) j. _8 g% L( d# ^+ m
Code:7 C/ }9 p- y& V% N. h+ K
#ifdef __QUGET_SWAP_FIX C5 |( y: }8 V" `: N
/ S( z& ?7 C: k0 |1 c if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 X4 d( B* P* R" b( _6 q* Q( D
pUser->SetHitPoint( pUser->GetMaxHitPoint());* ~! ]. N9 ?' C, K/ t
5 G4 c' Q! a- ?. H if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )5 f" o' X$ p% J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! h: E6 o- x9 N% [7 S1 z
% r X; M! Y6 @ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 r+ e( O8 Y% F Z2 S5 l5 J
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ v& R5 { P) x
/ c% ^" n& Q8 z) C- ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* L s) I1 t/ A$ }; I r5 ?6 o9 P
and add under
1 _$ D) H* H+ L" l4 G7 F
! h9 I4 o& _. ^0 h! b1 pCode:
$ C0 J3 Y' }$ Q% C& K* p# _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )3 q6 D2 r# d. U
{
4 Z/ |! @ k1 F( M4 k8 E5 D 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 );8 V6 \* P5 u. S# z* Y6 M1 o
}this
- c6 L& ~4 m+ w( U3 J1 p( R2 s3 _- v3 G- a/ F5 B8 J
Code:; B( O4 ]# [7 H4 \2 I+ k
#ifdef __QUGET_SWAP_FIX
( U% Q* P0 R' m: A* i if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ h/ u! i7 u: Z( ^6 O6 E
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ P# V7 N8 E- L6 Y" A5 `5 i
2 q1 p! g8 D; y9 M+ Q& e# Y- s4 w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 T: A6 f v; L pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 x6 g# l( s1 ~0 E* L/ V2 R% m( B- N+ h' c0 j) A Q
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, t) ~; y& n$ I pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! e* _5 G& A* u1 B! z
* q9 m! h/ D" Q, g( l9 F) B: _% ]#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
v U6 O2 C( X0 b, |
, V% a. x7 d% i# b% K
7 r- j2 A& G5 @; V A Q& ?( D- k |
|