|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 w# F h- j3 H8 A# w" }. U4 @I posted this because someone kinda posted a youtube thingy about it :O.
- `' e [1 L, _" k6 }( Y" M' o' ?3 D+ [+ @
Find this in DPSrv.cpp @ worldserver
' I) Y5 H1 q* a& X/ w {$ z1 v" z: y: D: b2 V
Code:
( ~- X/ K, n, u- | w& Q( ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ }" A" l0 `! g$ X( W; z( H
{
4 U# l( n& X+ n0 G DWORD nId;, ]) m. v+ j" z9 u. V# L, F
int nPart;) ]. D( D' i8 y
7 d" }5 u( C0 F9 K4 U7 n ar >> nId;
) s) j. l! e* z, `; R O ar >> nPart; / w! l# V8 N4 x- _! T
' e7 }; }) E9 e$ v! ^8 n7 F: i if( nPart >= MAX_HUMAN_PARTS ) 0 M7 T/ K) E( A$ R3 g
return;
' x% I. m3 J, Z* I
/ I9 @1 K$ `! R* M CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 |- x4 @( g* X' K
# x( a9 o& R2 Q6 \' ]9 k2 {- s; R6 n3 `
Code:
1 v3 S) }( u# Q2 z6 L+ ?#ifdef __QUGET_SWAP_FIX' s7 \* C' M) A7 {8 a
/ q0 f: L0 @+ Y6 S! L* o7 k% { y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 ~4 o* r+ H1 v4 Q8 \
pUser->SetHitPoint( pUser->GetMaxHitPoint());1 `& d9 y5 p3 Q, m# n" e
! A/ @9 i% a( ~5 b if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# {" S# Y5 _: `2 d pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 q; G9 Q# u6 y6 U7 k
! p: `. @3 c) {: m. P4 D if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )8 |, {* l( v8 I5 _) K3 E+ P# a
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 x0 J/ I, B) b+ H. u
* ]6 z0 j2 W- l9 q+ G
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ h; F: S9 Z3 h; H e" f% w+ H
and add under7 m/ n' L3 o: h; ]2 ?: T
5 j* Z4 X5 ^6 H3 a+ y
Code:
4 O5 F& L$ c8 ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 ^8 v0 H- W9 Z0 y3 u. \
{# W( {' w- s& R t! w# C
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 );
) g1 g2 U' y) Y% n' ^: W% h }this+ G$ R. C# i) q- z% y5 r
# j- Z5 ?* Z5 d6 G& X! y# |% wCode:% k6 W& L0 x# ?" S
#ifdef __QUGET_SWAP_FIX
, {' \8 m2 _7 d# C& J+ {0 J+ M if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )' i1 L/ b# O3 u" Q5 _5 |- Z4 |% r
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# ~( f, h ^2 Y( E n
+ N) Q9 b& y& K
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 r9 q7 b5 c- v2 ^
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 R- T5 Q- I$ Z
7 z$ E2 m# G& F- @& B& k7 a if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
' V$ F8 @$ N) C) V0 k+ m" S pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 x0 z+ x& ~- s2 d+ Y, B# ?: s; ?
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # M _: U0 j+ |, k+ N* ~* n+ O
^4 W9 n/ w# W5 x9 G
; L$ {* ~2 H: j- @6 C |
|