|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 D! P% m7 L$ L j7 r' oI posted this because someone kinda posted a youtube thingy about it :O.& |* \: H5 ? W d$ g3 ], ]5 g
& S. H# E3 p1 u" b
Find this in DPSrv.cpp @ worldserver
+ o5 F* `3 F. i3 j; ]# p$ m' S D! C. c) T5 v6 y6 i; I1 S; U
Code:7 U# A$ d3 y2 v* B4 n0 A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ x( o1 t$ u `' M( O3 T
{
' i7 _& y+ A9 x" m) A DWORD nId;* y$ G( D0 K8 Z$ Y$ v v" N8 p
int nPart;
9 m! r- |+ L" G% m1 }+ Y5 ?& p8 X# ?% @. R `0 K
ar >> nId;
8 S2 h! Q8 e- e2 m9 c: P! l ar >> nPart; - X4 L @7 p. A8 r8 \7 x6 b/ v
* s# L9 w) E V" B I+ N5 t
if( nPart >= MAX_HUMAN_PARTS ) ; g4 \' v, D+ q* f) L1 d# Y
return; }& M9 @/ m1 b6 U6 s$ H
. k3 \3 q v* @) u4 g CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 h0 K0 h0 s7 @" L0 N- Y; p$ b# m6 {2 J+ _* H, D2 z
! D# D) q2 H% m0 w j* n. O5 n& m
Code:1 ]& F: N/ [4 \. ^( A
#ifdef __QUGET_SWAP_FIX. z: K+ t9 X7 Y% b6 j2 |/ z& e7 a
5 ]: w5 X" m# `" F$ u; ` if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
: L& J! @7 ?3 v3 n* b! t- K pUser->SetHitPoint( pUser->GetMaxHitPoint());0 V. ~+ y( X/ u! a {" n
8 {. X- h3 A+ k. \) F5 G if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 d+ J& T2 O5 I6 C pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& ^0 M( _/ K. z! i+ k
1 p t& Q) F( q6 _. \ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 [% l4 N: i# N& \- Q1 @0 K& q4 r9 V pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 h0 L! g# f+ Y
0 o4 j5 S3 q$ |+ M, V#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp/ ~+ P9 b6 x- a$ P: P- d" w! `2 z J4 U
and add under
# p2 E) S( N. C9 P( _% t! j! n. \3 \$ }' x
Code:7 e: h e: h6 V- a) {" p
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): z& m: x5 s, X( ~3 d! o( r/ z
{
, @/ n; A' Y# u# D 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 );6 L" ?" i& i B/ V; ?
}this
4 j# [8 {4 t. b7 _! ] r& F I6 X; f
Code:
( v0 l2 ?9 G, u#ifdef __QUGET_SWAP_FIX7 B0 y: K& U- Y
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
, [( e1 y7 O6 F! Y$ b. H6 p1 {! [- B pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; x8 U- C3 J- @) O& S* s
. B( k( b( x2 d2 p& [ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )( ?( D9 s% w+ Y/ y$ \2 n. a5 j
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 M; R9 x) s) ~
2 v m4 t. n/ u9 |0 E0 v if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: H; D* d+ I) i& { pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- X3 S5 m y; C% Y+ w. S Y
" K; M7 a6 L% O4 g) m5 U" v) N5 K5 D#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 T! ?; S8 N* _: P9 K. T5 O. N, @
8 L4 m$ w0 A- D& B
* f2 {7 j/ P( |6 F |
|