飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16979|回复: 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
) x  ?- b. z, g9 x( T; [3 TI posted this because someone kinda posted a youtube thingy about it :O.
. j, Q2 c2 d( b. M  J
& l* q7 j, ~3 V. l* ^7 d- Y" P* gFind this in DPSrv.cpp @ worldserver
2 E+ V' k6 h7 T7 S& y  p0 ]6 `0 @! z; B
Code:
# X& w. ^/ D: q: {, F  E& f6 }void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 B' c; d; q( L* w{
2 n" P, C# ]4 i9 r, }        DWORD nId;, [! z5 k  S5 j5 q3 K0 A
        int nPart;  @) i1 a" g& A1 I+ P, b9 T; I
8 ~) C6 U% X( {4 T
        ar >> nId;: ]! r3 p; r3 b7 V4 `6 {8 h! f
        ar >> nPart;                3 j0 R  U3 b# I& @5 Z3 o9 Q
       
+ p. g8 |3 p- k# @1 `( h        if( nPart >= MAX_HUMAN_PARTS )       
6 S' x3 ^: d' F" a8 U                return;
! @8 s1 R( y; H- z; L4 z
+ s1 u% I& Y  d: l, y; V7 u$ f        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' r  x) ~8 c8 I  e3 ~
1 U3 @- |* k  j9 r- }- P+ p. v
! E' R3 @3 A# I
Code:
$ V6 p  m4 P! T% V#ifdef __QUGET_SWAP_FIX
$ u# ~/ e2 x, I1 H8 n6 r* K
. ~1 d2 R6 X. t; c- `( i                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )6 l' w  J; Q) ?3 C8 L$ R
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());& K5 Y1 e" w1 t% A; f5 M

' {3 z# k1 d% h& |' ?, c                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
$ [8 I! B( q  D1 o, E* P1 p- W                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
% z5 p# |% [3 I
1 J1 G" V4 ^% A+ ~                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
5 H" g+ m9 f% \6 D" u                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( e- A2 R6 I' C* J9 u, I
% {7 \# B+ J# d! L7 b9 |/ ~; j. I#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 A2 i+ g; Y/ N3 [! }$ jand add under
6 B4 j! L+ e2 }0 m# F
9 j! H' ]9 i& a5 G6 T9 n6 J" wCode:8 A6 ?) X; b1 ?& W7 B
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
4 b, x2 r0 n* S                        {4 y8 \$ ?' c) [5 |2 \) q* r# z# W
                                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 );+ M: ^5 N; _8 q9 U
                        }this
$ d/ L0 f5 }2 d0 d5 ^" H0 D" X' c7 {, R
Code:
, J2 c% ]% n% U+ R  M: @% ~#ifdef __QUGET_SWAP_FIX
; y4 L- `( I+ n1 J8 q                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )4 p* M; C0 g) T2 A6 c5 o/ T- O; z
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 g3 e! u  W# J& a. `+ n$ O$ V- w, W* e
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( F8 P2 P2 }- L0 c0 S  h  E; b( R
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( A* O% P" I# d/ h& _% k% c" @

9 N, H: T; {9 N+ @3 X) H                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
  H% x" E/ q  S5 H                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 v; {& ]% n& O8 Z+ I9 z3 l7 |# k5 R$ R$ N/ O% x7 G
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
; R( }. T4 d4 S( {6 r* t2 F4 K. l2 u' F% L
1 V, l5 n& A( \. u: D+ \8 o! E

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-16 02:28 , Processed in 0.059977 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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