|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* J1 x- }$ J; k) Y/ ^I posted this because someone kinda posted a youtube thingy about it :O.- T7 h$ Q2 x3 S8 [& M6 Z6 }9 t7 B& n
& c/ i( D9 |2 s& K7 x
Find this in DPSrv.cpp @ worldserver
/ B9 z0 ~$ f3 |
( D0 {$ _- H1 e( D0 ACode:
7 x0 _ l. z$ V; b$ ~, Cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )" q, ~0 t# D" G+ `
{: _- v0 @5 b, e
DWORD nId;
: V" Z2 K/ x$ ?( ^, q! l int nPart;- z& t5 N9 u, q, E m
1 q9 R; _4 l# O# v0 S0 H4 Q$ } ar >> nId;
. C4 e1 v$ ~+ H0 k7 m+ u ar >> nPart;
" ]; X. w) d- Z: n8 B
. {' E6 E8 e t if( nPart >= MAX_HUMAN_PARTS ) ( D" [; P+ {) m$ ?* O) g
return;
& \! k$ P! J* ~7 S& e0 L' T1 k K' t1 U( i0 a( N
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, H2 X& w8 t% P- A& Q1 Z
# y I. p& B8 `6 U5 l1 G5 Y7 N
: v# K$ \% a3 c% B. xCode:1 M7 B2 b0 z7 ?: o
#ifdef __QUGET_SWAP_FIX% R% t R4 K+ h. g
% s" d5 t0 N6 k6 A9 r- M( _% i+ R
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, j7 z' F% M* `& C- e3 s pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 h0 X/ M" ^: a" e4 O
6 ]9 u$ v& F2 a4 |" y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' ^$ }7 n4 c( N pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 \6 U, k o$ r9 `1 f7 f# G% @+ {) U1 f% d# r6 R k, \: f
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 r. j( u! r2 h; _* Q+ P* |" X9 v pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* _7 p1 H- _6 ?: `7 q
4 q) F; r- f# B#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; p% ]4 C6 d# U
and add under* A, A0 H1 z6 [1 @: ]
8 g& r" D: S( N/ i
Code:
5 a8 \. `: M3 M9 ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& `. }9 u7 m- g: Z. ~* d. e' h
{
# I5 l1 J4 p! p$ m/ M 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 );9 A4 x# F8 C; e- H2 Q6 ]3 T4 _0 s
}this- a: R4 L7 V$ I8 k) I: W
2 f: \5 {( n0 |# z% Y" W- p6 wCode:
; W8 Q* Q {% W2 x: m#ifdef __QUGET_SWAP_FIX* m/ f E" J6 F
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 o! S, U- {% E% p I2 n) {' z1 E pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 f: {( U- M9 p
0 U$ M$ i5 I- h3 [, [0 C1 J: d if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 B' s+ F0 u) E! _! {/ {# v$ X9 R pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( j/ Q( s o- k+ W( X4 ~
( B G$ ^/ P* a+ M) T
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* v! X( u; T- k% r8 m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- k4 ]% o9 n$ L# B
3 D' r7 z4 P) r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; k# z! I7 Q5 q3 v; ]% G
1 C: h# O/ M S2 P) a
1 u# Z. K9 F( u" D/ N# W0 k) W |
|