|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ' H3 E* e- m2 W, D& i4 B: m; V
I posted this because someone kinda posted a youtube thingy about it :O.
0 Q" M& ?1 m( t; c; u, [
: ?5 |( h9 F) I& aFind this in DPSrv.cpp @ worldserver
7 E$ m" I# k% a/ b. \+ q; i6 T; H4 v9 b' s0 t4 G
Code:+ I9 L/ K2 |$ B2 K$ b. v- L
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* P6 ?4 X+ M6 I# S5 }$ I+ J{
) z; k/ _6 Y7 o7 O6 E DWORD nId;
& _8 s. |2 | D/ X2 v: K X7 c int nPart;
' _" k, L$ g8 D( V0 l
2 h9 Z' H- h9 | ar >> nId;
% _! E* t5 d. A* F7 h ar >> nPart; : @9 D0 L2 o1 ?' P' u `* m3 c
# S/ J' a4 x+ i9 t% E
if( nPart >= MAX_HUMAN_PARTS )
6 @0 }2 X$ B& w2 E K) Z; h return;0 K/ Y6 a& Z+ w. |# z
4 t0 ~3 ]2 W( {. V
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% n+ }, z; T+ D# Z; ]/ a/ R; t, Z
/ T8 K3 [- c, Y6 e
( k5 ]* e% t2 G3 i2 u1 m- sCode:( h0 {3 H! w& X) z
#ifdef __QUGET_SWAP_FIX8 p2 q% ^: y- j' y) U
# C0 r8 d. V& C) x if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) F, e; f0 t- n
pUser->SetHitPoint( pUser->GetMaxHitPoint());- u/ ?' k# Y" L. d) R( E
# N6 O) z) t/ A0 O
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )* B6 K4 ^! D' ]- x4 A
pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ G+ ~# r' R1 f4 W" r# G/ h
! q9 K( a# _% _ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )8 ?( ], N- U. J" W, R0 x: i3 S
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 ]3 o6 h. }/ _" n3 g' V
6 g# b: m. p; J: n% ^+ u5 z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- {: ?* C2 }+ }- D2 R
and add under
, q8 c/ X0 p6 j @% L T! Z- H/ e C/ m- O
Code:
9 P+ S$ q8 G. ^% O4 b3 u: ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- X. u# W5 ~: d/ e4 b
{, ~1 @' T6 ^1 s- G4 U+ K# j
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 );, i/ v0 v5 y' |# ^+ v( U
}this
1 x7 W+ F* b5 [" ~ N0 E+ v% ~
4 A) }, h9 i6 j- q$ d' wCode:
: T2 I' V; |9 ^2 j0 Z: c#ifdef __QUGET_SWAP_FIX3 |4 M2 _4 O8 z9 E4 I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: m+ p5 v- l+ @, u pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 ]* C2 ]3 @1 y, b z5 q# C- N$ S3 I+ r* P" E
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), K8 v% R0 U' s/ o- x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) @7 A. C- B; L1 B: ]- i$ S* H7 x3 v# \' t, C: X
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 V% S, p' `3 O; e2 y+ S0 e- g
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* b, ~8 R0 A' u+ x8 t; h4 m# T
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 x8 J# D$ Y1 t5 Y7 {
6 U7 T' ]5 d6 ~* n ~ P b8 E8 ~$ F% K3 Z: c2 @2 c. j
|
|