|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 ~% f$ \$ x b. Z' R8 w: vI posted this because someone kinda posted a youtube thingy about it :O.
6 |" g0 X( Y, y) n& \/ ?6 v$ |5 ~/ d% s* z8 Y
Find this in DPSrv.cpp @ worldserver
2 Q+ O8 d4 [: _( d: w& K, M
' P, B1 h }! y* K# R6 GCode:* Y W" h @& s
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' y+ W2 d2 i7 x4 `9 {
{
# T; j& _& u" J9 @. t% T: P, D DWORD nId;1 m4 X3 q; `6 P% ^; h) p
int nPart;
e* w F* N& [4 H% I
* R8 D% O4 \5 `- ^; k6 r0 [1 }1 D; }6 M ar >> nId;
) V5 i$ X2 m3 K% A$ } ar >> nPart;
" Q* S7 b) k% D' |$ K9 P 0 l' A6 H/ f3 I/ y) u8 y
if( nPart >= MAX_HUMAN_PARTS )
$ H' }5 s7 |+ R& h3 a3 M return;
9 `- a! F' ~/ J2 R/ X$ F5 v/ i B2 t) R0 ~2 {) D# f& h
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 O( T. S5 {4 V7 j
! C+ A2 Y9 U3 ?3 |% o7 Z0 I7 s* ]6 ]! E$ J& ]% d# v
Code:5 v0 W0 C5 T' i6 z1 o, I& }; O3 q
#ifdef __QUGET_SWAP_FIX3 q# `* D* x+ P8 E
: A8 Q8 ^$ Q7 ~/ I+ k
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
" X8 c0 K& I% {8 e9 X7 m! W0 M3 E pUser->SetHitPoint( pUser->GetMaxHitPoint());4 |: Q: ^: k9 j9 [
8 F! o* M/ ~ t* b; I5 U8 B if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). K1 ?/ D, M9 T3 K& a) e! |. ?. m
pUser->SetManaPoint( pUser->GetMaxManaPoint() );4 [! b' Q) c7 A& o& Q
) ]- k4 h* K) ?( F$ b: B
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 D9 |7 o4 p: [' w e" U
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 K8 q2 R" u D
% x1 S n+ F# Q& k0 h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 M8 ~) \- W' j( ^and add under3 ]& i) H# J5 q
" h+ `3 |7 Y# y0 z9 r# t7 w. vCode:
( u; W& w6 j8 wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 Q) @5 Y& U' ~! b3 K, z! P {
. M1 C8 I$ y. Z* N 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 );, m7 c* z4 I8 c1 G) i
}this
8 g# X3 o( c$ x: n- c) ^$ J$ A- L% W0 a; N! G' Q
Code: ]. } w0 r7 x4 s4 p( g" y
#ifdef __QUGET_SWAP_FIX- E' ~- N0 L4 k
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )* G$ r% o! K7 m4 M" K: A* a5 c
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& n6 J7 B% P6 Y% M8 ~3 ?6 g `
2 ^- f. D* Q# X2 L6 u$ L, u* n if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 P. A+ m) y3 g: @6 H2 ]% Z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
L# _6 p7 P2 V5 R' F5 n
% D+ L7 V8 O' o. j. P9 k if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& X$ ?3 L: l: ~' C( Z# g: v
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
' y/ z$ t) t; Z7 t
( ^+ X9 t1 @( }/ T#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ a( y, h5 _" ?+ X4 Y9 F3 B4 x; Y8 `2 }3 F& V
' S# V X* s) X5 Y% @8 r: k/ u
|
|