飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16408|回复: 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 ( C- s& |. u) O4 |. c) r& F
I posted this because someone kinda posted a youtube thingy about it :O., v+ i" \; q7 Z- `  L! r

( `# b" j% C7 |0 AFind this in DPSrv.cpp @ worldserver( H1 y1 g8 u, f& I& ^
0 F1 _" F9 l) I6 k3 l( A7 K
Code:
6 q, n/ }3 D: b$ m0 Cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): q: f7 u) c2 ]! g4 T/ A
{. Q" b* L7 u4 S% U
        DWORD nId;
/ b3 t9 j1 h% J. q7 I        int nPart;
% B0 b2 [; S6 v* D# u+ {- P0 x5 z) C- v2 t3 R) T0 v
        ar >> nId;% H& P1 r( q! h+ {5 s; [
        ar >> nPart;                , V: M1 X; m( b% Q
        # ^. t: J- x. `# k. a
        if( nPart >= MAX_HUMAN_PARTS )        0 r  r" {: u$ g
                return;
3 y$ _2 v7 W9 p  V8 q
, s  w" i5 o. g* x+ Z        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
  q% y) V, k+ R# Y3 T
8 B( [/ H$ `& a' h2 n$ P. y3 R. T( k
Code:
0 G7 N0 S$ o# m4 P8 F( M8 A3 S#ifdef __QUGET_SWAP_FIX& M+ L8 h, Q3 K; s
0 s2 _% D8 u3 {) m) z+ x2 X% @
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ), U1 F% U  k. J$ ?5 ]/ b. O
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());- F4 A& n8 \6 u& |
2 m( g( d% j! d$ w9 |- t" r- E
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
4 e) Q( w6 \! j. ~7 f                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ n) u' S" w0 \; }4 u

" E, h( S9 r7 h# P                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
6 p9 `2 L) Q: O8 X                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# }! X5 M' V  ^, i1 l5 T6 ?( R" T) T

  Y( k# h) e$ w& M7 s#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; s4 D* {. N$ `1 ]/ H
and add under
: r9 R0 D& O) `/ L, |9 K: ]% z- H4 Z" R+ S7 D3 L% y
Code:! ]: n) J9 ~. B* U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
0 |/ f. z5 B. ~                        {
0 v3 k9 A$ h0 w9 c9 ~8 B  k: }: L                                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 );0 R' a9 @) N; S0 c8 E! c
                        }this7 N& |5 r# c  L0 |7 f% V- h( P" `

3 i. v; S- D: ^# Y: PCode:! M$ J& g4 o7 T0 z4 ], @9 m
#ifdef __QUGET_SWAP_FIX; v- @0 O' y4 K, [$ E* N
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )  W% z$ S. v  Q) [* e5 O
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 e0 T3 O0 q- I& T- [/ p' b6 d% R; L  p. T6 u
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
7 d* j8 N2 j9 C& J0 F                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 h4 [) M, w- w; i. d; D5 H1 F4 W! ?6 b6 q8 P7 s) I/ a
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
8 r. _# u0 j: {- k( h  w8 b8 P                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) o8 z9 H6 e. H* o7 z9 n( T+ Y2 A% T3 Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 @' i" G& u4 L3 X1 Q4 m2 F! \1 ]; v% o
2 o* b6 ^& d; f8 Y1 g5 f. J( c1 ]' G3 d7 Y$ f9 C! j

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-9 21:46 , Processed in 0.067625 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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