|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * }5 a- L/ M) w8 \7 c1 a
I posted this because someone kinda posted a youtube thingy about it :O.! G1 V. C. @2 }1 n6 H
8 {8 B7 ?( U# e& _) g' VFind this in DPSrv.cpp @ worldserver
0 `9 r! x% S% J$ E6 h( x1 Q3 `/ t0 r$ F7 h, V. }# j z
Code:
; N! S. s) q7 t' W' X2 |. Fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 o) P3 o9 [, w4 r( F! |! x- d
{0 }7 C% Q9 [( Q0 E$ p& u
DWORD nId;! m/ k9 s( ?; b' F W; H
int nPart;
$ y6 B$ x1 z2 O4 u) \
9 w5 P9 W3 E$ w& z ar >> nId;
# U4 T. `. `# F% C) m. \/ N ar >> nPart; ' f" ~% C f ^! m: {3 l6 g
: }7 z- n2 E8 b# f
if( nPart >= MAX_HUMAN_PARTS )
O8 o* H0 y: E5 N3 _ return;5 \4 F0 v; G }5 a- \& d8 o
; W! Q( S7 h4 ^) A% x
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: b. I) j5 i* T( J
$ O- @0 [2 ]. w: A1 y" P8 b
% {* e. B/ i( p3 a: YCode:
, Q' |5 j! m$ D* W#ifdef __QUGET_SWAP_FIX
7 t- ~' q9 [8 |6 ~
7 e4 K/ l3 g- g& V if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ G5 ]# }+ c' P& _( t1 t
pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ w2 g" y# D- \* O8 B/ C- u) z; N8 i0 d, K! r3 i0 _& U9 M' p( @
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 Q5 S0 s/ {$ N# C pUser->SetManaPoint( pUser->GetMaxManaPoint() );& D+ N9 H; m, L% l
% s, p1 q% b- z: J% G1 U if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ A) S9 g- K0 ~
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" W( {9 H$ c: U1 [! V$ e7 s) ]4 \: S/ `3 W6 H4 w3 z( n$ J" J
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 H' k& R/ q! v: a- d& m9 p- P. Sand add under# L6 x. `- m" u, K" _: L* G5 h
$ U' \7 \ P7 f9 Q
Code:
6 M, w0 b+ x4 ?& q @if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* \! _* V. ~2 M, S3 p {0 k0 E# `2 W2 C9 B# X* _8 L* ~
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 );1 Q. Y* }- @+ x" c$ N
}this
9 Z( R' a7 i* j" J$ Q* Q- Q3 h( F7 N h& d5 w8 ]# e0 G: c
Code:6 ^) f4 U: f. C( r+ e
#ifdef __QUGET_SWAP_FIX- V9 T1 V# B! h# u/ }- |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 w$ G% v- h/ E W8 q) t
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 i m; y: w0 k: n, Y
& S" A0 A4 l1 O5 _0 X
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' A! }) |0 y3 y
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ t+ }' P. H5 Z4 O! H) X
2 J0 H( a3 B/ [) S, ^: M! L
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) {: N" Z& ^- d* |& e& t0 ^) d6 c& C$ n
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. r* `. E) K8 ^& X3 {
+ s1 V5 u+ @4 P#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 a9 \% q% u' y; r3 S4 c, G
2 ]/ p* w. V- o( k# C" V% q8 S# d; o/ T/ O" S3 L+ f
|
|