|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
2 y) q S+ e! Q5 y$ z7 r KI posted this because someone kinda posted a youtube thingy about it :O.
* `. H7 J' u& Q0 v# m+ W* t% D- D% x6 a" q0 F \8 _
Find this in DPSrv.cpp @ worldserver9 ?4 M$ |+ K0 M$ i4 Q
! x( h% b. ^/ F0 ^4 YCode:1 j+ j) P0 A. w6 f3 A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( p% t0 p* R1 q- K4 @" _5 X{
4 P, `7 f% g2 i1 g5 ? DWORD nId;
" k3 X, }; \' V. r$ W! m int nPart;4 Y M/ x3 v# B/ X$ Q: T2 W& N
1 Y8 i, D7 D B0 C
ar >> nId;
- Z' `% u4 L( W" a% R/ |1 s ar >> nPart; ( X9 G7 n8 p! n2 h& k9 b4 z
6 L( E& k% s9 P) V6 B
if( nPart >= MAX_HUMAN_PARTS )
/ U0 W8 o3 R: a& ~0 c0 a return;+ J8 g5 I% P) L; d
6 P1 x8 U4 T4 I- ^
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: V, O: e/ s! B) W! ~& K
2 B6 M, i# X0 a/ u3 V: j9 i
/ K* v, \* V3 x. J9 ~3 e8 ]
Code:% @% U1 S& S% p; w2 u$ x1 w
#ifdef __QUGET_SWAP_FIX
! w$ r! S. x: ?7 K1 M
- K# X2 P: F- ^# C if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 Y& l3 I) b' |- n9 v5 v5 ~9 U5 v' G
pUser->SetHitPoint( pUser->GetMaxHitPoint());, M! w$ y3 L2 P& M. z
$ H( U5 c& a* s$ m if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% W9 ]' o3 u' D/ ^! O
pUser->SetManaPoint( pUser->GetMaxManaPoint() );% b9 X3 a/ t! x s# j8 V
2 N- N$ I6 x& o5 J2 Z9 |; w if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& Z! A' U% ~: p/ S( z2 @5 z& r pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 `0 I5 T/ H4 J H% Z3 i% U
9 a8 _: n4 I+ ]: Y& ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 m. J6 \3 n( D5 rand add under3 v6 ?3 _# j, s# D* g/ H
5 e& L* b& x& b+ V6 |Code:, h: V; h2 z# H8 U) g0 k2 a5 V! x
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 p) S1 @5 s) U+ l! g! r
{( M; B. @. E o& `& E6 ~4 j) e 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 );
R& D2 b5 ^, O" }$ o/ p }this* K1 u7 R5 o+ ]2 u3 D- p1 N* L6 k
: q# P" p0 r m( T9 h8 ?Code:
- O$ v( b9 V0 a/ K#ifdef __QUGET_SWAP_FIX1 n! K, |' k2 J0 w" v
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ O' l3 `$ M, E+ Z! c
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( a$ D C/ U+ Y. N' `
% l: N0 Z5 f7 T$ O( I
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 ^+ _+ D. P5 v+ r. ]. q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ z& N. K0 a) M/ n$ T
2 u6 f& u+ \3 e2 a5 U2 |9 w8 M) }) i
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, k( h& \( O3 v4 u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 ?1 Z8 t% n' i9 S% J/ U0 n, @: `
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 v) E& Z8 }( J+ ]8 F; |, S
$ z- Z5 J; e& X9 Z
f' F h0 h2 S% _
|
|