飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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 " J9 l. A  z+ u2 c2 h- H; Q8 ]- ]
I posted this because someone kinda posted a youtube thingy about it :O.
9 m! w+ U/ I" E2 `/ t9 p
2 z' h, P/ s) c+ M0 J& n+ ZFind this in DPSrv.cpp @ worldserver
/ S3 Q* K+ {3 W) X+ e5 @$ B0 z  d8 S! }' m! R, i$ s, }7 e
Code:9 H: U0 F" o9 x0 y) w9 r$ a' y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' l0 M: ~+ M+ k- ]( B% P{# ~* J( m$ x) u9 \8 S
        DWORD nId;
% P8 ^; g/ h+ m& o7 w- d& G        int nPart;
4 A- P, o* K" U$ Q. B9 c2 n8 Z- X3 G' w7 C2 x! i
        ar >> nId;
6 t  V1 [, g% `. d$ y& t+ A        ar >> nPart;               
; x( R) ]3 Y( c) R3 T1 c        $ n5 t* Z+ K7 O  B0 ^; F. v. P
        if( nPart >= MAX_HUMAN_PARTS )       
9 l8 j- a3 ]2 V$ n                return;
) r  a% s0 U$ V8 Q1 A: v/ d+ S4 i( w3 k9 A9 U  m& Y
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. j4 j, E4 U: {7 ]1 a8 ]( u/ N
% y; z# |! ]& y5 I: N

. P& D! ?) j7 }+ ^Code:
1 b* C, f1 x  L( v#ifdef __QUGET_SWAP_FIX
2 H4 r( `& N5 p! r. B+ }
( M8 W: E  ~3 v                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )4 L0 v6 S& i. S' f7 S/ n
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ d5 ~( u! a: |$ X: x  @5 }) h) C3 j1 @2 n) Q0 E8 a
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )% c* I: K  C+ w0 `5 l& q1 M
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ Q) B3 h4 D- ]- ^5 @
/ {. O: [+ m+ K6 n
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
* f# ~; B; H, U9 @                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. C) ^& d2 L6 j" y3 h# f1 D
9 D& `$ a5 h. J( G& z0 v& a( ^#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& J8 _4 r* X& c4 ~! w) \
and add under
: d. `% U5 O) n- V" @5 y1 w9 J8 I
# A7 X  s  i! B: r/ W' M6 mCode:8 s# s1 m% x$ v: q) |; h  E
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( [( f8 P0 P' w2 F. E: C) c                        {. @; x8 ]7 y& w4 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 );6 S3 G1 T1 h/ H) W& X
                        }this
" S1 R, I. ?1 X2 V% v: s0 Z8 H9 X9 r9 p  w2 p3 W$ N
Code:5 n# K9 }$ K$ d* M
#ifdef __QUGET_SWAP_FIX
; g. `. w8 X4 }                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )! l; v0 r# [. z4 h2 U
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* A  Z) f# u* N* q! S
4 n* G1 `1 @( E6 Y* F1 \: ~                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
+ P# C- J, E+ @2 R- D5 k9 y                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* q6 D$ V/ n. U( y; w1 c8 O' L- e: s
# H) Z7 D) t2 [" F                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
+ i" G) m$ j) N$ N( F                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# }; @4 d. C* N  u% |+ I( E! `
0 u+ ?! P2 F1 s8 T! Q. d$ c#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 @8 T* a' |4 q3 K. O6 H% ]0 ], Z! e# b- Q1 p2 v1 g

4 p9 y' ^& N/ A; u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-25 00:27 , Processed in 0.058034 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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