|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 1 u: |+ [3 d$ G# _
I posted this because someone kinda posted a youtube thingy about it :O.' C& K; b5 B' E' \ k
4 n" v6 [3 `3 g/ h: g TFind this in DPSrv.cpp @ worldserver
2 S4 b# M. }4 H' v# |1 w+ I5 d0 z: R1 z7 m& H7 A1 N5 S* a+ }
Code:* m% w3 W4 K* d/ E4 S! g# }* B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 v# C4 p) i4 }: v& q) y7 ]
{
, I3 [8 x$ _# v8 }' t2 n DWORD nId;7 ^$ n. Q2 N' e9 K( h5 c, e/ K( D5 b
int nPart;
: z" K/ ]1 N3 b; g( P$ x7 ?0 y% B. Z; f+ g8 J
ar >> nId;
0 K! Q2 W+ @6 ~2 p9 b ar >> nPart;
: `5 x2 i+ J$ b ' Y* ^: N6 {9 w, m! c+ [3 E) f
if( nPart >= MAX_HUMAN_PARTS ) ; k- L- ^ @9 l, V
return;& e: S3 K: F/ M, d$ S% ~, k, U3 A
" Y- }: s1 h$ U( n! c7 ]% k& q0 g
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! c0 D) ?5 n) ^( z- Q( \) @( a
' y$ D1 q# q7 R l9 s$ B" W# S+ B1 _8 ]5 l4 P. n; n, k$ s! c
Code:
! B; H1 [. ]6 v& h: B @#ifdef __QUGET_SWAP_FIX
* ~% u1 n e: e" [0 b; _ W, L/ d$ I' b/ b' k( F
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
@( w5 r* `; }$ w pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ [0 D% v1 j+ }/ `* K. Z$ ?* K" b X6 p2 w
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 I# c( ?" U+ r d5 C: j( P
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" D2 g$ m% G2 [) R$ {
2 Z: @; T" O! \, z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ y! W( K9 Y) i D2 f4 n
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 j; B/ v$ r: m e0 {
; N6 q& \7 z! {+ g+ V+ B5 r#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 L( x: B' j* N O+ Tand add under
( y |3 _5 c4 }# }! U
+ j5 Z& |( I% F% yCode:3 s1 e# W% ]4 a* X
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* s1 {& t( c7 p5 E& b1 P |/ h {) x) m2 u5 Q2 W) h+ Y
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 );2 \* f$ o. F, S! G$ e4 l
}this
v2 @# p7 K" C5 P
, ?- p4 N: t' O$ d7 O L6 JCode:1 _* [8 H; p! V+ s9 H
#ifdef __QUGET_SWAP_FIX$ r- R1 `0 f! N) l+ q$ W
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )' Z# R+ n) j# k! o: p
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 y X' I; n6 A: M9 M9 C
# Q" e3 Z3 I V+ K2 a5 C7 J
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' }& n( m: W8 e; d, U
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* A6 F) M% m; z! q3 ?' @
6 }' E" b: R$ p; p$ L if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): F' W+ S0 v3 ^! z
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- T b& e6 x# F9 A+ K5 c. e& C! W1 N. ?# E! ], R- J% T& B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- T+ D5 p8 m6 H3 {" T6 i0 }! n% l. y' r1 M6 e
# Z$ L* X: S6 q8 V7 Q9 a |
|