|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : C5 q( g7 X; }' a
I posted this because someone kinda posted a youtube thingy about it :O.
: v, h+ |8 U2 H2 c+ A. [
6 K* y/ l1 X. a9 wFind this in DPSrv.cpp @ worldserver
; n- u$ [ c7 o4 h9 l( u% O) y. Y4 m' K
Code:6 d* R9 P1 p9 I: V$ c, R. k
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
/ Y# q2 o4 H$ N3 b{6 X# h% @5 q# H8 C
DWORD nId;* y' q, S, R! k& O3 @+ z7 a
int nPart;6 d6 e5 H5 k. P$ O
; `( e U- z( i2 m) s) M3 A6 E; I
ar >> nId;
: U6 J% A# m3 s8 y ar >> nPart; " H4 v* b- a2 c: p& [7 @/ |
4 @1 I9 p- `( Q) s5 e
if( nPart >= MAX_HUMAN_PARTS )
, X+ [2 j. `& g& K9 K) A1 ~ return;
9 }+ ^3 B; K5 Z8 J
- J$ {) d2 ?# f" p5 J/ d9 C& P5 `% X CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. S: F6 n' w6 w1 T* L$ J
0 G, q2 l# i- T. }# A
6 L$ G R4 Y) u- Q
Code:
. o4 w2 r2 [( Q. U" m#ifdef __QUGET_SWAP_FIX
- d8 U6 `4 x* K) \% `
0 O% P. B( {9 n- {, M5 B. R if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
9 N1 |+ p; t }' f pUser->SetHitPoint( pUser->GetMaxHitPoint());1 x" E2 n8 {" ]' R% l; {
( y9 i3 _4 |$ x" b; ]7 {
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- j& L2 m1 ]/ j; L
pUser->SetManaPoint( pUser->GetMaxManaPoint() );; l. ~4 {7 e. }& K v
# v3 e1 e! f0 \( Q' v; V if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 Y# w/ V4 W5 L) i t2 y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% v. U- E* `1 y5 {% m& Q) [/ A' @6 f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! k9 K3 o c V# |4 o- A( O9 D: yand add under
" M6 ?5 q& ` k- _5 g6 |( m8 ^2 ~) M0 {8 J
Code:
, B/ l- B7 N. \$ J" }if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, Z7 M7 l8 W# L) e+ E {$ v4 Y# y$ e% M( ]. K! t: l* B* 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 );8 ~# ?7 y- m! ~" l/ ~% D3 F
}this
6 L1 I" ` r! s4 V8 T3 O& Q8 F
0 N, v3 B/ c0 R/ aCode:1 G6 p2 W; ?) k* g( Q. \
#ifdef __QUGET_SWAP_FIX
9 D% f4 z T3 B$ |8 P if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )7 T" p- A( h. G4 v& \' r, k* u' D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ q) v# E. @, k
. p0 V9 c# P' @8 N
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# H# T8 A% h" {- `, M3 F$ O' m
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% x* I& E! s3 v* k+ V: i8 t: {# ~( F$ L
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 R5 x- w, E2 a8 ?4 Q; b& ~ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 |8 |) _$ ~4 n9 Z" O* Y8 W4 t
, p; F0 Q8 ?# m1 a1 _
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & N3 S8 T# E* z$ h! T% f
+ V7 Y8 M8 N6 V F) o+ z
, n) d2 e+ |6 o, a |
|