|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , w# @6 f! @4 |! R+ z) m0 @
I posted this because someone kinda posted a youtube thingy about it :O.7 w: ^% p0 ^- p" |/ Z% ^" A1 k
% h/ N3 w$ _' A) O9 @. hFind this in DPSrv.cpp @ worldserver
* f) O9 j7 M7 T# O7 G+ \* s Y& U: }1 S1 Y5 j" v* F* g% }! ^
Code:" i6 `, }1 g' \* R |) ^8 |0 u) J
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! d' }$ h6 ^) u- u1 M% t
{" g& z5 B5 |3 |) @7 k
DWORD nId;: n- g/ }7 ^, q9 N: M" ]
int nPart;- h1 p& S) {- n) n. Q3 e
) a) ^3 @% b' w" _ ar >> nId;6 S2 e. D! k: ~+ p" T5 |( F
ar >> nPart; 3 M8 M, l, g. ]8 x
: }, l+ X4 c0 ]7 V: R8 h
if( nPart >= MAX_HUMAN_PARTS )
! E) ?! s! R! P4 f7 A# x return;' w% y p5 C, E. d7 o
. d' ?9 K3 e0 U( n8 @3 N; Z
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 _6 J1 r+ o! ?: A3 v1 d9 [5 ]! u: m: g5 a2 `1 V: G
! [$ @" y* p$ [/ I+ ~2 a: |Code:. r+ D2 W8 d6 v* P
#ifdef __QUGET_SWAP_FIX
+ I6 X1 J! k+ |5 t0 O. v; L, z4 }# e4 U
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) y# s# E; K: z* Y: N) `2 V. s8 V
pUser->SetHitPoint( pUser->GetMaxHitPoint());- b( K' N) ~: t8 X' V" \' j; ], E
2 y7 u3 _2 r& V3 D4 U: F" u if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# p+ c7 k5 A& B! M' W pUser->SetManaPoint( pUser->GetMaxManaPoint() );( o0 a: K. f6 ~ Q* V
! ]- r r( d- h& F6 n! r if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
d4 B9 g1 ?# H pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# q8 _1 Y% W' c3 Y; f; H
- A; W7 ]% f( k! B& L( e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: J) d ^' Y. q
and add under9 r% b q y& {
: z3 Q% o! J% T) E% D$ x5 RCode:* _- H4 c8 s9 s/ u
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& O' U- q% l( s5 D$ \+ S
{' S, y3 f9 M- `! L" V1 |0 Z
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 );
M4 `- v: D$ M6 X6 X) Q+ J- [ }this5 R3 S! a r5 K: _( N( I
" ^9 S0 x" N! j6 F0 cCode:9 t: l9 A/ _; z* g- E4 F
#ifdef __QUGET_SWAP_FIX( T+ E7 V2 T% t3 X) g# M. d f
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! Q: g2 U7 R! ?; \% x: {1 V( @
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- Q& I, B3 s% d" ~; Q
1 d; q8 J$ ?4 l" c3 q' I# Z
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 U6 A, D9 h1 z" g8 F3 W
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: a& i4 M" @9 h1 |
" T& ^0 F8 h' z: h3 e3 L
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% f& T/ q5 c) X4 d8 X- O2 B+ s
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& ?' A; U" a% A/ Q# e; J* e
C& h3 a+ {8 V#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver , H9 r. b4 D3 {) x# L) |5 J4 t6 C. D
8 R, \8 k4 L8 [$ ~) Y7 e- D+ L& v& L% ^' r
|
|