|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . t3 _8 \4 h7 C6 Q5 r
I posted this because someone kinda posted a youtube thingy about it :O.
* E" u0 j: z0 c9 ]7 d$ V; W3 }) I' y9 @) X
Find this in DPSrv.cpp @ worldserver
+ L4 E" U, z: s& F* p
1 Z" y) l- W" j a. A2 ~7 UCode:
& _5 U" K6 f; I g0 C* t+ r/ A2 xvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 M# y' O F; B; e2 P& v{
6 @3 B1 T2 ~. d- Q o DWORD nId;
. `0 O- ]( H/ w( e' g- q int nPart;
; o" Q a) A( v8 ~2 j# O) i
, j- k& m" B0 L1 i- r4 ?+ p ar >> nId;
: Q& G- A" H4 F, w* K ar >> nPart;
% Y$ m; c/ M0 e
' L$ N# ~1 `( k9 e if( nPart >= MAX_HUMAN_PARTS )
0 i2 N W1 h2 t return;( f9 q' p7 m+ u/ p) c$ G4 w$ @
& @' [- @7 _- h: {. e- G2 m5 S8 a CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& a9 p' B% i% ]9 u5 }# B' q# P
/ n& ?' j; U4 s6 W4 r
4 a/ m5 W5 q+ W6 @Code:
( j Y3 J' H* E" Y* e/ L#ifdef __QUGET_SWAP_FIX6 ^; k0 l3 ~; D
# z" N7 n; C2 E7 ~& k if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ M, c( P9 S# r! c0 j
pUser->SetHitPoint( pUser->GetMaxHitPoint());
( Y Y' T7 X( }; F: j3 V: O7 F" i$ k2 Q' J
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 r0 p1 e# m! P# n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );! |% J8 b( Q: l& L. q; y v
" t i3 v! _' Y. y1 ^2 s9 j if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- q1 B0 i3 P8 t4 J# K! I& e
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" y) B4 L9 I- D8 u1 I* O
6 r3 L& j8 f! `4 V7 R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 p. e' W/ S t' W' a
and add under/ y% }1 W" o6 K+ F" N' c" N) j
/ R/ J- Q9 y5 q3 @& D! oCode:
0 g k% _4 e$ P0 I! ^. H2 D% yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )! ^/ M6 g8 _. ~& A! }
{
2 X$ ]# C. L' z ~ 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: `; P3 m8 d3 O* u+ a }this2 s$ U" x$ a% z
4 d$ V4 h/ J! y, l! a; E
Code:- V0 t* {- u) S2 Y: ^0 Z _
#ifdef __QUGET_SWAP_FIX
6 q: f2 P+ C; | if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( `$ ~ o- Y: _: I5 @- |4 L pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 x) m Z$ I$ \2 b, B( O v! k1 a# w/ `. z: E z( b8 c
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& P/ J. k2 N4 Z1 A, c( o pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ q+ a! N6 z7 I4 i' |! |# T; G/ W4 i" g Y* x+ e7 C1 G- \" a
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )6 {" F2 E# Q5 }" D: j9 ?, [; X
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 E2 K9 b* g% Q6 a% b
7 {# p1 M: [3 Z1 E: i
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + E9 T2 c0 X2 v K
# l' c, z* Z3 ~/ f+ c6 G" i+ t9 F
|
|