飞飞世界论坛
标题:
修复交换错误
[打印本页]
作者:
admin
时间:
2016-1-10 03:43
标题:
修复交换错误
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 Y s: P$ i! |% Y
I posted this because someone kinda posted a youtube thingy about it :O.
& I' w1 Y, D! J6 ?
7 b' b1 U( s* d4 q. F0 A9 u
Find this in DPSrv.cpp @ worldserver
, K( W- X5 o5 G3 X0 o% s- d
" `- }) |0 c# u( p- E
Code:
0 h% b7 |* F- H9 D* P. l/ Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' y* B* T# x# C* M9 x) U
{
) k% {0 D3 f. l% |. |7 X
DWORD nId;
+ H2 ?% @3 {. j# K* ~" _& h
int nPart;
( w( N. Z5 h- t* G* w2 d- H
5 ?$ [' Q& v6 _, Z, x( [
ar >> nId;
( ?7 D3 S6 Q& ~: |8 @/ M
ar >> nPart;
z. j/ Q* |4 l. ?) @
9 [( b! b Q7 x. z" c
if( nPart >= MAX_HUMAN_PARTS )
0 k5 L$ ~6 C! S( a& ]
return;
7 y1 p4 y* u% U) q/ r
\) M6 ^1 y/ n8 v1 I
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( d: S! K9 {- c. b5 t1 J8 M
4 g A/ \* C5 Z; P
: M' q% u: v+ V" x ]
Code:
8 t9 a! g* O. \% G% A) c. y2 b6 n
#ifdef __QUGET_SWAP_FIX
" u+ M. K' K E1 V6 F
1 t) {( _5 ]5 b" s' s
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' ?5 f9 i4 }2 \
pUser->SetHitPoint( pUser->GetMaxHitPoint());
* }; O) E" S: ^3 j: Z
0 X( f4 e1 L4 B, @
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
6 C% F' r. I8 R! M4 H- ]! R
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* A1 { _) q9 w$ _9 V, ?% b% v' U
+ w# n) Y0 @& J3 `$ t3 H
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
% x9 |% n7 z' `" p& N: O5 T
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" |" p" \, o. Z9 A0 g# V
6 L5 R) A: Y* M1 I
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ _, _, {/ z$ N2 x2 z5 l8 g& ~
and add under
9 Y9 j0 t0 ^+ \: O1 U4 g+ L
: s: M0 A% w( w! y2 x
Code:
- Q) Q) ?9 W2 z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
0 A6 T! e8 G; m
{
, b; W6 Q3 X% m v! z. m: R; e# 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 );
9 o1 i1 q: y' a4 a9 z/ L |
}this
' E1 v) ?' l3 r8 b l& b
. U c% m3 G, N2 r
Code:
# V- C2 ~0 y7 S* r! |5 n
#ifdef __QUGET_SWAP_FIX
9 }( n" N) l. E9 \4 n: t* u
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
, G* d. O+ f6 t$ t" ~
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* S6 R2 F% a/ v: d! O
, d2 h3 u* c, M! W/ M* v' n% {
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
* i; T9 P5 w/ K7 x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; }9 P! w7 z1 Q) B7 Q/ J
% a; m/ Y6 M; D' J2 A4 h! o
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
( f- t7 _0 i; `$ E' ?5 y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 C' `7 y$ p, ~3 K0 [; y
4 C: W2 @, T$ o6 [0 e
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
! e2 d2 i& {" w/ K2 {4 @
) \; E. L6 w: U' w$ X) H& d
4 D: B. S U0 a" l( ?0 k
欢迎光临 飞飞世界论坛 (http://www.ffwold.com/)
Powered by Discuz! X3.2