|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" L1 [1 ^7 L+ L9 ?# s4 z" \7 s" _I posted this because someone kinda posted a youtube thingy about it :O.# Z c& v: W7 u1 o/ Y, U
/ G1 \8 Q4 p9 J' F J# i( I& s* y
Find this in DPSrv.cpp @ worldserver- J; I2 \% t: N! V0 m
# y6 k3 U' Z7 N" j+ ?5 ICode:) P4 i: v4 R4 \ S* {0 `
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
$ R+ \$ ` _% H$ g{
) K N( p$ I( T, W! z- h% } DWORD nId;
+ K# Z: \( \ v3 J ]0 m! s int nPart;0 Y( U1 ?& F! H: v. S" l: S
4 `7 f& q( h4 l+ D/ d) [ ar >> nId;$ L0 q j# X& Z6 T3 @
ar >> nPart; ) U" Y' M) u3 n, A1 ^$ U
/ v. N u' S6 m2 S: c" E4 D if( nPart >= MAX_HUMAN_PARTS )
6 s2 R7 u1 j9 r) z) T9 { return;! Z3 W) T: D4 A1 I1 S
! X! Q2 d: R1 f$ ?$ X: Q. S8 e+ D9 n V
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
# m" [+ q3 M u" O1 r( S _; p8 a! W9 Q% y H
) v% ^4 t* i' |% YCode:
! u8 [4 T. u6 @; r: I8 X' C) J#ifdef __QUGET_SWAP_FIX
+ f4 i. b ?6 K' a% q$ E1 e9 T2 U5 J% F7 m, L7 v; V- k0 P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ R6 n$ _+ E2 o, w7 R7 D; T( F
pUser->SetHitPoint( pUser->GetMaxHitPoint());
, c+ s+ z2 n* k& e) z/ |! Q# z5 m! ~( p. o
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 i7 D% D/ ~- [! s" i" p
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 h2 ?' Z9 F: I9 Z' q* }
1 Q$ E; I' P& w% D+ r; d if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )" K5 m5 _4 J/ }& T+ T7 o
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 P3 p+ i4 v. o3 H; z* V' m4 W& }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
& y/ R: Z* T! h8 U& F4 ~% Band add under! o# r& G+ t. z6 w% }
3 f* ~$ U% Q- E; |2 a, W1 n
Code:5 h2 p) Z2 `* E6 J5 }
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ G+ U, `7 d2 a {7 r% s, T& e2 d. w; e7 d5 A
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 );
+ P0 h7 n; u- T8 }/ s }this
7 K, |7 s- y. M$ V' d) S* l& S# a
) \0 u% G( v/ M& gCode:! K5 f% \& X- n6 W
#ifdef __QUGET_SWAP_FIX0 ~ ?( {3 d2 \+ C' {9 S8 ?3 s
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 f% U4 e# S) F, o) B pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ d4 D( h. I: P) R+ \, u+ H$ X
) ?1 K8 a! @5 u! T if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
2 R$ ^2 C3 H4 U pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 W. r5 R0 m( P7 ^" f E
/ ], n; d* z2 b5 P' h if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 p+ Q6 d6 o* j! s1 a1 L% m3 D9 O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; W) A( o% ?, l; c$ Y, o& V; W( U: G. O; o% S5 l2 `7 g H) C
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 M* |1 V* a2 x% ~, E0 t8 I
+ u" G* A) L& E# e O0 [! P; G; V9 g: O* D0 D+ h$ k0 D/ t! R8 d% s
|
|