|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; ]4 o0 S- F( xI posted this because someone kinda posted a youtube thingy about it :O.6 M; g( F5 e2 c
! J! M- L' c7 F& B2 l& y* m7 _
Find this in DPSrv.cpp @ worldserver
. r9 `5 g- D7 K, v3 z1 N# h. v- _/ o
8 K9 P4 y! c( P; SCode:
# }) p" h; Q: c u4 T9 o. ^void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
+ ?3 y! x: v* K9 ?+ K{4 z0 P5 l5 E6 E8 S, c. D$ N5 [1 n
DWORD nId;' ^0 e# C3 d7 P
int nPart;
# K- o: j; X0 J. }- o4 M, E$ J7 i
0 @/ {9 N( v+ o6 }4 e0 E ar >> nId;
, o9 u$ }( i( H# a* a ar >> nPart;
& s. ^0 v- p7 j. S: `
5 T" m9 d6 o8 _# a% G/ Q, N& @ if( nPart >= MAX_HUMAN_PARTS ) % ~' J Q, W$ R
return;# b* O( j) a U
% j, }0 S7 B2 w5 p CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, G2 ]; N3 b( a2 G3 K h4 L) ~3 Y
7 [8 N7 d; ]) }0 Q [
: T: [; O& n- X% g) W) HCode:
- a+ _( ?3 `, y l) z; G#ifdef __QUGET_SWAP_FIX5 U; V4 Q8 `; @0 v4 Z
: ^; t9 Q9 Y) ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- A: {& S' ]6 G, ?9 \ l
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 v G' h' h4 _( i( p$ o
( b! U9 M+ Z, j5 h2 M0 j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 z; j+ V; p/ k0 G9 m/ ]
pUser->SetManaPoint( pUser->GetMaxManaPoint() );* @# ? W! W0 r# E. L% p
( I& s0 V I5 `: w1 n+ K, G1 U
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
6 U" y/ k( [- n0 q& M! a2 w* h pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. a% i4 d& A+ E" G6 u6 g! E6 |* D! F8 c
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
`/ `+ P% K& ?and add under3 s* m- F+ \' p% }, Y
9 e7 S8 S$ `" F
Code:) J5 \$ W2 l2 [+ [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 a) i' z! Q( W5 ~2 F1 M; F. r n {
; ^7 O" g$ d* X* Y* w2 @( j 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 );& [( p4 J# V: |. t% y4 ~
}this
! `. Q: B5 S$ B. t; u( m& ]# A7 ?% A3 Y% k
Code:
! f! ~1 v* U, @#ifdef __QUGET_SWAP_FIX
0 g, @' ^0 z# ^, p6 Z3 L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ); B. l3 J0 |) C$ _- S& \
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 V8 a! l$ G( a# d- h. W( `
4 A$ M A& u/ V( ~ J0 g: g if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
2 C- w, @& f2 i8 q9 Y$ b; R1 Y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 N' W7 O$ [3 p" A* k2 \
0 t% }2 ]/ f9 |& N' P" g1 c1 z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
y! }& l6 r% m1 q5 i+ ~# k+ f pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: f/ v5 E+ x! F9 n8 m6 Z( Z7 Z
$ g0 S0 }; b. l4 G#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' x$ k8 O) V% n4 V$ K
# F9 H8 v$ n9 y$ c
2 m! u9 t) Y. s+ m% _. h" K
|
|