mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Quest API] Add RemoveAlternateCurrencyValue() to Perl/Lua (#4190)
# Perl - Add `$client->RemoveAlternateCurrencyValue(currency_id, amount)`. # Lua - Add `client:RemoveAlternateCurrencyValue(currency_id, amount)`. # Notes - Allows operators to more easily remove alternate currencies, returns a `bool`, `false` if failed`, `true` if succeeded. - Added `Zone::DoesAlternateCurrencyExist` that will reject setting, removing, or adding to a currency that does not exist.
This commit is contained in:
@@ -3318,4 +3318,15 @@ void Zone::SetSecondsBeforeIdle(uint32 seconds_before_idle)
|
||||
Zone::m_seconds_before_idle = seconds_before_idle;
|
||||
}
|
||||
|
||||
bool Zone::DoesAlternateCurrencyExist(uint32 currency_id)
|
||||
{
|
||||
return std::any_of(
|
||||
AlternateCurrencies.begin(),
|
||||
AlternateCurrencies.end(),
|
||||
[&](const auto& c) {
|
||||
return c.id == currency_id;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#include "zone_loot.cpp"
|
||||
|
||||
Reference in New Issue
Block a user