|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% O, [8 ^8 v; Y) o% f c$ ?) DI posted this because someone kinda posted a youtube thingy about it :O.
0 {" B; w# e5 r; h3 `0 r0 v, a3 Z2 O0 p
Find this in DPSrv.cpp @ worldserver
4 _. N: c* ?4 I- a# K
8 @- b3 v3 E; k) W ECode:' E6 M0 G2 V- Q, {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). ^: N- w: ^( n5 X6 u s6 p' G( O
{
5 F- w2 f0 ~' j& k0 j DWORD nId;. H# L" q5 K8 K# N
int nPart;' N' i2 z+ h9 T9 y8 f" L
) S: D) _" x, Y" r+ Z# L
ar >> nId;+ _& A7 M2 ]6 j
ar >> nPart; 9 T+ N: ^, g+ U6 q
6 A( H( \7 P1 s/ g8 B# c8 j$ n. B if( nPart >= MAX_HUMAN_PARTS )
, ~0 n7 E2 R; f. A/ u, B return;
1 G- _8 ~' {/ e A" _& s
: @& v1 X2 y A' j$ H5 d CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- P8 A+ w" B# P8 [& a) N, v
$ T/ Q; V% P' q. q: ?( i) B8 w3 }
3 T& |2 I' H" w {
Code:
$ [1 L4 N4 o9 [% q3 I' W3 U) n#ifdef __QUGET_SWAP_FIX: V' a* p. R* a2 e, X! D
! q/ Z1 E; L' x: I6 q5 S if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 u- T* F4 Y/ W6 l pUser->SetHitPoint( pUser->GetMaxHitPoint());3 ?! I/ q( q; q/ E
8 s0 q% E+ S0 F6 t if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; c+ b3 G% k* _* ]; H pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. y3 c+ Q: L+ j3 {8 u. M
: q; J7 c. J9 l% y. j if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )6 ~* Q0 C/ h& v; O6 D
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# x$ z! W" a8 V1 V3 t8 y# ~. q9 {7 m' t7 l# w& U4 p; y5 H; ~8 [
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
) }8 n: ?+ _; Y. B8 N$ Band add under8 x8 j9 ^6 L I: u' Q5 o
& u/ y. k" ^5 I% Q
Code:
. q. O5 `2 g& L3 Z1 E. uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) k! S3 T9 m8 [, Z3 u* Z( S; m- l
{
) |0 E* ?, O" C8 {2 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 );9 b. c0 n8 D; z
}this
$ ?& p7 O9 u. T, e& ?) w
" L2 ^. P8 a& uCode:
5 |0 t2 W5 ^& h2 |9 C: |#ifdef __QUGET_SWAP_FIX4 e! t3 {% {- w5 _8 G3 I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )2 B( f, A: ?" w
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. j2 b. [: q" e: b K
. G, d% j2 a% B if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ X# |1 G% N$ q& c, v/ j pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) J* [& Q+ S) k5 n, A7 R1 F) _- E( b
- P; Y; t2 ?7 V4 s if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ @: y. x& X+ F$ j: k7 ] pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); E1 u' z" w. O" n& X& `2 z
; }5 Z1 ?- L7 |2 O#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ j" d8 [; c$ G @ s0 a9 ^6 X. N8 ^4 z0 L
! H7 ]$ U) p9 m* P
|
|