|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 0 t" f) a4 B( J( u: K8 v
I posted this because someone kinda posted a youtube thingy about it :O.
7 B5 l8 F' ? c
1 N: |- F% L& _; b( P' Y' {Find this in DPSrv.cpp @ worldserver
; N) u# K7 J- y$ g- n- t9 p
0 {# P% U0 l- R" WCode:) @" h" L. |- }, @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ r% D6 R: {5 a, z1 g$ n5 R6 M2 K
{& F$ b# z* o' p. N
DWORD nId;
9 j/ k+ Z: B. _ int nPart;
) z5 l; r, t, A3 q
! t' v7 r$ h& p7 V$ `4 f8 d F6 W ar >> nId;% }1 k$ v0 [ U7 w* G1 I: w$ {
ar >> nPart;
5 q8 z* V' t& V( [3 I* ] 9 M$ F4 y* ]* b) l, I
if( nPart >= MAX_HUMAN_PARTS )
4 w% A% ~0 @ M! j5 V% i- \ return;
7 x/ `5 A) j0 y
% Z1 N8 {" x/ ^7 Y0 X CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 o: x3 E; A, L) B$ }- [1 n r z" S3 C' r5 |
6 B4 B; x% y" \# ]7 U. r7 i% }4 R% h9 p
Code:& A# K. |) ]# n ^0 _
#ifdef __QUGET_SWAP_FIX% K( y% w0 l4 e* N6 N
6 d+ B" v9 N2 g1 {% B if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). P, x" K" i( {0 \, O; p% T3 V
pUser->SetHitPoint( pUser->GetMaxHitPoint());% M! E J* {" Q. q+ r( p" j9 J
* e4 Y2 M% M2 M) u" u if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 i1 ]* k0 Y3 D' ]3 q' {5 A5 \
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ n$ P0 L+ s$ B* U
: Y% B7 b8 L0 p4 N if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
* r8 r. e; O( ~" U pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' u" A, [0 l$ q: J+ G2 {& f2 a# k+ U
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( T$ }) C9 \& t$ g3 [* k( land add under2 Y# b$ t! i2 }" I; X% ^' N
0 a n, q/ M0 e: |# _Code:8 C3 }4 d$ w5 i0 ^) i9 Q% j
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# V, ]2 S# w8 U0 g. q
{& b# L, p3 m5 v! d8 g8 u* s$ p
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 g& A- I) h0 I5 H/ X0 @) [ }this" t+ p3 p5 ^. O" e) F D8 o
* O6 |$ @7 c8 v& v: k# `
Code:
3 `9 U" B7 J# v& r#ifdef __QUGET_SWAP_FIX. Y o6 h7 U9 s/ H$ e7 R/ p* i
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( e; n1 t4 Q7 S" x- k: V$ m
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 p6 F% h( M9 l4 x* A
. i, }* |+ i( R: r% f1 j# p& Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; Z3 }7 p3 j( o7 _) ?* B# t pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 h; A4 J. {3 J: t. _( @9 G3 m, M
l! K# w. K$ S+ J: \2 b( V if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 h8 i! `7 H2 G) E u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 N' k' n5 n7 F# \$ ~3 O$ f9 y! I! V
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : u, T- B5 C# O6 g( c- Y* _
9 ?7 u) S" k7 c1 e ]( Q$ v) E
u& U8 G( B8 j( F( O; T& d, v
|
|