飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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 $ H' J5 X( ^0 p
I posted this because someone kinda posted a youtube thingy about it :O.
8 j( L6 i4 ?# r- D* R+ ]" i9 Q/ [) ~9 ]6 D8 S6 q' ^& m; Z
Find this in DPSrv.cpp @ worldserver/ u; s/ w; m6 P2 p9 a7 V0 W0 `

+ W; U/ @1 u6 j' |6 f$ x9 n& {5 S- `Code:* R/ o; t8 r' f! p1 p: j" R
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 z* ]2 l1 V; R$ |. |; B{
+ Y0 P+ l1 g! P6 I) W        DWORD nId;* m% {& ]8 m! |- C
        int nPart;
8 ]2 S* I. K# d, L1 z8 K" r
0 Z& f, t1 R& |        ar >> nId;1 o% m- G) K6 B& y$ E4 e4 K
        ar >> nPart;                . f7 m% @9 u3 U5 b9 ?* v
       
1 @* V9 @' w) J1 Y; i6 A+ v5 z- d- a        if( nPart >= MAX_HUMAN_PARTS )        - c6 m  [7 f5 Y
                return;* H; {0 U' S; B4 g, `" R. {
' Y  V, f8 M6 x* ]7 a7 f
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# T  ^( \# V0 p* Y, W; O  s& v7 E

, B7 b' r- G1 C) B3 q' J7 c) p2 V3 u, f+ o: |" f: S: T$ f7 Y. o
Code:6 L. S- }% n/ s! n6 i
#ifdef __QUGET_SWAP_FIX8 f2 S- D. j6 h1 C& o. Z$ p7 L7 O; k
7 Y3 K  l; q& m( `% i3 Y1 m4 I) `
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
6 A3 K* `2 C- V! ^$ `( o                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
& Q" S: f% W! a, x* C6 u9 E# I/ x, Y& G" j& K) }
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
; e. F/ {7 K: d2 i1 a                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* g- R9 g: L" G- _' t
5 Z% L( q& P7 Y3 a& j# P                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" m! c6 O% q- f" D" T                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& {4 @: Z% w% l; y+ q0 c7 Y

- d' T$ h6 n& }9 X; z; |#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 k( O9 z, X7 \) g2 x& D# ^- q
and add under
$ a7 Z3 q& _. Q4 q0 V# x" i( t  K/ I" D  b3 `) L2 j' y
Code:7 F; w* c# A3 s- I+ Y3 H9 j6 D
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 Q/ `) H3 ?# B7 I                        {- F/ {2 h) _3 P1 S$ x8 c
                                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 );
( F; z! E' z4 M# G* c                        }this
' O( c. l; L; [2 J
4 k" R, a  d  X2 p) G- dCode:
4 o' d# C. G8 L% e# a8 M. m) ~#ifdef __QUGET_SWAP_FIX: u3 D& j$ ]1 e
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
/ y/ ?9 O" ^$ ]                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 H; u! w- a% e8 B  y/ A6 v

1 t) R* Z: {3 N9 R: b& n$ U* S% Z                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
/ A  b6 c8 U6 }; `3 M& ?$ q                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' d7 J+ Q2 _' T0 i& R/ ~; p9 q
+ b" D/ Y( R6 @% d3 |$ K
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
" W& ^7 ^5 z; \" K+ i1 }4 p                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" c% @* E* |. w* r

8 h# h8 M4 ?* E. N; s5 T0 Z8 F1 ]#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ Z, l9 O# M( I5 z6 z( d, ?7 H4 a8 O3 m! t
6 D. C$ M- z: o

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-27 14:31 , Processed in 0.065914 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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