|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , J; @ L' E$ R# e
I posted this because someone kinda posted a youtube thingy about it :O.$ E0 ]' W( `) x2 g' @
! N- t6 c7 P9 d$ S' A, \/ e% h
Find this in DPSrv.cpp @ worldserver, r A' S5 x+ x8 Q& a2 c
$ d- M- e3 t. }7 d GCode:
. \, `" X# O7 o7 I$ evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 I6 J' H: ~0 Z8 o C( @" b P6 T/ T{
8 S& b6 e5 ~4 a8 |' f& K DWORD nId;, n* X9 r' P) s* M
int nPart;+ s0 b: R: f. c- a: w1 w2 f
& g7 g; t* c- ]! C% Z. G ar >> nId;
2 I! W# z/ K; N4 {. ?# N ar >> nPart;
& i2 ?8 T: x3 w
! b$ b$ k' U) |: t6 K" K9 P if( nPart >= MAX_HUMAN_PARTS )
! l8 j% H) J! H+ S$ [% { return;
# R1 w6 N0 U9 v; K+ z1 w+ {/ t( m' Y2 S
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
/ }2 S6 L: W' K! \. e* T5 Y: h. b' i$ i* \
/ j# G! V2 o9 p
Code:% N7 a6 b& W9 P. X- A( p4 ~
#ifdef __QUGET_SWAP_FIX: x1 A: e6 ?" K5 G$ d* [
( ~% |9 x. j* {9 P if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 c7 J4 ~$ i1 H: H! `* t1 x5 z; ?$ ~8 s pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 z3 H$ T' R3 @8 W5 [. W0 p
8 t _' H4 M& l0 ^3 V if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% I6 @8 q7 f. D! B pUser->SetManaPoint( pUser->GetMaxManaPoint() );( U$ W7 u3 `+ S4 d% Q
* W- n5 ~% H. G7 U9 E if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 i* C: R: e9 `/ M+ W pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 @3 h( C- A" ]% W& N
1 {4 X' Q: w! o( _, Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 ?6 m' i6 |- C- L" \" ^and add under9 B3 R& o$ B/ ?
& ^ R! B) D3 O XCode:* c6 l L/ B( E3 G5 v" Q3 P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) Y( W; B$ q# e. V D$ j
{
{* B( K# o/ g( r4 z# d 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 );
; t2 `2 ?3 L% b5 V9 s$ T( t }this6 f v9 y; i3 j& y- X# k$ b9 Q7 E
$ m) v; n# c: x/ qCode:! n: b& J* t+ c; r% J8 w
#ifdef __QUGET_SWAP_FIX
- j" I* @. q+ ^% O if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
/ d1 b1 r9 X* |; N pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 i' ?- x; u" ]) p" s7 H. ^ v6 y9 b2 b6 e
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& X6 R: j* o- c+ J/ P3 F pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 Z2 [+ Z$ U- c
, _, T& Y) ]# t/ O) T: K& X if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 K% x- S6 Y# _1 D S
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 I1 R2 l- g! ~. o5 c# _" h5 S! S1 m; y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 R$ k; o0 z, b7 h$ s
J, M1 x$ ~3 n( i' J
D: [. L$ Q" Y9 W- b6 \% i4 B |
|