|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
) n8 v. _9 F5 S% Z& A8 SI posted this because someone kinda posted a youtube thingy about it :O.
; \; ?! ^- ~6 _2 A
t8 U6 q& H% W! H: |5 ~3 ?Find this in DPSrv.cpp @ worldserver- n7 h; x3 a7 M0 F3 j
* o2 K/ `- i: l) g
Code: m* _. O9 ]7 l4 @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, s- K0 G3 Q5 A. K{
g" `" X3 G3 S S4 O# ]4 c) E8 ^7 S DWORD nId;
" @! K; S4 Q; z1 M, C int nPart;
3 n) ]3 B$ \3 x
& e. F6 R% \8 Y( l ar >> nId;
; x( [9 ^" y9 r* t: h ar >> nPart; ) x- y N- u; x$ {# u" [0 w% E. i
3 ~( k/ I8 _# S3 [ if( nPart >= MAX_HUMAN_PARTS ) 9 o C6 x @' T* Y* f" g
return;
( v- V5 ]& t( U! @( ?9 ?
: @2 T0 x7 p% X1 |( x; y! i1 u8 Z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 F# _7 q, c- x
* O, d; \; a- ] l) G3 L: O8 R/ r7 Y- ?' _" \
Code:
3 F$ D9 P G4 x6 x; Z/ P) `/ c#ifdef __QUGET_SWAP_FIX
& f3 ?$ D$ Z+ i8 |) f# Y, C' [2 X
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )" M: A: @- P7 i
pUser->SetHitPoint( pUser->GetMaxHitPoint());1 Y; U2 P& n3 r. H, T
1 r! |% P' @4 ~( l1 C if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
H( R9 F2 U- E3 a) y/ x pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 f1 W+ G- _5 V. v/ G5 a
( s W1 D0 `& `. U2 `
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
W; @! z% V* [- w. }* |' Q: \ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 J7 p/ X3 `% `- |; g& W8 d, o& l" h3 z; c1 W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% ]( E; X$ G; T/ x) U( p+ z8 hand add under
: p" h& q5 f2 N; I9 x$ }* D* a1 X) E3 \# {
Code:
+ z. z3 F0 x: B, v: ~ zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 I* l5 O( ]2 ~/ l" @. z6 R/ E( K {
& z, A* q4 A% _9 c% o 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 );
$ m% C5 ~# U+ ]1 \3 D8 y# ^ }this
: m+ W- ~1 U& o4 Y# u/ z
3 h4 j1 E9 c; e# O7 ~Code:
" y* n$ ?! i+ n4 l# }/ F1 [#ifdef __QUGET_SWAP_FIX
% C+ x S/ H+ \4 o1 }) E if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 @3 p1 ]/ d! i, q t# M& g; S
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* W, X+ c6 L8 X1 \! E: Y4 }5 y! U2 K- l4 N3 ?8 `9 |* h
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# ~. v$ Y2 O$ n) }. i0 z5 I9 z* e
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! z' j9 K+ w/ G' G0 i
+ g! g( V: W5 R5 {% Y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- @" w1 m# o; g: Z
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- q$ b, n, ]* W) X1 \
4 z# i( @9 n1 T0 n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * L( ^2 f6 @; q- m
. J7 }! o. e" q% J1 n/ U+ i5 @
/ i3 S1 r8 |; z* k" d
|
|