飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1064

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1064
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
3 q% o9 d8 |6 q5 zI posted this because someone kinda posted a youtube thingy about it :O.+ \% A: H! C" [1 B! g2 [

. j. N: Z6 {3 A$ @! WFind this in DPSrv.cpp @ worldserver
" m1 ?# k- j9 y( b! Z
8 R' O6 A1 l1 s$ oCode:
/ ?0 @$ u" d2 ^6 X/ wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 Z. y% l" y. U  [* Q, g, Y
{
) [/ s# Z# f. N4 F+ r5 h        DWORD nId;9 ~4 d3 t9 H$ I3 `
        int nPart;8 `  N* Z+ k: b& N1 ?) d
4 P+ a) |' }, q! K
        ar >> nId;% X: X/ _' H  |& L6 a! f( |
        ar >> nPart;               
8 H2 P/ Y2 `2 B& e       
- c$ s& {' i2 y" U8 y        if( nPart >= MAX_HUMAN_PARTS )          D3 W) l- q. e! X
                return;
( i0 D/ a. P, l
3 A4 a! @( P9 M* w, L        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. Z' }* F4 g- I0 {/ m

* K. q* e3 F( ?
6 C. q' X: m% D1 M/ ~Code:
" @0 E3 v: V' L2 e) G8 d9 @# v#ifdef __QUGET_SWAP_FIX
% R: ~+ e- [7 e% G' ?0 L6 o3 I+ u, ^: P, g" X' l
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )0 |- D* v1 r; b5 }. X0 V
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ @6 f4 O" a9 H) F1 E8 l( K6 I+ _2 a; `
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
  R7 @, y2 f+ a' o5 z                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" F1 Q" M8 `; S
' J  M) r8 S  D' N) h$ C                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
; x8 ^- y$ G' ~6 ]6 D                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; n, d* f3 B' V, v1 h% h9 ^
+ J+ L" u+ a* Z6 {. i) R
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) \2 t! B! q1 m; U
and add under
3 P" f; o  c. c
+ |) `# C' u1 Y0 E4 kCode:& _, a+ x% N) b6 i& K
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* ^7 I8 V5 x4 n5 f" y" X; D3 U                        {7 v& J8 P9 p4 X" p
                                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 );
& n1 m) u& i" ~  m" f" G1 @                        }this* q4 A/ V$ }. g5 ?  o* {

# d9 k) ~1 g9 SCode:. U. o8 q4 q% F
#ifdef __QUGET_SWAP_FIX
1 T4 B) z0 l& P8 c4 m' C                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 b2 F  t% B# g  g3 ~                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());" V/ s7 Y/ \' h4 u

6 B3 L+ m2 A; @6 l" ~                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# F# \8 q# ]7 Y! Q                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 c  R! [- k5 ^- X! ~) t4 p- J1 f* m# ^5 ]1 n5 ?
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )- R. Y2 N. B5 a( R: `' i2 {
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 G# P2 i3 Q+ R7 U
% m9 D- M8 B1 d5 i# k0 Z. n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! X9 c4 z6 P9 m* G7 d: D" d
0 {) E" Z8 q+ S1 Y& H

0 R! D1 c9 V. m6 y3 W) l

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-17 02:41 , Processed in 0.059915 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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