|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* c# o3 S* H. G2 g& U" N; ]I posted this because someone kinda posted a youtube thingy about it :O." I4 ^, A2 o% J$ D8 R
) ]1 n7 D; i! ^3 FFind this in DPSrv.cpp @ worldserver
3 M0 D; T7 N! b/ u' e+ C% ^9 H) U) M" p: D
Code:/ } c$ j; N5 U) K& q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 n9 }1 m5 l! f. K+ ?6 g1 B" ^% ^& j{
4 o9 k3 s& _5 ] DWORD nId;) `; Y5 S+ {* y
int nPart;
5 m# V5 V9 c) d0 d# L2 V" v h% y4 a' X' _' @0 N; n4 q: s' f
ar >> nId;
7 o! g8 N# l, i6 {1 D$ B ar >> nPart;
+ A# A5 a6 \1 x, {% {
1 W+ s$ _7 D5 h6 B4 O& e4 a if( nPart >= MAX_HUMAN_PARTS )
* h& ~& j* M! x9 b0 C' ^1 y/ M return;
" O' w! D& K1 ?! n& Q
7 l, t8 C8 b) _5 F9 e0 A$ c7 r CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* Y9 Q# X7 Y9 r8 Y9 R" {8 H- u5 U- t) \% _# [$ u4 g6 [, s* f$ _# w
: h+ B0 l/ Z# }: `! G8 ]5 r/ ^* |
Code:1 x( N O# W- I
#ifdef __QUGET_SWAP_FIX5 `5 T, F5 L8 r* Y0 E8 N1 X6 g
* T6 O2 c* [8 H( g% r
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 U/ T5 w+ h5 @: X7 {4 J" H
pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 n' {- n0 X5 r5 l* o q1 C% v0 d, Z2 s7 z- {- g
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# e, p' a Y1 c3 F) L' K
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
K/ C7 @2 r( z5 H d. W1 n
- ~2 ~% W" o6 l8 t# X- l1 u5 }; I if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); W$ ~; W/ B; r, w6 ]' r
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ v) E" `3 W+ h* |1 W, {
5 n& U# P, d; b/ I2 |
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) i: @& H9 R8 {" p$ N
and add under9 f% @- M8 n( d+ l
, e1 ~6 k9 c1 V3 h% l
Code:1 P( x8 C0 e) J. C! w5 |+ N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ y w6 i, e; b# U4 } {* {0 V0 f0 V+ ^6 V' u, B
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 s4 v$ x1 q% h. N- K }this1 n) ^( ~/ h& c- i; Z- K. z
* w# V+ Q8 C3 I( l* C
Code:( e7 T4 r4 }$ H. t3 b- t, x
#ifdef __QUGET_SWAP_FIX
6 R8 Q, Q t \' V; W K if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 S* d/ O/ _1 t+ N pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());2 v3 W8 P" u4 y7 v( U
: J' {) n8 g% w8 z' a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- X, r, F6 y# ?3 R. I8 T( V
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! Z2 r- }; Y2 O U' D0 K- ~" Y- Y
6 [ U' ~ P4 }5 j9 z if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) O+ [4 S( T1 P' O- M
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 g' M' i9 l+ S& F
. z7 G# F1 Z% M, U#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % K/ l* _/ W7 s9 G
, _% i3 @' k1 k" @6 _
# v( w2 B a) U |
|