|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . y0 i6 x* U7 a& P6 S* I
I posted this because someone kinda posted a youtube thingy about it :O.
: V- a) H6 k+ ^9 S4 s; i, v: U: I) n" I- f
Find this in DPSrv.cpp @ worldserver
+ n3 B e' o: u# _0 G3 N& w' u* r' a. F& g5 X, K
Code:1 k3 Q, x9 H/ `$ u+ \+ J
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 M; u- V$ T4 Z1 V8 p{
5 L$ s5 Z, w4 F DWORD nId;
2 ? K4 D9 _% K+ S5 w R" n int nPart;
: u$ q: c8 [" Q- b
3 d. X" P7 b4 w0 ?5 \ ar >> nId;
- O) b2 m9 r5 V8 b ar >> nPart;
/ W- T! f# Y, z" g/ ?( z0 S% G; I ; t ?/ [. |9 n c1 G
if( nPart >= MAX_HUMAN_PARTS ) % i) G: }6 M& R. e
return;) h9 r: x [5 j- J; O; A+ ^1 S7 h
* {3 M; ^2 i8 O0 F
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 e4 n2 S" ]! _8 c3 Q
3 D* j/ @) {- B: Y" |2 F% q) u4 \) [1 ~# F _$ u
Code:
d$ X, i2 r u. t#ifdef __QUGET_SWAP_FIX
1 C1 G+ U ?& o* {7 H; K! \4 o; C" s
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* L7 t p' p q0 x- |
pUser->SetHitPoint( pUser->GetMaxHitPoint());' O. d: S+ r9 a" U8 w% D4 L. B* i
+ D2 C t* ]5 Q3 b, \# J0 N! N
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# Q$ k( a1 J$ \. g pUser->SetManaPoint( pUser->GetMaxManaPoint() );4 I6 F! V' g" D7 {& S. V& P
. g! T: _- m, |3 Y# ~
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) \% ]$ i7 _% ]2 }/ E
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& p1 w6 g) r$ O0 ^$ f/ ~
$ c' [$ _0 p+ U# G6 z3 P; B#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp U7 t7 E Y$ L% v# |# E
and add under
( \% V B! Z3 y& {9 f+ ?$ X, I# Q6 N; p7 \# a" }2 \. l2 T
Code:3 T) S+ w1 P& a4 P+ k& d% U/ n% n
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! U! ?/ @: [0 p( G {! ?& R- a9 L2 C0 d0 K) P- E, c4 s
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 );
) H7 I3 w+ N5 _4 ? }this6 f9 }6 ?) }& D& s- ~) q
& O0 h, q/ q; r$ l7 l
Code:5 p5 h: G( c8 W5 ^" w9 [6 z5 y
#ifdef __QUGET_SWAP_FIX
! L4 l: H2 g. ?5 Q0 `/ R, N; p if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% z, m; u! n- V0 m& h Y0 \9 w* S' W' [ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 J9 T. }4 |* k. R% |" V7 z' h) x8 U# h" J( P
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); |6 c6 c( a3 M' b: \
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 b' c, g* R ~4 I1 c
# F& {% X# W$ K, E* {
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 W6 z% X7 a. p1 f# S7 S8 {4 F+ j; m+ Z
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! @$ F, Q# c5 x o2 i# S% I+ X- j) A! w8 [; u/ u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 t. l' o7 Z d+ N! ]: Q: u& R; I0 _- }
' y6 w2 e7 {8 w C" {1 W+ [
z ^1 z$ v# A |
|