|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' O4 O" [0 d! B: Z1 XI posted this because someone kinda posted a youtube thingy about it :O.2 j9 x f# D' `& b
) L" w6 t1 u3 _$ K: U0 h' [ fFind this in DPSrv.cpp @ worldserver e) j4 q- R* }5 o* j6 O% I
* m- ]. `% S6 R+ R; T) E7 mCode:1 t- ?. _8 Y8 W: G' C9 S
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
" \. x) y4 k, |. D% Y6 L, O9 c# K{
& ~; m- ?9 ~7 ]% T- ?2 i$ W DWORD nId;3 z# O* a ]7 S9 F; r5 b! L1 _% V
int nPart;
4 ?, n( c5 f- c4 a( k! t1 F+ j; e+ v! @
ar >> nId;
" B0 W* k* ?" H3 i ar >> nPart;
6 V5 a4 ]" B$ E9 F: f) J
. O i2 L5 H, ?7 t if( nPart >= MAX_HUMAN_PARTS )
; F; Z' Y/ J& t' c6 x. g3 r) b5 a return;* @/ o! L% ^8 L
. Q, ]: t7 x' B: ]% \- ]# A* Y8 Q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- B8 T# m# V$ i. b w8 _7 e+ d, j
* t) ^! d- F6 u
+ u' ~9 s1 q' |+ V4 L* ACode:
' B% Y2 z4 q: {#ifdef __QUGET_SWAP_FIX
& ]- r5 {$ X8 U a
8 X( ~0 F {' J0 A1 w if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* n( j+ G8 j6 {$ v3 z
pUser->SetHitPoint( pUser->GetMaxHitPoint());
% y* p) K' p+ u( T0 A% W/ a, A
: g7 T: x+ ]1 f( H if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
9 _1 z z' ^+ u3 L9 { b& P pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( i7 e# K% t; x8 k7 H/ K" d% w. f2 C* T9 s; R% V! _8 }+ r
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ E* \* y, L, _0 B+ P6 K/ b6 U pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 @" F3 s% q5 F J) L
3 y9 W# @( u- u7 `( K+ I
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: F* n( n2 R m2 J& Qand add under; W/ }$ ~! Q* y$ z$ S8 z
$ h' n& F/ i7 \9 U* t, [* KCode:
/ x) y, j! x' C( \6 Zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! J4 ~; V1 z( ?6 J: L {; Y2 F% A/ A$ U
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 );) @$ W1 _4 s# m1 k+ g9 ^* p
}this6 p/ N& h& L# ? E& V" m2 ^# c& _
* ~' ]/ W5 B$ ^) a) k, u: h
Code:' d( ^: E9 H5 T3 S2 y3 h
#ifdef __QUGET_SWAP_FIX
9 f+ i$ A7 R( t& O if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% R) y, W0 Y$ ^- t. E6 o* _) U4 c, x
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 ~7 R" x4 c# T2 u- i$ a* T8 u' ?: ]: G I
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- p Q- K: g+ A4 t( G- d
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" n8 W# S3 A# a: z8 L0 F! o
* T( a# x4 S& w/ m1 |! R* K
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# l: C8 n4 m- H6 t8 m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
' h# q& S- B9 @2 X8 t) o" F" [8 }- N4 O, l6 Z6 f% ^
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 d7 N A) t- z+ g* {+ W
0 I; V X8 @. L" {3 V F
# I7 h0 i7 n2 z |
|