飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16975|回复: 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
, g) r( G  I7 [6 }5 |; oI posted this because someone kinda posted a youtube thingy about it :O.& G2 R' t4 _+ J% t/ f" e
* b! a- J# M0 q7 u: D
Find this in DPSrv.cpp @ worldserver
. T3 i8 N9 }7 k. Z0 G; Y' \- S5 ~
Code:% K4 h# K; H1 K: E& Q  w6 P
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )% o* L( b8 u# v8 p% W
{
, t/ ~8 B. m7 p        DWORD nId;6 v  P; ]1 |0 L9 a% z) z! H
        int nPart;
9 ?+ {6 @5 a8 B) Y; p$ M
% j) m: |4 F, H" M0 L- M        ar >> nId;) k1 V3 M! g7 W- r8 B
        ar >> nPart;               
6 h* u0 t  ^4 |7 ^6 C       
7 K/ W( [' C! k$ R: V  M  b6 `8 \        if( nPart >= MAX_HUMAN_PARTS )        5 a& Y7 L3 F9 A0 y3 `
                return;
9 O7 H& Y3 X( j: p: R4 K3 B1 @  _1 L8 u) \. n
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, n# M' F  S8 b, z$ Z
% S% |# o' v2 R3 l  L0 @; Q: d, @4 m; @1 Z& O! p, X
Code:
0 K& R- }6 ]4 h  D: h, W6 h6 w" l#ifdef __QUGET_SWAP_FIX
3 g! a8 a4 F$ v. i5 m: q: y% n6 x9 d6 h) ]
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )5 m$ M* G% y. m  a
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());0 r. _; W# p) s/ l
" S9 f% V8 Z6 E, }6 T, c* o- ~
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )" r8 {+ q( a, }) l! e
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );! c+ C& K" Z5 B$ C, ^

- |' M+ G: g) E7 X, b( E( P# Y4 n                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )5 N# Y5 ?/ T; `) B/ {% T* X' e7 w
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  H: e6 H6 G7 k; E) Z  S2 W5 y3 O- n3 H4 @
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 S' t& W$ P4 A2 J9 y) E1 r2 M; `
and add under
! p; Y, M9 @8 X' u) z% u  V$ X; Q# L1 p  x9 m% H1 ^7 W! N
Code:; s) J/ O7 h, O9 m+ e( S. U) [$ U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' t7 @/ b0 K  j9 \. k# ?# m
                        {
# G# s1 @, T& U7 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 );
! n3 @& T$ x4 j' O! y                        }this
7 P' a. e) d$ r4 V* V: I7 \4 G( W% U' I; v; B5 k
Code:" a5 U2 H6 v7 I2 s
#ifdef __QUGET_SWAP_FIX  D6 K, C3 g. R5 p; O1 x# N
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )7 c9 L) l; O% K/ d
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 m! g( ^% Y2 T4 E6 @, D# V+ K2 m: A4 M
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )* W( N) _9 W* I# K0 X
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( @: a* a, e$ A

+ _# I/ [) n* i7 w1 v, Y1 w                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )8 F8 G2 _. i  ^/ ^3 u- L
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" E9 U* v' T# s, l( E- S

/ Q/ S. T5 u& q/ g5 X# T/ s) r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 j3 w" @& {. C& D1 F
5 q9 Y' D1 l' x8 x$ w# w+ h

! o* }) {$ J1 n9 c! y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-15 21:26 , Processed in 0.059342 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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