|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ; _& {- U% x) c ]
I posted this because someone kinda posted a youtube thingy about it :O.0 Z9 d5 [; u. E3 b# R9 |% ~
1 Z2 h" P9 [* E1 e" ~, zFind this in DPSrv.cpp @ worldserver
- F4 y" p! {. v2 S6 u! T9 o1 @) r3 O& B" i' L0 D: v, {* D
Code:
2 b: Q- k7 l' N C& Z% {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 G S: X( z$ e( A* W8 ~; o
{
) |5 ?) t4 y# X, i DWORD nId;
7 l; `9 n& I% `0 G9 D; S int nPart;( o |6 k9 Y& X) A; }, f8 C6 ]
$ d# h& X- [) y1 f4 A, r3 }6 S2 Y
ar >> nId;$ x, \2 c0 W$ M( w7 A: l
ar >> nPart; - M8 E. G+ J5 C/ l9 S" \
9 _: E5 U9 Q# g N8 ^- K, _: k
if( nPart >= MAX_HUMAN_PARTS ) * e) [' N- [0 {' e) K) n. N& t3 K
return;
/ P8 F8 ^/ l/ g# o, ]; K0 ]
. x! l1 }+ r' E6 |' ~7 b2 a9 l* Q8 A CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 _, y, y, N1 E. B" U7 |
8 X, N s+ \! c5 {- s6 _
+ @! e: T0 T9 sCode:2 ~! K1 R( V) ^% B/ a3 e
#ifdef __QUGET_SWAP_FIX
; V; F2 q7 s+ r9 {4 S% i' N
& }2 X8 w1 r' d: R: c3 F- Q) H if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )! h% E( k' y, n/ C
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. R! X% Q, R2 Q5 X; R
( ?4 K! v( t4 x- s% M if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% n. F* o; `) z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );" h: r! i- s ~8 p
+ t+ f t1 y/ c/ F: T6 M if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 f; ?) L6 @, a9 _: z+ w* I7 ~ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 Z) [. |1 I0 ?& h8 `
, K O5 u. n4 V4 a( k4 O#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ {+ s1 }) ?0 X* band add under9 Q1 y1 |1 c. s1 _# }9 l! F; t
t- n# s1 @9 ?$ W0 DCode:$ a/ e' o3 y( t% c1 p: r
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): v# ^& e3 N. v4 M
{; A' d/ d$ X* K$ w! u- v
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 );
, ?: `6 M7 Z2 Y$ C }this9 u6 H, T4 \, R/ Z1 ?* C8 T5 T2 _) _9 [
b! ~7 @, k) j+ b" GCode:
3 s7 b! X0 z6 J1 p$ p#ifdef __QUGET_SWAP_FIX
; M% R2 \& R# L$ ^) _5 ^# |; J if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )5 G% s$ L) @: V; E a6 G& i1 V
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( R6 `, P! N0 t
2 M* t& Q% ?4 t* D* @ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- K/ S. m" T. B# ^" [! b5 W
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: c9 F, g) n& | y: r/ A1 g
6 k0 [. r( L# g6 x3 B
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
4 X( c/ a; S1 b# B8 a pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 A3 G1 [" M" Y- f5 j+ v3 {1 ]0 v5 _( ^
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ y/ l& @* G9 k6 d6 Z
: L, ]# u Z4 b2 [0 n0 m
$ j1 O" C$ T4 L) L, `& I |
|