|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked + S: I6 Y7 ^1 L0 O4 t9 m8 V+ P
I posted this because someone kinda posted a youtube thingy about it :O.8 Q" U- _$ A, y, {1 D5 ?
* [7 C9 M( X" n
Find this in DPSrv.cpp @ worldserver
y& K+ N5 n, R c$ {- S! x. I
% K" `& y3 p7 q+ m; A% MCode:% Z; T: O5 H6 T! c* _; O \7 s
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 e9 f3 U: ?4 O& q" Z p{
* b+ y5 L( ?$ @ DWORD nId;- P& x" k5 g% L! I' ~2 n
int nPart;/ |3 v0 Z s& r
3 J( e* ?: D) Z) C" p6 c) w ar >> nId;
6 V- [2 A! L: }% } ar >> nPart;
& w. }! ^. H1 V% A. Y ' r+ d; N2 S" }3 J4 l$ b5 K# l
if( nPart >= MAX_HUMAN_PARTS ) & u) l! Y: ]% `9 n# |% v( v
return;
5 N T' O0 Q2 d& h" m2 P p; U: Y2 M; Y; ?* y
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ S6 D. r6 s2 `- V/ J: T. M
2 M# S2 `' E5 D# a1 n4 i( o5 n2 s" S7 d( F6 k
Code:1 [/ j% j) i: ^3 A) r
#ifdef __QUGET_SWAP_FIX, Z6 K4 m# p) {! K$ B, y
7 y! w' _0 V/ k if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; t" m6 F. a8 t+ W6 A/ r! u pUser->SetHitPoint( pUser->GetMaxHitPoint());
- r3 E3 C$ @3 z# L) L1 J
3 F7 R5 P/ p, j2 I& S* H if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) V" _- n* Q9 E/ C pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ I$ n% [, e- w W& s8 c+ f( v" y, f2 D* G! X' u
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& C7 |) O% j' S6 b
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& [# Y s6 g! S' l: r- q
6 e. {2 s, f8 t" g
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ M9 Z) K3 ^8 M
and add under; I4 _8 ^1 S+ y& u } L
n4 K: c, [: {# J0 H, E- N/ h
Code:" D& d/ k9 ^* p% p5 d% ?- N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 B. @: f: V9 G! U {9 x! `4 S4 y! E$ M9 S, J
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 );
' U/ H5 {% L+ C q1 Y7 n) _ }this
: z3 D+ f7 N; F, p; ^) i# o- Z
" L; W+ A' n7 |Code:' g. e3 D% B2 \0 ~5 Z
#ifdef __QUGET_SWAP_FIX/ c+ U# K8 R+ w# x9 y1 ~ t7 |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 @: n5 E% M/ O% f" u pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 j% v2 c$ x# w: p8 Z' [: N( o- D5 n! w* F0 [8 r# g
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 _9 }$ v( F4 {7 f! y3 e, i: q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# X% H |/ T" [2 c1 I
7 G% v7 A$ g- l- @* D' y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )1 V! n7 x5 S) W+ L
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 Y% @+ g$ s0 Y9 @7 n; g
, h6 l3 O1 P- @8 Z9 c. m#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + M/ ~/ r5 D I
0 M/ j: E3 e1 x. m G
& t r+ l' N$ E u
|
|