|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * U0 x0 q- c3 u( T- n9 l& f
I posted this because someone kinda posted a youtube thingy about it :O.; h. B: W# q% e3 W. Q
' O( R, j1 x2 f' p' D
Find this in DPSrv.cpp @ worldserver: {$ |4 S4 M$ U* ~" D* F
7 Q- ~- L: S' f2 T& o8 HCode:1 |+ J: q% J( O( ]8 m- d3 h; [3 b
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) E6 b! b t( {% A3 Q$ @4 ]& D& g
{
" o; l: L3 r" e DWORD nId;- K' ~4 R+ V2 L$ [
int nPart;
% G0 T* ~8 Z. D/ L# _7 m( v! A2 X8 d3 S/ g; A) ]; ^& V s
ar >> nId;7 a8 B! |* E8 u5 f
ar >> nPart; / F; s1 V% C% d% Z% s+ c3 R j
1 l7 l- o% A: s
if( nPart >= MAX_HUMAN_PARTS ) ( N+ {) O, ?9 t% T3 {; H0 [
return;* s/ o6 L F( j7 U3 _& x/ o8 w$ Q
' y* P& U% I2 M5 }) y& v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 i, G$ [% d2 p% |9 p. A
% S7 x$ b6 v! q1 a$ B
^0 `" f3 ?+ a& u+ h, f0 n
Code:
8 {) J0 h) o$ J5 x( J) \6 K#ifdef __QUGET_SWAP_FIX
0 U$ i: Y* q) y* m& H# c. K
3 {8 U: _. l3 Q. G* J$ I if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ); U( d3 g' u2 o
pUser->SetHitPoint( pUser->GetMaxHitPoint());- Y% H- J5 d G* n/ |- V; T
& o+ {9 m5 Z) g1 T! ^/ Y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )# b0 [7 u& x# E. P3 `
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ E# m @; W. K. U" ^3 c2 a' D e( [: l) L1 x# j
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
+ A' u% B# q( e6 O5 t pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- a( ^0 q) Y6 w
6 h& v, U$ v/ |& O#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
& A3 f% n" s1 v/ wand add under
# J5 Q/ c* E% d& q* J7 \
! A! w4 Y% g9 O$ \% ]0 C" JCode:
! r9 A, L2 X- ~) m/ s, yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. D7 U# C! F; H: G, V1 O {
$ u" Z7 `1 N6 w, I 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 );. U5 @5 I- R ?4 W# ` M% k3 T
}this+ j$ }2 {3 p9 f7 i( C: ^$ j' P
6 \# n9 J- N& O, ^' |Code:0 s0 S7 E4 r$ {. p
#ifdef __QUGET_SWAP_FIX8 P: D. C4 `. R% u3 \5 r0 D" B% t
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
7 x- o$ C$ L: G8 f+ Q) f9 v pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# J% i4 I z( X
' N. N. N" U* Q. O% ]) M if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
) F6 F8 V0 A$ z/ y2 B z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! k3 j$ _3 z" h% U+ i
! o/ h, K# o4 m7 [; F9 n if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )! q4 _2 ]4 ~2 L3 @: }$ x5 U
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( W+ A* ]: C: |3 [! S( l
* U) J! m# U' h4 b
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 b; [0 Z! V1 M( s- z$ K8 r1 x2 h, j b( h1 O1 @; [
, N2 w A0 d5 B4 q( g) [+ M
|
|