|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 B, ]$ N+ d& o1 v3 c) G
I posted this because someone kinda posted a youtube thingy about it :O.
, a1 R4 L) ^1 o v
7 U( b3 E' m5 n T; B# m9 BFind this in DPSrv.cpp @ worldserver6 o- x: R- p, f
* X: S( p1 V% u' b, CCode:5 }' F% @, d$ ` l# C" c, p% F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 Q& r$ L# q. n{2 [/ P8 v0 C8 u% H
DWORD nId;
! T( c' }( w. U int nPart;8 A% M$ N' V! M
/ i( o5 {, j, |2 c# \$ u, o! r ar >> nId;+ G3 Z& Y, s, E: J4 J
ar >> nPart;
9 e& M8 }1 U/ p% h % Q) K2 Z2 }, r( e, c6 ~' i+ y
if( nPart >= MAX_HUMAN_PARTS ) 9 Y$ h3 H1 l1 G D2 U9 q) K, G
return;
* O! G$ D4 p% W( y! Q& }- E% \6 `5 V* I* o9 S/ I
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 w6 H, o j2 v+ u
* X, f) u& \; x* G8 d1 C$ B3 p7 p' f6 P R2 I* Z) V7 ?# k
Code:8 z6 Z: q# A, `) v a, y* I( o6 k9 V
#ifdef __QUGET_SWAP_FIX
4 I; O1 I3 |. a
" A4 l7 S8 o% F9 d% x# F$ I if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 U5 j/ E8 M1 P8 n
pUser->SetHitPoint( pUser->GetMaxHitPoint());, e, p* B) m6 K- X* B: E; `
+ b: ^$ o! p& r if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )7 f1 J5 q: Y* B9 X
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 g, d* k8 A) t, z$ s+ }6 _
& T& P8 J8 K7 b# _- L) ?/ } w
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )# S2 r9 N3 \% n: e" ]& T
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ N) Y" w" `7 P# c) ~+ X) m3 w
/ L: k2 p! m2 C) m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
1 A5 |; K8 w$ N1 gand add under2 h. Z+ ?7 f) I6 a
' N f. ]# D# l+ uCode:
- ^7 F4 Y; w) C' r/ c- qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 E4 C. J# j3 V2 `! R {! ?1 O0 h/ |# X) k! k I4 L7 `
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 );
' r( X- r+ A1 C0 x }this* l& T# j+ L" P2 A% e" q' I
& r1 [9 h" C# ^% `
Code:- y- M( [ f/ L$ [/ h! ~# V7 P: r* ?
#ifdef __QUGET_SWAP_FIX$ j2 j& f9 M- J4 ]/ ~, x, O7 q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ o; N$ C3 w( F/ b
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());: k3 b4 F* [. S. {
4 f( M5 }# L9 G; r
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 Y; [3 J0 `/ [9 w% t9 ]! j1 W7 b pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, ?+ E, F$ a3 b G- M9 }/ L! j$ P; [) U
+ @- L! ?& ~6 x4 ^* j* | if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& g' A& {9 I, m- t* [# E( N( H/ q
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 J3 J. {; G6 }2 F" u$ `7 m; y0 i2 A3 I" N
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 _7 s* G6 G6 \3 f
2 a; g5 E& {, N- k7 ^7 C! u
7 F" g7 b8 _ Q/ m
|
|