飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17091|回复: 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 4 b' }+ v. z1 r1 h0 {
I posted this because someone kinda posted a youtube thingy about it :O.
4 Y- l. B3 i  X) \3 H$ U# Y
; |( n2 F( M1 v4 n! Y( _2 X% lFind this in DPSrv.cpp @ worldserver$ Z1 ~- T/ F' N* ?0 C* ?

. J1 K% F4 t! p$ K- [  l& M5 F1 PCode:2 U9 L: H  t" p/ ]/ p
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), b. H1 O2 N3 ^4 f3 Q( J+ Y
{5 }3 {: a% ]  |  [2 E
        DWORD nId;, a5 D4 }9 _: d/ R8 X2 `
        int nPart;
; D- O- v) `& {# y
; P$ q! `0 C7 I9 U        ar >> nId;& n. [% P4 |! q+ g/ ?$ ]
        ar >> nPart;               
& @4 M! W- L( E- o8 d        " F8 m- O* B0 r( ^- e3 J
        if( nPart >= MAX_HUMAN_PARTS )       
# R: Q: L9 o, [) j: y2 G' S                return;
1 w5 f" B  u9 r% g$ ~
* O. h3 ^0 T8 D% H        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" z2 d4 U' E" W

8 D1 z, p/ j: c
; k, {* `1 U7 p' k9 k, fCode:
. {# s8 V  k8 f! h/ j0 `6 l#ifdef __QUGET_SWAP_FIX; e, S/ f* r3 A) p. A: H
, {: r% E$ R5 S8 l1 X1 n
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )6 Y3 L3 Z: A: d8 {) p9 Y4 L& c  O1 I
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( _. H. }  `; V- E

9 t/ j4 I( M/ _( e                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
$ e, {9 N6 O6 m/ ~- P                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );: ?8 u. ?8 t! \7 |: I2 b+ @4 D% F6 G

2 i% }: ], I# P# D; V& u                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )3 m  C! k& n! Q+ M
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );. \/ F/ _; R/ ^* c

5 v0 e7 x3 H9 F$ }# F6 q$ s9 V#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
8 b# ?( o4 K5 p, D: O9 v2 fand add under) `- X0 @# u! d$ l/ _1 ?
" j% n  I% e* U1 `( U" F
Code:  g' f- X' K2 t
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& m7 `3 P5 S0 b
                        {
) V! y, h# y) o  j1 M6 a+ o                                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 );4 j, {6 p. N0 `5 `
                        }this
3 @( j, H7 B8 g' w8 a- V) e9 ?# ?/ {, o6 G
Code:- `4 X7 \0 M7 E- @
#ifdef __QUGET_SWAP_FIX
5 K% O6 [0 @$ b" b# k% F& x                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )) K- m0 N  z. x7 T# L
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! F- `* m! ?6 H7 ?

+ J" {7 t& d2 Z7 j9 z& `                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
+ B9 Y, B8 X; C1 y% W9 q/ r" A                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! P3 m0 I  \7 V! [0 J3 V  w3 t+ S" y

  i6 k( G2 J) R: j                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
4 b/ ]" ~5 P$ }* {2 l! T- S                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 }3 Y# R9 Q/ p/ W: l, R7 \$ H8 l! ^7 P- Z2 D8 Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 x( Y% p& W( B5 x1 J" j
, A) L6 g$ w2 T2 ^3 j
: F4 h* d( P% ^3 r1 Z  F

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-21 10:16 , Processed in 0.065955 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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