飞飞世界论坛

标题: 修复交换错误 [打印本页]

作者: admin    时间: 2016-1-10 03:43
标题: 修复交换错误
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
  E9 O% o3 \( o9 k: t5 YI posted this because someone kinda posted a youtube thingy about it :O.; q( B3 \% X7 r' U( j' B5 H
2 o6 p5 r( ^3 [3 M' g
Find this in DPSrv.cpp @ worldserver# o6 w4 N" @# Y# c+ i) }/ r
8 ^# ?1 a  _7 L% O  J$ d
Code:
' }+ ^* I- p+ H- Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' K, n7 M/ x# ~" t
{
2 l8 f6 S  z, l6 v. j- [        DWORD nId;
$ F) I" y: `. n% w        int nPart;
- ?$ P! r3 y4 J" n
( V" ~9 V+ V; z% v        ar >> nId;
6 N; ^  r: F/ c6 _/ X2 K4 @0 k        ar >> nPart;                % v& x5 A* T1 |) V  s# C$ N! |
       
! L, K3 `0 a" l7 [% d; u5 _/ F        if( nPart >= MAX_HUMAN_PARTS )       
+ w9 g# h  R' _                return;
* H7 E: z; J& S+ ^! h6 y
& H4 I1 W1 |4 U        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; c! K6 P0 A5 b& k5 j( N
3 d, s: p7 N4 z
6 v% ^9 W  y/ l& J! e
Code:# I6 U9 S; n9 K1 ^8 u
#ifdef __QUGET_SWAP_FIX6 h& }, s+ a. n, T5 v& @! `

7 N( l% w% v; a' _0 i) W                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' q8 s* B+ y; G* J5 {0 A& ?# _2 [                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( L+ u5 W3 e" I$ j  q' h

8 o/ N/ |% I0 Z3 ~5 s( I/ T% ]                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
" ^) o* g- c- b3 b' z, _# `% f                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );* r- F7 }# h4 u7 b) }

3 s+ J  H2 U! f; t7 p                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
, q# b/ j# D5 D) g! j* n                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ g$ g: c% h3 n% ^! Z! H
- I: `( I' w# m( i( ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( d; E* N& I  D- q' ~: N
and add under
; h# ?6 Y2 Y! v0 w1 z/ V) _( U8 ?3 u, U9 b& E9 P7 s' D
Code:, C0 Z; D" b% S, l9 j( G( [& C
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 x+ p# d: O3 X3 h+ r7 g  L! c% T
                        {
( B9 ?  n, \9 ?# |                                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 );
" w( ~6 M# N2 T7 z2 Z- Y9 B                        }this
5 T( \& X* Q! J! J9 R2 ?4 c5 y; J0 t5 y5 N: X7 P: ?9 s
Code:
1 L# x! k$ q1 Z' R# w( F7 _1 X#ifdef __QUGET_SWAP_FIX. @; z5 ?* }( H* l/ x4 |
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )6 E# Y6 P* D, Y
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 T, T8 V+ g! i+ p
  @! n7 i5 o: ~, ]. `3 k, E  q0 {* ^                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )9 K; ^0 B7 r' q  P# \# g* {" t
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) q# J- O# B7 A2 r8 e
; X. c( ?& {: f+ A                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )! o( B& ~8 \: D) H6 v) J
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 ~" N5 q8 D5 h9 M$ N
( t, ~( N/ z# l, f# q3 z# {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 A3 W1 O/ X3 g; G( J
9 y8 W: K8 Y& Z6 ^' z( v

1 [! L) y% d" Q0 f4 h: E




欢迎光临 飞飞世界论坛 (http://www.ffwold.com/) Powered by Discuz! X3.2