|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 9 f5 A* V# F M2 j6 Z6 ~
I posted this because someone kinda posted a youtube thingy about it :O.- J, |* G8 t. k u8 F) s5 A
) g9 b" s& ?. MFind this in DPSrv.cpp @ worldserver. L) i* I3 t& Q7 T& ?! w* Q
6 R: p8 r4 P5 Z5 r3 E9 E0 dCode:
" {4 K& n4 \; W+ C: J/ }) Y! ovoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 Q s( W4 q# P" e7 Q( C( v
{
! X" [& }" | s DWORD nId;9 h7 i$ f: |" T& ~
int nPart;$ q; F. D \9 d1 [. ?' c/ C0 [
6 W3 [, ^. E D) F7 J* U' L9 W
ar >> nId;
; W7 T$ h7 a7 a6 H1 Z& Z ar >> nPart;
* D/ o1 T4 |# _ L
/ q+ l3 F2 k/ B) l- G if( nPart >= MAX_HUMAN_PARTS )
- h/ j, q4 b! y return;' \' o* R! s6 m3 F9 m
, |, E% x5 ~ x9 W, d o7 \$ a2 } CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 _- ]" G; @* ]" m$ q% k& g& U. B P8 Q2 O/ B8 K& c
6 s1 {3 J- E" u0 l. e0 j9 ^2 O
Code:
' l0 j, E5 Z/ V4 N; {#ifdef __QUGET_SWAP_FIX
- B: e2 o' \$ B- Y! ~( H
: w g7 w7 ~, N; c% N. R9 B$ ]! X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 |- [: n+ e4 m6 I& f
pUser->SetHitPoint( pUser->GetMaxHitPoint());
; V5 Z# h) x1 k) y! `: M: U C' k: y0 N0 s6 P! M
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* { F# i6 c+ | pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 `5 I7 R! l' X( N# C
$ `3 E6 T( I9 u- }9 J$ y6 S if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ a K; }* v4 p' _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ b# U6 L, J I" I
; {) D& t6 V$ k" u- n
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. Z: [1 ~: W2 ?4 ^& h( u/ }and add under
" I4 V$ E4 [7 ~! Z d3 w, n
- X; B2 H m" Z/ n# ^% @Code:" S- k) s7 Q% C$ ?) `# _# P6 c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), x9 ^7 N9 n3 }8 W
{
1 |- U% J) {. U- S, ^ 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 );
" s% } V" w7 }( U2 F( j( R: c% E& A }this1 k. U+ j+ h8 B8 o/ t+ ]. p
' f0 U/ e3 R u' T) _, L: JCode:/ n2 ]% D, c& ?2 X
#ifdef __QUGET_SWAP_FIX
' V# g3 Z+ H& m2 Z l5 ] if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 Y" T8 P" h5 c4 J# V, v/ w
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ Y% R7 J/ \! b& N) Q0 y1 V
% F' a/ t( Q5 F if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& X5 a* V! Z" g6 B8 m9 J pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& V a5 |7 }1 A' t9 k
7 ]9 W) ?9 P% {& T2 S7 m if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 }! R+ l7 D) Q2 E& K6 [- s1 \ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# d: ? T; E, }# W6 n
) Q* t! _) }/ u8 F+ t#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 q- [* |5 S/ [7 w/ Y& f! v2 [
, W$ {# M' `' ], ?) a9 a# b# ?8 o' r, N9 ~7 r: s
|
|