|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% z( P, Y) |2 O, D4 E& lI posted this because someone kinda posted a youtube thingy about it :O.
8 k7 O! s6 g% ^. v5 D% ~3 M" P$ F* }6 q4 _' e- t/ s+ q1 k1 Q
Find this in DPSrv.cpp @ worldserver" ?8 Z: r9 E' c- r$ y t3 ~, f$ A
' \8 F% I% n e4 \- h: D7 ACode:2 v- \- b* g; G6 ]( A3 D' f' @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 }( }4 B7 P3 M6 h& Q3 t
{* Z& E" P. w; c, x' N" U z* L
DWORD nId;+ {% W8 h( v3 a( B0 V
int nPart;$ \7 W- h% p; j; a/ H9 \: s/ O
X3 g- W' x, c5 k ar >> nId;
3 R9 g# V3 C; T& V' z ar >> nPart;
7 ^" A/ l) n6 b, F# x* f0 J
% ^+ l& X$ b7 T( Z8 ] if( nPart >= MAX_HUMAN_PARTS )
/ X: X1 z& b/ D+ q+ Y) Z/ K return;7 S$ D7 X( l6 j' H! x
, z6 y) e' F6 n( I5 x* G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it% G4 |8 a1 U1 q# d' r$ Z* m
7 j y$ {* b0 ]9 ~8 V: m
" @% K4 E3 G* Q f% }* {- W+ S4 uCode:
2 E# H# m2 |0 Y& L+ V#ifdef __QUGET_SWAP_FIX
; C, V" v2 W8 x' l5 w/ h8 x( d/ b7 e8 N+ S; m9 D7 ] `
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- C" R, P9 }/ H+ ?: I9 m% M
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ U$ w5 R* t- e( X* {4 ^: \$ F
+ X& `& Q( O4 x g( y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) K) v& Q. W6 Q! U, h pUser->SetManaPoint( pUser->GetMaxManaPoint() );& G5 N2 A: ]* u& r1 U
! @1 X4 B& G4 y8 b0 I) ^
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ M* N2 S ^1 W, Q" B1 S
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 s0 G4 }( n# _1 J0 {$ t. @
! J+ J3 |& \5 B" \) l; P
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- p+ `. X8 @# P4 a# A4 s9 P+ nand add under2 ^8 H1 X7 a" s- w- e. R
8 ^6 M6 a8 I% y; OCode:
0 C8 N$ _: M7 M4 I k2 oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )! Y; c6 c/ |5 @5 R
{
- {2 L3 s* H1 S 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 );* u3 W5 q9 k C
}this4 m k9 _: W8 m
$ M1 }- i3 I+ P. }
Code:
. A; F/ @" Q' M, |- ?/ R w#ifdef __QUGET_SWAP_FIX
, B3 L8 N3 r5 p0 r; J' J+ |, O if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )* n2 U. k1 l$ N& a5 @
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" J& _* D( y9 F* W+ B) Q p2 E3 I" [4 ]6 |
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( ^5 l$ m$ G6 Y! ~# F ~1 I @ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 q; {" a6 l# V3 c
$ z! {$ G. b! }! a' V if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 s* \: }) j; f. `2 U
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
, v: E: X: {' |, `, m2 x. Q7 ~. d* [! P. A# S l h" U! B5 V
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 y/ H- b5 [- p2 c! P6 ^
7 b( h3 l' L7 u5 K/ a
& @: r' z; a* X. O% ?" J |
|