|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
8 e; d+ L# d1 ~0 e$ LI posted this because someone kinda posted a youtube thingy about it :O.: z) a C' R7 Q8 n2 M$ I
$ W. {5 ~1 K R; S. @9 \Find this in DPSrv.cpp @ worldserver9 I5 g( C: W: X" B
7 z% N4 m1 \1 K5 B4 A- ^) HCode:9 }& M( q7 Z( [1 q' k3 A' Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' K p) X6 M2 [4 T{# \" S1 Q2 c# |2 t
DWORD nId;
7 j* a. | Z7 ^: x+ ~ int nPart;, f4 \7 y' |$ @/ K. t' D# G
$ V, R k2 w( X3 t8 c# S
ar >> nId;; p2 v' j1 D! D8 r
ar >> nPart;
& l g# R X2 e6 W! Y# V! Q m
: ^+ m, p/ r9 h: c( @ if( nPart >= MAX_HUMAN_PARTS )
$ {" @# N! r3 T8 ]+ f3 c. H return;
1 N8 m# q$ S3 Z+ N2 D/ z
7 `4 ^; r+ V6 ` n CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 S4 P7 H5 [1 y8 ?" ]# X* c4 v0 {: D0 l* B* j- @& A
& t7 e3 z; c3 `/ rCode:
8 v+ F8 R; |0 W0 r$ o1 S: I3 }#ifdef __QUGET_SWAP_FIX
) ]4 R0 _5 i v3 o7 l# F. |- m q
6 \+ e' }0 B0 {7 E; |+ j if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* R# [+ l2 j+ G$ @/ f pUser->SetHitPoint( pUser->GetMaxHitPoint());$ R' z* L# g. d( w. h' X; ^
. D* W: y8 S' I0 K- g2 a# h2 b( B. I
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 q1 g- `& a4 ~6 Z2 l pUser->SetManaPoint( pUser->GetMaxManaPoint() );
4 }- T& A2 c3 e9 A( N4 q
: p( p4 g! w- V3 S( c, B! \! w* c! Z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 R! G1 M5 P3 c; v0 g, N, r
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' U7 b3 I) B ~$ O9 L& E2 A- d! N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 D& B* ~& |( v, w! ? q* h- V
and add under% y N# p% M6 K
, O% i$ S) U" bCode:
) Q% z" \* \; m3 `- ]4 [4 d; ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); Z. l" W$ x! x: A, z S
{: j8 w7 X2 I9 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 );
: j# u8 f2 J4 C2 m- p }this+ C7 Y6 B, q! }) K
2 p& k. M. ]$ Y7 _* k
Code:
* T* X( q8 p# K' s# [1 Y#ifdef __QUGET_SWAP_FIX
& ?1 J$ w% y# d3 Q if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ W4 p7 P- Q7 C2 p3 } pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 L7 u! p; `* y8 E7 R
/ l) s: y0 ~; ^ h# d6 v if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 D: P' K F P% C pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! p, K! b3 \: Y: B* F
# z6 m9 N! ]& U7 H. z
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )" F: `3 k) I9 f# ?" \2 B
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' G' c, p$ B5 e3 A
- j: h- J1 F* Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ E* K; K6 D1 J8 E
! {8 h- c, H! R7 F3 L5 F/ }5 J% M
7 Y/ B: ]/ K% j! Y" e0 } |
|