|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# V/ `- |# k& j" e6 z* M" z8 MI posted this because someone kinda posted a youtube thingy about it :O.
" \ P) }8 J+ M; m, m! w
- ^+ S5 r, f0 i/ k* jFind this in DPSrv.cpp @ worldserver
& A) U( ^7 F) S* V) V9 X4 a3 c3 }6 u. s
Code:
: X4 P2 c+ E1 E% uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! D$ r Q2 s/ z2 `
{
4 `, O0 {5 s# U" D# Z5 v DWORD nId;
9 j0 ?3 Q2 j N8 s H& R& x% m int nPart;
5 a: j% \$ V* V9 g8 W [/ K1 e) S: ]: K- F, T3 I1 b* ^
ar >> nId;
3 Q. P& {/ i, d7 Y ar >> nPart;
7 j% Q D# c9 J8 Q7 G1 X : @. i% o N/ j( M) i1 S# g, \
if( nPart >= MAX_HUMAN_PARTS ) " j5 A' [" w: X) k5 K$ C2 H7 |2 a
return;
# @/ M* ?4 @# S' V/ e& l4 ]0 |) Z" t; b
: p, {' X: c5 s: H0 V9 {9 k CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 \' Z" M. P) Z. B9 y: T3 ~6 w) N
8 h1 O7 X3 R8 b% j
- c K- m; V. l/ y9 q% L8 E/ X y
Code:
( j( @: Z* ~2 ^( |8 Z) F- o#ifdef __QUGET_SWAP_FIX
* {7 [: a& j' X( B: D% h" `
& K8 J/ h3 L4 U6 P9 H5 ]* r. X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) ?. K8 x) V) ?5 H+ d- [5 Y pUser->SetHitPoint( pUser->GetMaxHitPoint());
* [/ q$ @8 f( e7 Q2 N5 W- d
2 a1 H3 z8 C j. b1 b! ~. h" j& E9 W f if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% F; m% b# m3 a+ z# H
pUser->SetManaPoint( pUser->GetMaxManaPoint() );) g- {/ P0 Z7 n. I) F+ T( Z
6 X( s, U4 b9 H4 o# b5 h
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 x5 `$ X, R; S9 X' } pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 |- n- C& P; {7 N: C4 W. g. k4 k9 J
, s W9 |) i* m7 H2 }. N; F1 n! m) A#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 U- |" Q7 k9 G3 h6 W
and add under9 m# ~( O) C: q( I! r
/ B; p' @2 K6 B. v8 w3 p5 C& G! OCode:* I( f4 R' D0 E% Z3 l
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 y' z: f+ i2 N1 ]" v- q- n {8 F3 f% X3 \0 b. y% [' J
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 );
+ n" K5 s& B- e- V1 y }this# w- ^) ~* E+ @# Q( \( Z7 L* v, Y
5 f' S: u+ j7 G- \7 _
Code:
/ m& m. B! W+ S; _#ifdef __QUGET_SWAP_FIX
, S! L# F# p3 ] if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
/ N- j- z/ y$ C pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, D2 y: @. C, F8 H P3 V8 S' E# D$ V2 K' `& Y+ ^2 q
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 i0 B- B! e1 w9 \0 |/ C pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 F9 w U5 j) c: w! ~; M* d7 o
; {$ t' a! s: l, g! V1 e* O
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
& F5 L$ I$ R5 e pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 P# j' W" T) g# Q+ W0 B# C, U$ i3 o0 n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' d/ Q0 y- B: ^/ R/ @& H( J
! X7 Q; e( l) m K% Z% c* o& G
1 j) ]- x! x" Y, {6 R+ ^# i( W7 A' S
|
|