|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' ^1 w u4 l5 Z& c: qI posted this because someone kinda posted a youtube thingy about it :O. E$ L I6 _, u5 x p
8 H' J- @ T/ o3 _( D
Find this in DPSrv.cpp @ worldserver
, e9 r- I% L" Z# w6 c2 q) {7 d. E: W9 V
Code:5 I7 _( i* L! Y" W
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): S2 m" l3 r' C9 d
{
|; L; L0 y Z5 H2 _" X } DWORD nId;
$ } j& \6 @: P int nPart;, @1 i5 V3 X9 n
) [7 d3 A X r' V ar >> nId;
/ n( l! y I, P, N* l% ] ar >> nPart; & B& x" W, }: ?
- z% a; A+ V, l2 E3 R1 P" G
if( nPart >= MAX_HUMAN_PARTS )
0 k4 v3 @0 ^& o1 f0 T% h- e+ a. g return;
# r! |# U0 F! I7 F/ l6 d8 K# C# W5 r1 `
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 i! f0 o, u j8 j& z
4 u4 c$ u6 i2 X$ ^; X; L) `- z( Q& d# B1 H
Code:. L& T, C% H+ E
#ifdef __QUGET_SWAP_FIX- U) W" s$ r n& V- ]! I" S
% \; f2 Y, T5 v( C0 g P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
( @) Y- z6 c& A" [ pUser->SetHitPoint( pUser->GetMaxHitPoint());
, T4 {1 K# e# b# r7 a. r t) x0 I5 i7 N$ o" r$ u
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 p8 B d T6 w% D' s& u" E/ E$ L pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 Q+ Z/ I& s- e, g. }7 I/ F& G5 M f' z
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 E F: M( N ?5 f- c% L% b pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. j; Q$ b' m, W8 [1 }& N i4 j6 l+ i. j- t2 T5 c! A7 P( q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 K; f+ v2 f! O8 `
and add under2 e! g4 p$ j v4 Z; V8 V% k
/ D- T3 o2 J1 V' Y' ]1 o& ], [
Code:
( V h' t7 {- F L. b. v. n. pif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 ~! l3 P3 w, t; i$ l- M- ^ Q
{
2 P. r# z' j- |9 N' M/ S7 U 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 );+ v; B5 N; B; }
}this
$ b7 V) E/ Y" D- K+ f, _6 U" a1 r/ k3 B' v# j
Code:2 l& I0 U* [; B
#ifdef __QUGET_SWAP_FIX' E# `8 r( L5 \. Q# h# [
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ r6 @! a7 U$ {0 {3 v! J5 {( Q; h
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' }# V3 ~: U0 Q9 j& O5 Q( @6 ~& m; |+ z5 F" M# c9 x+ y
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! G# t, [" J3 n% q8 a6 Q4 H. O pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 x9 M) n+ ]2 c
{/ m/ O/ X$ W+ U; U if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
( G! e* ^/ y/ Q' }0 J pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% F3 L; W8 i- z4 M
4 D5 u$ x U+ G" u* ]#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 Q8 \6 y8 j! o6 b+ z8 ^3 ]& o' K& K$ y
( t9 E, H) `# X* y9 t) N |
|