飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16894|回复: 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
+ o0 G0 f5 Q$ Z' ?I posted this because someone kinda posted a youtube thingy about it :O.5 i0 ~# G7 A. p  E/ _1 {$ c

6 K! j% X7 a0 i' d( M  B0 P  FFind this in DPSrv.cpp @ worldserver; f9 g/ H4 ~- l4 F
9 {5 x1 [- j) v' s! }% G
Code:
# R: D+ a; ?2 j6 G+ \! v2 M* _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# a5 ^/ b2 f# k, Q; u( [
{
/ e" y% P  b& @4 f. p" U        DWORD nId;
) _0 U* }' Z! N' F, r        int nPart;$ p2 y& R4 J& V" a2 U& D& e# T

- F! B& X# u" U* N        ar >> nId;; y+ J+ h. S' N1 D
        ar >> nPart;                # @; F* [! R9 i4 Z: r5 x
        % f2 b- D7 }! W
        if( nPart >= MAX_HUMAN_PARTS )        # w* f- V; `. @
                return;
6 n9 g4 S( Q! D) c7 x. G. m# @, z  K: g8 Y4 S$ ?
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, O$ y  \+ A; ^0 ]* F- ~9 f' D

. u! r3 F, U; y) z; m8 z
& l0 R. f! N) V! y# qCode:
& S1 _7 }; u( p#ifdef __QUGET_SWAP_FIX9 X  m7 q: l8 r1 y  O9 l. Z' X
, a; @: O- v+ u
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ), Y5 u/ c! B, b, h: \- @& ~
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 f- c! @2 M: U# u/ l, j8 K( \8 r1 E
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
- g5 l1 S; g& `$ K. m+ l' Q7 [                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! h0 N* e* x  N4 g/ K; a2 d2 }6 `
: n5 H7 z+ D. E7 G: s9 ~                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )6 z- S, Z, L+ B. o: Q  X
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# v# K# S" b% i) x$ ~* X5 O& E. \

( A" A% B# ~; w" m#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 i1 F( {9 C+ Kand add under
5 ^' S2 [/ j+ I- Y* ~- y( y7 R% V* Z! j/ D. d" f: s& ?  [( j2 |
Code:
0 E4 e. L, w) _4 Eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) Q; S1 o( f3 M
                        {7 d1 v# z; w* b0 r4 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 );# l0 _8 ?! G7 A6 R! b4 s
                        }this
  I0 ^( v7 p" u( k7 [, S: V/ Q8 k
Code:5 l/ h' ^* b0 U# i/ V
#ifdef __QUGET_SWAP_FIX
% W/ v, W& Y1 _; a9 J/ U% m                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
& V0 s* C  i, B8 a1 D0 A2 c                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ \- J8 C5 K9 A" M! T9 q

/ M( N. t1 U% W% t1 m4 M" S( R6 w                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ), u- x' A% G3 j( W
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 _! T( K, M: t  |+ R2 s
0 h9 f7 X! Z* S& {" K& _7 _                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
" s$ k6 @# g8 p) S9 J0 m- R& f                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 _( e3 U. `* ?2 h3 O# P
  |% {  Z0 w5 [, |6 O; i
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 }. f8 @) O8 H1 |0 T8 L- y
$ s$ T8 r  W9 }, {* _+ J  ?9 s" y
& f% d& H. n# U6 L8 `

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-11 22:07 , Processed in 0.069846 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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