|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / h" E7 `$ Q: S2 G4 T* n! o
I posted this because someone kinda posted a youtube thingy about it :O.3 I1 w- C' L W0 W0 V; u
q/ z% g. Q7 [% Q( ~6 I6 `+ c
Find this in DPSrv.cpp @ worldserver5 J6 e- ~3 T0 Q: b, z
7 Q# d) y# e5 o+ e- f+ i! P
Code:
9 l6 p; p6 O. B. o0 [: Wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( C1 o" |, V3 u4 E2 e2 m
{8 N; x. j, W7 [3 p
DWORD nId;: o# C, Y. J& \" t# V' P. S
int nPart;
# L$ T; ~. r9 H$ }( F& B2 m$ o* }8 V% k& K1 N
ar >> nId;
* ]7 M' X @4 A [; R) {$ h& h0 \ m0 A ar >> nPart;
# c+ q6 m( R2 X0 e; Q
) g& a1 F9 l7 V0 U, V5 K' Z if( nPart >= MAX_HUMAN_PARTS ) . ]/ b v/ `4 B3 v$ i( g- e
return;, w3 _4 z+ V* O% Z- |
; B3 o% w* k L0 Z: a CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
f- N( ~" ]! B7 |5 z6 M* V9 X: Y6 U& ]; x! O4 v
! @9 ~, b% F- R" H2 e' X* L' _2 B: n9 LCode:* s5 E5 x. v/ s" u
#ifdef __QUGET_SWAP_FIX: q2 F9 k+ v9 J3 G8 Z: j2 P
- o& l+ B$ a. g# a
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 M7 ]$ E! X' v9 [9 [) I5 h8 q
pUser->SetHitPoint( pUser->GetMaxHitPoint());& C* {% }; u$ Q+ p s! Q. T& F
' O9 S/ S5 W0 [7 x+ n# k; f if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; u4 g, z7 ^& {- R1 { pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 l4 C3 T) T3 W7 T3 D4 F, H" I* _2 T
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ y. w7 \/ C j: s- | pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& I+ _/ p7 V* x! I/ c
; j- I/ S% a( \& s4 L s#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, q' b+ \7 Q/ a5 m# W# K! L) Tand add under
7 i# h) w3 I) j( j6 S
7 u8 P$ x0 k7 o0 KCode:
( t, C3 H1 ^. j6 aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) x( S. f! M. i6 F
{
4 w! w* m4 x) t4 D9 h3 j 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 );7 }: D* l/ @3 Z' W* f
}this' h/ q; T& A" ~- H3 e" [4 W
7 H. M6 Q- W0 [Code:
! _3 y* ~. r% B! O4 F1 n#ifdef __QUGET_SWAP_FIX( n. C, `0 [7 d' t- z1 d
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )1 A( o/ j1 S0 I- S( S( S5 \
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
: G8 A5 @; p5 u: ^2 T/ \$ G. S# l5 V9 @. k- G
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 v. A- Y* v# I* U% [5 e. d+ s pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# z0 @2 V0 q8 U$ i5 b
5 P& s h& ~& Z7 \5 F+ v# E5 i
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )6 I0 [, @( C: R0 V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 b* k* U4 m& }+ Z2 A0 g2 D- R8 E1 C% G- d) e. K5 @3 Z1 Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 R* C0 S% _0 p
& L. ?* p2 x, I6 r/ N* l6 v1 w8 p" @
|
|