|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked $ d6 M* [, g9 v y8 S
I posted this because someone kinda posted a youtube thingy about it :O.6 \$ N* I# R- k9 ]6 o1 x
. e3 q0 s. I8 ^) C& pFind this in DPSrv.cpp @ worldserver/ d" | J9 Z) e: Z4 @
1 C1 K1 l! o; [7 L7 }
Code:
/ h" u7 x" Z9 I9 fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ y% r& C+ P9 M+ W/ Y
{4 E. S' {" N9 I/ c0 H, `6 ^* i
DWORD nId;
# U8 N3 C( t9 A5 q( U int nPart;
0 _" B5 d r& y" f1 q
8 Q5 ^% v0 s. X ar >> nId;+ M( B! T) g% B% w! Y/ x
ar >> nPart;
( O( Z5 y6 ~& E' v' Q& t& Y4 m
/ v# g) R& J. w- y) T: {3 Q if( nPart >= MAX_HUMAN_PARTS )
/ e5 ] h8 S3 r1 h6 i2 D return;2 y+ K5 z. J3 J* `
7 d; H# e3 A/ w/ v0 _/ Q
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 q0 t# | P" q: P% T% `% T
' X: e; f3 Q) Y
/ l) L1 q2 Z& h" S' s8 e
Code:
* Z- L1 [, S) q' Z/ O$ Z- U#ifdef __QUGET_SWAP_FIX3 o% L7 u! [: a# a1 u% R
# Q; }6 K- M/ z3 y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 J% Z* D) z/ K, p2 O; n V
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. U- n6 Z4 Q6 e; P
$ T/ m( w) A" k if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
4 n+ t% |& p+ M0 o7 w6 m pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ D) c3 R, J& l4 e: R& |
0 s8 J8 N( w4 B0 n, o; q) b0 ]* m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 I7 J/ q$ \" t" z( r q$ r
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 j) L$ Z/ f% |7 [6 g$ U
# g; M1 q3 W* x: t( J( o#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 a/ A7 w/ W' q
and add under
: n( y7 I% d; r) X% s, Q! V
9 Z, s+ X' O- i% S& sCode:1 ^, L' @6 Q/ X" Z5 A. i
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 b6 c6 h* e9 a" s4 v( Z9 m2 O
{, A8 H$ _4 J' f& H
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 );, C9 d% e$ `5 s$ @2 B1 W
}this
3 U0 r. n3 _7 {9 E! s: {4 p9 G8 ~* p- ]2 D$ k+ k
Code:
5 ]4 k+ I* ~6 ^" T# H7 Z#ifdef __QUGET_SWAP_FIX
, l7 U) p/ G! N$ ]& W8 E A _& v if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 k, G( a- O5 W' z
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 k( ^% \, Q2 S
0 \- m9 s1 q; o" x1 b
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- k- e! j$ K: }0 S) Y" p pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 D; G" V& V; ]% n! I7 f
) i( ]# S* q( v/ C6 W, W2 ^ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ w3 h- a( @" }; [" Y& ] pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 T& U8 \9 A+ P4 y3 j9 @. u
# b" W: {, Q/ Q; }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 g6 y1 [6 Z/ D. L' C" g
8 _& e; c$ p4 c# h$ t, u* E" r4 ~6 X
|
|