|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; l# z. @. J) ~, G/ sI posted this because someone kinda posted a youtube thingy about it :O.# A5 C6 c$ z' A) A/ J1 q
4 P$ C) K' {3 a6 A- @
Find this in DPSrv.cpp @ worldserver$ ^: ^" u+ V s# e; k1 t
9 C7 C7 s7 O4 h+ h4 D4 t' nCode: K( M% Z4 T. S; n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )" d8 Y7 K3 Z O; p( P6 n7 O7 t4 K
{
- H* n. F" V: H: L9 D6 }+ c7 } DWORD nId;
1 r) c2 i6 y# w" \& O$ G9 n4 x8 X int nPart;
; _2 u9 Q/ Q' m6 ?8 X* A* Q# r! n) ?* t6 P3 C
ar >> nId;" K A. G- i5 M# g* J6 j% \ S1 q$ V
ar >> nPart;
8 x$ \ T7 d' z8 A, H * e( Z. W* Q; O& \* O3 H, ~4 b
if( nPart >= MAX_HUMAN_PARTS )
, p. L1 G' k/ K: b return;5 ^' I1 D9 s6 C8 C9 m# Y
9 v* G1 P3 m# q( d7 V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: v0 q# D- F |8 q h/ Y$ d# a: F, P8 q+ s- {( t
7 f o: U8 k3 c; H% l @. P* SCode:# ?6 I1 X% x& I* s; V
#ifdef __QUGET_SWAP_FIX
- y, ~ L8 V* e' D! w9 @( p7 |# U6 n( ~2 H: v9 _1 T! T# W
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
& M3 x) \7 h* \+ l" O1 M pUser->SetHitPoint( pUser->GetMaxHitPoint());3 R" T8 m9 \( _. [6 N
0 J# p. ^6 i2 j5 w7 F; } if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 B) h0 }" y! Z5 ]$ A) s5 p! [8 }
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' R) J2 N c T E/ @7 D0 F3 d0 s4 {
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ L6 u, B2 e, u9 p3 d0 |1 }
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 W9 w! }' W( n" n/ \
# S* B' {& r, D$ f* [/ f% h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* ]8 k ?" [4 D
and add under) L4 n# {! E1 B* y z2 x j5 Q- \
- l. t3 ?. q; W9 V6 ^3 bCode:
4 r& D7 ^2 D6 vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( q) I6 G/ c& m( j+ \! m) v
{
# P& j9 v W$ H( o1 P- ]- s- {9 w) k 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 O! z$ z: |" i% S) Y. I }this
4 G3 f' v7 q! a+ Y- P
) l' j# U: \! B; ?, CCode:
/ h. C `% o/ m#ifdef __QUGET_SWAP_FIX
! L$ h' I: Y9 I& O1 _7 ]) A/ \ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 \" C5 l8 N6 Q2 X2 o
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ G; A( Z1 j) ^: F
+ B6 N6 p7 p3 x! x if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
. j5 Y1 c8 \5 n* y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 Y4 i6 q" P/ ~* r. R) _, T# @& y9 e/ D$ Y S8 {% _6 W& N
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 M L" z7 {- \9 j- v6 u
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
" S# l; C) w/ v( [0 G0 T' `8 J2 _
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & A) g& ^: E; n- H2 L& {& a6 w
9 \0 I$ A, D9 b! f- s7 |
) _( o- _* z5 u/ T% f) Y, \0 l |
|