|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked % b% ?5 ^9 p& T4 H* i& R
I posted this because someone kinda posted a youtube thingy about it :O.) R0 L. K/ q+ j7 a. N4 F3 ]
# l* T5 b7 v7 M# ?; g
Find this in DPSrv.cpp @ worldserver4 v; |# i; ?! r! M, ^2 T* J2 X
4 g6 `9 n, u' o# y) p/ BCode:
) j/ D- a! ?: m+ F$ Avoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, O6 R# @6 q) q( y# {6 S; M{
, A5 L( S- `: b! P' A DWORD nId;
d" j0 S5 j& @8 {, ^2 e int nPart;& r% M, ^1 z/ g' h. _
3 H0 P% P Y7 A7 r) E8 T5 V3 j
ar >> nId;- o! x) I% `0 j i! ^: ]
ar >> nPart; 1 V, p) d) P* c' [9 ], n* W
) t8 m$ S" i4 D8 H6 j if( nPart >= MAX_HUMAN_PARTS )
! p' y) u1 T7 L% g& ]9 q# v return;
. j; ^. u, @2 `0 O+ }6 c# B4 F0 o$ m j+ W6 [4 l+ f, {; N9 [& p
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
h# H. x, @* e5 }5 P* }/ k, ?; T9 y! ^ z' D) `( ^5 ~# n8 ]$ k
\' W2 Y1 Z1 J! E
Code:; \% u/ f( q* Y. e# C3 A9 b
#ifdef __QUGET_SWAP_FIX
0 n! s9 P9 }6 \, ~# N2 L. @" K' i% {* G; I: w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* Z a( R4 B7 P% [3 G- R pUser->SetHitPoint( pUser->GetMaxHitPoint());% A, L( g* J6 U
) s$ F. M- p+ e
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 q1 y; `2 t4 u6 f* h
pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 g% X" |2 ~4 _, K1 c8 z# \
" f0 r2 a0 X( v7 V" D- e if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 I' P1 Z0 | ^3 |
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# x9 r- B8 i, z$ Q% g3 k$ |
( c0 e* J1 v2 i) z* Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, y, w4 H! p8 S7 ?6 A; Land add under, n1 P6 f! L+ d7 A" n: r2 w
4 R. S/ V \! k- A# N
Code:/ E& o2 J' D. D, m" A6 T
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 i) x$ J) d' i; G- [ {# z2 V' [* {: m2 @% ]
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 );
) ?& X- ~) g6 Y1 E4 h$ L }this
0 Q( K% r6 l2 ^; f1 V* l [
$ N! R0 B' D) K3 b+ Y% BCode:
5 Y& M* x$ I2 O, b* k. K% n; m#ifdef __QUGET_SWAP_FIX8 s) }+ C* f1 S% O
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 s$ L, P- r. S6 S5 V" _* [ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ q; [9 y! [# ]) q! v. { u1 X
% b- T( z7 B, c' @* R: F# z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- @* p2 e/ A4 ?4 V3 E
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* `* `% t# O, C& e) ]
% t" z4 _) U( j6 j* e6 c+ c if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ); D, z! b2 ~5 Y/ {7 C
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 ?! Q! K x' F# p8 |9 w9 @. y& f) t
' m% [. B' q" r& v7 o1 a9 j% D& `#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % ? M% n# G* K g3 Z6 s$ u! C2 J
" G% R& J P3 O3 P% {( B
: w/ C ]% f4 H. Y3 x% ~ |
|