|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( N; F* v: o2 p2 c
I posted this because someone kinda posted a youtube thingy about it :O.
) b8 c* ^2 L4 z: f" R' W1 U0 w' y* X! v2 a- Z q0 ?6 S b
Find this in DPSrv.cpp @ worldserver/ C. }9 u0 u! g- Q
9 p/ ~# r. @8 _$ D R
Code:9 E5 p, Q: M# M2 i9 b9 G2 c
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 U7 S# h( d. C1 m- d# {8 P, D{
6 u4 X3 w3 G/ ?, V/ P DWORD nId;2 Y4 H3 K/ d: D$ P7 w. J0 c/ L
int nPart;) o2 B+ D+ Z5 v4 U" k
% d8 k! Z5 V6 O) F8 q' _( K% O ar >> nId;
S4 z4 K" m( ?6 {0 m ar >> nPart; 2 Y) Z6 n( X) i1 r# f# ^0 y/ J1 I
+ N9 @6 m# l0 P; `" E9 t
if( nPart >= MAX_HUMAN_PARTS ) / |) [( J+ v1 X2 [
return;' t) O6 r+ b0 {
' ?* T% a2 i$ }" f/ D CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ o# ?4 |! E$ b; e8 ^2 Q
: p! e5 H2 _- d0 L0 n5 ^9 n+ L' @* `9 v7 `' s' h
Code:3 ~) F' A( @% m" T: J! ?
#ifdef __QUGET_SWAP_FIX, _9 A7 o( v' w7 O1 l0 F$ Y
' ~4 m- N# s5 l. G
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
( N3 d. Y* t" B+ I pUser->SetHitPoint( pUser->GetMaxHitPoint());6 j$ @' _" o- _. t% x
5 N* z2 Q. c' }, G- {8 n if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ); H# e K f# f& S
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! k- _; p! l7 _' _8 Q/ h# }# t1 W5 J$ E) L% l
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 T `6 n1 c0 Q3 x1 g
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! f$ f# D& ~* N5 T G& X- X
3 y/ i/ O3 ~5 g/ d; v" w" M5 t
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 w/ z) u: f0 D4 b+ aand add under
0 x Y* }" O; R# X3 R+ L8 l' T6 ~3 o; S1 {% P
Code:
- ~- H3 f0 \( ~9 bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 J/ P1 w3 r( \- N$ ^/ l% R! ~
{
; W8 w/ }+ G7 W/ R& L% J! r 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 );1 s, K3 n) D2 |2 S9 }
}this4 F9 x' S8 \% N
" }* E/ G* I% Y! A% L
Code:
2 B7 X9 t9 P/ ]. Q#ifdef __QUGET_SWAP_FIX `; q; v3 D& \. ~3 @9 `: \
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
# t$ U- T& y" }( z pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! [9 O$ m+ m# W! p% S/ f/ l! W
" R$ B& ?3 e v9 {9 m; J if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 O* f- y* i# |$ K pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" H# M7 F; W4 m9 _( s9 Y9 _ S* P- Y6 S
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )8 W- @. x( z2 z: B9 J" s! H
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& q$ b# \) q9 i6 N5 v; m
9 H9 Q6 O: a( Y; t V0 T6 U#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " n. H/ v1 F" J2 V/ N. N: _; A2 V5 {
8 h' L0 K T% K/ ^
: `6 O3 [/ d6 a
|
|