飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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
9 l7 O/ }8 S" sI posted this because someone kinda posted a youtube thingy about it :O.9 O9 I; G, @) U; }! c3 Z8 [

% Y1 `. |6 J7 F# m. QFind this in DPSrv.cpp @ worldserver6 Q( d. ?- @" Z! A

( y$ T2 J, _/ W7 y7 q9 x' xCode:! l0 K2 m; e% m6 B& y9 Y! d( K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- Q2 L& Y; r0 t0 d: q: V3 ?3 o{
0 u6 n2 h7 J  C0 V- u        DWORD nId;' z' p* k5 b$ k. H1 _
        int nPart;
$ c* e& }+ ~9 {. ]# U3 h) w& e0 n" V9 t  s; n
        ar >> nId;' k, V7 \4 R) k) e- V8 q' S
        ar >> nPart;               
  w# y7 K2 D* L; y5 c4 `* D: Q       
/ d9 H! W5 t& V! f, _8 w8 r        if( nPart >= MAX_HUMAN_PARTS )        : O8 O6 S- |1 V5 h+ E; E
                return;  R6 ^( c0 L2 S' j' ?
& J8 H4 e% Y: r1 j
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. ?6 `- u) \8 P$ l7 Q- t
. p& P$ h. l2 g2 R1 ~) T- d+ J
Code:
9 f+ {+ I$ F. z1 n#ifdef __QUGET_SWAP_FIX
) D1 F8 g* k( Z0 z: ?( I" D4 H/ R5 I2 E; _7 l* r0 S7 j
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ): V# ~3 ~4 D8 }) b
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ u+ _  o* h: I1 W7 i! ?- X0 [8 i4 d
1 t+ z  o5 c# [+ n+ `# G5 A; U% a
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 ^  |* Q$ @9 y( M7 K, G                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 O: ^! `/ l. G3 s: I
, K; f2 j: P4 q
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ); S: e  ~7 f1 |
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ H' u$ }% ^% A1 F

/ C4 Z1 Q! g1 ^/ j8 M4 {#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. ?2 H. X$ d, z( K9 [5 ~7 {
and add under
6 k( i, L, \# M5 q' c! t
. R' w: V3 A) W1 c, K/ GCode:
/ B$ D# |; P6 E0 R$ c6 M# c. s. t& yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ i( U3 E+ }$ P& x
                        {
  v7 c% ]: D0 B3 \; j- c8 Q9 ^% L) `: K( a1 @                                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 );5 P/ Q. F1 ]: O% a) b. L
                        }this# `4 o1 h* P8 |9 @6 }8 v$ r

7 M  N& W5 W8 D+ E) w, GCode:
# _) k- m7 T) X" ?#ifdef __QUGET_SWAP_FIX
5 m# N  b/ ^* x3 y2 h                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
6 a) W! |+ |# F! y# X- s& P3 K; H+ C7 G                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& ]4 q' j& v/ }3 v. ^6 h8 i$ c' ~6 J. `( v
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )- Q) }* W- K- u- p4 o: p
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% }( O# _/ D' C7 I/ B5 L, D- Y
9 `7 _8 s. U8 Q; Y6 N                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )  Z0 }6 P, X9 c7 d& m" x# E
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ P; n- g, T0 A8 b/ J5 G' k

! H9 e0 ?) P! |/ i+ q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ d  A6 M, v5 r
9 V8 F, \" l6 n4 S
& y0 @5 H6 E3 o

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-25 07:01 , Processed in 0.115833 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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