|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% ~3 w" R2 d; Q* O4 {I posted this because someone kinda posted a youtube thingy about it :O.
# P+ ]" |1 `% n" H6 {. e$ N( X( H& ~3 F& D4 J7 T* f. I
Find this in DPSrv.cpp @ worldserver6 s! U- R/ k% ~% `# e+ g
* d1 `6 H5 F8 W& t# gCode:
* k" [0 L4 a& v1 P3 k4 Z/ hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; v2 t6 A% n0 @9 O' l! W/ J! ~{
% S! ?" a3 n" ~) P DWORD nId;; {+ |8 W) A/ B* S! x( x# F( H
int nPart; e [! I& p: i6 J
5 F2 M+ a V/ R5 s: Z" _ ar >> nId;9 i3 Q5 ?6 f9 I- Y" S' ~7 t
ar >> nPart;
# J( [' Q' o$ ]$ I: D: Q9 O6 _ ! i/ D3 H, Z' P
if( nPart >= MAX_HUMAN_PARTS )
- @) d! w# s" P return;( R- R' j/ N$ b5 B! e6 u/ {; s
' S; S. c e2 z$ d0 C, m, {6 q9 x/ M CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* c1 ]. J& L$ |' d3 [/ I- K) Q4 G Y
" W" w( i' {1 |4 D' |' E9 Y
Code:
7 Z5 \2 y( ~* |% k#ifdef __QUGET_SWAP_FIX
$ J3 i6 D" N- p E' N$ D0 C; p* f) a4 q+ ]# k8 x* O" r9 J
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )% m) w6 l0 T8 C2 `' ^
pUser->SetHitPoint( pUser->GetMaxHitPoint());0 S; ~ a3 e t; z
6 c1 D; E; n6 }: \7 y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( q! v8 J7 |1 Q8 C# H9 E
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) ^/ ?8 Z# C0 ?$ K( U+ p
% `" ?1 B! k; q! C5 t. X9 b if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
: X: f9 N4 C; r, O4 R pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 m2 |6 j; ]. G/ r2 a9 @: J5 X; n/ j" F ~' L& O+ _5 g# _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 X9 M% d: W7 `and add under2 H. U0 i" D" ]
: L0 Q- O9 n9 |! e# h6 f4 g0 cCode:. G8 ~% y1 r) ^
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* c* ]6 J1 n6 L+ O; B. ]1 [ {
8 ~* W- O. l" b# _9 | 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 );
% h9 Q# u' ]# U |' \ }this- Y& m8 s3 u0 m4 [4 |* v
9 O9 s8 r. N4 V3 U# t
Code:
4 z2 o% E( M8 E2 d' R# e4 Y2 s#ifdef __QUGET_SWAP_FIX% O9 ~2 E# m0 W7 L! \* e
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )2 G: h* t% M1 S" w& ?' Y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& L# i- d4 N: x( }
; i* p( x/ h# @/ x. B2 a% F. z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" i1 [* C s( V+ r# B pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& `* B/ h' o3 a
3 J3 i" _1 r2 P- [) ] if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
3 D( D s: c) @9 P/ N4 Z% ^ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 C9 C3 m( E( d6 |: t( g; C7 i! I5 v( n% d) _4 R+ z$ r2 A2 ~
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 q' v! A' o6 s7 f: [7 }5 C$ t; u$ ~* V3 O
5 o! u6 F1 I, ?$ ?4 U2 N" `3 e
|
|