|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
: x ]7 k ]7 T# }- yI posted this because someone kinda posted a youtube thingy about it :O.( A! \0 ]7 e. |8 j0 A
! G1 M; h" c( q3 L) b# I$ B, I
Find this in DPSrv.cpp @ worldserver
+ N0 j0 T9 [, x0 G1 j( j# T* Y8 M2 n I+ s# Z: K1 L6 a3 N1 M+ J* {1 I
Code:0 V5 J) O7 P% s- A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); [# a& H, E W
{
( K3 A" a1 @+ j3 r DWORD nId;
- `2 U( X1 o& ~9 N0 i6 x; S int nPart;
6 M7 g3 L+ [* V; |, d: ]7 q! Y, s4 U" v" L( R! u# @$ F1 M
ar >> nId;# m( M! {- A. _
ar >> nPart; ' }' c- T- K0 G1 ]5 v5 n
) S6 E: D: v- q
if( nPart >= MAX_HUMAN_PARTS )
: D, }+ _4 u8 h# ~ return;
: J" |, q$ r1 U9 y7 a. w5 E5 z5 u3 d4 Q& H# |$ g0 x: u8 n5 k
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! l3 S' R7 t% S) E* C: s
( O+ C, X- S. x, Y- ]4 U; t: j/ W0 \! i2 A: M0 c
Code:; ~6 c- S( ~! J; U: j2 a- i1 m) N8 ~1 g
#ifdef __QUGET_SWAP_FIX: |" t$ }# Q8 X
4 j& G5 {/ ?; p- z- ^# g2 W if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( O' i. Z4 f5 b# l* W4 g p0 f
pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 T& Y" D% s! H7 ?# N3 x( r6 l: H* _; h+ \2 ], k4 {2 q" w
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 L: J( Q; H4 e" C A4 A$ u w$ w
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ d# Z$ ^' ` n1 y" k, Y5 D3 e) P0 t& A% p
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 K M4 ], P* O, ^9 e
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% K" e: \3 N" ^" ]1 }6 w) ~
6 W) f* o1 e8 c% I' y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& o( i( b! G/ O: U
and add under
% O( a& {! k; r. I- R; |
( s- e1 f, C" SCode:
. m% H- [- j% F( s5 z* y% fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); O `) ?& u0 D! R
{) F) J+ _, S. w' c9 m
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 );* G/ _" D5 Z( k% P( q
}this
( v4 H# b, {) l( Q$ o2 J) K
" Y; [, g+ s2 `, F/ D# U$ A S$ a# `' GCode:* B) y$ e9 L8 u
#ifdef __QUGET_SWAP_FIX- |5 D, s% X( H; C
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
- V% J% j- K7 d# y8 h+ r pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* w$ I( t, J5 `; O/ b
L* h t# b/ K8 Y- }& k if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, k. {- c. g7 N! [ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ A3 Z3 r8 h# O5 H* K* ~
9 c1 d) r$ E/ B if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
' ?# s2 p5 i# Q0 b& E: L8 M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 i6 u# M4 Z( k: W
% B( s' `" A! R1 c% q0 ?#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
b, M4 F* u q. J- C, Y' U3 T$ ?! J
1 k5 X) R& C( E. C
|
|