飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16986|回复: 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
( Z2 o. b' Z0 a# cI posted this because someone kinda posted a youtube thingy about it :O.
8 s1 C& [$ V1 f6 X% ], G
- }+ W: t# u  Q- D  x) xFind this in DPSrv.cpp @ worldserver
1 {7 |3 q- d' s& y/ C
2 B4 H+ r! w; ^* q5 j2 LCode:
, ^% O, O1 Z% w0 D# Jvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 o1 r  P! L) _" }9 x6 F{
% _+ K3 Z& P9 `8 L* m: Z. e        DWORD nId;
1 m% w  t  {  B7 f2 i; K% l; t8 v        int nPart;
. m% G. y. ^/ {1 t. J% F* E  \4 ^5 X5 R0 m5 o
        ar >> nId;
, ]1 V( F% a" e  _        ar >> nPart;               
4 R3 D$ T& p8 C% X4 ]5 q, y        " z3 _: z: i0 V( N* A3 Q
        if( nPart >= MAX_HUMAN_PARTS )       
7 G# R7 ~$ s, E0 l8 L7 t- {* e. c                return;1 l% o) [, {4 I  f2 ~

( ^' M! q& ~+ ^6 _2 B, U' l. |& y( {        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" f0 d8 y+ a  U) C! O
% `' P5 ]7 ]! {, U+ }
4 a1 l/ }/ u: k4 j& xCode:0 l. @- b: Z3 I; M" t
#ifdef __QUGET_SWAP_FIX
0 p9 Q* f: y( x. i8 ?- ~
; z; t, n( \& l2 _0 u4 j& j                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
( R! D" h3 D- B4 t; W( h                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());6 j5 x8 M% S( ?9 [: `
0 m8 a3 X* g6 Y! Q
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
) R& D8 @4 P- K! a  u                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );6 H% n. w* O# i7 f3 s

# L: z4 V9 w( d3 _                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )! T! n9 G5 F! t4 s# ]
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 X$ o5 V6 P& ]8 t) W" G7 [  a+ m1 ~5 t; Q, o" o/ q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
  }, `3 U& N% q1 jand add under( V/ h9 [8 l" L, U5 _0 T

5 b) W& H8 @/ J  `4 ?Code:  ~! W7 F% g% j) H' G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 L* w- }; `1 w% `% O  ?. M- I% d8 T* F
                        {  k, a" Q, d# s* w6 U
                                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 );; |3 ?% V' ]6 ^( Z3 U
                        }this% n. B* B8 I& x2 c4 x

! y% B. X2 o: ^0 _" d: e  sCode:: X! V' C9 ?5 ^7 p: c+ }; J) B
#ifdef __QUGET_SWAP_FIX6 T' O) C( c& E# J# n( ]( F/ w* N
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
/ ]& x8 \) u1 f- U! q                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());% g& ?! |$ E8 l0 c7 v5 K" y/ h/ ~- h
. O6 k" [" w7 |. u* X. o- i
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
* Q5 F$ n' U! L# l3 |1 ]( A                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 F$ D6 G8 l/ J: B& Q# @
! K- A$ f' `: t0 w5 Q9 |: Z; s                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
" v3 Q) F' N+ G8 c" ?5 w                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! C8 A. m7 A8 r1 V8 Y7 {
+ r! {* q. A( N" ^0 A#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " c1 l' E/ R' E2 [' @7 O
- y5 ^8 i3 d# x: e6 W7 a
; w  W, l, i0 R2 G" g  S( B* i% j

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-16 13:12 , Processed in 0.065244 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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