标题: 修复交换错误 [打印本页] 作者: 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 , z% k+ G& ^; H! Q% ]6 tI posted this because someone kinda posted a youtube thingy about it :O.& r' g! n7 Y( h' o# }
( a+ D5 [$ } q
Find this in DPSrv.cpp @ worldserver, P) o/ X1 x5 L, |9 k1 u
& v( R$ x; i& U% HCode:2 U# Y3 V; w8 G7 Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) ( ~9 O& G% P. Y1 x" ?{# H0 x1 j$ `/ a! P* {. ]
DWORD nId;( j" k4 A8 O# x( c
int nPart; 1 E, M J+ v+ J 1 {0 b& f/ L0 [9 K3 D" U3 h) l ar >> nId; 0 ~6 U+ m& y% t( S% j ar >> nPart; , U# X+ g( S* {% J4 }( g$ L5 ~# m / f* e; W9 k8 {% S if( nPart >= MAX_HUMAN_PARTS ) $ _6 g8 T: Z8 h, Z; k0 e
return;( n% Z- t8 |. {/ V
- K2 y7 d6 E; L2 \1 |3 J4 K
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; i/ n/ w& Q1 l6 Q- `
o3 Y$ n8 ` y3 ~$ y0 D
+ Q9 N! ~# z1 @5 {( PCode:* x6 V' g7 k ~
#ifdef __QUGET_SWAP_FIX4 e/ p; h' Q: w- P2 g& v
9 j/ D! a! U' J
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) $ m1 F) s _+ N" j pUser->SetHitPoint( pUser->GetMaxHitPoint()); 5 [+ v& m& v' A' G! o# E) [# T& \( e# u
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ); {. f7 X9 c2 y* N% i
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ s5 ]% h3 f# r" |3 d: z8 R
9 o% O9 g/ w! I* I+ f7 M# o0 H
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) . ?: Z1 w; i U pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); : F0 \% o. r% D. c0 X3 m 2 M5 S! \! K2 B1 ]#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, ]( A0 p! E: l+ N) Y; D- n
and add under0 i- x8 D- l6 S H5 v' M b