|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 6 Z3 S% C" v7 b. p! K0 u( j
I posted this because someone kinda posted a youtube thingy about it :O.5 S/ E) p9 s0 a, A! S2 ^% r/ ^
. Z* _7 s/ I) e# y2 f( EFind this in DPSrv.cpp @ worldserver
- B% ?6 c: I* z L5 F- g, m: W
, b: h& I0 U, f' n* j( l( rCode:3 {$ [, Q3 F; m
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: M# n, N8 v' |% q{ ]+ f4 J6 v% T
DWORD nId;
! N. J( {* F) V/ W5 h int nPart;3 c5 [1 Z( ]5 P6 o( _3 Y
* `) P$ f3 |. D7 L( e ar >> nId;* _$ V- [! _1 o C
ar >> nPart; 4 q3 V" K1 K; Z, k: i
: X" S' V- R0 s( _( o" z0 s, i if( nPart >= MAX_HUMAN_PARTS ) - m+ l! w/ Y: x; l: F6 V
return;
( w ]: o9 p# G6 w' j, ^" w
^: o7 c0 |0 Y% w3 L0 f# { CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; g; A3 G& t) S6 R% c4 U& P. G# v* k; K- @# o
( X! P1 U4 Z2 l- g- NCode:
7 {0 @- b9 l4 H% a3 H- o4 Y#ifdef __QUGET_SWAP_FIX2 ^& B% |$ B" \7 k, A+ t4 [
) W' h5 E. |# v% P. n. v% q! w- @ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). s6 w! E4 \7 z- Q `. }
pUser->SetHitPoint( pUser->GetMaxHitPoint());- U* l' x6 }. w& m+ _: O( a) H
+ p1 ?% k! A5 r if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* x9 T! W4 [/ Y% | pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 M5 O4 r' V+ D. Y3 v% X. T
8 F* }) i* K- K, c' I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 l2 }% v# R: j1 V pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% j# v- B- @% `) L; R& V/ [! c7 z2 K
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: `. q: H3 {/ r, L% G# w
and add under
* |% f7 p, c. o, W5 |6 I
1 `& I0 t' P8 W. fCode:
, U; I/ n+ M2 O5 s6 B4 Jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 s5 W" i/ s, v- H7 ^& }6 d5 x
{
$ A, U1 z5 F2 p; B- Q0 r6 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 );
; f$ d- x: F4 \' @+ `+ m0 D }this k# z' Q! H# }, V
T2 r+ u: X* j, N: ^$ ?
Code:9 H8 G0 F0 Y1 t9 D; s
#ifdef __QUGET_SWAP_FIX: o, l: @2 s: x% f- p, J* z& G4 P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 I2 j# U9 @- Q0 \1 I' D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
|" Q( W% I3 g8 P9 H8 [0 g6 b8 j
9 @* ?' E: W) m7 s8 J% I0 N+ v if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
6 _& I& u0 Q9 A1 J! q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) r- y0 j8 G' [# ~ Y ]7 P. `
4 P. D" g* Q! z! H if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- G$ r6 r3 i: ]6 M
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 F2 h4 C/ {3 P8 u, ]5 J
( n" |8 Z* `0 L3 \' l3 V; C4 j#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 v5 N, v( j& W- a+ d
6 z: D3 Y6 Z: U8 U( g
; D& T4 H$ p* B7 j0 {4 m% O0 p
|
|