|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) i& D8 n3 n$ M7 Y1 m! XI posted this because someone kinda posted a youtube thingy about it :O./ C6 u1 {% F0 w1 e; F3 P5 m
. d+ Q/ C1 S+ m# QFind this in DPSrv.cpp @ worldserver
4 a$ k/ D" U4 W7 c& ~; j3 F9 b2 k7 f' f9 t5 A
Code:
# q- z/ a7 f9 i) {& ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* m8 f8 D" H# d) Z1 f0 O1 |
{
, S0 n8 A' f) }. N. N" m3 j4 V DWORD nId;
/ |6 _' A& }( C6 L2 H6 R9 D% p int nPart;
7 Z2 r$ u' C5 J
. }8 W1 I# B1 C( H ar >> nId;
2 ^" y# |/ B1 e0 ?7 ]# @% e ar >> nPart;
2 g6 W0 E. u# |+ }# o1 |! D ' ]/ S- [' A2 y7 A8 p" R
if( nPart >= MAX_HUMAN_PARTS )
9 v4 t, t* {7 L; K b return;/ J- m$ w( r' Z6 @# ^" { p' E
- l# x; ]3 B1 R5 W, r5 O5 [
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' Z- E- f6 b& a3 W. u! U: f T; G) ^2 i% F; g
$ [& X5 R6 }1 [2 MCode:/ Q3 Z( G2 J6 a1 `1 \
#ifdef __QUGET_SWAP_FIX
- j# j( q, Y* F1 j" s) R( O1 z7 p y. z% e9 x9 s) ?
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 Z$ T; v9 r6 G/ v, G. g4 h. H# B
pUser->SetHitPoint( pUser->GetMaxHitPoint());
" w* s+ z" |( a
4 t1 J5 p9 {8 W+ d) _ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 u: f: c9 ?# P$ b3 [ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ n5 ]( M+ K. y) @, G! H# a6 K
+ J' Y- B0 @ U2 m! B- C if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): H) w, {- s" e0 K {
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, i$ ~) x% E, |2 f0 ?$ ~4 Q5 r' [4 \" K. U2 ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 p8 E7 ?/ M" L
and add under7 M/ x: y* r# z; P5 U; k6 U6 p8 Q/ D! l
3 N+ h9 y5 c- d2 \; t4 v' f7 gCode:, F% |3 z% ~) `5 m1 A; Z+ |
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; q: q9 u; w* v! r3 _ {$ n* y1 S( A: N1 e( i6 E5 {0 D
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 );$ V/ N0 u7 X" b9 O, ^. y' c2 Z
}this
; S& X" T5 Y$ A9 @( N; T; k* R3 V2 y( M, Z3 @
Code:( l) T8 `2 O2 X* {
#ifdef __QUGET_SWAP_FIX
7 p R% }& Q% y9 y if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ). T5 L) J4 f' S/ W6 f1 i9 s3 k$ K
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 H5 H) T) `& | C7 [! Q
. Z! `9 n% w/ n6 B if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )0 j1 z2 \! T: Y
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ B# S& s. r: p3 _
4 U7 R* f2 N+ ]2 ?3 `
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* p5 H' V8 W0 X7 y9 p$ F B) n pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 p" {5 |' ]4 G9 f% M& V9 s& m
1 Q3 q, X6 @: n9 H2 ]( R#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 |2 x D: {/ H! N+ ^* Y
9 p& U# j _1 v$ x' Z9 l
& M& f1 \$ r8 C2 ?) M |
|