mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-28 22:14:28 +02:00
Added config option"queryPlayerContainers"
This option should allow you to query every player container for an available slot.
This commit is contained in:
parent
1aaa6288a8
commit
6e02936226
@ -69,6 +69,7 @@ freePremium = false
|
||||
kickIdlePlayerAfterMinutes = 15
|
||||
maxMessageBuffer = 4
|
||||
showMonsterLoot = false
|
||||
queryPlayerContainers = false
|
||||
|
||||
-- Character Rooking
|
||||
-- Level threshold is the level requirement to teleport players back to newbie town
|
||||
|
@ -77,6 +77,7 @@ bool ConfigManager::load()
|
||||
boolean[CONVERT_UNSAFE_SCRIPTS] = getGlobalBoolean(L, "convertUnsafeScripts", true);
|
||||
boolean[TELEPORT_NEWBIES] = getGlobalBoolean(L, "teleportNewbies", true);
|
||||
boolean[STACK_CUMULATIVES] = getGlobalBoolean(L, "autoStackCumulatives", false);
|
||||
boolean[QUERY_PLAYER_CONTAINERS] = getGlobalBoolean(L, "queryPlayerContainers", false);
|
||||
|
||||
string[DEFAULT_PRIORITY] = getGlobalString(L, "defaultPriority", "high");
|
||||
string[SERVER_NAME] = getGlobalString(L, "serverName", "");
|
||||
|
@ -40,6 +40,7 @@ class ConfigManager
|
||||
CONVERT_UNSAFE_SCRIPTS,
|
||||
TELEPORT_NEWBIES,
|
||||
STACK_CUMULATIVES,
|
||||
QUERY_PLAYER_CONTAINERS,
|
||||
|
||||
LAST_BOOLEAN_CONFIG /* this must be the last one */
|
||||
};
|
||||
|
@ -2297,11 +2297,13 @@ Cylinder* Player::queryDestination(int32_t& index, const Thing& thing, Item** de
|
||||
n--;
|
||||
}
|
||||
|
||||
/*for (Item* tmpContainerItem : tmpContainer->getItemList()) {
|
||||
if (Container* subContainer = tmpContainerItem->getContainer()) {
|
||||
containers.push_back(subContainer);
|
||||
if (g_config.getBoolean(ConfigManager::QUERY_PLAYER_CONTAINERS)) {
|
||||
for (Item* tmpContainerItem : tmpContainer->getItemList()) {
|
||||
if (Container* subContainer = tmpContainerItem->getContainer()) {
|
||||
containers.push_back(subContainer);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -2324,9 +2326,11 @@ Cylinder* Player::queryDestination(int32_t& index, const Thing& thing, Item** de
|
||||
return tmpContainer;
|
||||
}
|
||||
|
||||
/*if (Container* subContainer = tmpItem->getContainer()) {
|
||||
containers.push_back(subContainer);
|
||||
}*/
|
||||
if (g_config.getBoolean(ConfigManager::QUERY_PLAYER_CONTAINERS)) {
|
||||
if (Container* subContainer = tmpItem->getContainer()) {
|
||||
containers.push_back(subContainer);
|
||||
}
|
||||
}
|
||||
|
||||
n++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user