|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , K: D# }" H9 Y# I& B2 Z
I posted this because someone kinda posted a youtube thingy about it :O.$ Y4 B& \; K4 W, C r2 T
0 g ?) t. N/ cFind this in DPSrv.cpp @ worldserver
) O8 h1 o* D$ M
I/ l7 {0 a- ]Code:
$ h3 r& ?4 ?1 `' c# }4 U/ S0 Cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). r, P; b* t. {: }' C
{
% U) z4 Y A- A! [2 w DWORD nId;
2 a" y) Z! L4 S$ ^+ R6 ?% U; e) r int nPart;; k' U" O+ B$ W7 K- s$ l# d' I! c
7 y6 @0 S; [, E
ar >> nId;' B% H- z6 ~8 f4 L3 E" S0 W
ar >> nPart;
- s4 H9 Q' E. r. h1 K" W 3 r$ S9 B' P% S8 n8 a. U
if( nPart >= MAX_HUMAN_PARTS ) 2 {4 R( c* ~$ _6 z! n6 y/ ~
return;
1 [" G# t. Q* J# z6 D/ h$ v
. }% O( ^+ A0 \2 |: \% m l' T CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 P0 ]2 P! v; a% n z2 S# L" R9 ~+ L5 F0 K
7 W, X3 U+ ]$ Z. A
Code:
% u6 o+ N% R/ M) R* |#ifdef __QUGET_SWAP_FIX
+ t7 ?; {' ?, B, K F: v( v+ Y6 B6 B4 E. a0 D5 a" E8 M8 H3 L
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# G& E$ h+ t1 R' C; r" x+ B pUser->SetHitPoint( pUser->GetMaxHitPoint());* L: w# z( W% W( E. i
* Y& i; T4 M' P+ ^
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 n. E7 D9 U' b& o+ I
pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 h! v3 W3 @7 {# }4 q# t$ Q4 {
, r9 p# m- d, h- E0 k
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )6 e0 D& S8 S9 Y
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" l$ [2 \" f* t" @% j# Z
/ u. {, b2 c$ t8 x9 J" P) d1 K6 s
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! _( a. P, ^8 q& I8 D9 f( q Vand add under
0 H5 s5 T# o8 P& o o4 u$ I( z* K9 _- E) t5 ]. u& c1 l
Code:2 u1 ^' h; R! g/ H. p# ?* L: y& l4 t0 Y% R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 V. @% @8 G1 `% C# }% v7 H5 ]
{
* L. k; b6 p# q9 a9 | 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 );
# \+ x/ x$ |9 e5 _0 d2 ~. E1 _ }this
* U& t. s6 O) I& P( b0 r3 H; i8 M! W$ i0 T8 Q. _
Code:
: B% |- a; K. L# h5 V( z6 q#ifdef __QUGET_SWAP_FIX
3 x- l$ k& @& l B if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ `6 m6 `$ M& J$ V
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& i. }( h+ b# n6 j$ k: W
) X9 B% H7 a1 h- o/ h: a if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 i& c; E8 \# X8 g1 E# k# E; c+ z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( h& ?) v9 m; q7 c5 _/ Z! f0 h/ p# I e& K2 }8 Y6 Z$ r
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )! p7 q1 c, O) @; g0 R; q
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 Q0 a& E( ^! l1 s
2 g! i9 L. i m" b#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . F8 o6 U2 V- U
: K* e" ~7 c8 T" v0 S; X- N
9 t" @8 V3 U: `0 `2 B |
|