|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # z. a5 {5 ^: r/ n% n
I posted this because someone kinda posted a youtube thingy about it :O.
. u' U' z) u* A& ?$ U
@0 S' W, K1 f$ D8 Y: D z! zFind this in DPSrv.cpp @ worldserver
3 S3 V" X& o# O( d. m5 x' u U( r/ h
Code:
0 b$ j* U! s, i# d8 G+ Dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; z3 S9 m. N: {{+ A+ [: q& P6 ~6 o* z
DWORD nId;
1 [* C3 w% ~' ]) x o. k; J* Y int nPart;5 K& P4 a" \7 h: }5 s: u( O# f& r
& Y6 a6 E" }5 C; r
ar >> nId;8 Z& o; c0 d3 a
ar >> nPart;
2 S: q$ b) ~. H( g# A9 u
% V& V4 T7 t. v/ k( D+ N0 T4 H7 g if( nPart >= MAX_HUMAN_PARTS )
, v+ L4 Q, T1 Q9 S, | return;
8 U1 W4 L1 |: P# D% c+ }
3 i, |3 [# s. K7 r CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& v+ N* U% w5 {) A# V' V m7 d' n! E$ c5 }
5 t; d4 f6 I: u- Y1 n
Code:* Z, u: D; `! Z7 `# Z j
#ifdef __QUGET_SWAP_FIX2 t$ C$ [% H2 T6 z5 E' d& M. n
" T5 n) a0 c: X7 e. Q2 q4 B8 W
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ), U% n4 v @1 w, l2 q& U+ K
pUser->SetHitPoint( pUser->GetMaxHitPoint());- h; E% X. M* ~ z; N! S
6 M2 g& u, [, n5 z4 b( O* U7 k. ?% G if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
0 M" L8 T% Z) _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 i) q- n9 d; `4 d
5 p, F, W2 b$ K
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 s K* F! c0 S+ |9 h3 ?6 h" J7 k
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 K4 j9 N3 R: ]6 r% b0 @5 D8 x3 D' H) q+ e
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" j- j3 @- Z, e" L
and add under. K! }% ]* j& _5 W! w( k
: |+ H8 @: G3 I" U! O6 m
Code:1 Z( f3 d2 _. e7 c1 k4 F
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ ?1 _- B! J% y
{ C+ \) d9 ?' ~
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 );6 u; W z: R- x2 H
}this% N, K; S* e7 S+ C, F
& w' f7 G$ w* F& q
Code:
2 t6 B+ }" [/ O1 L, A#ifdef __QUGET_SWAP_FIX4 T, ]' n! f9 Q% {; p
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ G% }+ ?8 y( j, G$ z; w# s5 h9 p
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- Q: K; T" }# ~/ f
0 O( F- N% S9 G if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 W" d* U+ Z7 F7 P5 K ]+ U pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& z5 U! l! Z. _2 U. w) _
7 _5 i/ @' Y; n0 P/ m' d, g9 ^
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* Y/ A/ _. Y6 c E! @) [ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% g" Z. p( b# c$ x9 X$ y
% c3 C5 [# E9 g* C
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 R" n1 D+ L$ V1 ^0 j4 K/ N, v: R/ Y; x- x( x j, V
- z& R% ?" l( y) s* \. a% q
|
|