|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
8 G- A5 N* o) e! G- j1 lI posted this because someone kinda posted a youtube thingy about it :O.
8 c( v0 U$ Z. Q5 z3 j
& W- i+ K: R: Q1 |9 `Find this in DPSrv.cpp @ worldserver' f0 `# A( @( k9 f9 X) @
. V2 f! s# R, u
Code:: {$ v1 r% v* F- q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' G+ ~0 c3 Y7 I. L: o9 Q! w
{
$ S9 ~. S( K" y DWORD nId;
9 \, f) O6 v& A4 @6 K int nPart;8 b& j' c/ m | C k. C$ f% K" H
9 E1 _# u% m: z' z
ar >> nId;
. j! L0 J. @; I; { ar >> nPart;
& O: ]: S$ n; P$ b+ A( K
3 f, ^. O7 R4 I9 b5 L if( nPart >= MAX_HUMAN_PARTS ) . H7 R% q' g7 p0 p; {* ]
return;* _) T; Y* e* q1 y
+ N. E4 ~! H: O1 h CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 b# t% Y1 ?. T# e7 n' L2 ~8 ` |! \7 w8 ^% J# t* j- {
3 S! R5 b6 \" O
Code:% d2 i* x6 B; U8 O8 |0 a
#ifdef __QUGET_SWAP_FIX, O. J+ K- k$ P0 s7 G' F! \ c% Q
0 I: T) @2 T2 ~ O if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 A! `6 L A! J6 m+ F) Z
pUser->SetHitPoint( pUser->GetMaxHitPoint());
m! M5 s1 f9 ?4 x* ?5 @7 @' h' f! P( k$ {
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! k& s% a/ _- r- o1 V% q pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, B0 U* y6 N7 `0 J
& e+ I8 x& ~2 j& O/ w, @" n if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): A2 Q0 Y" \" _+ N4 N t3 G y
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ {* I& B! T. `9 J) u% J6 X) c1 {: j( ]
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& p5 }* [' b3 b# @) f8 @: F
and add under
- h5 L7 X) b3 e* ^% e- x/ \) H
& \2 w! g. q/ u9 |0 U1 tCode:9 T9 w, E9 _. S: e! g6 K2 ^! s
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) |) V, S- p; f2 r2 ~3 m' t
{
/ ^) e, K0 P$ b; P+ y" Y% x2 W 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 );$ V$ x* W1 N+ Y7 ~* _
}this6 n& z3 { b+ F; R% @! x& |/ r
* L) d' g2 \3 W2 I/ w' [
Code:
) Y5 N/ y7 J; R& s7 T0 ]6 @#ifdef __QUGET_SWAP_FIX
7 O8 O7 B" i9 ?: Q/ S M if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 K# O! i0 U) D7 I t0 x' l pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); ?1 o* |" p9 O) i4 N
* w2 k; Y) m" t* i if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; m% ]6 D2 |6 N* H! d pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
. ~' E5 W$ Y$ y# a' f0 g P, M: ^* m2 F( l! y; t1 A
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 J6 g# ]1 @2 ~$ _+ T7 U/ V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( x: e6 @" Z Z
( T4 W4 m' x/ D+ t% g% I
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 w. w" t% c- Y. ^/ K
a( R6 j1 b; l8 ^' ?0 l5 }2 d u7 \8 j) e3 d. v
|
|