飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16817|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1086

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1086
QQ
跳转到指定楼层
楼主
发表于 2016-1-10 03:43:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 1 j' B) A% ^+ e0 ?2 A
I posted this because someone kinda posted a youtube thingy about it :O.! f5 p; a2 e! y2 m2 Q, B: C
; A( ~8 [  j/ @" p4 A- a4 M
Find this in DPSrv.cpp @ worldserver. T8 _! c+ \6 G, P2 _! X* S
% l& ?8 O3 J1 w6 K, o( j- F
Code:
! q4 B! K: j+ w; ]" ^# L& Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& ^% o! y$ Y) w( n
{
+ t' m8 F: N- X- l+ C& f        DWORD nId;
5 y& Y5 J* P. C        int nPart;
5 z! }- S1 d, [. R% d0 W" u+ g. I, I
        ar >> nId;$ A* B  O: n* @  a0 t
        ar >> nPart;               
  P1 Y# p4 k( C9 P& q  @       
$ R) e/ `9 J% K# I' z+ {        if( nPart >= MAX_HUMAN_PARTS )        - F. ~+ b" T% U
                return;& G2 @. R$ x" w* I: N, L
3 f5 \3 j0 J+ \; k
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it1 u; I' h0 `2 R9 d, O/ e
3 [1 Z* R1 ~. O+ K  n* H  |, w1 S5 V
5 r! |1 L1 N/ B! y' C
Code:
7 a  s8 N1 m6 j. e& Y#ifdef __QUGET_SWAP_FIX, r* }% b6 S1 {

" S5 F4 }3 [" y+ \/ K4 N                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' F3 K8 C% K* R# l8 c2 v" w                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ [- U8 U0 O: @( r! J+ \4 y
. d; q7 n% c  R3 b) c                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
4 S$ i1 C& y- i                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: l, c8 J3 S5 n" O; h! j  I% `* O, M( [! @- I
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 n  D0 g' i" ?5 u1 x) h3 G  a
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 c8 U! ?( ^- T4 R9 o& l% Z
- a9 U2 @& \; V9 C6 n& j. P#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
1 F9 P' M, A: \* G" I5 c% ]and add under
6 H! D& E# |8 R6 e9 E- c( [1 Y$ f& I, n4 Q& j
Code:
" V9 }7 J% s1 S0 D, G; k3 ^1 Pif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). S$ c6 a9 B7 i! n
                        {
/ z2 w- O, Q3 H. ?) O                                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 );' f- N& w: {6 t& z
                        }this) V! P/ O! e: ~
0 q( j  q1 B9 _$ Z3 h
Code:2 o/ K  G& R- \& _; H, W
#ifdef __QUGET_SWAP_FIX
& N; g( i1 e- b                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )' @% _: _0 p2 q& M
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( d% J$ b- y. Y( T& ^+ F
( Y; E' C1 D! R2 B% _) M5 {
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
( [- ~! }) B0 H( q                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" |4 O, K  z0 _$ S3 J$ d: H1 p) h. ?
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
! w; P8 V4 V. u% A                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );0 R4 i# a# j6 V
* a5 }0 [3 z& C( {2 t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 o2 X3 t2 J# E' w1 P5 G$ U' g
2 X% ]& Y8 G- t
' k/ a( d% c0 O$ \) S

相关帖子

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|飞飞世界技术论坛  

GMT+8, 2026-1-2 13:20 , Processed in 0.066050 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表