|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ {6 Y9 l- A b8 d% zI posted this because someone kinda posted a youtube thingy about it :O.* s/ h# f' x* v; l* {; _' d
+ m9 p9 o% j1 @6 oFind this in DPSrv.cpp @ worldserver0 o+ T( z; F4 |9 Z
& ?% f& B$ D, a3 F
Code:/ ^- O6 m& J6 f% t; J P1 Z) E
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
+ w; ]3 O0 p; X9 m( f{
$ D* _# @9 N7 G }+ g* Z, _1 X DWORD nId;
: s: b2 s8 `( V+ S% `, Q int nPart;! e' o" u3 n0 e2 G1 d( O( Z+ T
9 D5 g( c& y g; G% Z ar >> nId; U0 D/ F5 j) ^
ar >> nPart;
a& S# [9 q. K! r( ]9 o* o 4 {4 ^9 j, {4 G
if( nPart >= MAX_HUMAN_PARTS ) 3 h1 o6 {( Y6 e
return;
- y% F: A) m# q) o7 @& I4 J7 c& h4 a; ~
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
3 q, X1 U8 F7 f. b2 i/ B; Z# h0 p& `: u
& W% l: @# C# \3 Z& i5 O, ECode:3 a0 Q, z# @2 B- s) u7 e0 t
#ifdef __QUGET_SWAP_FIX! d4 B! p; C' V% c7 i1 J+ V# u' h
$ J) s$ K( p1 @: J# }: A
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' B, m2 e* F" D3 r" A pUser->SetHitPoint( pUser->GetMaxHitPoint());
% G( U$ @ S3 @5 S4 I! O x4 n1 z! A8 v* ~4 e8 R ]
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 f2 S9 I: I0 U
pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 L. |: Y1 W% [/ e1 ]* b8 G
! ^$ a3 b5 f& n' {, P- I* x if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
/ L. M8 m$ r) L pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 S9 A% H9 w. E5 \& l$ J; p) j# n& N4 n7 P
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! u Y+ L7 B g; W1 L
and add under% y. B T& i, A2 K- b. K
6 x5 y# _* x T# J; _
Code:
0 F2 l2 G$ \, l% e: I9 B1 t" Yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ C: b8 f/ K! }$ s8 P {
% S' f) |( R0 ~$ @ 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 );: x3 `) E0 S5 H4 q
}this
2 \5 ]$ z! K+ I) j2 ? H! C
* j, z7 a" ~5 ^( ?Code:
`% z4 y* ^& F: U#ifdef __QUGET_SWAP_FIX# C9 s) ]+ w, e4 p/ _4 ~9 K/ d
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )6 d G+ ?% |& y! f2 @8 n
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 d- }9 V/ g" E0 \4 L( C8 w* `! O1 v8 Z8 }( m
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )4 h8 [7 r5 U; ]/ ^- q3 O; Q+ H
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& z6 V% ]( k! [' a) K4 s/ S9 W
2 D6 P V) j1 E1 x if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, T" Z1 P4 R5 J& G, u) K( ]( d pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. x4 _3 c* }3 s8 l
: t3 Z( j0 V K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 I# d6 b+ N: I3 R3 H, ]4 s2 E. H# N" J3 \8 x
# I9 W1 N2 x- E9 I
|
|