|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! m7 U6 V/ \2 a; F6 B8 HI posted this because someone kinda posted a youtube thingy about it :O.: x# E& e' p, s" D: g {
! B% A6 M( `( V: \# L# m* h" X9 S- _9 b
Find this in DPSrv.cpp @ worldserver+ c) Y4 E, t5 Z* L7 r
% ^# j4 w7 S: T+ @8 o
Code:
- I/ J; R2 Q) |" z6 w; qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
+ E; ^3 ?" T% X$ M& L{2 _% u) Y; Q1 c
DWORD nId;
, Z. x8 n. W" [$ ^, M int nPart;
. D/ K5 `* ?+ t
0 t, L2 n! Y: f) v ar >> nId;
5 g1 ^/ z( G) }5 g3 W. H r6 q ar >> nPart; 0 _7 g- i$ Z' o) T) u
- e/ J; F* J# M8 y, k* {
if( nPart >= MAX_HUMAN_PARTS )
- L: s$ c" T% \ return;
, A) D, t1 o- q8 ~0 j+ `; y, q6 f- d8 X9 \/ f7 q: C6 G! U) u' W
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- ~0 s. B6 b; [5 J4 B0 w1 _
3 e$ U. c3 t# o6 x2 \
0 X7 d3 Z/ o4 y( iCode:
' [0 K- }" d4 s+ s! U#ifdef __QUGET_SWAP_FIX* z! F$ E6 q: Z3 B0 A$ ? H
% M& F# l$ L- y7 T, ^/ l
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 G( A: Y. ?* w. ^$ m4 R3 X7 i
pUser->SetHitPoint( pUser->GetMaxHitPoint());5 o6 h' b: V0 a, U) {. d* Z
- }% X/ x9 n* Y: v2 e+ J2 g if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
- U! k; T* ^* L# X& A pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 @1 [: l0 V( _/ |8 \
( @2 g6 g3 ]! h2 W4 z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); p4 `) s; x5 i- H6 Y
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& S" E4 X# s) m1 b' T y2 v" e, Q5 n% Z6 |" [9 b
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 N) [0 M# b4 U+ y
and add under
1 j; T" W$ [& Q' T0 c9 u0 U, z- N& k
Code:
* r# G9 y# t( d4 x9 E# ]# vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ Q* h2 J8 q" z& u( V: | C$ P {0 S* w5 V9 q* a$ J$ ~" y7 e d! V
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 );
0 p* @* i: I ~2 ` }this
9 h8 H, V3 ]" }: }) U2 d1 _& K O# e' @% n
Code:
+ |6 U' W, W* }( Q. R#ifdef __QUGET_SWAP_FIX) D' L0 U) w- o1 H# |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )7 l$ |. E& {2 y& O# Q
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ ^1 F& g1 L3 e( u* J6 x S& h5 B) ~5 ~$ r; v5 N" p
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 h2 I. W: h* f' ? pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" I0 O( }! n9 ~/ s9 O; }/ Y4 n$ p3 P- w6 W8 a1 V
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) g: B3 D; \- O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) [ v" R, I) h) Q2 T
, G% f6 I1 L8 [. S' F) \
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) ~; ^; _+ h% I, C+ Y* D4 A; ^. m# E* W* i8 e; y
- V; o) J E1 ?2 z |
|