Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild: Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil) Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters - Decal.Core, DecalControls, DecalRender, D3DService Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL Phase 4: DenAgent WinForms tray application Phase 5: WiX installer and build script 25 C# projects building with 0 errors. Native C++ projects require VS 2022 + Windows SDK (x86). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
d1442e3747
1382 changed files with 170725 additions and 0 deletions
83
Native/DecalFilters/AllegianceInfo.cpp
Normal file
83
Native/DecalFilters/AllegianceInfo.cpp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "AllegianceInfo.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Name(BSTR *pVal)
|
||||
{
|
||||
*pVal = T2BSTR( m_pAllegiance->Name );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_GUID(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->GUID;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_TreeParent(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->TreeParent;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Type(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Type;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_XP(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->XP;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Loyalty(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Loyalty;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Leadership(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Leadership;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Gender(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Gender;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Race(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Race;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Rank(long *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Rank;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAllegianceInfo::get_Unknown(double *pVal)
|
||||
{
|
||||
*pVal = m_pAllegiance->Unknown;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
55
Native/DecalFilters/AllegianceInfo.h
Normal file
55
Native/DecalFilters/AllegianceInfo.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// AllegianceInfo.h: Definition of the AllegianceInfo class
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_ALLEGIANCEINFO_H__5CFBBCEE_BF69_4C0A_984D_6694471DD508__INCLUDED_)
|
||||
#define AFX_ALLEGIANCEINFO_H__5CFBBCEE_BF69_4C0A_984D_6694471DD508__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
#include "CharacterStats.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// AllegianceInfo
|
||||
|
||||
class cAllegianceInfo :
|
||||
public IDispatchImpl<IAllegianceInfo, &IID_IAllegianceInfo, &LIBID_DecalFilters>,
|
||||
public CComObjectRoot,
|
||||
public CComCoClass<cAllegianceInfo,&CLSID_AllegianceInfo>
|
||||
{
|
||||
public:
|
||||
|
||||
cAllegianceInfo()
|
||||
{
|
||||
m_pAllegiance = &m_pAlleg;
|
||||
}
|
||||
|
||||
cCharacterStats::cAllegianceInfo m_pAlleg;
|
||||
cCharacterStats::cAllegianceInfo *m_pAllegiance;
|
||||
|
||||
BEGIN_COM_MAP(cAllegianceInfo)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY(IAllegianceInfo)
|
||||
END_COM_MAP()
|
||||
|
||||
//DECLARE_REGISTRY_RESOURCEID(IDR_AllegianceInfo)
|
||||
|
||||
// IAllegianceInfo
|
||||
public:
|
||||
STDMETHOD(get_Unknown)(/*[out, retval]*/ double *pVal);
|
||||
STDMETHOD(get_Rank)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Race)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Gender)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Leadership)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Loyalty)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_XP)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Type)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_TreeParent)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_GUID)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_ALLEGIANCEINFO_H__5CFBBCEE_BF69_4C0A_984D_6694471DD508__INCLUDED_)
|
||||
23
Native/DecalFilters/AllegianceInfo.rgs
Normal file
23
Native/DecalFilters/AllegianceInfo.rgs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.AllegianceInfo.1 = s 'AllegianceInfo Class'
|
||||
{
|
||||
CLSID = s '{B2EB5B5A-5E3F-4F60-8BC0-BB729FFC04F6}'
|
||||
}
|
||||
DecalFilters.AllegianceInfo = s 'AllegianceInfo Class'
|
||||
{
|
||||
CLSID = s '{B2EB5B5A-5E3F-4F60-8BC0-BB729FFC04F6}'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {B2EB5B5A-5E3F-4F60-8BC0-BB729FFC04F6} = s 'AllegianceInfo Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.AllegianceInfo.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.AllegianceInfo'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'both'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Native/DecalFilters/Attic/Location.cpp
Normal file
36
Native/DecalFilters/Attic/Location.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// Location.cpp : Implementation of cLocation
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "Location.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cLocation
|
||||
|
||||
|
||||
STDMETHODIMP cLocation::get_Landblock(long *pVal)
|
||||
{
|
||||
if (pVal == NULL) {
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_dwLandblock;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cLocation::Offset(float *x, float *y, float *z)
|
||||
{
|
||||
*x = m_fxOffset;
|
||||
*y = m_fyOffset;
|
||||
*z = m_fzOffset;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cLocation::Heading(float *x, float *y, float *z, float *w)
|
||||
{
|
||||
*x = m_fxHeading;
|
||||
*y = m_fyHeading;
|
||||
*z = m_fzHeading;
|
||||
*w = m_fwHeading;
|
||||
return S_OK;
|
||||
}
|
||||
56
Native/DecalFilters/Attic/Location.h
Normal file
56
Native/DecalFilters/Attic/Location.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
// Location.h : Declaration of the cLocation
|
||||
|
||||
#ifndef __LOCATION_H_
|
||||
#define __LOCATION_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cLocation
|
||||
class ATL_NO_VTABLE cLocation :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<cLocation, &CLSID_Location>,
|
||||
public IDispatchImpl<ILocation, &IID_ILocation, &LIBID_DecalFilters>
|
||||
{
|
||||
public:
|
||||
cLocation()
|
||||
{
|
||||
m_dwLandblock = 0;
|
||||
|
||||
m_fxOffset = 0.0f;
|
||||
m_fyOffset = 0.0f;
|
||||
m_fzOffset = 0.0f;
|
||||
|
||||
m_fxHeading = 0.0f;
|
||||
m_fyHeading = 0.0f;
|
||||
m_fzHeading = 0.0f;
|
||||
m_fwHeading = 0.0f;
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_LOCATION)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cLocation)
|
||||
COM_INTERFACE_ENTRY(ILocation)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
// ILocation
|
||||
public:
|
||||
STDMETHOD(Heading)(float *x, float *y, float *z, float *w);
|
||||
STDMETHOD(Offset)(float *x, float *y, float *z);
|
||||
STDMETHOD(get_Landblock)(/*[out, retval]*/ long *pVal);
|
||||
long m_dwLandblock;
|
||||
|
||||
float m_fxOffset;
|
||||
float m_fyOffset;
|
||||
float m_fzOffset;
|
||||
|
||||
float m_fxHeading;
|
||||
float m_fyHeading;
|
||||
float m_fzHeading;
|
||||
float m_fwHeading;
|
||||
};
|
||||
|
||||
#endif //__LOCATION_H_
|
||||
26
Native/DecalFilters/Attic/Location.rgs
Normal file
26
Native/DecalFilters/Attic/Location.rgs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.Location.1 = s 'Location Class'
|
||||
{
|
||||
CLSID = s '{4031CDC0-FC4F-428F-B98A-ACAFA6CF19FB}'
|
||||
}
|
||||
DecalFilters.Location = s 'Location Class'
|
||||
{
|
||||
CLSID = s '{4031CDC0-FC4F-428F-B98A-ACAFA6CF19FB}'
|
||||
CurVer = s 'DecalFilters.Location.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {4031CDC0-FC4F-428F-B98A-ACAFA6CF19FB} = s 'Location Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.Location.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.Location'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Native/DecalFilters/Attic/Stackable.cpp
Normal file
8
Native/DecalFilters/Attic/Stackable.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Stackable.cpp : Implementation of cStackable
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "Stackable.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cStackable
|
||||
|
||||
33
Native/DecalFilters/Attic/Stackable.h
Normal file
33
Native/DecalFilters/Attic/Stackable.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// Stackable.h : Declaration of the cStackable
|
||||
|
||||
#ifndef __STACKABLE_H_
|
||||
#define __STACKABLE_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cStackable
|
||||
class ATL_NO_VTABLE cStackable :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<cStackable, &CLSID_Stackable>,
|
||||
public IDispatchImpl<IStackable, &IID_IStackable, &LIBID_DecalFilters>
|
||||
{
|
||||
public:
|
||||
cStackable()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_STACKABLE)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cStackable)
|
||||
COM_INTERFACE_ENTRY(IStackable)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
// IStackable
|
||||
public:
|
||||
};
|
||||
|
||||
#endif //__STACKABLE_H_
|
||||
26
Native/DecalFilters/Attic/Stackable.rgs
Normal file
26
Native/DecalFilters/Attic/Stackable.rgs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.Stackable.1 = s 'Stackable Class'
|
||||
{
|
||||
CLSID = s '{414EF2D6-E74F-4998-A2C7-26517162744E}'
|
||||
}
|
||||
DecalFilters.Stackable = s 'Stackable Class'
|
||||
{
|
||||
CLSID = s '{414EF2D6-E74F-4998-A2C7-26517162744E}'
|
||||
CurVer = s 'DecalFilters.Stackable.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {414EF2D6-E74F-4998-A2C7-26517162744E} = s 'Stackable Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.Stackable.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.Stackable'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Native/DecalFilters/AttributeInfo.cpp
Normal file
61
Native/DecalFilters/AttributeInfo.cpp
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
// AttributeInfo.cpp : Implementation of cAttributeInfo
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "AttributeInfo.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cAttributeInfo
|
||||
|
||||
STDMETHODIMP cAttributeInfo::get_Name(BSTR *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
USES_CONVERSION;
|
||||
|
||||
*pVal = T2BSTR( m_pInfo->m_szName.c_str() );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAttributeInfo::get_Creation(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pInfo->m_nBase;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAttributeInfo::get_Exp(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pInfo->m_nExp;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cAttributeInfo::get_Current(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pInfo->m_nCurrent;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
40
Native/DecalFilters/AttributeInfo.h
Normal file
40
Native/DecalFilters/AttributeInfo.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
// AttributeInfo.h : Declaration of the cAttributeInfo
|
||||
|
||||
#ifndef __ATTRIBUTEINFO_H_
|
||||
#define __ATTRIBUTEINFO_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
#include "CharacterStats.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cAttributeInfo
|
||||
class ATL_NO_VTABLE cAttributeInfo :
|
||||
public CComObjectRootEx<CComMultiThreadModel>,
|
||||
public CComCoClass<cAttributeInfo, &CLSID_AttributeInfo>,
|
||||
public IDispatchImpl<IAttributeInfo, &IID_IAttributeInfo, &LIBID_DecalFilters>
|
||||
{
|
||||
public:
|
||||
cAttributeInfo()
|
||||
{
|
||||
m_pInfo = &m_pAttribInfo;
|
||||
}
|
||||
|
||||
cCharacterStats::cAttributeInfo m_pAttribInfo;
|
||||
cCharacterStats::cAttributeInfo *m_pInfo;
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cAttributeInfo)
|
||||
COM_INTERFACE_ENTRY(IAttributeInfo)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
// IAttributeInfo
|
||||
public:
|
||||
STDMETHOD(get_Current)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Exp)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Creation)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
|
||||
};
|
||||
|
||||
#endif //__ATTRIBUTEINFO_H_
|
||||
1849
Native/DecalFilters/CharacterStats.cpp
Normal file
1849
Native/DecalFilters/CharacterStats.cpp
Normal file
File diff suppressed because it is too large
Load diff
629
Native/DecalFilters/CharacterStats.h
Normal file
629
Native/DecalFilters/CharacterStats.h
Normal file
|
|
@ -0,0 +1,629 @@
|
|||
// CharacterStats.h : Declaration of the cCharacterStats
|
||||
|
||||
#ifndef __CHARACTERSTATS_H_
|
||||
#define __CHARACTERSTATS_H_
|
||||
|
||||
#include "DecalNetImpl.h"
|
||||
#include "resource.h" // main symbols
|
||||
#include "DecalFiltersCP.h"
|
||||
|
||||
#include "DecalDat.h" // NEED THIS FOR THE PORTAL DATSTREAM!
|
||||
#include <time.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cCharacterStats
|
||||
//! cCharacterStats is the filter class used to monitor network traffic relating to your character's stats.
|
||||
/*!
|
||||
The Character Stats filter is a handy way of getting hold of many of your character's stats. It functions
|
||||
by monitoring all the network traffic relating to your character's stats, vitae, etc. It is still the definitive
|
||||
source of stat information in Decal, but if you are looking for something simple (like just one stat) you might
|
||||
want to look at ACHooks first; ACHooks now has some hooks that replace the functionality of this filter for
|
||||
Attributes/Vitals/Skills more reliably.
|
||||
*/
|
||||
class ATL_NO_VTABLE cCharacterStats :
|
||||
public CComObjectRootEx<CComMultiThreadModel>,
|
||||
public CComCoClass<cCharacterStats, &CLSID_CharacterStats>,
|
||||
public IConnectionPointContainerImpl<cCharacterStats>,
|
||||
public IDispatchImpl<ICharacterStats, &IID_ICharacterStats, &LIBID_DecalFilters>,
|
||||
public INetworkFilter2,
|
||||
public CProxyICharacterStatsEvents< cCharacterStats >
|
||||
{
|
||||
public:
|
||||
cCharacterStats()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_CHARACTERSTATS)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cCharacterStats)
|
||||
COM_INTERFACE_ENTRY(INetworkFilter2)
|
||||
COM_INTERFACE_ENTRY(ICharacterStats)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
|
||||
END_COM_MAP()
|
||||
|
||||
BEGIN_CONNECTION_POINT_MAP(cCharacterStats)
|
||||
CONNECTION_POINT_ENTRY(DIID_ICharacterStatsEvents)
|
||||
END_CONNECTION_POINT_MAP()
|
||||
|
||||
public:
|
||||
|
||||
//! The Location_t structure is used by the Character Stats filter for storing information about your character's location.
|
||||
struct Location_t
|
||||
{
|
||||
//! Turbine-assigned landblock number (like using /loc).
|
||||
DWORD landblock;
|
||||
//! Coordinate offset to landblock base coordinates.
|
||||
float x,y,z;
|
||||
//! Component of the location quaternion.
|
||||
float a,b,c,w;
|
||||
};
|
||||
|
||||
//! The cEnchantment structure is used by the Character Stats filter for storing information about an enchantment.
|
||||
struct cEnchantment
|
||||
{
|
||||
//! The SpellID, unique to each spell. Can be found in Turbine's portal.dat.
|
||||
int iSpellID;
|
||||
//! The spell's layer. That is, a spell that "surpasses" another spell has a higher layer, so the highest layer is the "active" spell.
|
||||
int iLayer;
|
||||
//! A standard C++ time_t object representing the time at which this spell expires.
|
||||
time_t ExpireTime;
|
||||
//! Stored value representing what this spell affects (what skill/attribute/etc).
|
||||
DWORD dwAffected;
|
||||
//! Stored value obtained from the protocol. I forget what it represents.
|
||||
DWORD dwAffectMask;
|
||||
//! Stored value representing what "family" or grouping of spells this spell belongs to. Families may be found in the portal.dat.
|
||||
DWORD dwFamily;
|
||||
//! The actual adjustment that is the result of the spell. For instance, the value for Creature Enchantment Mastery VI would be 35.
|
||||
float fAdjustment;
|
||||
|
||||
cEnchantment()
|
||||
{
|
||||
}
|
||||
|
||||
cEnchantment( cEnchantment &right )
|
||||
{
|
||||
iSpellID = right.iSpellID;
|
||||
iLayer = right.iLayer;
|
||||
ExpireTime = right.ExpireTime;
|
||||
dwAffected = right.dwAffected;
|
||||
dwAffectMask = right.dwAffectMask;
|
||||
dwFamily = right.dwFamily;
|
||||
fAdjustment = right.fAdjustment;
|
||||
}
|
||||
|
||||
cEnchantment& operator= ( cEnchantment& right )
|
||||
{
|
||||
if( this != &right )
|
||||
{
|
||||
iSpellID = right.iSpellID;
|
||||
iLayer = right.iLayer;
|
||||
ExpireTime = right.ExpireTime;
|
||||
dwAffected = right.dwAffected;
|
||||
dwAffectMask = right.dwAffectMask;
|
||||
dwFamily = right.dwFamily;
|
||||
fAdjustment = right.fAdjustment;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
//! The cSkillInfo structure is generated for each skill your character has to store information on that skill.
|
||||
struct cSkillInfo
|
||||
{
|
||||
//! The skill's "friendly" name (i.e. - "War Magic")
|
||||
std::string m_szName;
|
||||
//! The index number of the first attribute that this skill is derived from.
|
||||
long m_nAttribute1;
|
||||
//! The index number of the second attribute that this skill is derived from.
|
||||
long m_nAttribute2;
|
||||
//! The divisor for the skill. For example, War Magic is Focus + Self / 4, so the denominator is 4.
|
||||
long m_nDenominator;
|
||||
//! The skill's offset from the "formula base." Think of this as the number of times you incremented the skill directly.
|
||||
long m_nOffset;
|
||||
//! The amount of experience put into this skill directly.
|
||||
long m_nExp;
|
||||
//! The bonus added to this skill (+10 for a specialized skill, +5 for a creation-time train).
|
||||
long m_nBonus;
|
||||
//! The way this skill is trained (i.e. - "Untrained," "Trained," or "Specialized") represented by the enumeration eTrainingType.
|
||||
eTrainingType m_trained;
|
||||
};
|
||||
|
||||
//! The cAttributeInfo structure is generated for each attribute your character has to store information on the attribute.
|
||||
struct cAttributeInfo
|
||||
{
|
||||
//! The attribute's "friendly" name (i.e. - "Strength")
|
||||
std::string m_szName;
|
||||
//! The attribute's "base" value, or value before buffs.
|
||||
long m_nBase;
|
||||
//! The amount of experience applied to this attribute.
|
||||
long m_nExp;
|
||||
//! The adjusted value of the attribute taking (de)buffs into effect.
|
||||
long m_nCurrent;
|
||||
};
|
||||
|
||||
//! The cAllegianceInfo structure is generated for each allegiance contact your character has to store information on that character.
|
||||
struct cAllegianceInfo
|
||||
{
|
||||
//! The GUID of this character's Patron.
|
||||
long TreeParent;
|
||||
//! This character's GUID.
|
||||
long GUID;
|
||||
//! The node type for this entry in relation to your character.
|
||||
long Type;
|
||||
//! The amount of xp you have passed up to this character/this character has passed to you.
|
||||
long XP;
|
||||
//! The character's gender.
|
||||
long Gender;
|
||||
//! The character's race.
|
||||
long Race;
|
||||
//! The character's allegiance rank.
|
||||
long Rank;
|
||||
//! The character's loyalty (as of the moment the data was received--when the allegiance panel was opened, including buffs).
|
||||
long Loyalty;
|
||||
//! The character's leadership (as of the moment the data was received--when the allegiance panel was opened, including buffs).
|
||||
long Leadership;
|
||||
//! Some unknown in the protocol. It's stored here so you can experiment with it!
|
||||
double Unknown;
|
||||
//! The character's name.
|
||||
char Name[32];
|
||||
};
|
||||
|
||||
private:
|
||||
//! An internal pointer to decal's NetService interface.
|
||||
CComPtr< INetService > m_pService;
|
||||
//! An internal pointer to decal's main interface.
|
||||
CComPtr< IDecal > m_pDecal;
|
||||
|
||||
//Bases
|
||||
//! Whether or not we've received login information for a character yet
|
||||
/*!
|
||||
Initially set to false, GotLogin is used internally to represent whether we've
|
||||
received login information for a character yet. Functions check this variable
|
||||
before doing any processing so that they may intentionally error as there is no
|
||||
information on the user's character before login information is received.
|
||||
\sa GotAlleg
|
||||
*/
|
||||
bool GotLogin;
|
||||
//! Our character's GUID.
|
||||
DWORD GUID;
|
||||
//! Our character's name.
|
||||
char Name[32];
|
||||
//! Our character's gender.
|
||||
char Gender[32];
|
||||
//! Our character's race.
|
||||
char Race[32];
|
||||
//! Our character's class/title.
|
||||
char Class[32];
|
||||
|
||||
public:
|
||||
// DWORD array representing the values of our character's primary attributes.
|
||||
DWORD PrimStat[6];
|
||||
// DWORD array representing the initial (creation) values of your character's primary attributes.
|
||||
DWORD PrimStatInitial[6];
|
||||
// DWORD array representing the number of times our vitals have been directly incremented.
|
||||
DWORD SecStatInc[3];
|
||||
// DWORD array representing the number of times our skills have been directly incremented.
|
||||
DWORD SkillInc[40];
|
||||
// DWORD array representing the training status of each skill. (Current protocol: 1 = Untrained/Unusable, 2 = Trained, 3 = Specialized)
|
||||
DWORD SkillTrain[40];
|
||||
// DWORD array representing the amount of experience applied directly to each skill.
|
||||
DWORD SkillXP[40];
|
||||
// DWORD array representing the bonus each skill receives (+10 for specialization, +5 for creation-time train).
|
||||
DWORD SkillBonus[40];
|
||||
|
||||
private:
|
||||
//! An internal list used to store all the enchantments on the character.
|
||||
std::list< cEnchantment * > Enchantments;
|
||||
|
||||
//! Internal storage for our character's total burden.
|
||||
DWORD TotalBurden;
|
||||
//! Internal storage for the number of pyreals our character owns.
|
||||
DWORD TotalPyreal;
|
||||
//! Internal storage for our character's total experience.
|
||||
DWORD TotalXP;
|
||||
//! Internal storage for our character's unsassigned experience.
|
||||
DWORD UnassignedXP;
|
||||
//! Internal storage for the number of skill points our character has available.
|
||||
DWORD SkillPoints;
|
||||
//! Internal storage for our character's level.
|
||||
DWORD Level;
|
||||
//! Internal storage for our character's allegiance rank.
|
||||
DWORD Rank;
|
||||
|
||||
//! Internal storage for our character's burden percentage. (0-300%)
|
||||
float Burden;
|
||||
|
||||
//! Internal Location_t for storing our character's location.
|
||||
Location_t Location;
|
||||
|
||||
//Current Stuff
|
||||
//! Internal storage for our character's "current" or "adjusted" attributes.
|
||||
DWORD CurStat[6];
|
||||
//! Internal storage for our character's "current" or "adjusted" vitals.
|
||||
DWORD CurSecStat[3];
|
||||
//! Internal storage for our character's "current" or "adjusted" skills.
|
||||
DWORD CurSkill[40];
|
||||
//! Internal storage originally allocated for our character's drain spell range. (Note by Eckzow on 7-31-03: I can't find record of this being set to anything useful...)
|
||||
double DrainRange;
|
||||
//! Internal storage originally allocated for our character's harm spell range. (Note by Eckzow on 7-31-03: I can't find record of this being set to anything useful...)
|
||||
double HarmRange;
|
||||
|
||||
//! Internal storage allocated for our character's current number of health points.
|
||||
int Health;
|
||||
//! Internal storage allocated for our character's current number of stamina points.
|
||||
int Stamina;
|
||||
//! Internal storage allocated for our character's current number of mana points.
|
||||
int Mana;
|
||||
|
||||
//! Internal storage for our percantage of vitae.
|
||||
float Vitae;
|
||||
|
||||
void __stdcall onMessage(IMessage* pMsg);
|
||||
|
||||
//! Internal function to add a spell to our (also internal) list of enchantments on the character.
|
||||
void AddEnchant(int SpellID, int Layer, double Duration, DWORD Family, double Elapsed, DWORD AffectMask, DWORD Affected, float Adjustment);
|
||||
//! Internal function called to remove a spell from our (also internal) list of enchantments on the character.
|
||||
void RemoveEnchant(int SpellID, int Layer);
|
||||
|
||||
//! Internal function to trigger a recalculation of a specific stat.
|
||||
/*!
|
||||
\sa RecalcSecStat(), RecalcSkill()
|
||||
\param Stat Index of the stat to be recalculated.
|
||||
*/
|
||||
void RecalcStat(int Stat);
|
||||
//! Internal function to trigger a recalculation of all our character's vitals.
|
||||
/*!
|
||||
This function is necessary to keep our "adjusted" values up to date as an enchantment is cast, a spell expires, the user increments
|
||||
their stat, etc.
|
||||
\sa RecalcSkills()
|
||||
*/
|
||||
void RecalcSecStats();
|
||||
//! Internal function to trigger a recalculation of a specific vital.
|
||||
/*!
|
||||
\sa RecalcStat(), RecalcSkill()
|
||||
\param SecStat Index of the vital to be recalculated.
|
||||
*/
|
||||
void RecalcSecStat(int SecStat);
|
||||
//! Internal function to trigger a recalculation of all our character's skills.
|
||||
/*!
|
||||
This function is necessary to keep our "adjusted" values up to date as an enchantment is cast, a spell expires, the user increments
|
||||
their stat, etc.
|
||||
\sa RecalcSecStats()
|
||||
*/
|
||||
void RecalcSkills();
|
||||
//! Internal function to trigger a recalculation of a specific skill.
|
||||
/*!
|
||||
\sa RecalcSecStat(), RecalcSkill()
|
||||
\param Skill Index of the skill to be recalculated.
|
||||
*/
|
||||
void RecalcSkill(int Skill);
|
||||
|
||||
//Other
|
||||
//! Internal storage for the name of the server we're on.
|
||||
char Server[50];
|
||||
|
||||
//! Internal storage for the id's of spells we've learned.
|
||||
std::set< DWORD > SpellsLearned;
|
||||
|
||||
//! Internal storage for our monarch's allegiance information.
|
||||
cAllegianceInfo Monarch;
|
||||
//! Internal storage for our patron's allegiance information.
|
||||
cAllegianceInfo Patron;
|
||||
//! Internal storage for our own allegiance information.
|
||||
cAllegianceInfo MyAlleg;
|
||||
//! Internal storage array for each vassal's allegiance information.
|
||||
cAllegianceInfo Vassals[12];
|
||||
//! Internal storage for the number of vassals our character has.
|
||||
int VassalCount;
|
||||
|
||||
//! Internal storage for the number of followers you specifically have.
|
||||
DWORD Followers;
|
||||
//! Internal storage for the number of followers your monarchy has.
|
||||
DWORD MonarchFollowers;
|
||||
//! Whether or not we've received allegiance information for our character yet
|
||||
/*!
|
||||
Initially set to false, GotAlleg is used internally to represent whether we've
|
||||
received allegiance information for a character yet. Functions involving allegiance
|
||||
check this variable before doing any processing so that they may intentionally error
|
||||
as there is no allegiance information for the user's character before an allegiance
|
||||
information packet is received.
|
||||
\sa GotLogin
|
||||
*/
|
||||
bool GotAlleg;
|
||||
|
||||
//! Internal storage for the number of deaths our character has.
|
||||
DWORD Deaths;
|
||||
//! Internal storage for the number of birthes our character has.
|
||||
DWORD Birth;
|
||||
//! Internal storage for the age of our characters (like /age this should not be taken as the gospel truth as it can be off by quite a bit)
|
||||
DWORD Age;
|
||||
|
||||
public:
|
||||
STDMETHOD(Initialize)(INetService *pService);
|
||||
STDMETHOD(Terminate)();
|
||||
STDMETHOD(DispatchServer)(IMessage2 *);
|
||||
STDMETHOD(DispatchClient)(IMessage2 *);
|
||||
|
||||
//Old Stuff
|
||||
//! Function to get the number of spells our character has learned.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of spells can be stored.
|
||||
\return E_FAIL if the character has not yet logged in, otherwise S_OK.
|
||||
\sa get_SpellLearned()
|
||||
*/
|
||||
STDMETHOD(get_TotalSpells)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to find out if a specific spell is known to our character or not.
|
||||
/*!
|
||||
\param SpellID The id of the spell (from portal.dat) that you wish to check.
|
||||
\param pVal Pointer to a long where the status of the spell will be stored. pVal is set equal to false (0) if the spell is unknown or true (1) if it is.
|
||||
\return E_FAIL if the character is not logged in or if the spellID supplied was invalid. If sucessful, S_OK is returned. pVal will also be set to -1 if the spell id was invalid.
|
||||
\sa get_TotalSpells()
|
||||
*/
|
||||
STDMETHOD(get_SpellLearned)(long SpellID, /*[out, retval]*/ long *pVal);
|
||||
// ICharacterStats
|
||||
//! Function to get the class/title of our character.
|
||||
/*!
|
||||
\param pVal Pointer to a BSTR object where the class/title of the character may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_ClassTemplate)(/*[out, retval]*/ BSTR *pVal);
|
||||
//! Function to get the gender of our character.
|
||||
/*!
|
||||
\param pVal Pointer to a BSTR object where the gender of the character may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Gender)(/*[out, retval]*/ BSTR *pVal);
|
||||
//! Function to get the race of our character.
|
||||
/*!
|
||||
\param pVal Pointer to a BSTR object where the race of the character may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Race)(/*[out, retval]*/ BSTR *pVal);
|
||||
//! Function to get the name of our character.
|
||||
/*!
|
||||
\param pVal Pointer to a BSTR object where the name of the character may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
|
||||
//! Function to get the server our character is on.
|
||||
/*!
|
||||
\param pVal Pointer to a BSTR object where the name of the server our character is on may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Server)(/*[out, retval]*/ BSTR *pVal);
|
||||
|
||||
//! Function to get the number of skill points available to our character.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of skill points may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_SkillPoints)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get the amount of unassigned experience available to our character.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of unassigned experience points may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_UnassignedExp)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get the amound of total experience our character has earned.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number experience points our character has earned may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_TotalExp)(/*[out, retval]*/ long *pVal);
|
||||
|
||||
//! Function to get our character's allegiance rank.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's allegiance rank may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Rank)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get our character's level.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's level may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Level)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get our character's GUID.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's GUID may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Character)(/*[out, retval]*/ long *pVal);
|
||||
|
||||
//! Function to get the number of vitals that the filter is storing information for.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of vitals the filter is tracking may be stored.
|
||||
\return S_OK if successful.
|
||||
*/
|
||||
STDMETHOD(get_VitalCount)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get the number of skills that the filter is storing information for.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of skills the filter is tracking may be stored.
|
||||
\return S_OK if successful.
|
||||
*/
|
||||
STDMETHOD(get_SkillCount)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get the number of attributes that the filter is storing information for.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of attributes the filter is tracking may be stored.
|
||||
\return S_OK if successful.
|
||||
*/
|
||||
STDMETHOD(get_AttributeCount)(/*[out, retval]*/ long *pVal);
|
||||
|
||||
//! Function to get information on a given vital.
|
||||
/*!
|
||||
Using get_Vital to get in-depth information on a vital statistic is approved, however
|
||||
the function has been deprecated for simply getting the vital's value/it's base by the new
|
||||
GetVital ACHooks.
|
||||
\param Index A member of the eVitalID enumeration representing which vital you wish to obtain information for.
|
||||
\param pVal A pointer to an ISkillInfo in which the vital's information may be stored.
|
||||
\return E_FAIL if the character is not logged in or if the Index parameter is out of range, otherwise the result of the ISkillInfo's QueryInterface.
|
||||
*/
|
||||
STDMETHOD(get_Vital)(enum eVitalID Index, /*[out, retval]*/ ISkillInfo ** pVal);
|
||||
//! Function to get information on a given skill.
|
||||
/*!
|
||||
Using get_Skill to get in-depth information on a skill is approved, however
|
||||
the function has been deprecated for simply getting the skill's value/it's base by the new
|
||||
GetSkill ACHooks.
|
||||
\param Index A member of the eSkillID enumeration representing which skill you wish to obtain information for.
|
||||
\param pVal A pointer to an ISkillInfo in which the vital's information may be stored.
|
||||
\return E_FAIL if the character is not logged in or if the Index parameter is out of range, otherwise the result of the ISkillInfo's QueryInterface.
|
||||
*/
|
||||
STDMETHOD(get_Skill)(enum eSkillID Index, /*[out, retval]*/ ISkillInfo ** pVal);
|
||||
//! Function to get information on a given attribute.
|
||||
/*!
|
||||
Using get_Attribute to get in-depth information on an attribute is approved, however
|
||||
the function has been deprecated for simply getting the attribute's value/it's base by the new
|
||||
GetAttribute ACHooks.
|
||||
\param Index A member of the eAttributeID enumeration representing which vital you wish to obtain information for.
|
||||
\param pVal A pointer to an IAttributeInfo in which the vital's information may be stored.
|
||||
\return E_FAIL if the character is not logged in or if the Index parameter is out of range, otherwise the result of the IAttributeInfo's QueryInterface.
|
||||
*/
|
||||
STDMETHOD(get_Attribute)(enum eAttributeID Index, /*[out, retval]*/ IAttributeInfo ** pVal);
|
||||
|
||||
//New Stuff
|
||||
//! Function to get the allegiance information for your monarch.
|
||||
/*!
|
||||
\param pVal Pointer to an IAllegianceInfo into which the monarch's information may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received or you have no monarch, otherwise the result of the IAllegianceInfo's QueryInterface.
|
||||
*/
|
||||
STDMETHOD(get_Monarch)(IAllegianceInfo ** pVal);
|
||||
//! Function to get the allegiance information for your patron.
|
||||
/*!
|
||||
\param pVal Pointer to an IAllegianceInfo into which your patron's information may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received or you have no patron, otherwise the result of the IAllegianceInfo's QueryInterface.
|
||||
*/
|
||||
STDMETHOD(get_Patron)(IAllegianceInfo ** pVal);
|
||||
//! Function to get the allegiance information for your character.
|
||||
/*!
|
||||
\param pVal Pointer to an IAllegianceInfo into which the character's information may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received or is invalid, otherwise the result of the IAllegianceInfo's QueryInterface.
|
||||
*/
|
||||
STDMETHOD(get_MyAllegiance)(IAllegianceInfo ** pVal);
|
||||
//! Function to get the allegiance information for one of your vassals.
|
||||
/*!
|
||||
\param VassalNum A long signifying the zero-based index of the vassal who's information you wish to retrieve.
|
||||
\param pVal Pointer to an IAllegianceInfo into which your vassal's information may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received, the index you supplied was invalid, or you have no vassal at that index. Otherwise the result of the IAllegianceInfo's QueryInterface is returned.
|
||||
*/
|
||||
STDMETHOD(get_Vassal)(long VassalNum, IAllegianceInfo ** pVal);
|
||||
//! Function to get the number of vassals your character has.
|
||||
/*!
|
||||
\param pVal Pointer to a long into which the number of vassals may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_VassalCount)(long *pVal);
|
||||
//! Function to get the number of followers your character has.
|
||||
/*!
|
||||
\param pVal Pointer to a long into which the number of followers may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Followers)(long *pVal);
|
||||
//! Function to get the number of followers your monarchy has.
|
||||
/*!
|
||||
\param pVal Pointer to a long into which the number of followers may be stored.
|
||||
\return E_FAIL if an allegiance information packet has not been received, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_MonarchFollowers)(long *pVal);
|
||||
|
||||
//! Function to get our character's birthtime.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's birthtime (UNIX time) may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Birth)(long *pVal);
|
||||
//! Function to get our character's age.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's age (in seconds) may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Age)(long *pVal);
|
||||
//! Function to get our character's death count.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of times our character has died may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Deaths)(long *pVal);
|
||||
|
||||
//! Function to get our character's current Health.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's current Health may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Health)(long *pVal);
|
||||
//! Function to get our character's current Stamina.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's current Stamina may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Stamina)(long *pVal);
|
||||
//! Function to get our character's current Mana.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's current Mana may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Mana)(long *pVal);
|
||||
|
||||
//! Function to get the number of enchantments currently affecting our character.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of enchantments may be stored.
|
||||
\return E_FAIL if the character is not yet logged in, else S_OK.
|
||||
*/
|
||||
STDMETHOD(get_EnchantmentCount)(long *pVal);
|
||||
//! Function to get detailed information on an enchantment.
|
||||
/*!
|
||||
\param EnchantNum Zero-based index of the enchantment you wish to get information for.
|
||||
\param pVal Pointer to an IEnchantment where the enchantment's information may be stored.
|
||||
*/
|
||||
STDMETHOD(get_Enchantment)(long EnchantNum, IEnchantment **pVal);
|
||||
|
||||
//! Function to get the value of a given vital.
|
||||
/*!
|
||||
Usage of this function has been deprecated due to the release of the new GetVital ACHook.
|
||||
\param Index A member of the eVitalID enumeration representing which vital you wish to obtain the value of.
|
||||
\param pVal A pointer to a long where the vital's value may be stored.
|
||||
\return E_FAIL if the character is not logged in or if the Index parameter is out of range, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_EffectiveVital)(enum eVitalID Index, /*[out, retval]*/ long *pVal);
|
||||
//! Function to get the value of a given skill.
|
||||
/*!
|
||||
Usage of this function has been deprecated due to the release of the new GetSkill ACHook.
|
||||
\param Index A member of the eSkillID enumeration representing which skill you wish to obtain the value of.
|
||||
\param pVal A pointer to a long where the skill's value may be stored.
|
||||
\return E_FAIL if the character is not logged in or if the Index parameter is out of range, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_EffectiveSkill)(enum eSkillID Index, /*[out, retval]*/ long *pVal);
|
||||
//! Function to get the value of a given attribute.
|
||||
/*!
|
||||
Usage of this function has been deprecated due to the release of the new GetAttribute ACHook.
|
||||
\param Index A member of the eAttributeID enumeration representing which vital you wish to obtain the value of.
|
||||
\param pVal A pointer to a long where the attribute's value may be stored.
|
||||
\return E_FAIL if the character is not logged in or if the Index parameter is out of range, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_EffectiveAttribute)(enum eAttributeID Index, /*[out, retval]*/ long * pVal);
|
||||
|
||||
//! Function to get our character's vitae percentage.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the percentage vitae penalty our character has aquired may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Vitae)(/*[out, retval]*/ long *pVal);
|
||||
|
||||
//! Function to get our character's current number of burden units.
|
||||
/*!
|
||||
\param pVal Pointer to a long where the number of burden units our character is carrying may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_BurdenUnits)(/*[out, retval]*/ long *pVal);
|
||||
//! Function to get our character's burden percentage.
|
||||
/*!
|
||||
\param pVal Pointer to a long where our character's current burden percentage may be stored.
|
||||
\return E_FAIL if the character is not logged in, otherwise S_OK.
|
||||
*/
|
||||
STDMETHOD(get_Burden)(/*[out, retval]*/ long *pVal);
|
||||
};
|
||||
|
||||
#endif //__CHARACTERSTATS_H_
|
||||
43
Native/DecalFilters/CharacterStats.rgs
Normal file
43
Native/DecalFilters/CharacterStats.rgs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.CharacterStats.1 = s 'CharacterStats Class'
|
||||
{
|
||||
CLSID = s '{4540C969-08D1-46BF-97AD-6B19D3C10BEE}'
|
||||
}
|
||||
DecalFilters.CharacterStats = s 'CharacterStats Class'
|
||||
{
|
||||
CLSID = s '{4540C969-08D1-46BF-97AD-6B19D3C10BEE}'
|
||||
CurVer = s 'DecalFilters.CharacterStats.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {4540C969-08D1-46BF-97AD-6B19D3C10BEE} = s 'CharacterStats Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.CharacterStats.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.CharacterStats'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Both'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Decal
|
||||
{
|
||||
NoRemove NetworkFilters
|
||||
{
|
||||
ForceRemove {4540C969-08D1-46BF-97AD-6B19D3C10BEE} = s 'Character Stats Filter'
|
||||
{
|
||||
val Enabled = d '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
88
Native/DecalFilters/DecalFilters.cpp
Normal file
88
Native/DecalFilters/DecalFilters.cpp
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
// DecalFilters.cpp : Implementation of DLL Exports.
|
||||
|
||||
|
||||
// Note: Proxy/Stub Information
|
||||
// To build a separate proxy/stub DLL,
|
||||
// run nmake -f DecalFiltersps.mk in the project directory.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include <initguid.h>
|
||||
#include "DecalFilters.h"
|
||||
|
||||
#include "EchoFilter.h"
|
||||
#include "EchoFilter2.h"
|
||||
#include "Prefilter.h"
|
||||
#include "CharacterStats.h"
|
||||
|
||||
#include "DecalFilters_i.c"
|
||||
#include <DecalNet_i.c>
|
||||
|
||||
#include "World.h"
|
||||
#include "WorldObject.h"
|
||||
#include "WorldIterator.h"
|
||||
|
||||
#include "IdentifyQueue.h"
|
||||
|
||||
CComModule _Module;
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
OBJECT_ENTRY(CLSID_EchoFilter, cEchoFilter)
|
||||
OBJECT_ENTRY(CLSID_EchoFilter2, cEchoFilter2)
|
||||
OBJECT_ENTRY(CLSID_Prefilter, cPrefilter)
|
||||
OBJECT_ENTRY(CLSID_CharacterStats, cCharacterStats)
|
||||
OBJECT_ENTRY(CLSID_World, cWorld)
|
||||
OBJECT_ENTRY(CLSID_WorldObject, cWorldObject)
|
||||
OBJECT_ENTRY(CLSID_WorldIterator, cWorldIterator)
|
||||
OBJECT_ENTRY(CLSID_IdentifyQueue, CIdentifyQueue)
|
||||
END_OBJECT_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DLL Entry Point
|
||||
|
||||
extern "C"
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
_Module.Init(ObjectMap, hInstance, &LIBID_DecalFilters);
|
||||
DisableThreadLibraryCalls(hInstance);
|
||||
}
|
||||
else if (dwReason == DLL_PROCESS_DETACH)
|
||||
_Module.Term();
|
||||
|
||||
return TRUE; // ok
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Used to determine whether the DLL can be unloaded by OLE
|
||||
|
||||
STDAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Returns a class factory to create an object of the requested type
|
||||
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
|
||||
{
|
||||
return _Module.GetClassObject(rclsid, riid, ppv);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DllRegisterServer - Adds entries to the system registry
|
||||
|
||||
STDAPI DllRegisterServer(void)
|
||||
{
|
||||
// registers object, typelib and all interfaces in typelib
|
||||
return _Module.RegisterServer(TRUE);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// DllUnregisterServer - Removes entries from the system registry
|
||||
|
||||
STDAPI DllUnregisterServer(void)
|
||||
{
|
||||
return _Module.UnregisterServer(TRUE);
|
||||
}
|
||||
9
Native/DecalFilters/DecalFilters.def
Normal file
9
Native/DecalFilters/DecalFilters.def
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
; DecalFilters.def : Declares the module parameters.
|
||||
|
||||
LIBRARY "DecalFilters.DLL"
|
||||
|
||||
EXPORTS
|
||||
DllCanUnloadNow @1 PRIVATE
|
||||
DllGetClassObject @2 PRIVATE
|
||||
DllRegisterServer @3 PRIVATE
|
||||
DllUnregisterServer @4 PRIVATE
|
||||
298
Native/DecalFilters/DecalFilters.dsp
Normal file
298
Native/DecalFilters/DecalFilters.dsp
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
# Microsoft Developer Studio Project File - Name="DecalFilters" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=DecalFilters - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "DecalFilters.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "DecalFilters.mak" CFG="DecalFilters - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "DecalFilters - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "DecalFilters - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "DecalFilters - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "..\Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 1
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /Gi /GX /ZI /Od /I "..\Include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /Yu"stdafx.h" /Ge /FD /GZ /c
|
||||
# ADD MTL /nologo /I "..\Include" /Oicf
|
||||
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
|
||||
# ADD RSC /l 0x1009 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /debug /machine:I386
|
||||
# Begin Custom Build - Performing registration
|
||||
OutDir=.\..\Debug
|
||||
TargetPath=\mysource\Debug\DecalFilters.dll
|
||||
InputPath=\mysource\Debug\DecalFilters.dll
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
regsvr32 /s /c "$(TargetPath)"
|
||||
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "DecalFilters - Win32 Release MinDependency"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "ReleaseMinDependency"
|
||||
# PROP BASE Intermediate_Dir "ReleaseMinDependency"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "..\Release"
|
||||
# PROP Intermediate_Dir "ReleaseMinDependency"
|
||||
# PROP Ignore_Export_Lib 1
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /Zi /Oa /Og /Oi /Os /Oy /Ob1 /Gf /Gy /I "..\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /Yu"stdafx.h" /FD /c
|
||||
# ADD MTL /nologo /I "..\Include" /Oicf
|
||||
# ADD BASE RSC /l 0x1009 /d "NDEBUG"
|
||||
# ADD RSC /l 0x1009 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\Release"
|
||||
# Begin Custom Build - Performing registration
|
||||
OutDir=.\..\Release
|
||||
TargetPath=\mysource\Release\DecalFilters.dll
|
||||
InputPath=\mysource\Release\DecalFilters.dll
|
||||
SOURCE="$(InputPath)"
|
||||
|
||||
"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
regsvr32 /s /c "$(TargetPath)"
|
||||
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "DecalFilters - Win32 Debug"
|
||||
# Name "DecalFilters - Win32 Release MinDependency"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AllegianceInfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AttributeInfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharacterStats.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DecalFilters.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DecalFilters.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DecalFilters.idl
|
||||
# ADD MTL /tlb ".\DecalFilters.tlb" /h "DecalFilters.h" /iid "DecalFilters_i.c" /Oicf
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DecalFilters.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EchoFilter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EchoFilter2.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Enchantment.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\IdentifyQueue.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Prefilter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SkillInfo.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.cpp
|
||||
# ADD CPP /Yc"stdafx.h"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\World.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WorldIterator.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WorldObject.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AllegianceInfo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AttributeInfo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharacterStats.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DecalFiltersCP.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EchoFilter.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EchoFilter2.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Enchantment.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FilterImpl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
||||
SOURCE=.\IdentifyQueue.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Prefilter.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SkillInfo.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\World.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WorldIterator.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WorldObject.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\AllegianceInfo.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharacterStats.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EchoFilter.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\EchoFilter2.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Enchantment.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\IdentifyQueue.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Prefilter.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\World.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WorldIterator.rgs
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WorldObject.rgs
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
686
Native/DecalFilters/DecalFilters.idl
Normal file
686
Native/DecalFilters/DecalFilters.idl
Normal file
|
|
@ -0,0 +1,686 @@
|
|||
// DecalFilters.idl : IDL source for DecalFilters.dll
|
||||
//
|
||||
|
||||
// This file will be processed by the MIDL tool to
|
||||
// produce the type library (DecalFilters.tlb) and marshalling code.
|
||||
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
import "DecalNet.idl";
|
||||
|
||||
enum eTrainingType
|
||||
{
|
||||
eTrainUnusable,
|
||||
eTrainUntrained,
|
||||
eTrainTrained,
|
||||
eTrainSpecialized
|
||||
};
|
||||
|
||||
enum eAttributeID
|
||||
{
|
||||
eAttrStrength = 1,
|
||||
eAttrEndurance = 2,
|
||||
eAttrQuickness = 3,
|
||||
eAttrCoordination = 4,
|
||||
eAttrFocus = 5,
|
||||
eAttrSelf = 6,
|
||||
eAttrNULL = 255
|
||||
};
|
||||
|
||||
enum eSkillID
|
||||
{
|
||||
eSkillAxe = 1,
|
||||
eSkillBow = 2,
|
||||
eSkillCrossbow = 3,
|
||||
eSkillDagger = 4,
|
||||
eSkillMace = 5,
|
||||
eSkillMeleeDefense = 6,
|
||||
eSkillMissileDefense = 7,
|
||||
eSkillSpear = 9,
|
||||
eSkillStaff = 10,
|
||||
eSkillSword = 11,
|
||||
eSkillThrownWeapons = 12,
|
||||
eSkillUnarmed = 13,
|
||||
eSkillArcaneLore = 14,
|
||||
eSkillMagicDefense = 15,
|
||||
eSkillManaConversion = 16,
|
||||
eSkillItemTinkering = 18,
|
||||
eSkillAssessPerson = 19,
|
||||
eSkillDeception = 20,
|
||||
eSkillHealing = 21,
|
||||
eSkillJump = 22,
|
||||
eSkillLockpick = 23,
|
||||
eSkillRun = 24,
|
||||
eSkillAssessCreature = 27,
|
||||
eSkillWeaponTinkering = 28,
|
||||
eSkillArmorTinkering = 29,
|
||||
eSkillMagicItemTinkering = 30,
|
||||
eSkillCreatureEnchantment = 31,
|
||||
eSkillItemEnchantment = 32,
|
||||
eSkillLifeMagic = 33,
|
||||
eSkillWarMagic = 34,
|
||||
eSkillLeadership = 35,
|
||||
eSkillLoyalty = 36,
|
||||
eSkillFletching = 37,
|
||||
eSkillAlchemy = 38,
|
||||
eSkillCooking = 39
|
||||
};
|
||||
|
||||
enum eVitalID
|
||||
{
|
||||
eHealth = 1,
|
||||
eStamina = 2,
|
||||
eMana = 3
|
||||
};
|
||||
|
||||
enum eStatisticType
|
||||
{
|
||||
eStatBurden = 5,
|
||||
eStatPyreal = 20,
|
||||
eStatExperience = 21,
|
||||
eStatUnassignedExp = 22,
|
||||
eStatUnassignedSkillPoints = 24,
|
||||
eStatLevel = 25,
|
||||
eStatRank = 30
|
||||
};
|
||||
|
||||
enum eStringType
|
||||
{
|
||||
eStringName = 1,
|
||||
eStringGender = 3,
|
||||
eStringRace = 4,
|
||||
eStringClass = 5
|
||||
};
|
||||
|
||||
enum eObjectType
|
||||
{
|
||||
eMeleeWeapon = 0,
|
||||
eArmor,
|
||||
eClothing,
|
||||
eJewelry,
|
||||
eMonster,
|
||||
eFood,
|
||||
eMoney,
|
||||
eMisc,
|
||||
eMissileWeapon,
|
||||
eContainer,
|
||||
eGem,
|
||||
eSpellComponent,
|
||||
eKey,
|
||||
ePortal,
|
||||
eTradeNote,
|
||||
eManaStone,
|
||||
eService,
|
||||
ePlant,
|
||||
eBaseCooking,
|
||||
eBaseAlchemy,
|
||||
eBaseFletching,
|
||||
eCraftedCooking,
|
||||
eCraftedAlchemy,
|
||||
eCraftedFletching,
|
||||
ePlayer,
|
||||
eVendor,
|
||||
eDoor,
|
||||
eCorpse,
|
||||
eLifestone,
|
||||
eHealingKit,
|
||||
eLockpick,
|
||||
eUnknownObject,
|
||||
eWandStaffOrb,
|
||||
eBundle,
|
||||
eBook,
|
||||
eJournal,
|
||||
eSign,
|
||||
eHousing,
|
||||
eNPC,
|
||||
eFoci,
|
||||
eSalvage,
|
||||
eUst,
|
||||
|
||||
// Leave this last!!!
|
||||
eNumObjectTypes
|
||||
};
|
||||
|
||||
[
|
||||
uuid(A67C748D-2427-4a13-A114-7ACC1D4C9433),
|
||||
helpstring("IPrefilterEvents Interface")
|
||||
]
|
||||
dispinterface IPrefilterEvents
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(1), helpstring("method Event")] void Event(long ID, IMessage *Message);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(B6496852-E977-4DA2-884D-09AFEA3D7582),
|
||||
dual,
|
||||
helpstring("IAttributeInfo Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAttributeInfo : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
|
||||
[propget, id(2), helpstring("property Creation")] HRESULT Creation([out, retval] long *pVal);
|
||||
[propget, id(3), helpstring("property Exp")] HRESULT Exp([out, retval] long *pVal);
|
||||
[propget, id(4), helpstring("property Current")] HRESULT Current([out, retval] long *pVal);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(6FBA5326-F234-4AEC-B844-2136A0D50FD5),
|
||||
dual,
|
||||
helpstring("ISkillInfo Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ISkillInfo : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
|
||||
[propget, id(2), helpstring("property ShortName")] HRESULT ShortName([out, retval] BSTR *pVal);
|
||||
[propget, id(3), helpstring("property Formula")] HRESULT Formula([out, retval] BSTR *pVal);
|
||||
[propget, id(4), helpstring("property Base")] HRESULT Base([out, retval] long *pVal);
|
||||
[propget, id(5), helpstring("property Current")] HRESULT Current([out, retval] long *pVal);
|
||||
[propget, id(6), helpstring("property Exp")] HRESULT Exp([out, retval] long *pVal);
|
||||
[propget, id(7), helpstring("property Training")] HRESULT Training([out, retval] enum eTrainingType *pVal);
|
||||
[propget, id(8), helpstring("property Known")] HRESULT Known([out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(9), helpstring("property Increment")] HRESULT Increment([out, retval] long *pVal);
|
||||
[propget, id(10), helpstring("property Bonus")] HRESULT Bonus([out, retval] long *pVal);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(B83155F4-E298-4004-80C6-AA592F677430),
|
||||
dual,
|
||||
helpstring("IEnchantment Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IEnchantment : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property SpellID")] HRESULT SpellID([out, retval] long *pVal);
|
||||
[propput, id(1), helpstring("property SpellID")] HRESULT SpellID([in] long newVal);
|
||||
[propget, id(2), helpstring("property Layer")] HRESULT Layer([out, retval] long *pVal);
|
||||
[propput, id(2), helpstring("property Layer")] HRESULT Layer([in] long newVal);
|
||||
[propget, id(3), helpstring("property TimeRemaining")] HRESULT TimeRemaining([out, retval] long *pVal);
|
||||
[propput, id(3), helpstring("property TimeRemaining")] HRESULT TimeRemaining([in] long newVal);
|
||||
[propget, id(4), helpstring("property Affected")] HRESULT Affected([out, retval] long *pVal);
|
||||
[propput, id(4), helpstring("property Affected")] HRESULT Affected([in] long newVal);
|
||||
[propget, id(5), helpstring("property AffectedMask")] HRESULT AffectedMask([out, retval] long *pVal);
|
||||
[propput, id(5), helpstring("property AffectedMask")] HRESULT AffectedMask([in] long newVal);
|
||||
[propget, id(6), helpstring("property Family")] HRESULT Family([out, retval] long *pVal);
|
||||
[propput, id(6), helpstring("property Family")] HRESULT Family([in] long newVal);
|
||||
[propget, id(7), helpstring("property Adjustment")] HRESULT Adjustment([out, retval] double *pVal);
|
||||
[propput, id(7), helpstring("property Adjustment")] HRESULT Adjustment([in] double newVal);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(C8A16199-B649-41F3-BFCA-A1BD6E2E1F2C),
|
||||
dual,
|
||||
helpstring("IAllegianceInfo Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAllegianceInfo : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
|
||||
[propget, id(2), helpstring("property GUID")] HRESULT GUID([out, retval] long *pVal);
|
||||
[propget, id(3), helpstring("property TreeParent")] HRESULT TreeParent([out, retval] long *pVal);
|
||||
[propget, id(4), helpstring("property Type")] HRESULT Type([out, retval] long *pVal);
|
||||
[propget, id(5), helpstring("property XP")] HRESULT XP([out, retval] long *pVal);
|
||||
[propget, id(6), helpstring("property Loyalty")] HRESULT Loyalty([out, retval] long *pVal);
|
||||
[propget, id(7), helpstring("property Leadership")] HRESULT Leadership([out, retval] long *pVal);
|
||||
[propget, id(8), helpstring("property Gender")] HRESULT Gender([out, retval] long *pVal);
|
||||
[propget, id(9), helpstring("property Race")] HRESULT Race([out, retval] long *pVal);
|
||||
[propget, id(10), helpstring("property Rank")] HRESULT Rank([out, retval] long *pVal);
|
||||
[propget, id(11), helpstring("property Unknown")] HRESULT Unknown([out, retval] double *pVal);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(0CE57594-4E30-4446-956D-CE460C7355AF),
|
||||
dual,
|
||||
helpstring("ICharacterStats Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ICharacterStats : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property Character")] HRESULT Character([out, retval] long *pVal);
|
||||
[propget, id(2), helpstring("property Level")] HRESULT Level([out, retval] long *pVal);
|
||||
[propget, id(3), helpstring("property Rank")] HRESULT Rank([out, retval] long *pVal);
|
||||
[propget, id(4), helpstring("property TotalExp")] HRESULT TotalExp([out, retval] long *pVal);
|
||||
[propget, id(5), helpstring("property UnassignedExp")] HRESULT UnassignedExp([out, retval] long *pVal);
|
||||
[propget, id(6), helpstring("property SkillPoints")] HRESULT SkillPoints([out, retval] long *pVal);
|
||||
[propget, id(7), helpstring("property Server")] HRESULT Server([out, retval] BSTR *pVal);
|
||||
[propget, id(8), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
|
||||
[propget, id(9), helpstring("property Race")] HRESULT Race([out, retval] BSTR *pVal);
|
||||
[propget, id(10), helpstring("property Gender")] HRESULT Gender([out, retval] BSTR *pVal);
|
||||
[propget, id(11), helpstring("property ClassTemplate")] HRESULT ClassTemplate([out, retval] BSTR *pVal);
|
||||
[propget, id(12), helpstring("property AttributeCount")] HRESULT AttributeCount([out, retval] long *pVal);
|
||||
[propget, id(13), helpstring("property SkillCount")] HRESULT SkillCount([out, retval] long *pVal);
|
||||
[propget, id(14), helpstring("property VitalCount")] HRESULT VitalCount([out, retval] long *pVal);
|
||||
[propget, id(15), helpstring("property Attribute")] HRESULT Attribute(enum eAttributeID Index, [out, retval] IAttributeInfo * *pVal);
|
||||
[propget, id(16), helpstring("property Skill")] HRESULT Skill(enum eSkillID Index, [out, retval] ISkillInfo * *pVal);
|
||||
[propget, id(17), helpstring("property Vital")] HRESULT Vital(enum eVitalID Index, [out, retval] ISkillInfo * *pVal);
|
||||
[propget, id(18), helpstring("property SpellLearned")] HRESULT SpellLearned(long SpellID, [out, retval] long *pVal);
|
||||
[propget, id(19), helpstring("property TotalSpells")] HRESULT TotalSpells([out, retval] long *pVal);
|
||||
[propget, id(20), helpstring("property Health")] HRESULT Health([out, retval] long *pVal);
|
||||
[propget, id(21), helpstring("property Stamina")] HRESULT Stamina([out, retval] long *pVal);
|
||||
[propget, id(22), helpstring("property Mana")] HRESULT Mana([out, retval] long *pVal);
|
||||
[propget, id(23), helpstring("property Birth")] HRESULT Birth([out, retval] long *pVal);
|
||||
[propget, id(24), helpstring("property Age")] HRESULT Age([out, retval] long *pVal);
|
||||
[propget, id(25), helpstring("property Deaths")] HRESULT Deaths([out, retval] long *pVal);
|
||||
[propget, id(26), helpstring("property VassalCount")] HRESULT VassalCount([out, retval] long *pVal);
|
||||
[propget, id(27), helpstring("property Monarch")] HRESULT Monarch([out, retval] IAllegianceInfo **pVal);
|
||||
[propget, id(28), helpstring("property Patron")] HRESULT Patron([out, retval] IAllegianceInfo **pVal);
|
||||
[propget, id(29), helpstring("property MyAllegiance")] HRESULT MyAllegiance([out, retval] IAllegianceInfo **pVal);
|
||||
[propget, id(30), helpstring("property Vassal")] HRESULT Vassal(long VassalNum, [out, retval] IAllegianceInfo **pVal);
|
||||
[propget, id(31), helpstring("property Followers")] HRESULT Followers([out, retval] long *pVal);
|
||||
[propget, id(32), helpstring("property MonarchFollowers")] HRESULT MonarchFollowers([out, retval] long *pVal);
|
||||
[propget, id(33), helpstring("property EnchantmentCount")] HRESULT EnchantmentCount([out, retval] long *pVal);
|
||||
[propget, id(34), helpstring("property Enchantment")] HRESULT Enchantment(long EnchantNum, [out, retval] IEnchantment **pVal);
|
||||
[propget, id(35), helpstring("property EffectiveAttribute")] HRESULT EffectiveAttribute(enum eAttributeID Index, [out, retval] long *pVal);
|
||||
[propget, id(36), helpstring("property EffectiveSkill")] HRESULT EffectiveSkill(enum eSkillID Index, [out, retval] long *pVal);
|
||||
[propget, id(37), helpstring("property EffectiveVital")] HRESULT EffectiveVital(enum eVitalID Index, [out, retval] long *pVal);
|
||||
[propget, id(38), helpstring("property Vitae")] HRESULT Vitae([out, retval] long *pVal);
|
||||
[propget, id(39), helpstring("property BurdenUnits")] HRESULT BurdenUnits([out, retval] long *pVal);
|
||||
[propget, id(40), helpstring("property Burden")] HRESULT Burden([out, retval] long *pVal);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(7B7FEF07-DAE2-46f3-AC71-7E47F8EF3A44),
|
||||
helpstring("IEchoSink2 Interface"),
|
||||
dual,
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IEcho : IDispatch
|
||||
{
|
||||
};
|
||||
|
||||
[
|
||||
uuid(236B3F19-8F40-492b-A462-0EB4447A6296),
|
||||
helpstring("IEchoSink Interface")
|
||||
]
|
||||
dispinterface IEchoSink
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(1), helpstring("method EchoMessage")] void EchoMessage(IMessage *pMsg);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(002C8BAE-917E-4978-B223-B45B3E8B15E6),
|
||||
helpstring("IEchoSink2 Interface"),
|
||||
dual,
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IEcho2 : IDispatch
|
||||
{
|
||||
};
|
||||
|
||||
[
|
||||
uuid(6C9BCC85-BAD0-4706-9CC5-D491E43F81C4),
|
||||
helpstring("IEchoSink2 Interface")
|
||||
]
|
||||
dispinterface IEchoSink2
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(1), helpstring("method EchoServer")] void EchoServer(IMessage2 *pMsg);
|
||||
[id(2), helpstring("method EchoClient")] void EchoClient(IMessage2 *pMsg);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(6FD2E07C-7E9C-451B-8968-2FCB0226D0E8),
|
||||
dual,
|
||||
nonextensible,
|
||||
helpstring("IIdentifyQueue Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IIdentifyQueue : IDispatch{
|
||||
};
|
||||
[
|
||||
uuid(DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1),
|
||||
version(1.0),
|
||||
helpstring("Decal Network Filters Type Library")
|
||||
]
|
||||
library DecalFilters
|
||||
{
|
||||
importlib("stdole32.tlb");
|
||||
importlib("stdole2.tlb");
|
||||
|
||||
dispinterface IEchoSink;
|
||||
dispinterface IEchoSink2;
|
||||
dispinterface IPrefilterEvents;
|
||||
dispinterface ICharacterStatsEvents;
|
||||
|
||||
interface IWorldIterator;
|
||||
interface IWorldObject;
|
||||
interface IWorldObject2;
|
||||
interface IEnchantment;
|
||||
interface IAllegianceInfo;
|
||||
|
||||
[
|
||||
uuid(0B60F187-13CD-4E35-B8A2-FE128F05CA6B),
|
||||
helpstring("_ICharacterStatsEvents Interface")
|
||||
]
|
||||
dispinterface ICharacterStatsEvents
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(1), helpstring("method Login")] HRESULT Login(long character);
|
||||
[id(2), helpstring("method Spellbook_Add")] HRESULT Spellbook_Add(long SpellAdded);
|
||||
[id(3), helpstring("method Spellbook_Delete")] HRESULT Spellbook_Delete(long SpellDeleted);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(3C1CBEF8-E72A-4BDF-B92E-4F3307109766),
|
||||
dual,
|
||||
helpstring("IPrefilter Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IPrefilter : IDispatch
|
||||
{
|
||||
};
|
||||
[
|
||||
object,
|
||||
uuid(C5F0FF7E-A043-4A28-8893-F6E43F4E9DED),
|
||||
dual,
|
||||
helpstring("IWorld Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IWorld : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property Object")] HRESULT Object(long GUID, [out, retval] IWorldObject **pVal);
|
||||
[propget, id(2), helpstring("property ByName")] HRESULT ByName(BSTR Name, [out, retval] IWorldIterator **pVal);
|
||||
[propget, id(3), helpstring("property All")] HRESULT All([out, retval] IWorldIterator **pVal);
|
||||
[propget, id(4), helpstring("property ByType")] HRESULT ByType(enum eObjectType Type, [out, retval] IWorldIterator * *pVal);
|
||||
[propget, id(5), helpstring("property ByNameSubstring")] HRESULT ByNameSubstring(BSTR Substring, [out, retval] IWorldIterator * *pVal);
|
||||
[propget, id(6), helpstring("property ByContainer")] HRESULT ByContainer(long GUID, [out, retval] IWorldIterator * *pVal);
|
||||
[propget, id(7), helpstring("property Inventory")] HRESULT Inventory([out, retval] IWorldIterator * *pVal);
|
||||
[id(8), helpstring("method Distance2D")] HRESULT Distance2D(long GUID1, long GUID2, [out, retval] float* pVal);
|
||||
[propget, id(9), helpstring("property ByOwner")] HRESULT ByOwner(long GUID, [out, retval] IWorldIterator * *pVal);
|
||||
[propget, id(10), helpstring("property Landscape")] HRESULT Landscape([out, retval] IWorldIterator * *pVal);
|
||||
[propget, id(11), helpstring("property NumObjectTypes")] HRESULT NumObjectTypes([out, retval] long *lVal);
|
||||
};
|
||||
[
|
||||
uuid(4540C969-08D1-46BF-97AD-6B19D3C10BEE),
|
||||
helpstring("CharacterStats Class")
|
||||
]
|
||||
coclass CharacterStats
|
||||
{
|
||||
[default] interface ICharacterStats;
|
||||
[default, source] dispinterface ICharacterStatsEvents;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(AF42E9D7-E3F3-416B-AF32-A411F3F6EE72),
|
||||
helpstring("AttributeInfo Class"),
|
||||
noncreatable
|
||||
]
|
||||
coclass AttributeInfo
|
||||
{
|
||||
[default] interface IAttributeInfo;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(652DA384-AA3B-4F9D-9730-8CF753DA1A31),
|
||||
helpstring("SkillInfo Class"),
|
||||
noncreatable
|
||||
]
|
||||
coclass SkillInfo
|
||||
{
|
||||
[default] interface ISkillInfo;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(5DCF056E-B7F5-4AEB-93A0-628617B28488),
|
||||
helpstring("Enchantment Class"),
|
||||
noncreatable
|
||||
]
|
||||
coclass Enchantment
|
||||
{
|
||||
[default] interface IEnchantment;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(B2EB5B5A-5E3F-4F60-8BC0-BB729FFC04F6),
|
||||
helpstring("AllegianceInfo Class"),
|
||||
noncreatable
|
||||
]
|
||||
coclass AllegianceInfo
|
||||
{
|
||||
[default] interface IAllegianceInfo;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(443D4A68-5422-4E0C-9460-973F8FBDB190),
|
||||
helpstring("Prefilter Class")
|
||||
]
|
||||
coclass Prefilter
|
||||
{
|
||||
[default] interface IPrefilter;
|
||||
[default, source] dispinterface IPrefilterEvents;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(8C2FA400-315D-41DE-B063-D6EF04F12E1F),
|
||||
helpstring("EchoFilter Class")
|
||||
]
|
||||
coclass EchoFilter
|
||||
{
|
||||
[default] interface IEcho;
|
||||
[default, source] dispinterface IEchoSink;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(34239EAD-6317-4c40-A405-193BA5232DD8),
|
||||
helpstring("EchoFilter2 Class")
|
||||
]
|
||||
coclass EchoFilter2
|
||||
{
|
||||
[default] interface IEcho2;
|
||||
[default, source] dispinterface IEchoSink2;
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(02EA40F2-59C0-4396-8B4C-B8D45EC0CC98),
|
||||
dual,
|
||||
helpstring("IWorldObject Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IWorldObject : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property GUID")] HRESULT GUID([out, retval] long *pVal);
|
||||
[propget, id(3), helpstring("property Model")] HRESULT Model([out, retval] long *pVal);
|
||||
[propget, id(4), helpstring("property Icon")] HRESULT Icon([out, retval] long *pVal);
|
||||
[propget, id(5), helpstring("property Name")] HRESULT Name([out, retval] BSTR *pVal);
|
||||
[propget, id(6), helpstring("property Value")] HRESULT Value([out, retval] long *pVal);
|
||||
[propget, id(7), helpstring("property Container")] HRESULT Container([out, retval] long *pVal);
|
||||
[propget, id(8), helpstring("property Landblock")] HRESULT Landblock([out, retval] long *pVal);
|
||||
[propget, id(9), helpstring("property Offset")] HRESULT Offset([out] float *x, [out] float *y, [out] float *z, [out, retval] short *pVal);
|
||||
[propget, id(10), helpstring("property Heading")] HRESULT Heading([out] float *x, [out] float *y, [out] float *z, [out] float *w, [out, retval] short *pVal);
|
||||
[propget, id(11), helpstring("property Type")] HRESULT Type([out, retval] enum eObjectType *pVal);
|
||||
[propget, id(12), helpstring("property ItemSlots")] HRESULT ItemSlots([out, retval] long *pVal);
|
||||
[propget, id(13), helpstring("property PackSlots")] HRESULT PackSlots([out, retval] long *pVal);
|
||||
[propget, id(14), helpstring("property Lockable")] HRESULT Lockable([out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(15), helpstring("property Inscribable")] HRESULT Inscribable([out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(16), helpstring("property UsesLeft")] HRESULT UsesLeft([out, retval] long *pVal);
|
||||
[propget, id(17), helpstring("property TotalUses")] HRESULT TotalUses([out, retval] long *pVal);
|
||||
[propget, id(18), helpstring("property StackCount")] HRESULT StackCount([out, retval] long *pVal);
|
||||
[propget, id(19), helpstring("property StackMax")] HRESULT StackMax([out, retval] long *pVal);
|
||||
[propget, id(20), helpstring("property TradeNoteVendor")] HRESULT TradeNoteVendor([out, retval] long *pVal);
|
||||
[propget, id(21), helpstring("property AssociatedSpell")] HRESULT AssociatedSpell([out, retval] long *pVal);
|
||||
[propget, id(22), helpstring("property Slot")] HRESULT Slot([out, retval] long *pVal);
|
||||
[propget, id(23), helpstring("property Owner")] HRESULT Owner([out, retval] long *pVal);
|
||||
[propget, id(24), helpstring("property Wielder")] HRESULT Wielder([out, retval] long *pVal);
|
||||
[propget, id(25), helpstring("property WieldingSlot")] HRESULT WieldingSlot([out, retval] long *pVal);
|
||||
[propget, id(26), helpstring("property Coordinates")] HRESULT Coordinates([in, out] float *NorthSouth, [in, out] float *EastWest, [out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(27), helpstring("property Distance")] HRESULT Distance([in, out] float *NorthSouth, [in, out] float *EastWest, [out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(28), helpstring("property Monarch")] HRESULT Monarch([out, retval] long *pVal);
|
||||
[propget, id(29), helpstring("property Material")] HRESULT Material([out, retval] long *pVal);
|
||||
[propget, id(30), helpstring("property Coverage")] HRESULT Coverage([out, retval] long *pVal);
|
||||
[propget, id(31), helpstring("property Coverage2")] HRESULT Coverage2([out, retval] long *pVal);
|
||||
[propget, id(32), helpstring("property Coverage3")] HRESULT Coverage3([out, retval] long *pVal);
|
||||
[propget, id(33), helpstring("property EquipType")] HRESULT EquipType([out, retval] long *pVal);
|
||||
[propget, id(34), helpstring("property ApproachDistance")] HRESULT ApproachDistance([out, retval] float *pVal);
|
||||
[propget, id(35), helpstring("property SecondaryName")] HRESULT SecondaryName([out, retval] BSTR *pVal);
|
||||
[propget, id(36), helpstring("property RawCoordinates")] HRESULT RawCoordinates([in, out] float *pX, [in, out] float *pY, float *pZ, [out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(37), helpstring("property Burden")] HRESULT Burden([out, retval] long *pVal);
|
||||
[propget, id(38), helpstring("property Workmanship")] HRESULT Workmanship([out, retval] float *pVal);
|
||||
[propget, id(39), helpstring("property IconOutline")] HRESULT IconOutline([out, retval] long *pVal);
|
||||
[propget, id(40), helpstring("property MissileType")] HRESULT MissileType([out, retval] long *pVal);
|
||||
[propget, id(41), helpstring("property TotalValue")] HRESULT TotalValue([out, retval] long *pVal);
|
||||
[propget, id(42), helpstring("property UsageMask")] HRESULT UsageMask([out, retval] long *pVal);
|
||||
[propget, id(43), helpstring("property HouseOwner")] HRESULT HouseOwner([out, retval] long *pVal);
|
||||
[propget, id(44), helpstring("property HookMask")] HRESULT HookMask([out, retval] long *pVal);
|
||||
[propget, id(45), helpstring("property HookType")] HRESULT HookType([out, retval] long *pVal);
|
||||
[propget, id(46), helpstring("property RealModel")] HRESULT RealModel([out, retval] long *pVal);
|
||||
[propget, id(47), helpstring("property Scale")] HRESULT Scale([out, retval] float* pVal);
|
||||
[propget, id(48), helpstring("property Flags")] HRESULT Flags([out, retval] long *pVal);
|
||||
[propget, id(49), helpstring("property CreateFlags1")] HRESULT CreateFlags1([out, retval] long *pVal);
|
||||
[propget, id(50), helpstring("property CreateFlags2")] HRESULT CreateFlags2([out, retval] long *pVal);
|
||||
[propget, id(51), helpstring("property ObjectFlags1")] HRESULT ObjectFlags1([out, retval] long *pVal);
|
||||
[propget, id(52), helpstring("property ObjectFlags2")] HRESULT ObjectFlags2([out, retval] long *pVal);
|
||||
[propget, id(53), helpstring("property HasIdData")] HRESULT HasIdData([out, retval] VARIANT_BOOL *pVal);
|
||||
[propget, id(54), helpstring("property ArmorLevel")] HRESULT ArmorLevel([out, retval] long *pVal);
|
||||
[propget, id(55), helpstring("property MagicDef")] HRESULT MagicDef([out, retval] long *pVal);
|
||||
[propget, id(56), helpstring("property Spellcraft")] HRESULT Spellcraft([out, retval] long *pVal);
|
||||
[propget, id(57), helpstring("property MaximumMana")] HRESULT MaximumMana([out, retval] long *pVal);
|
||||
[propget, id(58), helpstring("property LoreReq")] HRESULT LoreReq([out, retval] long *pVal);
|
||||
[propget, id(59), helpstring("property RankReq")] HRESULT RankReq([out, retval] long *pVal);
|
||||
[propget, id(60), helpstring("property SkillReq")] HRESULT SkillReq([out, retval] long *pVal);
|
||||
[propget, id(61), helpstring("property WieldReqType")] HRESULT WieldReqType([out, retval] long *pVal);
|
||||
[propget, id(62), helpstring("property WieldReqId")] HRESULT WieldReqId([out, retval] long *pVal);
|
||||
[propget, id(63), helpstring("property WieldReq")] HRESULT WieldReq([out, retval] long *pVal);
|
||||
[propget, id(64), helpstring("property TinkerCount")] HRESULT TinkerCount([out, retval] long *pVal);
|
||||
[propget, id(65), helpstring("property SkillReqId")] HRESULT SkillReqId([out, retval] long *pVal);
|
||||
[propget, id(66), helpstring("property SpecialProps")] HRESULT SpecialProps([out, retval] long *pVal);
|
||||
[propget, id(67), helpstring("property ManaCMod")] HRESULT ManaCMod([out, retval] float *pVal);
|
||||
[propget, id(68), helpstring("property SpellCount")] HRESULT SpellCount([out, retval] long *pVal);
|
||||
[propget, id(69), helpstring("property GetSpell")] HRESULT Spell([in] long index, [out, retval] long *pVal);
|
||||
[propget, id(70), helpstring("property Inscription")] HRESULT Inscription([out, retval] BSTR *pVal);
|
||||
[propget, id(71), helpstring("property WeapSpeed")] HRESULT WeapSpeed([out, retval] long *pVal);
|
||||
[propget, id(72), helpstring("property EquipSkill")] HRESULT EquipSkill([out, retval] long *pVal);
|
||||
[propget, id(73), helpstring("property DamageType")] HRESULT DamageType([out, retval] long *pVal);
|
||||
[propget, id(74), helpstring("property MaxDamage")] HRESULT MaxDamage([out, retval] long *pVal);
|
||||
[propget, id(75), helpstring("property Variance")] HRESULT Variance([out, retval] float *pVal);
|
||||
[propget, id(76), helpstring("property DefenseBonus")] HRESULT DefenseBonus([out, retval] float *pVal);
|
||||
[propget, id(77), helpstring("property AttackBonus")] HRESULT AttackBonus([out, retval] float *pVal);
|
||||
[propget, id(78), helpstring("property Range")] HRESULT Range([out, retval] float *pVal);
|
||||
[propget, id(79), helpstring("property SlashProt")] HRESULT SlashProt([out, retval] float *pVal);
|
||||
[propget, id(80), helpstring("property PierceProt")] HRESULT PierceProt([out, retval] float *pVal);
|
||||
[propget, id(81), helpstring("property BludProt")] HRESULT BludProt([out, retval] float *pVal);
|
||||
[propget, id(82), helpstring("property ColdProt")] HRESULT ColdProt([out, retval] float *pVal);
|
||||
[propget, id(83), helpstring("property FireProt")] HRESULT FireProt([out, retval] float *pVal);
|
||||
[propget, id(84), helpstring("property ElectProt")] HRESULT ElectProt([out, retval] float *pVal);
|
||||
[propget, id(85), helpstring("property RaceReq")] HRESULT RaceReq([out, retval] BSTR *pVal);
|
||||
[propget, id(86), helpstring("property DamageBonus")] HRESULT DamageBonus([out, retval] float *pVal);
|
||||
[propget, id(87), helpstring("property AcidProt")] HRESULT AcidProt([out, retval] float *pVal);
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(6D7556DA-19D1-4be3-BC18-357FEE292649),
|
||||
dual,
|
||||
helpstring("IWorldObject2 Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IWorldObject2 : IUnknown
|
||||
{
|
||||
[propget, id(1), helpstring("property Flags")] HRESULT Flags([out, retval] long *pVal);
|
||||
[propget, id(2), helpstring("property CreateFlags1")] HRESULT CreateFlags1([out, retval] long *pVal);
|
||||
[propget, id(3), helpstring("property CreateFlags2")] HRESULT CreateFlags2([out, retval] long *pVal);
|
||||
[propget, id(4), helpstring("property ObjectFlags1")] HRESULT ObjectFlags1([out, retval] long *pVal);
|
||||
[propget, id(5), helpstring("property ObjectFlags2")] HRESULT ObjectFlags2([out, retval] long *pVal);
|
||||
};
|
||||
|
||||
[
|
||||
uuid(175F99F1-B937-47C5-846E-CACBB986AFD9),
|
||||
helpstring("IWorldEvents Interface")
|
||||
]
|
||||
dispinterface IWorldEvents
|
||||
{
|
||||
properties:
|
||||
methods:
|
||||
[id(1), helpstring("method CreateObject")] HRESULT CreateObject(IWorldObject *pObject);
|
||||
[id(2), helpstring("method ReleaseObject")] HRESULT ReleaseObject(IWorldObject *pObject);
|
||||
[id(3), helpstring("method ChangeObject")] HRESULT ChangeObject(IWorldObject *pObject, BSTR Change);
|
||||
[id(4), helpstring("method MovedObject")] HRESULT MoveObject(IWorldObject *pObject);
|
||||
[id(5), helpstring("method ReleaseDone")] HRESULT ReleaseDone();
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(6FC29250-9FB4-4A0C-AF16-329E35DF02F2),
|
||||
dual,
|
||||
helpstring("IWorldIterator Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IWorldIterator : IDispatch
|
||||
{
|
||||
[propget, hidden, id(1), helpstring("property Next_Old")] HRESULT Next_Old([out, retval] IWorldObject * *pVal);
|
||||
[id(2), helpstring("Resets the iterator back to its starting position")] HRESULT Reset();
|
||||
[propget, id(3), helpstring("The number of stacks in the iterator")] HRESULT Count([out, retval] long *pVal);
|
||||
[propget, id(4), helpstring("The next object in the iterator")] HRESULT Next([in, out] IWorldObject **ppObject, [out, retval] VARIANT_BOOL *pVal);
|
||||
[id(5), helpstring("Removes the last search criteria object from the list")] HRESULT Pop();
|
||||
[id(6), helpstring("method ByName")] HRESULT ByName(BSTR strName);
|
||||
[id(7), helpstring("method ByNameSubstring")] HRESULT ByNameSubstring(BSTR strSubstring);
|
||||
[id(8), helpstring("method ByType")] HRESULT ByType(enum eObjectType Type);
|
||||
[id(9), helpstring("method ByAll")] HRESULT ByAll();
|
||||
[id(10), helpstring("method ByInventory")] HRESULT ByInventory();
|
||||
[id(11), helpstring("method ByContainer")] HRESULT ByContainer(long nContainer);
|
||||
[propget, id(12), helpstring("The number of items in this iterator")] HRESULT Quantity([out, retval] long *pVal);
|
||||
[id(13), helpstring("method ByOwner")] HRESULT ByOwner(long nOwner);
|
||||
[id(14), helpstring("method ByLandscape")] HRESULT ByLandscape();
|
||||
};
|
||||
|
||||
[
|
||||
uuid(53092D1B-F0B0-46FF-BF11-8F031EC9B137),
|
||||
helpstring("World Class")
|
||||
]
|
||||
coclass World
|
||||
{
|
||||
[default] interface IWorld;
|
||||
[default, source] dispinterface IWorldEvents;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(50A7E9EC-AB12-4484-9C28-C2A39274A636),
|
||||
helpstring("WorldObject Class")
|
||||
]
|
||||
coclass WorldObject
|
||||
{
|
||||
[default] interface IWorldObject;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(A34E27C6-0403-4027-908D-BABF23919E83),
|
||||
helpstring("WorldObject2 Class")
|
||||
]
|
||||
coclass WorldObject2
|
||||
{
|
||||
[default] interface IWorldObject2;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(2681B113-294E-4ABF-B543-624194846BE1),
|
||||
helpstring("WorldIterator Class")
|
||||
]
|
||||
coclass WorldIterator
|
||||
{
|
||||
[default] interface IWorldIterator;
|
||||
};
|
||||
|
||||
[
|
||||
uuid(B0C05A9A-273D-4BC4-B7BA-E27CF94C8EF4),
|
||||
helpstring("IdentifyQueue Class")
|
||||
]
|
||||
coclass IdentifyQueue
|
||||
{
|
||||
[default] interface IIdentifyQueue;
|
||||
};
|
||||
};
|
||||
|
||||
146
Native/DecalFilters/DecalFilters.rc
Normal file
146
Native/DecalFilters/DecalFilters.rc
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "..\Include\DecalVersion.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"1 TYPELIB ""DecalFilters.tlb""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION DECAL_MAJOR, DECAL_MINOR, DECAL_BUGFIX, DECAL_RELEASE
|
||||
PRODUCTVERSION DECAL_MAJOR, DECAL_MINOR, DECAL_BUGFIX, DECAL_RELEASE
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "DecalFilters gives plug-in developers interfaces for monitoring client/server messages"
|
||||
VALUE "FileDescription", "DecalFilters Module"
|
||||
VALUE "FileVersion", DECAL_VERSION_STRING
|
||||
VALUE "InternalName", "DecalFilters"
|
||||
VALUE "LegalCopyright", "Copyright 2001"
|
||||
VALUE "OriginalFilename", "DecalFilters.DLL"
|
||||
VALUE "ProductName", "DecalFilters Module"
|
||||
VALUE "ProductVersion", DECAL_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
|
||||
IDR_WORLD REGISTRY "World.rgs"
|
||||
IDR_WORLDOBJECT REGISTRY "WorldObject.rgs"
|
||||
IDR_WORLDITERATOR REGISTRY "WorldIterator.rgs"
|
||||
IDR_IDENTIFYQUEUE REGISTRY "IdentifyQueue.rgs"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROJNAME "DecalFilters"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (Canada) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// REGISTRY
|
||||
//
|
||||
|
||||
IDR_ECHOFILTER REGISTRY "EchoFilter.rgs"
|
||||
IDR_CHARACTERSTATS REGISTRY "CharacterStats.rgs"
|
||||
IDR_PREFILTER REGISTRY "Prefilter.rgs"
|
||||
IDR_ECHOFILTER2 REGISTRY "EchoFilter2.rgs"
|
||||
#endif // English (Canada) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
1 TYPELIB "DecalFilters.tlb"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
597
Native/DecalFilters/DecalFilters.vcproj
Normal file
597
Native/DecalFilters/DecalFilters.vcproj
Normal file
|
|
@ -0,0 +1,597 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="DecalFilters"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release MinDependency|Win32"
|
||||
OutputDirectory=".\..\Release"
|
||||
IntermediateDirectory=".\ReleaseMinDependency"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
GlobalOptimizations="TRUE"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
FavorSizeOrSpeed="2"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="..\Include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\ReleaseMinDependency/DecalFilters.pch"
|
||||
AssemblerListingLocation=".\ReleaseMinDependency/"
|
||||
ObjectFile=".\ReleaseMinDependency/"
|
||||
ProgramDataBaseFileName=".\ReleaseMinDependency/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="TRUE"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib"
|
||||
OutputFile=".\..\Release/DecalFilters.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories="..\Release"
|
||||
ModuleDefinitionFile=".\DecalFilters.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\..\Release/DecalFilters.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary=".\..\Release/DecalFilters.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
AdditionalIncludeDirectories="..\Include"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="TRUE"
|
||||
TypeLibraryName=".\..\Release/DecalFilters.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="4105"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\..\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\Include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="3"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
PrecompiledHeaderFile=".\Debug/DecalFilters.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="TRUE"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib"
|
||||
OutputFile=".\..\Debug/DecalFilters.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\DecalFilters.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\..\Debug/DecalFilters.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary=".\..\Debug/DecalFilters.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
AdditionalIncludeDirectories="..\Include"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="TRUE"
|
||||
TypeLibraryName=".\..\Debug/DecalFilters.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="4105"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="AllegianceInfo.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="AttributeInfo.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CharacterStats.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DecalFilters.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DecalFilters.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DecalFilters.idl">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\DecalFilters.tlb"
|
||||
HeaderFileName="DecalFilters.h"
|
||||
InterfaceIdentifierFileName="DecalFilters_i.c"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\DecalFilters.tlb"
|
||||
HeaderFileName="DecalFilters.h"
|
||||
InterfaceIdentifierFileName="DecalFilters_i.c"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DecalFilters.rc">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="$(OUTDIR)"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
AdditionalIncludeDirectories="$(OUTDIR)"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="EchoFilter.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="EchoFilter2.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Enchantment.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IdentifyQueue.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Prefilter.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="SkillInfo.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
UsePrecompiledHeader="1"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
UsePrecompiledHeader="1"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="World.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WorldIterator.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WorldObject.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release MinDependency|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="AllegianceInfo.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="AttributeInfo.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CharacterStats.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DecalFiltersCP.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="EchoFilter.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="EchoFilter2.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Enchantment.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="FilterImpl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IdentifyQueue.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Prefilter.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="SkillInfo.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="StdAfx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="World.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WorldIterator.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WorldObject.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
<File
|
||||
RelativePath="AllegianceInfo.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CharacterStats.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="EchoFilter.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="EchoFilter2.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Enchantment.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="IdentifyQueue.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Prefilter.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="World.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WorldIterator.rgs">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="WorldObject.rgs">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
347
Native/DecalFilters/DecalFiltersCP.h
Normal file
347
Native/DecalFilters/DecalFiltersCP.h
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
#ifndef _DECALFILTERSCP_H_
|
||||
#define _DECALFILTERSCP_H_
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
class CProxyIEchoSink2 : public IConnectionPointImpl<T, &DIID_IEchoSink2, CComDynamicUnkArray>
|
||||
{
|
||||
//Warning this class may be recreated by the wizard.
|
||||
public:
|
||||
VOID Fire_EchoServer(IMessage2 * pMsg)
|
||||
{
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
pvars[0] = pMsg;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
|
||||
}
|
||||
VOID Fire_EchoClient(IMessage2 * pMsg)
|
||||
{
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
pvars[0] = pMsg;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class CProxyIEchoSink : public IConnectionPointImpl<T, &DIID_IEchoSink, CComDynamicUnkArray>
|
||||
{
|
||||
//Warning this class may be recreated by the wizard.
|
||||
public:
|
||||
VOID Fire_EchoMessage(IMessage * pMsg)
|
||||
{
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
pvars[0] = pMsg;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
class CProxyIPrefilterEvents : public IConnectionPointImpl<T, &DIID_IPrefilterEvents, CComDynamicUnkArray>
|
||||
{
|
||||
//Warning this class may be recreated by the wizard.
|
||||
public:
|
||||
VOID Fire_Event(LONG ID, IMessage * Message)
|
||||
{
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[2];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
pvars[1] = ID;
|
||||
pvars[0] = Message;
|
||||
DISPPARAMS disp = { pvars, NULL, 2, 0 };
|
||||
pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
class CProxyIWorldEvents : public IConnectionPointImpl<T, &DIID_IWorldEvents, CComDynamicUnkArray>
|
||||
{
|
||||
//Warning this class may be recreated by the wizard.
|
||||
public:
|
||||
HRESULT Fire_CreateObject(IWorldObject * pObject)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[0] = pObject;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
}
|
||||
|
||||
HRESULT Fire_ReleaseObject(IWorldObject * pObject)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[0] = pObject;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
}
|
||||
|
||||
HRESULT Fire_MovedObject(IWorldObject * pObject)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[0] = pObject;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x4, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
}
|
||||
|
||||
HRESULT Fire_ChangeObject(IWorldObject * pObject, BSTR Change)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[2];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[1] = pObject;
|
||||
pvars[0] = Change;
|
||||
DISPPARAMS disp = { pvars, NULL, 2, 0 };
|
||||
pDispatch->Invoke(0x3, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
}
|
||||
|
||||
HRESULT Fire_ReleaseDone()
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
DISPPARAMS disp = { NULL, NULL, 0, 0 };
|
||||
pDispatch->Invoke(0x5, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return varResult.scode;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class CProxyICharacterStatsEvents : public IConnectionPointImpl<T, &DIID_ICharacterStatsEvents, CComDynamicUnkArray>
|
||||
{
|
||||
//Warning this class may be recreated by the wizard.
|
||||
public:
|
||||
HRESULT Fire_Login(LONG character)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[0] = character;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x1, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
|
||||
}
|
||||
HRESULT Fire_Spellbook_Add(LONG SpellAdded)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[0] = SpellAdded;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
|
||||
}
|
||||
HRESULT Fire_Spellbook_Delete(LONG SpellDeleted)
|
||||
{
|
||||
CComVariant varResult;
|
||||
T* pT = static_cast<T*>(this);
|
||||
int nConnectionIndex;
|
||||
CComVariant* pvars = new CComVariant[1];
|
||||
int nConnections = m_vec.GetSize();
|
||||
|
||||
for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
|
||||
{
|
||||
pT->Lock();
|
||||
CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
|
||||
pT->Unlock();
|
||||
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
|
||||
if (pDispatch != NULL)
|
||||
{
|
||||
VariantClear(&varResult);
|
||||
pvars[0] = SpellDeleted;
|
||||
DISPPARAMS disp = { pvars, NULL, 1, 0 };
|
||||
pDispatch->Invoke(0x3, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
|
||||
}
|
||||
}
|
||||
delete[] pvars;
|
||||
return varResult.scode;
|
||||
|
||||
}
|
||||
};
|
||||
#endif
|
||||
11
Native/DecalFilters/DecalFiltersps.def
Normal file
11
Native/DecalFilters/DecalFiltersps.def
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
LIBRARY "DecalFiltersPS"
|
||||
|
||||
DESCRIPTION 'Proxy/Stub DLL'
|
||||
|
||||
EXPORTS
|
||||
DllGetClassObject @1 PRIVATE
|
||||
DllCanUnloadNow @2 PRIVATE
|
||||
GetProxyDllInfo @3 PRIVATE
|
||||
DllRegisterServer @4 PRIVATE
|
||||
DllUnregisterServer @5 PRIVATE
|
||||
16
Native/DecalFilters/DecalFiltersps.mk
Normal file
16
Native/DecalFilters/DecalFiltersps.mk
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
DecalFiltersps.dll: dlldata.obj DecalFilters_p.obj DecalFilters_i.obj
|
||||
link /dll /out:DecalFiltersps.dll /def:DecalFiltersps.def /entry:DllMain dlldata.obj DecalFilters_p.obj DecalFilters_i.obj \
|
||||
kernel32.lib rpcndr.lib rpcns4.lib rpcrt4.lib oleaut32.lib uuid.lib \
|
||||
|
||||
.c.obj:
|
||||
cl /c /Ox /DWIN32 /D_WIN32_WINNT=0x0400 /DREGISTER_PROXY_DLL \
|
||||
$<
|
||||
|
||||
clean:
|
||||
@del DecalFiltersps.dll
|
||||
@del DecalFiltersps.lib
|
||||
@del DecalFiltersps.exp
|
||||
@del dlldata.obj
|
||||
@del DecalFilters_p.obj
|
||||
@del DecalFilters_i.obj
|
||||
15
Native/DecalFilters/EchoFilter.cpp
Normal file
15
Native/DecalFilters/EchoFilter.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// EchoFilter.cpp : Implementation of cEchoFilter
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "EchoFilter.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cEchoFilter
|
||||
|
||||
|
||||
STDMETHODIMP cEchoFilter::Dispatch(IMessage *pMsg)
|
||||
{
|
||||
Fire_EchoMessage( pMsg );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
47
Native/DecalFilters/EchoFilter.h
Normal file
47
Native/DecalFilters/EchoFilter.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
// EchoFilter.h : Declaration of the cEchoFilter
|
||||
|
||||
#ifndef __ECHOFILTER_H_
|
||||
#define __ECHOFILTER_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "DecalFiltersCP.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cEchoFilter
|
||||
class ATL_NO_VTABLE cEchoFilter :
|
||||
public CComObjectRootEx<CComMultiThreadModel>,
|
||||
public CComCoClass<cEchoFilter, &CLSID_EchoFilter>,
|
||||
public IDispatchImpl< IEcho, &IID_IEcho, &LIBID_DecalFilters >,
|
||||
public IDispatchImpl< INetworkFilter, &IID_INetworkFilter, &LIBID_DecalNet >,
|
||||
public IProvideClassInfo2Impl< &CLSID_EchoFilter, &DIID_IEchoSink, &LIBID_DecalFilters >,
|
||||
public IConnectionPointContainerImpl<cEchoFilter>,
|
||||
public CProxyIEchoSink< cEchoFilter >
|
||||
{
|
||||
public:
|
||||
cEchoFilter()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_ECHOFILTER)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cEchoFilter)
|
||||
COM_INTERFACE_ENTRY(INetworkFilter)
|
||||
COM_INTERFACE_ENTRY(IEcho)
|
||||
COM_INTERFACE_ENTRY2(IDispatch,INetworkFilter)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo2)
|
||||
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
|
||||
END_COM_MAP()
|
||||
|
||||
BEGIN_CONNECTION_POINT_MAP(cEchoFilter)
|
||||
CONNECTION_POINT_ENTRY(DIID_IEchoSink)
|
||||
END_CONNECTION_POINT_MAP()
|
||||
|
||||
// IEchoFilter
|
||||
public:
|
||||
STDMETHOD(Dispatch)(IMessage *);
|
||||
};
|
||||
|
||||
#endif //__ECHOFILTER_H_
|
||||
39
Native/DecalFilters/EchoFilter.rgs
Normal file
39
Native/DecalFilters/EchoFilter.rgs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.EchoFilter.1 = s 'DecalFilters EchoFilter'
|
||||
{
|
||||
CLSID = s '{8C2FA400-315D-41DE-B063-D6EF04F12E1F}'
|
||||
}
|
||||
DecalFilters.EchoFilter = s 'DecalFilters EchoFilter'
|
||||
{
|
||||
CLSID = s '{8C2FA400-315D-41DE-B063-D6EF04F12E1F}'
|
||||
CurVer = s 'DecalFilters.EchoFilter.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {8C2FA400-315D-41DE-B063-D6EF04F12E1F} = s 'DecalFilters EchoFilter'
|
||||
{
|
||||
ProgID = s 'DecalFilters.EchoFilter.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.EchoFilter'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Both'
|
||||
}
|
||||
'TypeLib' = s '{3559E08B-827E-4DFE-9D33-3567246849CC}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Decal
|
||||
{
|
||||
NoRemove NetworkFilters
|
||||
{
|
||||
val {8C2FA400-315D-41DE-B063-D6EF04F12E1F} = d '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
Native/DecalFilters/EchoFilter2.cpp
Normal file
22
Native/DecalFilters/EchoFilter2.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// EchoFilter.cpp : Implementation of cEchoFilter
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "EchoFilter2.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cEchoFilter
|
||||
|
||||
|
||||
STDMETHODIMP cEchoFilter2::DispatchServer(IMessage2 *pMsg)
|
||||
{
|
||||
Fire_EchoServer( pMsg );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cEchoFilter2::DispatchClient(IMessage2 *pMsg)
|
||||
{
|
||||
Fire_EchoClient( pMsg );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
49
Native/DecalFilters/EchoFilter2.h
Normal file
49
Native/DecalFilters/EchoFilter2.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
// EchoFilter.h : Declaration of the cEchoFilter
|
||||
|
||||
#ifndef __ECHOFILTER2_H_
|
||||
#define __ECHOFILTER2_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include <DecalNetImpl.h>
|
||||
#include "DecalFiltersCP.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cEchoFilter
|
||||
class ATL_NO_VTABLE cEchoFilter2 :
|
||||
public CComObjectRootEx<CComMultiThreadModel>,
|
||||
public CComCoClass<cEchoFilter2, &CLSID_EchoFilter2>,
|
||||
public ISoloNetworkFilterImpl< cEchoFilter2 >,
|
||||
public IProvideClassInfo2Impl< &CLSID_EchoFilter2, &DIID_IEchoSink2, &LIBID_DecalFilters >,
|
||||
public IConnectionPointContainerImpl<cEchoFilter2>,
|
||||
public IDispatchImpl<IEcho2, &IID_IEcho2, &LIBID_DecalFilters >,
|
||||
public CProxyIEchoSink2< cEchoFilter2 >
|
||||
{
|
||||
public:
|
||||
cEchoFilter2()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_ECHOFILTER2)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cEchoFilter2)
|
||||
COM_INTERFACE_ENTRY(IEcho2)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY(INetworkFilter2)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo2)
|
||||
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
|
||||
END_COM_MAP()
|
||||
|
||||
BEGIN_CONNECTION_POINT_MAP(cEchoFilter2)
|
||||
CONNECTION_POINT_ENTRY(DIID_IEchoSink2)
|
||||
END_CONNECTION_POINT_MAP()
|
||||
|
||||
// IEchoFilter2
|
||||
public:
|
||||
STDMETHOD(DispatchServer)(IMessage2 *);
|
||||
STDMETHOD(DispatchClient)(IMessage2 *);
|
||||
};
|
||||
|
||||
#endif //__ECHOFILTER2_H_
|
||||
42
Native/DecalFilters/EchoFilter2.rgs
Normal file
42
Native/DecalFilters/EchoFilter2.rgs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.EchoFilter2.1 = s 'DecalFilters EchoFilter'
|
||||
{
|
||||
CLSID = s '{34239EAD-6317-4c40-A405-193BA5232DD8}'
|
||||
}
|
||||
DecalFilters.EchoFilter2 = s 'DecalFilters EchoFilter'
|
||||
{
|
||||
CLSID = s '{34239EAD-6317-4c40-A405-193BA5232DD8}'
|
||||
CurVer = s 'DecalFilters.EchoFilter2.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {34239EAD-6317-4c40-A405-193BA5232DD8} = s 'DecalFilters EchoFilter2'
|
||||
{
|
||||
ProgID = s 'DecalFilters.EchoFilter2.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.EchoFilter2'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Both'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Decal
|
||||
{
|
||||
NoRemove NetworkFilters
|
||||
{
|
||||
ForceRemove {34239EAD-6317-4c40-A405-193BA5232DD8} = s 'Echo Filter 2'
|
||||
{
|
||||
val Enabled = d '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
106
Native/DecalFilters/Enchantment.cpp
Normal file
106
Native/DecalFilters/Enchantment.cpp
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
// Enchantment.cpp : Implementation of CDecalFiltersApp and DLL registration.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "Enchantment.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
STDMETHODIMP Enchantment::get_SpellID(long *pVal)
|
||||
{
|
||||
*pVal = SpellID;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_SpellID(long newVal)
|
||||
{
|
||||
SpellID = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::get_Layer(long *pVal)
|
||||
{
|
||||
*pVal = Layer;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_Layer(long newVal)
|
||||
{
|
||||
Layer = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::get_TimeRemaining(long *pVal)
|
||||
{
|
||||
*pVal = SecondsLeft;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_TimeRemaining(long newVal)
|
||||
{
|
||||
SecondsLeft = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::get_Affected(long *pVal)
|
||||
{
|
||||
*pVal = Affected;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_Affected(long newVal)
|
||||
{
|
||||
Affected = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::get_AffectedMask(long *pVal)
|
||||
{
|
||||
*pVal = AffectMask;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_AffectedMask(long newVal)
|
||||
{
|
||||
AffectMask = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::get_Family(long *pVal)
|
||||
{
|
||||
*pVal = Family;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_Family(long newVal)
|
||||
{
|
||||
Family = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::get_Adjustment(double *pVal)
|
||||
{
|
||||
*pVal = Adjustment;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP Enchantment::put_Adjustment(double newVal)
|
||||
{
|
||||
Adjustment = newVal;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
56
Native/DecalFilters/Enchantment.h
Normal file
56
Native/DecalFilters/Enchantment.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
// Enchantment.h: Definition of the Enchantment class
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_ENCHANTMENT_H__C2D64F56_5FD0_43CD_9E1D_C9981D1F98C5__INCLUDED_)
|
||||
#define AFX_ENCHANTMENT_H__C2D64F56_5FD0_43CD_9E1D_C9981D1F98C5__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
#include "CharacterStats.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Enchantment
|
||||
|
||||
class Enchantment :
|
||||
public IDispatchImpl<IEnchantment, &IID_IEnchantment, &LIBID_DecalFilters>,
|
||||
public CComObjectRoot,
|
||||
public CComCoClass<Enchantment,&CLSID_Enchantment>
|
||||
{
|
||||
public:
|
||||
Enchantment() {}
|
||||
|
||||
BEGIN_COM_MAP(Enchantment)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY(IEnchantment)
|
||||
END_COM_MAP()
|
||||
|
||||
//DECLARE_REGISTRY_RESOURCEID(IDR_Enchantment)
|
||||
|
||||
private:
|
||||
long SpellID, Layer, SecondsLeft, Affected, AffectMask, Family;
|
||||
double Adjustment;
|
||||
|
||||
|
||||
// IEnchantment
|
||||
public:
|
||||
STDMETHOD(get_Adjustment)(/*[out, retval]*/ double *pVal);
|
||||
STDMETHOD(put_Adjustment)(/*[in]*/ double newVal);
|
||||
STDMETHOD(get_Family)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(put_Family)(/*[in]*/ long newVal);
|
||||
STDMETHOD(get_AffectedMask)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(put_AffectedMask)(/*[in]*/ long newVal);
|
||||
STDMETHOD(get_Affected)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(put_Affected)(/*[in]*/ long newVal);
|
||||
STDMETHOD(get_TimeRemaining)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(put_TimeRemaining)(/*[in]*/ long newVal);
|
||||
STDMETHOD(get_Layer)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(put_Layer)(/*[in]*/ long newVal);
|
||||
STDMETHOD(get_SpellID)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(put_SpellID)(/*[in]*/ long newVal);
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_ENCHANTMENT_H__C2D64F56_5FD0_43CD_9E1D_C9981D1F98C5__INCLUDED_)
|
||||
23
Native/DecalFilters/Enchantment.rgs
Normal file
23
Native/DecalFilters/Enchantment.rgs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.Enchantment.1 = s 'Enchantment Class'
|
||||
{
|
||||
CLSID = s '{5DCF056E-B7F5-4AEB-93A0-628617B28488}'
|
||||
}
|
||||
DecalFilters.Enchantment = s 'Enchantment Class'
|
||||
{
|
||||
CLSID = s '{5DCF056E-B7F5-4AEB-93A0-628617B28488}'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {5DCF056E-B7F5-4AEB-93A0-628617B28488} = s 'Enchantment Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.Enchantment.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.Enchantment'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'both'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Native/DecalFilters/FilterImpl.h
Normal file
80
Native/DecalFilters/FilterImpl.h
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
// FilterImpl.h
|
||||
// Declaration of template classes to help network filters
|
||||
|
||||
#ifndef __FILTERIMPL_H
|
||||
#define __FILTERIMPL_H
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< UINT nID, class cImpl, const IID *pIID >
|
||||
class IFilterEventsImpl
|
||||
: public IDispEventImpl< nID, cImpl, pIID, &LIBID_DecalFilters, 1, 0 >
|
||||
{
|
||||
public:
|
||||
HRESULT advise( IUnknown *pUnk )
|
||||
{
|
||||
return DispEventAdvise( pUnk );
|
||||
}
|
||||
|
||||
HRESULT unadvise( IUnknown *pUnk )
|
||||
{
|
||||
return DispEventUnadvise( pUnk );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< UINT nID, class cImpl >
|
||||
class IWorldEventsImpl
|
||||
: public IFilterEventsImpl< nID, cImpl, &DIID_IWorldEvents >
|
||||
{
|
||||
};
|
||||
|
||||
#define DISPID_CREATE_OBJECT 1
|
||||
#define DISPID_RELEASE_OBJECT 2
|
||||
#define DISPID_CHANGE_OBJECT 3
|
||||
#define DISPID_MOVED_OBJECT 4
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< UINT nID, class cImpl >
|
||||
class IEchoEventsImpl
|
||||
: public IFilterEventsImpl< nID, cImpl, &DIID_IEchoSink >
|
||||
{
|
||||
};
|
||||
|
||||
#define DISPID_ECHO_MESSAGE 1
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< UINT nID, class cImpl >
|
||||
class IEcho2EventsImpl
|
||||
: public IFilterEventsImpl< nID, cImpl, &DIID_IEchoSink2 >
|
||||
{
|
||||
};
|
||||
|
||||
#define DISPID_ECHO_SERVER 1
|
||||
#define DISPID_ECHO_CLIENT 2
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template< UINT nID, class cImpl >
|
||||
class ICharacterStatsEventsImpl
|
||||
: public IFilterEventsImpl< nID, cImpl, &DIID_ICharacterStatsEvents >
|
||||
{
|
||||
};
|
||||
|
||||
#define DISPID_LOGIN 1
|
||||
#define DISPID_SPELLBOOK_ADD 2
|
||||
#define DISPID_SPELLBOOK_DELETE 3
|
||||
|
||||
#endif
|
||||
212
Native/DecalFilters/IdentifyQueue.cpp
Normal file
212
Native/DecalFilters/IdentifyQueue.cpp
Normal file
|
|
@ -0,0 +1,212 @@
|
|||
// IdentifyQueue.cpp : Implementation of CIdentifyQueue
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "IdentifyQueue.h"
|
||||
|
||||
// Timeout in millisec to re-request ID
|
||||
#define TIMEOUT 700
|
||||
|
||||
|
||||
|
||||
enum AcMessages
|
||||
{
|
||||
msgGameEvent = 0xF7B0,
|
||||
msgUnknown = 0
|
||||
};
|
||||
|
||||
enum AcGameEvents
|
||||
{
|
||||
gevIDItem = 0x00C9,
|
||||
gevUnknown = 0
|
||||
};
|
||||
|
||||
// CIdentifyQueue
|
||||
HRESULT CIdentifyQueue::onInitialize()
|
||||
{
|
||||
if( m_pService->get_Decal( &m_pDecal ) == S_OK )
|
||||
{
|
||||
if( m_pDecal->get_Hooks( &m_pHooks ) == S_OK )
|
||||
{
|
||||
m_pHooks->SetIDFilter( this );
|
||||
|
||||
long lRequestIDMemloc;
|
||||
if( m_pHooks->QueryMemLoc( _bstr_t( "ItemEventAppraise" ), &lRequestIDMemloc ) == S_OK )
|
||||
{
|
||||
if( lRequestIDMemloc != 0 )
|
||||
{
|
||||
m_pfRequestFunc = reinterpret_cast< RequestPtr >( lRequestIDMemloc );
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
m_pfRequestFunc = NULL;
|
||||
m_pService.Release();
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
HRESULT CIdentifyQueue::onTerminate()
|
||||
{
|
||||
m_pDecal.Release();
|
||||
m_pHooks.Release();
|
||||
|
||||
m_pfRequestFunc = NULL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CIdentifyQueue::DispatchServer( IMessage2 *pMsg )
|
||||
{
|
||||
long lType;
|
||||
pMsg->get_Type( &lType );
|
||||
|
||||
CComPtr< IMessageIterator > pMembers;
|
||||
pMsg->get_Begin( &pMembers );
|
||||
|
||||
switch( lType )
|
||||
{
|
||||
case msgGameEvent: MsgGameEvent( pMembers ); break;
|
||||
}
|
||||
|
||||
if( m_Queue.empty() )
|
||||
return S_OK;
|
||||
|
||||
// Check for timeout...
|
||||
if( m_bWaiting )
|
||||
{
|
||||
if( abs( m_Queue[0]->lTime - timeGetTime() ) > TIMEOUT )
|
||||
{
|
||||
if( ++m_lAttempts >= 3 )
|
||||
{
|
||||
m_lAttempts = 0;
|
||||
m_Queue.erase( m_Queue.begin() );
|
||||
m_bWaiting = false;
|
||||
Request();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
m_Queue[0]->lTime = timeGetTime();
|
||||
m_bWaiting = false;
|
||||
Request();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CIdentifyQueue::AddToQueue( long lObjectID )
|
||||
{
|
||||
if( lObjectID == 0 )
|
||||
return S_OK;
|
||||
|
||||
if( !m_Queue.empty() )
|
||||
{
|
||||
for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); ++pDeque )
|
||||
{
|
||||
if( (*pDeque)->lObjectID == lObjectID )
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
IDStruct *QueueObj = new IDStruct();
|
||||
QueueObj->lObjectID = lObjectID;
|
||||
QueueObj->lTime = timeGetTime();
|
||||
m_Queue.push_back( QueueObj );
|
||||
|
||||
if( !m_bWaiting )
|
||||
Request();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CIdentifyQueue::ShortcircuitID( long lObjectID )
|
||||
{
|
||||
m_lLastManualAttempt = lObjectID;
|
||||
|
||||
if( !m_Queue.empty() )
|
||||
{
|
||||
for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); ++pDeque )
|
||||
{
|
||||
if ( (*pDeque)->lObjectID == lObjectID )
|
||||
{
|
||||
m_Queue.erase( pDeque );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IDStruct *QueueObj = new IDStruct();
|
||||
QueueObj->lObjectID = lObjectID;
|
||||
QueueObj->lTime = timeGetTime();
|
||||
m_Queue.push_front( QueueObj );
|
||||
|
||||
if( !m_bWaiting )
|
||||
Request();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CIdentifyQueue::MsgGameEvent( IMessageIterator *pMembers )
|
||||
{
|
||||
long lEvent;
|
||||
pMembers->get_NextInt( _bstr_t( "event" ), &lEvent );
|
||||
|
||||
switch( lEvent )
|
||||
{
|
||||
case gevIDItem: MsgIDItem( pMembers ); break;
|
||||
}
|
||||
}
|
||||
|
||||
void CIdentifyQueue::MsgIDItem( IMessageIterator *pMembers )
|
||||
{
|
||||
if( m_Queue.empty() )
|
||||
return;
|
||||
|
||||
long lObjectID;
|
||||
pMembers->get_NextInt( _bstr_t( "object" ), &lObjectID );
|
||||
|
||||
|
||||
for( IDContainer::iterator pDeque = m_Queue.begin(); pDeque != m_Queue.end(); pDeque++ )
|
||||
{
|
||||
if ( (*pDeque)->lObjectID == lObjectID )
|
||||
{
|
||||
m_lAttempts = 0;
|
||||
pDeque = m_Queue.erase( pDeque );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( m_bWaiting )
|
||||
{
|
||||
m_bWaiting = false;
|
||||
Request();
|
||||
}
|
||||
}
|
||||
|
||||
void CIdentifyQueue::Request()
|
||||
{
|
||||
if( !m_bWaiting )
|
||||
{
|
||||
if( m_Queue.empty() )
|
||||
{
|
||||
m_pfRequestFunc( 0 );
|
||||
return;
|
||||
}
|
||||
|
||||
IDStruct *pQueueBegin = *m_Queue.begin();
|
||||
|
||||
m_pfRequestFunc( pQueueBegin->lObjectID );
|
||||
m_bWaiting = true;
|
||||
|
||||
if( pQueueBegin->lObjectID == 0 )
|
||||
{
|
||||
m_bWaiting = false;
|
||||
m_Queue.erase( m_Queue.begin() );
|
||||
Request();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Native/DecalFilters/IdentifyQueue.h
Normal file
80
Native/DecalFilters/IdentifyQueue.h
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
// IdentifyQueue.h : Declaration of the CIdentifyQueue
|
||||
|
||||
#ifndef __IDQUEUE_H_
|
||||
#define __IDQUEUE_H_
|
||||
|
||||
#pragma once
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "DecalFilters.h"
|
||||
#include "DecalNetImpl.h"
|
||||
#include "..\include\decal.h"
|
||||
#include <deque>
|
||||
|
||||
typedef void(*RequestPtr)( long );
|
||||
|
||||
struct IDStruct
|
||||
{
|
||||
long lObjectID;
|
||||
long lTime;
|
||||
};
|
||||
|
||||
// CIdentifyQueue
|
||||
|
||||
class ATL_NO_VTABLE CIdentifyQueue :
|
||||
public IKitchenSink,
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<CIdentifyQueue, &CLSID_IdentifyQueue>,
|
||||
public IDispatchImpl<IIdentifyQueue, &IID_IIdentifyQueue, &LIBID_DecalFilters, /*wMajor =*/ 1, /*wMinor =*/ 0>,
|
||||
public INetworkFilterImpl<CIdentifyQueue>
|
||||
{
|
||||
public:
|
||||
CIdentifyQueue()
|
||||
{
|
||||
m_bWaiting = false;
|
||||
m_lAttempts = 0;
|
||||
m_lLastManualAttempt = 0;
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_IDENTIFYQUEUE)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(CIdentifyQueue)
|
||||
COM_INTERFACE_ENTRY(IIdentifyQueue)
|
||||
COM_INTERFACE_ENTRY(INetworkFilter2)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
private:
|
||||
CComPtr< IDecal > m_pDecal;
|
||||
CComPtr< IACHooks > m_pHooks;
|
||||
|
||||
typedef std::deque< IDStruct * > IDContainer;
|
||||
|
||||
IDContainer m_Queue;
|
||||
bool m_bWaiting;
|
||||
long m_lAttempts;
|
||||
long m_lLastManualAttempt;
|
||||
|
||||
// Id Func pointer
|
||||
RequestPtr m_pfRequestFunc;
|
||||
|
||||
void MsgGameEvent( IMessageIterator *pMembers );
|
||||
void MsgIDItem( IMessageIterator *pMembers );
|
||||
|
||||
void Request();
|
||||
|
||||
public:
|
||||
// INetworkFilterImpl
|
||||
HRESULT onInitialize();
|
||||
HRESULT onTerminate();
|
||||
|
||||
// INetworkFilter
|
||||
STDMETHOD(DispatchServer)( IMessage2 *pMsg );
|
||||
|
||||
// IKitchenSink
|
||||
STDMETHOD(AddToQueue)( long lObjectID );
|
||||
STDMETHOD(ShortcircuitID)( long lObjectID );
|
||||
};
|
||||
|
||||
#endif //__IDQUEUE_H_
|
||||
44
Native/DecalFilters/IdentifyQueue.rgs
Normal file
44
Native/DecalFilters/IdentifyQueue.rgs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.IdentifyQueue.1 = s 'IdentifyQueue Class'
|
||||
{
|
||||
CLSID = s '{B0C05A9A-273D-4BC4-B7BA-E27CF94C8EF4}'
|
||||
}
|
||||
DecalFilters.IdentifyQueue = s 'IdentifyQueue Class'
|
||||
{
|
||||
CLSID = s '{B0C05A9A-273D-4BC4-B7BA-E27CF94C8EF4}'
|
||||
CurVer = s 'DecalFilters.IdentifyQueue.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {B0C05A9A-273D-4BC4-B7BA-E27CF94C8EF4} = s 'IdentifyQueue Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.IdentifyQueue.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.IdentifyQueue'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Decal
|
||||
{
|
||||
NoRemove NetworkFilters
|
||||
{
|
||||
ForceRemove {B0C05A9A-273D-4BC4-B7BA-E27CF94C8EF4} = s 'Identify Queue Filter'
|
||||
{
|
||||
val Enabled = d '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
438
Native/DecalFilters/Prefilter.cpp
Normal file
438
Native/DecalFilters/Prefilter.cpp
Normal file
|
|
@ -0,0 +1,438 @@
|
|||
// Prefilter.cpp : Implementation of cPrefilter
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "Prefilter.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cPrefilter
|
||||
|
||||
class cFieldRule
|
||||
: public cPrefilter::cFilterRule
|
||||
{
|
||||
public:
|
||||
_variant_t m_strField;
|
||||
bool m_bReset;
|
||||
|
||||
static _bstr_t _strField,
|
||||
_strReset;
|
||||
|
||||
cFieldRule()
|
||||
: m_bReset( false )
|
||||
{
|
||||
}
|
||||
|
||||
bool loadField( MSXML::IXMLDOMElementPtr &pElement )
|
||||
{
|
||||
m_strField = pElement->getAttribute( _strField );
|
||||
|
||||
_variant_t vReset = pElement->getAttribute( _strReset );
|
||||
if( vReset.vt != VT_NULL )
|
||||
m_bReset = vReset;
|
||||
|
||||
#ifdef _DEBUG
|
||||
if( m_bReset )
|
||||
_ASSERTE( m_strField.vt == VT_BSTR );
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void get( _variant_t &vValue, IMessageIterator *pMsg )
|
||||
{
|
||||
if( m_bReset )
|
||||
pMsg->Reset();
|
||||
|
||||
if( m_strField.vt == VT_BSTR )
|
||||
pMsg->get_Next( m_strField, &vValue );
|
||||
else
|
||||
pMsg->get_Current( &vValue );
|
||||
}
|
||||
};
|
||||
|
||||
class cEndRule
|
||||
: public cPrefilter::cFilterRule
|
||||
{
|
||||
public:
|
||||
virtual bool test( IMessageIterator * )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
_bstr_t cFieldRule::_strField( _T( "field" ) );
|
||||
_bstr_t cFieldRule::_strReset( _T( "reset" ) );
|
||||
|
||||
class cTestRule
|
||||
: public cFieldRule
|
||||
{
|
||||
public:
|
||||
virtual bool test( IMessageIterator *pMsg )
|
||||
{
|
||||
_variant_t vValue;
|
||||
|
||||
get( vValue, pMsg );
|
||||
|
||||
return ( vValue.vt != VT_NULL );
|
||||
}
|
||||
};
|
||||
|
||||
class cEqualsRule
|
||||
: public cFieldRule
|
||||
{
|
||||
public:
|
||||
_variant_t m_vValue;
|
||||
|
||||
virtual bool test( IMessageIterator *pMsg )
|
||||
{
|
||||
_variant_t vValue;
|
||||
|
||||
get( vValue, pMsg );
|
||||
|
||||
if( vValue.vt == VT_NULL || m_vValue.vt == VT_NULL )
|
||||
// Null values are never equal, use cTestRule
|
||||
return false;
|
||||
|
||||
if( vValue.vt != m_vValue.vt )
|
||||
{
|
||||
// Attempt to convert them to the same type - this will typically happen
|
||||
// the first time the rule is invoked. This will speed up comparisons
|
||||
// in the future
|
||||
HRESULT hRes = ::VariantChangeType( &m_vValue, &m_vValue, 0, vValue.vt );
|
||||
if( FAILED( hRes ) )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
|
||||
// Could not convert the value - clear it so this rule becomes, disabled
|
||||
::VariantClear( &m_vValue );
|
||||
m_vValue.vt = VT_NULL;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Compare the values
|
||||
return( ::VarCmp( &vValue, &m_vValue, LOCALE_USER_DEFAULT, 0 ) == VARCMP_EQ );
|
||||
}
|
||||
};
|
||||
|
||||
class cContainsRule
|
||||
: public cFieldRule
|
||||
{
|
||||
public:
|
||||
_bstr_t m_strValue;
|
||||
|
||||
virtual bool test( IMessageIterator *pMsg )
|
||||
{
|
||||
_variant_t vValue;
|
||||
|
||||
get( vValue, pMsg );
|
||||
|
||||
if( vValue.vt != VT_BSTR )
|
||||
// Null values are never equal, use cTestRule
|
||||
return false;
|
||||
|
||||
// Use the std::algorithm search
|
||||
LPOLESTR szValueBegin = vValue.bstrVal,
|
||||
szValueEnd = vValue.bstrVal + ::SysStringLen( vValue.bstrVal ),
|
||||
szSearchBegin = m_strValue,
|
||||
szSearchEnd = szSearchBegin + m_strValue.length();
|
||||
|
||||
LPOLESTR szFound = std::search( szValueBegin, szValueEnd, szSearchBegin, szSearchEnd );
|
||||
return( szFound != szValueEnd );
|
||||
}
|
||||
};
|
||||
|
||||
class cMaskRule
|
||||
: public cFieldRule
|
||||
{
|
||||
public:
|
||||
long m_nValue;
|
||||
|
||||
virtual bool test( IMessageIterator *pMsg )
|
||||
{
|
||||
long nValue;
|
||||
|
||||
// Custom get
|
||||
HRESULT hRes = pMsg->get_NextInt( m_strField.bstrVal, &nValue );
|
||||
if( FAILED( hRes ) )
|
||||
return false;
|
||||
|
||||
return !!( nValue & m_nValue );
|
||||
}
|
||||
};
|
||||
|
||||
bool cPrefilter::testRules( cFilterRule *pRule, IMessageIterator *pMsg )
|
||||
{
|
||||
if( !pRule->test( pMsg ) )
|
||||
return false;
|
||||
|
||||
// If there is a fire ID, fire it now
|
||||
if( pRule->m_nFire != cFilterRule::eFireChildren )
|
||||
{
|
||||
CComPtr< IMessage > pMsgObj;
|
||||
pMsg->get_Message( &pMsgObj );
|
||||
Fire_Event( pRule->m_nFire, pMsgObj );
|
||||
return true;
|
||||
}
|
||||
|
||||
// If it has no children ... carry on
|
||||
if( pRule->m_childRules.empty() )
|
||||
return true;
|
||||
|
||||
// Test our children
|
||||
for( cFilterRule::cFilterRuleList::iterator i = pRule->m_childRules.begin(); i != pRule->m_childRules.end(); ++ i )
|
||||
{
|
||||
if( testRules( i->get(), pMsg ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
cPrefilter::cFilterRule *cPrefilter::loadRule( MSXML::IXMLDOMElementPtr &pElement )
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
// Load the current rule, first figure out the type
|
||||
static _bstr_t _strMessage( _T( "message" ) ),
|
||||
_strFire( _T( "fire" ) ),
|
||||
_strTest( _T( "test" ) ),
|
||||
_strEqual( _T( "equal" ) ),
|
||||
_strContain( _T( "contains" ) ),
|
||||
_strMask( _T( "mask" ) ),
|
||||
_strField( _T( "field" ) ),
|
||||
_strNext( _T( "next" ) ),
|
||||
_strValue( _T( "value" ) ),
|
||||
_strEnd( _T( "end" ) );
|
||||
|
||||
try
|
||||
{
|
||||
_bstr_t strElement = pElement->tagName;
|
||||
|
||||
VSBridge::auto_ptr< cFilterRule > pFilter;
|
||||
|
||||
if( strElement == _strMessage ||
|
||||
strElement == _strFire )
|
||||
{
|
||||
pFilter = VSBridge::auto_ptr< cFilterRule >( new cFilterRule );
|
||||
}
|
||||
else if( strElement == _strTest )
|
||||
{
|
||||
cTestRule *pRule = new cTestRule;
|
||||
pFilter = VSBridge::auto_ptr< cFilterRule >( pRule );
|
||||
|
||||
if( !pRule->loadField( pElement ) )
|
||||
return NULL;
|
||||
}
|
||||
else if( strElement == _strEqual )
|
||||
{
|
||||
cEqualsRule *pRule = new cEqualsRule;
|
||||
pFilter = VSBridge::auto_ptr< cFilterRule >( pRule );
|
||||
|
||||
if( !pRule->loadField( pElement ) )
|
||||
return NULL;
|
||||
|
||||
pRule->m_vValue = pElement->getAttribute( _strValue );
|
||||
if( pRule->m_vValue.vt == VT_NULL )
|
||||
{
|
||||
// Missing required field
|
||||
_ASSERT( FALSE );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if( strElement == _strContain )
|
||||
{
|
||||
cContainsRule *pRule = new cContainsRule;
|
||||
pFilter = VSBridge::auto_ptr< cFilterRule >( pRule );
|
||||
|
||||
if( !pRule->loadField( pElement ) )
|
||||
return NULL;
|
||||
|
||||
_variant_t vValue = pElement->getAttribute( _strValue );
|
||||
if( vValue.vt != VT_BSTR )
|
||||
{
|
||||
// Missing required field or incorrect type
|
||||
_ASSERT( FALSE );
|
||||
return false;
|
||||
}
|
||||
|
||||
pRule->m_strValue = vValue;
|
||||
}
|
||||
else if( strElement == _strMask )
|
||||
{
|
||||
cMaskRule *pRule = new cMaskRule;
|
||||
pFilter = VSBridge::auto_ptr< cFilterRule >( pRule );
|
||||
|
||||
if( !pRule->loadField( pElement ) )
|
||||
return NULL;
|
||||
|
||||
_variant_t vValue = pElement->getAttribute( _strValue );
|
||||
if( vValue.vt == VT_NULL )
|
||||
{
|
||||
// Missing required field
|
||||
_ASSERT( FALSE );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Attempt to convert the value from hex
|
||||
if( ::_stscanf( OLE2T( vValue.bstrVal ), _T( "%X" ), &pRule->m_nValue ) != 1 )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else if( strElement == _strEnd )
|
||||
pFilter = VSBridge::auto_ptr< cFilterRule >( new cEndRule );
|
||||
else
|
||||
return NULL;
|
||||
|
||||
_variant_t vFire = pElement->getAttribute( _strFire );
|
||||
|
||||
// Convert the fire type, then carry on
|
||||
if( vFire.vt != VT_NULL )
|
||||
pFilter->m_nFire = vFire;
|
||||
else
|
||||
{
|
||||
// Select all children - all element children
|
||||
MSXML::IXMLDOMNodeListPtr pRules = pElement->selectNodes( _T( "*" ) );
|
||||
for( MSXML::IXMLDOMElementPtr pChildRule = pRules->nextNode(); pChildRule; pChildRule = pRules->nextNode() )
|
||||
{
|
||||
VSBridge::auto_ptr< cFilterRule > pChildFilter( loadRule( pChildRule ) );
|
||||
if( pChildFilter.get() == NULL )
|
||||
continue;
|
||||
|
||||
// Load the children
|
||||
pFilter->m_childRules.push_back( pChildFilter );
|
||||
}
|
||||
}
|
||||
|
||||
return pFilter.release();
|
||||
}
|
||||
catch( _com_error &e )
|
||||
{
|
||||
HRESULT hRes = e.Error();
|
||||
_ASSERTE( FALSE );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
STDMETHODIMP cPrefilter::Initialize(INetService *pService)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
CComPtr< IDecal > pDecal;
|
||||
pService->get_Decal( &pDecal );
|
||||
|
||||
CComBSTR strMappedFile;
|
||||
HRESULT hRes = pDecal->MapPath( m_strFile, &strMappedFile );
|
||||
|
||||
if( FAILED( hRes ) )
|
||||
// Bad token in the filename
|
||||
return hRes;
|
||||
|
||||
MSXML::IXMLDOMDocumentPtr pFilter;
|
||||
hRes = ::CoCreateInstance( __uuidof( MSXML::DOMDocument ), NULL, CLSCTX_INPROC_SERVER,
|
||||
__uuidof( MSXML::IXMLDOMDocument ), reinterpret_cast< void ** >( &pFilter ) );
|
||||
|
||||
if( FAILED( hRes ) )
|
||||
return hRes;
|
||||
|
||||
bool bLoad = !!pFilter->load( strMappedFile.m_str );
|
||||
|
||||
if( !bLoad )
|
||||
{
|
||||
// The document failed to load, get the error info for posterity
|
||||
MSXML::IXMLDOMParseErrorPtr pErr = pFilter->parseError;
|
||||
|
||||
long nCode = pErr->errorCode;
|
||||
long nFilePos = pErr->filepos;
|
||||
long nLine = pErr->line;
|
||||
long nLinePos = pErr->linepos;
|
||||
_bstr_t strReason = pErr->reason;
|
||||
_bstr_t strText = pErr->srcText;
|
||||
|
||||
TCHAR szError[ 1024 ];
|
||||
::_stprintf( szError, _T( "0x%08X (%i, %i): %s" ),
|
||||
nCode, nLine, nLinePos, OLE2T( strReason ) );
|
||||
|
||||
/*
|
||||
long nHWND;
|
||||
m_pSite->get_HWND( &nHWND );
|
||||
*/
|
||||
|
||||
::MessageBox( NULL, szError, _T( "XML Parse Error" ), MB_ICONERROR | MB_OK );
|
||||
|
||||
// Give the user a chance to break and look at this lovely info
|
||||
_ASSERTE( FALSE );
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// Looking good - now we'll load el'schema
|
||||
MSXML::IXMLDOMNodeListPtr pMessages = pFilter->selectNodes( _T( "/filter/message" ) );
|
||||
for( MSXML::IXMLDOMElementPtr pMessage = pMessages->nextNode(); pMessage; pMessage = pMessages->nextNode() )
|
||||
{
|
||||
_variant_t vMessage = pMessage->getAttribute( _T( "type" ) ),
|
||||
vFire = pMessage->getAttribute( _T( "fire" ) );
|
||||
|
||||
if( vMessage.vt != VT_BSTR )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Attempt to convert the message type
|
||||
long nMessage;
|
||||
if( ::_stscanf( OLE2T( vMessage.bstrVal ), _T( "%X" ), &nMessage ) != 1 )
|
||||
{
|
||||
// Invalid message ID format
|
||||
_ASSERT( FALSE );
|
||||
continue;
|
||||
}
|
||||
|
||||
VSBridge::auto_ptr<cFilterRule> pMessageRule( loadRule( pMessage ) );
|
||||
if( pMessageRule.get() == NULL )
|
||||
continue;
|
||||
|
||||
m_messageRules.insert( cMessageRuleList::value_type( nMessage, pMessageRule ) );
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cPrefilter::DispatchServer( IMessage2 *pMsg )
|
||||
{
|
||||
long nID;
|
||||
pMsg->get_Type( &nID );
|
||||
|
||||
// Look for a type
|
||||
cMessageRuleList::iterator i_msg = m_messageRules.find( nID );
|
||||
if( i_msg == m_messageRules.end() )
|
||||
return S_OK;
|
||||
|
||||
CComPtr< IMessageIterator > pMembers;
|
||||
pMsg->get_Begin( &pMembers );
|
||||
testRules( i_msg->second.get(), pMembers );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cPrefilter::CreateInstance( IDecalEnum *pInitData, REFIID iid, LPVOID *pObject )
|
||||
{
|
||||
CComVariant vFile;
|
||||
HRESULT hRes = pInitData->get_Property( _bstr_t( "File" ), &vFile );
|
||||
|
||||
if( FAILED( hRes ) )
|
||||
return hRes;
|
||||
|
||||
if( vFile.vt != VT_BSTR )
|
||||
{
|
||||
// The surrogate must know the file
|
||||
_ASSERT( FALSE );
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strFile = vFile.bstrVal;
|
||||
return static_cast< IDecalSurrogate * >( this )->QueryInterface( iid, pObject );
|
||||
}
|
||||
123
Native/DecalFilters/Prefilter.h
Normal file
123
Native/DecalFilters/Prefilter.h
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
// Prefilter.h : Declaration of the cPrefilter
|
||||
|
||||
#ifndef __PREFILTER_H_
|
||||
#define __PREFILTER_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include <Decal.h>
|
||||
#include <DecalNetImpl.h>
|
||||
#include <DecalImpl.h>
|
||||
#include "DecalFiltersCP.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cPrefilter
|
||||
class ATL_NO_VTABLE cPrefilter :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<cPrefilter, &CLSID_Prefilter>,
|
||||
public IDispatchImpl<IPrefilter, &IID_IPrefilter, &LIBID_DecalFilters>,
|
||||
public ISoloNetworkFilterImpl<cPrefilter>,
|
||||
public IDecalSurrogate,
|
||||
public IProvideClassInfo2Impl<&CLSID_Prefilter, &DIID_IPrefilterEvents, &LIBID_DecalFilters >,
|
||||
public IDecalFileSurrogateXMLImpl< cPrefilter, &CLSID_Prefilter >,
|
||||
public CProxyIPrefilterEvents< cPrefilter >,
|
||||
public IConnectionPointContainerImpl<cPrefilter>
|
||||
{
|
||||
public:
|
||||
static LPCTSTR getConfigGroup()
|
||||
{
|
||||
return _T( "NetworkFilters" );
|
||||
}
|
||||
|
||||
cPrefilter()
|
||||
{
|
||||
}
|
||||
|
||||
class cFilterRule
|
||||
{
|
||||
public:
|
||||
long m_nFire;
|
||||
|
||||
enum { eFireChildren = -1 };
|
||||
|
||||
typedef std::vector< VSBridge::auto_ptr< cFilterRule > > cFilterRuleList;
|
||||
cFilterRuleList m_childRules;
|
||||
|
||||
cFilterRule()
|
||||
: m_nFire( eFireChildren )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~cFilterRule()
|
||||
{
|
||||
}
|
||||
|
||||
virtual bool test( IMessageIterator *pMsg )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map< long, VSBridge::auto_ptr< cFilterRule > > cMessageRuleList;
|
||||
cMessageRuleList m_messageRules;
|
||||
_bstr_t m_strFile;
|
||||
|
||||
bool testRules( cFilterRule *pRule, IMessageIterator *pMsg );
|
||||
cFilterRule *loadRule( MSXML::IXMLDOMElementPtr &pElement );
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_PREFILTER)
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cPrefilter)
|
||||
COM_INTERFACE_ENTRY(IDecalSurrogate)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo2)
|
||||
COM_INTERFACE_ENTRY(INetworkFilter2)
|
||||
COM_INTERFACE_ENTRY(IPrefilter)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY(IDecalFileSurrogate)
|
||||
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
|
||||
END_COM_MAP()
|
||||
|
||||
BEGIN_CONNECTION_POINT_MAP(cPrefilter)
|
||||
CONNECTION_POINT_ENTRY(DIID_IPrefilterEvents)
|
||||
END_CONNECTION_POINT_MAP()
|
||||
|
||||
// IPrefilter
|
||||
public:
|
||||
|
||||
// INetworkFilter
|
||||
STDMETHOD(Initialize)(INetService *pService);
|
||||
STDMETHOD(DispatchServer)(IMessage2 *pMsg);
|
||||
|
||||
// IDecalSurrogate
|
||||
STDMETHOD(CreateInstance)(IDecalEnum *pInitData, REFIID iid, LPVOID *pObject);
|
||||
|
||||
// IDecalFileSurrogate
|
||||
STDMETHOD(get_Extension)( BSTR *pVal )
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = T2BSTR( _T( "apn" ) );
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(get_Description)( BSTR *pVal )
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = T2BSTR( _T( "Network Prefilter" ) );
|
||||
return S_OK;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //__PREFILTER_H_
|
||||
45
Native/DecalFilters/Prefilter.rgs
Normal file
45
Native/DecalFilters/Prefilter.rgs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.Prefilter.1 = s 'Prefilter Class'
|
||||
{
|
||||
CLSID = s '{443D4A68-5422-4E0C-9460-973F8FBDB190}'
|
||||
}
|
||||
DecalFilters.Prefilter = s 'Prefilter Class'
|
||||
{
|
||||
CLSID = s '{443D4A68-5422-4E0C-9460-973F8FBDB190}'
|
||||
CurVer = s 'DecalFilters.Prefilter.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {443D4A68-5422-4E0C-9460-973F8FBDB190} = s 'Prefilter Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.Prefilter.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.Prefilter'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Decal
|
||||
{
|
||||
NoRemove Surrogates
|
||||
{
|
||||
ForceRemove {443D4A68-5422-4E0C-9460-973F8FBDB190} = s 'Prefilter Network Filter Surrogate'
|
||||
{
|
||||
val Enabled = d '1'
|
||||
val Extension = s 'apn'
|
||||
val Description = s 'Network Prefilter'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
205
Native/DecalFilters/SkillInfo.cpp
Normal file
205
Native/DecalFilters/SkillInfo.cpp
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
// SkillInfo.cpp : Implementation of cSkillInfo
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "SkillInfo.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cSkillInfo
|
||||
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Name(BSTR *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
USES_CONVERSION;
|
||||
*pVal = T2BSTR( m_pSkill->m_szName.c_str() );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_ShortName(BSTR *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
TCHAR *szShortName = new TCHAR[ ::_tcslen( m_pSkill->m_szName.c_str() ) + 1 ];
|
||||
for( TCHAR *i_short = szShortName, *i_long = const_cast< char * >( m_pSkill->m_szName.c_str() ); *i_long != _T( '\0' ); ++ i_long )
|
||||
{
|
||||
if( *i_long != _T( ' ' ) )
|
||||
*( i_short ++ ) = *i_long;
|
||||
}
|
||||
|
||||
*i_short = _T( '\0' );
|
||||
|
||||
USES_CONVERSION;
|
||||
*pVal = T2BSTR( szShortName );
|
||||
|
||||
delete[] szShortName;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Formula(BSTR *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
TCHAR szBuffer[ 255 ];
|
||||
if( m_pSkill->m_nAttribute2 != eAttrNULL )
|
||||
{
|
||||
LPSTR attrA, attrB;
|
||||
switch(m_pSkill->m_nAttribute1)
|
||||
{
|
||||
case eAttrStrength: attrA = "Strength"; break;
|
||||
case eAttrEndurance: attrA = "Endurance"; break;
|
||||
case eAttrCoordination: attrA = "Coordination"; break;
|
||||
case eAttrQuickness: attrA = "Quickness"; break;
|
||||
case eAttrFocus: attrA = "Focus"; break;
|
||||
case eAttrSelf: attrA = "Self"; break;
|
||||
}
|
||||
switch(m_pSkill->m_nAttribute2)
|
||||
{
|
||||
case eAttrStrength: attrB = "Strength"; break;
|
||||
case eAttrEndurance: attrB = "Endurance"; break;
|
||||
case eAttrCoordination: attrB = "Coordination"; break;
|
||||
case eAttrQuickness: attrB = "Quickness"; break;
|
||||
case eAttrFocus: attrB = "Focus"; break;
|
||||
case eAttrSelf: attrB = "Self"; break;
|
||||
}
|
||||
::_stprintf( szBuffer, _T( "( %s + %s ) / %i" ), attrA, attrB, m_pSkill->m_nDenominator );
|
||||
}
|
||||
else if( m_pSkill->m_nAttribute1 != eAttrNULL )
|
||||
{
|
||||
LPSTR attrA;
|
||||
switch(m_pSkill->m_nAttribute1)
|
||||
{
|
||||
case eAttrStrength: attrA = "Strength"; break;
|
||||
case eAttrEndurance: attrA = "Endurance"; break;
|
||||
case eAttrCoordination: attrA = "Coordination"; break;
|
||||
case eAttrQuickness: attrA = "Quickness"; break;
|
||||
case eAttrFocus: attrA = "Focus"; break;
|
||||
case eAttrSelf: attrA = "Self"; break;
|
||||
}
|
||||
::_stprintf( szBuffer, _T( "( %s ) / %i" ), attrA, m_pSkill->m_nDenominator );
|
||||
}
|
||||
else
|
||||
::strcpy( szBuffer, _T( "Unknown" ) );
|
||||
|
||||
USES_CONVERSION;
|
||||
*pVal = T2BSTR( szBuffer );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Base(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
float fSkill = 0.0;
|
||||
if( m_pSkill->m_nAttribute1 != eAttrNULL )
|
||||
fSkill += m_pStats->PrimStat[ m_pSkill->m_nAttribute1 - 1];
|
||||
if( m_pSkill->m_nAttribute2 != eAttrNULL )
|
||||
fSkill += m_pStats->PrimStat[ m_pSkill->m_nAttribute2 - 1];
|
||||
|
||||
fSkill /= static_cast< float >( m_pSkill->m_nDenominator );
|
||||
fSkill += 0.5f;
|
||||
|
||||
*pVal = static_cast< long >( fSkill );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Current(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
long nBase;
|
||||
get_Base( &nBase );
|
||||
|
||||
*pVal = nBase + m_pSkill->m_nOffset + m_pSkill->m_nBonus;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Increment(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pSkill->m_nOffset;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Exp(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pSkill->m_nExp;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Training(enum eTrainingType *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pSkill->m_trained;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Known(VARIANT_BOOL *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = ( ::_tcscmp( m_pSkill->m_szName.c_str(), _T( "Unknown" ) ) == 0 ) ? VARIANT_FALSE : VARIANT_TRUE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cSkillInfo::get_Bonus(long *pVal)
|
||||
{
|
||||
if( pVal == NULL )
|
||||
{
|
||||
_ASSERT( FALSE );
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_pSkill->m_nBonus;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
48
Native/DecalFilters/SkillInfo.h
Normal file
48
Native/DecalFilters/SkillInfo.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// SkillInfo.h : Declaration of the cSkillInfo
|
||||
|
||||
#ifndef __SKILLINFO_H_
|
||||
#define __SKILLINFO_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#include "CharacterStats.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cSkillInfo
|
||||
class ATL_NO_VTABLE cSkillInfo :
|
||||
public CComObjectRootEx<CComMultiThreadModel>,
|
||||
public CComCoClass<cSkillInfo, &CLSID_SkillInfo>,
|
||||
public IDispatchImpl<ISkillInfo, &IID_ISkillInfo, &LIBID_DecalFilters>
|
||||
{
|
||||
public:
|
||||
cSkillInfo()
|
||||
{
|
||||
m_pSkill = &m_pSkillInfo;
|
||||
}
|
||||
|
||||
cCharacterStats *m_pStats;
|
||||
cCharacterStats::cSkillInfo m_pSkillInfo;
|
||||
cCharacterStats::cSkillInfo *m_pSkill;
|
||||
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cSkillInfo)
|
||||
COM_INTERFACE_ENTRY(ISkillInfo)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
// ISkillInfo
|
||||
public:
|
||||
STDMETHOD(get_Known)(/*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_Training)(/*[out, retval]*/ enum eTrainingType *pVal);
|
||||
STDMETHOD(get_Exp)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Current)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Base)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Increment)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Formula)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_ShortName)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_Bonus)(/*[out, retval]*/ long *pVal);
|
||||
};
|
||||
|
||||
#endif //__SKILLINFO_H_
|
||||
15
Native/DecalFilters/StdAfx.cpp
Normal file
15
Native/DecalFilters/StdAfx.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// stdafx.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifdef _ATL_STATIC_REGISTRY
|
||||
#include <statreg.h>
|
||||
#include <statreg.cpp>
|
||||
#endif
|
||||
|
||||
#include <atlimpl.cpp>
|
||||
|
||||
#include "..\Inject\SinkImpl.cpp"
|
||||
#include "..\Inject\Inject_i.c"
|
||||
55
Native/DecalFilters/StdAfx.h
Normal file
55
Native/DecalFilters/StdAfx.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#if !defined(AFX_STDAFX_H__011A05A6_F7FE_4B67_8D02_926F1F11C8A8__INCLUDED_)
|
||||
#define AFX_STDAFX_H__011A05A6_F7FE_4B67_8D02_926F1F11C8A8__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define STRICT
|
||||
#define _WIN32_WINDOWS 0x0410
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
|
||||
#pragma warning(disable:4530)
|
||||
|
||||
//You may derive a class from CComModule and use it if you want to override
|
||||
//something, but do not change the name of _Module
|
||||
|
||||
//C Library includes
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <atlbase.h>
|
||||
extern CComModule _Module;
|
||||
#include <atlcom.h>
|
||||
#include <comdef.h>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#if _MSC_VER > 1200 // .NET
|
||||
#include <hash_map>
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include "DecalFilters.h"
|
||||
#include "../Include/VSBridge.h"
|
||||
|
||||
#ifdef _CHECKMEM
|
||||
#define _ASSERTMEM(a) _ASSERTE(a)
|
||||
#else
|
||||
#define _ASSERTMEM(a)
|
||||
#endif
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__011A05A6_F7FE_4B67_8D02_926F1F11C8A8__INCLUDED)
|
||||
1929
Native/DecalFilters/World.cpp
Normal file
1929
Native/DecalFilters/World.cpp
Normal file
File diff suppressed because it is too large
Load diff
387
Native/DecalFilters/World.h
Normal file
387
Native/DecalFilters/World.h
Normal file
|
|
@ -0,0 +1,387 @@
|
|||
// World.h : Declaration of the cWorld
|
||||
|
||||
#ifndef __WORLD_H_
|
||||
#define __WORLD_H_
|
||||
#include "resource.h" // main symbols
|
||||
#include "DecalFiltersCP.h"
|
||||
#include "DecalNetImpl.h"
|
||||
#include "WorldObject.h"
|
||||
#include "..\inject\inject.h"
|
||||
#include <deque>
|
||||
|
||||
// remark out next line to turn off logging.
|
||||
//#define Logging 1
|
||||
|
||||
#define HookDestroyObj 101
|
||||
|
||||
extern const IID EVTID_AcHooks ;
|
||||
|
||||
// Template class used to connect ACHooks events
|
||||
template<UINT nID, class cImpl >class IACHooksEventsImpl
|
||||
:public IDispEventImpl<nID, cImpl, &EVTID_AcHooks,
|
||||
&LIBID_Decal, 1, 0 >
|
||||
{
|
||||
public: HRESULT advise(IUnknown *pUnk){return DispEventAdvise(pUnk);}
|
||||
HRESULT unadvise(IUnknown *pUnk){return DispEventUnadvise(pUnk);}
|
||||
};
|
||||
|
||||
|
||||
// Gouru: added structure to store slot and slot type. Containers have two types of slots
|
||||
// we need to track, slots than can contain other containers, and slots that contain items
|
||||
struct CSlot {
|
||||
CSlot()
|
||||
: slot(0)
|
||||
, type(0)
|
||||
{} ;
|
||||
CSlot(long slot, long type)
|
||||
: slot(slot)
|
||||
, type(type)
|
||||
{} ;
|
||||
long slot ;
|
||||
long type ; // 0x00 = item, 0x01 = container
|
||||
};
|
||||
|
||||
enum eDIR {
|
||||
eRight = 1,
|
||||
eLeft = -1
|
||||
};
|
||||
|
||||
class cWorldData
|
||||
{
|
||||
public:
|
||||
cWorldData()
|
||||
: m_Slot(0,0)
|
||||
{
|
||||
m_bIdentified = false;
|
||||
m_dwGUID = 0;
|
||||
m_dwContainer = 0;
|
||||
m_dwIcon = 0;
|
||||
m_dwModel = 0;
|
||||
m_dwRealModel = 0;
|
||||
m_fScale = 1.0f;
|
||||
m_dwValue = -1;
|
||||
m_dwFlags1 = 0;
|
||||
m_dwFlags2 = 0;
|
||||
m_dwObjectFlags1 = 0;
|
||||
m_dwObjectFlags2 = 0;
|
||||
m_dwLandblock = 0;
|
||||
m_fxOffset = 0.0f;
|
||||
m_fyOffset = 0.0f;
|
||||
m_fzOffset = 0.0f;
|
||||
m_fxHeading = 0.0f;
|
||||
m_fyHeading = 0.0f;
|
||||
m_fzHeading = 0.0f;
|
||||
m_fwHeading = 0.0f;
|
||||
m_DamageBonus = 0.0f;
|
||||
m_nItemSlots = 0;
|
||||
m_nPackSlots = 0;
|
||||
m_nUsesLeft = 0;
|
||||
m_nTotalUses = 0;
|
||||
m_nStackCount = 0;
|
||||
m_nStackMax = 0;
|
||||
m_dwTradeNoteVendor = 0;
|
||||
m_dwAssociatedSpell = 0;
|
||||
m_tExpires = 0;
|
||||
m_dwWielder = 0; // container if wielded, zero if not
|
||||
m_dwWieldingSlot = 0;
|
||||
m_dwMonarch = 0 ;
|
||||
m_dwMaterial = 0 ;
|
||||
m_dwCoverage2 = 0 ;
|
||||
m_dwCoverage3 = 0 ;
|
||||
m_dwEquipType = 0 ;
|
||||
|
||||
m_fApproachDistance = 0.0f ;
|
||||
m_Burden=0;
|
||||
m_Workmanship=0.0;
|
||||
m_IconOutline=0;
|
||||
m_MissileType=0;
|
||||
m_TotalValue=0;
|
||||
m_UsageMask=0;
|
||||
m_HouseOwner=0;
|
||||
m_HookMask=0;
|
||||
m_HookType=0;
|
||||
m_bTag = false;
|
||||
m_HasIdData = false ;
|
||||
m_ArmorLevel = -1 ;
|
||||
m_MagicDef = -1 ;
|
||||
m_Spellcraft = -1 ;
|
||||
m_MaximumMana = -1 ;
|
||||
m_LoreReq = -1 ;
|
||||
m_RankReq = -1 ;
|
||||
m_SkillReq = -1 ;
|
||||
m_WieldReqType = -1 ;
|
||||
m_WieldReqId = -1 ;
|
||||
m_WieldReq = -1 ;
|
||||
m_TinkerCount = -1 ;
|
||||
m_SkillReqId = -1 ;
|
||||
m_SpecialProps = -1 ;
|
||||
m_ManaCMod = -1 ;
|
||||
m_SpellCount = 0 ;
|
||||
for (int x=0; x<10; x++) m_Spell[x] = -1 ;
|
||||
m_WeapSpeed = -1 ;
|
||||
m_EquipSkill = -1 ;
|
||||
m_DamageType = -1 ;
|
||||
m_MaxDamage = -1 ;
|
||||
m_Variance = -1.0 ;
|
||||
m_DefenseBonus = -1.0 ;
|
||||
m_AttackBonus = -1.0 ;
|
||||
m_Range = -1.0 ;
|
||||
m_SlashProt = -1.0 ;
|
||||
m_PierceProt = -1.0 ;
|
||||
m_BludProt = -1.0 ;
|
||||
m_ColdProt = -1.0 ;
|
||||
m_FireProt = -1.0 ;
|
||||
m_ElectProt = -1.0 ;
|
||||
}
|
||||
|
||||
~cWorldData()
|
||||
{
|
||||
}
|
||||
|
||||
bool m_bIdentified;
|
||||
long m_dwGUID;
|
||||
long m_dwContainer;
|
||||
long m_dwValue;
|
||||
long m_tExpires;
|
||||
long m_dwFlags1;
|
||||
long m_dwFlags2;
|
||||
long m_dwObjectFlags1;
|
||||
long m_dwObjectFlags2;
|
||||
long m_dwIcon;
|
||||
long m_dwModel;
|
||||
long m_dwRealModel;
|
||||
float m_fScale;
|
||||
long m_flags;
|
||||
std::string m_strName;
|
||||
std::string m_strSecondaryName ;
|
||||
eObjectType m_eType;
|
||||
long m_dwLandblock;
|
||||
long m_LandblockRow ; // landblock row (0-255)
|
||||
long m_LandblockCol ; // landblock col (0-255)
|
||||
float m_fxOffset;
|
||||
float m_fyOffset;
|
||||
float m_fzOffset;
|
||||
float m_fxHeading;
|
||||
float m_fyHeading;
|
||||
float m_fzHeading;
|
||||
float m_fwHeading;
|
||||
float m_fApproachDistance ;
|
||||
float m_DamageBonus ;
|
||||
BYTE m_nItemSlots;
|
||||
BYTE m_nPackSlots;
|
||||
WORD m_nUsesLeft;
|
||||
WORD m_nTotalUses;
|
||||
WORD m_nStackCount;
|
||||
WORD m_nStackMax;
|
||||
long m_dwTradeNoteVendor;
|
||||
long m_dwAssociatedSpell;
|
||||
long m_dwWielder;
|
||||
long m_dwWieldingSlot;
|
||||
long m_dwCoverage ;
|
||||
CSlot m_Slot ;
|
||||
long m_dwMonarch ;
|
||||
long m_dwMaterial ;
|
||||
long m_dwCoverage2 ;
|
||||
long m_dwCoverage3 ;
|
||||
long m_dwEquipType ;
|
||||
long m_Burden ;
|
||||
float m_Workmanship ;
|
||||
long m_IconOutline ;
|
||||
long m_MissileType ;
|
||||
long m_TotalValue ;
|
||||
long m_UsageMask ;
|
||||
long m_HouseOwner ;
|
||||
long m_HookMask ;
|
||||
long m_HookType ;
|
||||
bool m_HasIdData ;
|
||||
long m_ArmorLevel ;
|
||||
long m_MagicDef ;
|
||||
long m_Spellcraft ;
|
||||
long m_MaximumMana ;
|
||||
long m_LoreReq ;
|
||||
long m_RankReq ;
|
||||
long m_SkillReq ;
|
||||
long m_WieldReqType ;
|
||||
long m_WieldReqId ;
|
||||
long m_WieldReq ;
|
||||
long m_TinkerCount ;
|
||||
long m_SkillReqId ;
|
||||
long m_SpecialProps ;
|
||||
float m_ManaCMod ;
|
||||
long m_SpellCount ;
|
||||
long m_Spell[10] ;
|
||||
std::string m_Inscription ;
|
||||
std::string m_RaceReq ;
|
||||
long m_WeapSpeed ;
|
||||
long m_EquipSkill ;
|
||||
long m_DamageType ;
|
||||
long m_MaxDamage ;
|
||||
float m_Variance ;
|
||||
float m_DefenseBonus ;
|
||||
float m_AttackBonus ;
|
||||
float m_Range ;
|
||||
float m_SlashProt ;
|
||||
float m_PierceProt ;
|
||||
float m_BludProt ;
|
||||
float m_ColdProt ;
|
||||
float m_FireProt ;
|
||||
float m_ElectProt ;
|
||||
float m_AcidProt ;
|
||||
|
||||
CComPtr< IWorldObject > m_p;
|
||||
bool m_bTag;
|
||||
};
|
||||
|
||||
// Use stdext::hash_map for VC7+, std::map for VC6
|
||||
#if _MSC_VER > 1300 // VC 7.1
|
||||
class cWorldDataMap : public stdext::hash_map< DWORD, cWorldData * >
|
||||
#elif _MSC_VER > 1200 // VC 7.0
|
||||
class cWorldDataMap : public std::hash_map< DWORD, cWorldData * >
|
||||
#else // VC6
|
||||
class cWorldDataMap : public std::map< DWORD, cWorldData * >
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
cWorldDataMap()
|
||||
{
|
||||
m_player = 0;
|
||||
};
|
||||
|
||||
~cWorldDataMap()
|
||||
{
|
||||
for (iterator iData = begin(); iData != end(); iData++)
|
||||
{
|
||||
if (iData->second)
|
||||
delete iData->second;
|
||||
}
|
||||
};
|
||||
|
||||
long player() { return m_player; };
|
||||
void player(long guid) { m_player = guid; };
|
||||
private:
|
||||
long m_player;
|
||||
};
|
||||
|
||||
typedef std::map< long, CSlot > cGuidAlias;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cWorld
|
||||
class ATL_NO_VTABLE cWorld :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<cWorld, &CLSID_World>,
|
||||
public IConnectionPointContainerImpl<cWorld>,
|
||||
public IDispatchImpl<IWorld, &IID_IWorld, &LIBID_DecalFilters>,
|
||||
public IProvideClassInfo2Impl<&CLSID_World, &DIID_IWorldEvents, &LIBID_DecalFilters>,
|
||||
public IACHooksEventsImpl<HookDestroyObj, cWorld>,
|
||||
public INetworkFilterImpl<cWorld>,
|
||||
public CProxyIWorldEvents<cWorld>
|
||||
{
|
||||
public:
|
||||
cWorld();
|
||||
|
||||
public:
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_WORLD)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cWorld)
|
||||
COM_INTERFACE_ENTRY(IWorld)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
COM_INTERFACE_ENTRY(INetworkFilter2)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo)
|
||||
COM_INTERFACE_ENTRY(IProvideClassInfo2)
|
||||
COM_INTERFACE_ENTRY(IConnectionPointContainer)
|
||||
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
|
||||
END_COM_MAP()
|
||||
|
||||
BEGIN_CONNECTION_POINT_MAP(cWorld)
|
||||
CONNECTION_POINT_ENTRY(DIID_IWorldEvents)
|
||||
END_CONNECTION_POINT_MAP()
|
||||
|
||||
BEGIN_SINK_MAP(cWorld)
|
||||
SINK_ENTRY_EX(HookDestroyObj, EVTID_AcHooks, 1, onObjectDestroyed)
|
||||
END_SINK_MAP()
|
||||
|
||||
public:
|
||||
cWorldData *Data(DWORD nGuid);
|
||||
|
||||
private:
|
||||
void MoveItems(DWORD container, CSlot Slot, eDIR direction) ;
|
||||
void MoveSlotBack(cWorldData *pData);
|
||||
bool PlayerOwns(cWorldData* pData) ;
|
||||
bool OutsideCullDistance(cWorldData* data, long row, long col) ;
|
||||
cWorldData* OuterContainer(cWorldData* obj) ;
|
||||
void DestroyObject(cWorldData* pData) ;
|
||||
|
||||
void FreeData();
|
||||
void ReleaseAllPendingObjects() ;
|
||||
void SetHook() ;
|
||||
|
||||
// AC message handlers
|
||||
void DoDestroyObj(CComPtr< IMessageIterator > pMembers) ;
|
||||
void DoAdjustStackSize(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoSetCoverage(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoSetContainer(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoGameEvent(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoSetObjectPosition(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoWieldItem(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoRemoveItem(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoCreateObject(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoMoveToInventory(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoLogin(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoInsertIntoInventory(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoSetPackContents(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoIdentifyObject(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoDropItem(CComPtr<IMessageIterator> pMembers) ;
|
||||
void DoWearItem(CComPtr<IMessageIterator> pMembers) ;
|
||||
#ifdef Logging
|
||||
void DoLocalChat(CComPtr<IMessageIterator> pMembers) ;
|
||||
#endif
|
||||
|
||||
// map to store slot information for objects when storage information is received before
|
||||
// the object is created
|
||||
// Gouru: changed named from m_packslots to avoid confusion with m_npackslots which
|
||||
// refers to slots that can store packs...
|
||||
cGuidAlias m_SlotStore ;
|
||||
|
||||
long m_nNextTime;
|
||||
bool m_HookIsSet ;
|
||||
CComPtr< IDecal > m_pDecal ;
|
||||
CComPtr< IACHooks > m_pHooks ;
|
||||
|
||||
void _stdcall onObjectDestroyed(long nId);
|
||||
|
||||
public:
|
||||
//void SetObjectOwner(cWorldData *pData);
|
||||
// IWorld
|
||||
STDMETHOD(get_Inventory)(/*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_Landscape)(/*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_All)(IWorldIterator **pVal);
|
||||
STDMETHOD(get_ByContainer)(long GUID, /*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_ByOwner)(long GUID, /*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_ByNameSubstring)(BSTR Substring, /*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_ByType)(eObjectType Type, /*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_ByName)(BSTR Name, /*[out, retval]*/ IWorldIterator **pVal);
|
||||
STDMETHOD(get_Object)(long GUID, /*[out, retval]*/ IWorldObject **pVal);
|
||||
STDMETHOD(Distance2D)(long GUID1, long GUID2, /*[out, retval]*/ float* pVal);
|
||||
STDMETHOD(get_NumObjectTypes)(/*[out, retval]*/ long *lVal);
|
||||
|
||||
// INetworkFilterImpl
|
||||
HRESULT onTerminate();
|
||||
HRESULT onInitialize();
|
||||
|
||||
// INetworkFilter
|
||||
STDMETHOD(DispatchServer)(IMessage2 *pMsg);
|
||||
|
||||
cWorldDataMap m_objects;
|
||||
|
||||
static float NorthSouth(long landblock, float yOffset) ;
|
||||
static float EastWest(long landblock, float xOffset) ;
|
||||
|
||||
#ifdef Logging
|
||||
static void _DebugLog(LPCSTR, ...) ;
|
||||
#else
|
||||
inline static void cWorld::_DebugLog(LPCSTR fmt, ...) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif //__WORLD_H_
|
||||
44
Native/DecalFilters/World.rgs
Normal file
44
Native/DecalFilters/World.rgs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.World.1 = s 'World Class'
|
||||
{
|
||||
CLSID = s '{53092D1B-F0B0-46FF-BF11-8F031EC9B137}'
|
||||
}
|
||||
DecalFilters.World = s 'World Class'
|
||||
{
|
||||
CLSID = s '{53092D1B-F0B0-46FF-BF11-8F031EC9B137}'
|
||||
CurVer = s 'DecalFilters.World.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {53092D1B-F0B0-46FF-BF11-8F031EC9B137} = s 'World Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.World.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.World'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HKLM
|
||||
{
|
||||
NoRemove SOFTWARE
|
||||
{
|
||||
NoRemove Decal
|
||||
{
|
||||
NoRemove NetworkFilters
|
||||
{
|
||||
ForceRemove {53092D1B-F0B0-46FF-BF11-8F031EC9B137} = s 'World Object Filter'
|
||||
{
|
||||
val Enabled = d '1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
190
Native/DecalFilters/WorldIterator.cpp
Normal file
190
Native/DecalFilters/WorldIterator.cpp
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
// WorldIterator.cpp : Implementation of cWorldIterator
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "World.h"
|
||||
#include "WorldIterator.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cWorldIterator
|
||||
|
||||
|
||||
STDMETHODIMP cWorldIterator::get_Next_Old(IWorldObject **pVal)
|
||||
{
|
||||
return get_Next(pVal, NULL);
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::Reset()
|
||||
{
|
||||
m_i = m_objects->begin();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::get_Count(long *pVal)
|
||||
{
|
||||
int nCount;
|
||||
cWorldDataMap::iterator iSave = m_i;
|
||||
|
||||
m_i = m_objects->begin();
|
||||
|
||||
for (nCount = 0; get_Next(NULL, NULL) == S_OK; nCount++);
|
||||
*pVal = nCount;
|
||||
|
||||
m_i = iSave;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldIterator::get_Quantity(long *pVal)
|
||||
{
|
||||
long nCount=0;
|
||||
cWorldDataMap::iterator iSave = m_i;
|
||||
|
||||
IWorldObject* pObject = NULL ;
|
||||
|
||||
m_i = m_objects->begin();
|
||||
|
||||
while (get_Next(&pObject, NULL) == S_OK) {
|
||||
if (pObject) {
|
||||
long x ;
|
||||
pObject->get_StackMax(&x) ;
|
||||
if (x) {
|
||||
pObject->get_StackCount(&x) ; // stackable, get number in stack
|
||||
} else {
|
||||
x=1 ; // not stackable, so only count as one
|
||||
}
|
||||
nCount += x ;
|
||||
}
|
||||
}
|
||||
|
||||
*pVal = nCount;
|
||||
|
||||
m_i = iSave;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldIterator::get_Next(IWorldObject **ppObject, VARIANT_BOOL *pVal)
|
||||
{
|
||||
while (m_i != m_objects->end())
|
||||
{
|
||||
for (cMatchList::iterator i = m_compares.begin(); i != m_compares.end(); i++)
|
||||
{
|
||||
// if our match fails, try next object
|
||||
if (!(*i)->match(m_i))
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (pVal) {
|
||||
*pVal = VARIANT_TRUE;
|
||||
}
|
||||
|
||||
if (ppObject) {
|
||||
// Gouru: moved to release ONLY if we are setting a new value...
|
||||
// release incoming object so get_Next can be used in a loop
|
||||
if (*ppObject && *ppObject != (IWorldObject *)this) {
|
||||
(*ppObject)->Release();
|
||||
}
|
||||
m_i->second->m_p->QueryInterface(ppObject);
|
||||
}
|
||||
|
||||
m_i++;
|
||||
return S_OK;
|
||||
|
||||
next:
|
||||
m_i++;
|
||||
}
|
||||
|
||||
if (pVal)
|
||||
*pVal = VARIANT_FALSE;
|
||||
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::Pop()
|
||||
{
|
||||
if (!m_compares.empty())
|
||||
{
|
||||
cMatch *pMatch = m_compares.back();
|
||||
delete pMatch;
|
||||
m_compares.pop_back();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByName(BSTR strName)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
cMatch *pMatch = new cMatchName(m_objects, std::string(OLE2A(strName)));
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByNameSubstring(BSTR strSubstring)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
cMatch *pMatch = new cMatchNameSubstring(m_objects, std::string(OLE2A(strSubstring)));
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByType(enum eObjectType Type)
|
||||
{
|
||||
cMatch *pMatch = new cMatchType(m_objects, Type);
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByContainer(long nContainer)
|
||||
{
|
||||
cMatch *pMatch = new cMatchContainer(m_objects, nContainer);
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByInventory()
|
||||
{
|
||||
cMatch *pMatch = new cMatchInventory(m_objects);
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByLandscape()
|
||||
{
|
||||
cMatch *pMatch = new cMatchLandscape(m_objects);
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByOwner(long nOwner)
|
||||
{
|
||||
cMatch *pMatch = new cMatchOwner(m_objects, nOwner);
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldIterator::ByAll()
|
||||
{
|
||||
cMatch *pMatch = new cMatchAll(m_objects);
|
||||
m_compares.push_back(pMatch);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void cWorldIterator::Initialize(cWorldDataMap *pMap)
|
||||
{
|
||||
m_objects = pMap;
|
||||
m_i = m_objects->begin();
|
||||
}
|
||||
201
Native/DecalFilters/WorldIterator.h
Normal file
201
Native/DecalFilters/WorldIterator.h
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
// WorldIterator.h : Declaration of the cWorldIterator
|
||||
|
||||
#ifndef __WORLDITERATOR_H_
|
||||
#define __WORLDITERATOR_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cWorldIterator
|
||||
class ATL_NO_VTABLE cWorldIterator :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<cWorldIterator, &CLSID_WorldIterator>,
|
||||
public IDispatchImpl<IWorldIterator, &IID_IWorldIterator, &LIBID_DecalFilters>
|
||||
{
|
||||
public:
|
||||
cWorldIterator()
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_WORLDITERATOR)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cWorldIterator)
|
||||
COM_INTERFACE_ENTRY(IWorldIterator)
|
||||
COM_INTERFACE_ENTRY(IDispatch)
|
||||
END_COM_MAP()
|
||||
|
||||
public:
|
||||
class cMatch
|
||||
{
|
||||
public:
|
||||
cMatch() {};
|
||||
virtual ~cMatch() {};
|
||||
|
||||
virtual bool match(cWorldDataMap::iterator i) = 0;
|
||||
virtual cWorldDataMap::iterator end() = 0;
|
||||
virtual cWorldDataMap::iterator begin() = 0;
|
||||
virtual void reset() {};
|
||||
};
|
||||
|
||||
class cMatchName : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
std::string m_name;
|
||||
public:
|
||||
cMatchName(cWorldDataMap *list, std::string name) : m_list(list), m_name(name) {};
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second;
|
||||
return (!m_name.compare(pData->m_strName));
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchNameSubstring : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
std::string m_name;
|
||||
public:
|
||||
cMatchNameSubstring(cWorldDataMap *list, std::string name) : m_list(list), m_name(name) {};
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second;
|
||||
return (pData->m_strName.find(m_name, 0) != std::string::npos);
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchContainer : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
long m_container;
|
||||
public:
|
||||
cMatchContainer(cWorldDataMap *list, long container) : m_list(list), m_container(container) { };
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second;
|
||||
return (m_container == pData->m_dwContainer);
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchLandscape : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
|
||||
public:
|
||||
cMatchLandscape(cWorldDataMap *list) : m_list(list) {};
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second ;
|
||||
if (pData->m_dwContainer == 0) return true ;
|
||||
return false ;
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchType : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
eObjectType m_type;
|
||||
public:
|
||||
cMatchType(cWorldDataMap *list, eObjectType type) : m_list(list), m_type(type) {};
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second;
|
||||
return (m_type == pData->m_eType);
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchInventory : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
|
||||
public:
|
||||
cMatchInventory(cWorldDataMap *list) : m_list(list) {};
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second ;
|
||||
if (pData->m_dwContainer == m_list->player()) return true ;
|
||||
cWorldDataMap::iterator iData = m_list->find(pData->m_dwContainer);
|
||||
if (iData != m_list->end()) {
|
||||
return iData->second->m_dwContainer == m_list->player() ;
|
||||
}
|
||||
return false ;
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchOwner : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
long m_owner;
|
||||
public:
|
||||
cMatchOwner(cWorldDataMap *list, long owner) : m_list(list), m_owner(owner) { };
|
||||
virtual bool match(cWorldDataMap::iterator i) {
|
||||
cWorldData *pData = i->second ;
|
||||
if (pData->m_dwContainer == m_owner) return true ;
|
||||
cWorldDataMap::iterator iData = m_list->find(pData->m_dwContainer);
|
||||
if (iData != m_list->end()) {
|
||||
return iData->second->m_dwContainer == m_owner ;
|
||||
}
|
||||
return false ;
|
||||
};
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
class cMatchAll : public cMatch
|
||||
{
|
||||
private:
|
||||
cWorldDataMap *m_list;
|
||||
public:
|
||||
cMatchAll(cWorldDataMap *list) : m_list(list) {};
|
||||
virtual bool match(cWorldDataMap::iterator i) { return true; };
|
||||
virtual cWorldDataMap::iterator end() { return m_list->end(); };
|
||||
virtual cWorldDataMap::iterator begin() { return m_list->begin(); };
|
||||
};
|
||||
|
||||
typedef std::list< cMatch * > cMatchList;
|
||||
|
||||
~cWorldIterator()
|
||||
{
|
||||
for (cMatchList::iterator i = m_compares.begin(); i != m_compares.end(); i++)
|
||||
delete (*i);
|
||||
}
|
||||
|
||||
// IWorldIterator
|
||||
void Initialize(cWorldDataMap *pMap);
|
||||
|
||||
STDMETHOD(ByAll)();
|
||||
STDMETHOD(ByInventory)();
|
||||
STDMETHOD(ByLandscape)();
|
||||
STDMETHOD(ByContainer)(long nContainer);
|
||||
STDMETHOD(ByOwner)(long nOwner);
|
||||
STDMETHOD(ByNameSubstring)(BSTR strSubstring);
|
||||
STDMETHOD(ByName)(BSTR strName);
|
||||
STDMETHOD(ByType)(enum eObjectType Type);
|
||||
|
||||
STDMETHOD(Pop)();
|
||||
STDMETHOD(Reset)();
|
||||
|
||||
STDMETHOD(get_Next)(/*[out]*/ IWorldObject **ppObject, /*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_Count)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Next_Old)(/*[out, retval]*/ IWorldObject **pVal);
|
||||
STDMETHOD(get_Quantity)(/*[out, retval]*/ long *pVal);
|
||||
|
||||
cWorldDataMap *m_objects;
|
||||
cWorldDataMap::iterator m_i;
|
||||
cMatchList m_compares;
|
||||
};
|
||||
|
||||
#endif //__WORLDITERATOR_H_
|
||||
26
Native/DecalFilters/WorldIterator.rgs
Normal file
26
Native/DecalFilters/WorldIterator.rgs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.WorldIterator.1 = s 'WorldIterator Class'
|
||||
{
|
||||
CLSID = s '{2681B113-294E-4ABF-B543-624194846BE1}'
|
||||
}
|
||||
DecalFilters.WorldIterator = s 'WorldIterator Class'
|
||||
{
|
||||
CLSID = s '{2681B113-294E-4ABF-B543-624194846BE1}'
|
||||
CurVer = s 'DecalFilters.WorldIterator.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {2681B113-294E-4ABF-B543-624194846BE1} = s 'WorldIterator Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.WorldIterator.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.WorldIterator'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
674
Native/DecalFilters/WorldObject.cpp
Normal file
674
Native/DecalFilters/WorldObject.cpp
Normal file
|
|
@ -0,0 +1,674 @@
|
|||
// WorldObject.cpp : Implementation of cWorldObject
|
||||
#include "stdafx.h"
|
||||
#include "DecalFilters.h"
|
||||
#include "World.h"
|
||||
#include "WorldObject.h"
|
||||
#include ".\worldobject.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cWorldObject
|
||||
|
||||
cWorldObject::~cWorldObject()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HRESULT cWorldObject::GetLong(long val, long *ret)
|
||||
{
|
||||
if (!ret) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*ret = val ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldObject::get_GUID(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwGUID, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Model(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwModel, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_RealModel(LONG* pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwRealModel, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Icon(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwIcon, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Name(BSTR *pVal)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
if(!pVal)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = T2BSTR(m_p->m_strName.c_str());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_SecondaryName(BSTR *pVal)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
if(!pVal)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = T2BSTR(m_p->m_strSecondaryName.c_str());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Value(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwValue, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Container(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwContainer, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Landblock(long *pVal)
|
||||
{
|
||||
HRESULT hr = GetLong(m_p->m_dwLandblock, pVal) ;
|
||||
hr = (hr==S_OK && (m_p->m_flags & FLAG_LOCATION)) ? S_OK : S_FALSE ;
|
||||
return hr ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Offset(float *x, float *y, float *z, short *pVal)
|
||||
{
|
||||
if(!pVal || !x || !y || !z)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
HRESULT hr = S_OK ;
|
||||
if (m_p->m_flags & FLAG_LOCATION) {
|
||||
*pVal = true;
|
||||
*x = m_p->m_fxOffset;
|
||||
*y = m_p->m_fyOffset;
|
||||
*z = m_p->m_fzOffset;
|
||||
} else {
|
||||
*pVal = false;
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
*z = 0;
|
||||
hr = S_FALSE;
|
||||
}
|
||||
return hr ;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Heading(float *x, float *y, float *z, float *w, short *pVal)
|
||||
{
|
||||
if(!pVal || !x || !y || !z || !w)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
HRESULT hr = S_OK ;
|
||||
if (m_p->m_flags & FLAG_LOCATION) {
|
||||
*pVal = true;
|
||||
// Gouru: modified so that x, y, and z are current position information, there is
|
||||
// no such thing as x,y,z heading information from the server.
|
||||
*x = m_p->m_fxOffset;
|
||||
*y = m_p->m_fyOffset;
|
||||
*z = m_p->m_fzOffset;
|
||||
*w = m_p->m_fwHeading;
|
||||
} else {
|
||||
*pVal = false;
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
*z = 0;
|
||||
*w = 0;
|
||||
hr = S_FALSE;
|
||||
}
|
||||
return hr ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Type(eObjectType *pVal)
|
||||
{
|
||||
if(!pVal)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_p->m_eType;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ItemSlots(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_nItemSlots, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_PackSlots(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_nPackSlots, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Lockable(VARIANT_BOOL *pVal)
|
||||
{
|
||||
if(!pVal) {
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = (m_p->m_flags & FLAG_LOCKABLE) ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Inscribable(VARIANT_BOOL *pVal)
|
||||
{
|
||||
if(!pVal) {
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = (m_p->m_flags & FLAG_INSCRIBABLE) ? VARIANT_TRUE : VARIANT_FALSE ;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldObject::get_UsesLeft(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_nUsesLeft, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_TotalUses(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_nTotalUses, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_StackCount(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_nStackCount, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_StackMax(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_nStackMax, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_TradeNoteVendor(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwTradeNoteVendor, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_AssociatedSpell(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwAssociatedSpell, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Slot(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_Slot.slot, pVal) ;
|
||||
}
|
||||
|
||||
// Gouru: call maintained for backwards compatability. Owner will always be the same
|
||||
// as the container. If you want the player that owns this item,
|
||||
STDMETHODIMP cWorldObject::get_Owner(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwContainer, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Wielder(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwWielder, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_WieldingSlot(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwWieldingSlot, pVal) ;
|
||||
}
|
||||
|
||||
|
||||
// Gouru: this method should NEVER be implemented. It requires knowledge of the location of
|
||||
// other objects. And since it is easily computed from the coordinates returned by
|
||||
// get_Coordinates, this seems like a major waste. Method however is still here to avoid
|
||||
// breaking the interface.
|
||||
STDMETHODIMP cWorldObject::get_Distance(float *NorthSouth, float *EastWest, VARIANT_BOOL *pVal)
|
||||
{
|
||||
return E_NOTIMPL ;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Coordinates(float *NorthSouth, float *EastWest, VARIANT_BOOL *pVal)
|
||||
{
|
||||
// code based on algorithm from GKusnick
|
||||
if (NorthSouth==NULL || EastWest==NULL ) {
|
||||
_ASSERT(FALSE);
|
||||
if (pVal) *pVal = VARIANT_FALSE ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
|
||||
*NorthSouth = cWorld::NorthSouth(m_p->m_dwLandblock, m_p->m_fyOffset) ;
|
||||
*EastWest = cWorld::EastWest(m_p->m_dwLandblock, m_p->m_fxOffset) ;
|
||||
|
||||
if (pVal) *pVal = VARIANT_TRUE ;
|
||||
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
// Exposes the raw coordinate data as sent by the server, for those who prefer to do their own calcs.
|
||||
STDMETHODIMP cWorldObject::get_RawCoordinates(float *pX, float *pY, float *pZ, VARIANT_BOOL *pVal)
|
||||
{
|
||||
if (pX==NULL || pY==NULL ) {
|
||||
_ASSERT(FALSE);
|
||||
if (pVal) *pVal = VARIANT_FALSE ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
|
||||
*pX = m_p->m_fxOffset;
|
||||
*pY = m_p->m_fyOffset;
|
||||
|
||||
if (pZ)
|
||||
{
|
||||
*pZ = m_p->m_fzOffset;
|
||||
}
|
||||
|
||||
if (pVal)
|
||||
{
|
||||
*pVal = VARIANT_TRUE ;
|
||||
}
|
||||
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Scale(float* pVal)
|
||||
{
|
||||
*pVal = m_p->m_fScale;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Flags(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_flags, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_CreateFlags1(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwFlags1, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_CreateFlags2(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwFlags2, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ObjectFlags1(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwObjectFlags1, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ObjectFlags2(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_dwObjectFlags2, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Monarch(long *pVal) {
|
||||
return GetLong(m_p->m_dwMonarch, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Material(long *pVal) {
|
||||
return GetLong(m_p->m_dwMaterial, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Coverage(long *pVal) {
|
||||
return GetLong(m_p->m_dwCoverage, pVal) ;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Coverage2(long *pVal) {
|
||||
return GetLong(m_p->m_dwCoverage2, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Coverage3(long *pVal) {
|
||||
return GetLong(m_p->m_dwCoverage3, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_EquipType(long *pVal) {
|
||||
return GetLong(m_p->m_dwEquipType, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Burden(long *pVal) {
|
||||
return GetLong(m_p->m_Burden, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_IconOutline(long *pVal) {
|
||||
return GetLong(m_p->m_IconOutline, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_MissileType(long *pVal) {
|
||||
return GetLong(m_p->m_MissileType, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_TotalValue(long *pVal) {
|
||||
return GetLong(m_p->m_TotalValue, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_UsageMask(long *pVal) {
|
||||
return GetLong(m_p->m_UsageMask, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_HouseOwner(long *pVal) {
|
||||
return GetLong(m_p->m_HouseOwner, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_HookMask(long *pVal) {
|
||||
return GetLong(m_p->m_HookMask, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_HookType(long *pVal) {
|
||||
return GetLong(m_p->m_HookType, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ApproachDistance(float *pVal) {
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_fApproachDistance ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Workmanship(float *pVal) {
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_Workmanship ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_HasIdData(VARIANT_BOOL *pVal)
|
||||
{
|
||||
if(!pVal) {
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = m_p->m_HasIdData ;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ArmorLevel(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_ArmorLevel, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_MagicDef(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_MagicDef, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Spellcraft(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_Spellcraft, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_MaximumMana(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_MaximumMana, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_LoreReq(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_LoreReq, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_RankReq(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_RankReq, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_SkillReq(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_SkillReq, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_WieldReqType(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_WieldReqType, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_WieldReqId(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_WieldReqId, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_WieldReq(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_WieldReq, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_TinkerCount(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_TinkerCount, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_SkillReqId(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_SkillReqId, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_SpecialProps(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_SpecialProps, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ManaCMod(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_ManaCMod ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_SpellCount(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_SpellCount, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Spell(long ix, long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_Spell[ix], pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Inscription(BSTR *pVal)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
if(!pVal)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = T2BSTR(m_p->m_Inscription.c_str());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_RaceReq(BSTR *pVal)
|
||||
{
|
||||
USES_CONVERSION;
|
||||
|
||||
if(!pVal)
|
||||
{
|
||||
_ASSERT(FALSE);
|
||||
return E_POINTER;
|
||||
}
|
||||
|
||||
*pVal = T2BSTR(m_p->m_RaceReq.c_str());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_WeapSpeed(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_WeapSpeed, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_EquipSkill(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_EquipSkill, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_DamageType(long *pVal)
|
||||
{
|
||||
return GetLong(m_p->m_DamageType, pVal) ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_MaxDamage(long *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_MaxDamage ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Variance(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_Variance ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_DefenseBonus(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_DefenseBonus ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_AttackBonus(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_AttackBonus ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_Range(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_Range ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_SlashProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_SlashProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_PierceProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_PierceProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_BludProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_BludProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ColdProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_ColdProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_FireProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_FireProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_ElectProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_ElectProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_AcidProt(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_AcidProt ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
STDMETHODIMP cWorldObject::get_DamageBonus(float *pVal)
|
||||
{
|
||||
if (!pVal) {
|
||||
_ASSERT(FALSE) ;
|
||||
return E_POINTER ;
|
||||
}
|
||||
*pVal = m_p->m_DamageBonus ;
|
||||
return S_OK ;
|
||||
}
|
||||
|
||||
138
Native/DecalFilters/WorldObject.h
Normal file
138
Native/DecalFilters/WorldObject.h
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
// WorldObject.h : Declaration of the cWorldObject
|
||||
|
||||
#ifndef __WORLDOBJECT_H_
|
||||
#define __WORLDOBJECT_H_
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
#define FLAG_STACKABLE 0x00000001
|
||||
#define FLAG_LOCATION 0x00000002
|
||||
#define FLAG_LOCKABLE 0x00000004
|
||||
#define FLAG_INSCRIBABLE 0x00000010
|
||||
#define FLAG_USEABLE 0x00000020
|
||||
#define FLAG_HASSPELL 0x00000040
|
||||
#define FLAG_CONTAINS 0x00000080
|
||||
|
||||
class cWorld;
|
||||
class cWorldData;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// cWorldObject
|
||||
class ATL_NO_VTABLE cWorldObject :
|
||||
public CComObjectRootEx<CComSingleThreadModel>,
|
||||
public CComCoClass<cWorldObject, &CLSID_WorldObject>,
|
||||
public IDispatchImpl<IWorldObject, &IID_IWorldObject, &LIBID_DecalFilters>,
|
||||
public IWorldObject2
|
||||
{
|
||||
public:
|
||||
cWorldObject()
|
||||
{
|
||||
}
|
||||
virtual ~cWorldObject();
|
||||
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_WORLDOBJECT)
|
||||
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
||||
|
||||
BEGIN_COM_MAP(cWorldObject)
|
||||
COM_INTERFACE_ENTRY(IWorldObject)
|
||||
COM_INTERFACE_ENTRY2(IDispatch, IWorldObject)
|
||||
COM_INTERFACE_ENTRY(IWorldObject2)
|
||||
END_COM_MAP()
|
||||
|
||||
private:
|
||||
HRESULT GetLong(long val, long *ret) ;
|
||||
public:
|
||||
// IWorldObject
|
||||
STDMETHOD(get_Coordinates)(/*[in, out]*/ float *NorthSouth, /*[in, out]*/ float *EastWest, /*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_RawCoordinates)(/*[in, out]*/ float *pX, /*[in, out]*/ float *pY, /*[in, out]*/ float *pZ, /*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_Distance)(float *NorthSouth, float *EastWest, /*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_WieldingSlot)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Wielder)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Owner)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Slot)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_AssociatedSpell)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_StackMax)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_StackCount)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_TotalUses)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_UsesLeft)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Inscribable)(/*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_Lockable)(/*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_PackSlots)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_ItemSlots)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Type)(/*[out, retval]*/ eObjectType *pVal);
|
||||
STDMETHOD(get_Heading)(float *x, float *y, float *z, float *w, /*[out, retval]*/ short *pVal);
|
||||
STDMETHOD(get_Offset)(float *x, float *y, float *z, /*[out, retval]*/ short *pVal);
|
||||
STDMETHOD(get_Landblock)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Container)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Value)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_Icon)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Model)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_GUID)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Monarch)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Material)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Coverage)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Coverage2)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Coverage3)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_TradeNoteVendor)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_EquipType)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_SecondaryName)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_ApproachDistance)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_Workmanship)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_Burden)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_IconOutline)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_MissileType)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_TotalValue)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_UsageMask)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_HouseOwner)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_HookMask)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_HookType)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_RealModel)(/*[out, retval]*/long *pVal);
|
||||
STDMETHOD(get_Scale)(/*[out, retval]*/float *pVal);
|
||||
STDMETHOD(get_HasIdData)(/*[out, retval]*/ VARIANT_BOOL *pVal);
|
||||
STDMETHOD(get_ArmorLevel)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_MagicDef)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Spellcraft)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_MaximumMana)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_LoreReq)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_RankReq)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_SkillReq)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_WieldReqType)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_WieldReqId)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_WieldReq)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_TinkerCount)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_SkillReqId)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_SpecialProps)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_ManaCMod)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_SpellCount)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Spell)(long index, /*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Inscription)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_WeapSpeed)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_EquipSkill)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_DamageType)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_MaxDamage)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_Variance)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_DefenseBonus)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_AttackBonus)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_Range)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_SlashProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_PierceProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_BludProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_ColdProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_FireProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_ElectProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_AcidProt)(/*[out, retval]*/ float *pVal);
|
||||
STDMETHOD(get_RaceReq)(/*[out, retval]*/ BSTR *pVal);
|
||||
STDMETHOD(get_DamageBonus)(/*[out, retval]*/ float *pVal);
|
||||
|
||||
// IWorldObject2
|
||||
STDMETHOD(get_Flags)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_CreateFlags1)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_CreateFlags2)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_ObjectFlags1)(/*[out, retval]*/ long *pVal);
|
||||
STDMETHOD(get_ObjectFlags2)(/*[out, retval]*/ long *pVal);
|
||||
|
||||
cWorldData *m_p;
|
||||
};
|
||||
|
||||
#endif //__WORLDOBJECT_H_
|
||||
26
Native/DecalFilters/WorldObject.rgs
Normal file
26
Native/DecalFilters/WorldObject.rgs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
HKCR
|
||||
{
|
||||
DecalFilters.WorldObject.1 = s 'WorldObject Class'
|
||||
{
|
||||
CLSID = s '{50A7E9EC-AB12-4484-9C28-C2A39274A636}'
|
||||
}
|
||||
DecalFilters.WorldObject = s 'WorldObject Class'
|
||||
{
|
||||
CLSID = s '{50A7E9EC-AB12-4484-9C28-C2A39274A636}'
|
||||
CurVer = s 'DecalFilters.WorldObject.1'
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
ForceRemove {50A7E9EC-AB12-4484-9C28-C2A39274A636} = s 'WorldObject Class'
|
||||
{
|
||||
ProgID = s 'DecalFilters.WorldObject.1'
|
||||
VersionIndependentProgID = s 'DecalFilters.WorldObject'
|
||||
ForceRemove 'Programmable'
|
||||
InprocServer32 = s '%MODULE%'
|
||||
{
|
||||
val ThreadingModel = s 'Apartment'
|
||||
}
|
||||
'TypeLib' = s '{DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Native/DecalFilters/resource.h
Normal file
28
Native/DecalFilters/resource.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by DecalFilters.rc
|
||||
//
|
||||
#define IDS_PROJNAME 100
|
||||
#define IDR_INVENTORY 101
|
||||
#define IDR_INVENTORYITEM 102
|
||||
#define IDR_WORLD 103
|
||||
#define IDR_WORLDOBJECT 104
|
||||
#define IDR_STACKABLE 107
|
||||
#define IDR_LOCATION 108
|
||||
#define IDR_WORLDITERATOR 109
|
||||
#define IDR_IDENTIFYQUEUE 110
|
||||
#define IDR_ECHOFILTER 202
|
||||
#define IDR_CHARACTERSTATS 204
|
||||
#define IDR_PREFILTER 205
|
||||
#define IDR_ECHOFILTER2 207
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 208
|
||||
#define _APS_NEXT_COMMAND_VALUE 32768
|
||||
#define _APS_NEXT_CONTROL_VALUE 201
|
||||
#define _APS_NEXT_SYMED_VALUE 111
|
||||
#endif
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue