游戏乐悠悠网游开发网

 找回密码
 立即注册
查看: 1427|回复: 1
打印 上一主题 下一主题

瞬移系统的修改方法

[复制链接]
  • TA的每日心情
    开心
    2011-11-24 11:37
  • 签到天数: 1 天

    [LV.1]初来乍到

    鲜花(3) 鸡蛋(0)
    跳转到指定楼层
    楼主
    发表于 2015-9-22 09:08:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    PHP代码:
    void CDPClient :: SendSwapVis ( int nPos1 , int nPos2 )
    {
    BEFORESENDSOLE ( ar , PACKETTYPE_VISPET_SWAPVIS , DPID_UNKNOWN );
    ar << nPos1 << nPos2 ;
    SEND ( ar , this , DPID_SERVERPLAYER );
    }
    下面添加:
    PHP代码:
    void CDPClient :: SendTeleportPosition ( BYTE nID )
    {
    BEFORESENDSOLE ( ar , PACKETTYPE_SENDTELEPORTPOSITION , DPID_UNKNOWN );
    ar << nID ;
    SEND ( ar , this , DPID_SERVERPLAYER );
    }
    -------------------------------------------------- --------------------------------------------------
    DPClient.h
    -------------------------------------------------- --------------------------------------------------
    搜索:
    PHP代码:
    void SendGuildHouseTenderJoin ( OBJID objGHId , int nTenderPerin , int nTenderPenya );
    #endif // __GUILD_HOUSE_MIDDLE
    下面添加:
    PHP代码:
    public:
    void SendTeleportPosition ( BYTE nID );
    -------------------------------------------------- --------------------------------------------------
    DPSrvr.cpp
    -------------------------------------------------- --------------------------------------------------
    搜索:
    PHP代码:
    #ifdef __QUIZ
    ON_MSG ( PACKETTYPE_QUIZ_ENTRANCE , OnQuizEventEntrance );
    ON_MSG ( PACKETTYPE_QUIZ_TELEPORT , OnQuizEventTeleport );
    #endif // __QUIZ
    下面添加:
    PHP代码:
    ON_MSG ( PACKETTYPE_SENDTELEPORTPOSITION , OnSendTeleportPosition );
    搜索:
    PHP代码:
    void CDPSrvr :: OnGuildHouseTenderJoin ( CAr & ar , DPID dpidCache , DPID dpidUser , LPBYTE , u_long )
    {
    CUser * pUser = g_UserMng . GetUser ( dpidCache , dpidUser );
    if( IsValidObj ( pUser ) == TRUE )
    {
    OBJID objGHId ;
    int nTenderPerin , nTenderPenya ;
    ar >> objGHId >> nTenderPerin >> nTenderPenya ;
    GuildHouseMng -> OnGuildHouseTenderJoin ( pUser , objGHId , nTenderPerin , nTenderPenya );
    }
    }
    #endif // __GUILD_HOUSE_MIDDLE
    下面添加:
    PHP代码:
    void CDPSrvr :: OnSendTeleportPosition ( CAr & ar , DPID dpidCache , DPID dpidUser , LPBYTE , u_long ) //Teleport Fenster Stuff
    {
    CUser * pUser = g_UserMng . GetUser ( dpidCache , dpidUser );
    if( IsValidObj ( pUser ) )
    {
    BYTE nID ;
    D3DXVECTOR3 vPos ;
    int dwWorldID ;
    ar >> nID ;
    switch( nID )
    {
    case 1 :
    vPos = D3DXVECTOR3 ( 6973.0F , 100.0F , 3328.0F ); dwWorldID = 1 ;
    break;
    case 2 :
    vPos = D3DXVECTOR3 ( 8321.0F , 100.0F , 3720.0F ); dwWorldID = 1 ;
    break;
    case 3 :
    vPos = D3DXVECTOR3 ( 3900.250732F , 59.0F , 4377.806641F ); dwWorldID = 1 ;
    break;
    case 4 :
    vPos = D3DXVECTOR3 ( 5574.530273F , 75.001129F , 3900.282227F ); dwWorldID = 1 ;
    break;
    case 5 :
    vPos = D3DXVECTOR3 ( 3240.482910F , 11.316653F , 3409.634766F ); dwWorldID = 1 ;
    break;
    case 6 :
    vPos = D3DXVECTOR3 ( 881.142883F , 183.273331F , 1008.118652F ); dwWorldID = 206 ;
    break;
    case 7 :
    vPos = D3DXVECTOR3 ( 8268.617F , 70.0F , 9378.295F ); dwWorldID = 1 ;
    break;
    case 8 :
    vPos = D3DXVECTOR3 ( 6785.000000F , 100.699989F , 6062.000000F ); dwWorldID = 1 ;
    break;
    case 9 :
    vPos = D3DXVECTOR3 ( 6642.931152F , 58.000000F , 6454.676758F ); dwWorldID = 1 ;
    break;
    case 10 :
    vPos = D3DXVECTOR3 ( 4908.647F , 100.000F , 3457.677F ); dwWorldID = 1 ;
    break;
    case 11 :
    vPos = D3DXVECTOR3 ( 5267.235F , 100.000F , 4719.388F ); dwWorldID = 1 ;
    break;
    case 12 :
    vPos = D3DXVECTOR3 ( 7213.436F , 107.523F , 3666.329F ); dwWorldID = 1 ;
    break;
    default: return FALSE ;
    }
    pUser -> REPLACE ( g_uIdofMulti , dwWorldID , vPos , REPLACE_NORMAL , nDefaultLayer );
    }
    }
    -------------------------------------------------- --------------------------------------------------
    DPSrvr.h
    -------------------------------------------------- --------------------------------------------------
    搜索:
    PHP代码:
    void OnGuildHouseTenderJoin ( CAr & ar , DPID dpidCache , DPID dpidUser , LPBYTE , u_long );
    #endif // __GUILD_HOUSE_MIDDLE
    下面添加:
    PHP代码:
    public:
    void OnSendTeleportPosition ( CAr & ar , DPID dpidCache , DPID dpidUser , LPBYTE , u_long );
    -------------------------------------------------- --------------------------------------------------
    WndField.cpp
    -------------------------------------------------- --------------------------------------------------
    搜索:
    PHP代码:
    #define MAX_GUILDCOMBAT_LIST_PER_PAGE 11
    #define MAX_MAIL_LIST_PER_PAGE 6
    #define MAX_GUILDCOMBAT_LIST 100
    下面添加:
    PHP代码:
    //--------------- Teleport ----------------------------------
    //-----------------------------------------------------------------------------
    CWndTeleporter :: CWndTeleporter ( void )
    {
    }
    //-----------------------------------------------------------------------------
    CWndTeleporter ::~ CWndTeleporter ( void )
    {
    DeleteDeviceObjects ();
    }
    //-----------------------------------------------------------------------------
    BOOL CWndTeleporter :: Initialize ( CWndBase * pWndParent , DWORD dwType )
    {
    return CWndNeuz :: InitDialog ( g_Neuz . GetSafeHwnd (), APP_TELEPORTUSER , 0 , CPoint ( 0 , 0 ), pWndParent );
    }
    //-----------------------------------------------------------------------------
    BOOL CWndTeleporter :: OnCommand ( UINT nID , DWORD dwMessage , CWndBase * pWndBase )
    {
    return CWndNeuz :: OnCommand ( nID , dwMessage , pWndBase );
    }
    void CWndTeleporter :: OnSize ( UINT nType , int cx , int cy )
    {
    CWndNeuz :: OnSize ( nType , cx , cy );
    }
    void CWndTeleporter :: OnLButtonUp ( UINT nFlags , CPoint point )
    {
    }
    void CWndTeleporter :: OnLButtonDown ( UINT nFlags , CPoint point )
    {
    }
    void CWndTeleporter :: OnDraw ( C2DRender * p2DRender )
    {
    }
    HRESULT CWndTeleporter :: RestoreDeviceObjects ()
    {
    CWndNeuz :: RestoreDeviceObjects ();
    return S_OK ;
    }
    HRESULT CWndTeleporter :: InvalidateDeviceObjects ()
    {
    CWndNeuz :: InvalidateDeviceObjects ();
    return S_OK ;
    }
    HRESULT CWndTeleporter :: DeleteDeviceObjects ()
    {
    CWndNeuz :: DeleteDeviceObjects ();
    InvalidateDeviceObjects ();
    return S_OK ;
    }
    void CWndTeleporter :: OnInitialUpdate ( void )
    {
    CWndNeuz :: OnInitialUpdate ();
    RestoreDeviceObjects ();
    CRect rectRoot = m_pWndRoot -> GetLayoutRect ();
    CRect rectWindow = GetWindowRect ();
    CPoint point ( rectRoot . right - rectWindow . Width (), 110 );
    Move ( point );
    MoveParentCenter ();
    }
    BOOL CWndTeleporter :: OnChildNotify ( UINT message , UINT nID , LRESULT * pLResult )
    {
    switch ( nID )
    {
    case WIDC_BUTTON_FLARIS1 : // Flaris
    {
    g_DPlay . SendTeleportPosition ( 1 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_SM1 : // Saint Morning
    {
    g_DPlay . SendTeleportPosition ( 2 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_DARKON1 : // Darkon
    {
    g_DPlay . SendTeleportPosition ( 3 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_DARKON11 : // Darkon1
    {
    g_DPlay . SendTeleportPosition ( 4 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_DARKON3 : // Darkon3
    {
    g_DPlay . SendTeleportPosition ( 5 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_VULCANO1 : // VOLCANO
    {
    g_DPlay . SendTeleportPosition ( 6 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_PVP1 : // Vorm Behemoth Dungeon
    {
    g_DPlay . SendTeleportPosition ( 7 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_HERODUNGEON : // Aminus Hero
    {
    g_DPlay . SendTeleportPosition ( 8 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_MASTERDUNGEON : // Aminus Master
    {
    g_DPlay . SendTeleportPosition ( 9 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_TRAMNUKM : // Tramnuk Master
    {
    g_DPlay . SendTeleportPosition ( 10 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_TRAMNUK : // Tramnuk Normal
    {
    g_DPlay . SendTeleportPosition ( 11 );
    Destroy ();
    break;
    }
    case WIDC_BUTTON_EVENT : // Event Area
    {
    g_DPlay . SendTeleportPosition ( 12 );
    Destroy ();
    break;
    }
    }
    return CWndNeuz :: OnChildNotify ( message , nID , pLResult );
    }
    //---------------- Teleport --------------------
    WndField.h
    搜索:
    PHP代码:
    #ifdef __MAIL_REQUESTING_BOX
    #include "WndMailRequestingBox.h"
    #endif // __MAIL_REQUESTING_BOX
    下面添加:
    PHP代码:
    class CWndTeleporter : public CWndNeuz
    {
    public:
    CWndTeleporter ( void );
    ~ CWndTeleporter ( void );
    virtual HRESULT RestoreDeviceObjects ();
    virtual HRESULT InvalidateDeviceObjects ();
    virtual HRESULT DeleteDeviceObjects ();
    public:
    virtual BOOL Initialize ( CWndBase * pWndParent = NULL , DWORD nType = MB_OK );
    virtual BOOL OnChildNotify ( UINT message , UINT nID , LRESULT * pLResult );
    virtual void OnDraw ( C2DRender * p2DRender );
    virtual void OnInitialUpdate ();
    virtual BOOL OnCommand ( UINT nID , DWORD dwMessage , CWndBase * pWndBase );
    virtual void OnSize ( UINT nType , int cx , int cy );
    virtual void OnLButtonUp ( UINT nFlags , CPoint point );
    virtual void OnLButtonDown ( UINT nFlags , CPoint point );
    };
    MsgHdr.h
    搜索:
    PHP代码:
    #define PACKETTYPE_QUERYMAILBOX_COUNT (DWORD)0x88100241
    下面添加:
    PHP代码:
    #define PACKETTYPE_SENDTELEPORTPOSITION (DWORD)0x88100299
    FuncApplet.cpp
    搜索:
    PHP代码:
    DECLAREAPPLET ( AppMain_WndNavigator , new CWndNavigator );
    下面添加:
    PHP代码:
    DECLAREAPPLET ( AppMain_TeleportTool , new CWndTeleporter );
    搜索:
    PHP代码:
    AddAppletFunc ( AppMain_WndTrade , APP_TRADE , _T ( "WndTrade" ) , _T ( "Icon_Trade.dds" ) , GETTEXT ( TID_TIP_TRADE ), 0 );
    下面添加:
    PHP代码:
    AddAppletFunc ( AppMain_TeleportTool , APP_TELEPORTUSER , _T ( "WndMotion" ) , _T ( "Icon_Motion.dds" ) , GETTEXT ( TID_TIP_MOTION ), 'Z' ); //Hotkey Z
  • TA的每日心情

    2024-11-5 09:48
  • 签到天数: 253 天

    [LV.8]以坛为家I

    鲜花(0) 鸡蛋(0)
    沙发
    发表于 2018-12-22 23:57:33 | 只看该作者
           
    顶一个,支持
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    小黑屋|手机版|Archiver|Online Game Xingbarking Dev Team  

    GMT+8, 2024-12-22 00:23 , Processed in 0.132642 second(s), 36 queries .

    Powered by Discuz! X3.2 Licensed

    © 2001-2013 Comsenz Inc.

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