|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( c3 E; u) [( }) u6 C& G* D
I posted this because someone kinda posted a youtube thingy about it :O.
: s& S9 A$ N) Y8 k8 s- L
7 }) V, G4 I+ b( M9 t- mFind this in DPSrv.cpp @ worldserver
' }: g0 _+ t! r2 l( o( e5 t7 n. ?4 o' j0 n
Code:0 S3 q6 A8 n0 H5 h6 c# g
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 U" q% e0 r0 y( I/ G$ @# d5 D7 ?
{) Y8 e7 F4 j; u6 @# p
DWORD nId;
/ S! L+ |/ N+ A0 x9 P: }: ? int nPart;8 w6 N; a- S- K6 @. t' F
! X3 l' Z/ `* `. R! L# O
ar >> nId;8 H. ?* L# ^# f% m' W
ar >> nPart;
4 h( j' E- h; G
& {0 H7 S- E" n2 \4 V( O if( nPart >= MAX_HUMAN_PARTS )
( L$ s, Y# |& C* M6 t return;
7 J9 @$ N5 z( l- {, [7 q* m5 M4 o- X- I8 N
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ I. w# ^2 w' A# w- t3 s6 J9 D
7 B' }: W5 o% j0 h* Q7 f
; Q: q2 u7 _/ }2 C1 F8 cCode:
. n4 O7 F+ X( v7 l#ifdef __QUGET_SWAP_FIX
3 ?+ S; }4 Y; J) r& L- L6 K( \* ?/ {
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
0 h1 w( l( u+ A: d pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 b8 c/ T3 j3 C
1 |# u9 {) `6 J) |8 R! @ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 c) q% K. f7 f( G1 ^" o6 O
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* {8 F) ]1 V" U6 c; E
, W, b1 f3 w& m2 Z( d: Q8 s# b if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& G8 l) W: A1 h; U: K* z1 P% t
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& S5 Q- ]& d0 y) p* h) j' u
5 f$ a5 m ?( W3 F0 j" l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, S0 |& B4 \) c& gand add under
9 v* ~1 M& k$ E5 a1 k( E6 d% c5 L3 |+ _( L1 r
Code:2 ~/ ^1 f9 j( @, V
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
& r3 L+ s6 ?7 v0 s8 | {
, A# F$ u; v0 V8 ~9 L 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 );
& w3 I, k( [3 \/ z: I* V }this
1 U. ~6 y, s5 |5 ?
/ t3 }; \! D" k6 E! |- eCode:
$ l! h- @) V5 ]% \% K5 x7 R, r6 O- E3 e#ifdef __QUGET_SWAP_FIX+ Q8 f& D! ~; A
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( ]: N8 Z# v: ]7 M9 ^% s+ b pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ Z& ]9 G3 s0 I* W2 V1 D/ ]
0 P+ M+ H& {" O5 X7 r if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" a4 v" o. F4 W! i
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( s& T5 s P2 j# m P5 q2 M7 g3 D( q1 ~0 }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) M7 {9 Y8 K0 Q1 D
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 n! L. m" R: J5 N% _6 J; q& F& y1 n
+ M: G" G2 g9 I6 e( `
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! d' p6 L# t" r" k: Z- Q4 O) O
4 D' c# A1 l8 A2 p. f( ^" q1 _- \
|
|