飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17062|回复: 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 ! t* m5 u+ f! a5 Y9 Z. h; w7 ^
I posted this because someone kinda posted a youtube thingy about it :O.  L" ]! m! U& Z4 o5 i# X
# i$ s$ E( V  H- \
Find this in DPSrv.cpp @ worldserver
. U2 Q3 M7 V: [$ w4 x3 m& X
' J3 R# ~- x# bCode:; ?- c, r3 C* k9 x6 d$ {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- p  V9 m# r& n1 q{% d/ e& Q) P6 U) W) `7 B3 q
        DWORD nId;
; q( z5 P0 q) r0 Z7 H. m5 ~8 L        int nPart;
3 Z8 ^, H! k! I# R: n4 f
# t6 T9 o9 G0 P( Q        ar >> nId;
% o, }7 Y  q7 y0 _        ar >> nPart;                0 M% O/ ^+ t; k& {2 ~) `6 @
       
0 V2 ~4 D* P' I3 [7 N! \! u2 L        if( nPart >= MAX_HUMAN_PARTS )       
$ W% H/ f& @- r                return;! s' E! \; V' L. t, X

  ?# M! _1 k6 }  ]# e( f" B        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, [9 k4 T6 Y' }8 s; \
$ o$ v7 W% M3 K- H. ]9 m2 l6 y! N; {* q% c
Code:4 {0 p  _- N& q+ ?8 y# d
#ifdef __QUGET_SWAP_FIX
3 c# X$ V( f# o7 W' R! {/ A
# I5 D8 \7 x% r                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ i: W& m& ~! ^' a
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
5 _; M# O& O' _  k/ z6 ^0 r% B% j2 l- W3 f6 i
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )* l4 u- _& \/ h
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- f  {% A$ J, |# `( S/ ?8 {) m" y6 ?  j
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
# m1 h7 o2 v6 U6 W                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
4 @4 x3 z, @6 e/ r% b5 e) P  O% n
' N. S$ H7 y! e9 ^6 V' n" [9 N#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! B* }5 A9 T9 l$ T% P
and add under' H% j2 b8 h. o0 P1 r2 a, @

. J' T1 j1 |/ g( H; ]% S9 VCode:
) m; V: y* ^5 k1 d5 A4 ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: [$ e2 U! R9 G5 O5 q3 t4 F                        {
# ^( x) |9 H0 Y' ^1 D4 a                                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 );9 g# Y: s- _: w; L* I. x& S! \* h
                        }this
# \6 o& X: T- S
5 Y% `" s' B5 T& Q$ nCode:
5 b! b( O7 u4 z, |! a# P#ifdef __QUGET_SWAP_FIX# v7 c( \: Q4 _( m
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
% Q* j) ^9 f7 `; u: s                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 D6 J2 I7 s, q1 ]1 v
( X3 u3 K+ y5 H7 o8 f8 M                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
- _2 c% j$ a' L                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- M5 @& v" g2 \: w
: [7 R; O- m- @' A1 K" w                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
% q5 G9 C$ u- Y/ y. l/ C                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 c) F& D6 G3 ]* V* g
0 {: r  i& V2 t- k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( s+ k+ b8 Z6 K2 P! f# e4 ?
: W- A- F+ q% x2 o* e4 \
. P5 \) A' E6 ^

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-20 06:04 , Processed in 0.061469 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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