|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , w. c* O+ v) A% `9 c# i; \1 \9 n/ d
I posted this because someone kinda posted a youtube thingy about it :O.8 `$ {( p, n/ K! x- ~6 n& V7 _
3 z3 m; V, g3 VFind this in DPSrv.cpp @ worldserver
# b$ X2 |* e/ j* S N( i% g) {! X$ `) ?: b
Code:7 x% g* @" r+ o3 X0 J3 e& F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' k$ N4 o( _; r) i1 ~4 V+ _{& s' `& N0 t9 N2 U; L. R4 b M* R% Z1 _
DWORD nId;
7 A) h- `' V$ _9 y2 N int nPart;
* x$ g& t- k6 ~1 q
3 b e- V3 N% H, o& Q ar >> nId;
2 u; Y( u6 C& } ar >> nPart; 6 A. u4 y& h* A# d4 v3 v
/ @3 ?( h! A5 Y1 f
if( nPart >= MAX_HUMAN_PARTS ) 3 g; Q8 ]0 G2 w' N9 T( U9 P
return;" |9 r7 Q: Q, Q0 \& G4 P( K
* d# _* f) w0 O7 o5 u
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 @% A, p/ B5 N( |* w
7 l; S4 {5 }5 d2 J) t
' R: u, q! }! P" z$ O+ zCode:
# Q) ?, Z* J) R7 P! Z#ifdef __QUGET_SWAP_FIX+ r+ t5 T- x5 |$ l
0 r0 w- R$ O4 }$ }. W if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- J' c% F* O0 O" W4 L8 ?, q0 B pUser->SetHitPoint( pUser->GetMaxHitPoint());3 o! A/ Z5 Y/ d, ^5 l* V( N
6 C& w7 A; c3 i. ^& g
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 d1 O& ~0 J3 g3 n/ R" T* p" m pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 G9 U# ~! K- q8 b. L/ M6 Z3 Y( w9 l# o3 e$ @( \: ?2 ^# D
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
+ V1 Q+ g8 P6 w$ ?, H* i- d" z2 o pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 n x- @. W, V4 K- n5 K! f* [
6 u+ Q# v9 r8 X d+ ^) U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; c4 B+ K+ ]& Pand add under
, N& ~( T( @# \: p9 f& K" o4 t- f. j
Code:
7 S3 v- d( L, o6 D' X. e! ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) h3 c' d! M+ D) t; f
{
. L) o2 \) ?. [) l4 r: K 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 );
$ k* |$ u1 y) ]3 I' @7 I/ } }this
3 S8 K; M+ S/ f
% d7 M) N' L" C! M9 [) K( |' rCode:
' _8 p' K! t s#ifdef __QUGET_SWAP_FIX
; K" Y. m! K$ U" p if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
; X* S7 j: b p% C pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; S* ?1 `; \$ E2 K4 `7 k: h; V4 t* @% I3 D$ N" _1 f
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
6 E0 F# K. P# [( \) D& f$ _/ C pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- E- C+ V T4 u3 w
: E2 G2 H3 r# T" } if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ m( B" ?* n5 @( M) {" \' t% ] pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( }; t7 G% h+ } q# i6 d0 B- ~
2 Z& n* s5 H# p/ u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, H1 {2 |4 L% d) N8 G" U5 {
% j9 v9 q0 e! k) K& y" F
$ c! E9 f# x0 _+ @( `" R# s& t/ l |
|