飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16333|回复: 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
* z7 m, D% c0 I/ y+ N/ l% fI posted this because someone kinda posted a youtube thingy about it :O.
. c, y* U  `( K7 t" Y
1 \1 I( O# a0 Q4 HFind this in DPSrv.cpp @ worldserver- @# R" k6 D1 W4 H4 w
9 e' d9 x+ T8 z# C+ |5 c# P6 z
Code:
6 h. A/ `. }9 e; U1 D1 n7 V: Evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: f4 {' a( B* ]9 y8 k{/ a" p6 ~+ \" k3 |4 }1 Z7 @7 N
        DWORD nId;# Y8 m  I% s5 y2 F- |
        int nPart;
) y. I0 c$ O$ j" a' X% z( n3 n" N
        ar >> nId;; Z: l$ ^$ y7 {% q, s
        ar >> nPart;               
2 e. S0 F7 h! ]. E! y) v, Y       
# v& D# r8 r7 u/ \3 @0 ]3 G        if( nPart >= MAX_HUMAN_PARTS )        / w% K% Z. ?% d/ I: z/ V$ K
                return;
' {8 [3 }2 }5 o' v  _3 u+ J! S9 B7 n1 x$ p( y
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" M' q7 j5 f* e: m$ ^% ~0 C3 z+ x1 l. M8 f
) G! s" `7 L4 A; X9 Z0 l7 j# p7 u
Code:
5 X, }& x: {$ z% ~7 z, ]#ifdef __QUGET_SWAP_FIX
* P* z3 k% |) F( d' ^5 ?8 z5 S* L8 U% u$ E6 M* U/ X/ k
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )2 J# i( m0 X0 |, k' q
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 K4 u7 D+ f- t
% A, c. _2 e4 O; d# ?- l% H/ o5 J                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
- G8 d* B( R4 |9 P                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" y- i0 I- h3 ^. |8 b  e5 _
' `$ o% d2 _7 q  V$ x% I  z                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ), ?: b  l# `! X# y6 ~
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
4 r2 C5 m; A4 C% O# S( g! E! ~; W" V* u
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 F0 y  F2 ]5 ^
and add under: T# f4 @' S! Y" D, \
! t  Q$ a8 z! |3 |
Code:* G! L+ q* Y5 L$ P
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 a5 F# b) d# Y8 }# C0 [
                        {
2 |* |1 q1 d& P0 H, [                                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 );
* k- K' g+ b7 v; }1 E* \  H                        }this
# P$ U4 x$ v7 ~* g& i! _* i; P, \: C& N  m/ B2 k
Code:
6 n4 Z0 I1 y/ H. q#ifdef __QUGET_SWAP_FIX* O" s& R! j/ J2 |5 |. N" ?* G. z2 g5 m
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )5 M9 L. t+ S5 C% u/ I2 |) I9 `% c
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 |7 `, u5 a$ U) Q8 _+ W8 I4 K  r

( P  C- T! S3 N8 S" i% M                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
" r# H5 \* q7 K6 I                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) _' ^8 S2 ?. Z# M' ?
! p$ C3 G. N9 u' L* H                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
* l9 A+ V  v2 `; P/ x# G2 x. F                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 f. c6 G0 c* K' h+ M1 \7 }  N% l2 o+ v; V! H/ c
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 ]- U" O, _# z& F  C0 c

1 e4 W9 i# p1 G6 A% Q  j" m  Y+ a. q- L

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-5 21:24 , Processed in 0.064173 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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