Skip to content

Added NWNX_Damage_DealMeleeDamage() #1571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 100 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
feaaa66
make Core work with -rdynamic compiled 34.1
niv Sep 18, 2022
14b86ba
fix Plugins/ServerLogRedirector
niv Sep 18, 2022
d01dc32
build8193.35 API update, first pass
mtijanic Sep 18, 2022
6fdd1a7
bring back FunctionsLinux as a extern/dlsym table so we don't have to…
niv Sep 18, 2022
882e2a5
fix Plugins/DotNET
niv Sep 18, 2022
b565849
clean up all mentions of GetRelocatedAddress
niv Sep 18, 2022
d63f98d
Fix up plugins to compile with new api
mtijanic Sep 18, 2022
4537de1
Switch version to 8193.35
mtijanic Sep 18, 2022
8c81faa
Use globals directly instead of fetching from NWNXEntryPoint()
mtijanic Sep 18, 2022
93f08b9
trim FunctionsLinux.hpp to only the functions referenced by plugins
mtijanic Sep 18, 2022
2f10927
Add workaround for namespace usage.
jhett12321 Sep 18, 2022
1cc7970
build8193.35: remove json support because it's broken
Daztek Sep 18, 2022
dcf70c9
remove dead code in Debug.cpp
niv Sep 18, 2022
fc9b59c
found some more dead code
niv Sep 18, 2022
d150a31
Make HookFunction() accept any arguments that are cast-able to void*
mtijanic Sep 18, 2022
b1a829d
No need for void* casting when hooking anymore
mtijanic Sep 18, 2022
108d219
Tweaks: remove tweaks that fixed basegame issues that have been fixed
Daztek Sep 19, 2022
db028e7
Optimizations: remove FixPlaceableReapplyBug from LuoLookup
Daztek Sep 19, 2022
9273eb0
Optimizations: remove ClientGameObjectUpdateTime
Daztek Sep 19, 2022
b909336
Appearance plugin function hooks.
jhett12321 Sep 19, 2022
c8f1734
Chat plugin function hooks.
jhett12321 Sep 19, 2022
bf139b6
Creature plugin function hooks.
jhett12321 Sep 19, 2022
57c059e
Damage plugin function hooks.
jhett12321 Sep 19, 2022
3c08dc7
Diagnostics plugin function hooks.
jhett12321 Sep 19, 2022
c11d05b
Dialog plugin function hooks.
jhett12321 Sep 19, 2022
9a58d6a
DotNET plugin function hooks.
jhett12321 Sep 19, 2022
59adbea
Effect plugin function hooks.
jhett12321 Sep 19, 2022
69d8321
ELC plugin function hooks.
jhett12321 Sep 19, 2022
9bfb2fa
Events plugin function hooks.
jhett12321 Sep 19, 2022
ba8f79e
Experimental plugin function hooks.
jhett12321 Sep 19, 2022
73e9640
Feat plugin function hooks.
jhett12321 Sep 19, 2022
4725653
Feedback plugin function hooks.
jhett12321 Sep 19, 2022
7d6408e
Lua plugin function hooks.
jhett12321 Sep 19, 2022
ca5bc76
MaxLevel plugin function hooks.
jhett12321 Sep 19, 2022
ff84c0f
NoStack plugin function hooks.
jhett12321 Sep 19, 2022
e9aebfd
Optimizations plugin function hooks.
jhett12321 Sep 19, 2022
6edbfb1
Player plugin function hooks.
jhett12321 Sep 19, 2022
56795d5
Profiler plugin function hooks.
jhett12321 Sep 19, 2022
a699128
Race plugin function hooks.
jhett12321 Sep 19, 2022
47b312a
Redis plugin function hooks.
jhett12321 Sep 19, 2022
5cf23ba
Rename plugin function hooks.
jhett12321 Sep 19, 2022
0464105
Reveal plugin function hooks.
jhett12321 Sep 19, 2022
241dcb0
LogRedirector plugin function hooks.
jhett12321 Sep 19, 2022
d820d18
SkillRanks plugin function hooks.
jhett12321 Sep 19, 2022
203658e
ThreadWatchdog plugin function hooks.
jhett12321 Sep 19, 2022
e87f5d6
Tileset plugin function hooks.
jhett12321 Sep 19, 2022
b3fa3c0
Tracking plugin function hooks.
jhett12321 Sep 19, 2022
005aea2
Tweaks plugin function hooks.
jhett12321 Sep 19, 2022
ba7548b
Util plugin function hooks.
jhett12321 Sep 19, 2022
613a701
Visibility plugin function hooks.
jhett12321 Sep 19, 2022
da16f5d
Weapon plugin function hooks.
jhett12321 Sep 19, 2022
020dba2
Cleanup FunctionsLinux
jhett12321 Sep 19, 2022
0615015
Remove undefined symbol check.
jhett12321 Sep 19, 2022
47a340f
Remove generation of FunctionsLinux.
jhett12321 Sep 19, 2022
f5fbe87
ELC: call GetStatBonusesFromFeats() directly
Daztek Sep 19, 2022
e03eaaa
UUID: call stuff directly
Daztek Sep 19, 2022
eae0340
Administration: add NWNX_ADMINISTRATION_OPTION_SHOW_PLAYER_JOIN_MESSAGES
Daztek Sep 19, 2022
33c7481
API: delete async stuff
Daztek Sep 23, 2022
24a0081
API: quick'n'dirty update
Daztek Sep 27, 2022
aeaca08
add Player_GetGameObject
niv Sep 24, 2022
6fe5286
remove missed flag from CNWSPlaceable resulting in incorrect memory w…
niv Sep 27, 2022
b836fb4
CNWSUUID: add GetMapPtr() to API
niv Sep 28, 2022
5941899
CUUID: copy in sole.h api def
niv Sep 28, 2022
139fb28
Events: UnsubscribeAllStartingWith()
niv Sep 29, 2022
2fe2a0b
Object: ForceAssignUUID()
niv Sep 29, 2022
ad21e7a
Effect: SetEffectCreator()
niv Oct 1, 2022
820d939
Effect: support EQUIPPED and INNATE, add functions to iterate interna…
niv Oct 1, 2022
43bfdff
Add suitable editorconfig
niv Oct 1, 2022
9691959
PostgreSQL: fix binary parameter passing and retrieval
niv Oct 1, 2022
506e863
PostgreSQL: also reset s_nextQueryBinaryResults when reconnecting or …
niv Oct 2, 2022
3d2c743
PostgresSQL: add CHARACTER_SET support
niv Oct 2, 2022
dc0fc35
Area: add SetDefaultObjectUiDiscoveryMask()
Daztek Sep 29, 2022
492d2ec
Player: add SetObjectUiDiscoveryMaskOverride()
Daztek Sep 30, 2022
5f72ad6
API: Update
Daztek Oct 5, 2022
2d632f7
API: Update
Daztek Oct 9, 2022
c19b094
Base64: silently eat whitespace
niv Oct 4, 2022
f330714
SQL Plugin: allow getting ITarget
niv Oct 4, 2022
7ad7c7f
core broadcasts NWNX_CORE_LOG_MESSAGE
niv Oct 9, 2022
2b22629
API: Update
Daztek Nov 13, 2022
0fde315
API: Update
Daztek Nov 25, 2022
7f17938
Add back json support
Daztek Dec 23, 2022
e92003c
API: Update
Daztek Jan 6, 2023
d6e0b26
Optimizations: update CacheScriptChunks
Daztek Jan 6, 2023
56431f7
Optimizations: add `NWNX_OPTIMIZATIONS_CACHE_DEBUGGER_INSTANCES`
Daztek Jan 6, 2023
07193c0
Events: update `NWNX_ON_OBJECT_USE_*` hook after rebase
Daztek Jan 6, 2023
975a155
Effect: deprecate stuff and some cleanup
Daztek Sep 20, 2022
1ddb714
Object: deprecate stuff and some cleanup
Daztek Sep 20, 2022
5fe9867
Regex: delete the whole thing
Daztek Sep 20, 2022
265f3ee
Util: deprecate stuff and some cleanup
Daztek Sep 20, 2022
f1cdc78
Tests: remove removed stuff
Daztek Sep 20, 2022
ceceda6
Add log warning to nwnx_deprecated.nss
Daztek Sep 20, 2022
8aaaf93
Creature: deprecate stuff and some cleanup
Daztek Sep 20, 2022
d060fd2
Object: don't deprecate NWNX_Object_SetCurrentHitPoints()
Daztek Sep 23, 2022
f9e341d
Race: fix nwnx_race_2da.nss
Daztek Sep 23, 2022
41a4081
Cleanup overload function hooks.
jhett12321 Sep 23, 2022
2c3b880
json: don't actually have to do all this weird stuff
Daztek Jan 14, 2023
22bfc14
Item: fix SetItemAppearance() Weapon Model/Color
Daztek Jan 14, 2023
4ad59cf
Damage: update for .35
Daztek Jan 15, 2023
579a9c9
Added NWNX_Damage_DealMeleeDamage()
Cjreek Jan 26, 2023
708e416
Added Constants::SavingThrowType::Paralysis + fixed death attack savi…
Cjreek Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
end_of_line = lf

[*.{nss,c,h,cpp,hpp}]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ https://github.com/nwnxee/unified/compare/build8193.34...HEAD
- Player: UpdateSkyBox();
- Player: UpdateFogColor();
- Player: UpdateFogAmount();
- Player: GetGameObject()
- Regex: Match()

### Changed
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ find_package(Sanitizers)

execute_process(COMMAND git rev-parse --short HEAD OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE SHORT_HASH)
set(TARGET_NWN_BUILD 8193)
set(TARGET_NWN_BUILD_REVISION 34)
set(TARGET_NWN_BUILD_REVISION 35)
set(NWNX_BUILD_SHA ${SHORT_HASH})
set(PLUGIN_PREFIX NWNX_)

Expand Down Expand Up @@ -47,9 +47,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-Wno-gnu-zero-variadic-macro-arguments -Wno-global-constructors -Wno-exit-time-destructors \
-Wno-missing-prototypes -Wno-unused-function -Wno-weak-vtables -Wno-missing-noreturn \
-Wno-non-virtual-dtor -Wno-double-promotion -Wno-covered-switch-default -Wno-unused-macros \
-Wno-register")
-Wno-register -Wno-pmf-conversions")
else()
set(WARNING_FLAGS_CXX "-Wall -Wextra")
set(WARNING_FLAGS_CXX "-Wall -Wextra -Wno-pmf-conversions")
endif()

set(NWNX_STANDARD_FLAGS "-m64 -march=x86-64 -fdiagnostics-show-option -fno-omit-frame-pointer -fPIC -fno-strict-aliasing")
Expand Down
460 changes: 460 additions & 0 deletions Compatibility/nwnx_deprecated.nss

Large diffs are not rendered by default.

42 changes: 19 additions & 23 deletions Core/NWNXCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ NWNXCore::NWNXCore()
// This will be fixed in a future release of NWNX:EE. For now, the version check will happen *too late* - we may
// crash before the version check happens.
std::printf("Starting NWNX %d.%d [%s]\n", NWNX_TARGET_NWN_BUILD, NWNX_TARGET_NWN_BUILD_REVISION, NWNX_BUILD_SHA);
// This sets up the base address for every hook and patch to follow.
Platform::CalculateBaseAddress();

m_createServerHook = Hooks::HookFunction(API::Functions::_ZN11CAppManager12CreateServerEv, (void*)&CreateServerHandler);
// Initialise export table. New plugin code should endeavour to use direct linking
// for hook naming, but these might help if you want to target a overloaded function.
NWNXLib::API::Functions::Initialize();

m_createServerHook = Hooks::HookFunction(&CAppManager::CreateServer, &CreateServerHandler);
}

NWNXCore::~NWNXCore()
Expand Down Expand Up @@ -174,19 +176,20 @@ void NWNXCore::ConfigureLogLevel(const std::string& plugin)

void NWNXCore::InitialSetupHooks()
{
m_vmSetVarHook = Hooks::HookFunction(API::Functions::_ZN25CNWVirtualMachineCommands20ExecuteCommandSetVarEii, (void*)&SetVarHandler, Hooks::Order::Final);
m_vmGetVarHook = Hooks::HookFunction(API::Functions::_ZN25CNWVirtualMachineCommands20ExecuteCommandGetVarEii, (void*)&GetVarHandler, Hooks::Order::Final);
m_vmTagEffectHook = Hooks::HookFunction(API::Functions::_ZN25CNWVirtualMachineCommands23ExecuteCommandTagEffectEii, (void*)&TagEffectHandler, Hooks::Order::Final);
m_vmTagItemProperyHook = Hooks::HookFunction(API::Functions::_ZN25CNWVirtualMachineCommands29ExecuteCommandTagItemPropertyEii, (void*)&TagItemPropertyHandler, Hooks::Order::Final);
m_vmPlaySoundHook = Hooks::HookFunction(API::Functions::_ZN25CNWVirtualMachineCommands23ExecuteCommandPlaySoundEii, (void*)&PlaySoundHandler, Hooks::Order::Final);
m_vmSetVarHook = Hooks::HookFunction(&CNWVirtualMachineCommands::ExecuteCommandSetVar, &SetVarHandler, Hooks::Order::Final);
m_vmGetVarHook = Hooks::HookFunction(&CNWVirtualMachineCommands::ExecuteCommandGetVar, &GetVarHandler, Hooks::Order::Final);
m_vmTagEffectHook = Hooks::HookFunction(&CNWVirtualMachineCommands::ExecuteCommandTagEffect, &TagEffectHandler, Hooks::Order::Final);
m_vmTagItemProperyHook = Hooks::HookFunction(&CNWVirtualMachineCommands::ExecuteCommandTagItemProperty, &TagItemPropertyHandler, Hooks::Order::Final);
m_vmPlaySoundHook = Hooks::HookFunction(&CNWVirtualMachineCommands::ExecuteCommandPlaySound, &PlaySoundHandler, Hooks::Order::Final);


m_destroyServerHook = Hooks::HookFunction(API::Functions::_ZN11CAppManager13DestroyServerEv, (void*)&DestroyServerHandler, Hooks::Order::Final);
m_mainLoopInternalHook = Hooks::HookFunction(API::Functions::_ZN21CServerExoAppInternal8MainLoopEv, (void*)&MainLoopInternalHandler, Hooks::Order::Final);
m_destroyServerHook = Hooks::HookFunction(&CAppManager::DestroyServer, &DestroyServerHandler, Hooks::Order::Final);
m_mainLoopInternalHook = Hooks::HookFunction(&CServerExoAppInternal::MainLoop, &MainLoopInternalHandler, Hooks::Order::Final);

POS::InitializeHooks();

static Hooks::Hook loadModuleInProgressHook = Hooks::HookFunction(API::Functions::_ZN10CNWSModule20LoadModuleInProgressEii,
(void*)+[](CNWSModule *pModule, int32_t nAreasLoaded, int32_t nAreasToLoad) -> uint32_t
static Hooks::Hook loadModuleInProgressHook = Hooks::HookFunction(&CNWSModule::LoadModuleInProgress,
+[](CNWSModule *pModule, int32_t nAreasLoaded, int32_t nAreasToLoad) -> uint32_t
{
int index = nAreasLoaded;
auto *node = pModule->m_lstModuleArea.m_pcExoLinkedListInternal->pHead;
Expand All @@ -206,8 +209,8 @@ void NWNXCore::InitialSetupHooks()
}, Hooks::Order::Earliest);

static Hooks::Hook loadModuleFinishHook = Hooks::HookFunction(
API::Functions::_ZN10CNWSModule16LoadModuleFinishEv,
(void*)+[](CNWSModule *pModule) -> uint32_t
&CNWSModule::LoadModuleFinish,
+[](CNWSModule *pModule) -> uint32_t
{
MessageBus::Broadcast("NWNX_CORE_SIGNAL", { "ON_MODULE_LOAD_FINISH" });
return loadModuleFinishHook->CallOriginal<uint32_t>(pModule);
Expand All @@ -216,8 +219,8 @@ void NWNXCore::InitialSetupHooks()
if (!Config::Get<bool>("ALLOW_NWNX_FUNCTIONS_IN_EXECUTE_SCRIPT_CHUNK", false))
{
static Hooks::Hook runScriptChunkHook = Hooks::HookFunction(
API::Functions::_ZN15CVirtualMachine14RunScriptChunkERK10CExoStringjii,
(void*)+[](CVirtualMachine *pVirtualMachine, const CExoString& sScriptChunk, ObjectID oid, int32_t bOidValid, int32_t bWrapIntoMain) -> int32_t
&CVirtualMachine::RunScriptChunk,
+[](CVirtualMachine *pVirtualMachine, const CExoString& sScriptChunk, ObjectID oid, int32_t bOidValid, int32_t bWrapIntoMain) -> int32_t
{
g_core->m_ScriptChunkRecursion += 1;
auto retVal = runScriptChunkHook->CallOriginal<int32_t>(pVirtualMachine, sScriptChunk, oid, bOidValid, bWrapIntoMain);
Expand Down Expand Up @@ -486,13 +489,6 @@ void NWNXCore::InitialSetupCommands()
Log::GetPrintSource(), Log::GetColorOutput(), Log::GetForceColor());
});

Commands::Register("resolve", [](std::string&, std::string& args)
{
auto addr = String::FromString<uint64_t>(args);
if (addr)
LOG_NOTICE("%s", NWNXLib::Platform::ResolveAddress(*addr));
});

}


Expand Down
2 changes: 1 addition & 1 deletion Core/NWNXCoreVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "API/CAppManager.hpp"
#include "API/CExoString.hpp"
#include "API/Constants.hpp"
#include "API/Functions.hpp"
#include "API/nwn_api.hpp"
#include "API/Globals.hpp"
#include "API/Vector.hpp"
#include "API/CExoString.hpp"
Expand Down
5 changes: 0 additions & 5 deletions NWNXLib/API/API/CExoEncapsulatedFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,13 @@ struct CExoEncapsulatedFile : CExoPackedFile
CExoEncapsulatedFile();
~CExoEncapsulatedFile();
virtual void AddRefCount();
virtual void AddAsyncRefCount();
virtual BOOL CloseFile();
virtual BOOL CloseAsyncFile();
virtual void DeleteRefCount();
virtual void DeleteAsyncRefCount();
virtual uint32_t GetResourceSize(RESID nID);
virtual BOOL Initialize();
virtual BOOL OpenFile();
virtual BOOL OpenFile(uint8_t * pCipher);
virtual BOOL OpenAsyncFile();
virtual uint32_t ReadResource(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual void ReadResourceAsync(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual BOOL LoadHeader(const char * expectOid, uint8_t nType = 0);
virtual BOOL UnloadHeader();

Expand Down
3 changes: 0 additions & 3 deletions NWNXLib/API/API/CExoFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ struct CExoFile
int32_t GetSize();
uint32_t Read(void * ptr, uint32_t size, uint32_t number);
uint32_t Read(CExoString & string, uint32_t length);
void ReadAsync(void * ptr, uint32_t size, uint32_t number);
BOOL ReadAsyncComplete();
uint32_t ReadAsyncBytesRead();
uint32_t Write(const void * ptr, uint32_t size, uint32_t number);
uint32_t Write(const char * string);
uint32_t Write(const CExoString & string);
Expand Down
7 changes: 0 additions & 7 deletions NWNXLib/API/API/CExoPackedFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,21 @@ struct CExoPackedFile
uint16_t m_wDrives;
uint32_t m_nFileSize;
CExoFile * m_pExoFile;
CExoFile * m_pAsyncExoFile;
int32_t m_nRefCount;
int32_t m_nAsyncRefCount;
BOOL m_bLoaded;
BOOL m_bAsyncLoaded;
BOOL m_bHeaderLoaded;

CExoPackedFile();
virtual ~CExoPackedFile();
virtual void AddRefCount();
virtual void AddAsyncRefCount();
virtual BOOL CloseFile();
virtual BOOL CloseAsyncFile();
virtual void DeleteRefCount();
virtual void DeleteAsyncRefCount();
virtual CExoFile * GetFile();
virtual CExoFile * GetAsyncFile();
virtual uint32_t GetResourceSize(RESID nID);
virtual BOOL Initialize();
virtual BOOL OpenFile();
virtual BOOL OpenFile(uint8_t * pCipher);
virtual BOOL OpenAsyncFile();
virtual uint32_t ReadResource(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual void ReadResourceAsync(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual BOOL LoadHeader(const char * expectOid, uint8_t nType = 0);
Expand Down
5 changes: 0 additions & 5 deletions NWNXLib/API/API/CExoResFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,13 @@ struct CExoResFile : CExoPackedFile
CExoResFile();
~CExoResFile();
virtual void AddRefCount();
virtual void AddAsyncRefCount();
virtual BOOL CloseFile();
virtual BOOL CloseAsyncFile();
virtual void DeleteRefCount();
virtual void DeleteAsyncRefCount();
virtual uint32_t GetResourceSize(RESID nID);
virtual BOOL Initialize();
virtual BOOL OpenFile();
virtual BOOL OpenFile(uint8_t * pCipher);
virtual BOOL OpenAsyncFile();
virtual uint32_t ReadResource(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual void ReadResourceAsync(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual BOOL LoadHeader(const char * expectOid, uint8_t nType = 0);
virtual BOOL UnloadHeader();

Expand Down
19 changes: 5 additions & 14 deletions NWNXLib/API/API/CExoResMan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ struct CExoResMan
int64_t m_nAvailableMemory;
CExoArrayList<CExoKeyTable *> m_pKeyTables;
CExoLinkedList<CRes> m_lstToBeFreed;
CExoLinkedList<CRes> m_lstAsyncResQueue;
CRes * m_pCurrentAsyncRes;
CExoFile * m_pAsyncFile;
BOOL m_bAsyncSuspended;
uint32_t m_nTotalDemands;
uint32_t m_nTotalCacheHits;
uint32_t m_nTotalOldReleases;
Expand Down Expand Up @@ -76,10 +72,8 @@ struct CExoResMan
BOOL RemoveFixedKeyTableFile(const CExoString & sName);
BOOL RemoveResourceDirectory(const CExoString & sName);
BOOL RemoveManifest(const Hash::SHA1 & sManifestHash);
void ResumeServicing();
void SetResObject(const CResRef & cResRef, RESTYPE nType, CRes * pNewRes);
BOOL SetTotalResourceMemory(int64_t totalAvailableMemory);
void SuspendServicing();
void Update(uint32_t nTimeSlice);
BOOL UpdateEncapsulatedResourceFile(const CExoString & sName);
BOOL UpdateFixedKeyTableFile(const CExoString & sName);
Expand All @@ -88,19 +82,16 @@ struct CExoResMan
RESTYPE GetResTypeFromFile(const CExoString & sName);
void GetResRefFromFile(CResRef & cResRef, const CExoString & sName);
BOOL GetKeyEntry(const CResRef & cResRef, RESTYPE nType, CExoKeyTable * * pNewTable, CKeyTableEntry * * pNewKey, bool bLogFailure = true);
int32_t CancelRequest(CRes * pRes);
void * Demand(CRes * pRes);
void Dump(CRes * pRes, BOOL bRemove = false);
int32_t Release(CRes * pRes);
int32_t Request(CRes * pRes);
BOOL ReadRaw(CRes * pRes, int32_t nSize, char * pBuffer);
BOOL GetNewResRef(const CResRef & cResRef, RESTYPE nType, CResRef & cTarget);
BOOL CreateDirectory(CExoString sDirectory);
BOOL NukeDirectory(CExoString sDirectory, BOOL bDeleteAllFiles = false, BOOL bDeleteAllSubDirectories = false);
BOOL CleanDirectory(CExoString sDirectory, BOOL bDeleteSubDirectories = false, BOOL bCleanSubDirectories = false, RESTYPE restype = 0xFFFF);
BOOL RemoveFile(const CExoString & sFile, RESTYPE nResType);
BOOL GetFreeDiskSpace(const CExoString & sDirectory, uint64_t * pSpaceAvailable);
BOOL ServiceCurrentAsyncRes();
int32_t GetTableCount(CRes * pRes, BOOL bCountStatic);
BOOL GetIsStaticType(RESTYPE nType);
void RemoveFromToBeFreedList(CRes * pRes);
Expand All @@ -115,11 +106,11 @@ struct CExoResMan
BOOL FreeChunk();
CExoKeyTable * GetTable(CRes * pRes);
BOOL Malloc(CRes * pRes);
BOOL ServiceFromDirectory(CRes * pRes, BOOL bAsync = false);
BOOL ServiceFromEncapsulated(CRes * pRes, BOOL bAsync = false);
BOOL ServiceFromResFile(CRes * pRes, BOOL bAsync = false);
BOOL ServiceFromImage(CRes * pRes, BOOL bAsync = false);
BOOL ServiceFromManifest(CRes * pRes, BOOL bAsync = false);
BOOL ServiceFromDirectory(CRes * pRes);
BOOL ServiceFromEncapsulated(CRes * pRes);
BOOL ServiceFromResFile(CRes * pRes);
BOOL ServiceFromImage(CRes * pRes);
BOOL ServiceFromManifest(CRes * pRes);
BOOL UpdateKeyTable(const CExoString & sName, uint32_t nTableType);
BOOL ServiceFromDirectoryRaw(CRes * pRes, int32_t nSize, char * pBuffer);
BOOL ServiceFromEncapsulatedRaw(CRes * pRes, int32_t nSize, char * pBuffer);
Expand Down
5 changes: 0 additions & 5 deletions NWNXLib/API/API/CExoResourceImageFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,13 @@ struct CExoResourceImageFile : CExoPackedFile
CExoResourceImageFile();
~CExoResourceImageFile();
virtual void AddRefCount();
virtual void AddAsyncRefCount();
virtual BOOL CloseFile();
virtual BOOL CloseAsyncFile();
virtual void DeleteRefCount();
virtual void DeleteAsyncRefCount();
virtual uint32_t GetResourceSize(RESID nID);
virtual BOOL Initialize();
virtual BOOL OpenFile();
virtual BOOL OpenFile(uint8_t * pCipher);
virtual BOOL OpenAsyncFile();
virtual uint32_t ReadResource(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual void ReadResourceAsync(RESID nID, void * pData, uint32_t nSize, uint32_t nDataOffset);
virtual BOOL LoadHeader(const char * expectOid, uint8_t nType = 0);
virtual BOOL UnloadHeader();
virtual void * GetResource(RESID nID);
Expand Down
1 change: 1 addition & 0 deletions NWNXLib/API/API/CGameEffect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct CGameEffect
BOOL m_bSkipOnLoad;
uint64_t m_nItemPropertySourceId;
CExoString m_sCustomTag;
BOOL m_bIgnoreImmunity;

CGameEffect(BOOL bCreateNewID = true);
CGameEffect(CGameEffect * pParent, BOOL bCopyIconVisibility = false);
Expand Down
15 changes: 12 additions & 3 deletions NWNXLib/API/API/CLastUpdateObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ NWN_API_PROLOGUE(CLastUpdateObject)

struct CLoopingVisualEffect;
struct CNWSPlayerLUOQuickbarItemButton;
struct ObjectVisualTransformData;


typedef TextureReplaceInfo AnimationReplaceInfo;
typedef int BOOL;
typedef uint32_t OBJECT_ID;

Expand Down Expand Up @@ -89,8 +91,8 @@ struct CLastUpdateObject
CExoString m_sSubRace;
CExoString m_sDeity;
uint8_t m_nGender;
uint8_t m_nClass[3];
uint8_t m_nLevel[3];
uint8_t m_nClass[8];
uint8_t m_nLevel[8];
int16_t m_nAlignmentLawChaos;
int16_t m_nAlignmentGoodEvil;
BOOL m_bSelectableWhenDead;
Expand All @@ -108,17 +110,24 @@ struct CLastUpdateObject
uint8_t m_nAbilityFinalINT;
uint8_t m_nAbilityFinalWIS;
uint8_t m_nAbilityFinalCHA;
ObjectVisualTransformData m_pObjectVisualTransformData;
ObjectVisualTransformData * m_pObjectVisualTransformData;
CExoArrayList<MaterialShaderParam> m_lMaterialShaderParameters;
CExoArrayList<TextureReplaceInfo> m_lTextureReplaceInfo;
CExoArrayList<AnimationReplaceInfo> m_lAnimationReplaceInfo;
Vector m_vHiliteColor;
int32_t m_nMouseCursor;
BOOL m_bUseable;
int32_t m_nUiDiscoveryMask;
int32_t m_nTextBubbleOverrideType;
CExoString m_sTextBubbleOverrideText;
int32_t m_nUpdateDisplayNameSeq;
int32_t m_nUpdateHiddenSeq;
CNWSPlayerLUOQuickbarItemButton * m_pQuickbarButton;

CLastUpdateObject();
~CLastUpdateObject();
const ObjectVisualTransformData & GetVisualTransformData();
void SetVisualTransformData(const ObjectVisualTransformData & data);
void InitializeQuickbar();


Expand Down
2 changes: 2 additions & 0 deletions NWNXLib/API/API/CNWArea.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ struct CNWArea
uint32_t m_nMoonFogColor;
uint8_t m_nMoonFogAmount;
BOOL m_bMoonShadows;
Vector m_vMoonDirection;
uint32_t m_nSunAmbientColor;
uint32_t m_nSunDiffuseColor;
uint32_t m_nSunFogColor;
uint8_t m_nSunFogAmount;
BOOL m_bSunShadows;
Vector m_vSunDirection;
BOOL m_bUseDayNightCycle;
BOOL m_bIsNight;
uint8_t m_nSkyBox;
Expand Down
3 changes: 3 additions & 0 deletions NWNXLib/API/API/CNWClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ typedef int BOOL;
struct CNWClass
{
uint32_t m_nName;
uint32_t m_nShort;
uint32_t m_nNameLower;
uint32_t m_nNamePlural;
uint32_t m_nDescription;
Expand Down Expand Up @@ -67,10 +68,12 @@ struct CNWClass
uint8_t m_nArcSpellUsePerDayLevel;
uint8_t m_nDivSpellUsePerDayLevel;
uint8_t m_nEpicLevel;
BOOL m_bSkipSpellSelection;

CNWClass();
~CNWClass();
CExoString GetNameText();
CExoString GetShortNameText();
CExoString GetNameLowerText();
CExoString GetNamePluralText();
CExoString GetDescriptionText();
Expand Down
1 change: 1 addition & 0 deletions NWNXLib/API/API/CNWRace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct CNWRace
int32_t m_nNormalFeatEveryNthLevel;
int32_t m_nNumberNormalFeatsEveryNthLevel;
int32_t m_nSkillPointModifierAbility;
uint16_t m_nFavoredEnemyFeat;

CNWRace();
~CNWRace();
Expand Down
Loading