|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% m4 b U b: W% GI posted this because someone kinda posted a youtube thingy about it :O.* X B) g$ e" u
1 e' l, y- M. l& ^ N% k- W0 \1 RFind this in DPSrv.cpp @ worldserver" G# X, K; o6 q' V4 Z" M" y
* a4 }: V6 D. s; Q+ {
Code:
* m/ G/ k# k2 r* R8 }void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- [# |; z- U5 h K5 {: D- I5 p{
4 o+ I' m3 D: u: `) J DWORD nId;, w8 c# Y3 V$ N* x: w
int nPart;0 ]& t0 U$ k! w
/ x8 A; V( } t3 `* \. ^- @/ c1 h0 j ar >> nId;4 t7 M1 z8 p( L/ u
ar >> nPart; ' f1 ?$ d9 w8 U2 Y X
7 T6 J( \- Q8 n
if( nPart >= MAX_HUMAN_PARTS ) ( X7 ?' R$ _2 K9 [; M
return;
, O5 v+ f& d9 }# L9 I) B1 l. n: `* {+ T* L
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ S) {9 h. z8 z& e% r
* c; ~0 M, s9 W7 j7 V0 g% o @% U, o$ k- w
Code:
v' X9 r% l+ b, l) j1 i#ifdef __QUGET_SWAP_FIX' q" Y/ z: @, S- }' a* M" V# z; P
: `& u" w: E- ?* g if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )9 y0 s, h5 v7 O) m$ G& q
pUser->SetHitPoint( pUser->GetMaxHitPoint());
' j2 b5 U i$ @2 {4 L! m
# |+ l$ C5 S; k w6 b9 \8 a if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- Y6 @3 _5 t& k$ ] k, c2 A+ p
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ f2 [" o; ~+ B; Q/ ]
7 {+ @4 R E0 ]: {9 ] Y- c if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( {* d3 Q o t. C" q1 b W( R r pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! w/ N* c" d5 k) Q2 s. S6 d3 `, {0 M9 \; c7 Z# b5 r- r
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! V2 z8 v: w& e- {' Zand add under
+ [6 H- Y% h2 A, m8 o) R6 I& ?
& O& r, [" B# A5 ICode:
% @ `; e( F/ q* l3 T; u4 zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )" v+ k2 {) ^! z7 u& h
{
7 ^" } K ~8 w8 w9 g3 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 );
. _+ x( N' K7 r9 {! z2 | }this$ D, L# I, N8 \# L7 D# _
: j" V4 [ z) n# O# L: i0 ~3 HCode:
- @: s; F* g8 I' E( p#ifdef __QUGET_SWAP_FIX
2 r- a0 }; q n+ }; [! c if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" g6 T, k9 u5 g4 d5 x' n8 R% n pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- Q8 l$ B% }! k5 k
1 G* E8 X C0 ]2 U5 L if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), u6 ]+ V- d" ?# b6 J
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() ); [) O3 X$ i; N# z
5 O! O6 ^0 W `0 z8 k if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )' y! l, _" y& D
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# L+ q# n r* g$ K5 g0 P
& }- b8 h: k9 A$ j! D6 i+ o0 M$ o! x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 l( N( k! Y( N; V6 R7 M
' T5 u; _3 ?$ ?' [
8 P s: ]+ E, ~( a; W- w& s: G |
|