|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " G2 _! U" x7 t8 T
I posted this because someone kinda posted a youtube thingy about it :O.& Z# N4 C" w- p& J# h$ R2 t
/ |# S; v# Y. W8 A: L3 Q
Find this in DPSrv.cpp @ worldserver
z+ R' i9 {: r/ k# l+ z6 Q& \* B5 `
& o( T1 }3 A4 w; Z/ ZCode:
6 P. Y9 R# ]' z. D1 n4 [void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 ^( V+ T# V8 `6 R9 P{
4 z( ~' x9 E* [1 a( k1 e DWORD nId;
6 v. F* J. ^" C; g/ H# T int nPart;
2 l4 B. L8 q8 y4 E8 v5 d9 R3 y6 m5 v6 D" u: D8 g* h8 S
ar >> nId;
3 c9 [) R. d o3 i9 c7 j" |4 I ar >> nPart;
+ J& A. @3 u9 a6 }; d6 Y. h- H$ W+ y * J/ e# u6 \' ~8 [( O
if( nPart >= MAX_HUMAN_PARTS )
2 Z. H7 l/ }% W P: G return;! F! l; L# O3 Z2 l, \
' P2 N% N: E3 U) E5 A( K
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) ^; y& @ J! C/ ^
) ~: `: c; q; f2 w
8 M6 u$ @/ a# x& f d, m) g
Code:
$ f3 m% |% ]" Z! x# o2 c4 V#ifdef __QUGET_SWAP_FIX
0 L) E0 `/ x( K% H
; A) J4 V' W) K& j/ E9 O: Y4 f/ B if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 e2 m5 R% \4 i5 y2 r pUser->SetHitPoint( pUser->GetMaxHitPoint());/ N# `+ i# m8 n
0 i, ?' A. G" y8 A, ?: u3 N! k
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' `/ r. d, X- t pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. `5 p+ b9 B, @. V: z6 z; @. H9 H
2 o7 m# U* K6 s6 d& l if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): f: u6 f- s7 _* c1 E1 e D
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ L9 x9 v4 q2 D+ i% I) \
5 m; m) ^# U+ ^/ K8 U6 R
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
o$ i. W" k% h* K5 z8 ] |; b8 Zand add under% x5 q1 X5 L2 _7 z1 Z6 A
6 u- f: P- D9 ^2 vCode:5 O4 e5 {+ ^3 f3 {
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 x0 J- A& E. ] {
4 O! @8 o; ?7 [3 j* d; y 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 b/ S# |) _- M4 Z6 Q0 A: ~* [ }this. o/ e8 s" o! p1 T# S7 k1 y
; j0 s/ n6 e, `# h eCode:2 D! G. N5 K5 j% D
#ifdef __QUGET_SWAP_FIX
9 _: r) n3 ^5 b; @. {% [ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) K- y- ~6 R4 T) _0 o: q
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- _8 l& ]! j3 ^4 \! ]
# i+ h' w5 g! N" Y" M3 w/ }3 { if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )$ {9 u% n# _/ `
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 z2 V) y* t8 R6 B9 _% m1 N; V
0 R' n# A3 E5 ]8 @* L' N) q
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 K/ O5 `: Q- T: b) g1 l3 J \ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) T' N, q2 \" g3 p/ \) p: p
8 c! r7 E! P* R8 U6 n5 j# Q* Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 o& x7 i5 {" y& p& m
4 V+ A, y8 I. z# q# |+ G. n* W2 W! J& J
|
|