Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ https://github.com/nwnxee/unified/compare/build8193.37.13...HEAD
##### New NWScript Functions
- Player: GetOpenStore()
- Creature: GetNumberOfBonusSpells(), ModifyNumberBonusSpells()
- Store: GetBlackMarket(), SetBlackMarket(), GetGold(), SetGold(), GetIdentifyCost(), SetIdentifyCost(), GetMaxBuyPrice(), SetMaxBuyPrice()
- Store: GetBlackMarket(), SetBlackMarket()

### Changed
- Damage: Added bRangedAttack to the NWNX_Damage_AttackEventData struct.
Expand Down
72 changes: 0 additions & 72 deletions Plugins/Store/NWScript/nwnx_store.nss
Original file line number Diff line number Diff line change
Expand Up @@ -56,36 +56,6 @@ int NWNX_Store_GetBlackMarket(object oStore);
/// @param nValue TRUE/FALSE.
void NWNX_Store_SetBlackMarket(object oStore, int nValue);

/// @brief Return the gold amount
/// @param oStore The store object.
/// @return status, -1 on error
int NWNX_Store_GetGold(object oStore);

/// @brief Set the gold amount
/// @param oStore The store object.
/// @param nValue Amount
void NWNX_Store_SetGold(object oStore, int nValue);

/// @brief Return the identify cost
/// @param oStore The store object.
/// @return status, -1 on error
int NWNX_Store_GetIdentifyCost(object oStore);

/// @brief Set the identify cost
/// @param oStore The store object.
/// @param nValue Cost
void NWNX_Store_SetIdentifyCost(object oStore, int nValue);

/// @brief Return the MaxBuyPrice amount
/// @param oStore The store object.
/// @return status, -1 on error
int NWNX_Store_GetMaxBuyPrice(object oStore);

/// @brief Set the MaxBuyPrice amount
/// @param oStore The store object.
/// @param nValue Amount
void NWNX_Store_SetMaxBuyPrice(object oStore, int nValue);

/// @}

int NWNX_Store_GetIsRestrictedBuyItem(object oStore, int nBaseItem)
Expand Down Expand Up @@ -158,45 +128,3 @@ void NWNX_Store_SetBlackMarket(object oStore, int nValue)
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "SetBlackMarket");
}

int NWNX_Store_GetGold(object oStore)
{
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "GetGold");
return NWNXPopInt();
}

void NWNX_Store_SetGold(object oStore, int nValue)
{
NWNXPushInt(nValue);
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "SetGold");
}

int NWNX_Store_GetIdentifyCost(object oStore)
{
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "GetIdentifyCost");
return NWNXPopInt();
}

void NWNX_Store_SetIdentifyCost(object oStore, int nValue)
{
NWNXPushInt(nValue);
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "SetIdentifyCost");
}

int NWNX_Store_GetMaxBuyPrice(object oStore)
{
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "GetMaxBuyPrice");
return NWNXPopInt();
}

void NWNX_Store_SetMaxBuyPrice(object oStore, int nValue)
{
NWNXPushInt(nValue);
NWNXPushObject(oStore);
NWNXCall(NWNX_Store, "SetMaxBuyPrice");
}
57 changes: 0 additions & 57 deletions Plugins/Store/Store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,60 +105,3 @@ NWNX_EXPORT ArgumentStack SetBlackMarket(ArgumentStack&& args)
}
return {};
}

NWNX_EXPORT ArgumentStack GetGold(ArgumentStack&& args)
{
if (auto *pStore = Utils::PopStore(args))
{
return pStore->m_iGold;
}
return -1;
}

NWNX_EXPORT ArgumentStack SetGold(ArgumentStack&& args)
{
if (auto *pStore = Utils::PopStore(args))
{
const auto nValue = args.extract<int32_t>();
pStore->m_iGold = nValue;
}
return {};
}

NWNX_EXPORT ArgumentStack GetIdentifyCost(ArgumentStack&& args)
{
if (auto *pStore = Utils::PopStore(args))
{
return pStore->m_iIdentifyCost;
}
return -1;
}

NWNX_EXPORT ArgumentStack SetIdentifyCost(ArgumentStack&& args)
{
if (auto *pStore = Utils::PopStore(args))
{
const auto nValue = args.extract<int32_t>();
pStore->m_iIdentifyCost = nValue;
}
return {};
}

NWNX_EXPORT ArgumentStack GetMaxBuyPrice(ArgumentStack&& args)
{
if (auto *pStore = Utils::PopStore(args))
{
return pStore->m_iMaxBuyPrice;
}
return -1;
}

NWNX_EXPORT ArgumentStack SetMaxBuyPrice(ArgumentStack&& args)
{
if (auto *pStore = Utils::PopStore(args))
{
const auto nValue = args.extract<int32_t>();
pStore->m_iMaxBuyPrice = nValue;
}
return {};
}