|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked - v/ K: d' O. ~1 T8 B. g1 O
I posted this because someone kinda posted a youtube thingy about it :O.+ Y& Q. b4 \5 d1 ~2 y
& V5 `! q% J- G: |' X5 I
Find this in DPSrv.cpp @ worldserver
4 c/ d# j. G4 G6 |0 s- K
; h$ ?$ s1 f# |1 K6 p! R8 A0 aCode:- k2 j; v5 p6 O% |6 X9 x
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- |& c1 z# ^2 Q
{
1 G0 C& x9 c* ^- R DWORD nId;
F; o" B, j) ] H c int nPart;8 K( w6 O6 J6 a; D* V4 p
7 z/ ]- I! L) I
ar >> nId;
% t! E0 ~. J# d7 I4 r3 q% w- N ar >> nPart;
, g1 X; K4 T* \0 h$ O
+ w' |0 Z! b( Q& P1 t- N' x a: k if( nPart >= MAX_HUMAN_PARTS )
0 D; ?1 C% X% L# U2 U* i a" p return;
0 B- ~ K" g' z& w9 O: C) y4 u9 I# X& K- ?* }
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" H% F% p) v" @) j6 b# }( o/ `. I4 M8 P6 d M6 e: O
8 S* l2 @( |/ p5 R; l
Code:
- h h, R: P/ X) j+ z8 V" V6 {#ifdef __QUGET_SWAP_FIX
7 S8 K) K$ h$ {( p# `& D: x2 J* h/ Y, o
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
3 \3 D8 h* F$ B6 t$ x pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ {9 D/ M" A+ z3 |2 H# a' t6 m4 l9 r
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
( x* v9 ~% K3 o/ ^- G, e9 D: U pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 |9 i! M% X' I: n8 A5 J8 Z+ l& a, X3 i' W, `
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 C6 g7 m6 n6 s# `2 y, T
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );' N; j, {/ i2 G; h
) f3 B6 Z7 ~# {: U, r#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* e! i1 Q# W$ R; {: o% Band add under* O" E# Z: [9 B2 [0 L5 D: @
7 S4 }3 n0 \. `
Code:* Y1 Y% x$ \$ W z9 F/ n
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 e0 Y' E* A4 N* `1 }) o
{# h8 S4 k9 M# E; h; A) k7 D0 C
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% ?& }2 `2 b! B, V
}this2 o9 S2 f7 o) y( F; A+ Y+ R! I
8 p0 M9 q( E. r$ E2 R1 r" NCode:( i( P$ W! R& l6 u, Y1 U2 o
#ifdef __QUGET_SWAP_FIX
% Y6 ` j* X/ W. V' e1 @5 t/ _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' @: Z+ Q* d& T9 @, B s pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 L/ x+ J G; [
. Q0 Z Y4 M& k. o1 g! s* Q4 N if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )4 S, S, ] M% r# _+ v0 m/ @7 z! a
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 e+ v1 ^, i2 d3 m
3 ?0 ]+ A+ d6 X2 Q6 i if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 T* a% V q1 C H5 H! |5 V; f
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
' y7 n7 S# K5 g( }% C' m$ f4 _
- \4 Z9 D# q1 e" W! A& `#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / S9 O$ t ?" M+ p% S0 R7 b
! V6 g* F: q6 \0 a
6 {) N) ?# d; @- @" f" [/ M |
|