|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 1 i. \0 ^# a7 I8 O: P% h! k
I posted this because someone kinda posted a youtube thingy about it :O.. t. B$ H& c2 @9 r8 \
, O& v4 O/ \7 _# ]& y" NFind this in DPSrv.cpp @ worldserver6 P6 P3 v1 S) L5 w
) I6 ]& O2 J: c/ E# ^7 P
Code:
$ S/ A4 O& b o" N0 D+ y8 @void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 {' I9 F1 ~7 V. g$ L$ n{% ?# X! I) j) _0 Z/ \& a* Y9 P2 D
DWORD nId;. P; b2 T0 d# [! i
int nPart;0 W+ q; |* O- ~2 y, J n
. d: ?1 N1 p1 T1 d+ N ar >> nId;+ r' |6 p, y( G- l3 D" M+ l
ar >> nPart;
$ E0 ~& A4 B+ {. r
2 E3 L) [. O: C( G7 t* Z! f8 U if( nPart >= MAX_HUMAN_PARTS )
9 A, V2 L: n6 Y return;
: o4 V2 s( S- s/ z- C( O$ \+ X7 i$ k+ N0 F: \) P8 B# E% Z; z
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. {9 J* ~6 B1 n4 v5 ?; r
1 p: M4 y/ V: I7 E3 E! Z* j% _6 l1 D- C
Code:3 P! G( h5 A* g( Y+ y1 U6 F
#ifdef __QUGET_SWAP_FIX
5 g3 Q0 Y5 v. h8 ]' R
. ]) g: h/ E/ I; r9 B if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' u* B+ M6 U% p4 I3 J pUser->SetHitPoint( pUser->GetMaxHitPoint());
' I! E" D9 T' [0 c" w9 H9 h: O3 e- b* \) n
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 m* t1 N# h! L
pUser->SetManaPoint( pUser->GetMaxManaPoint() );- D" Q) n F+ c+ g, l" }' S
6 l$ o4 X- w$ P6 j* g) m
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- A& A% H; E; ?0 [" q# L/ n
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );4 h! n9 ~) |' u6 z% C: X1 V- E
9 S3 W7 z6 Y# q, |#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# D8 C+ W+ _% k5 |& p5 F9 w9 |
and add under3 t4 p: n- C+ u8 o+ j# @3 @
1 l6 Y2 n6 S8 ~, o# rCode:, v) C, p: {5 s. M& L& A
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% X1 Q# \: V3 T- A# H# p' h9 f
{
7 g/ @. p; c* }1 ~ 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 );3 ]& ]. y7 O$ H' ~+ _
}this3 m1 @/ w) D" V; D" d4 o# B( d. X
7 I: }- z1 K2 A! i6 p8 u; ^7 ]8 T
Code:/ J7 l; X3 V3 y6 Z' b
#ifdef __QUGET_SWAP_FIX& z% O5 |/ p3 Z' E+ q3 \2 F
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
! P1 ^3 T# B8 F7 c9 w4 y: u pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());2 h' ~, {4 O1 c: N4 P8 V
# N U' \/ Y( o8 E! m if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )$ f4 Q1 j' P: K# I- Z: j; Q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. D7 ~% v% d; \1 x, x7 a, P
; q2 K, e) |! R( c0 X) j# m if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! B0 _9 D( i9 O, K3 x+ ~" o pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 u- @! [8 V5 {
& K2 d8 s2 O* c) ~" T9 D ]#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 e# k+ H* C4 o) j! a) {
) R$ ~: R# n" A9 g# x. D( ?, M: [, `% y
|
|