|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# T+ g/ Y! W6 x4 |I posted this because someone kinda posted a youtube thingy about it :O., }/ L5 i; m) h7 f0 I2 t' f
9 o/ Y6 I/ L1 A
Find this in DPSrv.cpp @ worldserver' p+ o& w2 a8 r$ G. J0 a7 t4 @
" j8 x9 c, X- T8 kCode:
5 B5 h2 v; W4 Y, e) avoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- v1 Y' F& @4 A8 @! T/ N/ x- }( d
{
[1 z4 E* I4 n$ V3 w DWORD nId;
; W, x$ J! D! ~! v# u int nPart;- `& C4 y, n4 u, b6 c) j
6 F* m9 a4 s3 w% T/ {
ar >> nId;3 b4 q- d2 F. l" r# h1 J% ?
ar >> nPart; ( k* J* Y! a9 K7 Y" A
1 p6 V- W; O: Y- h
if( nPart >= MAX_HUMAN_PARTS )
$ } b3 b) s! i9 G. [, y return;
! i( \3 z+ e$ s; J. W4 y
# @; _! C+ z; |% G0 J/ N CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ @) A B. d K8 e9 e! Q
' P/ f% Q5 L' W0 U [; [3 J
2 [. D/ ]( f' j& `8 }
Code:
( o8 g8 F8 j5 L) H- S Q#ifdef __QUGET_SWAP_FIX. E. ]: Z9 ]7 r; m. f) f+ n$ p
( O& M. n% u2 T3 @' \% |1 Z
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( s, {& k8 ?- G, ]5 a
pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 i1 I" N5 z) r% y2 x, i! Q% w3 D* q- w( F) l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )$ H0 Z- _$ N% W
pUser->SetManaPoint( pUser->GetMaxManaPoint() );6 a3 q* {$ X! Y# R0 @7 \
9 e9 r) D4 x+ t! S7 \8 ^ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
9 s! m- j0 ]- u& k1 R- ?4 @ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 s! o X* H) `& B8 D* e. R
# m) o; q+ [4 Z
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 {+ \+ U1 b% h' {' kand add under! W: k" u* }" \+ e8 P) t. j$ ^( N
" G8 d" k6 z8 ^Code:& k" c0 n ]1 z3 w3 ]
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' }$ _+ H0 [" q {. ~3 p7 K; L4 G- d% U
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 );+ k1 W. Z+ M6 J
}this7 n' S: n& r( i9 r% u& `
, o# P1 \! _2 ? w5 ]* u5 WCode:( A% c( r1 I% `: m
#ifdef __QUGET_SWAP_FIX* a3 S# `/ ~$ g
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) d y" a- W" v0 W1 D. X
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 }& a/ n6 ~5 ?6 j0 U5 ]: N5 o
5 `, q/ C# T: G* C+ l2 g if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ [- k( r, o8 w2 p
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: ?. N3 {/ t5 z( {
; t: b4 }: E4 K if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), j5 @ m8 }6 }- R0 }
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 u* d- U3 d `1 x' `7 p# k G! y0 z$ L" L0 R
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 J+ U! z! @5 ?( a) t+ S& z
! r0 Y! a- H" `* k$ j2 m# C, s. ?* E. z- x) N
|
|