|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 E! J# e; o$ U# v$ q H5 BI posted this because someone kinda posted a youtube thingy about it :O.
; B# D3 {, J$ W+ E! i/ z; m6 N; w4 n! w7 Z) j
Find this in DPSrv.cpp @ worldserver
( O, v' _ X8 q" Y0 [- U/ Z& ?) P2 l
Code:
5 e5 {# D5 F, A# Wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# W7 r; {0 s. F# x' Q: o& _
{% v. @0 [9 y1 b0 _/ C0 i
DWORD nId;& `2 i0 L, e9 O/ E
int nPart;
: Y1 P, u) E; S/ M/ |; r8 C
9 K0 W6 A( v! w ~( K2 Z ar >> nId;
7 \$ J- W2 M1 {! J4 ? ar >> nPart; 2 E* B4 ~- _& b
) g1 X. N ~1 e. }7 B if( nPart >= MAX_HUMAN_PARTS ) 7 u# w+ j9 C1 I& @% K, g
return;
1 D+ I- ~! h& d. k) w4 O3 B* q4 E1 k4 l' G. S+ C; A+ d, L/ _% `
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* R" _% M# r; {, `, B
: y3 z* `1 a7 q( A1 X5 i5 d1 l& d: B
Code:
/ J @, d, M0 g* w2 h9 ^' V#ifdef __QUGET_SWAP_FIX
2 f( F0 W; P0 f& A- A/ L4 ?; ~+ d5 c8 q; t& @. s" ~; }" O8 q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
% H4 B* a% [: X- \0 N pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ F" V3 ^9 p" K: @2 }3 w
1 [0 {! e+ F! o/ [! k9 c if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): p9 B: `. d% i: \$ F- {' D$ A& v
pUser->SetManaPoint( pUser->GetMaxManaPoint() ); y% Y2 r5 e# q8 i8 ^+ ^
2 u+ J% U! y$ R if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- N4 u! F& [4 ?! H$ h9 L pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% L$ g) K6 F0 `! G' B3 l- c6 w% W
" H; x' |0 p$ D# g
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 `: c6 T, J+ a7 Y1 Kand add under* R7 |+ J( r. ?+ U4 B3 t" t1 z
! `! G- ]6 \. o( |$ U' _
Code:4 T, l# i( g; t- Q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 n* a( _, Y+ Z/ m9 U1 n# B
{
_1 y: e" A9 r# H, Q( L& [ 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 );* k' ^ w% k" v" b) U
}this# \- z6 Y" R; d* ]+ ^# X- e3 L. X4 Q
' d$ l# ^: }' h) a3 Z" J) u5 S& {Code:$ `9 u; U0 [4 c# N9 \
#ifdef __QUGET_SWAP_FIX. N, S, U7 P4 ^1 q; W( g5 u) |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
u; q( V. C; B. ? pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' W" p$ D9 J3 Z/ S0 Z1 G F+ L
! u! }4 A, ]- n if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ ]' K) E& g% n$ C1 W+ s/ A. @
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 A/ l- x4 ?+ v& \, N: g: @
' t" e& c7 R3 i+ ~
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ X4 W+ l! r1 s) O7 V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! ^, \8 B9 J- P. t' u6 g9 P
4 m. ~' l! C: S+ x#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 q$ a- W) [- T2 ~9 r3 t- m
9 A3 M: a3 Q1 T3 }) k2 N1 w% }
|
|