Skip to content

Commit 51baea6

Browse files
Partially revert "Add new Store functionality (#1860)" (#1863)
1 parent 3cdcae7 commit 51baea6

File tree

3 files changed

+1
-130
lines changed

3 files changed

+1
-130
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ https://github.com/nwnxee/unified/compare/build8193.37.13...HEAD
2121
##### New NWScript Functions
2222
- Player: GetOpenStore()
2323
- Creature: GetNumberOfBonusSpells(), ModifyNumberBonusSpells()
24-
- Store: GetBlackMarket(), SetBlackMarket(), GetGold(), SetGold(), GetIdentifyCost(), SetIdentifyCost(), GetMaxBuyPrice(), SetMaxBuyPrice()
24+
- Store: GetBlackMarket(), SetBlackMarket()
2525

2626
### Changed
2727
- Damage: Added bRangedAttack to the NWNX_Damage_AttackEventData struct.

Plugins/Store/NWScript/nwnx_store.nss

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -56,36 +56,6 @@ int NWNX_Store_GetBlackMarket(object oStore);
5656
/// @param nValue TRUE/FALSE.
5757
void NWNX_Store_SetBlackMarket(object oStore, int nValue);
5858

59-
/// @brief Return the gold amount
60-
/// @param oStore The store object.
61-
/// @return status, -1 on error
62-
int NWNX_Store_GetGold(object oStore);
63-
64-
/// @brief Set the gold amount
65-
/// @param oStore The store object.
66-
/// @param nValue Amount
67-
void NWNX_Store_SetGold(object oStore, int nValue);
68-
69-
/// @brief Return the identify cost
70-
/// @param oStore The store object.
71-
/// @return status, -1 on error
72-
int NWNX_Store_GetIdentifyCost(object oStore);
73-
74-
/// @brief Set the identify cost
75-
/// @param oStore The store object.
76-
/// @param nValue Cost
77-
void NWNX_Store_SetIdentifyCost(object oStore, int nValue);
78-
79-
/// @brief Return the MaxBuyPrice amount
80-
/// @param oStore The store object.
81-
/// @return status, -1 on error
82-
int NWNX_Store_GetMaxBuyPrice(object oStore);
83-
84-
/// @brief Set the MaxBuyPrice amount
85-
/// @param oStore The store object.
86-
/// @param nValue Amount
87-
void NWNX_Store_SetMaxBuyPrice(object oStore, int nValue);
88-
8959
/// @}
9060

9161
int NWNX_Store_GetIsRestrictedBuyItem(object oStore, int nBaseItem)
@@ -158,45 +128,3 @@ void NWNX_Store_SetBlackMarket(object oStore, int nValue)
158128
NWNXPushObject(oStore);
159129
NWNXCall(NWNX_Store, "SetBlackMarket");
160130
}
161-
162-
int NWNX_Store_GetGold(object oStore)
163-
{
164-
NWNXPushObject(oStore);
165-
NWNXCall(NWNX_Store, "GetGold");
166-
return NWNXPopInt();
167-
}
168-
169-
void NWNX_Store_SetGold(object oStore, int nValue)
170-
{
171-
NWNXPushInt(nValue);
172-
NWNXPushObject(oStore);
173-
NWNXCall(NWNX_Store, "SetGold");
174-
}
175-
176-
int NWNX_Store_GetIdentifyCost(object oStore)
177-
{
178-
NWNXPushObject(oStore);
179-
NWNXCall(NWNX_Store, "GetIdentifyCost");
180-
return NWNXPopInt();
181-
}
182-
183-
void NWNX_Store_SetIdentifyCost(object oStore, int nValue)
184-
{
185-
NWNXPushInt(nValue);
186-
NWNXPushObject(oStore);
187-
NWNXCall(NWNX_Store, "SetIdentifyCost");
188-
}
189-
190-
int NWNX_Store_GetMaxBuyPrice(object oStore)
191-
{
192-
NWNXPushObject(oStore);
193-
NWNXCall(NWNX_Store, "GetMaxBuyPrice");
194-
return NWNXPopInt();
195-
}
196-
197-
void NWNX_Store_SetMaxBuyPrice(object oStore, int nValue)
198-
{
199-
NWNXPushInt(nValue);
200-
NWNXPushObject(oStore);
201-
NWNXCall(NWNX_Store, "SetMaxBuyPrice");
202-
}

Plugins/Store/Store.cpp

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -105,60 +105,3 @@ NWNX_EXPORT ArgumentStack SetBlackMarket(ArgumentStack&& args)
105105
}
106106
return {};
107107
}
108-
109-
NWNX_EXPORT ArgumentStack GetGold(ArgumentStack&& args)
110-
{
111-
if (auto *pStore = Utils::PopStore(args))
112-
{
113-
return pStore->m_iGold;
114-
}
115-
return -1;
116-
}
117-
118-
NWNX_EXPORT ArgumentStack SetGold(ArgumentStack&& args)
119-
{
120-
if (auto *pStore = Utils::PopStore(args))
121-
{
122-
const auto nValue = args.extract<int32_t>();
123-
pStore->m_iGold = nValue;
124-
}
125-
return {};
126-
}
127-
128-
NWNX_EXPORT ArgumentStack GetIdentifyCost(ArgumentStack&& args)
129-
{
130-
if (auto *pStore = Utils::PopStore(args))
131-
{
132-
return pStore->m_iIdentifyCost;
133-
}
134-
return -1;
135-
}
136-
137-
NWNX_EXPORT ArgumentStack SetIdentifyCost(ArgumentStack&& args)
138-
{
139-
if (auto *pStore = Utils::PopStore(args))
140-
{
141-
const auto nValue = args.extract<int32_t>();
142-
pStore->m_iIdentifyCost = nValue;
143-
}
144-
return {};
145-
}
146-
147-
NWNX_EXPORT ArgumentStack GetMaxBuyPrice(ArgumentStack&& args)
148-
{
149-
if (auto *pStore = Utils::PopStore(args))
150-
{
151-
return pStore->m_iMaxBuyPrice;
152-
}
153-
return -1;
154-
}
155-
156-
NWNX_EXPORT ArgumentStack SetMaxBuyPrice(ArgumentStack&& args)
157-
{
158-
if (auto *pStore = Utils::PopStore(args))
159-
{
160-
const auto nValue = args.extract<int32_t>();
161-
pStore->m_iMaxBuyPrice = nValue;
162-
}
163-
return {};
164-
}

0 commit comments

Comments
 (0)