飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16801|回复: 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
# `: D: N! m  E1 b8 F* qI posted this because someone kinda posted a youtube thingy about it :O.
+ v, N# K  E7 I  ]+ d* M' U. B7 |7 g  a8 Y! V: j- X
Find this in DPSrv.cpp @ worldserver
3 m4 o+ J3 W/ p6 F. m! y6 N  d5 F  Y) [' U: D- V2 Y
Code:
3 X4 z6 w/ I6 F5 f7 |# |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 u8 x2 R# O9 ~! u, B5 n9 l' q
{9 c2 J1 J- T4 M& H: b
        DWORD nId;
$ s8 f) }! B' T( @        int nPart;: U& k  l8 m1 K  q
2 w& _  h  W: z, x3 L
        ar >> nId;5 }/ N+ |+ X' x" I( w# D6 r0 k
        ar >> nPart;                ) _/ ]! v6 J2 y8 ~7 k+ _% f. v2 l; o
        + x3 I. ?$ s6 G4 n
        if( nPart >= MAX_HUMAN_PARTS )        6 l7 h8 p  V" ~, g: M' G7 T; p
                return;
# _$ x6 V. |2 F" Y# R
9 l1 B6 {! K" {5 J% y        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! {0 z) Y) @+ A
) ]1 f6 o/ ]# [

2 E5 q2 P3 I5 ECode:+ i' E$ _, r1 Z4 b+ W8 u. e
#ifdef __QUGET_SWAP_FIX
' b- G5 K' v) D7 }" b7 G2 t
) k$ j% u, {+ P- K7 m                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 M6 c* B% V: ]# i                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 a3 b3 K6 Q* {; V9 _
7 }% b& B& \3 l; `  q* j                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
* w" g6 u( U( V9 ?' r+ u, V5 K  v                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
4 z0 }9 w3 h8 w. ~- Q7 h7 [8 i- H
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
: ]2 v: |) u3 v2 d9 p                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 ?7 Y! G6 ^! X4 X0 B+ q
5 F4 v* n( J) r& h' M& J6 R# d3 O#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
) Q4 _/ Q) X% i5 J6 e- g9 zand add under
: s! a. j2 Y. G/ U% T! M6 C  c+ V  d* f) {0 B' }) y
Code:3 z& L. Z( ?% g. j
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# w/ k# ^9 _" O3 T  |
                        {
  j5 M5 T, z, v) H8 E/ d                                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 u: A0 z: X; y; d7 ^                        }this5 V6 s' l* e0 |
" W" j* _- G  v) L$ s  c
Code:5 f& _% R6 |- h3 Q
#ifdef __QUGET_SWAP_FIX
% k. m- M' F6 G8 e/ X                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
: m2 V7 I. ?) p. B# S& ]# I                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
  M3 x  u7 H4 z$ R1 k
6 a0 j  k/ a; C0 l9 X                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )1 b3 _% _- _3 L0 c7 U
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 A+ x2 T6 M& K. O9 S" p9 B  P# u0 u, _0 F5 b! `
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
* }; B8 J! P9 K: L( [1 O5 I                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- h9 u  o/ i! ^7 S6 ]( f1 E! }: G. k8 d
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 Z9 x5 s2 J2 M- l# z
- J; i' ^& @( W$ D  }( r& f- j
/ u. y. h7 S$ S4 I7 x: R

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-1 03:41 , Processed in 0.072718 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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