飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16822|回复: 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   g; |/ ]3 y7 M- L2 m$ v
I posted this because someone kinda posted a youtube thingy about it :O.
6 ]: y' |. ~! f( G) p) `4 D4 z- {; m
Find this in DPSrv.cpp @ worldserver
8 c8 H. K. V5 ]; _/ E- f! s8 D
5 ]5 q" _7 l3 pCode:9 _8 H4 X2 T" b2 V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% E; t- ]& c; c4 M{
; l& _! T4 O! K% Q* c1 Y        DWORD nId;6 p% k1 _, A$ i/ q  e
        int nPart;
+ ]6 Q$ u% y' i9 n7 C9 T6 x6 E: k* z0 \& ~* u
        ar >> nId;" `% @9 M8 o6 e% Y0 h! b! d
        ar >> nPart;               
- A1 P0 X/ e$ r" K        9 L1 u- S4 q4 l+ M% M
        if( nPart >= MAX_HUMAN_PARTS )        - W9 |* s9 [: p1 @# B7 h5 T, L
                return;
/ a5 B$ e  V- R. S& S! T/ w
- ~: }1 Q" n- i% `5 e0 s        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- h! K  V* d# N  L! |; n6 R  A
* S- ^% m! c0 `, F* G

/ e  c1 f. ]: M$ o+ u: {Code:
+ }0 r- r" V' R" A+ f: e#ifdef __QUGET_SWAP_FIX( T) P5 M! ^5 @
) O- ]: q1 m8 F. s' @! @- V
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
( U3 W; j" \# e                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 [4 v3 F4 t! n$ M4 l. K; y; R7 R! Y* }' }9 ~9 ^4 N+ K/ K7 a" Y
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
1 b2 q4 u: D) ]8 F7 j                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 F3 I3 W1 h) @* ~  R
- g3 c! t, k  l, K) D- Y- F6 {( a                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ); F' h/ E3 s; h: I
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% N3 m! u+ n, V4 K" s8 [* ^( f; b' a) E+ T% P; b
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* e3 d6 S: ?; p! [
and add under. }/ ~' Y- f7 w2 M8 l8 i* g5 \
4 E: I+ r6 X: u5 _4 e. I, d
Code:
* i8 j; a+ e$ p% ^if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ [: V) Y% t! b, z7 a  H
                        {2 m- d7 m0 S1 W2 ^+ x
                                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 );
3 q  v& Q7 H% [3 A. p                        }this
& b( y: v' K1 p* ?9 W. W4 M( ^- [; ?% }: ?, O
Code:
& L5 J( u: ]2 Q* y* C" m#ifdef __QUGET_SWAP_FIX, z: S; ]5 M: R: `( v
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )& a  A) N# E( }
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 U: S* \. B. H6 x# t
7 \) u7 e4 f& c9 q! c
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )+ s# ^# W- i  N, \
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& ~  ?8 n0 l; q( A, ^

4 z: d4 N( |) w8 k                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
* g) W8 L( k* n, y# U$ R6 Z# Q                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );  c5 o) R% k5 J& `" c; U

7 g. ^+ ?( ]$ p#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ y. F5 R! [- x* B; k- _( r0 r' d+ m

' c2 c& V) Y) J! e5 }% q

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-2 20:48 , Processed in 0.096955 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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