|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * g. y) ]. r" J, u2 e, A6 ]
I posted this because someone kinda posted a youtube thingy about it :O.
$ g6 ^* D' l9 v: h$ j1 U3 i; Z: s! D; a1 b
Find this in DPSrv.cpp @ worldserver; s0 S7 W" I6 J0 d
8 _/ o* A: e6 R5 Q' S" P
Code:# g- S3 r# v* b$ [/ j" H5 Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' \6 u$ a+ N1 k$ G! Z9 {{5 \' y- H, [5 r3 g; Z
DWORD nId;9 G0 }4 |) C* i" m/ U' P9 }7 {
int nPart;) F# @- Y4 Z+ n' a# b
% a' X" ?: I' n& i# I$ v4 D
ar >> nId;* E; _9 ~& P! u6 R! ~
ar >> nPart;
8 K4 }! t1 \% h. T3 n! s+ r1 P* f F& Y# I) o; u2 ]+ l! } E
if( nPart >= MAX_HUMAN_PARTS )
& ~' d( g( L. I: K* E+ x) e return;
1 t9 D7 m/ a7 n4 Z* C: d
% j4 M- H" m7 N# h- c CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 t4 C/ @; X& J# E8 V# j: I
1 C! I* @5 \6 I
5 Q: \( e! }, A! J, X! A- F1 R3 |Code:
* n J% d3 S3 s#ifdef __QUGET_SWAP_FIX
: {) @& q5 ` l6 P5 a6 q) S+ C9 c& ~9 A" d$ ]& t7 a9 c! e* ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
4 Z* X! c2 |* a$ e pUser->SetHitPoint( pUser->GetMaxHitPoint());! `) ~1 p% h9 w' R
* ]% Y) ]% Z$ ?6 x) P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). E% w7 r7 `: }" D
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* [% v! f. I4 N3 L# v! t4 r; a; ~* [# g# j3 d( s/ w
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! e+ a# d, J' C% }
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' |1 N4 t# J* K) F- Z4 p8 k. j/ @9 Z6 n: a3 v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% k# A6 c$ l5 A9 G7 Yand add under: s8 q, v1 B$ T# V
$ V# ^ s( |/ U" q" m0 H5 V
Code:
( B9 u2 |/ l% Z8 F3 nif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 J8 L: d9 f2 C; D: w {; `" g F2 F* a0 s: 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 );4 ]4 t+ `& N. x' V4 q3 T! j
}this
+ G. J# ]0 q; S) v- G1 z! s* R' S, R+ k6 W% O$ y
Code:
p4 d# j3 F9 y: c O3 j: v! G8 ?#ifdef __QUGET_SWAP_FIX
; J3 Y, B, @, P/ f+ S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 q/ ?( Z% ]: D' {
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 }6 l$ m& w1 V# K+ T& j$ Y8 \4 _2 ]6 D6 `9 q7 F
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' @8 N3 d+ E2 v& Z- E
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( z+ y: _, P! N
/ ^ S3 a0 Y9 b+ [; b ~ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 X: X$ \) {* @ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. h; L$ a d# n! R8 X, X, N
* l0 Y: s. i y" f
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. y6 m) I0 Y) N' a: C2 H9 E2 u' r& i% I* z- X
. A$ o. I' s8 C6 K+ C. S
|
|