飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16678|回复: 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 ; F. s$ A0 Z. }( h# f1 r; E: ?/ G
I posted this because someone kinda posted a youtube thingy about it :O.
* V- q: J, R% h5 V7 r4 F- x
% q# x0 ^  d6 D. g3 N# r7 _: qFind this in DPSrv.cpp @ worldserver
1 i) g  e' Y) |6 A( n' E; k. z- k( _
Code:, |0 _7 w1 M, x9 n! H, u
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 S% L$ M% b  W  \2 R8 G$ H! u  V{0 z  O( X4 ]5 [# {0 f# I' A
        DWORD nId;
6 c6 F, n, U7 {) P: m5 f- o  q        int nPart;
. _* [7 ]$ h7 G6 B5 }! x5 _' G& [2 _1 r9 H5 p. M
        ar >> nId;
+ v7 S) y9 M  H7 y2 \        ar >> nPart;               
4 l* H$ B5 D& y; h       
! F6 C% @3 M$ ?; y        if( nPart >= MAX_HUMAN_PARTS )       
& i/ }0 D( }* x. f  N- j                return;
/ N0 k4 V0 v4 l  K: s8 f6 Z0 R& p& Q0 J* u
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it% @0 r8 j% R+ o# Z) q0 A. S
9 T* i. t8 W# j, Z) g
! X% C  i  G2 V2 s% _5 |
Code:* C% H; f$ ^* ?
#ifdef __QUGET_SWAP_FIX2 J, r9 i2 ^) r- h" Y; _2 d

7 v) e: x. X# U! G( D/ ]                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )/ `8 \* N9 M6 ~
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
, Q- b1 `4 R5 R) z0 c- L. S
  Q5 w7 c' V: k                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
* d- ~+ \& K- _1 J                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 O' ^; L. j" w. [" `* t
, `9 _: b4 z/ w5 f4 ~# L                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )  M. x. g; \7 B, @
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! ?- V: [- z1 z. v
. U( L: g3 H& q4 ^9 Q$ T' M#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ ~. L" E) |! Q( p$ Aand add under4 F) `5 R8 p* J4 w* ]- M

9 P& W$ t6 W% M- f/ ~8 gCode:7 S8 V2 V* D# U0 o2 g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 ^: w: x2 f5 ]& [
                        {
! X3 h) G  k- \- M" t% D9 `                                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 );7 l3 T( K0 l$ q( n) M# j; ?
                        }this3 W' T$ D: S2 K8 s  S
4 S+ Y1 ~, B) e" V6 X" w: J. K/ J/ J
Code:
! u5 _; T- y! s- k- ?" u#ifdef __QUGET_SWAP_FIX9 d8 p/ D! G9 o" A
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
, x# G& G; _. o, L                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());" y5 s) t/ Y, p, n6 v

8 K1 e" P3 W$ v/ ^9 O. r9 ^( U( u7 A: v                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )- _/ H' Y5 O& S
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ G9 {) w; k: \9 w4 k5 Q8 W
% W* R+ }' P3 U6 E2 m
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )/ i0 R8 D$ a5 G# J
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ q1 A) s0 A9 T  {4 I
' A2 O: h/ K( k8 F3 c# v: E" B#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& ]) v  c1 g. C9 x# n! T* S
- @, x3 F4 [* }0 j- J, ]% T. I: S: r- F

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-25 20:05 , Processed in 0.063230 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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