|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 ~# S0 P2 Q" W' J9 |2 m
I posted this because someone kinda posted a youtube thingy about it :O.
9 t9 r" d$ v6 {1 q$ P
) b& y) x: {2 Y6 sFind this in DPSrv.cpp @ worldserver4 u% G. K" S! p) {
% j6 z4 v9 S' H* }% g( vCode:
2 L+ ?# A/ |' ^7 L# @void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# t' p0 p7 Z# ~& z) Z+ E8 o* a{
1 _! A4 y* [# @/ v2 {3 i DWORD nId;: n. Z, ]5 U1 B5 H: Z. a6 P% L- K* M
int nPart;
& q0 x0 S' c1 h& g' A5 R9 H5 Z- d$ @- I2 U
ar >> nId;
2 ]1 h; E9 T( E( j+ F! U$ G ar >> nPart; 8 W' w% T0 s2 F7 ^
2 a2 z" M8 E5 H; v- k) \& } if( nPart >= MAX_HUMAN_PARTS )
# ~$ e9 P! h1 _3 j& K0 F return;
2 H/ \1 q) l9 d: i. _9 [! v) A: h3 I0 K+ z' u$ r+ e
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" f% B2 V) L. g0 m3 y) L2 f+ C6 \1 ]9 V
0 K4 n4 v/ y9 y$ \2 y: q) f9 G: {Code:
, [$ y/ R; W. C0 G$ P#ifdef __QUGET_SWAP_FIX/ t" t* }* k& f, s' x$ r7 r
5 l3 I# C0 @9 W ^% B
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 s7 F5 g5 _! g
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 I0 o9 E: h6 M6 e1 r
8 T; ^6 X$ k! R6 n6 _' C3 W- U" O if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 A: X$ T) I0 E# c1 a$ X1 j" m pUser->SetManaPoint( pUser->GetMaxManaPoint() );# d# M, R' Q; l5 A! E3 K
, s/ j+ S4 p. q% A& o if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 D U! @+ A3 r8 w, C
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 F. M8 q e% Q# Z. n" y( H8 E8 l0 |; `2 a* v% k A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( r5 O' E( e% y7 W7 Qand add under
; D4 l' t# G" _9 @& `' K2 U( p! M6 Y* C
Code:8 M# [1 ?1 }% S( E+ s; R# \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( E2 u5 Q7 v" u1 {
{
' X8 [7 _6 a: r! U 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 );
, }, O% p. [# v }this, ]0 d3 w i3 T O- e1 A
7 n, P1 c3 s, u/ M5 P8 F7 Q" L" l
Code:7 h7 m" |* d% k. k$ U' H9 g! J$ \
#ifdef __QUGET_SWAP_FIX/ v6 U) D! `( ` C- I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 T0 S8 G# V5 v6 w
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 j2 W) e/ W3 E6 m: Z" ~0 N K' n! j" r6 O
# L/ ]# j6 ^6 V A1 n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )% ?$ Y+ _0 y2 ~% V3 l6 i
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( ^1 c8 c5 Q! ^1 }, p- I' z7 X- N4 ^' E, }7 t, f; H* v6 r1 s
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
. Z) q% O$ J' }- q" [ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 n# p8 h0 m7 U' Q
7 z9 e4 U r! P9 `
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ o" i' Y/ m4 Q& b8 g7 e/ A' y5 {% T( s& M$ J" a) n2 q
. }! d3 m, X- r- Y4 U7 o
|
|