|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! D, b. O4 A; ?! y. h/ II posted this because someone kinda posted a youtube thingy about it :O.
! ^0 r4 N. u1 Q& q7 @
* J+ }, }3 `0 l- v' R, N: x. c m3 k3 cFind this in DPSrv.cpp @ worldserver0 q6 H0 k1 f1 f: e; A2 ?
% U+ Y9 _. X. J" h! ^5 ~9 c& {Code:
5 Y! q* z" Z. p6 F' B! vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 \8 z! A. U$ i{3 D3 i" H. m8 ^( y
DWORD nId;. Q1 F- j3 V T& L
int nPart;
$ ?% x* V* J, b, `# j
+ }5 f; r. H5 S9 G! E% H1 `# O ar >> nId;7 @( ]: i. x$ k& e7 j; y2 I5 V( H
ar >> nPart;
" }# @2 `* {9 c. r. I K9 Y/ F
6 s1 r6 K: g) f" K; d/ z+ C if( nPart >= MAX_HUMAN_PARTS )
8 M) T @3 o; g1 W return;2 h( ?7 q8 H) e+ t+ M& s9 k" V
$ Y- L: ?+ {( {
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' s7 L* A) L/ W9 d. p+ q
9 `% V4 }( ~' D j$ s4 a/ g9 U7 X" u5 ^. ~$ V
Code:
. K- `% o4 {" i! R8 K#ifdef __QUGET_SWAP_FIX
( N; F6 W8 N2 n% s) n0 o! c+ |8 R/ h* x* q2 ~* Y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- k9 B' N2 Q; X8 _" @2 u+ m
pUser->SetHitPoint( pUser->GetMaxHitPoint());
- D. ]0 `* |0 G% d. x, R- L5 T; e* V
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
" }+ I- u I, [) h/ J g: G4 z pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: d J4 ?; k5 D- o6 M# C' p! \# d) T' w; f0 I# Z) E/ h6 }4 F
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 E5 A' q# B+ p8 ^2 r* h
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* k1 c+ E, z" |" h; O/ _
& N3 s7 Q& ?4 h6 ~: t& z" j7 S#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, U) o" `0 R' x2 B% [; O
and add under
$ w3 F$ a9 V, W
9 I9 v% j/ {% j2 y, L0 s7 O, YCode: u; u. U5 f% O( W! N5 E" A4 N4 I
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: P2 p/ ]6 h' t* X( N& N/ ^ {
6 t2 R4 w: y# L( V0 W 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 );
. o& `5 R; y" ~" I ?9 |/ e6 D" [ w# H }this
' ?$ @" ?2 i p% u+ r f [: s5 J
Code:
1 E. q( k L6 V7 x9 g" s, E6 R#ifdef __QUGET_SWAP_FIX- i% i2 W& k7 g. J
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )) z* J- J2 e8 ^$ ?8 o F
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ c5 }1 w% m. E% ~. t' F [. W
. _3 ^% ^! ?. y6 y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): r5 @3 v- a; i8 _: g8 b' l0 T% V
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! n% {) ^) h2 Z* Y$ N
* G0 L4 S/ z* [* `1 D; Q
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 I1 G$ f) w" Z. e8 ^ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 z7 \6 H# P3 i$ L" M2 Z. b
% n, I/ \9 o6 Z8 y; i F#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 r& E" x L/ h2 z' K( g0 {% T3 U( Z% P9 v
/ T- s# ~, F+ r+ H, Q0 z# w% ~* q
|
|