|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
( W B: C. k" L/ JI posted this because someone kinda posted a youtube thingy about it :O.5 E% n2 g+ c1 ]! u
! b: g" N4 t5 o) U( r2 k7 ]1 kFind this in DPSrv.cpp @ worldserver
" w4 j) ^8 U% l9 t1 h, ~0 u' J7 c) J9 W6 C0 N2 }, r
Code:
l; e2 u6 T- t C- x3 I* p/ }( gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! p6 Z% `+ b1 Z: e. P# O) T) b{/ ?/ ]) r+ z" f2 D$ y3 O. X4 n
DWORD nId;( t& G9 s" T" |9 N: P' ~ n
int nPart;
1 ?6 f- y" c0 X0 a9 [2 Y4 r$ v- D0 P
ar >> nId;
1 h, Z& S% `9 M2 A8 z* T+ F2 o ar >> nPart;
" x8 Y; ?4 v2 C- J) T
2 _- }9 A8 P A if( nPart >= MAX_HUMAN_PARTS )
: C- L9 r2 G+ | return;3 P3 T8 @& [" c( D% f3 [
9 g$ X _: T, a1 j
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) Q2 S, p( h L+ e( q2 m
; J+ |6 M: N' n. V9 Q7 U' z! D* N: X1 b8 \3 a! x! p6 c3 c# \/ R
Code:
' A. F" ^) y" Q: n1 x#ifdef __QUGET_SWAP_FIX
* b# Q/ m+ s5 ^; ~0 f* L
$ z9 B9 n) u2 C$ P% F2 K$ ~+ J if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
0 a$ x4 _' r+ x7 A: W8 S$ _! L pUser->SetHitPoint( pUser->GetMaxHitPoint());/ s C Q( n3 }6 A9 o0 T% P
- x U2 F' @5 @. {% I$ _9 h0 x5 W) | if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 n- i) h% _- F' B v/ l, F
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* n, S1 F# ~+ ^ H2 Y2 l% C# y& S5 O' Y+ e, s3 h) a2 B& J- ]
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) B6 D$ ^! a: [" h- T2 B8 \ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# G% G5 j+ `% p5 @9 I
/ }* W* x: e# a, y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; l3 M$ x/ E6 E. ?3 {; A: t" S
and add under
" A8 B* G" V& `$ A4 `1 u
( O$ a& {- q; @4 [/ L2 X3 YCode:
% |! `4 Q# f3 Z' j: a5 vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )3 R3 X8 `* `# f
{
) F5 _ L% x$ d# Y4 h 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 );
8 h2 @' G/ t/ W9 s# i, b. R6 y }this
; k/ Y- I' P1 Z" R
0 U+ _# N( m! p( n* dCode:
& ?+ x. ^- ^: D+ d& {- J+ }' B#ifdef __QUGET_SWAP_FIX1 R# h: ]" V; C8 P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
& Y) V' j9 x E4 n4 r; M ^5 ?" O* h pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 K. I) F7 \- O/ T. h( P
) W7 @( P, L0 s( j9 V
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
0 n5 q/ w" L3 H4 Y! i) a pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 @ X3 ^4 F$ _
9 I( v5 Q5 v# o if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 S, J& M* _+ {& e* z o
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ O1 `# H7 s7 x2 B
, @- k: x. f% M) E* e, e& H Q' d% X+ U#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * p, m- n K+ D" e" u# ]% v9 u
$ P9 [" b5 U$ T6 b" {0 l
& Y4 a1 s, f9 s8 v
|
|