|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! f% K! T1 A5 ~9 y* c9 y2 a. D% q" jI posted this because someone kinda posted a youtube thingy about it :O.5 R+ U# }6 j5 m8 K) F* X/ S
7 b q* S, U4 U, j& \7 tFind this in DPSrv.cpp @ worldserver
! Q% B i7 m7 A+ u* v
2 O! D+ H) o8 O G6 [( h0 ^Code:
/ w- N) e, H7 s3 E# J3 C* rvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 l5 p3 n9 x9 G% ^5 T% F. v J{
! g4 v5 L P' j- J0 G DWORD nId;
$ r* G- ]+ [3 A5 D: c9 C* z int nPart;7 S& S; {. `/ U
- j4 O2 c' ?. n, u7 |
ar >> nId;
6 M. u0 b& @5 K6 u9 I( Z ar >> nPart; 5 G) M( s0 ^; i4 r) H
- N ^1 x& i+ n" \& [ if( nPart >= MAX_HUMAN_PARTS )
6 u- U! {1 L5 D& p return;( E7 ?; ^, f# o6 ~+ c9 f
4 s( \6 l* U! f5 s6 J0 E+ _6 i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 S% a- A. c1 `
' z+ b% h, H) Y0 ~$ \6 i- O0 j
0 u$ \+ \, p2 q" o4 z( k! O. t+ p
Code:9 H$ m" m- P) v4 E; J
#ifdef __QUGET_SWAP_FIX+ \: ~! M$ t3 A
* }' }5 l q% p4 z
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). D7 o7 A; h( H4 }* L& m
pUser->SetHitPoint( pUser->GetMaxHitPoint());0 f' ~) @! d( ^1 w3 K$ P7 D5 ^/ l9 c+ v
+ o9 x* I5 E: K% k1 B if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( ~5 D6 c( p. j
pUser->SetManaPoint( pUser->GetMaxManaPoint() );( s/ U+ p E$ W* F6 e! x8 ?
" ~5 G. V* S" [8 k j3 p% v- t
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- C& Q3 H2 q1 Z
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* |& o1 F; A& F( b3 k( o) t$ u% K5 }
* L/ x& Y5 _6 q2 N2 r- y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( j5 `: @% n# \* Y
and add under
; @# q+ e: a7 c, p1 J, N. k
) H2 H0 E. {# aCode: n: O0 m. U. h. e0 ]3 S$ z: I. Q0 {
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
# i/ B# T) v9 t0 L1 l+ S2 A {3 K9 q- T% F7 o2 R5 N
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 );7 D3 w+ X v0 L( ^5 J7 w
}this# j4 v& i4 i4 I; s) j( O3 Q
- o/ e9 ?) h6 K8 v E
Code:0 T9 m( c0 ]5 l$ f
#ifdef __QUGET_SWAP_FIX( R+ k& z, b7 |. l) R
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( Y% y8 k6 Z6 k
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ Q& O! w, |& j& r: d# Y9 S0 n' t+ i
0 |/ j! O6 n' l* ^ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ J; y% a5 v6 m, ?' n+ N pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; Y0 N" x& O0 w' J4 I( k3 p& _% M. ~# g8 |/ k6 J- K
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 O3 j9 e* g e3 Z pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ }& |8 Z* O- n! g/ _8 k. T8 H8 y6 \" z+ E6 Z5 F7 x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 H4 L3 e- B, T+ F4 x
# r- u$ ?% g) c8 l: x* _7 t1 H) _7 H5 B
|
|