飞飞世界论坛

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

修复交换错误

[复制链接]

200

主题

203

帖子

984

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
984
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 7 u) Q+ ^0 w- R8 c- [! z
I posted this because someone kinda posted a youtube thingy about it :O.
' c- E# S! ^! g; F6 h5 L0 t& g& i/ h6 s
Find this in DPSrv.cpp @ worldserver0 l3 A$ S9 a7 B$ J$ B3 p/ z
8 M) {- G' D  [$ E9 f$ y* Z) X
Code:
3 y* n: t+ U3 s4 Y$ a  Evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: y: _- Q$ E8 [& m{
: B& I: X; O2 R6 C; E        DWORD nId;% a5 S! K  k, o! q+ f  K/ f2 w/ z5 i
        int nPart;
- ?2 y% S! v/ q' e4 I, p. F6 @0 \2 O  n$ m& w* D, ?: C: Z
        ar >> nId;& _8 c+ e, ^* T7 ^$ s2 U
        ar >> nPart;                # N2 s( j/ m, l+ D6 |' g$ m
       
/ u( j, F0 {: t1 L        if( nPart >= MAX_HUMAN_PARTS )        " W9 ]1 f7 C: W4 y3 O1 j- d
                return;2 e8 @9 b% V( s$ D

$ S8 ]2 g8 S0 I2 b- @        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it% M$ V- ]4 c2 e& I* e0 V" z7 l4 n

" @2 i% `4 ?2 i  d7 j3 Q& D: d/ M8 P$ {6 w# w5 g9 a4 s
Code:0 M/ y4 B7 I1 P" y* E9 e- L7 J
#ifdef __QUGET_SWAP_FIX; N; n7 q/ _, C6 }
& [" M; i! R2 m2 g
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
8 c- L1 b) p: V# ?: @& a                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());& K2 H4 P0 C- R0 _
2 e8 z, J8 s$ F0 w" Z8 O% n; ?
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )  P6 e! f! w8 {. O; D0 M' Y* {
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
  a2 I0 W, g8 s' [: A: F9 L& X/ S& F& y0 h0 Y7 f) b
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
) @+ j5 L0 N7 {" P8 ?+ w! H                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" h9 H6 J! S+ @# {- J6 Z* y2 c

4 J+ b8 i2 ^- L( \% |#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 ?3 ~( j9 M; Q9 R" o
and add under1 F0 H3 g1 @6 h! X' c, [
- h& O# S) a# L" p1 Q: ^
Code:0 t0 t) {8 ]7 t/ K2 h7 m
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( Y4 @& V4 u1 I
                        {
' d1 o5 R, _/ r+ N* J( c$ b                                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 s8 F6 l9 B! y( n& s# L3 T. d                        }this  s; h, ^/ L  U; q
/ ?9 {. x! N" e  ]% b& ?$ X
Code:3 C9 \) a3 F& w8 p) h
#ifdef __QUGET_SWAP_FIX3 [1 M$ n; {  s
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )! e; P' X1 i+ ^7 [8 O8 X3 m
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 z$ c5 d# a+ y5 x; d2 T" M& N& y8 H% I
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )# M% Y/ [( g5 W9 c. j! m
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* F- U; `. ?4 L0 Q) Q* L) x; S3 O) b1 o( h& [; I. y
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
/ T" K; r/ p" m1 J) r                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
  C& v9 a  i. G+ J% P9 D# V" {$ d
# b) ~) V( e' B/ B8 |3 L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & ?; L4 {, N: N  z: Z

/ v% t5 w' M: p& y9 M' D3 _% J1 H5 M9 b- d

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-19 01:46 , Processed in 0.058991 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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