|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' s0 y6 {) n: N& ]$ I7 b6 J; j* HI posted this because someone kinda posted a youtube thingy about it :O.
2 i" C1 w- D3 P: O" |- @
* B( b5 P4 Y+ p yFind this in DPSrv.cpp @ worldserver
( N& e2 q0 K& k7 k7 ~
3 [2 n3 \4 w7 Y# aCode:" X! w4 F# u6 L) P; ^
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 t; r& E1 s% v0 Y* O6 R* h9 q6 x
{6 b$ k+ o) ?' [6 \4 S X: V6 D& t
DWORD nId;, n; b; }! E6 m% ^0 I- G. ~
int nPart;
9 }0 b. t7 r2 H( B; ]( k- y# x z; p! G9 A+ n0 A
ar >> nId;" R: I9 n$ i6 I* C
ar >> nPart; # J$ K+ q7 k9 Q2 H9 v6 @: P
/ f- V! z0 |$ d$ | if( nPart >= MAX_HUMAN_PARTS ) ' y9 B5 e# J: o
return;
/ O# }) ]* X! C( e9 K* {; O- g+ D; Z* B ^0 o; N
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 _# ~" I" U, p! _6 a( c
7 v2 s M! G) N+ |- N
4 f0 m; Y" l2 o9 l6 h5 mCode:& }: R* w, K/ K) `: ^
#ifdef __QUGET_SWAP_FIX
. m4 G* J3 g' C* ~$ {
+ G8 a! c/ l9 ~ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
}- ?( D! v5 |% c% W# S: X pUser->SetHitPoint( pUser->GetMaxHitPoint());6 S- t4 X' S& l; i1 c
* M) _& A3 M) O& p2 c l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% Q; l; i2 m2 M' k* D( A pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ W" ~8 E! [, ]* B7 P8 b0 v
# `+ o5 T* U; i9 k. O6 W
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 _2 ]" r) }( r f8 L6 \$ b
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );, Z7 k2 a! e1 ?2 s" `- b, \: y
, J6 r6 Z- ]& n4 O3 Y6 X
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" u: H# b" I2 dand add under
( U: c( v2 N/ i4 |. K1 T- w; T% t0 u; W) p- H& }
Code:
+ b3 R: h6 _% x, j, ^4 O: k' Xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 ~8 [6 s. K: O! F; q
{
( R! M$ b9 y5 h1 i) t 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 );
1 ^ v g& k. M' c8 P2 w }this
) a5 L& i2 Q4 y8 w9 f" ?, z4 q5 F& u
' F9 \0 R3 k' Z: ^: y" LCode: B6 Q* b, a9 X
#ifdef __QUGET_SWAP_FIX
% ~" l5 A1 r. l5 i+ p2 c1 K$ ` if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
8 b E" o0 L. ~8 N. V- g, | pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 p) x' P5 @+ Q+ U5 Q0 X( \
) c: r' r4 o+ ] if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )0 d! N% i2 ]- O" t7 B
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ Z4 S% [+ w6 ]; ~# l
/ s7 b. L" Y h( ^8 t) S if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
. u" k5 N8 D8 [" ~/ u4 k3 B pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# `* i" p6 e0 }$ s! z4 T% ~9 L+ I7 M& z* [. o% z( J) X
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. D2 w, [5 i5 {! |9 ]
. R. s% w7 [( k
3 u3 ?: L+ h7 _7 I |
|