|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 7 F# j3 \& [( Z, F$ h, B
I posted this because someone kinda posted a youtube thingy about it :O.% p% x( c+ Z! _; a
. ^- D& ?. z) p( W Z; c, r9 C: C' dFind this in DPSrv.cpp @ worldserver) q5 }0 u9 y7 ]2 P
* B1 e3 ?7 L9 G$ ?# H0 l& fCode:# J+ Y5 p7 z6 C* S" H; I) }4 }- a( u+ E
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 T/ b( p7 r& Z# U. Z5 i$ W9 s' E
{
% u: L* d" k- H$ B# ` DWORD nId; j; P* a5 X$ V2 |* p; T$ o
int nPart;
) k' L! l3 o: l1 a! [& J) d6 I0 G/ S H# o( v
ar >> nId;
6 ~& ?1 `5 x' N. c2 f0 G. u ar >> nPart;
4 X) S+ S, I' `7 H5 k: @- i 8 N7 ]4 d6 t3 R, ?4 x# d
if( nPart >= MAX_HUMAN_PARTS )
. t5 _! ^ S9 |1 p/ G1 A6 K return;4 C. q7 N' |2 {, C) ~
2 A( x$ |% R0 j" n
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 b0 x) B, P9 y
: @! d4 @; Q6 ]( E1 ^4 D, N: V) W% m/ j' a I
Code:
4 i r V' _& ` g y#ifdef __QUGET_SWAP_FIX' N; D- k- Z5 t; ^
% V- G" {* x$ r& W5 v9 Z if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) t( t" z h" ]4 l
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 L: R: S: @( ]' h
O( J h: f R+ T if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
, ~. M+ L v" Q6 b pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. @5 }/ p7 m! n( |) T: q8 w1 I" p/ @
8 _0 |9 \9 _* V a$ x; D if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( O- _' Q" X+ i; v0 y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: T! X& N2 I) K' o+ A
0 ~! b' f4 n; f5 C; f#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) L. z7 k0 [7 j. W6 j: l z4 R
and add under: U0 s: P3 i4 s5 [$ ]. E. `
% v3 s" u4 @2 B, S3 lCode:6 F7 @2 l. b4 H7 @; l7 }% V
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; \1 d( U& N6 F! `1 @$ v) K' D+ O {
' F, s8 v. J: [$ b) F' d! O 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 );0 W6 O6 E( b3 ]0 S6 t
}this/ k) l. J8 U+ e z2 X) S R" N3 q
: e4 ^3 H' @0 A& r6 m, k3 nCode:
0 G2 D6 p0 h9 V6 t0 j#ifdef __QUGET_SWAP_FIX
7 d5 S; N: a6 R* ?6 m: J if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )& H6 ]8 ?1 b* t! v L
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, k4 @3 t9 E# _: \) r# v3 _* S5 p4 U) @3 w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )1 w8 [; |, D/ g5 \ s
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: j( o- o3 d, w3 S( S1 k' W |
, ~7 ~& L: @( O/ M% u- ^
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 ]0 ?1 n- {% _2 K pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );3 r V3 p/ `1 |
# _3 [% _) W+ b! E7 P3 t! T' M) A1 Q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 [ ^2 }; p$ B
B! l( l4 g& p( j9 p2 y4 G( B
; ^ N! j+ w% e! K$ _ |
|