|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked X4 A6 C! n3 H' S/ Z) L
I posted this because someone kinda posted a youtube thingy about it :O.
- G, L# T% f0 S4 M$ u
6 K z: O: c) M. B6 P+ x* _8 oFind this in DPSrv.cpp @ worldserver; B+ K) u+ j) x
3 p2 x& U: q3 S0 i9 X& ^! @Code:8 B2 P( F% W7 v2 ~
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 ~. L" w! `3 @* F1 `0 B$ O
{: q [/ x4 g; F. o' n$ j5 u \
DWORD nId;6 r; T) }) x$ C l+ R# @( [ F* r
int nPart;
6 @# H/ V6 j2 @6 Y" r. h& m4 N3 \9 W. e- |' e2 Q5 M+ A% H
ar >> nId;
3 c* B9 \" ~7 f' X, W9 ] ar >> nPart; * \, e8 ^9 z0 j
, }( H' D5 I) Q0 A% P7 @. J
if( nPart >= MAX_HUMAN_PARTS ) ; _9 R( [3 `4 \$ B8 o5 T a
return;
3 R" }# ]* P6 h0 h8 k* K7 P
* ]+ `- U9 x& Z8 s) ~- _ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 ~3 `7 d% k. q( q# n+ r
; X1 \' H, W) U' e: H% X% S* p
. a, D- s- C+ J5 k0 ` z1 I/ u# {Code:
) G- h8 {1 o% Q' J1 v/ X/ |#ifdef __QUGET_SWAP_FIX @$ q. E+ R% V' ]. e) Z
2 |' c7 P! \# q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). \ Z/ C( u( `: V
pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 S( V. F4 p. g( o5 H
0 h+ o) j: m0 ^8 H6 W/ Q if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% q; G2 r/ v5 `9 z- m- |6 d; m
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
}: w0 ]: n3 m1 s/ N7 A6 o7 ^! \0 `! s L
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! ^" K9 m, L$ p/ ?
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- h7 y; i, \: M2 q; M* v( ^. _; a) A- c5 T7 k' `
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 b G& Q& ~, q8 j9 H' ]! cand add under( h& b Y! O3 I( C' E( ?" N
8 A9 J8 ?6 l8 {$ D& t
Code:0 ]- a9 M5 E4 { @
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 v9 y6 T7 J! b H9 \
{' M" h1 Z7 R ~: F$ ?
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 );' K8 ^2 A; v9 `1 \
}this7 r E; S) |! W |0 e6 Z
2 \; t4 b3 Z0 ?; S7 \+ o% k
Code:
: t& G% j# P$ s- [6 T#ifdef __QUGET_SWAP_FIX. ~4 |" N$ P' s. M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ s! B( ^0 f g, c
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
% o0 q( f! x8 D& Z J# g( e9 T8 R# }: s2 F
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, {; u4 A. @ I2 z, ? pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 J1 [- [: T5 [9 r' a
0 k% w1 F9 W/ d4 T
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), S, N2 a% i* {2 \2 H+ k: u7 ~
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! g0 i' j! E+ k; c1 b1 r
1 |" H. b/ G# r, Y8 x' Z1 @
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! a) I) K8 e* q. c4 l1 a# p# v
" E% r6 a4 X# U4 D
- w- H; h9 f/ {( k9 h5 H |
|