飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17111|回复: 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
3 h" W4 Y; d# ]0 u- Y* l$ F+ D( H' D/ ~I posted this because someone kinda posted a youtube thingy about it :O.
) [% n, z8 q4 z/ `8 N/ I9 @/ t+ ~: y* M5 w
Find this in DPSrv.cpp @ worldserver: M! E, O: N# r  r9 {
7 I' m+ ^; w. V7 i% A( v0 S
Code:, V7 N# @* h4 y! e! X
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 E& h8 x, ?, x
{
* R! J% L: g; E* A# {* U        DWORD nId;+ D& I- C! D" N$ I
        int nPart;6 B0 O& O$ n/ m0 {- s8 I0 h

  `( K. x# k$ q3 e7 V        ar >> nId;
6 Y2 l1 @! C9 D0 F1 l( H2 Q        ar >> nPart;               
( n$ v( }8 E  k. u" ^       
* O' @. r$ i" `, l        if( nPart >= MAX_HUMAN_PARTS )        1 V: |- N' \- @
                return;
# L; |/ f0 j) m0 _$ K
+ Q" m' I  s: H* {6 {) k        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 a( @4 @: K) E  ?  p# T- A
) T; U7 a$ S5 {2 @: K: M7 Y& C; Y  w5 s, e& n& s. z+ b5 l
Code:
/ j5 |6 ]! ^7 E! n#ifdef __QUGET_SWAP_FIX7 J% u% T  o' {* c
# e+ U) v9 o# Z4 N0 ^
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )( G" J5 ~# K( N6 r/ C5 |' G$ P
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 Q- S1 U; W2 g9 ?9 Z( |, G8 t0 n7 e1 k7 }' y0 C3 K3 G, u
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )1 d; w3 v- v4 C1 m
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! e/ ~; m" {, Z
) I3 V# W( X* Q2 ~                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )  d2 D# b- f- H1 W& ]
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& n, d8 A3 A# Z) U$ [2 x2 j
; J# K+ K9 p1 P, `2 G7 s% c* L#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ `  W9 e% N/ @4 `: i+ Hand add under
% A- G+ H7 t2 f, b- U
8 n  i+ q7 J. [/ uCode:. z& _5 g( a" s, A  p% ^1 F0 u
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& @* F( R0 v; m% k7 p  T3 T$ h
                        {
" Z. {' g1 t( E2 T6 i* s. n" T                                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 );
" H8 g0 E1 B2 A) q- H) S& U$ R                        }this
0 H5 s5 R4 P* V  G
" l" A  s8 U0 ~Code:: X/ m% I5 s1 L
#ifdef __QUGET_SWAP_FIX
2 ^/ ]' |( W# ~( b                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
- @8 q6 s# }  f& v! L                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 G3 R/ i: s  t: a/ A
; `3 x8 F1 [4 v* q# Z                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
% _0 ^- a% _3 y) C# K* `0 P                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );0 R+ c2 Z& b3 u/ h3 U- b. t% @
/ S% e; i$ l, y) T) v7 F. j
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )1 Y! d. E2 e3 ?0 x0 `+ v+ l; S5 c' \  E
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) _! t( l$ b6 |4 @2 Z0 H

, L1 g8 i7 c. S$ o. j; J8 D1 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - P1 c$ `8 Q/ D% \+ v/ k

! ~9 H8 o! t+ Y4 u2 ]6 f/ o: G5 |& M6 O

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-22 02:03 , Processed in 0.074878 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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