|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : X% F" I8 w. J+ ]
I posted this because someone kinda posted a youtube thingy about it :O.
8 k1 Q- V/ W. d9 ]0 y- ]. i6 L
Find this in DPSrv.cpp @ worldserver( {: J$ K) ] Z! }- I: H7 E
' D# n. L3 [ j) e7 H8 o
Code:
9 Y7 ]* `; } P: ^void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% s7 P, W3 B% A$ p! S3 C{, x9 z2 P3 M0 w
DWORD nId;& J% F/ q9 x+ S
int nPart;
, N) Y% L# E. M1 a' t
1 Q% c3 {9 x9 B6 F ar >> nId;1 l- F" v2 _! s7 t- E T8 V" P% b- X
ar >> nPart; ) i: D9 R0 Y) u: v: @
0 j/ V/ {0 C, M @, U if( nPart >= MAX_HUMAN_PARTS )
: G! }5 R, n3 ~5 J' H& I0 D return;& u* S. n2 T7 B- w+ w1 V: A: ]/ }
7 n+ ]4 r6 h. d& E0 y1 m CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 |, R1 e) y9 O2 m) T3 D6 I5 |. {: s$ [1 `
" W7 E. S# y& ^
Code:
/ J" {/ _: p3 ^& j E" X' e#ifdef __QUGET_SWAP_FIX
' D5 ^5 m# R3 ~6 Z: I9 t7 H
( f2 a1 b& u# Z9 J" N. M1 ~ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* i: ^: c& s4 a6 ^ pUser->SetHitPoint( pUser->GetMaxHitPoint());9 i R2 O& G5 l
- N" i4 S, a* m( J
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ J) d2 R- q( n+ [ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 O( j, L% s: Y M- i, u7 X7 S2 R: Q$ ~5 C. u& f
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
9 R. i, k6 c6 @4 l/ [ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );' M5 n- S0 l: }5 l
: L; H$ _) k! C#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 ^; p! e( {; }; \; c$ c C6 p5 Vand add under9 a% _3 y6 `! i( `3 G
" v6 _0 J% B6 L; U/ D% S
Code:
- ~/ I- b( e2 g/ pif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 ]& H- T- \! S3 j! q9 m9 k9 Z
{
3 c) b8 Q+ o4 p% h 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 );; f- F5 Y$ Y. I; b
}this
* Z; _8 Z" I- p
/ b( w9 \& I; }- e$ `2 J& M8 ZCode:. z F6 s" e" L8 f# s! P
#ifdef __QUGET_SWAP_FIX
/ ~$ ?; w8 _: t0 W: C4 D3 A- C if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )# \1 g" }: i: x
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 }( M( h9 t3 l3 {5 g$ j: A/ a" J" w5 e$ V
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
2 E) b& W; I5 p% Q2 B8 U" U) ]3 V pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" y' L* W g0 ~1 R+ c# s( ]3 K
+ @1 X' ^: d4 F% }7 {% r
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), m. W% F4 `' j' D9 j
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 w8 x" U( S2 B/ _
9 W. L) @' S: c2 {+ v& u8 S% ~- [3 e#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 x* q- p4 I. p' t% B5 T. r. J A) H
+ D% d. _ \5 B5 s8 m
|
|