|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 N" U& \5 b4 W( S9 B$ A) {) u2 bI posted this because someone kinda posted a youtube thingy about it :O.6 v: s0 V% _6 V) }, s c
7 s# ]0 j( t1 U- `, nFind this in DPSrv.cpp @ worldserver9 l& Z' ]( J& K/ p
' w$ O0 T) s% m% Y B- G6 b
Code:
% n; P% V0 ~4 `" v& R4 F! ]void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 R# x9 [9 {; e, E/ P7 Z) d{/ a/ {% U A2 L5 h% M
DWORD nId;
/ v7 C7 G/ ~9 w9 _8 H' r Z, u int nPart;" h. n q$ W8 j; Z4 |+ k; K
: W; U+ H+ D/ q ar >> nId;" m& g& \9 `6 t) h2 o& U0 h- E
ar >> nPart;
8 M* o0 ]5 c6 Z8 \& M1 W: U$ v+ G 3 I; b3 y# ]+ {( l4 R
if( nPart >= MAX_HUMAN_PARTS ) & X9 @* Q U1 A* C. O8 [
return;
$ Y! Z& x6 |$ {8 B
: B$ e+ o, F8 T2 k+ G) ^ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" U& x+ c0 f$ x6 ?1 {- o
8 Q( Q2 \. c' s O3 t
* w9 f; _5 X7 N* Q2 ~9 v: ?( PCode:
! b i& [1 `' O#ifdef __QUGET_SWAP_FIX
$ o8 f2 |8 ]) v) l7 W* D( q; J% B& V3 ?
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )& S6 \7 f. n6 g! }0 [% S" A, x
pUser->SetHitPoint( pUser->GetMaxHitPoint());+ U& c; X$ {7 Y
- F$ x% z& C5 h; r4 [
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): C) T! B: g: Z% R, Z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# H4 I3 {9 A0 P8 R5 `+ N) F/ V6 n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 H. i/ m' i U% C pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" L3 D* X: t- _% g( r+ m ^1 }
! W3 S3 ?. g8 [2 j# U; V8 R l5 g0 R6 t#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* s8 H* g9 C& T, e5 f/ h+ c% {
and add under9 p: S' x! w8 I0 b+ N
/ m9 D2 w6 j6 ]& i; @9 [# ~
Code:$ z0 @6 U- |; n O+ U; `4 W; t
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ u1 p0 ]( L) d: }9 g { `+ | [7 k7 }7 ~$ l
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 m% D4 q, \1 o; i! o7 \8 p B1 J1 g }this$ N# A& n# o$ }9 y2 E
. W0 i2 c" J1 h& K5 ^0 b9 PCode:" e! [' x6 a1 u" w( e, R& L/ b
#ifdef __QUGET_SWAP_FIX$ C, A8 C. i2 P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
8 h0 U J7 j# i9 o: }; p% l D9 I pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! _0 V- g U3 W7 W
3 N5 d/ o* G' V. C) O# V9 D if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )& ], a$ s, i# a1 B! T* p
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, \5 I3 @8 G1 H; y2 Y. m2 u
c/ @+ `' e& A& X9 u if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). T* Z1 `" ^2 j
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: Z% U. H3 S' `
( e% n0 `! g _: f" F
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 6 T! ^) o1 A" `5 _& X5 v: e
. s0 k8 A& p0 {4 s; t8 P: n9 o
5 U6 F$ _* D$ Y3 j
|
|