|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
3 W2 V$ b& z" n- @I posted this because someone kinda posted a youtube thingy about it :O.
7 v N: G9 s. q l7 C3 |/ W% Z# ]5 G0 U% A1 t
Find this in DPSrv.cpp @ worldserver
) m( c! X2 g H
# G5 J5 p2 v% B1 U* |' X3 ZCode:
% }, Z2 V" S! Nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* `8 t! [! [+ d
{
% Y3 g0 Y" s* P8 p. @9 n5 L DWORD nId;& U9 t$ b& |. k5 l& u' h+ ?
int nPart;
5 H% s( }) M# e6 s) U: C* n; z) j0 n$ ^6 J& B, v9 Y
ar >> nId;
/ C2 R% \9 F( w i ar >> nPart; - p# G1 t, j8 a* ^, c. |
+ m4 G# u* b. u1 |: T( v
if( nPart >= MAX_HUMAN_PARTS )
, s/ m- o9 p/ M6 |) X. T return;* b5 d4 |& V& y6 H( ?0 c! j
7 ~8 ^; P$ m/ X0 c* b9 F CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! r) e+ T5 p2 j5 P% O+ K' t
. w. }9 i- _; e5 b
. U$ \& e A% i/ ECode:* O, r! U, \% U1 G2 O5 s
#ifdef __QUGET_SWAP_FIX4 m. F. R6 b9 t; T; i0 ?
1 B% n7 y) U- g9 Q3 i) L0 ]# l if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
( o8 M$ g, d& i ]3 { pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 A$ o& X5 Z: e+ w) S3 h% @1 @+ e- k$ s0 |, E, P0 j
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 B- W1 r1 f2 t4 q3 J# \6 q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 Y+ \. o: S7 \$ k
+ V4 K' n0 c+ q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
. k, b* A6 }1 | pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! ?9 A2 M# P3 a! Z
5 s0 B; R2 @' X) ]+ F
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& {. Y& ?9 n- G+ \& k) r: f
and add under2 p% r% X$ L$ w/ _- S# B
. w6 H( q5 ]7 k* |9 W) cCode:
4 C1 Z) o3 A: E6 o/ b4 wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ _ s- x8 f, J( W8 `. G
{8 A" V& |9 F& y* y3 f
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 );
( W( z" I$ N! T" e6 J- F: y }this! A! Q4 ]: G% p! N9 F, v$ ?) m
4 X7 ?& q/ N/ kCode:* q, q+ E. H/ ?1 m
#ifdef __QUGET_SWAP_FIX
0 y$ B5 D- ?: A9 Q) u3 d6 u if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% y' Y% b9 Q/ D3 g
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 e' s5 c A: C9 F* z5 o m
* [, u w: r/ P& ^5 q if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )3 j3 M O l% Y- Z0 u+ s% ?
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 v3 l, R( v4 V6 \/ a
) |9 g7 `( i$ T {" j# _: g- O# d
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ N5 `' ~( [% m }4 A+ I6 R+ s pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 _0 ?* G1 U o K0 E8 o. g
/ i; _/ a$ H# ^! f0 E* u1 o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 ]) I4 }; M: ~# A/ x. G+ D
% h/ |: y1 a* j- x- N" Y% u6 v) E3 ?
|
|