|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked - v" X- q5 m- b; N5 o
I posted this because someone kinda posted a youtube thingy about it :O.# p- G- z4 n" V4 m- p- E
+ F G) {+ T( M. y& n, Y0 G* EFind this in DPSrv.cpp @ worldserver% u+ h/ g0 b: R q9 |1 n. n
( H( [3 x( _) T# J/ }1 Q
Code:
3 P$ ]1 ~. M; }7 r% }; Pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 o/ p- h( d* E/ M# J( I{
$ [4 W7 J; X* G, ] DWORD nId;+ P1 Q. J; P4 j$ V4 g' X
int nPart;
/ d" z6 s, d+ _" a& o- e' V! }) V, d$ A* _5 b
ar >> nId;5 g7 X4 C! ]8 {7 N' M
ar >> nPart;
# P3 w% {# h4 t; V7 i% H 0 W- G7 x7 x, ?2 x8 T5 x! V
if( nPart >= MAX_HUMAN_PARTS ) % p3 y# c$ n7 s" S' r
return;: m5 \" e4 @ A1 w
4 {+ I8 z; _" g$ w1 \) v9 v( I CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 U$ C _: |0 W9 Z: x4 H
! k. R; C" o# y# j1 o: s9 \; S1 n" E
8 `! L5 Y4 T9 M* p) E
Code:
2 j* e) |1 Y+ G+ k' w) c% Z#ifdef __QUGET_SWAP_FIX6 _9 r$ T- t) f' [7 k' Z e% m
8 J0 F9 M* h Y/ s1 V# I- y6 Q if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* |3 Z/ j& F4 J+ k7 b
pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 q( j f" b" A5 E. [9 S. D- z/ j' x9 Q
4 ~3 j b2 D0 f. `% p$ t if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: e2 L9 |9 d6 h6 i& S pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 _- \) v9 r. w. U9 h
# P+ L. L0 c3 Q+ N2 I; \* c! q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 F' b* r9 z! q9 T/ _* [$ {* _9 h) H
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ R8 A) J+ s/ R7 z
, G' V: o9 U8 b' r
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 H% r5 A I" k, m; Mand add under6 _3 D4 T: h7 ~" K" [0 X1 J0 e8 Q
{7 h) _6 [: T, R; c9 B) f* a" w
Code:
1 Z+ V5 i W2 rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 u. W/ O5 g- X: f
{) V3 D5 {' ?& g+ u% I/ w
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 );
7 f, |- p5 T! _5 Q2 I4 u }this
1 X' l0 `/ i+ f2 ] I3 g4 V/ [- I' G$ R
8 `8 ]' {& |3 Q( q3 {% t& ^) nCode:/ h% i+ L" g& a) Z& s2 ^2 Q( s) F
#ifdef __QUGET_SWAP_FIX6 I( g) |1 \6 I) `; b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& T! x [: U: u+ l/ K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 | }' A6 |6 a
7 l" A, O! @" B _ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ Q- Y; d. B$ u
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) b2 x" _( e( V
% i: W& I! h6 }( b# b if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 r3 ^) _% |: T9 r9 T3 u4 g& a
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! A$ L8 r! a3 j7 g; O3 L8 y1 Y8 n: @( t8 c6 h3 y9 y5 N {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 z$ b a7 G9 P# E+ V9 q
. j) T7 Z6 Z1 M! e4 o
3 d6 C0 q( `0 j: J$ f+ e |
|