飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16285|回复: 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
, u/ u% f, F$ B2 }$ h1 ?I posted this because someone kinda posted a youtube thingy about it :O., B: w" J  y+ _. y9 j9 \
/ B2 O8 V& r+ s
Find this in DPSrv.cpp @ worldserver, d& R4 }0 `9 K

4 R8 S% x2 Y: u  Q9 i% Y" p, xCode:, i3 T, _, s. a% K+ W
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 G. p; s$ ~- u
{
6 s4 }7 U  W7 _9 j, M        DWORD nId;
) ]8 t" n) V9 ?& v- ^        int nPart;, f7 G3 e9 H2 i5 k9 n! ?/ u

. ?6 U" m$ b! U( J& V1 h- d, O- P: z        ar >> nId;
& a# _9 E9 {  G0 |6 H4 z! f8 ?        ar >> nPart;                + V3 `6 O. d3 [/ K. I
        6 t' a: j4 U7 s7 }
        if( nPart >= MAX_HUMAN_PARTS )        ; `, t! x# T' {5 ]+ M* i9 Z
                return;) B- E' }! z3 i  v# Y0 A, a
' n* N" @( v) L: A& N
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( e" b- _3 W6 n. S4 R: o' ?8 }5 m3 m3 Y+ b1 S9 Z% y( M/ }

2 Y2 Z% |: t, Q# P& S& @Code:
, x/ `8 ^3 j+ X# A$ Q8 E#ifdef __QUGET_SWAP_FIX
% h- [* w& Q$ }5 a. `/ c
, f- m/ B( e/ g: r! O( ^                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). k+ \# |1 c  y9 y* M) b( e
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());* \) u7 t* U( |' D6 W( p  U
+ q  b" b, |, z" o  l, w4 `
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 G4 Y2 k! {- Z% r" t                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 ^$ u; d) q' j, |3 |7 S7 D! H: E
8 [; S9 }2 t, L+ [, _& S
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )4 Y# u5 n; B) a. }' K' o
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) a/ T9 M9 _0 w" {- B
3 @, c' a+ b! I) K3 e9 V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  S5 D* D! T0 e) i" p/ O
and add under
- w0 ^- P" Y3 _8 w/ @. E6 r- m( T/ x8 M+ Q* m
Code:( _* ~% g5 T# \9 F! v6 Q: c9 c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' e5 X5 R! m' p+ Y# s1 ?) S% C                        {
8 q) S" p. a: s4 W                                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 );
& `8 j1 P, p. z$ B: g- U8 P                        }this  t; D) t; Y* }( e3 X

& M) m/ D3 ?: A1 DCode:
( V- ]7 h- Z3 @$ w2 A) y$ w! ^* A#ifdef __QUGET_SWAP_FIX. V) Z) n% M& B# G
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
8 k0 ^# I( F4 Q% b8 @4 R  E                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
  l$ C, M) k- T( f$ y9 }1 d# @! y4 s: u
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
  J+ Y; y5 I9 l  r& F; Q                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ h9 }$ F" r( G8 w' {" k
- l. q: D/ ~( `+ O
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )' @" k9 o# v5 f1 V+ J
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 J% r' R, X! }+ h) }: ~! M/ J( i; _- I: b; r
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver , O: Y/ H# X! K1 d5 B
* r8 q; u6 z8 t( o! |8 k

& Q7 H# Y+ Q7 O1 M& i8 ^. h

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-2 16:40 , Processed in 0.062842 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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