|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked % q3 n r% v- W, D% C
I posted this because someone kinda posted a youtube thingy about it :O.$ p- |9 [7 q9 j" P0 j
0 C" k% m& s( T4 T BFind this in DPSrv.cpp @ worldserver
+ z( U+ ~2 W* C1 x
+ I5 E+ M5 d; p$ ^! @; x6 vCode:
: Z1 Y# x- z6 }' D% n4 |% yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) u: P# u, G* B
{4 q0 |+ }5 F& }8 O: b% W
DWORD nId;
& ?. k/ r) D- l2 g int nPart;
/ g8 o% G( W3 F+ s" e$ ^
1 Y' F, Q _2 f% z" E t! q ar >> nId;/ }) c" F# P; E9 w( W* j" p# ]3 F
ar >> nPart; & _$ L y; z% E: I+ y, H6 k) F
: H8 {( O9 B+ J if( nPart >= MAX_HUMAN_PARTS ) + v4 a2 u8 D" i' c' e# d3 U2 D
return;
! N. g) h8 e, V; w8 g' Z
" ~0 O' e" \9 \ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
L' h! S( W" l, _ ^5 E' J' D" o! G* C* h* g
/ F, C& U& W: s R3 b; W
Code:
' x5 M5 h/ j7 _" v6 F% d& A#ifdef __QUGET_SWAP_FIX
/ u& K: g9 d7 S" _' j9 l2 a, ?# U; [8 k- R# l1 L; Q, D) p
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! x) M+ T j6 H' q: H pUser->SetHitPoint( pUser->GetMaxHitPoint());5 h& Z* R/ J( v2 H
0 v3 [- t1 P5 ^ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! ?" C$ J% b; W- C
pUser->SetManaPoint( pUser->GetMaxManaPoint() );& U% P0 d! s0 y$ m: m$ [8 W
, e$ Z- D8 p7 n$ v9 e! O if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); T- x1 n9 |: n! n! P
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- ~ z1 B" U+ ]" X
0 _8 \ I% \( |/ q: R) o r#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 i* i& T7 s0 D, {
and add under" B+ Z9 t" L5 F; V
1 t$ V& X6 a3 \* o7 x zCode:
4 H7 L& _, x; c& B W/ W& b) o6 dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# `0 U4 X* s2 [
{
- s i& `$ {, ?- r: c7 I+ L 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 );9 J" H+ q D* i. E9 G, ^
}this2 O( Z! b( ]4 y' @- Q1 I; R
; Z. y! L% | ?8 @
Code:8 F8 {. T n2 R* o9 @7 z
#ifdef __QUGET_SWAP_FIX! O+ j( H& Y# y2 O6 p2 d
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 \$ }2 C3 H2 \0 T b; Y* y, ] pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( E- G1 E% e; {' }! h2 s
! X4 y1 \8 Q' }3 Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ X8 k( R* U3 B& {# m
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ I1 @: M) A* Q9 d$ ^% h. N
) w. _: a5 e4 Z( p8 \' O$ c1 o if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& M6 Z5 N. i2 e& d1 I. h) d
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) G5 c% `* Y9 _6 c- G
' g/ g* C7 y8 u8 c- Q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 w* K" D' X- r b, T! t" c+ G% z ^6 }/ l1 C) E
" `! H, f& ~/ U* ^7 h |
|