You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(42) |
Sep
(42) |
Oct
(57) |
Nov
(12) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(14) |
Feb
(4) |
Mar
(52) |
Apr
(13) |
May
(89) |
Jun
(38) |
Jul
(5) |
Aug
(32) |
Sep
(68) |
Oct
(27) |
Nov
(2) |
Dec
(13) |
2004 |
Jan
(3) |
Feb
(6) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ha...@us...> - 2002-12-12 02:33:12
|
Update of /cvsroot/decaldev/source/DecalNet In directory sc8-pr-cvs1:/tmp/cvs-serv1133 Modified Files: DecalNet.rc Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: DecalNet.rc =================================================================== RCS file: /cvsroot/decaldev/source/DecalNet/DecalNet.rc,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** DecalNet.rc 29 Oct 2002 13:20:54 -0000 1.26 --- DecalNet.rc 12 Dec 2002 02:33:10 -0000 1.27 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,4,1,4 ! PRODUCTVERSION 2,4,1,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,0 ! PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 72,81 **** VALUE "Comments", "DecalNet is the core module that processes the network messages between the client and the server" VALUE "FileDescription", "DecalNet Module" ! VALUE "FileVersion", "2, 4, 1, 4" VALUE "InternalName", "DecalNet" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalNet.DLL" VALUE "ProductName", "DecalNet Module" ! VALUE "ProductVersion", "2, 4, 1, 4" END END --- 72,81 ---- VALUE "Comments", "DecalNet is the core module that processes the network messages between the client and the server" VALUE "FileDescription", "DecalNet Module" ! VALUE "FileVersion", "2, 5, 0, 0" VALUE "InternalName", "DecalNet" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalNet.DLL" VALUE "ProductName", "DecalNet Module" ! VALUE "ProductVersion", "2, 5, 0, 0" END END |
From: <ha...@us...> - 2002-12-12 02:32:55
|
Update of /cvsroot/decaldev/source/DecalInput In directory sc8-pr-cvs1:/tmp/cvs-serv1040 Modified Files: DecalInput.rc Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: DecalInput.rc =================================================================== RCS file: /cvsroot/decaldev/source/DecalInput/DecalInput.rc,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** DecalInput.rc 29 Oct 2002 13:20:54 -0000 1.25 --- DecalInput.rc 12 Dec 2002 02:32:52 -0000 1.26 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,4,1,4 ! PRODUCTVERSION 2,4,1,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,0 ! PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 71,80 **** BEGIN VALUE "FileDescription", "DecalInput Module" ! VALUE "FileVersion", "2, 4, 1, 4" VALUE "InternalName", "DecalInput" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalInput.DLL" VALUE "ProductName", "DecalInput Module" ! VALUE "ProductVersion", "2, 4, 1, 4" END END --- 71,80 ---- BEGIN VALUE "FileDescription", "DecalInput Module" ! VALUE "FileVersion", "2, 5, 0, 0" VALUE "InternalName", "DecalInput" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalInput.DLL" VALUE "ProductName", "DecalInput Module" ! VALUE "ProductVersion", "2, 5, 0, 0" END END |
From: <ha...@us...> - 2002-12-12 02:32:29
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv944 Modified Files: DecalFilters.rc Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: DecalFilters.rc =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/DecalFilters.rc,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** DecalFilters.rc 29 Oct 2002 13:20:54 -0000 1.50 --- DecalFilters.rc 12 Dec 2002 02:32:26 -0000 1.51 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,4,1,4 ! PRODUCTVERSION 2,4,1,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,0 ! PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 72,81 **** VALUE "Comments", "DecalFilters gives plug-in developers interfaces for monitoring client/server messages" VALUE "FileDescription", "DecalFilters Module" ! VALUE "FileVersion", "2, 4, 1, 4" VALUE "InternalName", "DecalFilters" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalFilters.DLL" VALUE "ProductName", "DecalFilters Module" ! VALUE "ProductVersion", "2, 4, 1, 4" END END --- 72,81 ---- VALUE "Comments", "DecalFilters gives plug-in developers interfaces for monitoring client/server messages" VALUE "FileDescription", "DecalFilters Module" ! VALUE "FileVersion", "2, 5, 0, 0" VALUE "InternalName", "DecalFilters" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalFilters.DLL" VALUE "ProductName", "DecalFilters Module" ! VALUE "ProductVersion", "2, 5, 0, 0" END END |
From: <ha...@us...> - 2002-12-12 02:32:19
|
Update of /cvsroot/decaldev/source/DecalDat In directory sc8-pr-cvs1:/tmp/cvs-serv900 Modified Files: DecalDat.rc Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: DecalDat.rc =================================================================== RCS file: /cvsroot/decaldev/source/DecalDat/DecalDat.rc,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** DecalDat.rc 29 Oct 2002 13:20:54 -0000 1.25 --- DecalDat.rc 12 Dec 2002 02:32:17 -0000 1.26 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,4,1,4 ! PRODUCTVERSION 2,4,1,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,0 ! PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 72,81 **** VALUE "Comments", "DecalDat houses the functionality that extracts data from the portal.dat file" VALUE "FileDescription", "DecalDat Module" ! VALUE "FileVersion", "2, 4, 1, 4" VALUE "InternalName", "DecalDat" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalDat.DLL" VALUE "ProductName", "DecalDat Module" ! VALUE "ProductVersion", "2, 4, 1, 4" END END --- 72,81 ---- VALUE "Comments", "DecalDat houses the functionality that extracts data from the portal.dat file" VALUE "FileDescription", "DecalDat Module" ! VALUE "FileVersion", "2, 5, 0, 0" VALUE "InternalName", "DecalDat" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalDat.DLL" VALUE "ProductName", "DecalDat Module" ! VALUE "ProductVersion", "2, 5, 0, 0" END END |
From: <ha...@us...> - 2002-12-12 02:32:10
|
Update of /cvsroot/decaldev/source/DecalControls In directory sc8-pr-cvs1:/tmp/cvs-serv839 Modified Files: DecalControls.rc Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: DecalControls.rc =================================================================== RCS file: /cvsroot/decaldev/source/DecalControls/DecalControls.rc,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** DecalControls.rc 29 Oct 2002 13:20:54 -0000 1.36 --- DecalControls.rc 12 Dec 2002 02:32:07 -0000 1.37 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,4,1,4 ! PRODUCTVERSION 2,4,1,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,0 ! PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 72,81 **** VALUE "Comments", "DecalControls is a group of control objects that give plug-in developers a basic group of UI elements to work with" VALUE "FileDescription", "DecalControls Module" ! VALUE "FileVersion", "2, 4, 1, 4" VALUE "InternalName", "DecalControls" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalControls.DLL" VALUE "ProductName", "DecalControls Module" ! VALUE "ProductVersion", "2, 4, 1, 4" END END --- 72,81 ---- VALUE "Comments", "DecalControls is a group of control objects that give plug-in developers a basic group of UI elements to work with" VALUE "FileDescription", "DecalControls Module" ! VALUE "FileVersion", "2, 5, 0, 0" VALUE "InternalName", "DecalControls" VALUE "LegalCopyright", "Copyright 2001" VALUE "OriginalFilename", "DecalControls.DLL" VALUE "ProductName", "DecalControls Module" ! VALUE "ProductVersion", "2, 5, 0, 0" END END |
From: <ha...@us...> - 2002-12-12 02:31:42
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv744 Modified Files: ACHooks.cpp ACHooks.h Decal.rc Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ACHooks.cpp 11 Dec 2002 21:50:10 -0000 1.32 --- ACHooks.cpp 12 Dec 2002 02:31:39 -0000 1.33 *************** *** 45,51 **** { _bstr_t _Unnamed; ! s_pACHooks = this; USES_CONVERSION; m_bMismatch = true; m_bPrevSelect = false; --- 45,52 ---- { _bstr_t _Unnamed; ! s_pACHooks = this; USES_CONVERSION; + m_bDecalRef = false; m_bMismatch = true; m_bPrevSelect = false; *************** *** 75,82 **** m_bGetAttribute = false; m_bGetSkill = false; ! m_bLogout = false; ! m_Hooks = 0 ; ! memset(m_HooksEx, 0, sizeof(m_HooksEx)); ! m_HookCount = 0; char szPath[ MAX_PATH ]; --- 76,83 ---- m_bGetAttribute = false; m_bGetSkill = false; ! m_bLogout = false; ! m_Hooks = 0; ! memset(m_HooksEx, 0, sizeof(m_HooksEx)); ! m_HookCount = 0; char szPath[ MAX_PATH ]; *************** *** 470,478 **** } ! if( QueryMemLoc( BSTRT( "GetVital" ), &Val ) == S_OK ) { m_lGetVital = Val; m_bGetVital = true; ! } if( QueryMemLoc( BSTRT( "GetAttribute" ), &Val ) == S_OK ) --- 471,479 ---- } ! if( QueryMemLoc( BSTRT( "GetVital" ), &Val ) == S_OK ) { m_lGetVital = Val; m_bGetVital = true; ! } if( QueryMemLoc( BSTRT( "GetAttribute" ), &Val ) == S_OK ) *************** *** 488,509 **** } ! if ( m_lVitalBase ) { ! if ( m_bGetVital ) { ! m_Hooks |= eGetVital; ! } ! if ( m_bGetAttribute ) { ! m_Hooks |= eGetAttribute; ! } ! if ( m_bGetSkill ) { ! m_Hooks |= eGetSkill; ! } ! } ! if( QueryMemLoc( BSTRT( "Logout" ), &Val ) == S_OK ) ! { ! m_lLogout = Val; ! m_bLogout = true; ! SetHookEx(eLogout); ! } DWORD dwOldProtect; --- 489,510 ---- } ! if( m_lVitalBase ) ! { ! if( m_bGetVital ) ! m_Hooks |= eGetVital; ! if( m_bGetAttribute ) ! m_Hooks |= eGetAttribute; ! ! if( m_bGetSkill ) ! m_Hooks |= eGetSkill; ! } ! ! if( QueryMemLoc( BSTRT( "Logout" ), &Val ) == S_OK ) ! { ! m_lLogout = Val; ! m_bLogout = true; ! SetHookEx(eLogout); ! } DWORD dwOldProtect; *************** *** 520,524 **** } ! m_Hooks |= eHooksAvailEx; } --- 521,525 ---- } ! m_Hooks |= eHooksAvailEx; } *************** *** 526,530 **** { _bstr_t _Unnamed; ! long Val, lCall1 = 0, lCall2 = 0; if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call1"), &Val ) == S_OK ) { --- 527,531 ---- { _bstr_t _Unnamed; ! long Val, lCall1 = 0, lCall2 = 0; if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call1"), &Val ) == S_OK ) { *************** *** 544,549 **** s_pACHooks = NULL; - g_lObjectDestroyedProc = 0; } --- 545,566 ---- s_pACHooks = NULL; g_lObjectDestroyedProc = 0; + + if( m_bDecalRef ) + m_pDecal.Release(); + } + + STDMETHODIMP cACHooks::SetDecal(IUnknown *pDecal) + { + if( m_bDecalRef ) + { + m_pDecal.Release(); + m_bDecalRef = false; + } + + if( pDecal->QueryInterface( __uuidof(IDecal), reinterpret_cast< void ** >(&m_pDecal) ) == S_OK ) + m_bDecalRef = true; + + return S_OK; } *************** *** 697,952 **** return S_FALSE; ! /* ! Validate the spellID is within acceptable ranges for Decal ! ! We don't want to use this function for casting... ! ! Drain spells ! Harm spells ! War Spells ! ! And when the new life bolt comes out, that spell ! ! SpellID's follow... ! ! 7 Harm Other I ! 8 Harm Self I ! 27 Flame Bolt I ! 28 Frost Bolt I ! 58 Acid Stream I ! 59 Acid Stream II ! 60 Acid Stream III ! 61 Acid Stream IV ! 62 Acid Stream V ! 63 Acid Stream VI ! 64 Shock Wave I ! 65 Shock Wave II ! 66 Shock Wave III ! 67 Shock Wave IV ! 68 Shock Wave V ! 69 Shock Wave VI ! 70 Frost Bolt II ! 71 Frost Bolt III ! 72 Frost Bolt IV ! 73 Frost Bolt V ! 74 Frost Bolt VI ! 75 Lightning Bolt I ! 76 Lightning Bolt II ! 77 Lightning Bolt III ! 78 Lightning Bolt IV ! 79 Lightning Bolt V ! 80 Lightning Bolt VI ! 81 Flame Bolt II ! 82 Flame Bolt III ! 83 Flame Bolt IV ! 84 Flame Bolt V ! 85 Flame Bolt VI ! 86 Force Bolt I ! 87 Force Bolt II ! 88 Force Bolt III ! 89 Force Bolt IV ! 90 Force Bolt V ! 91 Force Bolt VI ! 92 Whirling Blade I ! 93 Whirling Blade II ! 94 Whirling Blade III ! 95 Whirling Blade IV ! 96 Whirling Blade V ! 97 Whirling Blade VI ! 99 Acid Blast III ! 100 Acid Blast IV ! 101 Acid Blast V ! 102 Acid Blast VI ! 103 Shock Blast III ! 104 Shock Blast IV ! 105 Shock Blast V ! 106 Shock Blast VI ! 107 Frost Blast III ! 108 Frost Blast IV ! 109 Frost Blast V ! 110 Frost Blast VI ! 111 Lightning Blast III ! 112 Lightning Blast IV ! 113 Lightning Blast V ! 114 Lightning Blast VI ! 115 Flame Blast III ! 116 Flame Blast IV ! 117 Flame Blast V ! 118 Flame Blast VI ! 119 Force Blast III ! 120 Force Blast IV ! 121 Force Blast V ! 122 Force Blast VI ! 123 Blade Blast III ! 124 Blade Blast IV ! 125 Blade Blast V ! 126 Blade Blast VI ! 127 Acid Volley III ! 128 Acid Volley IV ! 129 Acid Volley V ! 130 Acid Volley VI ! 131 Bludgeoning Volley III ! 132 Bludgeoning Volley IV ! 133 Bludgeoning Volley V ! 134 Bludgeoning Volley VI ! 135 Frost Volley III ! 136 Frost Volley IV ! 137 Frost Volley V ! 138 Frost Volley VI ! 139 Lightning Volley III ! 140 Lightning Volley IV ! 141 Lightning Volley V ! 142 Lightning Volley VI ! 143 Flame Volley III ! 144 Flame Volley IV ! 145 Flame Volley V ! 146 Flame Volley VI ! 147 Force Volley III ! 148 Force Volley IV ! 149 Force Volley V ! 150 Force Volley VI ! 151 Blade Volley III ! 152 Blade Volley IV ! 153 Blade Volley V ! 154 Blade Volley VI ! 1171 Harm Self VI ! 1172 Harm Other II ! 1173 Harm Other III ! 1174 Harm Other IV ! 1175 Harm Other V ! 1176 Harm Other VI ! 1237 Drain Health Other I ! 1238 Drain Health Other II ! 1239 Drain Health Other III ! 1240 Drain Health Other IV ! 1241 Drain Health Other V ! 1242 Drain Health Other VI ! 1783 Searing Disc ! 1784 Horizon's Blades ! 1785 Cassius' Ring of Fire ! 1786 Nuhmudira's Spines ! 1787 Halo of Frost ! 1788 Eye of the Storm ! 1789 Tectonic Rifts ! 1790 Acid Streak I ! 1791 Acid Streak II ! 1792 Acid Streak III ! 1793 Acid Streak IV ! 1794 Acid Streak V ! 1795 Acid Streak VI ! 1796 Flame Streak I ! 1797 Flame Streak II ! 1798 Flame Streak III ! 1799 Flame Streak IV ! 1800 Flame Streak V ! 1801 Flame Streak VI ! 1802 Force Streak I ! 1803 Force Streak II ! 1804 Force Streak III ! 1805 Force Streak IV ! 1806 Force Streak V ! 1807 Force Streak VI ! 1808 Frost Streak I ! 1809 Frost Streak II ! 1810 Frost Streak III ! 1811 Frost Streak IV ! 1812 Frost Streak V ! 1813 Frost Streak VI ! 1814 Lightning Streak I ! 1815 Lightning Streak II ! 1816 Lightning Streak III ! 1817 Lightning Streak IV ! 1818 Lightning Streak V ! 1819 Lightning Streak VI ! 1820 Shock Wave Streak I ! 1821 Shock Wave Streak II ! 1822 Shock Wave Streak III ! 1823 Shock Wave Streak IV ! 1824 Shock Wave Streak V ! 1825 Shock Wave Streak VI ! 1826 Whirling Blade Streak I ! 1827 Whirling Blade Streak II ! 1828 Whirling Blade Streak III ! 1829 Whirling Blade Streak IV ! 1830 Whirling Blade Streak V ! 1831 Whirling Blade Streak VI ! 1832 Torrential Acid ! 1833 Squall of Swords ! 1834 Firestorm ! 1835 Splinterfall ! 1836 Avalanche ! 1837 Lightning Barrage ! 1838 Stone Fists ! 1839 Blistering Creeper ! 1840 Bed of Blades ! 1841 Slithering Flames ! 1842 Spike Strafe ! 1843 Foon-Ki's Glacial Floe ! 1844 Os' Wall ! 1845 Hammering Crawler ! 2070 Heart Rend ! 2120 Dissolving Vortex ! 2121 Corrosive Flash ! 2122 Disintegration ! 2123 Celdiseth's Searing ! 2124 Sau Kolin's Sword ! 2125 Flensing Wings ! 2126 Thousand Fists ! 2127 Silencia's Scorn ! 2128 Ilservian's Flame ! 2129 Sizzling Fury ! 2130 Infernae ! 2131 Stinging Needles ! 2132 The Spike ! 2133 Outlander's Insolence ! 2134 Fusillade ! 2135 Winter's Embrace ! 2136 Icy Torment ! 2137 Sudden Frost ! 2138 Blizzard ! 2139 Luminous Wrath ! 2140 Alset's Coil ! 2141 Lhen's Flare ! 2142 Tempest ! 2143 Pummeling Storm ! 2144 Crushing Shame ! 2145 Cameron's Curse ! 2146 Evisceration ! 2147 Rending Wind ! 2760-2766 Lifebolt spells ! ! This maps onto the ranges... ! ! 7-8 ! 27-28 ! 58-154 ! 1171-1176 ! 1237-1242 ! 1783-1845 ! 2070 ! 2120-2147 ! 2332 ! */ ! if ( (lSpellID >= 7 && lSpellID <= 8) ! || (lSpellID >= 27 && lSpellID <= 28) ! || (lSpellID >= 58 && lSpellID <= 154) ! || (lSpellID >= 1171 && lSpellID <= 1176) ! || (lSpellID >= 1237 && lSpellID <= 1242) ! || (lSpellID >= 1783 && lSpellID <= 1845) ! || lSpellID == 2070 ! || (lSpellID >= 2120 && lSpellID <= 2147) ! || (lSpellID >= 2760 && lSpellID <= 2766) ! ){ ! return S_FALSE; ! } ! long lCombatState = 4; ! if (get_CombatState( &lCombatState )==S_FALSE) { ! return S_OK ; } if( lCombatState != 4 ) //Must be in MAGIC MODE ! return S_OK; long lCurrentSelect; --- 714,735 ---- return S_FALSE; ! long lCombatState = 4; ! if( get_CombatState( &lCombatState ) == S_FALSE ) ! { ! // We don't have CombatState Loc ! long lCurrentSelect; ! get_CurrentSelection( &lCurrentSelect ); ! put_CurrentSelection( lObjectID ); ! typedef void(*CastPtr)( long ); ! CastPtr pCast = reinterpret_cast< CastPtr >( m_lCastSpell ); ! pCast( lSpellID ); ! put_CurrentSelection( lCurrentSelect ); ! return S_OK; } if( lCombatState != 4 ) //Must be in MAGIC MODE ! return S_FALSE; long lCurrentSelect; *************** *** 963,967 **** } - STDMETHODIMP cACHooks::MoveItem(long lObjectID, long lPackID, long lSlot, VARIANT_BOOL bStack) { --- 746,749 ---- *************** *** 1040,1048 **** long *pChatState = reinterpret_cast< long * >( m_lChatState ); ! *pChatState ? *pVal = VARIANT_TRUE : *pVal = VARIANT_FALSE; ! // Need to figure out a way to access cManager::_p->m_pKeyboard ! ! /*if( m_pKeyboard != NULL ) ! *pVal = VARIANT_TRUE;*/ return S_OK; --- 822,845 ---- long *pChatState = reinterpret_cast< long * >( m_lChatState ); ! if( m_bDecalRef ) ! { ! CComPtr< IPluginSite > pSite; ! if( m_pDecal->get_Object( _bstr_t( "services\\DecalPlugins.InjectService\\site" ), __uuidof(IPluginSite), reinterpret_cast< void ** >( &pSite ) ) == S_OK ) ! { ! if( pSite->get_Focus( pVal ) != S_OK ) ! *pVal = *pChatState ? VARIANT_TRUE : VARIANT_FALSE; ! else ! *pVal = (*pChatState || (*pVal == VARIANT_TRUE) ) ? VARIANT_TRUE : VARIANT_FALSE; ! return S_OK; ! } ! ! else ! *pVal = *pChatState ? VARIANT_TRUE : VARIANT_FALSE; ! ! return S_OK; ! } ! ! *pVal = *pChatState ? VARIANT_TRUE : VARIANT_FALSE; return S_OK; *************** *** 1692,1696 **** bool cACHooks::InternalChatMessage( char *szText, long lColor ) { ! return Fire_OnChatBoxMessage( _bstr_t( szText ), lColor ) == VARIANT_TRUE ? true : false; } --- 1489,1493 ---- bool cACHooks::InternalChatMessage( char *szText, long lColor ) { ! return Fire_OnChatBoxMessage( _bstr_t( szText ), lColor ) == VARIANT_TRUE ? true : false; } Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ACHooks.h 11 Dec 2002 21:50:10 -0000 1.27 --- ACHooks.h 12 Dec 2002 02:31:39 -0000 1.28 *************** *** 5,8 **** --- 5,9 ---- #include "DecalManager.h" #include "DecalCP.h" + #include "..\Inject\Inject.h" struct sMemoryLocation *************** *** 62,65 **** --- 63,68 ---- LocMap m_mLocationList; + bool m_bDecalRef; + bool m_bMismatch; *************** *** 154,158 **** long m_lVitalBase; ! bool m_bGetVital; long m_lGetVital; --- 157,161 ---- long m_lVitalBase; ! bool m_bGetVital; long m_lGetVital; *************** *** 163,171 **** long m_lGetSkill; ! bool m_bLogout; ! long m_lLogout; ! unsigned int m_HooksEx[1]; ! unsigned int m_HookCount; public: --- 166,176 ---- long m_lGetSkill; ! bool m_bLogout; ! long m_lLogout; ! unsigned int m_HooksEx[1]; ! unsigned int m_HookCount; ! ! CComPtr< IDecal > m_pDecal; public: *************** *** 174,178 **** bool InternalChatText( char *szText ); bool InternalChatMessage( char *szText, long lColor ); ! void SetHookEx(enum eAvailableHooksEx HookID); STDMETHOD(MoveItemEx)(long lObjectID, long lDestinationID); --- 179,183 ---- bool InternalChatText( char *szText ); bool InternalChatMessage( char *szText, long lColor ); ! void SetHookEx(enum eAvailableHooksEx HookID); STDMETHOD(MoveItemEx)(long lObjectID, long lDestinationID); *************** *** 219,223 **** STDMETHOD(LocalChatText)(BSTR Text); STDMETHOD(LocalChatEmote)(BSTR EmoteText); ! STDMETHOD(get_HooksAvailEx)(enum eAvailableHooksEx HookID, VARIANT_BOOL* pVal); ! STDMETHOD(Logout)(); }; --- 224,229 ---- STDMETHOD(LocalChatText)(BSTR Text); STDMETHOD(LocalChatEmote)(BSTR EmoteText); ! STDMETHOD(get_HooksAvailEx)(enum eAvailableHooksEx HookID, VARIANT_BOOL* pVal); ! STDMETHOD(Logout)(); ! STDMETHOD(SetDecal)(IUnknown *pDecal); }; Index: Decal.rc =================================================================== RCS file: /cvsroot/decaldev/source/Decal/Decal.rc,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Decal.rc 29 Oct 2002 13:20:53 -0000 1.33 --- Decal.rc 12 Dec 2002 02:31:39 -0000 1.34 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,4,1,4 ! PRODUCTVERSION 2,4,1,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 2,5,0,0 ! PRODUCTVERSION 2,5,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 71,80 **** BEGIN VALUE "FileDescription", "Decal Module" ! VALUE "FileVersion", "2, 4, 1, 4" VALUE "InternalName", "Decal" VALUE "LegalCopyright", "Copyright 2001-2002" VALUE "OriginalFilename", "Decal.DLL" VALUE "ProductName", "Decal Module" ! VALUE "ProductVersion", "2, 4, 1, 4" END END --- 71,80 ---- BEGIN VALUE "FileDescription", "Decal Module" ! VALUE "FileVersion", "2, 5, 0, 0" VALUE "InternalName", "Decal" VALUE "LegalCopyright", "Copyright 2001-2002" VALUE "OriginalFilename", "Decal.DLL" VALUE "ProductName", "Decal Module" ! VALUE "ProductVersion", "2, 5, 0, 0" END END |
From: <ha...@us...> - 2002-12-12 02:31:27
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv672 Modified Files: DecalManager.cpp Log Message: Fixes to ChatMessage, ACHooks improvements, version updates for 2500 Index: DecalManager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalManager.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DecalManager.cpp 3 Oct 2002 05:28:11 -0000 1.11 --- DecalManager.cpp 12 Dec 2002 02:31:23 -0000 1.12 *************** *** 452,455 **** --- 452,456 ---- m_pHooks.CoCreateInstance( _bstr_t( "Decal.ACHooks" ), NULL, CLSCTX_INPROC_SERVER ); + m_pHooks->SetDecal( reinterpret_cast< IUnknown * >( this ) ); CComPtr< IDecalEnum > pEnumServices; |
From: <ha...@us...> - 2002-12-11 22:04:59
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv15642 Modified Files: Inject.dsp Log Message: updated project file to prevent compile errors Index: Inject.dsp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Inject.dsp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Inject.dsp 28 Dec 2001 19:34:29 -0000 1.14 --- Inject.dsp 11 Dec 2002 22:04:53 -0000 1.15 *************** *** 57,62 **** # Begin Custom Build - Performing registration OutDir=.\..\Debug ! TargetPath=\dev\Decal\source\Debug\Inject.dll ! InputPath=\dev\Decal\source\Debug\Inject.dll SOURCE="$(InputPath)" --- 57,62 ---- # Begin Custom Build - Performing registration OutDir=.\..\Debug ! TargetPath=\Code\source\Debug\Inject.dll ! InputPath=\Code\source\Debug\Inject.dll SOURCE="$(InputPath)" *************** *** 95,100 **** # Begin Custom Build - Performing registration OutDir=.\..\Release ! TargetPath=\dev\Decal\source\Release\Inject.dll ! InputPath=\dev\Decal\source\Release\Inject.dll SOURCE="$(InputPath)" --- 95,100 ---- # Begin Custom Build - Performing registration OutDir=.\..\Release ! TargetPath=\Code\source\Release\Inject.dll ! InputPath=\Code\source\Release\Inject.dll SOURCE="$(InputPath)" *************** *** 396,422 **** SOURCE=.\SolidImage.rgs - # End Source File - # End Group - # Begin Group "Raw Source" - - # PROP Default_Filter "" - # Begin Source File - - SOURCE=.\HookedFunctions.cpp - - !IF "$(CFG)" == "Inject - Win32 Debug" - - # SUBTRACT BASE CPP /O<none> /YX /Yc /Yu - # ADD CPP /FAs /Fa"Debug/HookedFunctions.asm" - # SUBTRACT CPP /O<none> /YX /Yc /Yu - - !ELSEIF "$(CFG)" == "Inject - Win32 Release MinDependency" - - # SUBTRACT BASE CPP /O<none> /YX /Yc /Yu - # ADD CPP /MD /GX- /Zi /FAs - # SUBTRACT CPP /O<none> /YX /Yc /Yu - - !ENDIF - # End Source File # End Group --- 396,399 ---- |
From: <ha...@us...> - 2002-12-11 21:50:14
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv9950 Modified Files: ACHooks.cpp ACHooks.h Log Message: GetHooksAvailEx stuff by cynica_l, with some fixes for a vc6 compile error. Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ACHooks.cpp 11 Dec 2002 03:33:51 -0000 1.31 --- ACHooks.cpp 11 Dec 2002 21:50:10 -0000 1.32 *************** *** 5,8 **** --- 5,24 ---- #include <math.h> + /* + I believe in VC6, the limit of unnamed variables (_bstr_t("foo")) has been reached, + which caused the following error: + F:\Decal\source\Decal\ACHooks.cpp(467) : fatal error C1001: INTERNAL COMPILER ERROR + (compiler file 'E:\8168\vc98\p2\src\P2\main.c', line 494) + Please choose the Technical Support command on the Visual C++ + Help menu, or open the Technical Support help file for more information + This macro allows us to use a single variable, while keeping more or less the same syntax. + A variable of type _bstr_t named _Unnamed must be declared in any procedure this is used. + + Note - This only works with inline strings -> L"Foo" + */ + #define BSTRT(x) (_Unnamed = L##x, _Unnamed) + + + ///////////////////////////////////////////////////////////////////////////// cACHooks* cACHooks::s_pACHooks = NULL; *************** *** 28,32 **** cACHooks::cACHooks() { ! s_pACHooks = this; USES_CONVERSION; --- 44,49 ---- cACHooks::cACHooks() { ! _bstr_t _Unnamed; ! s_pACHooks = this; USES_CONVERSION; *************** *** 58,62 **** --- 75,82 ---- m_bGetAttribute = false; m_bGetSkill = false; + m_bLogout = false; m_Hooks = 0 ; + memset(m_HooksEx, 0, sizeof(m_HooksEx)); + m_HookCount = 0; char szPath[ MAX_PATH ]; *************** *** 77,84 **** if( bSuccess ) { ! MSXML::IXMLDOMElementPtr pNode = pMemLocDoc->selectSingleNode( _bstr_t( "locations" ) ); long lVerMajor = 0, lVerMinor = 0, lVerRelease = 0; ! _variant_t vVersion = pNode->getAttribute( _bstr_t( "version" ) ); char *szTemp, *szVersion = OLE2A( vVersion.bstrVal ); --- 97,104 ---- if( bSuccess ) { ! MSXML::IXMLDOMElementPtr pNode = pMemLocDoc->selectSingleNode( BSTRT( "locations" ) ); long lVerMajor = 0, lVerMinor = 0, lVerRelease = 0; ! _variant_t vVersion = pNode->getAttribute( BSTRT( "version" ) ); char *szTemp, *szVersion = OLE2A( vVersion.bstrVal ); *************** *** 123,127 **** } ! MSXML::IXMLDOMNodeListPtr pNodes = pMemLocDoc->selectNodes( _bstr_t( "/locations/memloc" ) ); for( pNode = pNodes->nextNode(); pNode.GetInterfacePtr() != NULL; pNode = pNodes->nextNode() ) --- 143,147 ---- } ! MSXML::IXMLDOMNodeListPtr pNodes = pMemLocDoc->selectNodes( BSTRT( "/locations/memloc" ) ); for( pNode = pNodes->nextNode(); pNode.GetInterfacePtr() != NULL; pNode = pNodes->nextNode() ) *************** *** 139,145 **** long Val; ! if( QueryMemLoc( _bstr_t( "PrevItem1" ), &Val ) == S_OK ) m_lPrevSelect[0] = Val; ! if( QueryMemLoc( _bstr_t( "PrevItem2" ), &Val ) == S_OK ) { m_lPrevSelect[1] = Val; --- 159,165 ---- long Val; ! if( QueryMemLoc( BSTRT( "PrevItem1" ), &Val ) == S_OK ) m_lPrevSelect[0] = Val; ! if( QueryMemLoc( BSTRT( "PrevItem2" ), &Val ) == S_OK ) { m_lPrevSelect[1] = Val; *************** *** 148,154 **** } ! if( QueryMemLoc( _bstr_t( "CurrentItem1" ), &Val ) == S_OK ) m_lCurrentSelect[0] = Val; ! if( QueryMemLoc( _bstr_t( "CurrentItem2" ), &Val ) == S_OK ) { m_lCurrentSelect[1] = Val; --- 168,174 ---- } ! if( QueryMemLoc( BSTRT( "CurrentItem1" ), &Val ) == S_OK ) m_lCurrentSelect[0] = Val; ! if( QueryMemLoc( BSTRT( "CurrentItem2" ), &Val ) == S_OK ) { m_lCurrentSelect[1] = Val; *************** *** 157,175 **** } ! if( QueryMemLoc( _bstr_t( "ChatMessage" ), &Val ) == S_OK ) pfnOldChatMessage = reinterpret_cast< void (*)( char *, DWORD ) >( Val ); ! if( QueryMemLoc( _bstr_t( "ChatMessageAddy" ), &Val ) == S_OK ) m_lChatMessageAddy = Val; ! if( QueryMemLoc( _bstr_t( "ChatText" ), &Val ) == S_OK ) pfnOldChatText = reinterpret_cast< void (*)() >( Val ); ! if( QueryMemLoc( _bstr_t( "Mouse1X" ), &Val ) == S_OK ) m_lMouse[0] = Val; ! if( QueryMemLoc( _bstr_t( "Mouse2X" ), &Val ) == S_OK ) m_lMouse[1] = Val; ! if( QueryMemLoc( _bstr_t( "Mouse3X" ), &Val ) == S_OK ) m_lMouse[2] = Val; ! if( QueryMemLoc( _bstr_t( "Mouse4X" ), &Val ) == S_OK ) { m_bMouse = true; --- 177,195 ---- } ! if( QueryMemLoc( BSTRT( "ChatMessage" ), &Val ) == S_OK ) pfnOldChatMessage = reinterpret_cast< void (*)( char *, DWORD ) >( Val ); ! if( QueryMemLoc( BSTRT( "ChatMessageAddy" ), &Val ) == S_OK ) m_lChatMessageAddy = Val; ! if( QueryMemLoc( BSTRT( "ChatText" ), &Val ) == S_OK ) pfnOldChatText = reinterpret_cast< void (*)() >( Val ); ! if( QueryMemLoc( BSTRT( "Mouse1X" ), &Val ) == S_OK ) m_lMouse[0] = Val; ! if( QueryMemLoc( BSTRT( "Mouse2X" ), &Val ) == S_OK ) m_lMouse[1] = Val; ! if( QueryMemLoc( BSTRT( "Mouse3X" ), &Val ) == S_OK ) m_lMouse[2] = Val; ! if( QueryMemLoc( BSTRT( "Mouse4X" ), &Val ) == S_OK ) { m_bMouse = true; *************** *** 178,182 **** } ! if( QueryMemLoc( _bstr_t( "CastSpell" ), &Val ) == S_OK ) { m_bCastSpell = true; --- 198,202 ---- } ! if( QueryMemLoc( BSTRT( "CastSpell" ), &Val ) == S_OK ) { m_bCastSpell = true; *************** *** 185,189 **** } ! if( QueryMemLoc( _bstr_t( "MoveItem" ), &Val ) == S_OK ) { m_bMoveItem = true; --- 205,209 ---- } ! if( QueryMemLoc( BSTRT( "MoveItem" ), &Val ) == S_OK ) { m_bMoveItem = true; *************** *** 192,196 **** } ! if( QueryMemLoc( _bstr_t( "SelectItem" ), &Val ) == S_OK ) { m_bSelectItem = true; --- 212,216 ---- } ! if( QueryMemLoc( BSTRT( "SelectItem" ), &Val ) == S_OK ) { m_bSelectItem = true; *************** *** 199,203 **** } ! if( QueryMemLoc( _bstr_t( "UseItem" ), &Val ) == S_OK ) { m_bUseItem = true; --- 219,223 ---- } ! if( QueryMemLoc( BSTRT( "UseItem" ), &Val ) == S_OK ) { m_bUseItem = true; *************** *** 207,211 **** } ! if( QueryMemLoc( _bstr_t( "CombatState" ), &Val ) == S_OK ) { m_bCombatState = true; --- 227,231 ---- } ! if( QueryMemLoc( BSTRT( "CombatState" ), &Val ) == S_OK ) { m_bCombatState = true; *************** *** 214,218 **** } ! if( QueryMemLoc( _bstr_t( "SetCombatState" ), &Val ) == S_OK ) { m_bSetCombatState = true; --- 234,238 ---- } ! if( QueryMemLoc( BSTRT( "SetCombatState" ), &Val ) == S_OK ) { m_bSetCombatState = true; *************** *** 221,225 **** } ! if( QueryMemLoc( _bstr_t( "ChatState" ), &Val ) == S_OK ) { m_bChatState = true; --- 241,245 ---- } ! if( QueryMemLoc( BSTRT( "ChatState" ), &Val ) == S_OK ) { m_bChatState = true; *************** *** 228,232 **** } ! if( QueryMemLoc( _bstr_t( "GetFellowStats" ), &Val ) == S_OK ) { m_bGetFellowStats = true; --- 248,252 ---- } ! if( QueryMemLoc( BSTRT( "GetFellowStats" ), &Val ) == S_OK ) { m_bGetFellowStats = true; *************** *** 235,239 **** } ! if( QueryMemLoc( _bstr_t( "NumStackItemsSelected" ), &Val ) == S_OK ) { m_bStackCount = true; --- 255,259 ---- } ! if( QueryMemLoc( BSTRT( "NumStackItemsSelected" ), &Val ) == S_OK ) { m_bStackCount = true; *************** *** 242,248 **** } ! if( QueryMemLoc( _bstr_t( "TestFormula" ), &Val ) == S_OK ) m_lTestFormula = Val; ! if( QueryMemLoc( _bstr_t( "TestFormulavtp" ), &Val ) == S_OK ) { m_bTestFormula = true; --- 262,268 ---- } ! if( QueryMemLoc( BSTRT( "TestFormula" ), &Val ) == S_OK ) m_lTestFormula = Val; ! if( QueryMemLoc( BSTRT( "TestFormulavtp" ), &Val ) == S_OK ) { m_bTestFormula = true; *************** *** 251,255 **** } ! if( QueryMemLoc( _bstr_t( "VendorID" ), &Val ) == S_OK ) { m_bVendorID = true; --- 271,275 ---- } ! if( QueryMemLoc( BSTRT( "VendorID" ), &Val ) == S_OK ) { m_bVendorID = true; *************** *** 258,262 **** } ! if( QueryMemLoc( _bstr_t( "ItemBusyState" ), &Val ) == S_OK ) { m_bBusyState = true; --- 278,282 ---- } ! if( QueryMemLoc( BSTRT( "ItemBusyState" ), &Val ) == S_OK ) { m_bBusyState = true; *************** *** 264,268 **** m_lBusyState = Val; } ! if( QueryMemLoc( _bstr_t( "ItemBusyGUID" ), &Val ) == S_OK ) { m_bBusyStateID = true; --- 284,288 ---- m_lBusyState = Val; } ! if( QueryMemLoc( BSTRT( "ItemBusyGUID" ), &Val ) == S_OK ) { m_bBusyStateID = true; *************** *** 271,275 **** } ! if( QueryMemLoc( _bstr_t( "PointerState" ), &Val ) == S_OK ) { m_bPointerState = true; --- 291,295 ---- } ! if( QueryMemLoc( BSTRT( "PointerState" ), &Val ) == S_OK ) { m_bPointerState = true; *************** *** 278,282 **** } ! if( QueryMemLoc( _bstr_t( "MoveItemEx" ), &Val ) == S_OK ) { m_bMoveItemEx = true; --- 298,302 ---- } ! if( QueryMemLoc( BSTRT( "MoveItemEx" ), &Val ) == S_OK ) { m_bMoveItemEx = true; *************** *** 286,290 **** } ! if( QueryMemLoc( _bstr_t( "3DAreaWidth" ), &Val ) == S_OK ) { m_bArea3DWidth = true; --- 306,310 ---- } ! if( QueryMemLoc( BSTRT( "3DAreaWidth" ), &Val ) == S_OK ) { m_bArea3DWidth = true; *************** *** 293,297 **** } ! if( QueryMemLoc( _bstr_t( "3DAreaHeight" ), &Val ) == S_OK ) { m_bArea3DHeight = true; --- 313,317 ---- } ! if( QueryMemLoc( BSTRT( "3DAreaHeight" ), &Val ) == S_OK ) { m_bArea3DHeight = true; *************** *** 300,306 **** } ! if( QueryMemLoc( _bstr_t( "ObjectFromGUID" ), &Val ) == S_OK ) { m_lObjectFromGuid = Val; ! if( QueryMemLoc( _bstr_t( "ObjectFromGUIDClass" ), &Val ) == S_OK ) { m_lObjectFromGuidClass = Val; m_Hooks |= eArea3DHeight ; --- 320,326 ---- } ! if( QueryMemLoc( BSTRT( "ObjectFromGUID" ), &Val ) == S_OK ) { m_lObjectFromGuid = Val; ! if( QueryMemLoc( BSTRT( "ObjectFromGUIDClass" ), &Val ) == S_OK ) { m_lObjectFromGuidClass = Val; m_Hooks |= eArea3DHeight ; *************** *** 310,329 **** m_lMovementThingyParent = m_lMovementThingyOffset = m_lFaceHeading = 0; ! if( QueryMemLoc( _bstr_t( "MovementThingyParent" ), &Val ) == S_OK) { m_lMovementThingyParent = Val; } ! if( QueryMemLoc( _bstr_t( "MovementThingyOffset" ), &Val ) == S_OK) { m_lMovementThingyOffset = Val; } ! if( QueryMemLoc( _bstr_t( "FaceHeading" ), &Val ) == S_OK) { m_lFaceHeading = Val; } ! if( QueryMemLoc( _bstr_t( "SetAutorun" ), &Val ) == S_OK) { m_lSetAutorun = Val; --- 330,349 ---- m_lMovementThingyParent = m_lMovementThingyOffset = m_lFaceHeading = 0; ! if( QueryMemLoc( BSTRT( "MovementThingyParent" ), &Val ) == S_OK) { m_lMovementThingyParent = Val; } ! if( QueryMemLoc( BSTRT( "MovementThingyOffset" ), &Val ) == S_OK) { m_lMovementThingyOffset = Val; } ! if( QueryMemLoc( BSTRT( "FaceHeading" ), &Val ) == S_OK) { m_lFaceHeading = Val; } ! if( QueryMemLoc( BSTRT( "SetAutorun" ), &Val ) == S_OK) { m_lSetAutorun = Val; *************** *** 348,352 **** // We can't assume that the calls we're hooking call to this address, as they // might have already been hooked! ! if( QueryMemLoc( _bstr_t( "ObjectDestroyed"), &Val ) == S_OK ) { } --- 368,372 ---- // We can't assume that the calls we're hooking call to this address, as they // might have already been hooked! ! if( QueryMemLoc( BSTRT( "ObjectDestroyed"), &Val ) == S_OK ) { } *************** *** 354,363 **** long lCall1 = 0, lCall2 = 0; ! if( QueryMemLoc( _bstr_t( "ObjectDestroyed_Call1"), &Val ) == S_OK ) { lCall1 = Val; } ! if( QueryMemLoc( _bstr_t( "ObjectDestroyed_Call2"), &Val ) == S_OK ) { lCall2 = Val; --- 374,383 ---- long lCall1 = 0, lCall2 = 0; ! if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call1"), &Val ) == S_OK ) { lCall1 = Val; } ! if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call2"), &Val ) == S_OK ) { lCall2 = Val; *************** *** 384,388 **** } ! if( QueryMemLoc( _bstr_t( "InternalStringConstructor" ), &Val ) == S_OK) { m_bInternalStringConstructor = true; --- 404,408 ---- } ! if( QueryMemLoc( BSTRT( "InternalStringConstructor" ), &Val ) == S_OK) { m_bInternalStringConstructor = true; *************** *** 392,396 **** } ! if( QueryMemLoc( _bstr_t( "InternalStringDestructor" ), &Val ) == S_OK) { m_bInternalStringDestructor = true; --- 412,416 ---- } ! if( QueryMemLoc( BSTRT( "InternalStringDestructor" ), &Val ) == S_OK) { m_bInternalStringDestructor = true; *************** *** 400,404 **** } ! if( QueryMemLoc( _bstr_t( "SendMessageToID" ), &Val ) == S_OK) { m_bSendMessageToID = true; --- 420,424 ---- } ! if( QueryMemLoc( BSTRT( "SendMessageToID" ), &Val ) == S_OK) { m_bSendMessageToID = true; *************** *** 408,412 **** } ! if( QueryMemLoc( _bstr_t( "SendMessageToName" ), &Val ) == S_OK) { m_bSendMessageToName = true; --- 428,432 ---- } ! if( QueryMemLoc( BSTRT( "SendMessageToName" ), &Val ) == S_OK) { m_bSendMessageToName = true; *************** *** 416,420 **** } ! if( QueryMemLoc( _bstr_t( "LocalChatText" ), &Val ) == S_OK) { m_bLocalChatText = true; --- 436,440 ---- } ! if( QueryMemLoc( BSTRT( "LocalChatText" ), &Val ) == S_OK) { m_bLocalChatText = true; *************** *** 424,428 **** } ! if( QueryMemLoc( _bstr_t( "LocalChatEmote" ), &Val ) == S_OK) { m_bLocalChatEmote = true; --- 444,448 ---- } ! if( QueryMemLoc( BSTRT( "LocalChatEmote" ), &Val ) == S_OK) { m_bLocalChatEmote = true; *************** *** 445,477 **** ! if( QueryMemLoc( _bstr_t( "GetVital" ), &Val ) == S_OK ) { ! m_lGetVital = Val; ! ! if( QueryMemLoc( _bstr_t( "VitalBase" ), &Val ) == S_OK ) ! { ! m_lVitalBase = Val; ! ! m_bGetVital = true; ! m_Hooks |= eGetVital; ! } } ! if( QueryMemLoc( _bstr_t( "GetAttribute" ), &Val ) == S_OK ) { m_lGetAttribute = Val; m_bGetAttribute = true; - m_Hooks |= eGetAttribute; } ! if( QueryMemLoc( _bstr_t( "GetSkill" ), &Val ) == S_OK ) { m_lGetSkill = Val; m_bGetSkill = true; - m_Hooks |= eGetSkill; } DWORD dwOldProtect; ! if( QueryMemLoc( _bstr_t( "OnChatText" ), &Val ) == S_OK ) { VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); --- 465,512 ---- ! if( QueryMemLoc( BSTRT( "VitalBase" ), &Val ) == S_OK ) { ! m_lVitalBase = Val; } ! if( QueryMemLoc( BSTRT( "GetVital" ), &Val ) == S_OK ) ! { ! m_lGetVital = Val; ! m_bGetVital = true; ! } ! ! if( QueryMemLoc( BSTRT( "GetAttribute" ), &Val ) == S_OK ) { m_lGetAttribute = Val; m_bGetAttribute = true; } ! if( QueryMemLoc( BSTRT( "GetSkill" ), &Val ) == S_OK ) { m_lGetSkill = Val; m_bGetSkill = true; } + if ( m_lVitalBase ) { + if ( m_bGetVital ) { + m_Hooks |= eGetVital; + } + if ( m_bGetAttribute ) { + m_Hooks |= eGetAttribute; + } + if ( m_bGetSkill ) { + m_Hooks |= eGetSkill; + } + } + + if( QueryMemLoc( BSTRT( "Logout" ), &Val ) == S_OK ) + { + m_lLogout = Val; + m_bLogout = true; + SetHookEx(eLogout); + } + DWORD dwOldProtect; ! if( QueryMemLoc( BSTRT( "OnChatText" ), &Val ) == S_OK ) { VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); *************** *** 479,498 **** } ! if( QueryMemLoc( _bstr_t( "OnChatMessage" ), &Val ) == S_OK ) { VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); *reinterpret_cast< long * >( Val ) = ( reinterpret_cast< long >( OnChatMessage ) - ( Val + 0x4 ) ); } } cACHooks::~cACHooks() { ! long Val, lCall1 = 0, lCall2 = 0; ! if( QueryMemLoc( _bstr_t( "ObjectDestroyed_Call1"), &Val ) == S_OK ) { lCall1 = Val; } ! if( QueryMemLoc( _bstr_t( "ObjectDestroyed_Call2"), &Val ) == S_OK ) { lCall2 = Val; --- 514,536 ---- } ! if( QueryMemLoc( BSTRT( "OnChatMessage" ), &Val ) == S_OK ) { VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); *reinterpret_cast< long * >( Val ) = ( reinterpret_cast< long >( OnChatMessage ) - ( Val + 0x4 ) ); } + + m_Hooks |= eHooksAvailEx; } cACHooks::~cACHooks() { ! _bstr_t _Unnamed; ! long Val, lCall1 = 0, lCall2 = 0; ! if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call1"), &Val ) == S_OK ) { lCall1 = Val; } ! if( QueryMemLoc( BSTRT( "ObjectDestroyed_Call2"), &Val ) == S_OK ) { lCall2 = Val; *************** *** 1447,1451 **** STDMETHODIMP cACHooks::get_Vital(long Vital, long* pVal) { ! if( !m_bGetVital ) return S_FALSE; --- 1485,1489 ---- STDMETHODIMP cACHooks::get_Vital(long Vital, long* pVal) { ! if( !(m_bGetVital && m_lVitalBase) ) return S_FALSE; *************** *** 1456,1464 **** if( lBaseOrBuffed ) { ! if( Vital == 7 ) //health Vital = 2; ! else if( Vital == 8 ) //stamina Vital = 4; ! else if( Vital == 9 ) //mana Vital = 6; } --- 1494,1502 ---- if( lBaseOrBuffed ) { ! if( Vital == 7 ) // health Vital = 2; ! else if( Vital == 8 ) // stamina Vital = 4; ! else if( Vital == 9 ) // mana Vital = 6; } *************** *** 1476,1480 **** STDMETHODIMP cACHooks::get_Attribute(long Attribute, long* pVal) { ! if( !m_bGetAttribute ) return S_FALSE; --- 1514,1518 ---- STDMETHODIMP cACHooks::get_Attribute(long Attribute, long* pVal) { ! if( !(m_bGetAttribute && m_lVitalBase) ) return S_FALSE; *************** *** 1498,1502 **** STDMETHODIMP cACHooks::get_Skill(long Skill, long* pVal) { ! if( !m_bGetSkill ) return S_FALSE; --- 1536,1540 ---- STDMETHODIMP cACHooks::get_Skill(long Skill, long* pVal) { ! if( !(m_bGetSkill && m_lVitalBase) ) return S_FALSE; *************** *** 1519,1522 **** --- 1557,1622 ---- } + STDMETHODIMP cACHooks::get_HooksAvailEx(eAvailableHooksEx HookID, VARIANT_BOOL *pVal) + { + unsigned int ID; + unsigned int Index, Offset; + + // Default to not being valid + *pVal = VARIANT_FALSE; + + // Convert the enum to an integer so we can do maths on it + ID = static_cast< unsigned int >( HookID ); + + // Ensure the value is within range + if( ID > m_HookCount ) + { + return S_OK; + } + + // Extract the index and bit offset + Index = ID >> 5; // 32 -> 5 bits + Offset = ID & 0x1F; // 1F -> 5 bits worth of 1s + + if( m_HooksEx[Index] & (1 << Offset) ) + { + *pVal = VARIANT_TRUE; + } + + return S_OK; + } + + STDMETHODIMP cACHooks::Logout() + { + if( m_bLogout ) + { + long ( __cdecl *Internal_Logout )( long ); + Internal_Logout = reinterpret_cast< long ( __cdecl * )( long ) >( m_lLogout ); + Internal_Logout(0); + return S_OK; + } + + return S_FALSE; + } + + void cACHooks::SetHookEx( eAvailableHooksEx HookID ) + { + unsigned int ID; + unsigned int Index, Offset; + + ID = static_cast< unsigned int >( HookID ); + + Index = ID >> 5; + Offset = ID & 0x1F; + + _ASSERTE( Index < (sizeof(m_HooksEx) / sizeof(m_HooksEx[0])) ); + + m_HooksEx[Index] |= (1 << Offset); + + if( ID > m_HookCount ) + m_HookCount = ID; + + return; + } + void cACHooks::InternalObjectDestroyed (DWORD dwGuid) { *************** *** 1592,1596 **** bool cACHooks::InternalChatMessage( char *szText, long lColor ) { ! return Fire_OnChatBoxMessage( _bstr_t( szText ), lColor ) == VARIANT_TRUE ? true : false; } --- 1692,1696 ---- bool cACHooks::InternalChatMessage( char *szText, long lColor ) { ! return Fire_OnChatBoxMessage( _bstr_t( szText ), lColor ) == VARIANT_TRUE ? true : false; } Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ACHooks.h 11 Dec 2002 03:33:51 -0000 1.26 --- ACHooks.h 11 Dec 2002 21:50:10 -0000 1.27 *************** *** 25,30 **** }; ! bool DispatchChatMessage( char *pText, long *pdwColor ); ! bool DispatchChatText( char *pText ); ///////////////////////////////////////////////////////////////////////////// --- 25,30 ---- }; ! extern "C" bool DispatchChatMessage( char *pText, long *pdwColor ); ! extern "C" bool DispatchChatText( char *pText ); ///////////////////////////////////////////////////////////////////////////// *************** *** 152,159 **** long m_lLocalChatEmote; - bool m_bGetVital; - long m_lGetVital; long m_lVitalBase; bool m_bGetAttribute; long m_lGetAttribute; --- 152,160 ---- long m_lLocalChatEmote; long m_lVitalBase; + bool m_bGetVital; + long m_lGetVital; + bool m_bGetAttribute; long m_lGetAttribute; *************** *** 162,165 **** --- 163,172 ---- long m_lGetSkill; + bool m_bLogout; + long m_lLogout; + + unsigned int m_HooksEx[1]; + unsigned int m_HookCount; + public: static cACHooks* s_pACHooks; *************** *** 167,170 **** --- 174,178 ---- bool InternalChatText( char *szText ); bool InternalChatMessage( char *szText, long lColor ); + void SetHookEx(enum eAvailableHooksEx HookID); STDMETHOD(MoveItemEx)(long lObjectID, long lDestinationID); *************** *** 211,213 **** --- 219,223 ---- STDMETHOD(LocalChatText)(BSTR Text); STDMETHOD(LocalChatEmote)(BSTR EmoteText); + STDMETHOD(get_HooksAvailEx)(enum eAvailableHooksEx HookID, VARIANT_BOOL* pVal); + STDMETHOD(Logout)(); }; |
From: <ha...@us...> - 2002-12-11 21:49:58
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv9788 Modified Files: Decal.idl Log Message: GetHooksAvailEx stuff by cynica_l, with some fixes for a vc6 compile error. Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Decal.idl 11 Dec 2002 03:34:21 -0000 1.25 --- Decal.idl 11 Dec 2002 21:49:53 -0000 1.26 *************** *** 16,26 **** eCurrentMana = 5, eMaximumMana = 6, ! eBaseHealth = 7, eBaseStamina = 8, ! eBaseMana = 9, eCurrentStrength = 1, eCurrentEndurance = 2, eCurrentQuickness = 3, ! eCurrentCoordination = 4, eCurrentFocus = 5, eCurrentSelf = 6, --- 16,26 ---- eCurrentMana = 5, eMaximumMana = 6, ! eBaseHealth = 7, eBaseStamina = 8, ! eBaseMana = 9, eCurrentStrength = 1, eCurrentEndurance = 2, eCurrentQuickness = 3, ! eCurrentCoordination = 4, eCurrentFocus = 5, eCurrentSelf = 6, *************** *** 29,113 **** eBaseQuickness = 9, eBaseCoordination = 10, ! eBaseFocus = 11, ! eBaseSelf = 12 }; enum eSkill { ! eCurrentAxe = 1, ! eCurrentBow = 2, ! eCurrentCrossbow = 3, ! eCurrentDagger = 4, ! eCurrentMace = 5, ! eCurrentMeleeDefense = 6, ! eCurrentMissileDefense = 7, ! eCurrentSpear = 9, ! eCurrentStaff = 10, ! eCurrentSword = 11, ! eCurrentThrownWeapons = 12, ! eCurrentUnarmed = 13, ! eCurrentArcaneLore = 14, ! eCurrentMagicDefense = 15, ! eCurrentManaConversion = 16, ! eCurrentItemTinkering = 18, ! eCurrentAssessPerson = 19, ! eCurrentDeception = 20, ! eCurrentHealing = 21, ! eCurrentJump = 22, ! eCurrentLockpick = 23, ! eCurrentRun = 24, ! eCurrentAssessCreature = 27, ! eCurrentWeaponTinkering = 28, ! eCurrentArmorTinkering = 29, ! eCurrentMagicItemTinkering = 30, ! eCurrentCreatureEnchantment = 31, ! eCurrentItemEnchantment = 32, ! eCurrentLifeMagic = 33, ! eCurrentWarMagic = 34, ! eCurrentLeadership = 35, ! eCurrentLoyalty = 36, ! eCurrentFletchingSkill = 37, ! eCurrentAlchemySkill = 38, ! eCurrentCookingSkill = 39, ! eBaseAxe = 51, ! eBaseBow = 52, ! eBaseCrossbow = 53, ! eBaseDagger = 54, ! eBaseMace = 55, ! eBaseMeleeDefense = 56, ! eBaseMissileDefense = 57, ! eBaseSpear = 59, ! eBaseStaff = 60, ! eBaseSword = 61, ! eBaseThrownWeapons = 62, ! eBaseUnarmed = 63, ! eBaseArcaneLore = 64, ! eBaseMagicDefense = 65, ! eBaseManaConversion = 66, ! eBaseItemTinkering = 68, ! eBaseAssessPerson = 69, ! eBaseDeception = 70, ! eBaseHealing = 71, ! eBaseJump = 72, ! eBaseLockpick = 73, ! eBaseRun = 74, ! eBaseAssessCreature = 77, ! eBaseWeaponTinkering = 78, ! eBaseArmorTinkering = 79, ! eBaseMagicItemTinkering = 80, ! eBaseCreatureEnchantment = 81, ! eBaseItemEnchantment = 82, ! eBaseLifeMagic = 83, ! eBaseWarMagic = 84, ! eBaseLeadership = 85, ! eBaseLoyalty = 86, ! eBaseFletchingSkill = 87, ! eBaseAlchemySkill = 88, ! eBaseCookingSkill = 89 }; ! enum eAvailableHooks { ePrevSelect = 0x00000001, ! eCurrentSelect = 0x00000002, eMouse = 0x00000004, eCastSpell = 0x00000008, --- 29,114 ---- eBaseQuickness = 9, eBaseCoordination = 10, ! eBaseFocus = 11, ! eBaseSelf = 12 }; enum eSkill { ! eCurrentAxe = 1, ! eCurrentBow = 2, ! eCurrentCrossbow = 3, ! eCurrentDagger = 4, ! eCurrentMace = 5, ! eCurrentMeleeDefense = 6, ! eCurrentMissileDefense = 7, ! eCurrentSpear = 9, ! eCurrentStaff = 10, ! eCurrentSword = 11, ! eCurrentThrownWeapons = 12, ! eCurrentUnarmed = 13, ! eCurrentArcaneLore = 14, ! eCurrentMagicDefense = 15, ! eCurrentManaConversion = 16, ! eCurrentItemTinkering = 18, ! eCurrentAssessPerson = 19, ! eCurrentDeception = 20, ! eCurrentHealing = 21, ! eCurrentJump = 22, ! eCurrentLockpick = 23, ! eCurrentRun = 24, ! eCurrentAssessCreature = 27, ! eCurrentWeaponTinkering = 28, ! eCurrentArmorTinkering = 29, ! eCurrentMagicItemTinkering = 30, ! eCurrentCreatureEnchantment = 31, ! eCurrentItemEnchantment = 32, ! eCurrentLifeMagic = 33, ! eCurrentWarMagic = 34, ! eCurrentLeadership = 35, ! eCurrentLoyalty = 36, ! eCurrentFletchingSkill = 37, ! eCurrentAlchemySkill = 38, ! eCurrentCookingSkill = 39, ! eBaseAxe = 51, ! eBaseBow = 52, ! eBaseCrossbow = 53, ! eBaseDagger = 54, ! eBaseMace = 55, ! eBaseMeleeDefense = 56, ! eBaseMissileDefense = 57, ! eBaseSpear = 59, ! eBaseStaff = 60, ! eBaseSword = 61, ! eBaseThrownWeapons = 62, ! eBaseUnarmed = 63, ! eBaseArcaneLore = 64, ! eBaseMagicDefense = 65, ! eBaseManaConversion = 66, ! eBaseItemTinkering = 68, ! eBaseAssessPerson = 69, ! eBaseDeception = 70, ! eBaseHealing = 71, ! eBaseJump = 72, ! eBaseLockpick = 73, ! eBaseRun = 74, ! eBaseAssessCreature = 77, ! eBaseWeaponTinkering = 78, ! eBaseArmorTinkering = 79, ! eBaseMagicItemTinkering = 80, ! eBaseCreatureEnchantment = 81, ! eBaseItemEnchantment = 82, ! eBaseLifeMagic = 83, ! eBaseWarMagic = 84, ! eBaseLeadership = 85, ! eBaseLoyalty = 86, ! eBaseFletchingSkill = 87, ! eBaseAlchemySkill = 88, ! eBaseCookingSkill = 89 }; ! enum eAvailableHooks ! { ePrevSelect = 0x00000001, ! eCurrentSelect = 0x00000002, eMouse = 0x00000004, eCastSpell = 0x00000008, *************** *** 115,143 **** eSelectItem = 0x00000020, eUseItem = 0x00000040, ! eCombatState = 0x00000080, eChatState = 0x00000100, ! eGetFellowStats = 0x00000200, eStackCount = 0x00000400, ! eTestFormula = 0x00000800, eVendorID = 0x00001000, eBusyState = 0x00002000, ! eBusyStateID = 0x00004000, ! ePointerState = 0x00008000, eMoveItemEx = 0x00010000, ePosition = 0x00020000, ! eFaceHeading = 0x00040000, ! eArea3DWidth = 0x00080000, ! eArea3DHeight = 0x00100000, ! eObjectDestroyed= 0x00200000, eSendTell = 0x00400000, eSetAutorun = 0x00800000, eGetVital = 0x01000000, eSendTellEx = 0x02000000, ! eLocalChatText = 0x04000000, ! eLocalChatEmote = 0x08000000, ! eSetCombatState = 0x10000000, ! eGetAttribute = 0x20000000, ! eGetSkill = 0x40000000 }; interface IPluginSite2; --- 116,153 ---- eSelectItem = 0x00000020, eUseItem = 0x00000040, ! eCombatState = 0x00000080, eChatState = 0x00000100, ! eGetFellowStats = 0x00000200, eStackCount = 0x00000400, ! eTestFormula = 0x00000800, eVendorID = 0x00001000, eBusyState = 0x00002000, ! eBusyStateID = 0x00004000, ! ePointerState = 0x00008000, eMoveItemEx = 0x00010000, ePosition = 0x00020000, ! eFaceHeading = 0x00040000, ! eArea3DWidth = 0x00080000, ! eArea3DHeight = 0x00100000, ! eObjectDestroyed = 0x00200000, eSendTell = 0x00400000, eSetAutorun = 0x00800000, eGetVital = 0x01000000, eSendTellEx = 0x02000000, ! eLocalChatText = 0x04000000, ! eLocalChatEmote = 0x08000000, ! eSetCombatState = 0x10000000, ! eGetAttribute = 0x20000000, ! eGetSkill = 0x40000000, ! eHooksAvailEx = 0x80000000 ! }; ! ! // Items in here go in sequence (0, 1, 2, 3, ...), not as a bit-field ! enum eAvailableHooksEx ! { ! eLogout = 0, ! eAvailableHooksEx_DWORD = 0x7FFFFFFF // coerce enums into 4 byte instead of two }; + interface IPluginSite2; *************** *** 230,233 **** --- 240,245 ---- [id(40), helpstring("method LocalChatEmote")] HRESULT LocalChatEmote([in] BSTR EmoteText); [id(41), helpstring("method SetCombatState")] HRESULT SetCombatState([in] long pVal); + [propget, id(42), helpstring("property HooksAvailEx")] HRESULT HooksAvailEx([in] enum eAvailableHooksEx HookID,[out, retval] VARIANT_BOOL *pVal); + [id(43), helpstring("method Logout")] HRESULT Logout(); }; |
From: <ha...@us...> - 2002-12-11 03:34:24
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv9158 Modified Files: Decal.idl Log Message: moved ChatText and ChatMessage from IPluginSite to IACHooks finally (yes, ipluginsink still works properly) Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Decal.idl 3 Dec 2002 03:36:58 -0000 1.24 --- Decal.idl 11 Dec 2002 03:34:21 -0000 1.25 *************** *** 369,373 **** properties: methods: ! [id(1), helpstring("method ObjectDestroyed")] HRESULT ObjectDestroyed([in] LONG lGuid); }; --- 369,375 ---- properties: methods: ! [id(1), helpstring("method ObjectDestroyed")] VARIANT_BOOL ObjectDestroyed([in] LONG lGuid); ! [id(2), helpstring("method OnChatBoxMessage")] VARIANT_BOOL OnChatBoxMessage([in] BSTR bstrText, [in] LONG lColor, [in,out] VARIANT_BOOL *bEat ); ! [id(3), helpstring("method OnCommandLineText")] VARIANT_BOOL OnCommandLineText([in] BSTR bstrText, [in,out] VARIANT_BOOL *bEat ); }; |
From: <ha...@us...> - 2002-12-11 03:34:12
|
Update of /cvsroot/decaldev/source/Inject In directory sc8-pr-cvs1:/tmp/cvs-serv9077 Modified Files: Manager.h Manager.cpp Log Message: moved ChatText and ChatMessage from IPluginSite to IACHooks finally (yes, ipluginsink still works properly) Index: Manager.h =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Manager.h 22 Sep 2002 08:15:08 -0000 1.26 --- Manager.h 11 Dec 2002 03:34:09 -0000 1.27 *************** *** 17,25 **** class cFontCache; ///////////////////////////////////////////////////////////////////////////// // cManager class ATL_NO_VTABLE cManager : public CComObjectRootEx<CComMultiThreadModel>, ! public IPluginSite { public: --- 17,39 ---- class cFontCache; + + #define ChatTextHook 102 + #define ChatMessageHook 103 + 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);} + }; + ///////////////////////////////////////////////////////////////////////////// // cManager class ATL_NO_VTABLE cManager : public CComObjectRootEx<CComMultiThreadModel>, ! public IACHooksEventsImpl<ChatMessageHook, cManager>, ! public IACHooksEventsImpl<ChatTextHook, cManager>, ! public IPluginSite { public: *************** *** 41,47 **** void draw2D(); - void clearDestroyList(); DECLARE_PROTECT_FINAL_CONSTRUCT() --- 55,63 ---- void draw2D(); void clearDestroyList(); + void __stdcall onChatMessage(BSTR bstrText, long lColor, VARIANT_BOOL *pbEat); + void __stdcall onChatText(BSTR bstrText, VARIANT_BOOL *pbEat); + DECLARE_PROTECT_FINAL_CONSTRUCT() *************** *** 49,52 **** --- 65,73 ---- COM_INTERFACE_ENTRY(IPluginSite) END_COM_MAP() + + BEGIN_SINK_MAP(cManager) + SINK_ENTRY_EX( ChatMessageHook, EVTID_AcHooks, 2, onChatMessage) + SINK_ENTRY_EX( ChatTextHook, EVTID_AcHooks, 3, onChatText) + END_SINK_MAP() class cMemLocs Index: Manager.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Manager.cpp 22 Oct 2002 08:15:10 -0000 1.61 --- Manager.cpp 11 Dec 2002 03:34:09 -0000 1.62 *************** *** 18,22 **** #include "InputBuffer.h" ! //#include <fstream> ///////////////////////////////////////////////////////////////////////////// // cManager --- 18,27 ---- #include "InputBuffer.h" ! ! ! const IID EVTID_AcHooks = { 0xEB282FE5, 0x7170, 0x4a37, { 0xA2, 0x6E, 0x92, 0xAF, 0x36, 0x38, 0x5D, 0x2C } }; ! const IID LIBID_Decal = { 0xFF7F5F6D, 0x34E0, 0x4B6F, { 0xB3, 0xBB, 0x81, 0x41, 0xDE, 0x2E, 0xF7, 0x32 } }; ! const IID IID_Plugins = { 0x702D3901, 0xC13A, 0x448e, { 0x88, 0x71, 0xEC, 0xDC, 0x8B, 0xC8, 0xD0, 0x79 } }; ! ///////////////////////////////////////////////////////////////////////////// // cManager *************** *** 134,186 **** void (*pfnOldChatText)(void) = NULL; - void OnChatMessage (char* pText, long dwColor); - void OnChatText (); - - bool DispatchChatMessage ( char *pText, long *pdwColor ) - { - bool bKillIt = false; - { - CComBSTR bstrText(pText); - - for( cManager::cPluginList::iterator i = cManager::_p->m_plugins.begin(); i != cManager::_p->m_plugins.end(); ++ i ) - { - if( i->m_dwSinkCaps & eManagerSinkCapPlugin ) - { - CComPtr< IPluginSink > pSink; - i->m_pPlugin->QueryInterface( &pSink ); - VARIANT_BOOL bEat = VARIANT_FALSE; - pSink->ChatMessage(bstrText, pdwColor, &bEat ); - - if( bEat ) - bKillIt = true; - } - } - } - return bKillIt; - } - - bool DispatchChatText ( char *pText ) - { - bool bKillIt = false; - { - CComBSTR bstrText(pText); - for( cManager::cPluginList::iterator i = cManager::_p->m_plugins.begin(); i != cManager::_p->m_plugins.end(); ++ i ) - { - if( i->m_dwSinkCaps & eManagerSinkCapPlugin ) - { - CComPtr< IPluginSink > pSink; - i->m_pPlugin->QueryInterface( &pSink ); - VARIANT_BOOL bEat = VARIANT_FALSE; - - pSink->ChatText(bstrText , &bEat ); - - if( bEat ) - bKillIt = true; - } - } - } - return bKillIt; - } - void cManager::convertVersion( LPTSTR szVersion, DWORD &dwVersionMajor, DWORD &dwVersionMinor ) { --- 139,142 ---- *************** *** 229,232 **** --- 185,190 ---- m_pDecal->get_Hooks( &m_pHooks ); + IACHooksEventsImpl<ChatMessageHook, cManager>::advise( m_pHooks ); + IACHooksEventsImpl<ChatTextHook, cManager>::advise( m_pHooks ); // Load the Memlocs XML *************** *** 319,347 **** long Val=NULL; ! if(!m_bContainer) ! { ! if(QueryMemLoc(_bstr_t("ChatMessage"), &Val)==S_OK) ! pfnOldChatMessage = reinterpret_cast<void (*)(char*, DWORD)>(Val/*0x0051A260*/); ! ! if(QueryMemLoc(_bstr_t("ChatText"), &Val)==S_OK) ! pfnOldChatText = reinterpret_cast< void (*)() > (Val/*0x00412D00*/); ! ! if(QueryMemLoc(_bstr_t("ChatMessageAddy"), &Val)==S_OK) ! m_dwChatMessageAddy = (DWORD)Val; ! ! DWORD dwOldProtect; ! ! if(QueryMemLoc(_bstr_t("OnChatText"), &Val)==S_OK) ! { ! VirtualProtect((LPVOID)((DWORD)Val)/*0x005290E6*/, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect); ! *((DWORD*)((DWORD)Val)/*0x005290E6*/) = ((DWORD)(OnChatText) - (((DWORD)Val) + 0x4/*0x005290E5 + 0x5*/)); ! } ! ! if(QueryMemLoc(_bstr_t("OnChatMessage"), &Val)==S_OK) ! { ! VirtualProtect((LPVOID)((DWORD)Val)/*0x004E9555*/, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect); ! *((DWORD*)((DWORD)Val) /*0x004E9555*/) = ((DWORD)(OnChatMessage) - (((DWORD)Val) + 0x4/*0x004E9554 + 0x5*/)); ! } ! } //CComBSTR bstrText(L"PreviousSelection"); --- 277,283 ---- long Val=NULL; ! if(!m_bContainer) ! { ! } //CComBSTR bstrText(L"PreviousSelection"); *************** *** 405,408 **** --- 341,346 ---- // Release the ACHooks interface + IACHooksEventsImpl<ChatMessageHook, cManager>::unadvise( m_pHooks ); + IACHooksEventsImpl<ChatTextHook, cManager>::unadvise( m_pHooks ); m_pHooks.Release(); *************** *** 1780,1782 **** --- 1718,1753 ---- return S_OK; + } + + void cManager::onChatMessage( BSTR bstrText, long lColor, VARIANT_BOOL *pbEat ) + { + VARIANT_BOOL bEat; + bEat = VARIANT_FALSE; + for( cPluginList::iterator i = _p->m_plugins.begin(); i != _p->m_plugins.end(); ++i ) + { + if( i->m_dwSinkCaps & eManagerSinkCapPlugin ) + { + CComPtr<IPluginSink> pPluginSink; + i->m_pPlugin->QueryInterface( &pPluginSink ); + pPluginSink->ChatMessage( bstrText, &lColor, &bEat ); + } + } + + *pbEat = bEat; + } + + void cManager::onChatText( BSTR bstrText, VARIANT_BOOL *pbEat ) + { + VARIANT_BOOL bEat = VARIANT_FALSE; + for( cPluginList::iterator i = _p->m_plugins.begin(); i != _p->m_plugins.end(); ++i ) + { + if( i->m_dwSinkCaps & eManagerSinkCapPlugin ) + { + CComPtr<IPluginSink> pPluginSink; + i->m_pPlugin->QueryInterface( &pPluginSink ); + pPluginSink->ChatText( bstrText, &bEat ); + } + } + + *pbEat = bEat; } |
From: <ha...@us...> - 2002-12-11 03:33:55
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv8922 Modified Files: DecalCP.h ACHooks.h ACHooks.cpp Log Message: moved ChatText and ChatMessage from IPluginSite to IACHooks finally (yes, ipluginsink still works properly) Index: DecalCP.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/DecalCP.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DecalCP.h 28 Aug 2002 20:55:03 -0000 1.3 --- DecalCP.h 11 Dec 2002 03:33:51 -0000 1.4 *************** *** 5,9 **** class CProxyIACHooksEvents : public IConnectionPointImpl<T, &DIID_IACHooksEvents, CComDynamicUnkArray> { - //Warning this class may be recreated by the wizard. public: HRESULT Fire_ObjectDestroyed(LONG guid) --- 5,8 ---- *************** *** 31,35 **** delete[] pvars; return varResult.scode; ! } }; --- 30,102 ---- delete[] pvars; return varResult.scode; ! } ! ! VARIANT_BOOL Fire_OnChatBoxMessage(BSTR bstrText, LONG lColor) ! { ! VARIANT_BOOL bEatProc = VARIANT_FALSE; ! VARIANT_BOOL bEatLocal = VARIANT_FALSE; ! HRESULT hr = S_OK; ! T * pThis = static_cast<T *>(this); ! int cConnections = m_vec.GetSize(); ! ! for (int iConnection = 0; iConnection < cConnections; iConnection++) ! { ! pThis->Lock(); ! CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection); ! pThis->Unlock(); ! ! IDispatch * pConnection = reinterpret_cast<IDispatch *>(punkConnection.p); ! ! if (pConnection) ! { ! CComVariant avarParams[3]; ! avarParams[2] = bstrText; ! avarParams[1] = lColor; ! avarParams[0] = &bEatLocal; ! CComVariant varResult; ! ! DISPPARAMS params = { avarParams, NULL, 3, 0 }; ! hr = pConnection->Invoke(2, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL); ! ! if( bEatLocal == VARIANT_TRUE ) ! bEatProc = VARIANT_TRUE; ! } ! } ! ! return bEatProc; ! } ! ! VARIANT_BOOL Fire_OnCommandLineText( BSTR bstrText ) ! { ! VARIANT_BOOL bEatProc = VARIANT_FALSE; ! VARIANT_BOOL bEatLocal = VARIANT_FALSE; ! HRESULT hr = S_OK; ! T * pThis = static_cast<T *>(this); ! int cConnections = m_vec.GetSize(); ! ! for (int iConnection = 0; iConnection < cConnections; iConnection++) ! { ! pThis->Lock(); ! CComPtr<IUnknown> punkConnection = m_vec.GetAt(iConnection); ! pThis->Unlock(); ! ! IDispatch * pConnection = reinterpret_cast<IDispatch *>(punkConnection.p); ! ! if (pConnection) ! { ! CComVariant avarParams[2]; ! avarParams[1] = bstrText; ! avarParams[0] = &bEatLocal; ! CComVariant varResult; ! ! DISPPARAMS params = { avarParams, NULL, 2, 0 }; ! hr = pConnection->Invoke(3, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, ¶ms, &varResult, NULL, NULL); ! ! if( bEatLocal == VARIANT_TRUE ) ! bEatProc = VARIANT_TRUE; ! } ! } ! ! return bEatProc; } }; Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ACHooks.h 3 Dec 2002 03:36:37 -0000 1.25 --- ACHooks.h 11 Dec 2002 03:33:51 -0000 1.26 *************** *** 6,10 **** #include "DecalCP.h" - struct sMemoryLocation { --- 6,9 ---- *************** *** 26,32 **** }; ///////////////////////////////////////////////////////////////////////////// // ACHooks - class ATL_NO_VTABLE cACHooks : public CComObjectRoot, --- 25,33 ---- }; + bool DispatchChatMessage( char *pText, long *pdwColor ); + bool DispatchChatText( char *pText ); + ///////////////////////////////////////////////////////////////////////////// // ACHooks class ATL_NO_VTABLE cACHooks : public CComObjectRoot, *************** *** 164,167 **** --- 165,170 ---- static cACHooks* s_pACHooks; void InternalObjectDestroyed( DWORD dwGuid ); + bool InternalChatText( char *szText ); + bool InternalChatMessage( char *szText, long lColor ); STDMETHOD(MoveItemEx)(long lObjectID, long lDestinationID); Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ACHooks.cpp 3 Dec 2002 03:36:37 -0000 1.30 --- ACHooks.cpp 11 Dec 2002 03:33:51 -0000 1.31 *************** *** 6,10 **** --- 6,14 ---- ///////////////////////////////////////////////////////////////////////////// + cACHooks* cACHooks::s_pACHooks = NULL; + long g_lObjectDestroyedProc = 0; + void (*pfnOldChatMessage)( char *, DWORD ) = NULL; + void (*pfnOldChatText)() = NULL; void (*pfnUseItem)( DWORD, DWORD ) = NULL; void (*pfnMoveItemEx)( DWORD, DWORD, DWORD ) = NULL; *************** *** 16,25 **** qString* ( __fastcall *pfnInternalStringConstructor)( qString *, long, char * ) = NULL; ! extern void ObjectDestroyedHook (); ! extern DWORD HookCall (DWORD dwCallAddress, DWORD dwReplacement); ! // statics ! cACHooks* cACHooks::s_pACHooks = NULL; ! long g_lObjectDestroyedProc = 0; cACHooks::cACHooks() --- 20,28 ---- qString* ( __fastcall *pfnInternalStringConstructor)( qString *, long, char * ) = NULL; ! extern void OnChatMessage( char* pText, long dwColor ); ! extern void OnChatText(); ! extern void ObjectDestroyedHook(); ! extern DWORD HookCall (DWORD dwCallAddress, DWORD dwReplacement); cACHooks::cACHooks() *************** *** 158,161 **** --- 161,167 ---- if( QueryMemLoc( _bstr_t( "ChatMessageAddy" ), &Val ) == S_OK ) m_lChatMessageAddy = Val; + if( QueryMemLoc( _bstr_t( "ChatText" ), &Val ) == S_OK ) + pfnOldChatText = reinterpret_cast< void (*)() >( Val ); + if( QueryMemLoc( _bstr_t( "Mouse1X" ), &Val ) == S_OK ) *************** *** 465,468 **** --- 471,487 ---- m_Hooks |= eGetSkill; } + + DWORD dwOldProtect; + if( QueryMemLoc( _bstr_t( "OnChatText" ), &Val ) == S_OK ) + { + VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); + *reinterpret_cast< long * >( Val ) = ( reinterpret_cast< long >( OnChatText ) - ( Val + 0x4 ) ); + } + + if( QueryMemLoc( _bstr_t( "OnChatMessage" ), &Val ) == S_OK ) + { + VirtualProtect( reinterpret_cast< void * >( Val ), 4, PAGE_EXECUTE_READWRITE, &dwOldProtect ); + *reinterpret_cast< long * >( Val ) = ( reinterpret_cast< long >( OnChatMessage ) - ( Val + 0x4 ) ); + } } *************** *** 1502,1506 **** void cACHooks::InternalObjectDestroyed (DWORD dwGuid) { ! Fire_ObjectDestroyed (dwGuid); } --- 1521,1525 ---- void cACHooks::InternalObjectDestroyed (DWORD dwGuid) { ! Fire_ObjectDestroyed( dwGuid ); } *************** *** 1511,1515 **** } ! void __declspec (naked) ObjectDestroyedHook () { _asm --- 1530,1534 ---- } ! void __declspec(naked) ObjectDestroyedHook() { _asm *************** *** 1569,1571 **** --- 1588,1686 ---- return dwOriginal; + } + + bool cACHooks::InternalChatMessage( char *szText, long lColor ) + { + return Fire_OnChatBoxMessage( _bstr_t( szText ), lColor ) == VARIANT_TRUE ? true : false; + } + + bool cACHooks::InternalChatText( char *szText ) + { + return Fire_OnCommandLineText( _bstr_t( szText ) ) == VARIANT_TRUE ? true : false; + } + + bool DispatchChatMessage( char *pText, long *pdwColor ) + { + if( cACHooks::s_pACHooks ) + return cACHooks::s_pACHooks->InternalChatMessage( pText, *pdwColor ); + + return false; + } + + bool DispatchChatText( char *pText ) + { + if( cACHooks::s_pACHooks ) + return cACHooks::s_pACHooks->InternalChatText( pText ); + + return false; + } + + void __declspec(naked) OnChatMessage( char* pText, long dwColor ) + { + __asm + { + push ebp + mov ebp, esp + sub esp, 20h + push esi + + push ecx + + lea esi, dwColor + push esi + push pText + call DispatchChatMessage + + add esp, 8 + + test al, al + jz dont_kill_text + + mov dword ptr [pText], 0 + + dont_kill_text: + pop ecx + + push dwColor + push pText + call pfnOldChatMessage + + pop esi + mov esp, ebp + pop ebp + retn 8 + } + } + + void __declspec(naked) OnChatText() + { + __asm + { + push ebp + mov ebp, esp + sub esp, 0xC + + call pfnOldChatText + + mov [ebp-4], ecx + mov [ebp-8], eax + + push eax + + call DispatchChatText + + mov edx, eax + mov ecx, [ebp-4] + mov eax, [ebp-8] + + test dl, dl + jz dont_eat_chat_text + + mov byte ptr [eax], 0 + + dont_eat_chat_text: + mov esp, ebp + pop ebp + ret + } } |
From: <ha...@us...> - 2002-12-09 22:48:58
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv8452 Modified Files: CharacterStats.cpp CharacterStats.h Log Message: Some CharStats love. Index: CharacterStats.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** CharacterStats.cpp 9 Dec 2002 21:59:38 -0000 1.42 --- CharacterStats.cpp 9 Dec 2002 22:48:50 -0000 1.43 *************** *** 76,95 **** m_pService->get_Decal( &m_pDecal ); - Server[0] = 0; SpellsLearned.clear(); Enchantments.clear(); GotAlleg = false; GUID = 0; - Monarch.GUID = 0; - Patron.GUID = 0; - MyAlleg.GUID = 0; VassalCount = 0; Followers = 0; MonarchFollowers = 0; - - GotLogin = false; - DecalDat = false; - return S_OK; } --- 76,117 ---- m_pService->get_Decal( &m_pDecal ); SpellsLearned.clear(); Enchantments.clear(); + GotLogin = false; GotAlleg = false; + memset( Name, 0, sizeof( Name ) ); + memset( Gender, 0, sizeof( Gender ) ); + memset( Race, 0, sizeof( Race ) ); + memset( Class, 0, sizeof( Class ) ); + memset( Server, 0, sizeof( Server ) ); + memset( PrimStat, 0, sizeof( PrimStat ) ); + memset( PrimStatInitial, 0, sizeof( PrimStatInitial ) ); + memset( SecStatInc, 0, sizeof( SecStatInc ) ); + memset( SkillInc, 0, sizeof( SkillInc ) ); + memset( SkillTrain, 0, sizeof( SkillTrain ) ); + memset( SkillXP, 0, sizeof( SkillXP ) ); + memset( SkillBonus, 0, sizeof( SkillBonus ) ); + memset( &MyAlleg, 0, sizeof( MyAlleg ) ); + memset( &Monarch, 0, sizeof( Monarch ) ); + memset( &Patron, 0, sizeof( Patron ) ); + memset( Vassals, 0, sizeof( Vassals ) ); + TotalBurden = 0; + TotalPyreal = 0; + TotalXP = 0; + UnassignedXP = 0; + SkillPoints = 0; + Level = 0; + Rank = 0; + Deaths = 0; + Birth = 0; + Age = 0; + Vitae = 1.0f; + DrainRange = 0.0f; + HarmRange = 0.0f; GUID = 0; VassalCount = 0; Followers = 0; MonarchFollowers = 0; return S_OK; } *************** *** 131,134 **** --- 153,171 ---- GotLogin = false; GotAlleg = false; + memset( Name, 0, sizeof( Name ) ); + memset( Gender, 0, sizeof( Gender ) ); + memset( Race, 0, sizeof( Race ) ); + memset( Class, 0, sizeof( Class ) ); + memset( PrimStat, 0, sizeof( PrimStat ) ); + memset( PrimStatInitial, 0, sizeof( PrimStatInitial ) ); + memset( SecStatInc, 0, sizeof( SecStatInc ) ); + memset( SkillInc, 0, sizeof( SkillInc ) ); + memset( SkillTrain, 0, sizeof( SkillTrain ) ); + memset( SkillXP, 0, sizeof( SkillXP ) ); + memset( SkillBonus, 0, sizeof( SkillBonus ) ); + memset( &MyAlleg, 0, sizeof( MyAlleg ) ); + memset( &Monarch, 0, sizeof( Monarch ) ); + memset( &Patron, 0, sizeof( Patron ) ); + memset( Vassals, 0, sizeof( Vassals ) ); TotalBurden = 0; TotalPyreal = 0; *************** *** 141,149 **** Birth = 0; Age = 0; ! Server[0] = 0; GUID = 0; - Monarch.GUID = 0; - Patron.GUID = 0; - MyAlleg.GUID = 0; VassalCount = 0; Followers = 0; --- 178,185 ---- Birth = 0; Age = 0; ! Vitae = 1.0f; ! DrainRange = 0.0f; ! HarmRange = 0.0f; GUID = 0; VassalCount = 0; Followers = 0; *************** *** 158,161 **** --- 194,212 ---- GotLogin = false; GotAlleg = false; + memset( Name, 0, sizeof( Name ) ); + memset( Gender, 0, sizeof( Gender ) ); + memset( Race, 0, sizeof( Race ) ); + memset( Class, 0, sizeof( Class ) ); + memset( PrimStat, 0, sizeof( PrimStat ) ); + memset( PrimStatInitial, 0, sizeof( PrimStatInitial ) ); + memset( SecStatInc, 0, sizeof( SecStatInc ) ); + memset( SkillInc, 0, sizeof( SkillInc ) ); + memset( SkillTrain, 0, sizeof( SkillTrain ) ); + memset( SkillXP, 0, sizeof( SkillXP ) ); + memset( SkillBonus, 0, sizeof( SkillBonus ) ); + memset( &MyAlleg, 0, sizeof( MyAlleg ) ); + memset( &Monarch, 0, sizeof( Monarch ) ); + memset( &Patron, 0, sizeof( Patron ) ); + memset( Vassals, 0, sizeof( Vassals ) ); TotalBurden = 0; TotalPyreal = 0; *************** *** 168,176 **** Birth = 0; Age = 0; ! Server[0] = 0; GUID = 0; - Monarch.GUID = 0; - Patron.GUID = 0; - MyAlleg.GUID = 0; VassalCount = 0; Followers = 0; --- 219,226 ---- Birth = 0; Age = 0; ! Vitae = 1.0f; ! DrainRange = 0.0f; ! HarmRange = 0.0f; GUID = 0; VassalCount = 0; Followers = 0; *************** *** 187,194 **** pMessage->get_Member( _variant_t ("message"), &vMess); ! memcpy(Server, OLE2T(vMess.bstrVal) + 24, 50); ! char *tpm = strchr(Server, '.'); ! if (tpm) *tpm = 0; break; --- 237,245 ---- pMessage->get_Member( _variant_t ("message"), &vMess); ! memcpy(Server, OLE2T( vMess.bstrVal ) + 24, sizeof( Server ) ); ! char *szPeriod = strstr( Server, "." ); ! if( szPeriod ) ! *szPeriod = 0; break; *************** *** 257,267 **** pMessage->get_Member(_variant_t("value"), &vVal); ! if (vType.lVal == 0x05) TotalBurden = vVal.lVal; ! else if (vType.lVal == 0x14) TotalPyreal = vVal.lVal; ! else if (vType.lVal == 0x15) TotalXP = vVal.lVal; ! else if (vType.lVal == 0x16) UnassignedXP = vVal.lVal; ! else if (vType.lVal == 0x18) SkillPoints = vVal.lVal; ! else if (vType.lVal == 0x19) Level = vVal.lVal; ! else if (vType.lVal == 0x1E) Rank = vVal.lVal; else if (vType.lVal == 0x2B) { --- 308,325 ---- pMessage->get_Member(_variant_t("value"), &vVal); ! if (vType.lVal == 0x05) ! TotalBurden = vVal.lVal; ! else if (vType.lVal == 0x14) ! TotalPyreal = vVal.lVal; ! else if (vType.lVal == 0x15) ! TotalXP = vVal.lVal; ! else if (vType.lVal == 0x16) ! UnassignedXP = vVal.lVal; ! else if (vType.lVal == 0x18) ! SkillPoints = vVal.lVal; ! else if (vType.lVal == 0x19) ! Level = vVal.lVal; ! else if (vType.lVal == 0x1E) ! Rank = vVal.lVal; else if (vType.lVal == 0x2B) { *************** *** 284,289 **** RecalcSkills(); } ! else if (vType.lVal == 0x62) Birth = vVal.lVal; ! else if (vType.lVal == 0x7D) Age = vVal.lVal; break; --- 342,350 ---- RecalcSkills(); } ! ! else if (vType.lVal == 0x62) ! Birth = vVal.lVal; ! else if (vType.lVal == 0x7D) ! Age = vVal.lVal; break; *************** *** 378,385 **** pString->get_Member(_variant_t ("string"), &vVal); ! if (vKey.lVal == 0x01) strcpy(Name, OLE2T(vVal.bstrVal)); ! else if (vKey.lVal == 0x03) strcpy(Gender, OLE2T(vVal.bstrVal)); ! else if (vKey.lVal == 0x04) strcpy(Race, OLE2T(vVal.bstrVal)); ! else if (vKey.lVal == 0x05) strcpy(Class, OLE2T(vVal.bstrVal)); } --- 439,450 ---- pString->get_Member(_variant_t ("string"), &vVal); ! if (vKey.lVal == 0x01) ! strncpy( Name, OLE2T( vVal.bstrVal ),sizeof( Name ) ); ! else if (vKey.lVal == 0x03) ! strncpy( Gender, OLE2T( vVal.bstrVal ),sizeof( Gender ) ); ! else if (vKey.lVal == 0x04) ! strncpy( Race, OLE2T( vVal.bstrVal ),sizeof( Race ) ); ! else if (vKey.lVal == 0x05) ! strncpy( Class, OLE2T( vVal.bstrVal ),sizeof( Class ) ); } *************** *** 399,412 **** pString->get_Member (_variant_t ("value"), &vVal); ! if (vType.lVal == 0x05) TotalBurden = vVal.lVal; ! else if (vType.lVal == 0x14) TotalPyreal = vVal.lVal; ! else if (vType.lVal == 0x15) TotalXP = vVal.lVal; ! else if (vType.lVal == 0x16) UnassignedXP = vVal.lVal; ! else if (vType.lVal == 0x18) SkillPoints = vVal.lVal; ! else if (vType.lVal == 0x19) Level = vVal.lVal; ! else if (vType.lVal == 0x1E) Rank = vVal.lVal; ! else if (vType.lVal == 0x2B) Deaths = vVal.lVal; ! else if (vType.lVal == 0x62) Birth = vVal.lVal; ! else if (vType.lVal == 0x7D) Age = vVal.lVal; } --- 464,487 ---- pString->get_Member (_variant_t ("value"), &vVal); ! if (vType.lVal == 0x05) ! TotalBurden = vVal.lVal; ! else if (vType.lVal == 0x14) ! TotalPyreal = vVal.lVal; ! else if (vType.lVal == 0x15) ! TotalXP = vVal.lVal; ! else if (vType.lVal == 0x16) ! UnassignedXP = vVal.lVal; ! else if (vType.lVal == 0x18) ! SkillPoints = vVal.lVal; ! else if (vType.lVal == 0x19) ! Level = vVal.lVal; ! else if (vType.lVal == 0x1E) ! Rank = vVal.lVal; ! else if (vType.lVal == 0x2B) ! Deaths = vVal.lVal; ! else if (vType.lVal == 0x62) ! Birth = vVal.lVal; ! else if (vType.lVal == 0x7D) ! Age = vVal.lVal; } *************** *** 481,490 **** pMessage->get_Begin( &pBegin ); ! pMessage->get_Member (_variant_t ("spellbookCount"), &vSpellCount ); HRESULT HRes = pBegin->get_NextObject( _bstr_t( "spellbook" ), &pSpellbook ); if( HRes == S_OK ) { ! for( int i = 0; i < vSpellCount.iVal; i++ ) { pSpellbook->get_NextObjectIndex( &pSpell ); --- 556,566 ---- pMessage->get_Begin( &pBegin ); ! pMessage->get_Member( _variant_t( "spellbookCount" ), &vSpellCount ); + short sSpellbookCount = vSpellCount.iVal; HRESULT HRes = pBegin->get_NextObject( _bstr_t( "spellbook" ), &pSpellbook ); if( HRes == S_OK ) { ! for( int i = 0; i < sSpellbookCount; i++ ) { pSpellbook->get_NextObjectIndex( &pSpell ); *************** *** 570,576 **** --- 646,654 ---- Vitae = vVitae.fltVal + 0.0000001f; // for float inaccuracies like 0.9499999881 } + else Vitae = 1.0f; } + else Vitae = 1.0f; *************** *** 645,649 **** tpai.Leadership = vLeader.iVal; tpai.Unknown = vUnknown.dblVal; ! strcpy(tpai.Name, OLE2T(vName.bstrVal)); if (tpai.GUID == GUID) --- 723,727 ---- tpai.Leadership = vLeader.iVal; tpai.Unknown = vUnknown.dblVal; ! strncpy( tpai.Name, OLE2T( vName.bstrVal ), sizeof( tpai.Name ) ); if (tpai.GUID == GUID) *************** *** 792,799 **** pSuccess = SpellsLearned.insert( nSpellID ); ! if( pSuccess.second == true ) ! { Fire_Spellbook_Add( nSpellID ); ! } break; } --- 870,876 ---- pSuccess = SpellsLearned.insert( nSpellID ); ! if( pSuccess.second ) Fire_Spellbook_Add( nSpellID ); ! break; } *************** *** 804,809 **** pMessage->get_Member( _variant_t( "spell" ), &vSpellID ); DWORD nSpellID = vSpellID.lVal; ! SpellsLearned.erase( nSpellID ); ! Fire_Spellbook_Delete( nSpellID ); break; --- 881,886 ---- pMessage->get_Member( _variant_t( "spell" ), &vSpellID ); DWORD nSpellID = vSpellID.lVal; ! if( SpellsLearned.erase( nSpellID ) ) ! Fire_Spellbook_Delete( nSpellID ); break; *************** *** 1323,1327 **** CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strcpy(pAlleg->m_pAllegiance->Name, Monarch.Name); pAlleg->m_pAllegiance->GUID = Monarch.GUID; pAlleg->m_pAllegiance->TreeParent = Monarch.TreeParent; --- 1400,1404 ---- CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strncpy( pAlleg->m_pAllegiance->Name, Monarch.Name, sizeof( pAlleg->m_pAllegiance->Name ) ); pAlleg->m_pAllegiance->GUID = Monarch.GUID; pAlleg->m_pAllegiance->TreeParent = Monarch.TreeParent; *************** *** 1349,1353 **** CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strcpy(pAlleg->m_pAllegiance->Name, Patron.Name); pAlleg->m_pAllegiance->GUID = Patron.GUID; pAlleg->m_pAllegiance->TreeParent = Patron.TreeParent; --- 1426,1430 ---- CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strncpy( pAlleg->m_pAllegiance->Name, Patron.Name, sizeof( pAlleg->m_pAllegiance->Name ) ); pAlleg->m_pAllegiance->GUID = Patron.GUID; pAlleg->m_pAllegiance->TreeParent = Patron.TreeParent; *************** *** 1375,1379 **** CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strcpy(pAlleg->m_pAllegiance->Name, MyAlleg.Name); pAlleg->m_pAllegiance->GUID = MyAlleg.GUID; pAlleg->m_pAllegiance->TreeParent = MyAlleg.TreeParent; --- 1452,1456 ---- CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strncpy( pAlleg->m_pAllegiance->Name, MyAlleg.Name, sizeof( pAlleg->m_pAllegiance->Name ) ); pAlleg->m_pAllegiance->GUID = MyAlleg.GUID; pAlleg->m_pAllegiance->TreeParent = MyAlleg.TreeParent; *************** *** 1404,1408 **** CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strcpy(pAlleg->m_pAllegiance->Name, Vassals[ VassalNum ].Name); pAlleg->m_pAllegiance->GUID = Vassals[ VassalNum ].GUID; pAlleg->m_pAllegiance->TreeParent = Vassals[ VassalNum ].TreeParent; --- 1481,1485 ---- CComObject< ::cAllegianceInfo >::CreateInstance( &pAlleg ); ! strncpy( pAlleg->m_pAllegiance->Name, Vassals[ VassalNum ].Name, sizeof( pAlleg->m_pAllegiance->Name ) ); pAlleg->m_pAllegiance->GUID = Vassals[ VassalNum ].GUID; pAlleg->m_pAllegiance->TreeParent = Vassals[ VassalNum ].TreeParent; Index: CharacterStats.h =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CharacterStats.h 9 Dec 2002 21:59:38 -0000 1.16 --- CharacterStats.h 9 Dec 2002 22:48:52 -0000 1.17 *************** *** 133,137 **** DWORD PrimStat[6], PrimStatInitial[6]; DWORD SecStatInc[3]; ! DWORD SkillInc[40], SkillTrain[40], SkillXP[40], SkillBonus[40]; private: --- 133,138 ---- DWORD PrimStat[6], PrimStatInitial[6]; DWORD SecStatInc[3]; ! DWORD SkillInc[40], SkillTrain[40]; ! DWORD SkillXP[40], SkillBonus[40]; private: *************** *** 169,173 **** std::set< DWORD > SpellsLearned; - bool DecalDat; cAllegianceInfo Monarch, Patron, MyAlleg, Vassals[12]; --- 170,173 ---- |
From: <ha...@us...> - 2002-12-09 21:59:44
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv10305 Modified Files: CharacterStats.cpp CharacterStats.h Log Message: Getting rid of the use of IDatStream in CharacterStats since the original purpose of even using it is no longer being used after the rewrite. This should help with various injection issues Index: CharacterStats.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** CharacterStats.cpp 6 Dec 2002 21:24:36 -0000 1.41 --- CharacterStats.cpp 9 Dec 2002 21:59:38 -0000 1.42 *************** *** 92,106 **** DecalDat = false; - CComPtr<IDatStream> pDatSpells; - - if( m_pDecal->get_Object( _bstr_t( "services\\DecalDat.DatService\\portal\\0E00000E" ), - __uuidof( IDatStream ), reinterpret_cast< void ** >( &pDatSpells ) ) == S_OK ) - { - DecalDat = true; - pDatSpells->Skip( sizeof( DWORD ) ); - pDatSpells->ReadBinary( sizeof( WORD ), (BYTE *) &TotalSpells ); - pDatSpells.Release(); - } - return S_OK; } --- 92,95 ---- Index: CharacterStats.h =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CharacterStats.h 25 Oct 2002 22:52:07 -0000 1.15 --- CharacterStats.h 9 Dec 2002 21:59:38 -0000 1.16 *************** *** 169,173 **** std::set< DWORD > SpellsLearned; - long TotalSpells; bool DecalDat; --- 169,172 ---- |
From: <ec...@us...> - 2002-12-06 21:24:47
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv15778 Modified Files: CharacterStats.cpp Log Message: [15:48] <Lane_Meyer> does clear() in a std::list do 'new' pointer cleanup? [15:57] <Lane_Meyer> in any case, eckzow's last commit on charstats breaks it I'll take your word for it... Index: CharacterStats.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** CharacterStats.cpp 1 Dec 2002 00:05:57 -0000 1.40 --- CharacterStats.cpp 6 Dec 2002 21:24:36 -0000 1.41 *************** *** 915,919 **** break; } - delete tpench; } --- 915,918 ---- |
From: <ec...@us...> - 2002-12-03 03:37:02
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv30444 Modified Files: Decal.idl Log Message: Adding hooks: GetSkill GetAttribute note: these won't work until Hazridi fixes the memlocs for my incompetent self for this patch they are: <memloc name="GetSkill" value="0059E0D0" /> <memloc name="GetAttribute" value="0059DB50" /> Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Decal.idl 28 Nov 2002 09:55:24 -0000 1.23 --- Decal.idl 3 Dec 2002 03:36:58 -0000 1.24 *************** *** 10,22 **** enum eAttribute { ! eCurrentHealth = 1, ! eMaximumHealth = 2, ! eCurrentStamina = 3, ! eMaximumStamina = 4, ! eCurrentMana = 5, ! eMaximumMana = 6, ! eBaseHealth = 7, ! eBaseStamina = 8, ! eBaseMana = 9 }; --- 10,108 ---- enum eAttribute { ! eCurrentHealth = 1, ! eMaximumHealth = 2, ! eCurrentStamina = 3, ! eMaximumStamina = 4, ! eCurrentMana = 5, ! eMaximumMana = 6, ! eBaseHealth = 7, ! eBaseStamina = 8, ! eBaseMana = 9, ! eCurrentStrength = 1, ! eCurrentEndurance = 2, ! eCurrentQuickness = 3, ! eCurrentCoordination = 4, ! eCurrentFocus = 5, ! eCurrentSelf = 6, ! eBaseStrength = 7, ! eBaseEndurance = 8, ! eBaseQuickness = 9, ! eBaseCoordination = 10, ! eBaseFocus = 11, ! eBaseSelf = 12 ! }; ! ! enum eSkill ! { ! eCurrentAxe = 1, ! eCurrentBow = 2, ! eCurrentCrossbow = 3, ! eCurrentDagger = 4, ! eCurrentMace = 5, ! eCurrentMeleeDefense = 6, ! eCurrentMissileDefense = 7, ! eCurrentSpear = 9, ! eCurrentStaff = 10, ! eCurrentSword = 11, ! eCurrentThrownWeapons = 12, ! eCurrentUnarmed = 13, ! eCurrentArcaneLore = 14, ! eCurrentMagicDefense = 15, ! eCurrentManaConversion = 16, ! eCurrentItemTinkering = 18, ! eCurrentAssessPerson = 19, ! eCurrentDeception = 20, ! eCurrentHealing = 21, ! eCurrentJump = 22, ! eCurrentLockpick = 23, ! eCurrentRun = 24, ! eCurrentAssessCreature = 27, ! eCurrentWeaponTinkering = 28, ! eCurrentArmorTinkering = 29, ! eCurrentMagicItemTinkering = 30, ! eCurrentCreatureEnchantment = 31, ! eCurrentItemEnchantment = 32, ! eCurrentLifeMagic = 33, ! eCurrentWarMagic = 34, ! eCurrentLeadership = 35, ! eCurrentLoyalty = 36, ! eCurrentFletchingSkill = 37, ! eCurrentAlchemySkill = 38, ! eCurrentCookingSkill = 39, ! eBaseAxe = 51, ! eBaseBow = 52, ! eBaseCrossbow = 53, ! eBaseDagger = 54, ! eBaseMace = 55, ! eBaseMeleeDefense = 56, ! eBaseMissileDefense = 57, ! eBaseSpear = 59, ! eBaseStaff = 60, ! eBaseSword = 61, ! eBaseThrownWeapons = 62, ! eBaseUnarmed = 63, ! eBaseArcaneLore = 64, ! eBaseMagicDefense = 65, ! eBaseManaConversion = 66, ! eBaseItemTinkering = 68, ! eBaseAssessPerson = 69, ! eBaseDeception = 70, ! eBaseHealing = 71, ! eBaseJump = 72, ! eBaseLockpick = 73, ! eBaseRun = 74, ! eBaseAssessCreature = 77, ! eBaseWeaponTinkering = 78, ! eBaseArmorTinkering = 79, ! eBaseMagicItemTinkering = 80, ! eBaseCreatureEnchantment = 81, ! eBaseItemEnchantment = 82, ! eBaseLifeMagic = 83, ! eBaseWarMagic = 84, ! eBaseLeadership = 85, ! eBaseLoyalty = 86, ! eBaseFletchingSkill = 87, ! eBaseAlchemySkill = 88, ! eBaseCookingSkill = 89 }; *************** *** 50,54 **** eLocalChatText = 0x04000000, eLocalChatEmote = 0x08000000, ! eSetCombatState = 0x10000000 }; --- 136,142 ---- eLocalChatText = 0x04000000, eLocalChatEmote = 0x08000000, ! eSetCombatState = 0x10000000, ! eGetAttribute = 0x20000000, ! eGetSkill = 0x40000000 }; *************** *** 137,143 **** [id(35), helpstring("Gets known MemLocs from the xml.")] HRESULT QueryMemLoc([in] BSTR bstrName, [out, retval] long *pVal); [propget, id(36), helpstring("property Vital")] HRESULT Vital([in] long Vital, [out, retval] long* pVal); ! [id(37), helpstring("method LocalChatText")] HRESULT LocalChatText([in] BSTR Text); ! [id(38), helpstring("method LocalChatEmote")] HRESULT LocalChatEmote([in] BSTR EmoteText); ! [id(39), helpstring("method SetCombatState")] HRESULT SetCombatState([in] long pVal); }; --- 225,233 ---- [id(35), helpstring("Gets known MemLocs from the xml.")] HRESULT QueryMemLoc([in] BSTR bstrName, [out, retval] long *pVal); [propget, id(36), helpstring("property Vital")] HRESULT Vital([in] long Vital, [out, retval] long* pVal); ! [propget, id(37), helpstring("property Attribute")] HRESULT Attribute([in] long Attribute, [out, retval] long* pVal); ! [propget, id(38), helpstring("property Skill")] HRESULT Skill([in] long Skill, [out, retval] long* pVal); ! [id(39), helpstring("method LocalChatText")] HRESULT LocalChatText([in] BSTR Text); ! [id(40), helpstring("method LocalChatEmote")] HRESULT LocalChatEmote([in] BSTR EmoteText); ! [id(41), helpstring("method SetCombatState")] HRESULT SetCombatState([in] long pVal); }; |
From: <ec...@us...> - 2002-12-03 03:36:46
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv30213 Modified Files: ACHooks.h ACHooks.cpp Log Message: Adding hooks: GetSkill GetAttribute note: these won't work until Hazridi fixes the memlocs for my incompetent self for this patch they are: <memloc name="GetSkill" value="0059E0D0" /> <memloc name="GetAttribute" value="0059DB50" /> Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ACHooks.h 28 Nov 2002 09:55:15 -0000 1.24 --- ACHooks.h 3 Dec 2002 03:36:37 -0000 1.25 *************** *** 155,158 **** --- 155,164 ---- long m_lVitalBase; + bool m_bGetAttribute; + long m_lGetAttribute; + + bool m_bGetSkill; + long m_lGetSkill; + public: static cACHooks* s_pACHooks; *************** *** 198,201 **** --- 204,209 ---- STDMETHOD(SetAutorun)(VARIANT_BOOL bOnOff) ; STDMETHOD(get_Vital)(long Vital, long* pVal); + STDMETHOD(get_Attribute)(long Attribute, long* pVal); + STDMETHOD(get_Skill)(long Skill, long* pVal); STDMETHOD(LocalChatText)(BSTR Text); STDMETHOD(LocalChatEmote)(BSTR EmoteText); Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ACHooks.cpp 28 Nov 2002 09:55:15 -0000 1.29 --- ACHooks.cpp 3 Dec 2002 03:36:37 -0000 1.30 *************** *** 53,56 **** --- 53,58 ---- m_bSetAutorun = false; m_bGetVital = false; + m_bGetAttribute = false; + m_bGetSkill = false; m_Hooks = 0 ; *************** *** 449,452 **** --- 451,468 ---- } } + + if( QueryMemLoc( _bstr_t( "GetAttribute" ), &Val ) == S_OK ) + { + m_lGetAttribute = Val; + m_bGetAttribute = true; + m_Hooks |= eGetAttribute; + } + + if( QueryMemLoc( _bstr_t( "GetSkill" ), &Val ) == S_OK ) + { + m_lGetSkill = Val; + m_bGetSkill = true; + m_Hooks |= eGetSkill; + } } *************** *** 1435,1438 **** --- 1451,1499 ---- Internal_GetStat( p, 0, Vital, pVal, lBaseOrBuffed ); + + return S_OK; + } + + STDMETHODIMP cACHooks::get_Attribute(long Attribute, long* pVal) + { + if( !m_bGetAttribute ) + return S_FALSE; + + if( (Attribute < 1) || (Attribute > 12) ) + return E_INVALIDARG; + + long lBaseOrBuffed = (Attribute > 6) ? 1 : 0; + if( lBaseOrBuffed ) + Attribute -= 6; + + qPointerList *p = reinterpret_cast< qPointerList * >( m_lVitalBase ); + p = p->dd[0]; + + long ( __fastcall *Internal_GetAttribute )( qPointerList *, long, long, long *, long ) = reinterpret_cast< long ( __fastcall * )( qPointerList *, long, long, long *, long ) >( m_lGetAttribute ); + + Internal_GetAttribute( p, 0, Attribute, pVal, lBaseOrBuffed ); + + return S_OK; + } + + STDMETHODIMP cACHooks::get_Skill(long Skill, long* pVal) + { + if( !m_bGetSkill ) + return S_FALSE; + + // error on out of range, the unused range for added skills, and other skill ids that Turbine skips + if((Skill < 1) || (Skill > 89) || ((Skill > 39) && (Skill < 50)) || (Skill == 8 ) || (Skill == 58) || (Skill == 17) || (Skill == 67) || (Skill == 25) || (Skill == 75) || (Skill == 26) || (Skill == 76)) + return E_INVALIDARG; + + long lBaseOrBuffed = (Skill > 50) ? 1 : 0; + if( lBaseOrBuffed ) + Skill -= 50; + + qPointerList *p = reinterpret_cast< qPointerList * >( m_lVitalBase ); + p = p->dd[0]; + + long ( __fastcall *Internal_GetSkill )( qPointerList *, long, long, long *, long ) = reinterpret_cast< long ( __fastcall * )( qPointerList *, long, long, long *, long ) >( m_lGetSkill ); + + Internal_GetSkill( p, 0, Skill, pVal, lBaseOrBuffed ); return S_OK; |
From: <ec...@us...> - 2002-12-01 00:06:00
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv23039 Modified Files: CharacterStats.cpp Log Message: fixing a memory leak (new without delete == bad) Index: CharacterStats.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** CharacterStats.cpp 21 Nov 2002 22:07:43 -0000 1.39 --- CharacterStats.cpp 1 Dec 2002 00:05:57 -0000 1.40 *************** *** 915,918 **** --- 915,919 ---- break; } + delete tpench; } |
From: <ha...@us...> - 2002-11-28 09:55:32
|
Update of /cvsroot/decaldev/source/Include In directory sc8-pr-cvs1:/tmp/cvs-serv24354 Modified Files: Decal.idl Log Message: SetCombatState, LocalChatText/LocalChatEmote Index: Decal.idl =================================================================== RCS file: /cvsroot/decaldev/source/Include/Decal.idl,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Decal.idl 12 Nov 2002 19:53:54 -0000 1.22 --- Decal.idl 28 Nov 2002 09:55:24 -0000 1.23 *************** *** 46,50 **** eSendTell = 0x00400000, eSetAutorun = 0x00800000, ! eGetVital = 0x01000000 }; --- 46,54 ---- eSendTell = 0x00400000, eSetAutorun = 0x00800000, ! eGetVital = 0x01000000, ! eSendTellEx = 0x02000000, ! eLocalChatText = 0x04000000, ! eLocalChatEmote = 0x08000000, ! eSetCombatState = 0x10000000 }; *************** *** 133,136 **** --- 137,143 ---- [id(35), helpstring("Gets known MemLocs from the xml.")] HRESULT QueryMemLoc([in] BSTR bstrName, [out, retval] long *pVal); [propget, id(36), helpstring("property Vital")] HRESULT Vital([in] long Vital, [out, retval] long* pVal); + [id(37), helpstring("method LocalChatText")] HRESULT LocalChatText([in] BSTR Text); + [id(38), helpstring("method LocalChatEmote")] HRESULT LocalChatEmote([in] BSTR EmoteText); + [id(39), helpstring("method SetCombatState")] HRESULT SetCombatState([in] long pVal); }; |
From: <ha...@us...> - 2002-11-28 09:55:18
|
Update of /cvsroot/decaldev/source/Decal In directory sc8-pr-cvs1:/tmp/cvs-serv24256 Modified Files: ACHooks.h ACHooks.cpp Log Message: SetCombatState, LocalChatText/LocalChatEmote Index: ACHooks.h =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ACHooks.h 8 Nov 2002 17:50:43 -0000 1.23 --- ACHooks.h 28 Nov 2002 09:55:15 -0000 1.24 *************** *** 88,91 **** --- 88,93 ---- bool m_bCombatState; long m_lCombatState; + bool m_bSetCombatState; + long m_lSetCombatState; bool m_bChatState; *************** *** 139,142 **** --- 141,146 ---- bool m_bSendMessageToID; bool m_bSendMessageToName; + bool m_bLocalChatText; + bool m_bLocalChatEmote; long m_lInternalStringConstructor; *************** *** 144,147 **** --- 148,153 ---- long m_lSendMessageToID; long m_lSendMessageToName; + long m_lLocalChatText; + long m_lLocalChatEmote; bool m_bGetVital; *************** *** 150,153 **** --- 156,162 ---- public: + static cACHooks* s_pACHooks; + void InternalObjectDestroyed( DWORD dwGuid ); + STDMETHOD(MoveItemEx)(long lObjectID, long lDestinationID); STDMETHOD(get_PointerState)(long *pVal); *************** *** 161,164 **** --- 170,174 ---- STDMETHOD(get_ChatState)(VARIANT_BOOL *pVal); STDMETHOD(get_CombatState)(long *pVal); + STDMETHOD(SetCombatState)(long pVal); STDMETHOD(UseItem)(long lObjectID, long lUseState); STDMETHOD(SelectItem)(long lObjectID); *************** *** 188,194 **** STDMETHOD(SetAutorun)(VARIANT_BOOL bOnOff) ; STDMETHOD(get_Vital)(long Vital, long* pVal); ! ! static cACHooks* s_pACHooks; ! void InternalObjectDestroyed (DWORD dwGuid); }; - --- 198,202 ---- STDMETHOD(SetAutorun)(VARIANT_BOOL bOnOff) ; STDMETHOD(get_Vital)(long Vital, long* pVal); ! STDMETHOD(LocalChatText)(BSTR Text); ! STDMETHOD(LocalChatEmote)(BSTR EmoteText); }; Index: ACHooks.cpp =================================================================== RCS file: /cvsroot/decaldev/source/Decal/ACHooks.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ACHooks.cpp 12 Nov 2002 19:54:52 -0000 1.28 --- ACHooks.cpp 28 Nov 2002 09:55:15 -0000 1.29 *************** *** 12,15 **** --- 12,17 ---- long (*pfnSendMessageToID)( qString *, long ) = NULL; long (*pfnSendMessageToName)( qString *, qString * ) = NULL; + long (*pfnLocalChatText)( qString * ) = NULL; + long (*pfnLocalChatEmote)( qString * ) = NULL; qString* ( __fastcall *pfnInternalStringConstructor)( qString *, long, char * ) = NULL; *************** *** 35,38 **** --- 37,41 ---- m_bUseItem = false; m_bCombatState = false; + m_bSetCombatState = false; m_bChatState = false; m_bGetFellowStats = false; *************** *** 46,49 **** --- 49,54 ---- m_bSendMessageToID = false; m_bSendMessageToName = false; + m_bLocalChatText = false; + m_bLocalChatEmote = false; m_bSetAutorun = false; m_bGetVital = false; *************** *** 127,131 **** } } ! long Val; if( QueryMemLoc( _bstr_t( "PrevItem1" ), &Val ) == S_OK ) --- 132,136 ---- } } ! long Val; if( QueryMemLoc( _bstr_t( "PrevItem1" ), &Val ) == S_OK ) *************** *** 138,142 **** } - if( QueryMemLoc( _bstr_t( "CurrentItem1" ), &Val ) == S_OK ) m_lCurrentSelect[0] = Val; --- 143,146 ---- *************** *** 198,205 **** { m_bCombatState = true; ! m_Hooks |= (eCombatState|ePosition) ; m_lCombatState = Val; } if( QueryMemLoc( _bstr_t( "ChatState" ), &Val ) == S_OK ) { --- 202,216 ---- { m_bCombatState = true; ! m_Hooks |= eCombatState ; m_lCombatState = Val; } + if( QueryMemLoc( _bstr_t( "SetCombatState" ), &Val ) == S_OK ) + { + m_bSetCombatState = true; + m_Hooks |= eSetCombatState ; + m_lSetCombatState = Val; + } + if( QueryMemLoc( _bstr_t( "ChatState" ), &Val ) == S_OK ) { *************** *** 397,403 **** --- 408,440 ---- } + if( QueryMemLoc( _bstr_t( "LocalChatText" ), &Val ) == S_OK) + { + m_bLocalChatText = true; + m_lLocalChatText = Val; + + pfnLocalChatText = reinterpret_cast< long(*)(qString *) >( Val ); + } + + if( QueryMemLoc( _bstr_t( "LocalChatEmote" ), &Val ) == S_OK) + { + m_bLocalChatEmote = true; + m_lLocalChatEmote = Val; + + pfnLocalChatEmote = reinterpret_cast< long(*)(qString *) >( Val ); + } + if( m_bInternalStringConstructor && m_bInternalStringDestructor && m_bSendMessageToID ) m_Hooks |= eSendTell; + if( m_bInternalStringConstructor && m_bInternalStringDestructor && m_bSendMessageToName ) + m_Hooks |= eSendTellEx; + + if( m_bInternalStringConstructor && m_bInternalStringDestructor && m_bLocalChatText ) + m_Hooks |= eLocalChatText; + + if( m_bInternalStringConstructor && m_bInternalStringDestructor && m_bLocalChatEmote ) + m_Hooks |= eLocalChatEmote; + + if( QueryMemLoc( _bstr_t( "GetVital" ), &Val ) == S_OK ) { *************** *** 453,458 **** if( i != m_mLocationList.end() ) { ! *pVal = i->second.Location; ! return S_OK; } --- 490,495 ---- if( i != m_mLocationList.end() ) { ! *pVal = i->second.Location; ! return S_OK; } *************** *** 909,912 **** --- 946,963 ---- } + STDMETHODIMP cACHooks::SetCombatState(long pVal) + { + if( !m_bSetCombatState ) + return S_FALSE; + + if( (pVal < 1) || (pVal > 4) ) + return E_INVALIDARG; + + typedef void(__fastcall *SetCombatStatePtr)( long, long, long, long ); + SetCombatStatePtr pSetCState = reinterpret_cast< SetCombatStatePtr >( m_lSetCombatState ); + pSetCState( *( reinterpret_cast< long * >( m_lCombatState ) ), 0, pVal, 1 ); + + return S_OK; + } STDMETHODIMP cACHooks::get_ChatState(VARIANT_BOOL *pVal) *************** *** 1325,1328 **** --- 1376,1413 ---- } + STDMETHODIMP cACHooks::LocalChatText(BSTR Text) + { + if( !(m_bInternalStringConstructor && m_bInternalStringDestructor && m_bLocalChatText) ) + return S_FALSE; + + USES_CONVERSION; + char *szText = OLE2A( Text ); + + qString qSText; + + pfnInternalStringConstructor( &qSText, 0, szText ); + pfnLocalChatText( &qSText ); + pfnInternalStringDestructor( &qSText ); + + return S_OK; + } + + STDMETHODIMP cACHooks::LocalChatEmote(BSTR EmoteText) + { + if( !(m_bInternalStringConstructor && m_bInternalStringDestructor && m_bLocalChatEmote) ) + return S_FALSE; + + USES_CONVERSION; + char *szText = OLE2A( EmoteText ); + + qString qSText; + + pfnInternalStringConstructor( &qSText, 0, szText ); + pfnLocalChatEmote( &qSText ); + pfnInternalStringDestructor( &qSText ); + + return S_OK; + } + STDMETHODIMP cACHooks::get_Vital(long Vital, long* pVal) { *************** *** 1361,1368 **** void OnObjectDestroyed (DWORD dwGuid) { ! if (cACHooks::s_pACHooks) ! { ! cACHooks::s_pACHooks->InternalObjectDestroyed (dwGuid); ! } } --- 1446,1451 ---- void OnObjectDestroyed (DWORD dwGuid) { ! if( cACHooks::s_pACHooks ) ! cACHooks::s_pACHooks->InternalObjectDestroyed( dwGuid ); } *************** *** 1424,1427 **** } ! return dwOriginal ; } --- 1507,1510 ---- } ! return dwOriginal; } |
From: <kw...@us...> - 2002-11-21 22:07:48
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv19358 Modified Files: CharacterStats.cpp Log Message: more 'statistic' cleanup for noobs that don't get all the update messages some more vitae fixes - the old way was rounding too high get_EffectiveSkill wasn't returning the right numbers Index: CharacterStats.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** CharacterStats.cpp 16 Nov 2002 00:19:49 -0000 1.38 --- CharacterStats.cpp 21 Nov 2002 22:07:43 -0000 1.39 *************** *** 142,145 **** --- 142,155 ---- GotLogin = false; GotAlleg = false; + TotalBurden = 0; + TotalPyreal = 0; + TotalXP = 0; + UnassignedXP = 0; + SkillPoints = 0; + Level = 0; + Rank = 0; + Deaths = 0; + Birth = 0; + Age = 0; Server[0] = 0; GUID = 0; *************** *** 159,162 **** --- 169,182 ---- GotLogin = false; GotAlleg = false; + TotalBurden = 0; + TotalPyreal = 0; + TotalXP = 0; + UnassignedXP = 0; + SkillPoints = 0; + Level = 0; + Rank = 0; + Deaths = 0; + Birth = 0; + Age = 0; Server[0] = 0; GUID = 0; *************** *** 559,563 **** IMessageMember* pVitae = (IMessageMember*) vVitae.pdispVal; pVitae->get_Member( _variant_t ("adjustment"), &vVitae); ! Vitae = vVitae.fltVal + 0.001f; // for float inaccuracies like 0.9499999881 } else --- 579,583 ---- IMessageMember* pVitae = (IMessageMember*) vVitae.pdispVal; pVitae->get_Member( _variant_t ("adjustment"), &vVitae); ! Vitae = vVitae.fltVal + 0.0000001f; // for float inaccuracies like 0.9499999881 } else *************** *** 689,693 **** if( 666 == vSpellID.iVal ) // Vitae isn't a normal enchantment { ! Vitae = vAdjustment.fltVal + 0.001f; // for float inaccuracies like 0.9499999881 RecalcSecStats(); RecalcSkills(); --- 709,713 ---- if( 666 == vSpellID.iVal ) // Vitae isn't a normal enchantment { ! Vitae = vAdjustment.fltVal + 0.0000001f; // for float inaccuracies like 0.9499999881 RecalcSecStats(); RecalcSkills(); *************** *** 1468,1474 **** float fSkill = 0.0; if( SkillInfo[Index].AttribA != eAttrNULL ) ! fSkill += PrimStat[ SkillInfo[Index].AttribA - 1]; if( SkillInfo[Index].AttribB != eAttrNULL ) ! fSkill += PrimStat[ SkillInfo[Index].AttribB - 1]; fSkill /= static_cast< float >( SkillInfo[Index].Divider ); fSkill += SkillInc[Index] + 0.5f; --- 1488,1494 ---- float fSkill = 0.0; if( SkillInfo[Index].AttribA != eAttrNULL ) ! fSkill += CurStat[ SkillInfo[Index].AttribA - 1]; if( SkillInfo[Index].AttribB != eAttrNULL ) ! fSkill += CurStat[ SkillInfo[Index].AttribB - 1]; fSkill /= static_cast< float >( SkillInfo[Index].Divider ); fSkill += SkillInc[Index] + 0.5f; |
From: <ha...@us...> - 2002-11-19 02:25:06
|
Update of /cvsroot/decaldev/source/DecalNet In directory sc8-pr-cvs1:/tmp/cvs-serv6955 Modified Files: Message.cpp Log Message: get_Data fix by gkusnick Index: Message.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalNet/Message.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Message.cpp 12 Apr 2002 01:07:34 -0000 1.4 --- Message.cpp 19 Nov 2002 02:25:02 -0000 1.5 *************** *** 162,166 **** STDMETHODIMP cMessage::get_Data(VARIANT *pVal) { ! long nSize = m_pEndData - m_pStartCrack; if( nSize == 0 ) --- 162,166 ---- STDMETHODIMP cMessage::get_Data(VARIANT *pVal) { ! long nSize = m_pEndData - m_pStartCrack - sizeof( DWORD ); if( nSize == 0 ) |
From: <ci...@pr...> - 2002-11-18 05:36:09
|
Update of /cvsroot/decaldev/source/DecalFilters In directory sc8-pr-cvs1:/tmp/cvs-serv23259 Modified Files: World.cpp DecalFilters.idl Log Message: Added in flagging for NPCs (eNPC), Foci Packs (eFoci), and Hooks, Storage, Covenant Stones, Houses a Housing Items (eHousing) Index: World.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/World.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** World.cpp 8 Oct 2002 19:34:59 -0000 1.43 --- World.cpp 18 Nov 2002 05:36:05 -0000 1.44 *************** *** 1080,1083 **** --- 1080,1113 ---- } } + + // Check if "monster" is really an NPC + if ((pCreate->m_eType == eMonster) && !(pCreate->m_dwObjectFlags2 & 0x00000010)) + { + pCreate->m_eType = eNPC; + } + + // Flag as a housing item (hook, covenant stone, or the house itself) + if ((pCreate->m_dwIcon == 0x000020C0) || // Hook + (pCreate->m_dwIcon == 0x000020C1) || // Covenant Crystal + (pCreate->m_dwIcon == 0x0000218C) || // Covenant Crystal + (pCreate->m_dwIcon == 0x0000218D) || // Storage + (pCreate->m_dwIcon == 0x00002181) || // House + (pCreate->m_dwIcon == 0x00002182) || // House + (pCreate->m_dwIcon == 0x00002183) || // House + (pCreate->m_dwIcon == 0x00002184) || // House + (pCreate->m_dwIcon == 0x00002185) || // House + (pCreate->m_dwIcon == 0x00002186) || // House + (pCreate->m_dwIcon == 0x0000218B) || // House + (pCreate->m_dwIcon == 0x0000218E) || // House + (pCreate->m_dwIcon == 0x0000218F)) // House + { + pCreate->m_eType = eHousing; + } + + // Check if a misc item is a Foci pack + if ((pCreate->m_eType == eMisc) && (pCreate->m_strName.find("Foci of ") != std::string::npos)) + { + pCreate->m_eType = eFoci; + } Fire_CreateObject(pCreate->m_p); Index: DecalFilters.idl =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/DecalFilters.idl,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** DecalFilters.idl 17 Oct 2002 00:16:35 -0000 1.28 --- DecalFilters.idl 18 Nov 2002 05:36:05 -0000 1.29 *************** *** 131,135 **** eBook, eJournal, ! eSign }; --- 131,138 ---- eBook, eJournal, ! eSign, ! eHousing, ! eNPC, ! eFoci }; |
From: <ha...@us...> - 2002-11-16 00:19:53
|
Update of /cvsroot/decaldev/source/DecalFilters In directory usw-pr-cvs1:/tmp/cvs-serv30137 Modified Files: CharacterStats.cpp Log Message: some extra server checking to prevent whacky server names in case the MOTD changes again Index: CharacterStats.cpp =================================================================== RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** CharacterStats.cpp 27 Oct 2002 04:55:49 -0000 1.37 --- CharacterStats.cpp 16 Nov 2002 00:19:49 -0000 1.38 *************** *** 1084,1088 **** return E_FAIL; ! *pVal = T2BSTR(Server); return S_OK; } --- 1084,1106 ---- return E_FAIL; ! if( strncmp( Server, "DARKTIDE", 8 ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "FROSTFELL" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "HARVESTGAIN" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "LEAFCULL" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "MORNINGTHAW" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "SOLCLAIM" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "THISTLEDOWN" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else if( stricmp( Server, "WINTERSEBB" ) == 0 ) ! *pVal = T2BSTR( Server ); ! else ! *pVal = T2BSTR("Unknown"); ! return S_OK; } |