|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
, t/ |6 V+ i9 i) ^I posted this because someone kinda posted a youtube thingy about it :O.
( \9 ]+ h$ g, Q' A" W; K, E7 ]
& q f" w0 {7 w) _2 J3 U5 m6 |Find this in DPSrv.cpp @ worldserver! k6 `- Z+ d2 |4 \6 J
& t6 o/ v9 }; U; A( A% RCode:4 J) d6 b; ?! |
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 }. V7 i5 c% g- q2 q* [
{
# r- ]) Z! Y# O8 z$ y( } DWORD nId;7 [9 z* e2 {4 r
int nPart;
2 K% `2 I" f4 j- u
7 v# ?' W5 N z+ ?& E7 u ar >> nId;+ ^. X& u: A2 w
ar >> nPart;
6 e' y2 a0 f! [& ?% s9 k
0 b% K) V0 B; ~! A S if( nPart >= MAX_HUMAN_PARTS ) * D9 g0 ~6 \ S# ?+ f7 H
return;+ l2 D* s9 h, i) w5 v( f& p
X2 [- K' t( \4 ]9 w# Q7 Q; G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 n' K, N! O+ _6 c
4 Z! {/ `6 w+ R# s/ p! c
/ h5 Y* [ Y/ N1 ?) u% z
Code:
) S1 L0 e; x1 u/ x#ifdef __QUGET_SWAP_FIX
- {' p, r! \7 H& Q
6 T* s* B7 h% [4 k if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- W& H o% e" f pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 q7 h8 X# ]7 X: E, x. A: x( t8 x* }) E J& c/ i1 Y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )$ y" }" l; Z/ `+ \
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, G! f& [" l; V$ t
5 z! S( d: `$ Q2 d% q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): e7 Y: u) O/ S2 x# W5 B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) R E: b/ C7 |2 X: Q* T9 d
* g% W$ e+ X5 y% g9 {9 W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 m$ N" r( ^. U& b5 _
and add under
/ \( r3 L8 p) Z7 v
' N3 C3 d- |8 P- u3 e6 B: rCode:# c" h0 }- a- n t
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 V5 M) U$ B' `( R% V {4 z" c2 W# ~1 N
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 g q7 E8 ^! E8 z* x0 t0 ^$ F; Z
}this
% ^( U$ v- S- Q5 g! s0 Y. d8 _* I3 k. @& _8 T
Code:
! U0 ?9 ?' A% a- u+ o: k#ifdef __QUGET_SWAP_FIX
/ `2 w$ D+ ]+ C f4 n+ Z: @ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
5 [: T) k8 V/ N! q, P pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 g3 @: b, p1 r$ ~6 y3 m
' F- l6 ]. ]3 W$ c& u$ _ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 ^6 K% @4 w) C/ D: M0 x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" {! F- q* ?0 J* T
, c& _, L* |0 R' a5 ?
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), `8 X( p9 ^5 a6 K7 _+ U
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; }) O; a5 U1 k6 s2 w
+ ]* P( O( h+ X0 ^ J x#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 l7 D* L: ^ X8 V9 }" {9 X4 G! Q. a; ~1 {6 O* ^# Z5 v
9 h3 G8 ^+ s* S
|
|