|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* U6 M0 O% B- Z, ?$ U/ MI posted this because someone kinda posted a youtube thingy about it :O.- E# {0 L" V( F" C
# F1 w5 Z# R1 e. {Find this in DPSrv.cpp @ worldserver8 E% ?) I i! \. D7 j* k( `
( p5 z- F# Q8 F. v. w; }+ l
Code:$ {( q( y7 K. Y- ^( Z$ @* D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, t9 M$ G: @# |7 q" v+ Y0 A& G! a" r0 W{! h6 \% n7 P8 P8 p- J. N
DWORD nId;1 k- a# _9 A' _* \9 g5 T* H
int nPart;* n: W! Z9 s- {- C
) q7 J) A9 {3 A5 x/ d% F+ m# M ar >> nId;
9 }) x l3 S7 G6 z: ^2 Y ar >> nPart;
1 N3 @- |$ `; Y3 S; v2 k# ? 4 G" [* x! K2 t% {5 V6 _! ^" T' Z" m
if( nPart >= MAX_HUMAN_PARTS ) ' ?4 W1 Z# \% m/ W: b
return;7 w$ w, @& L! d; h/ J
/ d, ]1 M' z( Y% ^% a9 n1 V: o% j
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, N# y6 }+ s# @: X
7 {5 o) s( @+ f( x. u/ j0 c
& F* M5 g; H/ w. Y- g. k# c' rCode:
; X8 f7 I$ S1 Q% b#ifdef __QUGET_SWAP_FIX/ }! N2 o0 W! O, G+ } M8 ~
4 c! o7 }/ J9 g/ }! a. r$ H8 H/ a
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): A- ~- r5 M1 a' ?
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ L c, o; S8 y2 ^9 H" U
" y0 m9 X' B$ b2 ? S# x/ q4 r if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 N- a% w0 W( U+ V3 m4 w
pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 I) P4 ?: g" q8 n% [. A
" J! m4 \/ g* A2 X3 Q: C& M: [
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 C4 K# X1 C6 F8 Z n( _! X$ G pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* D3 J& S7 d( D s
0 J$ Z1 x- `! M U# m#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: D6 ^, @& v, q( c( ^ nand add under) V5 l" u) q) ~1 f9 R
# B0 F4 _7 z7 Y# {- T, w
Code:
4 s' z9 w5 T2 \% M2 O( y' Y6 Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ x9 i! o! J" ^1 }% r; B
{
( Q! V2 f% u" |8 J+ F- c 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 );
: R& f& L% B. Y% O }this
$ g/ w% `) ~- S$ b P- |" ~5 P% ~9 {& I1 k6 E
Code:! \0 j/ _9 K6 J# i+ ~3 T4 c4 }5 }* [
#ifdef __QUGET_SWAP_FIX
# o+ ]+ ^7 I/ @: e: O; X if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
7 g7 e6 ?! i2 y* v- m pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( ?0 h) [' U' I5 e
( ]0 G' o* N! ?9 Y, I; m
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 N$ f' A, z p" ^( `8 Y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ U/ r. ?5 s% h/ Q7 q8 M$ v8 S: W
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ [+ v+ w$ V$ |* d- Q0 D
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 s- t5 g. J( o$ n+ o; Z, q" w
9 k4 F0 y# }& \/ r- v" j, _
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% {( Z: Z3 V/ k) t: T% D" z% V6 d! S& ^+ u
6 q. m& N) c0 r$ Y |
|