|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ; R! m( f. }. l y" i6 c. \6 p
I posted this because someone kinda posted a youtube thingy about it :O.
3 g9 f6 d/ M7 A6 [
% L" j9 ?6 ?% x% C+ gFind this in DPSrv.cpp @ worldserver
; [" g9 V8 j" Z) Y- O
& m+ e# h3 ]% ]! N: r& OCode:( Q( C6 m6 {0 l, t/ S
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- z/ }$ `! ]* E8 u{
9 B7 F) `+ x4 G8 ]; C DWORD nId;5 L- @- A. m; Z0 y7 a
int nPart;
( f! D5 q7 L% Q0 m8 k4 M) _! B$ H' N
ar >> nId;
. Y" Y1 f6 d( ?1 A ar >> nPart;
) P2 C1 x# S: J5 o( r/ C / }9 }; R2 f; G8 G Z3 T
if( nPart >= MAX_HUMAN_PARTS )
3 J! W% c+ D; F2 ~2 t3 p return;0 j j/ P3 I% Z, Z9 e, J5 a
6 f5 d# n8 E) A5 O5 [* U$ A5 ? CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' E$ M5 C9 A* c4 K' E8 P( S- |" B0 h1 ~! K& B, |. I. |' n
0 q8 A) p# H, n, S8 y* |" P5 k5 u3 B
Code:% s% h- k1 P8 J+ M. X
#ifdef __QUGET_SWAP_FIX
# ` t! E" q, E' ?5 q
' N* ?: D3 f0 G7 a- u' ^- s if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* y* A% \/ t+ L1 p pUser->SetHitPoint( pUser->GetMaxHitPoint());6 W# d6 Q9 F% i3 w$ [2 ?
\5 J' a/ D3 I/ O( X% }- w
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' p4 ^; y: W q* V) _, F. @' w+ A pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 N5 q; _. _, L& |6 d6 c; @
- R G* ^) ?- `4 x0 {1 |8 I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ G# c9 G8 _! a2 G5 H/ U! \
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& [$ v% \; i. d7 M3 f- D
( Y4 p2 B' Y$ [% j# w
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp O$ I9 @" B! G
and add under/ C$ f5 K4 x. a. ^; P
( o+ e# T% [6 S' aCode:3 k' i) b, Z8 [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 x0 i- `& X( o4 w' E {
! {2 e r+ `) p- ?; w; a- X 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 );1 I9 I( z7 ^3 i$ K( l3 w" Y
}this
, k( C7 n" M6 [, V0 @) u9 ~/ e0 J7 H: u& i) q( K
Code:9 ^1 j- t. ^; c+ }4 v( K4 x
#ifdef __QUGET_SWAP_FIX
' W( \. `( }6 w if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )* E( L$ L0 B/ O7 e' l8 S8 N- W
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 \6 ^- g# S1 ~ d# n: Q4 k& P7 h
1 e7 X" h- b2 C$ r7 F" f G if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- M8 Z% n) I: V4 u pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ U4 H6 r. x* `1 x+ q- b5 d3 {; U
; j" x% |5 n$ J/ o2 K if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
0 p2 {2 o) u5 ] Z' O& X pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% P4 y' c8 ?8 D2 s6 T
9 f4 G+ Y# A% ]! b% i5 T#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 b' w% m* Y% m Z v+ p( ~# w [. o8 `. I- \6 e
+ p# A7 ]* x8 h6 U: O
|
|