飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16240|回复: 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
( k7 r. E- ^/ t$ a! z/ pI posted this because someone kinda posted a youtube thingy about it :O.
! J7 U( I8 m! |+ }3 e  ?' |5 \8 N. _
Find this in DPSrv.cpp @ worldserver
+ d; `" B- Q+ M2 J& B& d5 E0 [# M/ O4 F$ }9 X% v
Code:
# p1 ~- B: Z; M# H( j8 }" {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); g$ m4 d: a7 ?) O$ |7 M  P& m
{
) B% F8 Q$ m/ n: O& u        DWORD nId;! b+ z) A6 H. A1 L
        int nPart;0 I8 C. g8 {# n: P0 Y0 P- T
% A8 v2 ?: y8 M( u" l+ _. J
        ar >> nId;4 g5 L. M6 D7 _4 v( N2 I
        ar >> nPart;               
1 K9 d7 P$ t' P+ M        8 E: A& c& _3 l9 ]" j
        if( nPart >= MAX_HUMAN_PARTS )        $ N: W) g6 X5 ~# I% Y4 D
                return;1 V2 g; c% ]/ C4 c( ~
5 u* k0 ?/ s4 I: w) |  q. g  ]
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. O1 `- L9 l9 _9 r# W6 t/ h$ u
) f, O1 J; @) |; D0 x5 @$ M0 x  ~! f2 p- y* a6 v. u2 x9 {  x" Z
Code:
- ^" A2 ^$ j  x#ifdef __QUGET_SWAP_FIX
% l& r. n( K8 J& [2 u& g( q& c/ ^- s% s  I
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )7 b1 D4 r7 l4 }( {
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 B5 l7 T& Z6 b2 g' E7 W$ Z6 W2 C
5 W6 x; C( Q3 W9 g* E5 c                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
4 z; G! ~1 C: k! V                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
  Z: s( f3 |0 c* J6 U! v% h0 K' ]: P
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
9 K9 D4 Y! @2 B                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ t* E) U$ L) u+ u2 {! E1 p! W+ s
" x$ U% V6 C% ^3 U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! p, U4 P; r% C. p9 }and add under
8 K/ F8 t6 b, k$ H4 ?1 M- f% f6 c! {/ v! g8 ~; b4 Q; p2 A1 X; h0 \
Code:
8 o% u7 |, i7 q0 H1 K" L, ^if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 O' x5 @3 Y( }
                        {
& n, J) Q2 q* n- K, W1 E                                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 );: q8 I8 _1 T: ?2 r
                        }this
: ?" }  _& v: a2 [: s/ F
( F6 @3 E- O2 _Code:) }8 b; W1 Q$ K2 |8 J: t
#ifdef __QUGET_SWAP_FIX
$ A6 j: i+ }0 w" a7 K$ Y                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ): \5 s5 p: g7 X/ P
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* }$ c3 D0 L: l8 P& B$ X
2 P# d) J* |4 o  I                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ); Y& C/ `6 _0 h* Q
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 `& X8 L7 Y8 o1 B

" l0 g5 m. x5 p1 ~                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ). g: B; K  O4 I! u" ?
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( E; f# X( O1 [& @

2 N* ?5 g. n1 B8 @0 D$ W; b#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 H) H7 G- [4 q3 `% I( @( m
& S( f9 ~% v, i: B
7 H# n0 k4 A9 S- v7 |$ g

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-29 16:10 , Processed in 0.078809 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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