|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# I' D% {* [5 m3 L$ n$ ^+ W& gI posted this because someone kinda posted a youtube thingy about it :O.- N/ i+ f! r0 N. M& h8 [/ q
9 k* {" G/ u0 s3 N3 W
Find this in DPSrv.cpp @ worldserver& m9 D7 n- O4 v5 l* t2 |
: k; k& p+ Q v' `) KCode:7 Z# t: ~- Z4 M8 v
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( C) k: N4 [* C" t# u! ]
{
7 ?/ C8 E4 f4 t+ l+ T+ H) b DWORD nId;
/ b# l& E& ?8 q/ G" v! _9 u6 z* S int nPart; I$ S, {8 }6 k T- U+ B' I
& c9 e3 e. `8 q' z8 |: B ar >> nId;
# p, W+ t3 T1 f: ~ ar >> nPart; 9 V$ M+ B+ g/ [8 m# ?3 ], _
- S: x$ V9 B+ y" o/ j
if( nPart >= MAX_HUMAN_PARTS ) ) H& r1 \( J* o& s) c
return;
2 G0 T( h9 k* j; ~9 w: c+ h
: Z# a: ?6 }8 N" \ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; i- [4 [( {9 ]+ P% ?6 O* k# o0 D$ B8 u! d5 G2 J: Z4 E T, u" L
4 O7 ?; w% Y! c$ y5 G8 ^' e- VCode:% j4 {% ]2 S& t1 I7 f- y
#ifdef __QUGET_SWAP_FIX' }" d4 g1 I, M M. F ?8 w
* X/ d: l3 D/ `" w# n if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )9 ? z- E* U# C( x
pUser->SetHitPoint( pUser->GetMaxHitPoint());
" N7 B8 F( I' D$ B
% w. {; M2 F4 N. _0 @0 B" f N if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). G; e, k! z* b8 `+ O$ Q' l2 k
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- X) d% o! s( M" _4 h5 C5 c( J. ~$ `+ b3 P3 u- ~9 m
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 n. D9 M! `1 i. A pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! ?* b+ b. u$ i$ b
5 i8 f& m4 ?1 T% _" d2 T I* H#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ q& H* i* u1 O- k) }and add under* l5 t" j: p! L1 s% u- Y. }' d
! o& C- |% H d2 x0 v3 x+ {6 LCode:
, q b$ C$ l. Z3 @if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 ~7 g) l. ~9 A5 t+ s9 ` {
+ K+ F( i9 V1 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 );9 G) N! z7 w/ e' v: u& I/ W
}this
- M1 k7 [ X) ~# l5 `1 b
2 [- [: o* Y0 G7 Z2 JCode:5 ]8 E9 o1 L, A: z4 X
#ifdef __QUGET_SWAP_FIX
" l% u$ ?# Q3 t1 ]! [0 n if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ J5 M5 x" B( ^: d" @ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 O9 {4 R8 W6 E) m6 e
( u7 f0 d: F% a/ }, _
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )% w: g: R: {/ }- F3 ^$ M+ k
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( u; _% x ?2 A( `; W
8 U- f6 g* I4 u) Z% h& B P if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
& d% k4 V# P9 X9 `% K( v pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 h) l7 \ C! G9 |! \
+ ~) K- e) _* j6 V! q Z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 R* Z/ Z+ i m2 q
2 r( _- @9 [* U$ a; Z
# t2 z n9 c' e$ w" F |
|