Skip to content

Commit

Permalink
Add SendUIMessage::SendInventoryUpdateMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Jan 9, 2024
1 parent 09581f1 commit 579a20b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/RE/A/ActorMagicCaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace RE
void FinishCastImpl() override; // 07 - { return; }
void InterruptCastImpl(bool a_depleteEnergy) override; // 08 - { return; }
void SpellCast(bool a_doCast, std::uint32_t a_arg2, MagicItem* a_spell) override; // 09 - { return; }
bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_alchStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost) override; // 0A
bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_effectStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost) override; // 0A
TESObjectREFR* GetCasterStatsObject() const override; // 0B - { return actor; }
Actor* GetCasterAsActor() const override; // 0C - { return actor; }
NiNode* GetMagicNode() override; // 0E - { return magicNode; }
Expand Down
10 changes: 6 additions & 4 deletions include/RE/I/InventoryUpdateData.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@

namespace RE
{
class InventoryUpdateData : public IUIMessageData
class TESBoundObject;

class InventoryUpdateData : public IUIMessageData
{
public:
inline static constexpr auto RTTI = RTTI_InventoryUpdateData;

~InventoryUpdateData() override = default; // 00

// members
RefHandle unk10; // 10
std::uint32_t pad14; // 14
TESForm* unk18; // 18
RefHandle inventoryRef; // 10
std::uint32_t pad14; // 14
TESBoundObject* updateObj; // 18
};
static_assert(sizeof(InventoryUpdateData) == 0x20);
}
2 changes: 1 addition & 1 deletion include/RE/M/MagicCaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace RE
virtual void FinishCastImpl(); // 07 - { return; }
virtual void InterruptCastImpl(bool a_depleteEnergy); // 08 - { return; }
virtual void SpellCast(bool a_doCast, std::uint32_t a_arg2, MagicItem* a_spell); // 09 - { return; }
virtual bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_alchStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost); // 0A
virtual bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_effectStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost); // 0A
virtual TESObjectREFR* GetCasterStatsObject() const; // 0B - { return 0; }
virtual Actor* GetCasterAsActor() const; // 0C - { return 0; }
virtual TESObjectREFR* GetCasterObjectReference(Actor** a_outCaster) const; // 0D
Expand Down
3 changes: 2 additions & 1 deletion include/RE/M/MagicSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ namespace RE
kItemCharge = 5,
kCastWhileShouting = 6,
kShoutWhileCasting = 7,
kShoutWhileRecovering = 8
kShoutWhileRecovering = 8,
kCustomReasonNoStart = 100,
};

enum class CastingSource
Expand Down
17 changes: 17 additions & 0 deletions include/RE/S/SendUIMessage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

namespace RE
{
class TESBoundObject;
class TESObjectREFR;

namespace SendUIMessage
{
void SendInventoryUpdateMessage(TESObjectREFR* a_inventoryRef, const TESBoundObject* a_updateObj)
{
using func_t = decltype(&SendUIMessage::SendInventoryUpdateMessage);
static REL::Relocation<func_t> func{ RELOCATION_ID(51911, 52849) };
return func(a_inventoryRef, a_updateObj);
}
}
}

0 comments on commit 579a20b

Please sign in to comment.