|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 F! \6 E, Q! |0 ?6 o0 k! nI posted this because someone kinda posted a youtube thingy about it :O." G5 [' c' o2 g/ Q( i6 t
/ i; u; n# w' Q: m, O$ G8 C
Find this in DPSrv.cpp @ worldserver
* ?! z* a0 D1 i
7 x* t1 d v2 y& d- L+ DCode:
. |: h# ?6 A6 O7 X/ e6 Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 N; E6 T) K+ D! s/ M) l{
3 J: Q; h I. B& U2 Z DWORD nId;6 R. [* M- D4 T; ]( ~
int nPart;
* @& @/ f: h6 C4 j; e' K
+ ]- C. {3 o# S( ~) O ar >> nId;2 e: C' M, B! k) s- C2 o
ar >> nPart;
' F8 b7 \( D) p4 G2 C( k# o; w " `! M) n5 }. e" v
if( nPart >= MAX_HUMAN_PARTS )
5 ?6 H$ `3 x5 M6 `; N return;+ }8 o) x% g3 f; q2 T( R' q
. b& r- e* {9 ]1 E$ p
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& i9 N0 I, `0 {7 V- t2 f1 V! N( ?
1 n& \1 n, \* \' Y6 S9 W
6 y. i: U3 R# C/ ^Code:7 R- F( y$ N. I$ n
#ifdef __QUGET_SWAP_FIX. t3 A7 ^' ?( @2 W& g4 |
W A) ^6 V& y% J
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )+ e( h2 d0 O8 L4 a/ O0 ^2 o+ [8 G
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ s% t5 l0 t0 Y+ ]% t N
6 K: D @# K8 a1 y* E3 } if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. r) \1 i% o8 u0 L+ V, h pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# b3 q2 f4 I2 r
( _2 g* V9 M4 ?/ X9 J if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 v- U! u A* L& B& s
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 l* X" s* N& G+ N8 G( O
- ^, K+ D' X* B6 P9 l$ r2 r#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" c* f% s1 v8 |$ }' }
and add under
1 j% H9 {/ T0 l8 d2 H* d4 J$ R/ [6 E# B6 A3 H% q. e
Code:
, g4 e6 _# X" K, dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 ~/ u5 @* K0 J
{2 U, A% z: C9 W$ U* ]) ]6 d
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 );4 Q0 ^" E8 o! \& r
}this3 M! F, ?3 k4 q0 W0 |
3 S8 R- i+ F0 e" \9 q4 w
Code:: w2 Q# K$ a* @
#ifdef __QUGET_SWAP_FIX
4 ?. J' {. ]5 m, F2 f0 x$ { if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( m) @" q6 o& p1 P4 t; G pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! ?8 B+ m2 ?( A7 n
1 m6 T1 Q& j* L7 C* U: n4 }
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
1 W# p! [8 \- M* s- ] pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 _8 [: |) F8 e: {3 k
Z$ L- q) n: y; `6 A4 c* _
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- M, M! h, J, k
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
r& w8 O: A0 R3 x4 X' o# @
" z% r& z) C; u2 ^) @0 a0 N#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! u; n% c" a( l
$ H" P! J( R* w2 o+ ~# |
}3 L( u& l) Q1 l, R/ |& M |
|