|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' Y& {! T5 r- II posted this because someone kinda posted a youtube thingy about it :O.; a2 R) A! o0 @) }4 p6 V( H; C! h/ V
5 e$ c, m% K7 J6 Z% C) h# a- G
Find this in DPSrv.cpp @ worldserver9 w; H: @" X6 J( Z# u6 P e
" h! h+ g& ]; p, L% ]$ h0 kCode:
7 n) n0 y, D- e" }( I, @% b/ \( e4 ovoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 U7 V0 Z. A$ p, x# R$ X{3 R/ h9 ^( C% Y. Y m
DWORD nId;+ `" |! r+ e) W8 R0 Q8 @6 P0 L* m
int nPart;* t8 H6 o7 N% y5 S& O8 o
) [9 e7 u+ q2 X7 C* f: }, W ar >> nId;
8 ^, v, [" P" _) E# U" P ar >> nPart; - s- F5 N+ Y! B; c6 h' A; \
: T' Q# s/ |% r9 g
if( nPart >= MAX_HUMAN_PARTS )
# A( l. i9 E) P7 `3 T+ p0 H return;
; I8 j, V2 L4 y+ t* a. V- N
/ z) X: ~' c6 k" S: ]% E" J/ q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: G/ r& h) X# a# L: C+ N2 g2 O/ b7 k6 z2 z+ W7 Z f. i
/ m* Q! X; \1 X8 W: W l/ dCode:- Z7 p" o5 y! R0 L) `1 {
#ifdef __QUGET_SWAP_FIX
9 R$ J+ X. E; E; H; w
5 B! L% ^! {% D6 U) Y if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
4 u+ N8 m: u6 w6 m; L& v pUser->SetHitPoint( pUser->GetMaxHitPoint());( W' i( @& g5 q' `: |* k- u. x
! n- k1 X+ _7 Y7 j) q/ C if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
4 y' v& M! @) X% t pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 k0 o4 q: ]" k, Y" v% R) ~3 b
' f$ a/ v/ J3 Y% \9 y: ~6 c if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% V% g# N1 m3 Q9 _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 t5 G! f8 O+ m1 e9 ~8 ?- W
, c. Y; O7 W5 L1 i3 f' S
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! Z3 _1 c# b# _& t! L& s2 _4 jand add under
$ ]0 ]" E! [* v$ L# w- ~8 U0 P- W
Code:
5 s/ s6 F& r& A& K6 B7 m# }: R$ M9 E1 Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* ^0 h( Y. K4 \! ?- p1 y9 U
{
" W5 ^/ ^( w; x3 a. |+ b 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 );6 E, U. C$ F3 P
}this( n% e2 e. S9 L, V/ V% M
7 u: K8 M+ T: k6 W1 n% UCode:5 K) p r" m o( P, }' ~% W
#ifdef __QUGET_SWAP_FIX$ x* G, M3 O* V( q: _
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' S* B$ B$ E, _6 x% r pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. E$ Y1 F k3 f; k9 ]
+ v6 W. H% R! `
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" J8 |8 I3 ^! F6 D0 b pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' S/ O' z" G" x% q5 O! z; ^6 V$ U1 ?
& d" @- o8 F8 o1 N9 }/ [% Y8 b5 p
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 @2 V0 e: Q2 @1 w
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 q% k6 e% `* ~* v( H4 x& {" W# w: ~' `0 v6 p) c- G% t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 D2 J. a+ [. S
5 [; E4 E ~+ U+ V9 ~' u, W
/ ?2 P; w1 c( K7 ~ v |
|