|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # _. E1 W3 @5 B; K2 Y6 [
I posted this because someone kinda posted a youtube thingy about it :O.& r. E0 H5 ~; Q$ g( N
$ B9 C: A; k1 L
Find this in DPSrv.cpp @ worldserver/ B& l6 `: A( }; J
^9 C1 [' p# v. SCode:/ h6 h6 f. Y% O2 D& E7 \* k' o
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- Q7 w' T2 k; \{" Y: F/ K8 V; x7 q/ Q
DWORD nId;- X. H! v* n2 X+ J3 y. w
int nPart;/ c9 _' O" ]& f
% n) Z) Z8 L, l9 } ar >> nId;# N, l8 d! y) v- r
ar >> nPart;
3 f- {6 r U1 D' `, R
+ m: l. B/ m d4 T9 q; Q if( nPart >= MAX_HUMAN_PARTS ) ) s3 O# E3 c6 I/ r% K9 O
return;
4 n u5 q4 u( l, Q" v/ ?$ w9 N8 E" d8 V
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
# c: y5 O6 O8 a
! ~1 W' u0 w1 B. V% G& f' |* }2 k
' j9 C* i$ B# U/ x4 jCode:
! H! L, A' p' Y6 w# O#ifdef __QUGET_SWAP_FIX
) D, O( q" {9 {2 h" Q, f @* O3 Y' a0 r7 ~1 A- T; d
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) s: T% B" _) b* ^0 o. r f0 [
pUser->SetHitPoint( pUser->GetMaxHitPoint());
" f8 @- Q. n0 Z0 i
) {, x) i9 z1 i+ Q if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: N4 E! j* H3 n# m9 \8 ^( \ pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 m+ e' c! t# e
: k7 H& p# y/ W0 V3 P6 H. b0 n if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
7 H! P+ S- U! j: \7 P! H- X+ m pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ o# B1 G1 V" @5 c( u8 W0 C: n7 J% z% h! N1 A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; A. \! w" t6 }" A/ n! @, j
and add under; f, g, ]) b: x) _9 Y- L/ q. Y5 m
* j2 E" T, K" XCode:
, z; J1 O5 k b+ F1 Xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): S1 k" q# w2 h# v( R% b* `, {% d
{* M% J2 p) N. z- ]3 s% H
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 );
5 Q) X9 O4 Z4 { V. @' Z }this
' o: z8 }# h2 `% K8 c/ u" ^4 B0 k( @- B
Code:
* f& i$ M0 J G#ifdef __QUGET_SWAP_FIX4 z% C, p% N- x& j
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )# ^9 a5 w. @3 g& x7 v. l
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 O# B# F1 m& \- h) ]
9 d0 A, t/ ]5 ^4 e! P# l4 U7 s$ X
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): L/ y/ d- ?4 D9 J, N) ~, _ a8 `
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 ~1 _- i' |2 Q, v; ~
. V9 i+ H# d$ I if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): D$ Z% t5 g0 z- ?# ?
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 r# K6 q( I/ k6 U4 G9 J/ u9 ?5 Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( I/ G* x& E7 B7 v& v5 W) Q! Y0 C3 k* O4 @
! P' D2 R3 K8 C9 j1 o# Q% j
|
|