|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ) B0 i; S7 ]! u/ S$ M( ^- i) G) m5 \: V
I posted this because someone kinda posted a youtube thingy about it :O.
7 {; {! m6 a) P5 S: p3 l& i$ R S) ^1 J' t3 J5 t+ P5 b
Find this in DPSrv.cpp @ worldserver+ M) C6 p& N9 G3 R) g, `
+ U8 r) S5 x2 o$ h" nCode:
$ m* [, b: V7 a( O6 j, t$ p. c" L q1 ^% pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. y% s$ N4 B! v% r Y" f9 _{
8 P! s7 u$ U. D8 v7 f$ c) M0 Y% E DWORD nId;
2 c* w) i8 k: j0 R8 {1 Z int nPart;
: p0 ]: ]% o; N5 X( o6 U# K
) `+ ~. a. Q3 {7 E4 X$ P ar >> nId;
2 l& \- p% y9 R C R ar >> nPart; % e, R3 a! d- t7 J( m1 S
7 s$ B: r' x* M/ H/ W3 [ if( nPart >= MAX_HUMAN_PARTS ) 9 W9 Q3 c% w2 K5 a+ M
return;. x# Y. A1 _! Z
& t0 t( u" E0 \9 o9 G* V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 W: G( O, z5 S
7 O# s6 M5 B! Z
+ T' C8 r3 Z# }# R, f6 d+ y1 {Code:8 F) ?# p5 F0 M- Y1 l' G0 s1 J8 D
#ifdef __QUGET_SWAP_FIX
; G" j8 ^/ E' j) y/ q; H) p+ E% E- K! [1 R$ J) U
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ q) ~0 c4 \% Z; B: D4 B$ k7 H$ [ pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 ]) H* T+ B: k" p- Z6 `6 s: J9 K" y2 P2 m' r. w3 ?6 R- Q y Y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
( A+ c7 i( U; W0 W) t- M pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 ?* G$ l' k) D& v$ P
8 \: X) F, @4 r( U/ L4 ~% P7 e- b if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
" @# F! y. H, j pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 H8 M# v0 ?$ b$ h- A+ y
2 q! Y' G; I Y0 r3 N- y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 S! Q/ N- w0 l) [9 ?and add under
- s2 T+ V- D B( J$ ^* L/ O0 x7 w6 P) u0 i: k E2 |3 `7 B
Code:; _ E4 g K9 p- i
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( ?! R! o5 E: A6 ]% J# W9 T {
3 ^) I) a3 S: x' u1 F 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 );
, u3 [- j; n' d4 Q" p& ^% U% v }this
4 d& M9 j' y `3 S: ^
% X9 l! Z9 m: l- ?9 f/ ?Code:
0 s- k4 [% p$ g#ifdef __QUGET_SWAP_FIX0 k0 v+ ]- r2 a3 H, `
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
7 X4 [1 d) I& B' H' W4 s pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 D9 o6 x/ a' w6 P& B) o) O8 \" Q3 @1 y) K9 u# G5 L4 Y ^( O" j
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )6 z# ~7 {$ I/ O4 L" A" A
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. x: _# n0 A7 u3 w' P' x
( Q3 J5 P8 e) S* v) T if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )6 S. ?8 n# A# C' M
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ w+ T! p. f& J
5 P1 y! I. @0 O' N#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ E/ \. ]' Z0 r" H: w& D# U
+ h, ^3 R7 j# t; N) C' b3 q
! ~, h+ s+ w# ^- m |
|