|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / o' X/ S) p$ n% m n' Z
I posted this because someone kinda posted a youtube thingy about it :O.
4 k; N' Y. I& G: z7 h e# t2 I$ Y% E5 d9 X( j5 \ k1 P; h# C" X
Find this in DPSrv.cpp @ worldserver5 S: a& [1 c6 `
. t( n' k" c# R' V! c5 O, J
Code:* L% n% q+ ~: C1 Z
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& ^! F/ o( e2 T2 U4 @. e) W- o
{
, \' d# E$ ?8 e9 N0 T DWORD nId;9 {/ U* A0 i6 o0 w* Q
int nPart;
. B- v8 U3 t4 ]1 M2 E
% H# L$ l% d3 [, | ar >> nId;
. z8 l- }, x8 C9 X# s ar >> nPart;
, C- b% K. D( m4 S7 d9 N / |7 @9 ?9 E$ O. }
if( nPart >= MAX_HUMAN_PARTS )
9 z) \% R2 w. o return;
1 S; w6 H- p$ u. s: w7 h* |+ F) Y- I1 A1 E; @; c0 r& t6 ~
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 B2 L- g* g6 g y8 C
; j8 l) P0 x( g- X1 ?: o$ n( s) S$ w
Code:
5 S- R) V- c8 y# z0 V# }) E#ifdef __QUGET_SWAP_FIX
3 i2 P& N+ L( q A' p% W/ w7 J- p4 s8 U: v+ e, }/ ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
9 {7 `- ]9 ]* ?) T* \- }* h0 n pUser->SetHitPoint( pUser->GetMaxHitPoint());
" ^/ I! @1 x- ~: E8 e7 G% w5 \' a4 {1 m! e' ]- P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 V9 |4 l- d- M9 m5 D/ v
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 k! ?+ a3 ]* A7 u" C! S5 T
9 M7 E8 s8 }$ l _8 c9 _ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
_3 |( B6 i1 h9 K/ J8 n& ~1 K pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# Z- b9 s$ H3 Z: [8 H
& }# E; Y6 o6 F8 Y# x$ _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- { ?" G$ M- W/ h! n- Jand add under) W- ^: @) M3 X9 j/ G
: Q4 M% k& \# UCode:$ e5 Q9 Y! U1 i9 E* n+ x" q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
2 U. W1 V$ v% v2 V% S {
9 j& X3 Q- I/ M 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 );
4 i% N5 W% w! b) [7 x2 r# a }this( c3 [- a. u5 c' c9 n
9 M8 y% {5 [% l1 U5 N3 G, ^' ?7 b
Code:" ?5 @* Q' s+ {* ]- ?' [
#ifdef __QUGET_SWAP_FIX1 p, I. W9 q$ d$ J$ L* D/ Q2 {; \
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )- T7 }! o* s+ W
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());2 u4 f' ~# ^- l3 y) I. A
7 {" W A- K2 N% K, h
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )% _; P: n! |! k. g( \
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 d/ h& N9 o$ ?5 [4 M4 ]2 Q! l0 Y( e1 T" g2 S( ?
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 q, G+ d! l- a8 ]
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. Z' A' P+ Y" S. x% E
% `( l4 Z9 `1 ^ |9 G* |+ w#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # ^ y% M/ \* n$ F5 a; q6 C
* _0 U( I/ N: f) n: U
% l* C6 ^8 Y1 x! ?+ }" n. W. U/ T |
|