|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
3 G9 @; e8 N4 {( B* `! |! II posted this because someone kinda posted a youtube thingy about it :O.
% l7 ?5 \, X+ s& Z! ?$ ]( B) i- T/ B3 \$ X6 y9 b ^
Find this in DPSrv.cpp @ worldserver
! H6 e+ }4 n' A$ V0 T3 J' J* p5 @ n$ g' L7 [
Code:3 S6 M: P3 m k- z# `" n( q0 j$ U
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), {4 `' b' a% _
{
. g6 N6 F/ J; g6 D: U DWORD nId;. ^! r' Y& `) D' h8 C% ?
int nPart;' G! }; R1 L6 p; a' g, L& _: y e$ C
% b' W* p3 o) K- q( C5 G ar >> nId;+ H9 D" E1 L! q" h3 ]: ]% [9 I5 X: X
ar >> nPart;
0 f2 S$ U( T1 d6 I. I+ e5 g( X
- z* B* f, q# @ if( nPart >= MAX_HUMAN_PARTS ) 9 R) A3 R$ \2 ]+ S- K* _
return;4 K+ w! A( |1 h4 L/ b6 _3 `; D; h) h
/ B% u, j% G# ]# ^% G" S% A
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& N$ z. x$ m3 Q Q5 s. O
( d4 h( f$ ~6 L; M) ]8 N7 I! L3 S
$ z+ H n. w* M5 y' B( wCode:4 Q; k0 l( N4 X5 p0 Y3 m$ |2 V
#ifdef __QUGET_SWAP_FIX
" p7 B3 A- B- j1 W: `8 U% J
3 h! L7 N, x% ]+ [0 k if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 [% C A1 V0 F
pUser->SetHitPoint( pUser->GetMaxHitPoint());) Q+ J1 V$ N2 O q$ Z4 m& k5 A
9 N* C) p3 s* k2 M if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )+ ]3 W3 _. Z, J `
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& \) o. t9 _, e: b1 J. y/ u/ P5 a7 r0 U6 A0 P, L, F# {1 G! O
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
9 U% p7 z; y9 E+ \7 R4 W pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 `" e$ K$ s$ Q9 M+ c7 X# a, u: }
7 a( K9 D9 d0 y! k, ~3 D1 b
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 x' \: ]0 l* d$ i+ M) g( `
and add under# @( O3 O# Y: b# E/ q$ l& K
" u4 ]# I9 g8 z. ^& p3 R0 d/ a
Code:
3 v+ o5 d* t f; uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ z2 A }- \* H4 J
{
$ i0 t8 x2 q d% \+ S 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 );% i6 P/ ~5 P. t6 j
}this
8 _5 L% p/ c: c( J% z/ Y/ b
% @) |, G K }1 t( b7 }2 d. ^Code:/ C7 h3 f" x5 a5 i" y: v
#ifdef __QUGET_SWAP_FIX
2 r3 C" ?6 K2 i$ C if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 {" G" |; S5 Y% Q; O% U% h
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! a1 C0 k: L# j/ u3 [
0 v5 h$ W, t6 v; C if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
/ j" y' |3 s5 d# z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% ]2 t0 K! k8 _1 w5 v9 l& u+ `
9 B) C, n9 J. S# m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 x) d5 Z$ E, n+ e
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 o% `( m# m c4 O" c: [+ }4 r( O( s; h2 E; c/ J& x3 j
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * `: S9 L( ~- E4 b: i1 l6 y1 w
: e0 Y1 B2 b7 M0 s9 f# U
7 L2 ~ @2 D$ T# D: F+ r |
|