|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 i% w0 g) `: `2 }$ e/ K
I posted this because someone kinda posted a youtube thingy about it :O.
- A4 @. p% b/ ~4 r# E) V" I' \0 ~" c; A' }: g7 F: I
Find this in DPSrv.cpp @ worldserver( P A% N% Q9 x3 E: a7 t
7 A; _' _, K4 ^8 E( A- z& OCode:
. J k& j# M: M& T7 h) a5 avoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! @/ ]8 @1 l8 N; N1 q$ _{1 H# ]6 a& @7 f& R2 e$ n- C+ j# n6 d8 t
DWORD nId;. g( Q; O( p0 G, U) o+ |5 p
int nPart;# a; L* ?4 y. p# p
( X! R4 V; t3 l
ar >> nId;
" S# a6 N+ c' o: k ar >> nPart; S8 I" K/ M8 P0 [- I( y& F- D
" ]5 E4 ^; P. G
if( nPart >= MAX_HUMAN_PARTS ) 7 K$ J* p) h: M1 P" N) D, [% M& v
return;! u6 H; s5 o2 z3 {7 I; E
4 ~ u! B) q; d9 E4 L' _
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
/ ~4 a$ J# M. E- f! w" J" _) O E; I& y0 r. N* A+ N, N) L
/ X2 t2 M- Z+ O# y
Code:" E$ G3 |+ N: }5 L. `
#ifdef __QUGET_SWAP_FIX9 |2 c. }1 l) l3 M0 P! j8 P
2 `2 t; j7 E, b% x" p5 {; Q5 b if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 B: E0 i- k! b) T" [; c% ~
pUser->SetHitPoint( pUser->GetMaxHitPoint());% e( y. V% D& E2 l
- T& {6 n5 k7 P5 y* `; M
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )* p. Q* m1 S/ X1 S1 I8 `4 n; Z f/ Z; x
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
; h7 q4 R' p- X! T/ t& \( |" _, t8 X' Q4 Z- [8 X3 d
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )# H- g n# a; }1 ]" R) J6 a
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 {8 h; t+ w+ M. M0 T3 y9 w- c% a* H* l' a- B0 a
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 ^& l2 l$ L' f ]
and add under: {+ y) y4 Y- n
3 |. g8 U7 S& |4 h0 e9 eCode:$ ^# {- l" z7 [; o# i# c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- y& b3 {0 A* f( a. H
{3 x' ~- h/ _; z4 V! h; C
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 );* c" ]; E& o0 S! Y3 g6 `
}this) ?1 _! L7 M, `" U% B5 Q& T8 j
% B; L. s* Q" k# n/ rCode:# _( f I) w6 M: D z8 P$ m- {
#ifdef __QUGET_SWAP_FIX
6 T H& g. J) V# R5 H" c$ @ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )2 |: E( n. t+ w, F+ b U8 U" s7 v! ]+ ]
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 N) l( g7 @% [0 \! N5 I# O* Z
8 g) Q0 |! Q. v4 y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )* O$ k8 _+ r; {$ U" ~! k# Z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
' W/ U0 y a b: u7 @ b# i, R8 Y P6 O2 |4 k4 e' v6 t8 c* V" P
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 ^+ V; d% @( w3 y- y9 a* B; w pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 V) e$ \: Z$ W# o, ]- {
8 I. r% P6 p7 {" g2 S+ O
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 y- a, |! F: c# \2 ]
- t# t: k, k4 m( @
1 x8 b: ~2 k# D9 x' Z3 B& c9 _ |
|