|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) k8 B. D1 U8 ]. {$ nI posted this because someone kinda posted a youtube thingy about it :O.0 m, }0 W/ f8 Z; `) } \8 _
8 J3 m7 M9 ^8 o5 \. K* S9 h
Find this in DPSrv.cpp @ worldserver
2 }" M6 C9 U" x3 B W* y7 o$ b {. U& i* n1 ~( |# e
Code:: ~" Q! ^! `: z3 W3 v# c
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 n; R# O* T3 Q1 [ h g
{
# n4 c O+ v5 n: z9 T DWORD nId;- B" l, H9 [' A# W2 q+ \* a
int nPart;
. `; A5 k4 V1 k. b( |' _2 C5 M# K% K# z: I9 x
ar >> nId;/ U/ N: m" N& j$ a m" ]
ar >> nPart;
: f$ g0 p1 s- n# R2 S
8 r4 k H2 F Z0 A0 _8 Q( e if( nPart >= MAX_HUMAN_PARTS )
& S k' G& j* P ~, P return;& ]7 |. O4 |! N' T# O
! i# ~4 o* g" n! q% y
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' j" _) c$ i$ g1 W" T; a
: Q) U) [( `7 u1 N
2 d1 E9 |; ~. w" `, ~9 s+ u
Code:9 F& y! m% n$ X! {5 X; L8 d
#ifdef __QUGET_SWAP_FIX) W' X6 M$ y4 F: p9 J
e" c, @9 r J3 p if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
7 {! p2 f/ I) f/ ~4 K pUser->SetHitPoint( pUser->GetMaxHitPoint());0 D' H/ w3 D! K, j$ r, a z
, |, @# C" e4 m7 c3 g8 A8 N if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ X0 d! E- U. V- b" Q# B
pUser->SetManaPoint( pUser->GetMaxManaPoint() );. n3 l' K( N9 E# a+ L5 {$ P) K* X
* k6 z$ e0 U* B4 p3 b& E if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
, S, J) s8 q p7 y( d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: ]" f! s1 X( C7 ^7 V0 G' G% f7 s, k
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 L% T6 T- e+ ^) W5 m' P3 ^
and add under
7 U# ?% g3 B- I5 ^: z5 [6 |; M4 i. c0 b
Code:+ Y* a5 ^) [ I* e$ H
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 S- P1 @- Z* ]6 W; d {
2 U3 Z6 x, R9 X( g 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 );
p+ ~5 U* c; V5 _) Q. m }this, N+ G+ V0 m% x$ t
/ Z1 Z: @7 Y1 m$ Y% w6 q0 d
Code:
" D8 b0 t; w2 e# N; e( T#ifdef __QUGET_SWAP_FIX
2 i- [/ e3 M! S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )1 @5 {! U+ V Y- h: P+ u6 X! ]
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' X7 P1 i' d/ `! l5 z9 n5 ~
. v2 p+ P+ ~$ A) v, a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
1 L8 g4 i2 T3 {; n& W' M pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 `! Z+ Q" @3 `! G( v8 G/ p6 Q# r, o$ G9 }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- Z& h+ A4 l: u
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( n! j/ @/ H$ R) n. O6 I
/ e+ P6 u, k1 |
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: A8 u$ X2 P: V, ]$ V- }/ N- B
. T% A# P! K# V$ v/ f
' s, Z1 y1 K8 f. r2 f. U |
|