|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
, Q! H- Z) H2 XI posted this because someone kinda posted a youtube thingy about it :O.4 F3 U3 ~4 a/ X7 K0 D* K/ k# Y% l
5 A& ^5 _3 N; {* gFind this in DPSrv.cpp @ worldserver
- x/ u$ T8 L' ~; G* `4 d$ G
3 ^% Q# r1 V, o7 uCode:
' \" ~# p4 z/ h( e0 d2 c6 fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 \6 J( ~# D5 l: e{) @4 m* K4 @0 k! w2 {
DWORD nId;( v3 P, h* b3 E N+ p: h4 x
int nPart;0 ]: U& X# a4 G
7 n5 H) y, W9 ~4 I. u ar >> nId;/ v, d( C8 [# O2 L' h) ^
ar >> nPart; - ~: k4 h" H) b! G
6 c2 m# n1 Z: f1 l$ C% ] if( nPart >= MAX_HUMAN_PARTS )
0 I1 s9 p n$ K# I. L4 |5 U1 c return;' I1 m2 G& F2 \6 p4 F: }7 K
m% i7 d* M* P8 m, A! a, J, Y
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 H/ s+ ?* g* x: P' \4 `1 J: R% U" K8 x7 m- s( e
. ?( M1 o B9 T3 s
Code:9 v H( Q5 _# [5 h4 r+ u2 e
#ifdef __QUGET_SWAP_FIX# r- g% d0 T N- ^# }
' K4 [4 i" s K. ?6 c4 f( \ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* {4 ?. ^. E4 F5 i
pUser->SetHitPoint( pUser->GetMaxHitPoint());
# x! B! X/ b0 Q' g0 m( U; f5 U4 L8 W0 O0 r9 C5 F- G4 m: d
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 H4 e+ c* S! d. ^' [. R7 e pUser->SetManaPoint( pUser->GetMaxManaPoint() );
?8 V; [' ^5 x- j
. b' Q5 k, h' d$ E4 f if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 f! \- g- b' ~9 i+ t- B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 L9 Q$ n& y# z2 E0 e4 U! U. t5 f
5 \$ o* W h9 Z3 ?; v$ |#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 r1 m+ X" ?: x. U- c( _8 U1 C6 w
and add under6 W$ ~ n, C9 t6 ?2 y" s
. m5 p! b- |+ o& K( z
Code:
" V: e0 z# T! f% p% t+ h( J2 M# ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 O5 l% F1 ]/ ^1 G7 P% m ^ a2 ` {5 ~% L$ o* Q$ r& @3 [
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 );: `* [ t0 j6 E$ }
}this
' W4 t7 V; ]# f2 U6 p
8 T/ {+ a4 q9 ?8 N# m: `" d5 v9 K o8 NCode:
; A8 z* a3 b. D! ^; c#ifdef __QUGET_SWAP_FIX
1 B' I1 n( B. s- t9 E3 f7 x if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! T q; f O; a# P& n. G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 B7 Q* _" ~+ J/ Y$ _9 K& f
( y/ n, P, L4 f5 ~5 M if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" b/ Y* Y: H: z1 K; ^ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 Z. {- j; F3 x! J0 A
: \- n0 G2 [* f6 S8 ? if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
5 y/ N4 |% G9 g5 \# _2 ?- @& a8 y8 L pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- \+ T( c$ D0 N# g8 f
# i' h% x& L8 V5 h* [2 x7 E1 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 N* l. b) u9 }7 n- S! H/ Q
6 \. S4 ~" ]8 q+ Y2 I; d' D; D1 z* J, a- g1 G" b ^
|
|