|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 x# D/ l4 O8 C& y3 y9 bI posted this because someone kinda posted a youtube thingy about it :O.
, E) |- g$ ~' j8 r; g8 ?, ^. e( P2 _& r3 }
Find this in DPSrv.cpp @ worldserver ^/ |. f E$ P% T6 g
" D' `4 H6 u: }1 k4 D( J
Code:
0 ~, k$ a7 Z2 Dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' R, A/ c; j m& T$ N$ w" S{$ i. o, B' I) U+ u O6 x3 X9 L& j3 a
DWORD nId;9 ~( u! K% \# a' C: }- r7 m
int nPart;- r7 E+ Z2 a" n6 S. c3 L
# W' D% y! _4 u0 S: G
ar >> nId;
- d+ @- ~* k2 d z ar >> nPart;
G7 m0 I; j& B' b
4 h) p9 K" H+ \4 t2 L if( nPart >= MAX_HUMAN_PARTS ) % I7 B# Q* t3 ?5 b7 k" @
return;
* x: n( t4 v% `$ \. ~! T0 P' `4 k8 p: y' R- v( N$ `" E$ }2 o' m' G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' y& d6 F* f& c: |
$ ?) Z* {8 L, x* n
' d) x9 `' c4 cCode:+ e1 J- E' _# q0 T
#ifdef __QUGET_SWAP_FIX
6 f- ?: k) @, G$ \( s! T
s& l; p2 ?7 ? if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )4 M- G# U) d5 u
pUser->SetHitPoint( pUser->GetMaxHitPoint());0 L! g) O' t+ [$ U0 H& M
5 g! p5 @& `! V1 [ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 |( V, k h9 r( S1 }$ `
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
0 A) }. z1 ^9 o1 ~8 E, Z
7 s, O9 p/ V* t" `4 j3 W3 C: v0 Z2 C if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )' i3 f1 X' T* u# a% E) a6 j
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" m2 ?3 s5 L7 Q" b: O. L/ Z( G% D4 T# L6 X2 t
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 t* w: L2 Y+ G) E6 Mand add under( I6 b! M0 }5 c2 u& v
3 I4 r; t% d$ z1 L* F) h y
Code:% {. V# ?% O! D8 w4 ]) O0 e+ z2 P. _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 u& L0 l9 c+ j f6 k1 j
{, ]0 H! {$ i& ^
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 );+ J9 W3 c$ Q0 I8 U: g7 ~2 ?7 S; `' a
}this E: E- v( h( H1 n2 Y, G
. K8 A5 y2 V+ w9 @8 N7 DCode:) J1 V/ |% E% x0 v) `
#ifdef __QUGET_SWAP_FIX
8 [8 J* c2 X- G1 C if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): N; _0 Q- ?5 k) c: s/ G4 r5 i% V
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; V S# S/ n: N2 d
) s% B) L9 l) z$ ?/ k& } if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )1 }5 B$ M, m0 h+ T
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( E- W3 ~! x% _
4 a3 O. [0 v5 E/ j/ [! V
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
& G' x) L3 u5 L pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); m0 R' u) \8 D2 j
* `- L# G# y/ R
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# e. C7 d) U# \: j* h% F5 G/ U$ D* h+ v! j
; Q* u0 D6 b* @$ [4 p( l# a |
|