Combine fixInnerObjTemplate Amendments (#524)

This commit is contained in:
tequ
2026-02-20 04:32:45 +09:00
parent a57e819ac5
commit 7bfa595c6c
4 changed files with 6 additions and 10 deletions

View File

@@ -69,12 +69,9 @@ STObject::makeInnerObject(SField const& name)
// The if is complicated because inner object templates were added in
// two phases:
// 1. If there are no available Rules, then always apply the template.
// 2. fixInnerObjTemplate added templates to two AMM inner objects.
// 3. fixInnerObjTemplate2 added templates to all remaining inner objects.
// 2. fixInnerObjTemplate added templates to all inner objects.
std::optional<Rules> const& rules = getCurrentTransactionRules();
bool const isAMMObj = name == sfAuctionSlot || name == sfVoteEntry;
if (!rules || (rules->enabled(fixInnerObjTemplate) && isAMMObj) ||
(rules->enabled(fixInnerObjTemplate2) && !isAMMObj))
if (!rules || rules->enabled(fixInnerObjTemplate))
{
if (SOTemplate const* elements =
InnerObjectFormats::getInstance().findSOTemplateBySField(name))