mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Commands] Add #setaltcurrency Command. (#1850)
* [Commands] Add #setaltcurrency Command. - Add #setaltcurrency [Currency ID] [Amount] command to allow you to set a specific alternate currency to a value. - Add Zone::GetCurrencyID() and Zone::GetCurrencyItemID() helper methods. - Cleanup loops through zone->AlternateCurrencies. - Utilize helper methods where necessary. - Convert old methods parameters and return values from int to uint32 where necessary. * Typo.
This commit is contained in:
+4
-20
@@ -3025,28 +3025,12 @@ std::string QuestManager::getclassname(uint8 class_id, uint8 level) {
|
||||
return GetClassIDName(class_id, level);
|
||||
}
|
||||
|
||||
int QuestManager::getcurrencyid(uint32 item_id) {
|
||||
auto iter = zone->AlternateCurrencies.begin();
|
||||
while (iter != zone->AlternateCurrencies.end()) {
|
||||
if (item_id == (*iter).item_id) {
|
||||
return (*iter).id;
|
||||
}
|
||||
++iter;
|
||||
}
|
||||
return 0;
|
||||
uint32 QuestManager::getcurrencyid(uint32 item_id) {
|
||||
return zone->GetCurrencyID(item_id);
|
||||
}
|
||||
|
||||
int QuestManager::getcurrencyitemid(int currency_id) {
|
||||
if (currency_id > 0) {
|
||||
auto iter = zone->AlternateCurrencies.begin();
|
||||
while (iter != zone->AlternateCurrencies.end()) {
|
||||
if (currency_id == (*iter).id) {
|
||||
return (*iter).item_id;
|
||||
}
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
uint32 QuestManager::getcurrencyitemid(uint32 currency_id) {
|
||||
return zone->GetCurrencyItemID(currency_id);
|
||||
}
|
||||
|
||||
const char* QuestManager::getguildnamebyid(int guild_id) {
|
||||
|
||||
Reference in New Issue
Block a user