飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16281|回复: 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 0 Y; `7 _! p4 j% O
I posted this because someone kinda posted a youtube thingy about it :O." G( p& q" J% w- c0 N+ _" Z

- T* p& Y  ^! s. m% N, ]$ _% JFind this in DPSrv.cpp @ worldserver
0 S, ^/ C5 j& m8 H& M; [* D, R/ v: c4 g1 g
Code:
! Q* Y& A& V/ A4 H, {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) v( W0 m' d3 e2 U, o  ~
{
, y. E$ f% D' v7 ]        DWORD nId;
: f  W$ V2 P/ ]( |" }& k4 C" i( G        int nPart;1 H+ u  P, o  _( v! G: L
$ i- w5 }& F% J5 N) x; q
        ar >> nId;
& f) O  a4 g$ B' _        ar >> nPart;                5 x0 I: h) F4 g, S' E
       
7 v/ p& ^4 r% [/ v        if( nPart >= MAX_HUMAN_PARTS )       
* `% N/ o  W' G4 b                return;
8 l1 V/ c* ^' S' _8 T8 ]
" e# v- |$ }; L# N2 e        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& o% o; V* l4 ~) S2 m) ]) R- `
& z8 m2 w, Y5 L$ Q

5 F1 H% x# D2 h$ b, BCode:% V0 g8 [0 N& f3 @7 h$ U  Q
#ifdef __QUGET_SWAP_FIX' h* w, F2 ?. ]5 B3 n5 C( R. H

' w5 G' p5 R( |% x; p                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ x! b2 S) z/ p0 x
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());) K3 z+ [: m; u/ D' t8 p

, d3 t  \: J! N* M1 C' E" c* N                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )% K( g- ~8 O! A, ]" O
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 `( h2 Q0 v) y% z  d, {- D) q/ ^

' y- L2 {# l5 d- ~/ R                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
: Z  ?' N4 \* T8 Q                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. d4 ~' `$ q+ R- [( z& A( h. K. @( ~) U; Y" |
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- X+ n4 `9 \! Uand add under' v# w' n. r  ]+ o: {

: Z, y- L5 x$ lCode:& w9 Z; u( e9 o& n- s! ^" t
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), C% o8 Z8 E/ q
                        {
- h5 y9 H' E$ ]7 D                                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 );
% e2 N9 \8 B( u7 G' b8 w0 e                        }this
3 n* N+ A) R5 [) ~
8 x5 [3 O& n0 h) i. GCode:' y/ n7 a) O, t
#ifdef __QUGET_SWAP_FIX
1 X6 ~' N7 c: [8 K" U2 J                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
$ w1 A% R) D: Z% m7 Y# J                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ X* [$ _! M7 r% ]7 S! i6 K  Y) R5 k0 B+ t2 E! |; W
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ). \; j% H/ L$ u
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ Y# F6 T( @% Y6 k; ]
: }4 I6 e: S# Y
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% p% s: h+ D5 b$ _2 F1 n# H4 r
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ Z( v/ }) q# u) n2 |
6 C4 U( ]. P2 p" \+ `4 p8 g  A
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : E6 o9 ^7 ]/ S! ~6 _7 |

) j! J- o) f: U$ t( b* R" g
5 B$ Y; |- B; l) y# {+ T

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-2 11:43 , Processed in 0.064016 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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