飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16469|回复: 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
* B& F1 x. M" t0 x, [* DI posted this because someone kinda posted a youtube thingy about it :O.
+ E  ?& z% w; R. g8 [, \: C2 q4 T; B9 r  x$ B: |  e3 F/ ^
Find this in DPSrv.cpp @ worldserver
, j4 M0 z8 J- P( {- Z) Y! o3 r* Q8 N6 O2 t% J9 C) D
Code:4 g8 u0 i# @8 l3 J5 K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 M; t: B1 r: D, c! I+ x! h{+ J: D1 V0 I6 \
        DWORD nId;! x5 u4 U' ?1 V+ ]) b4 R9 h
        int nPart;
  \5 z$ z. r$ `% q4 x$ u; @+ Z, \4 F- E
        ar >> nId;: ]7 Y/ ?" w5 V6 K2 g# ~6 ]
        ar >> nPart;                - ~  w7 u2 x5 u: Y9 m
       
/ E4 M( o4 h5 U- O8 |        if( nPart >= MAX_HUMAN_PARTS )       
; N5 x# f4 T7 P$ i' w                return;
4 K3 z2 [& C, z6 f( M7 P7 d8 Q- l4 Q) \
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ o6 G9 G% Z5 t' q
6 }, S. X- x: s& m: m$ j
' i! u( q( Z- ]; hCode:4 |! q# N% F8 d; ]8 X( ^
#ifdef __QUGET_SWAP_FIX
) ~1 d" F; a" g: u+ I2 J7 U) I, E. x$ e7 J' S: m
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
6 F3 I* X6 W  O* a, l2 O                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());7 f1 P7 f& V" Y" G8 b# U) ]
( L- e* E$ e4 a4 l2 O5 V  h$ M
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
% q( `3 {% `' A1 g5 ?                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) w+ ]# ]2 Z2 F% q) ?5 o; Z. w5 a( e5 y
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )( L7 \3 ?! c9 C1 s( R/ `
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  k! n" I" r3 X' g! P0 @) \% Z
' D5 A  h( c/ R4 \! t) u#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; d. H) x3 P! Yand add under
8 u3 G2 Q6 n4 i4 |% X9 L8 _- V( x: g  B" y' s  p- D! c  b
Code:
2 D1 a5 q* w. K2 B- N1 iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! `. R: ?8 n! z- {1 u  n                        {% e) _+ H( u9 o( e6 f
                                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 );
  R3 I; g5 ^9 b1 m/ Z5 h                        }this1 U- n4 a6 x; y
% S9 e& H, M# L. ]: f: j
Code:5 z! S+ k+ j2 M0 i; r
#ifdef __QUGET_SWAP_FIX
- C& p1 w" u; Z$ X9 ^                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; |* z! H' Y9 ^                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' ]% ?7 _2 ?: B! X" h  e( f% U8 j8 C
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
- O; S8 U+ D: s3 C                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ X4 S2 b: F1 N+ t& B
6 y6 _! |) e( J3 m$ \' I/ ^
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
3 y8 D# f; P' p. Q% b: l8 |% P6 h                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* P/ }" A7 o- v2 }( Q- m
+ Y* S: k$ W* s; L( f
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / E& E$ l0 D$ T' D6 r8 V8 J

4 R1 j1 D2 O2 ~& `" T" j
. y; z  Z( g% F/ J5 }

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-13 07:04 , Processed in 0.060803 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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