|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked % p" K7 N* M; G9 l) Y
I posted this because someone kinda posted a youtube thingy about it :O.
8 Y3 R" j2 u. c# z) h5 q% Q: e: o5 `/ Z, f @* Z0 ^ H
Find this in DPSrv.cpp @ worldserver
" N$ F3 R p% X3 d" u
0 t9 @; i) |( O, }/ N0 MCode:& k7 w( ]: W( d
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 d, G1 g( G8 n2 R. N3 [
{
, s' |& t3 `4 e" Z/ L0 z DWORD nId;$ {8 b) r( Z; R" T
int nPart;
3 J9 n0 X8 i- {- ?! r$ a+ H: M
3 {8 H+ D; u. |/ r# _- j( Z* k. T# N ar >> nId;- u9 K/ E7 ~0 M/ k' \' ~ r
ar >> nPart;
) ?" N* k8 V; k+ V; P
& U$ u7 p* a) h7 e- F if( nPart >= MAX_HUMAN_PARTS )
) z$ z8 U) A6 w0 V+ F; N4 P9 L# x" f, U return;
) `% |) w' d# N% B0 e
V, [& Q+ Z3 [" v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 c' \+ Z3 G4 L N" E( y6 I1 s5 j2 B/ Y, }
1 A/ r7 G% o" \5 U6 d; k3 e8 |0 qCode:
) ?! U' F9 Y8 b4 T1 \* G: F#ifdef __QUGET_SWAP_FIX" p; {& I, ~* a% N
7 t7 a( c" k3 W. A if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# }6 U1 E1 c2 w3 \ pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ z7 P W) h2 e) R" ^* Q% c4 o9 t$ L8 \6 e7 H, _
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
+ b5 e: q$ P& Z pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 u4 [$ M+ `6 V5 v; P5 I. D) q* q7 D \2 ?5 B5 b4 E: o) V; l; D
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): P6 F# M5 |( |2 T
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% O2 h: C& ?' O0 w# C) R s# H" P% T" b5 M- K
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! @: L; {+ O7 |
and add under
& v7 z7 F( k$ ]) Z. B
0 l- d$ {% a* ?' y4 l, aCode:0 X& U# n& Z$ c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) q5 U' F6 z! M. N4 _' Z
{! o& A5 [& X" D! B
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 );/ k* Y" H- I2 u5 x; }5 i
}this- P, O1 O9 x5 Z
+ d* L; q; {8 d
Code:- h( ]5 |- O! f& q8 S
#ifdef __QUGET_SWAP_FIX' ~! w+ I# ]9 P( ^; @
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 m7 ?% Y. i* T; t. w9 E1 K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! _+ R8 @" l% Y/ E* y Q
3 K$ V& X' L! ^$ m0 i
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )1 D1 \% u; B% y! `( ]' s* U! p$ j- S
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ F$ A L6 E) \+ ^# s8 `) S6 f2 C, j
. h$ ~7 [! R0 w' O: R if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 @- U3 i5 X) k" S4 d" L5 I
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) M# p8 a v" m7 s$ e# V
! F0 X$ L$ W# }3 j& N. n* b/ ~ a
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ h- b! E7 D' i8 E
7 L; I/ L- j) T& V" @! T3 _0 T. y% q1 t. o* [
|
|