|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! o4 g1 p: r6 f: x5 H7 [; S
I posted this because someone kinda posted a youtube thingy about it :O.( v4 h/ o4 W) B! C
* K5 o) d. z: e) r4 r* Z& E7 AFind this in DPSrv.cpp @ worldserver
% R. \( Z/ b8 W
0 H0 l2 o f8 }+ [- h- P" uCode:
: J g6 `# M( t7 ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) F/ P6 n$ _4 _9 @
{ N$ d3 k0 u% f3 J
DWORD nId;( _/ s* M3 p' _. F
int nPart;
1 |1 L8 S3 h4 m4 @5 g5 ~7 ?" V- ^3 w: B0 w
ar >> nId;2 m0 r7 V. ~( ]. E! m, [3 W
ar >> nPart;
# |; c; p/ l1 P3 g
% e' _9 R2 d P+ D# B if( nPart >= MAX_HUMAN_PARTS ) * K. N0 K, d7 |: o. G& { }
return;2 x2 I y( }* J' ?
4 {' Z% @: t5 h' p) w+ r" A' b8 f
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& N0 k1 B# q2 L. n! j9 {
7 W" u0 l' O" ?! a9 W
: y6 o4 l& |- p# }Code:, y, ~1 g! ^3 H
#ifdef __QUGET_SWAP_FIX
: k1 H4 i" b( s& z$ {" J, x. z/ q9 ~. @" d
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 h: f5 J" c2 M& ?% c! q4 I
pUser->SetHitPoint( pUser->GetMaxHitPoint());
% a+ D5 u1 v" m- U7 p5 v$ O- v8 o/ t8 w( J5 B4 x, ]
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& G/ B# k* n0 r# F pUser->SetManaPoint( pUser->GetMaxManaPoint() );/ r4 g2 _% g. @" w# K
8 n; |" \/ t5 v: b- A
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )' p2 K0 M( h% |
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 @- _7 a$ J9 p, Z) E# {
' H! z# v& Z+ k& f% s& ^0 ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& S: w4 Z# x1 C N, O
and add under
* O3 _4 I) Q6 H* w4 V
: j3 m( U% m5 r, X- \% Y* I) j7 hCode:9 @$ n! a! \) J$ }1 ^% Q& H+ Z4 }
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )3 J+ l/ A% k' C
{* y* Z. Y% I) F Q/ W X* k [
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 );
- E z: h4 P& X9 L5 O }this
3 S* V; U& ^! w9 w% ]* O
3 |* L3 O% K- M- Q9 iCode:
]* S' ^' h- `! y4 P* S#ifdef __QUGET_SWAP_FIX3 x! F3 E1 w: s+ B! J# c
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) Y a+ N, l) u pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. _( D" c2 O- Y/ n; @
/ P/ T" W8 Y: J+ c- B k1 {' q if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- L$ r5 ?$ ]* ~
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ B' X, k: r& T/ ^& z P
: R/ ~1 F1 }+ k8 R if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), C! U/ V( N4 [# ~( E6 Y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 ]- V* [5 L( K; W5 n
$ a( g) L) d% k0 J#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ r% D8 U/ S, E2 E7 ^
0 U# o( B4 }/ }- h8 C: f! I; k4 X/ t9 s5 Z6 e" [
|
|