|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ( D" b2 a7 P% ^+ D
I posted this because someone kinda posted a youtube thingy about it :O.
0 s Y- K+ k, J: U* q" U) U- Y0 R# v+ h1 h m$ D
Find this in DPSrv.cpp @ worldserver
( w& z2 t+ F; k! b
" P1 j7 I; r1 g* gCode:! m# M ^ b* X& K* E
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 c7 K X. T8 _: w
{
, v7 q7 _9 ?; X! l X DWORD nId;3 C* Y5 a% k4 D# j1 f4 r' V
int nPart;& y( n6 I. q u' u5 p& v: I
5 J; P9 ~! x# X, K" |9 r3 Y
ar >> nId;7 b" F" @8 C7 [- j2 G
ar >> nPart;
( B. l* a% X6 F' e9 o
* @5 P* z# }9 X% E8 J if( nPart >= MAX_HUMAN_PARTS )
$ y3 X9 s3 ]2 @* G% m5 ? return;; q; m; X( @7 M0 e2 I3 r
( C" b2 Y4 s# F3 w CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. ^& L# E9 @3 O9 ?8 d$ j% x, P2 ]% z* t) z# R0 a$ ^
) |% x; |8 |0 |) d
Code:
) j4 C) B9 w( J" [; e. q5 T#ifdef __QUGET_SWAP_FIX
/ r) m, o' G) c8 q: ?: \; p0 q) S$ _2 K6 X2 i. R
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* L% t( n% t6 [& w4 o6 @6 K6 ?" T pUser->SetHitPoint( pUser->GetMaxHitPoint());. j3 h7 l' n9 s# x( x
3 ]+ _/ ^! L. x+ i9 c x
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )* S* t8 X5 v: t) x
pUser->SetManaPoint( pUser->GetMaxManaPoint() );& w* _( o2 Q5 D6 `( i! y
! V* O8 @7 s- y, C: R if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- y% P1 y0 V* K0 g: W/ W$ }: m pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );4 B" S" [) G( Z5 M- J# k( K5 b4 ^
' F: t7 m, c6 n1 C& q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 {, ], L4 e! B3 ?$ J3 a, a
and add under3 ]0 I! Y. F6 u; T( ` m$ U
& v" i( D0 G- ^% U( c8 W6 l& x' C
Code:
- L+ p" S0 q/ I( yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. Y) b1 M% v: R j* H, L) t6 h {% M; U# w- T/ |. h
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 );! k+ U e Y5 t5 C4 {$ M
}this
5 K. b n5 Y! H8 \) i x- Z" v; l7 t0 U! ?( l2 A
Code:
. r3 _: I L: s% g7 m#ifdef __QUGET_SWAP_FIX6 T: y. d% I1 j# r! R' K- y k" s
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 {1 e( p$ z% \' z& q! m6 w
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- A- U; y0 Q1 Y) M ?
* q, L8 _6 W2 y8 w- L
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
: O$ w% D4 ]0 f7 t pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 Y- V- a- Z: }0 ~5 j5 t
& {6 L7 M Y d if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 P) q% }4 H6 U. o; L4 g pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- J( G* B8 H) Z. z; T2 m
% ?1 n2 t6 E o. n$ v#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % @; Y: M% f# a
, I. R/ s7 {( z$ i$ j6 d
$ O" H9 W5 p- s! t* A
|
|