|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 t* X6 Z" B$ ^% SI posted this because someone kinda posted a youtube thingy about it :O.: n M4 G: N+ E
& c, N: X4 ~1 x" L. z' UFind this in DPSrv.cpp @ worldserver1 A) _3 W* P* c) J3 }- X
. [$ o2 o5 p P, y8 i3 K$ h( ^Code:
- t! j- u9 c$ Tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) A9 }2 F1 h7 o. N- P% p
{
7 C u0 s4 y% p0 p% n* W DWORD nId;9 k4 M+ x2 B0 Z% ]
int nPart;
: f* |/ |1 U. V/ l6 |& y: S. u E" u* W6 d1 o# V
ar >> nId;7 a7 q9 D2 M( e8 k! y+ w: c a
ar >> nPart;
/ g- A. e5 ^+ z# [8 b
8 F! X5 p1 J+ A2 ^- _ if( nPart >= MAX_HUMAN_PARTS ) c: L. f1 d7 Q, l
return;
9 i" B$ e! {7 L$ b$ q" U j+ J$ n
/ N" [% I7 P6 N CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- L$ C) f/ n0 V w' T
^% h- n3 h( p$ i& U) T: x) b' {: j# }8 k: l4 a
Code:7 C* B+ d& N+ O' l
#ifdef __QUGET_SWAP_FIX
+ \; w2 l/ y1 C2 B! l8 d' a
6 K3 X; D5 V# K4 e! d d q if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 Q, @6 s, K& N/ H1 S9 P$ [" U5 R! R pUser->SetHitPoint( pUser->GetMaxHitPoint());7 ?' [; w, h) d. Z, f, _
5 C) P; C, ~2 h2 L6 @ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
2 Q; F: R9 s: v/ @7 t) E1 Z) L pUser->SetManaPoint( pUser->GetMaxManaPoint() ); B. q/ y. x. d! o! d/ H V
& F9 {3 _2 n i% Q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
% e, L$ R( X8 H" `+ j; u pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 y4 x0 ]: m+ d: \5 a
) w2 Z) G! l2 ]% _+ h7 f, u#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; H( M# _" Y! T
and add under; h' k+ B) k8 V1 a
% F2 i8 _" q+ k! P2 `$ r XCode:
" h, X H! \- i; ~( [4 ]: Xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) e' t' a; X4 m# @4 f L
{4 Z$ P; d( N x8 |4 O3 b& p
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 );' w2 [* e9 Z' l! o& F
}this
# V. B, T& Q% L E6 u" z* W6 C3 ^5 Y1 B4 ^( e
Code:
2 I" l* |& \& e#ifdef __QUGET_SWAP_FIX
1 }6 A& U" w: K a1 }2 Z! ^ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 c9 c8 z; i, K1 w8 s& f pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 ]5 ?5 p4 {4 T4 x3 `# y6 y5 N0 Q- t9 o1 p
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), g2 w8 H6 L( |# `7 q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- V7 F9 c# U1 k5 }6 E" J4 [1 P! ~& i' c
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 q" Z' y+ ?8 [* I6 ~
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 `* w4 X* d& N, B6 Z6 c' Y% l5 E" q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 Q5 u& O( E; M2 s \
9 y& F0 c: m* i9 d8 F" Q7 @
; z2 S* m/ U" `. v$ n' O1 D: q- {4 E
|
|