Last active
January 5, 2016 13:06
-
-
Save himika/96f6badbe4b01c5fe632 to your computer and use it in GitHub Desktop.
[TESV.exe] コンテナ初期化にフックをかけるサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SKSE/PluginAPI.h> | |
#include <SKSE/GameReferences.h> | |
#include <SKSE/GameObjects.h> | |
#include <SKSE/SafeWrite.h> | |
class InventoryChagesEx : public InventoryChanges | |
{ | |
public: | |
void InitContainer_Hook() | |
{ | |
// コンテナ初期化前 | |
InitContainer(); | |
// コンテナ初期化後 | |
} | |
static void InitHook() | |
{ | |
WriteRelCall(0x004839CB, &InitContainer_Hook); | |
WriteRelCall(0x00527714, &InitContainer_Hook); | |
} | |
}; | |
class plugin_example : public SKSEPlugin | |
{ | |
public: | |
// ... | |
virtual bool OnLoad() override | |
{ | |
InventoryChangesEx::InitHook(); | |
} | |
// ... | |
} thePlugin; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment