|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 G ]9 e- A7 \
I posted this because someone kinda posted a youtube thingy about it :O.
) V& S. T8 g1 e4 r; p
V" ]- E# E `/ ~8 K* FFind this in DPSrv.cpp @ worldserver* [+ B! w! _6 Y! S
! ^" F$ X/ ]. m! {8 `% u7 \
Code:
$ }4 G& b8 `/ D/ E. \) P2 r: Q% [" Vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) }6 ~1 V" ~# |8 b* @# _0 \8 _{
# T) B# t% o( ?$ D- D5 \ DWORD nId;& }, `3 S" I) x$ X) q
int nPart;( y# w4 r2 u& j) W
' S# q; X9 Z, Y2 J* s( e3 F+ E ar >> nId;4 J$ c) s' n; L
ar >> nPart; : Y% ~' F h, b- S$ B1 {4 b8 j& {3 Q* Z
7 \. g$ Q* _1 t! G6 i1 z0 F
if( nPart >= MAX_HUMAN_PARTS )
! w8 G u4 t( p% C$ X return;8 N: }: U& i' |* c! `; a9 [
5 D& N1 R& q( p* S4 H6 C# X, M CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- Q( U! |* X2 D8 p: t$ K2 Z4 M
8 m4 D! v" {# h) A" i- T+ w+ T# M1 N# @% r
Code:
" N4 R5 B$ g6 Y* P8 P#ifdef __QUGET_SWAP_FIX
6 F5 z/ q( U5 Z! t" v; y+ @1 v/ A$ }- x& x( H% L+ ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 G1 E) a0 u9 R9 v
pUser->SetHitPoint( pUser->GetMaxHitPoint());6 Y8 r" U/ ]) e5 w
8 y; D" ~- M7 R2 ]- L$ w" l P9 v) Q
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! z. y& n+ ]1 Z y& ]- o
pUser->SetManaPoint( pUser->GetMaxManaPoint() );/ ?$ A( @7 ]( A9 m
" w( F$ Y# W0 J. D) @1 u. C if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 q, D2 v* \: a0 P: C6 {, | pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 P! T; b! T. ~7 d. S3 @/ I) k2 R" e$ @& ?( j7 R* i; t
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! P$ m0 t( S7 o- T3 d; s
and add under
3 Y: h! z, s# ]
E$ j/ P9 Y3 ~Code:
8 d) T r1 ]# B$ Z1 Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ [0 ?" R1 O9 B$ s8 x; e8 B
{
. ?7 E& U6 W3 Q 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 );4 e7 R0 c; O, s/ a: ~/ h0 D
}this0 y: K. ^# Q0 ~- ]7 z8 C
9 d: X6 g0 {5 I. }Code:# F5 s* N: ~- ]
#ifdef __QUGET_SWAP_FIX8 E! z$ |" [" ~8 C4 K
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ s: a; f. J" U1 \: I& G' P
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 Q j! |+ L5 y- f3 Y% g1 q G$ ^
1 t# U9 m. D) h
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 H- W! \7 S, l7 Z9 r pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% j3 _, F' _; L( H
2 [) K& j) O. p9 M8 J/ l
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ w! D( o' @7 y. }1 }5 s pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ q, c5 u2 D5 q$ O7 r) @
5 w6 V; G6 t$ \* |. |0 m- m7 T#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver Z3 _ G7 x$ m: ^' c d- q5 E
" V' i& s; L9 f8 c- q& i# v* ~! e0 {! {; y
|
|