|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 b2 K7 P. O3 f( ]! h& {) t; V9 y# G4 CI posted this because someone kinda posted a youtube thingy about it :O.3 V" q, Z7 H- E, ^: Z
: a4 z' P: ^% Y$ E" u8 c
Find this in DPSrv.cpp @ worldserver# H* r- g1 m/ p) U- |
3 \7 x2 e }6 _6 h( f) a0 I) H4 k: ACode:
6 S' i8 X' i$ V4 Pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 [0 N" f: _5 n- {# V
{! C8 f, K" w3 R4 e) z1 D+ R% k
DWORD nId;
6 C8 W" ?# h" x) d; U int nPart;/ L2 [* T, S" |5 p" {7 l! z
$ R4 A% c& U0 ^. ^0 E
ar >> nId;) |' R$ p1 F8 E8 ]
ar >> nPart;
/ R, i$ I# e0 o* V
6 z4 a- ^9 p8 F- [5 M+ x$ k) H if( nPart >= MAX_HUMAN_PARTS )
. |! i p2 J) R& _' E: A return;- v, I9 r$ z6 {: R2 o' C3 a7 G
1 c5 b( D+ H4 R# ^( @: J
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 S* \7 b# K" f. f Y) u
# j9 r; t- t, W& A' |6 o6 X) X e0 n
9 v8 O% K( A8 j0 o6 e8 GCode:2 ?' w/ N9 @* g" M/ l
#ifdef __QUGET_SWAP_FIX
4 ]* M, Y/ C* E3 N% ?
1 Y5 P: x; r" j/ e9 G/ E+ [ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 ?% p- o* r# J6 ^
pUser->SetHitPoint( pUser->GetMaxHitPoint()); N3 T- l# [/ J, f
! h f; U7 J1 i1 C3 d if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ G# V$ a+ f( w pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 b+ h, h5 X4 F; x* {# N K, ?0 m' ?0 i: W# f, V5 |" L* ?
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )8 T- j& R" q2 \1 i0 Y3 [) y+ m- g' S& J
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 B7 H3 h/ b& p7 u9 r
. v' {, y! A. S' t% F3 w
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% [, |. e9 ?2 yand add under
4 R3 N3 e0 Z0 x/ d
" S. ~0 y! V, v% y" Y) ECode:
1 ?4 C! t/ m6 L: dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 F" D- t: O2 x7 g. w: H: U
{
$ X* A9 A# {# P, | \/ u/ i 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 );
7 Q# v# p: `; D' `. @+ }7 f }this, c. D, g$ z ~& @. r5 ~
6 x. _7 u2 g: U8 w/ Y
Code:
" c3 Y1 a ?7 y/ h/ g#ifdef __QUGET_SWAP_FIX# F/ A, Q7 u3 e
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' R* O! v* S4 K3 o4 s) [7 d pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
7 w. Z5 q* c$ L( u4 P+ U" u+ L+ A- ^2 X. x4 Y9 k
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' K- f( Z! [% o6 R# }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) P+ w& P; {" H" R* }0 k
: f" P" p2 Z' ~& n/ K; J8 K2 C6 ? if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )( v* D" y/ k) |/ V2 N1 k5 y0 R
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% ]' e) _% w5 U$ R! b ~: ]
3 p2 g z1 v: S
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% p2 K Z6 @$ `9 k
# C) o7 Z, w- i( R# ]6 X3 Z$ L2 |. Y) j; T7 y6 J- l
|
|