|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
+ Y! E6 T# _0 O+ N6 B$ ^+ h0 BI posted this because someone kinda posted a youtube thingy about it :O.9 F# O. |% u! f5 S
& V6 \" v, i& t; ]
Find this in DPSrv.cpp @ worldserver J3 p6 K# f) F |+ n/ _0 s3 j
7 m& n2 S; U! K+ f N2 t. Y: A. ]Code:2 _7 Q7 @# o \ ^6 r! a
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' u: l* H' p9 \! ` h M
{7 D3 Q% u" J+ ~9 V
DWORD nId;
* U& n* Q0 S% u g1 E5 L int nPart;9 r, V7 p. [6 C3 ?* R; _
8 ]9 K- c3 W* c. \: `" {5 k ar >> nId;. K$ I9 _! M% S, z
ar >> nPart; ; H9 z2 d; w9 U
( ^9 Q& U0 B& c$ N- O% _7 z1 z- O
if( nPart >= MAX_HUMAN_PARTS )
4 O$ S/ E! k; N$ S; V" I return; [6 w& u: y; x# [$ f, f/ f
. X `" u* F t6 u9 u/ J
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 A9 U: P; [- A/ g( M) Z( @4 T6 a$ _
1 O1 y% B; B, m: G* Q: d( |* k% T% `
Code:
! [( k* q; M6 H* d, Q& j) q+ J9 {3 }#ifdef __QUGET_SWAP_FIX: B' W, z3 C! W2 c. z: |
% U6 c, N8 A9 B. C
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( c0 F7 h- j/ \, v0 w5 p' a
pUser->SetHitPoint( pUser->GetMaxHitPoint());" E& b; S: r& ~, G- L, G z% I3 e$ p
$ |& d+ {; i+ Q: Q) [6 C if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
9 |9 D; i. |& \" t7 P pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 u% v; j8 Q8 o* o" M" B) G
1 r4 E9 k6 o9 ^0 \ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )' w( D1 ]& k1 j) h1 C; ~
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" V$ Q' i' X; W% ~
* H) ^ [: p9 s/ d#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 N! l q0 K6 U( N" W! Y P2 Y
and add under' v( b7 ^8 ^9 q. ?
+ g9 [4 a5 h1 n# rCode:
% E7 B/ q3 U* \( |& C8 ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ): b, ^; ^& n# B H+ U
{3 Z$ `% j! g# X$ T" y- w- f1 I
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 );5 @! V! J* }) ~/ z( f
}this- l- A# X! ?7 E6 H
0 i. }! M2 Y2 I e& B
Code:7 H* \# E* y8 [3 B, t( k
#ifdef __QUGET_SWAP_FIX( z7 |6 t, H. z4 r8 D. Y' x
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 O& S5 @7 D5 j/ ]1 j3 G3 J pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
w+ d+ D* h) o
; U0 u0 F, I m# x3 q( e3 r3 h if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 l2 C, q) a# t8 c$ O
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% w& H5 b+ M( Z, a$ x' }5 j: U: ?
, a7 B) P- D9 F% V5 S9 O# y3 d
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# j4 ^+ g3 y% _1 N1 J pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& _8 {0 ]/ @7 [( f5 Z) p( I
. G+ X' M8 b3 L! p$ Y: q) T$ {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * z0 A1 U. X/ G% c1 H
! U* W. G, Q( x @0 N7 v- k! p1 T9 a2 D$ K. F
|
|