|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" k3 \, w/ ^7 \# ]2 tI posted this because someone kinda posted a youtube thingy about it :O.. S( v. W, R& [6 R) C- @! s
Q+ \8 Y* b3 c( k1 S
Find this in DPSrv.cpp @ worldserver" T* p0 M1 `. W! I" Q" _% t
& ]3 l8 A8 ]" A
Code:
: \6 @$ k2 n) @6 S5 D9 x Q1 evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' g( k) w E; L{% p& p1 }& } v7 t) N" k' l) F
DWORD nId;
" P5 t, \* K x7 a' m int nPart;
( g8 @! r% |" A% Q. m! f6 O1 @
7 w6 D# K k5 c5 `; G7 J3 p ar >> nId;9 y1 { \7 W. M3 K2 |! B
ar >> nPart; 7 E$ d, c8 }+ D
2 ~* z) H: ^ S9 l if( nPart >= MAX_HUMAN_PARTS ) ) T" f/ f z* x# s
return;/ |. h) D6 b' [& `- u( G; n3 z
( _; q( `' z; ]
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ A# o- k% k A0 B1 a
9 R. Y9 h$ _9 k4 N0 ?2 V V- E# H7 P: t; a0 e
Code:
. ]- B8 ], ?% _1 o7 P#ifdef __QUGET_SWAP_FIX
4 N5 U" L. v3 A! m; p& R9 B6 b0 t7 F# q/ F
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# `$ {/ A" o: k% b- ~6 d
pUser->SetHitPoint( pUser->GetMaxHitPoint());$ {, ~0 U) m% s* w
6 h ?1 U7 z2 ? P& b$ p3 r+ q if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), k* e5 O9 R2 r- u1 N+ q+ x0 ^" J
pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 |1 Z8 q) L/ z/ X
! L# V! ~/ V0 F3 l
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )0 E& `/ u2 i1 r2 N
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' u& t9 k6 a8 L6 r* q3 ` T9 N: R( j. j9 y" @. m- U+ W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- B) s0 Y3 l1 x& q2 Eand add under
6 r8 S3 ^* ` B" c6 A3 r# O1 Q& C6 {+ X9 X9 y" R6 X
Code:4 K6 D7 O1 A. v) q, P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ {! R# c% ~* }/ o, d {1 _8 l5 g" J. A" h7 |
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 );3 ], j0 W Y& l
}this5 @1 T! e' T! X. Q6 E+ g8 D1 P. t4 N6 {( c& H
& p4 p- T) M6 V# M" lCode:
4 v' i1 _, y& r$ L L#ifdef __QUGET_SWAP_FIX5 j$ A( C1 u+ p8 l. T# X. [
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )6 W- m) ]2 y. i( `0 N3 S: V
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. V V2 G! a# n c
" {; r" s' L" A. D* q8 |7 |! d if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' l" M% L. ]( ?. t; o
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 B" L( }8 f6 M6 g. c0 u
, L" U0 k. }; v% t1 Y7 W7 c! R if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 \2 u+ a9 I1 A" F* X* }
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* [* V9 Z/ Q7 ~- u3 x
9 d6 c* l5 V# M, |! A5 ]) L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver q( K' k& c8 e9 A. B# G
9 }! G1 O4 P9 }0 M$ X4 h/ w' Q/ P5 P4 O1 c
|
|