飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16265|回复: 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
% y( m( u4 X3 _* o! i* J2 m8 eI posted this because someone kinda posted a youtube thingy about it :O.0 n: N( j4 k3 a1 C9 H* F0 v4 C

7 f9 e" E: ^# Y2 g3 Z9 BFind this in DPSrv.cpp @ worldserver% b7 N, d2 I/ H2 p5 U' E/ Z8 V9 d

8 A$ }& U) E- sCode:! f: n# S6 C- q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ a' f+ P/ \* b% d. C5 g- J
{, W& M' a$ t0 A( x1 I+ L3 p8 X
        DWORD nId;
- Q/ {- j% H4 F" i! P9 |' @        int nPart;
, Q1 }9 B9 p4 N* |
4 R( L$ F8 t4 u2 X        ar >> nId;
4 h! |/ ^' y' z0 O- K( }4 A: {        ar >> nPart;               
8 O# ~. L+ J9 P- g4 `# i; J; w        : {3 y, W' t6 y, K+ q
        if( nPart >= MAX_HUMAN_PARTS )        2 T: Z! h( E  a8 r2 `4 z
                return;
7 a4 Z2 _7 [' A% {5 D* R" a: v1 }( Q
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& ^6 F. q; Y) W9 P; K0 b* C
7 A# q! P, J$ b9 y+ W. E' F0 s6 @+ M, H3 I8 V+ D
Code:: Z& a. |1 o2 J1 G; {, w
#ifdef __QUGET_SWAP_FIX; R0 E  s6 \* \

. x3 T; q6 Y7 `/ t7 ~% K7 H                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )9 U' _# ^" s' u0 v. z0 B. y
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 H3 c7 C9 o% r) z. f# o' v0 P" r* W( C2 R
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- e6 K+ F: H% l# h4 z
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 N- u9 y/ E& c( P. d7 m% i) N
4 M/ ~1 E, M" t0 ~" u6 _3 |
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )- }7 ~8 J0 K4 \' D& S
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ J, q( d* j( n2 ^3 X9 H* B9 L
: O7 T# y* e# h% s7 G: v% @#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; E7 |' A7 y- I2 xand add under: k( N3 [$ G" |( t& d

* n2 D8 Q( W4 h4 r# U" b& S3 ACode:
* Y* F# ^. w# Z' fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), V) Q, J( U6 I) W- l
                        {
" r. r4 i# V+ O* O- ?# |6 f' F                                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 );! X" m) N  h: U$ [, j6 Q
                        }this, M5 k% b3 s9 u0 A5 h8 D
2 Z7 B( V. x( ~. o7 b9 b
Code:
: M2 }2 Y6 _3 o% C- Q# r$ [#ifdef __QUGET_SWAP_FIX
- y2 U( U, Y# q: r0 L6 g7 T% n                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
5 p' P, F5 t2 ]& u                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ \# y0 w7 l* v( h" d
( z2 D: f1 H; Z- W                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
. R; H8 X4 c6 o- O" z" x                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- t" N+ X( q3 ~% S# U9 Y6 t+ |  a& Q) V' G* Y0 R. {3 L* j  G! q0 V6 r* G
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )) n& Y0 f' J, y/ N& l' K6 l) }* `
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* Z/ p  S! U6 D- ?+ \& C! r
+ N; X6 a+ T0 e, z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 b$ O' Z$ e3 j1 H3 I4 v/ B" P2 E4 W! D

- ~3 K6 S( A% {+ d6 p+ y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 15:00 , Processed in 0.064889 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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