|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , ^7 _8 p* q/ e" t+ S, {! s% M
I posted this because someone kinda posted a youtube thingy about it :O.
( z' q" L6 S6 y0 `: o9 _$ M4 u# U6 L! h3 K
Find this in DPSrv.cpp @ worldserver
' u3 u" H& O& y! f5 ?+ m9 f1 Y2 T9 G/ C
0 K3 f' u+ ]6 y2 e) \: OCode:! q$ Q. k6 _# a
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 @/ d5 F% Y5 R6 x{, d- `$ N' H& g+ ~
DWORD nId;8 b$ g8 O/ j1 Q: ]9 K
int nPart;
' U* Z' B& E0 d+ c9 W0 d
/ n; G( Q+ z& J& L% D, _ ar >> nId;" k5 P9 C C! x; s5 ~
ar >> nPart;
, @6 F$ F) p2 E2 H4 k/ F
+ \7 h4 u5 ]* f4 s( M' t/ w if( nPart >= MAX_HUMAN_PARTS ) 4 T/ O' n0 f$ C* ]$ W
return;
- M% q& }& Q% x* ~. x2 H& x' y" g1 N! L# E1 p8 G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ \+ D7 z" M& A; W* @2 h' |
+ X: P+ j n$ g" [# H( I# Q# D$ W. M: U" e4 i
Code:( |$ \7 q6 Q/ M
#ifdef __QUGET_SWAP_FIX* r* s% E' w- |5 Q" ~$ m7 E' O
|' G$ t5 k( ~" k0 k if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* c4 s/ y; N1 \; D9 b2 A4 o9 j pUser->SetHitPoint( pUser->GetMaxHitPoint());$ ]" w F) y2 e) c* R
6 H0 r) r1 h9 m, @1 ^& L& |7 ?) ` if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! D( b# l/ b/ J/ ~# l3 B
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ z: _0 t! v! f0 X1 n
( k' X1 n% j2 i4 w' b if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 F. \* q* [7 S+ f
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; _; n: T, M1 D/ |* {+ D4 h' }/ a+ V
- |1 {( S' m. {7 l! a#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( I/ U1 p/ U$ {* A6 I
and add under
U! e6 w/ X6 a1 U) t4 y7 z0 ~: P, W* g) P# Z2 d
Code:
' M4 _% j" J* G+ Cif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), R- k3 C7 O0 M- q. x5 j% v8 ?
{# L' g# `7 |; 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 );
1 {9 @& x' B- {* i# | }this! v9 N u% S+ y6 ]) `; @
u6 H' H# B+ a
Code:
6 S+ e( D5 C0 a/ }# r# p% r2 r1 [, r#ifdef __QUGET_SWAP_FIX& q2 f7 i, E- G/ Y. r
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ). Q6 e- `" i* Y3 |- E( W; S9 ]: _7 Y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ |/ t. s: S, F$ t8 @6 I
9 a- a3 P( @# I# v if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' ~# Y/ H2 S/ m2 J, }7 d# P
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 r9 P3 W9 _! F- z7 {9 y V
/ U# S* F4 p, A+ R9 W3 o$ W
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 N4 ?2 z! u8 T pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( U0 a; Q+ `: I# Q; o: ~7 c/ t
: u# n; ?/ g1 H$ ^9 p" Y2 c#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : z: t$ X1 y, |" p2 R
& Q8 u2 I0 ~6 `! N5 g0 s' s1 @
% @6 W2 L# j1 t5 \ |
|