|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ) c$ \7 V ^3 ~4 Z4 P
I posted this because someone kinda posted a youtube thingy about it :O.' S# o" z/ M! I7 Q
' y7 P9 f9 P6 ]5 j! @9 ]- U; c, [( H
Find this in DPSrv.cpp @ worldserver# w. {- ~5 {+ ]+ T1 f
5 I ]' {1 ^9 {+ C; ~Code:
9 V2 u1 Q U) s: e& p" v/ a& Qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 @ b# b% t; L# d d8 A, y- X& d
{
7 O0 u9 m% C5 q5 l DWORD nId; L0 x; n/ t" @! ` ^! {
int nPart;
* ^, W4 q5 u$ c& N! {
: ~; ?8 ]8 U' }# e. e. B8 w+ _% k- K ar >> nId;
+ x$ n% c4 |& ^ ar >> nPart;
6 y @7 F. o& k& X4 _6 q
5 m( d/ _5 x" y if( nPart >= MAX_HUMAN_PARTS ) 0 Y" x( ?- [7 Q: l# _
return;
. G6 z8 }6 ?) r) U9 N2 e1 s" j6 s% W! k
/ ~. u4 |" b( Q: I5 |& J8 U( Q5 w CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
/ c' x9 _. M0 \6 M) U' T1 V Y) y+ i( g
( v+ z; W& N2 @0 l! I8 l
Code:
* |* ?$ p6 L6 m/ Q$ d#ifdef __QUGET_SWAP_FIX7 I4 W* A4 K* o3 y2 `$ e
; @ N: p2 y* K8 e8 ] {! ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )! [- B1 n* I1 C: v5 F
pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 E6 n2 G" L( {7 V7 F3 u8 R6 v- I' o2 W+ h# W* @- f$ Q3 _% @3 \8 s
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& x& c# Q6 n% s7 k# T* C9 @5 u pUser->SetManaPoint( pUser->GetMaxManaPoint() );. K3 ?6 [. f2 c! Y5 s& C1 v
" v, e7 x1 q4 {0 x; n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! t3 N# h( l5 |) D" `/ T% Q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 c# k- _1 o c1 H& i9 X2 z$ f& i( s1 \: q& J8 a5 U+ g: a
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 `3 t( d# D* A: M0 `3 q) H
and add under" Q+ r& e* ?9 N+ d3 i- i
! z% A& E3 w" i$ t: ECode:5 ]: ?+ {/ F. |; H5 J; d" M8 A' |4 H
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' |- d8 h" m, f% Q
{3 c0 u# X8 o2 t8 v& H$ c
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 );+ j3 R% X! ?- r+ l" i2 U- `3 i
}this' X7 [" x5 H5 N! q/ D3 E; Q
9 a# T& o% X1 _; t2 x' @ e; s
Code:# L4 C% D& P$ I# Y! F; Q9 {
#ifdef __QUGET_SWAP_FIX
$ p1 z P% n9 x. P$ k1 a if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ H* k6 u) C; {- @
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 f5 e' w, C. H- g: A
" e' A9 `. N0 s, ~' I: t- w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
W- i- S+ s/ a) I* P% V- {" r pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" C) b: K, [' Y% ~ F' D% W- s e! W E5 f
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 ^% u% l% \! x' z6 B pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% U% e6 `9 q, ~1 ]4 d; C1 e' P: b* P+ l# `( ]" m, I/ h
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 z5 ? ^: j. f5 r" z5 E6 f& g! K; r" W5 z
8 Q/ y' d3 H; E# l) o+ T |
|