|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( k% F% d; }: y k
I posted this because someone kinda posted a youtube thingy about it :O.
& J& s3 c5 O/ B0 h) T) A
. @; R- M z6 X4 D, GFind this in DPSrv.cpp @ worldserver
& @8 {5 d& V/ j1 v' d7 w' }+ A; J; n: O0 @
Code:
+ S+ O2 S% F; Uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 ?% C/ O6 R/ o# a% y( C) ?{
8 a- q5 L( c" f- a* z7 g DWORD nId;
4 J5 ~0 N9 y- K7 B int nPart;
/ H8 i- l1 e# B/ Y- B
4 G* e- m; {3 p: r) M ar >> nId;
- b. f- d0 a: d' v( T ar >> nPart; 9 M7 F. I o/ J7 e3 C, x# n5 W
% L# W l: C8 x
if( nPart >= MAX_HUMAN_PARTS ) ' G P9 B) c& U& e) w# i( Z4 B
return;
# G: E+ B; \; j4 N' d# j5 k) t# s
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: n8 e2 N4 f/ }9 T J% y& M# |' u1 O
$ B) e- f" S n' {6 D0 p& r9 r( H
Code:
" C+ O) R9 v2 G! h0 _#ifdef __QUGET_SWAP_FIX
2 Z4 V& U) o h: }" R' L
) \/ n$ S& g5 t2 Y if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
( i# k( M9 P0 q: ], c pUser->SetHitPoint( pUser->GetMaxHitPoint());
) ^7 D/ k( B+ Z% K& O3 C* T/ F7 o! M7 V' I' l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ s3 @. y, W% F! S2 Z) Y
pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 X- P1 l3 \4 N9 D" e
+ X$ z( L7 u9 U2 H if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! M/ v( y. c' p4 H( q0 D% ], r2 ]1 Y
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( Q( K; H3 N1 _% C1 D
- l8 [, C7 J" i' v9 B#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! g9 k7 s/ v$ @, J# s! Q$ Xand add under7 y4 J- f3 E5 a% S) Q
$ S6 A, r9 K! q7 I4 U% ICode:& u; z' h+ Q Y* T; T+ q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) y1 e r g8 \
{8 D+ ^/ D3 ^8 D" X$ @( A _4 \# \& p
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 );
1 F8 ~, I; @: [% S) P }this Z. @! M) G6 g# C
; G, S6 c! r6 Z) P/ J: [
Code:+ m8 J. |2 K: y4 u+ e) M
#ifdef __QUGET_SWAP_FIX
0 j; I' m# l' C. L7 ? if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
2 ?" j6 x# l( @! ^) [& e pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 W5 _* E, ]* G0 N! m
2 i& F5 C1 G! J8 l$ ~4 c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ). @" s2 y" m+ g- P4 B
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 I. a s+ W7 c! e! R8 J+ ]+ c
7 `6 q5 }5 g# p# D4 c, A" R if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; K7 ~' B- l7 m5 V9 A6 M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ l& ]4 ?6 r) k! d4 E4 v0 G
4 f( l) e7 [( q! _& b! u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 V' i8 N' {' J" I7 B
- H. x* d) c0 p6 h% u
1 s3 y R0 b" c% `- E& x |
|