|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 F9 }( c5 v; u. z' K4 {" YI posted this because someone kinda posted a youtube thingy about it :O.
% q a: V& h: \ C
% L7 o M& F/ X9 t7 ^2 sFind this in DPSrv.cpp @ worldserver. a3 w# q5 |% g8 E
1 ?0 C% Z5 F6 V; B4 j
Code:
) [6 Q5 o7 u/ Q! |4 fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); n- v! o, K0 O8 Q& Z3 L5 I# { d
{
2 N k2 Z" g; f8 [% q H DWORD nId;0 F2 N+ I& F' x/ ?" b& [
int nPart;, G% y) Q4 |6 e$ R! E/ H
+ e t. n. b; S6 t
ar >> nId;
) Q8 r' k o3 h* G& l2 G ar >> nPart;
# H9 j6 {# W, |! x% W0 n $ |8 x* g3 m E0 s
if( nPart >= MAX_HUMAN_PARTS ) 8 f# w/ u$ b$ k' b i! U. q
return;- S9 x/ o2 X5 `2 }' s: u
) n2 V1 x/ A2 I ~
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 d8 g" v9 W! o" }/ Z, _/ k4 m3 F3 c8 `. c
$ ?* v8 u& |1 s* lCode:7 d( `; c& y1 ~) J) V
#ifdef __QUGET_SWAP_FIX4 q# S4 f" \/ p, ]7 S5 J n
0 n8 {5 _0 `* q& W! ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). [6 F: P1 p( O, U( \: q+ J
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 n6 G5 D5 B+ w3 w" c8 e
+ r$ r% Q+ o& u) n) C' d
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), b1 L8 G% G3 B' R# o5 |' K- Q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );; z+ c# ]" D3 G) {8 a H% u
) L9 H6 _7 T! j) U" n( Y if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ V4 |: G. b! L1 j- _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 V7 A, B$ d/ X! J# X" ]& V% s9 \/ {: n q$ R) b
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, D4 K5 ~1 `( e* {: v( K" Sand add under
' k4 y8 V/ l2 s2 A, n8 Y! k/ @# _6 R
Code:* f6 X7 m1 W, r; ~! [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 m% S1 T* A3 S. ?( L
{
* @8 v! L! ~$ q5 u9 z 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 );. w5 ?# {4 R8 T, h; n
}this4 ~$ n3 _2 A- {' M! ?# I
9 `+ g( T9 p; I3 M
Code:
! g; X2 U+ a I$ q) c/ D+ | Z2 s#ifdef __QUGET_SWAP_FIX {) @ m8 K5 `' Q/ h: q* t
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) @1 h ^- T& h! O8 Y pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); ~; W* n4 A5 P' o) D! n$ Q9 {
8 M) H' z% t! q8 \# p3 i- [ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' C8 m$ D Q" D# a
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: F( x# \. R: {* P
5 M/ c. Q3 `1 q, U( X$ q6 \
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ d( r8 J3 S+ I. ^& S6 _
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ p; t! V8 y s9 D
8 D6 y r7 ^! P2 [ c8 Y2 u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# Y% o3 h. K1 V0 S. U7 p, d3 p T$ @/ y
3 u6 \6 o* B2 h
|
|