undzwar das Teleport System von Fantasy Core, da ich das Team verlassen habe.
Fangen wir an
DPClient.cpp
----------------------------------------------------------------------------------------------------
Suche:
PHP Code:
void CDPClient::SendSwapVis( int nPos1, int nPos2 )
{
BEFORESENDSOLE( ar, PACKETTYPE_VISPET_SWAPVIS, DPID_UNKNOWN );
ar << nPos1 << nPos2;
SEND( ar, this, DPID_SERVERPLAYER );
}
PHP Code:
void CDPClient::SendTeleportPosition( BYTE nID )
{
BEFORESENDSOLE( ar, PACKETTYPE_SENDTELEPORTPOSITION, DPID_UNKNOWN );
ar << nID;
SEND( ar, this, DPID_SERVERPLAYER );
}
DPClient.h
----------------------------------------------------------------------------------------------------
Suche:
PHP Code:
void SendGuildHouseTenderJoin( OBJID objGHId, int nTenderPerin, int nTenderPenya );
#endif // __GUILD_HOUSE_MIDDLE
PHP Code:
public:
void SendTeleportPosition( BYTE nID );
DPSrvr.cpp
----------------------------------------------------------------------------------------------------
Suche:
PHP Code:
#ifdef __QUIZ
ON_MSG( PACKETTYPE_QUIZ_ENTRANCE, OnQuizEventEntrance );
ON_MSG( PACKETTYPE_QUIZ_TELEPORT, OnQuizEventTeleport );
#endif // __QUIZ
PHP Code:
ON_MSG( PACKETTYPE_SENDTELEPORTPOSITION, OnSendTeleportPosition);
PHP Code:
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 Code:
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
----------------------------------------------------------------------------------------------------
Suche:
PHP Code:
void OnGuildHouseTenderJoin( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long );
#endif // __GUILD_HOUSE_MIDDLE
PHP Code:
public:
void OnSendTeleportPosition( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long );
WndField.cpp
----------------------------------------------------------------------------------------------------
Suche:
PHP Code:
#define MAX_GUILDCOMBAT_LIST_PER_PAGE 11
#define MAX_MAIL_LIST_PER_PAGE 6
#define MAX_GUILDCOMBAT_LIST 100
PHP Code:
//--------------- 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
-------------------------------------------------------------------------------------------------------
Suche:
PHP Code:
#ifdef __MAIL_REQUESTING_BOX
#include "WndMailRequestingBox.h"
#endif // __MAIL_REQUESTING_BOX
PHP Code:
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
-------------------------------------------------------------------------------------------------------
Suche:
PHP Code:
#define PACKETTYPE_QUERYMAILBOX_COUNT (DWORD)0x88100241
PHP Code:
#define PACKETTYPE_SENDTELEPORTPOSITION (DWORD)0x88100299
FuncApplet.cpp
-------------------------------------------------------------------------------------------------------
Suche:
PHP Code:
DECLAREAPPLET( AppMain_WndNavigator , new CWndNavigator );
PHP Code:
DECLAREAPPLET( AppMain_TeleportTool , new CWndTeleporter );
PHP Code:
AddAppletFunc( AppMain_WndTrade , APP_TRADE , _T( "WndTrade" ) , _T( "Icon_Trade.dds" ) , GETTEXT( TID_TIP_TRADE ), 0 );
PHP Code:
AddAppletFunc( AppMain_TeleportTool , APP_TELEPORTUSER , _T( "WndMotion" ) , _T( "Icon_Motion.dds" ) , GETTEXT( TID_TIP_MOTION ), 'Z' );//Hotkey Z
Ressourcen findet ihr im Anhang.
Screen:
Credits:
Monster (Coden)
Sekkusu (Hat mir verdammt viel geholfen & Tipps gegeben, danke)
Yannick (Für seinen sehr widerwilligen Fix xD)






