|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 S/ x4 K, L0 r% X5 ?6 T7 E2 Z a
I posted this because someone kinda posted a youtube thingy about it :O.6 Y+ P; [% N' U
$ w7 @+ _5 L6 q/ o) O
Find this in DPSrv.cpp @ worldserver
; r v: ^9 {, L( C4 j8 c6 A
1 u. A! I3 [5 J3 z1 \! P3 ECode:9 n8 c0 a% k4 W* g' y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* H- l1 W, I4 @- u- ?' u
{8 H& S, v6 i/ T- _+ g; B+ E/ P. R
DWORD nId;, R8 P; q) ] r* Z! z
int nPart;
* I x3 A' G( c5 n8 C- z8 ?- u! K
6 t8 q& \0 c- Q/ G( L b/ ^5 ? ar >> nId;+ }3 C; r: l* T, A- z* L- \
ar >> nPart; * V1 T, d# \* x/ o c2 b
P7 _$ Z& `% B w' s* ^
if( nPart >= MAX_HUMAN_PARTS ) 6 [' [, P' O" S
return;+ N% Q4 W S! M
a8 G) T0 a$ K$ }' }& ?9 {+ } CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it7 T% o$ e) {2 L
- c1 [) a7 k* b0 o" [
, M& V2 O. A/ `5 M/ x" y) oCode:
+ i- X$ o0 E4 K* a8 c0 r2 E8 Q#ifdef __QUGET_SWAP_FIX
2 ^. N* [$ l/ `$ J) \9 V8 w# ^" y1 b- C0 d
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) b3 F; q' b0 H2 Y1 ~ pUser->SetHitPoint( pUser->GetMaxHitPoint());% k- [5 y* w) Z4 S1 s9 ?
" M# [( _6 u" Q- [4 Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% D0 Q/ J ]$ T. s3 l4 T pUser->SetManaPoint( pUser->GetMaxManaPoint() );
T5 O+ K; K. ~! r# f3 G3 ?/ O! s/ t' |
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
' Y9 s2 `" I) x pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 F# o. }; z7 V2 J
3 B" ~" ^4 Q1 y1 p" o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 P) U; b( q2 f% Y
and add under S( s( F9 z. u( s% g6 v
$ n5 E% ]; c8 ICode:7 d9 ~% K2 Q+ d
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: \5 w7 q6 P& B. a4 i {
$ x- f$ q' w. C8 J" Z+ p 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 );
# |) b9 r0 v1 E4 c }this/ Y l+ \" l6 g) k9 A% W1 ^6 `$ r c$ N% d
, h! P9 O k) A. [: v
Code:- G6 {5 B. M7 @9 |* ]
#ifdef __QUGET_SWAP_FIX* w+ C" e4 ^6 Q D$ x
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" R% n4 U/ w. b' ?1 I& I3 J* I9 Y pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* I0 u4 ?. J% c4 l" b$ w* P0 J* C; X7 Z# u. F# u! a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 Z m& f. s" i# N3 ]
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ h; j' F0 K" E
! s5 u$ K+ @. ~5 D* E* i
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ F' E! Y+ a1 \# {9 p" ]# s }
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- w% N( O; e5 L
$ f7 e& U4 @* e% V; g; y#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 }# X7 Y; {$ k7 y1 U+ y; o6 J; M3 z2 a! |) K$ P
1 n3 x* D2 v! W r+ w2 d( a |
|