飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 15893|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1078

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1078
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
& C3 \3 t. V$ Q2 j, Q- _I posted this because someone kinda posted a youtube thingy about it :O.
" `* }9 P: m0 V
( q0 Z; n$ M2 |, |. h( q0 p* K, zFind this in DPSrv.cpp @ worldserver
, Y- x( G9 }8 |1 Y% E; `& F
7 }  |! z! C- {: U7 ]& N' A+ wCode:
' q; G! D" a  U$ Yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& n/ K8 o5 ^2 p4 x  @0 L3 ~
{
8 ^' c, _: Z, s7 L# l        DWORD nId;, j* \; C2 Z+ T! v0 q( T4 n: J3 h# n2 x
        int nPart;% Y6 |; c4 Q: }5 i# J  [; ^/ E! F

+ g# D. c% X9 C, H/ ]) M- C        ar >> nId;
) o2 N7 g/ H4 Q$ F8 G5 m9 n        ar >> nPart;                  }0 z  S7 N/ u8 Y
       
; ?; y, f7 u4 G2 j; u        if( nPart >= MAX_HUMAN_PARTS )        ( \" `# o! ?5 ?7 w
                return;  w7 g+ z5 s) u2 F

0 k3 Y' r* T8 B9 o9 O        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 k0 _+ m* Q- [: s! _
. s1 B: A; c9 |) T

, y+ U+ t$ }3 E9 S5 OCode:$ m  N: Q8 t+ ]4 G) N; G% J
#ifdef __QUGET_SWAP_FIX
$ ]1 U2 J; b! `0 e0 g5 b0 P! S% B& E
& M1 z8 N" ]9 t! B2 J$ ?  q                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). H9 K* J: E% Z( t) R# x( |
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( u7 ~2 u$ H% ^

3 G# Y" S6 \* j( n                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
& @0 Z& A8 e8 h  N6 D- n                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );# Z6 L6 A$ D1 r! J" R9 @) B

8 h0 U9 P: k+ L  z3 I! Y                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )" M# T. K/ z- `+ p
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ K3 [- ^1 p! S5 A
8 ~$ o+ t5 o% h0 X, _4 b; u
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp+ r# Z! }& f" {  y9 j# `
and add under( V4 u: ~( W" Z

7 r9 i% O1 G- B  oCode:
4 h0 a; Y5 P3 `if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ m) f- c: @: v                        {# `9 J/ B. w" y" d3 \+ T% V. J* K
                                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 );1 a# ]! y6 m: D+ k# K
                        }this4 d$ C, ^+ a6 z! N  }- L/ w6 p2 _
$ h" U) a' i( D6 s$ k
Code:
8 N1 D; r- p$ R& e2 a  l0 N" }#ifdef __QUGET_SWAP_FIX
! e7 s5 ?* H2 s, {) c                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
1 F5 Q8 z1 j3 O, U6 A1 k0 I% s7 K                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 e& k3 D: z% ], b. I$ x
- E* Q  @  `- r$ `9 }( m; N  R                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ): ]" m( T4 _- W! L3 Q
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
  t' S! Z( |3 x
; O1 ~* O  r; E                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )( Z' Y( j3 m' T5 ^
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
, g0 z9 _: I4 m% |+ ~  a9 C7 v( g7 H# b( w' a" A" Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / g6 n. j: V6 L* ~

) H9 d+ ?( @8 O3 Q$ d3 t7 p  M. V$ Z5 V. t* F% n/ N: w

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-10-22 20:03 , Processed in 0.071119 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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