|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked + T4 w6 G! I9 f& P7 w. M
I posted this because someone kinda posted a youtube thingy about it :O./ \3 ]) X: Y0 Z7 g$ a3 X: H! [
5 X6 T: {2 q- U7 X, ^Find this in DPSrv.cpp @ worldserver* K7 R5 v$ w4 V: V5 ~5 V* W/ m
9 U9 s6 X9 V3 f: N. KCode:$ P2 I9 U" a; N+ b; @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 W' B( c+ B+ d1 N. R; o{$ O. e6 O3 M2 f+ n, Z% j; U
DWORD nId;
k1 O# q; T' f3 D5 K& q int nPart;
! z9 U7 D# [% ]8 M
; {) H* }# \4 |. Z ar >> nId;, C* T: ?( E% K. }) n: K
ar >> nPart; 0 T# i& h V8 B5 Z
& N* p- q v4 c# N9 m
if( nPart >= MAX_HUMAN_PARTS ) 7 c8 f. o, ^3 r
return;
5 P, k& t! J9 V! S- w. H0 }, }( e! S
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% E1 C+ R. M- w3 d6 m) z E ]6 |- Z
6 l6 ^ d' f2 d0 m
Code:% @) A6 m# S! Y( O/ F: r" m( i! C
#ifdef __QUGET_SWAP_FIX0 w$ @) e F" L8 o5 l6 T# H1 T! F
- q1 j$ X+ B) H+ P S. t if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( s7 _4 R! j6 |* m' s9 d% @9 K% p9 {
pUser->SetHitPoint( pUser->GetMaxHitPoint());- i1 P% ^( X% R* H: k
) m/ q$ L7 L# Y0 I4 u8 B& C1 J8 V
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )+ V0 a; m! y) P6 X
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- U! p! L5 l/ Z+ N& X/ ?8 s6 T& c- ]" o: O; a6 |7 j; b4 D+ S
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 u# H" ?: T1 \' `. E) S0 L
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: m% y7 ? | G @: p) E+ X8 K1 t3 p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; B; z( ^4 x1 K9 |& P/ ]and add under
) n# R/ `3 S' M# G
7 T7 `8 H1 J% K \$ `Code:" f& f. p/ B1 W- M
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 J1 @9 L" ]+ I0 Y1 G {' F( [3 x2 Y$ i; B0 e
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 );
$ d0 S' A8 o% c# E N }this
/ Y7 S6 ^4 c; n$ [. i# w+ |; X3 E6 C) `9 K
Code:
' d; j+ j+ |6 T+ d$ ]$ `#ifdef __QUGET_SWAP_FIX
! ~# h! r, H8 s if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& J; q ]" \ Y" u. {+ S4 Y pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 E/ w' z: T0 o
+ C* H1 w- n, e/ O7 m* j6 o
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )/ J1 b5 t$ w2 V4 a2 ?1 P
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! `% l2 i/ b' \; s% X% S
' ~/ O0 E! p: |# D: K# X
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 Y' @" E0 R6 _9 n
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 o3 L. k6 F/ A( W! k" n* [. K! Z# f6 T& P
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 J: R. U; N4 U
7 B: \ f, C& m8 d& M6 m O8 p2 V# _
|
|