飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16301|回复: 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   Q2 X; ?0 x% e: M
I posted this because someone kinda posted a youtube thingy about it :O.2 f  s3 W8 F& l1 k/ q8 H0 y
% D; S) L( I) g; E
Find this in DPSrv.cpp @ worldserver
$ ^/ A" ~& S1 p  J# r. t, ~7 N: o+ R7 ^3 n
Code:9 W& J0 ]! Q$ }! z' `: Y( r
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); m1 ?" ~' L8 Q$ j+ _+ E7 l
{' u2 a$ i0 x# O( [
        DWORD nId;) s. ~% ?% l, s% n  _" J2 k
        int nPart;
% B- C8 ]' E( o! X* ^
* [: y) e% }( X% E) ^- k        ar >> nId;
+ |% ?: u6 A" I' d: c. m: S2 K: [+ `        ar >> nPart;                , Y% ?; V  Q6 X3 m& y6 {
       
0 D' \, N* ?6 ^! y; b) u/ b        if( nPart >= MAX_HUMAN_PARTS )        " a4 W& ^, o1 ]8 H9 J8 F# W# U
                return;
, W4 P) L5 I* c
6 E( M  [4 U. w) m6 {        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' ~$ k; a* v; _$ i: Z0 r
2 H3 V% y' k% {: |8 A
) F; b+ b8 z" t( _$ lCode:1 B: \$ |# `2 V* M! e3 r9 V
#ifdef __QUGET_SWAP_FIX
) k* N! \2 ~: y7 Z
" W6 z; l* C. B+ f' V/ w/ g4 ?" B% S                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ S( r: i  m# V9 K$ ^) Z
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());& i7 K; j  I/ Y1 G" u
3 _2 ^+ D+ l0 h
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )2 x) J- x5 B: b5 R8 F, K
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
; W9 S# j+ y9 ~0 ^1 D: F7 W+ {, J: |! T- N& p; e0 i: T' i
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ); }7 O) |! u) Q- D! K& h" V
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 K# I9 Y1 i4 u, v8 F% ~# c* ~5 U' R
1 q7 X9 \5 }* H5 r2 @" l% N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 `! b0 L' `# d- x; q+ uand add under- m8 y7 d  A* x" _& {

: M/ d/ P0 M$ G/ A2 p) @& BCode:1 f# U8 A; `5 k$ v( Y2 ?0 e( w! A3 N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 e0 E/ K, m+ L% l+ J" M# ]                        {) R5 x% S! a6 v
                                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 );4 P) y( j+ |) D0 g: |% y7 V9 `
                        }this
+ t+ q, J7 B' x; H' r: W  [/ m& T
+ I8 @; f3 V; J, `8 t) {2 T( KCode:
2 ?" w* r& h+ z  W  z; B#ifdef __QUGET_SWAP_FIX1 G0 X( L* k  e1 s9 d5 }4 U: M/ e
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )3 i% y' ]; X& V0 i0 y, b5 {- C/ C) `
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' q) q3 A0 N* ?$ c

2 K! u7 j3 ?8 n( B5 N& D$ x! T                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )& p! ~# v* U; L4 m; _% |
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( e+ R% D0 q% u$ X
7 \* i2 R) e8 W* J                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ). T) c$ {/ t! c- q" U' E, I- h2 a
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 e+ t6 e& F$ @  l+ D; _1 a+ I
4 Q  A4 K9 @$ N9 c2 H, U+ g& b#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & [/ d9 I9 L+ r2 ]# z& X

" `$ G8 F6 Z& k; X* I
: U) T2 h) q1 J

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-3 21:14 , Processed in 0.064944 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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