|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 k! x. m' ?0 i8 s: d3 ?' yI posted this because someone kinda posted a youtube thingy about it :O.
* a4 y/ A# x8 B' T+ F/ h$ H; b9 r A$ E9 ~* m% i9 O3 n/ N1 H
Find this in DPSrv.cpp @ worldserver1 N( C+ Z* X6 I& K, h1 W
$ I2 f) u- p3 X' ~6 G* w% C% J
Code:
4 ~* S% v0 p9 L& O9 Jvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 l2 p, W# B6 V+ R{' T0 A* E3 n% c+ _, L+ J8 k
DWORD nId;
& n& M. z* I! S \6 n$ H int nPart;
! z1 q. I$ p* |1 M j& P) |) _! M% { w9 _" b3 s+ V
ar >> nId; a. L# _1 W' `3 z; P, }
ar >> nPart; & L& O" ~* D7 M5 m" D5 c u2 Z. }
9 t6 K P7 B8 [5 }& L& f z$ |
if( nPart >= MAX_HUMAN_PARTS ) , Y# |( ]1 N# ]& u8 n" v
return;3 E2 D- n# V' z ~; e5 y
* N3 T8 Q. X/ p9 W) m CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
3 `5 A: X# O/ i& l+ [
! n9 x7 z" P0 i3 j
7 W9 [9 e! C$ e OCode:: Y8 C S: | o" p2 M& ]9 G" ?* x
#ifdef __QUGET_SWAP_FIX) j' m) S0 X% _& R% r
+ j9 N0 B7 ^6 r4 `- }/ B) v, ~
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' s) |% ?, F( p& e9 N pUser->SetHitPoint( pUser->GetMaxHitPoint());0 C6 g% m% _- \8 p8 }5 J9 L: T1 U
: q6 R+ [5 s q3 `2 h if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 c- {# n. Y+ p# [, w3 U; G4 \2 w
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) z0 n; u D' t$ w- T
2 f0 x/ w7 F8 g) L# [0 B4 B% M2 x if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( E$ {. {& V+ ?0 I pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- L6 K2 g( j6 n/ U5 n
6 m+ ] k8 i7 [7 C0 A3 i/ S#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! |) V3 X4 h1 p+ n& K$ Aand add under6 r: e2 u! }: [* }" Z
1 U# d" X9 b) F, F2 n+ Q) t D, Z
Code:* ]' U' @; g# [! y: p8 I
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 O9 }: X3 [% x6 L Y
{
6 Y& l* z& r) d& z6 i 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 ); e! e4 v: w& {* g* ~) k2 X; c8 Q
}this
# u; c4 H x% _0 T0 f. Q, n, \
( Z" s% D7 L$ j& |/ P0 \Code:+ `8 ?( i4 N( y/ m
#ifdef __QUGET_SWAP_FIX
+ Z; a8 f- H6 T* { if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ E. B1 h4 {" Z2 U0 a1 e8 P
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 \9 p( \1 U) F L" J. R) W' P1 X
, F2 T7 f. w, q% V if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 A, F9 P- y" ]
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; Z; z8 _% m& @: E# F! G' V5 t j
, x0 R# x! y, Z# q* C if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) n+ r/ E. [0 x0 Q% h# L4 T% J2 E
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ h+ C, P( E* ~- v3 l# u7 [; ~$ y
- h/ F- H0 V8 D/ b% O- x- {2 H" d#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ L" C6 S+ P- v& o: e# Y7 k4 Y" w' c6 @2 p: L2 q, O
8 N" [. S/ M* r) B
|
|