|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
3 y6 \5 G' b9 [/ G) p C o7 rI posted this because someone kinda posted a youtube thingy about it :O.
( m' q8 G6 \6 \$ e3 z' h4 H, m
- q# W, L7 ?& f2 w0 }' D! O E/ pFind this in DPSrv.cpp @ worldserver
% \" k% q% _& v9 U5 @- p1 ?
( b5 A1 S) N% D; N: _$ r$ cCode:# b" }; J7 Q/ R8 F1 W
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 n. D5 k; F1 c' N0 y9 Q# V6 M
{
( J8 g3 _" `9 \- ? DWORD nId;; N% T) J3 j: K
int nPart;3 Y# ]2 Y, x) M% S" `" ?3 j9 X
2 v/ ]& \; C* x4 v+ h5 Z ar >> nId;3 I+ ]) K% f8 I
ar >> nPart; ) N0 m6 p" X. c' }( G
8 m: P% Q: q8 T; [% X" C if( nPart >= MAX_HUMAN_PARTS ) * x" ]* p W* u; ?2 M9 I
return;) O! g- Z8 y9 |* E, j
. Q3 F1 ^0 P) f CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# N1 q! ]! v8 U; i8 b' _
) V- l0 W5 ?, F, Y i
5 `& z5 m4 W6 f1 Y; b1 G, dCode:
) Q- L; P( u5 ~6 [2 v$ ^) z#ifdef __QUGET_SWAP_FIX
; y( b/ i* O# E" b4 Q0 k l3 k; Y" Z% t$ W$ p9 M
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# s5 }0 p% x2 Y9 M
pUser->SetHitPoint( pUser->GetMaxHitPoint());
; r2 G* C$ z! I8 g' \8 ~, V y
; d' c H) L: j% J* W1 Z7 y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )+ y8 N5 I/ F2 P6 }9 t2 c- T
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- E5 {/ P2 F" q9 s6 v% Q
! ?2 y9 D `7 ^, p, m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
. O9 n9 o: h$ a% Z$ r0 w, @ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 w) n% T# _7 J5 E: g6 p
5 A3 E1 Q( {2 ^: u# W0 n" U* w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 P& e$ W1 H5 V4 Y+ p& hand add under
/ L$ ]. |( d- n8 w+ R L! X
; u* N+ F7 h4 t' N, xCode:
: @: I1 ]. Y) @ eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! E6 o' v: p) s9 h% j+ B* c {/ ^4 F; b9 {/ l
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 );
2 L% x4 R7 K1 N% z+ w( R }this+ k0 t' Z6 b3 K% v3 P
% ?! w1 |, U& t1 k6 t
Code:
7 Y7 Z; ]7 ], E9 z#ifdef __QUGET_SWAP_FIX
+ ^* a( o8 g* Q! t+ s0 f if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 M4 O& h9 d& s# m9 N) F. ^
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; y8 c5 L4 v. a8 A6 ^0 h+ t" j; ? Y- o9 J; [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- N. u+ K3 b7 H2 d! M& `5 V pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' s( y/ y; X! Z) I* V7 a, N+ {
2 `8 L+ b, @# ^+ V- { if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
$ x6 d7 G K% {0 h9 p pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* J2 _+ q/ ~9 m+ |' V, d5 F
+ J1 H; @6 f8 u I#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / h" h! a0 D! |5 u I6 H% G
6 u* A& @5 q! F7 n
" o* q/ Y: g& V, X* j& x
|
|