|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; b) N2 f7 c: K+ y3 u qI posted this because someone kinda posted a youtube thingy about it :O.- O8 J3 v0 g4 a4 X5 V$ S8 I% v
) R7 L2 @$ n. q4 n( j/ c1 BFind this in DPSrv.cpp @ worldserver9 l9 g8 C6 D! B; e. j
. P# s7 P9 E2 y5 }. y8 I( i% O( |6 m
Code:: f/ K! f6 d# h2 p+ T1 n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* F% q) e' M0 |{
0 {# G' m8 W$ L& c. A DWORD nId;
5 e, O0 Q2 |$ w$ K( O# j int nPart;8 N k5 ]' x& i# b: t5 i
+ H+ j( |9 p( V5 w. T# O
ar >> nId;- ^1 s& b4 l: n) s3 y
ar >> nPart;
# u# k- A9 W8 L' q+ B
, u( Q' l0 |2 R+ e0 R/ Z# L, E% X if( nPart >= MAX_HUMAN_PARTS )
0 M5 J1 @ }/ ?: ?- d0 A7 R& |4 { return;; G% Q. m1 `# B, w- o4 J
_6 k3 L6 X& Q: R CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& I3 {: i( g: s* ^$ G
& j. K. k0 i, f: F2 v
9 V6 f+ ?- |1 BCode:( C, g. R% `% u
#ifdef __QUGET_SWAP_FIX
& |# K: k! |4 Z) h( g& K' T( F- n; G1 E# a0 ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) i3 x9 B. b E; l
pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ _* Z. z5 l* F |- _: m1 f# J" T! e6 l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- L* X6 z8 i8 c/ F
pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ B F a8 C& e( E2 P0 z: ^9 M) P+ s
# ]; e$ B* B; K
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# C& C( O6 T% d. P8 l& t% K pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 ~/ M r5 I3 m' c2 `! E
, V& P G0 X" ?: ~; t5 o#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 a+ L9 n7 h# i) q `! w
and add under! x0 r$ r. l' ^# C2 b
4 q7 _ l' G1 m; z# U$ Z. RCode:
- t1 B9 p& ]% Q2 f, o0 Yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( B+ p0 D l: I% _ _ {
% I9 F+ g# j/ A: ^+ q9 j3 J/ U 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 );5 V$ Q7 V# b' S, T/ X" n; c
}this
9 ]- P/ @% f& c9 h9 U* y; i! V8 |- D5 b% E# V' a$ n
Code:) E/ O( t% R0 ~) Y. D0 x& A
#ifdef __QUGET_SWAP_FIX( d* s& \- _7 O0 r* K; U
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' }5 U& t8 I9 r. [* a$ ~6 V2 u! a pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& k3 [+ P! ]9 S# G
7 ^" l- g& }8 e3 @
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): p2 B! F1 u# m2 u; z) \
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ X x# u5 U! l4 N/ Q6 a+ j; Q' T! y/ w( u1 U$ x
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 G; S4 x9 R4 S* \* E# B. g T
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 P* d( J) |2 }! f0 r$ t N7 N/ F
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ y7 C+ u$ s3 G b* e# t: L3 I6 J
+ `/ x1 O1 I) y0 i8 X: e# n* s3 y5 c4 _/ i
|
|