|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . A/ ~9 O1 L! c; M# ]/ d7 h
I posted this because someone kinda posted a youtube thingy about it :O.) |2 ^3 ]" \! \5 U0 {! }
; ^0 z U8 m( B2 Q
Find this in DPSrv.cpp @ worldserver
# C. x" y: [1 B1 p$ L# y
5 {, i5 @0 ?& u( [ wCode:% R& i/ S7 B) p; ?8 {" S8 o
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' w( ^6 B, V' s% K6 [. h
{
2 K- h& g3 T( _& v DWORD nId;2 `6 Y7 L- q B" j! ~) z1 D X! C
int nPart;* n1 D0 g" p6 L: A3 p2 \
; V% l8 \7 m# v* w# a
ar >> nId;
2 ^ C0 @. _& F ar >> nPart; / i; `9 K+ N6 L- t! W
3 N5 ?( b0 D0 i X1 s if( nPart >= MAX_HUMAN_PARTS ) " c- s5 Q# ?6 d" w* d2 y' d) t
return;
0 Y; p2 ?0 {$ z' F( E5 v' O% ~; F6 x; X/ d. Y
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( I6 ^' E, \7 `: ?0 i
* G d% w% W7 M. V5 t
1 l6 P# _2 r, q, @' u% V& tCode:
5 S/ h3 X8 K5 x#ifdef __QUGET_SWAP_FIX
$ i8 `; z& H$ x
) L. F/ c6 \+ Z# Z if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 y7 m0 U- B! C* E; W' j! Z
pUser->SetHitPoint( pUser->GetMaxHitPoint());7 i- a4 f& B" t( h7 Y
3 x* ?. j$ j, i0 h if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
2 G( `# t2 s& H. ?* n1 R& e pUser->SetManaPoint( pUser->GetMaxManaPoint() );- | h& ^7 T5 _; f d1 s+ Y
' j* y" f# J) e- X2 ^ X if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 E, a. Q7 f+ j/ q2 L- e/ w pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ O4 m7 b( q L
: E: `" `- ]! Y' C
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( @$ F' T# n @: h! Nand add under
$ D% ?2 V) T& q7 M# F; Q( J( U/ u! k; I
Code:' V& r, q3 J" y6 u2 i+ L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ }* X4 d# O) |7 I% C {
; I: Q8 N3 x$ v, y 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 );
' y0 O6 Q7 f, d. b4 D }this' D! X& m4 m7 p, Z1 S
6 q4 P8 i% H; I. y; qCode:
' b: W5 ^! b/ O, m4 ^7 ^#ifdef __QUGET_SWAP_FIX7 }$ D7 A- u; b; k+ d& |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 j$ K5 H# Q+ x" z# j pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 ]. B$ q) o$ d. Z+ C
" s, Q+ @& @ w1 ^1 ~' k if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); ~+ V$ _& y6 R4 U' y3 K2 U
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 P( s9 ?/ N; [, ]1 \
3 r/ ?9 [" z0 l/ q
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 A/ T8 F! U* t' e1 U& k
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 `* ]6 J1 L1 ~1 n: |: y r
" d7 s% }* @8 P4 A: P) M; d/ n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * A0 i9 h# h T7 ?3 e h" X4 y7 Y
* I; c' b( V, f6 f1 Q) l$ I
: R4 [0 a" {1 g; A, F
|
|