飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1092

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1092
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 5 a% N" m3 C/ ^+ r  c
I posted this because someone kinda posted a youtube thingy about it :O.
( s  z1 Z1 N  M+ Q2 i, T
5 O- ^1 W+ o- UFind this in DPSrv.cpp @ worldserver/ |$ p5 `1 x& |; Y: R/ p  x2 j

7 ]4 F) S0 O$ S0 l# _7 E+ \Code:. |- P, w$ x/ t8 Q  z
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, ?. p2 F& n; D& O{: J: p% i5 b- I- @
        DWORD nId;7 t: ~% D8 F& S1 [
        int nPart;% q) R  s5 T1 S
4 I$ R( ?! |3 h- |5 u
        ar >> nId;
0 q. T! {7 x; H  O5 i% {1 c; q        ar >> nPart;                1 _8 q  z6 u+ ?- P% M* }. Y
        6 P/ N0 n- m; I  }2 M* J
        if( nPart >= MAX_HUMAN_PARTS )        ( D3 a% |8 e. M
                return;# y6 {& V+ y; K% K' I% B2 }4 ]

( W- z% y8 N. u, G        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! H5 f6 ]$ a$ I. k
$ |9 a' h0 E+ i( w9 }( L0 J
/ n- L/ l) w3 x7 ?
Code:
1 s6 y1 f  I7 a$ h6 l1 C#ifdef __QUGET_SWAP_FIX% J$ x3 q% [! I, J' W: a" }
, Y% w* y% @7 l, D
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )' c% c! L4 y1 F0 C! O( g6 ^
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
% f# ^, V0 i# @3 Z* ?( u7 K5 Q
" n$ I% |; E& p3 ~                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )$ ^% Y4 [& _) u" Z) n: j9 [9 Q- J' q
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- G6 M  X3 @% n: {& R) u& a
/ c' Y4 b# g% u+ v                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
& W* o- x) `! n: [                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 r/ `# v( q+ H1 c6 V( r: u# W8 Z$ T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
0 l# @# p2 X2 t, Qand add under
  s5 s. u) C2 F) M9 t  y, H7 q/ ~# |( Q3 c" S
Code:
1 p3 d0 _# I2 R6 mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 A0 b8 ~8 }4 H! U$ ^1 s& B  R                        {
6 k8 C: J: F9 i+ }9 P                                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 );
3 U: r% t! y! q; H% E" G                        }this0 b% n. d& }. \" p! y
( [6 A! w# s, l% T  L
Code:8 V9 b# u& [7 v
#ifdef __QUGET_SWAP_FIX
/ q& Q$ z2 d: r# y3 ^, M! d0 h                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
$ b& }1 [8 y. {" ?0 k3 }                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 M' {( C' p: ?( n- L! P: J
- g5 `( R& O7 m
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )$ u/ r! H3 z. G
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ T* s' i1 A. J! W. Q: H8 [
! `1 p- h( i$ j9 O% S+ ?+ E
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
1 @; Z! Y! |: B: h                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 A" F) A4 d& q% K: |$ z. r0 W
; @* T, }: X$ a. ]  D* P#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ a( }! S6 |. k' U& A! |' J% `  {: ^

+ {. |4 I! `& L  r7 A0 a) b0 K/ c

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-29 07:16 , Processed in 0.062204 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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