|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 7 W3 V5 k1 J( w; a* g/ D! C3 \) k
I posted this because someone kinda posted a youtube thingy about it :O.& `8 \6 T% O3 _
7 j+ E0 z4 k* s* }7 \, a2 m" O
Find this in DPSrv.cpp @ worldserver3 E8 T6 }. m3 |: r1 F3 u
0 i9 B* s/ V& M! TCode:" w1 j! Z- ?' z9 |$ z" X7 P
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 x T7 i: i- m9 L3 s, p
{3 ~$ d3 s: B: z' m! O1 Y
DWORD nId;
4 [9 V8 e; w Y! a9 S- X int nPart;
8 \2 a+ r$ I( N# m! @
# w# X! O' c3 s7 }4 T6 } ar >> nId;
' T. T8 o1 S4 Z0 W' j+ z" H' J ar >> nPart; % r' @, @. b/ V& E' r
! X5 z. E$ n5 `2 y6 F if( nPart >= MAX_HUMAN_PARTS )
* |( s, c! X+ Z- R return;. m3 |: x+ K4 i6 ~5 X4 o
7 c! u0 _, O+ m; y1 @ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 S1 n. m( e! x; X) M! S5 B( `6 V C- l
( z$ L8 A% o6 p- G- Q& sCode:
1 q4 d* |' z; p5 p) \#ifdef __QUGET_SWAP_FIX+ `% ~* Z% S2 m" [/ M
; \$ G7 k5 ], q0 j. W if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; B+ y2 o# a- W; k1 _* [+ ~ pUser->SetHitPoint( pUser->GetMaxHitPoint());& s; f5 N/ i+ ?) x
( F/ v6 F- }# w3 [9 e9 X$ R2 l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 l) |3 \; h6 Y
pUser->SetManaPoint( pUser->GetMaxManaPoint() );( q! T+ b: c6 S9 g4 v+ _! S7 C* {
) E2 ]2 m' m# O, v' \7 u% w1 o6 n if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( H- ?# u: O A1 v3 H pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 F. V1 Z2 ]. l; W- W6 D( o) P1 E; j; Q5 p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
# ]9 \* \* n$ |9 |4 Land add under0 u, b+ u9 f4 o) A
! D6 v. r; M! j- G
Code:% d1 y) a6 p4 p e* y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( i9 j: E+ i$ P- a {
! ]% z+ }$ o$ ~ 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 );1 u2 ]' u6 J# G/ A
}this
' S: K3 ^ g4 e0 M
: a6 `- E! p% k; n; d+ c! }/ FCode:
. Y C3 @+ Z4 q. ]#ifdef __QUGET_SWAP_FIX5 M7 D: n( T |; \7 a
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 m/ |4 V: w( A- I: s
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 d! {& E- A! b6 N" _
, T+ r0 V' k( D) R/ L if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): ?/ I+ I- D+ x. L2 o3 d
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 v# K/ C; A- L: o
. H4 P6 {+ K- r
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )1 V1 D3 Z6 {9 D& z% A- I
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" l6 i Y4 O% A( k7 l ^% ^
+ c) A+ J% I& k. f6 s, P/ E, z3 d6 D, i#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- I5 o9 y9 e9 \" m
$ A1 v( _, M* w& Y( z* w, J- B' S6 }* }( ~( u6 i4 M) o& O
|
|