|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 X* G }# w5 S m& B
I posted this because someone kinda posted a youtube thingy about it :O.
, U: g# a8 W3 ~0 L1 k. C
1 y+ D0 `$ s& K" K: a4 QFind this in DPSrv.cpp @ worldserver# w" R m0 S; i; o/ P$ V8 K
: f t* x' |5 i3 w2 I
Code:
( X+ r6 k; T2 A a* F: M: y2 S; R" dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* W2 V/ Q- F+ {6 D
{6 M- u& u' y" _3 [% x1 `; j( ?$ {
DWORD nId;
! l/ p* u6 q& k: H$ N; d int nPart;: Z0 s9 ?: e+ t! a0 ]+ M$ ]( W
) t) O- h7 A6 l( {( ^/ n; }+ a/ p ar >> nId;
& J: X% Y3 x$ O& {: n5 Y. [ N ar >> nPart;
3 v. T9 M' K1 i! A* m3 ]
& ^ k) J' ]7 K* c if( nPart >= MAX_HUMAN_PARTS )
, I( f4 i- v: d1 _3 j' |% I/ ? return;
) y/ A0 R) t# | e6 w0 h, L" [/ Y; J6 q! \
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 v8 l& A( S6 |6 J
/ j- ^2 z1 Q+ G( r
' b+ r+ a& l# O9 b- d3 T$ wCode:
, k0 r6 c' u- W% y) a; D#ifdef __QUGET_SWAP_FIX7 s) B. y. a0 _5 @
6 M. V, B+ E# c) B; j
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) c6 g/ o6 E6 U8 B% [$ { pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 a, w6 J# r( a' k. S$ {7 V
7 m# x( W( e" ?2 D" a2 s- h4 I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
H6 r2 `. g1 e! l) N pUser->SetManaPoint( pUser->GetMaxManaPoint() );' n) A+ z3 F0 f( U4 w
1 i7 K" n8 A5 u8 B) d( g5 D* W if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
4 ]6 [% `. t* c% Q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 A$ c. y7 Z0 f( K# k
0 E5 l) b8 X+ o4 h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ H3 M/ L x; v& L9 G! N: {2 qand add under& j( Q, W" Y/ l" o Q0 x
5 J: W# n8 h# B
Code:
* \; S5 z( ]! n; a' lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 A9 t6 ]2 `3 u7 E5 l e6 }
{4 ~: }/ W Z [8 V' g
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 );4 P4 R1 R. C8 `8 `7 J j
}this* S5 ], M. G3 \5 q
- @- z' J9 Z& N6 R1 p
Code:
, |, t0 f2 G6 D( Z5 ~#ifdef __QUGET_SWAP_FIX1 c T; o- x- E' O& S8 ~
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )1 d4 D( Q# K- Y) c5 R
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# K5 h( S6 S ?% a
, c! |7 Y3 C6 k' |, M if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
. T/ V- s$ N: R( d ] pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 B8 J7 l1 a) a4 M# K
2 y, v0 l; y6 Z& a' \% g, O
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% F, S7 o+ A" O. k+ A1 _7 ?: M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" B5 E. E" ~6 I1 j4 r/ Y& ] H
+ e0 F5 E: _/ y#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 y/ b% H. q3 v5 ~/ P) K
5 @: {) r" m% |6 w* u# E% |0 ]# s3 a, y7 c; C. R3 q. _
|
|