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
|
kickIdlePlayerAfterMinutes = 15
|
||||||
maxMessageBuffer = 4
|
maxMessageBuffer = 4
|
||||||
showMonsterLoot = false
|
showMonsterLoot = false
|
||||||
|
queryPlayerContainers = false
|
||||||
|
|
||||||
-- Character Rooking
|
-- Character Rooking
|
||||||
-- Level threshold is the level requirement to teleport players back to newbie town
|
-- 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[CONVERT_UNSAFE_SCRIPTS] = getGlobalBoolean(L, "convertUnsafeScripts", true);
|
||||||
boolean[TELEPORT_NEWBIES] = getGlobalBoolean(L, "teleportNewbies", true);
|
boolean[TELEPORT_NEWBIES] = getGlobalBoolean(L, "teleportNewbies", true);
|
||||||
boolean[STACK_CUMULATIVES] = getGlobalBoolean(L, "autoStackCumulatives", false);
|
boolean[STACK_CUMULATIVES] = getGlobalBoolean(L, "autoStackCumulatives", false);
|
||||||
|
boolean[QUERY_PLAYER_CONTAINERS] = getGlobalBoolean(L, "queryPlayerContainers", false);
|
||||||
|
|
||||||
string[DEFAULT_PRIORITY] = getGlobalString(L, "defaultPriority", "high");
|
string[DEFAULT_PRIORITY] = getGlobalString(L, "defaultPriority", "high");
|
||||||
string[SERVER_NAME] = getGlobalString(L, "serverName", "");
|
string[SERVER_NAME] = getGlobalString(L, "serverName", "");
|
||||||
|
@ -40,6 +40,7 @@ class ConfigManager
|
|||||||
CONVERT_UNSAFE_SCRIPTS,
|
CONVERT_UNSAFE_SCRIPTS,
|
||||||
TELEPORT_NEWBIES,
|
TELEPORT_NEWBIES,
|
||||||
STACK_CUMULATIVES,
|
STACK_CUMULATIVES,
|
||||||
|
QUERY_PLAYER_CONTAINERS,
|
||||||
|
|
||||||
LAST_BOOLEAN_CONFIG /* this must be the last one */
|
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--;
|
n--;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*for (Item* tmpContainerItem : tmpContainer->getItemList()) {
|
if (g_config.getBoolean(ConfigManager::QUERY_PLAYER_CONTAINERS)) {
|
||||||
if (Container* subContainer = tmpContainerItem->getContainer()) {
|
for (Item* tmpContainerItem : tmpContainer->getItemList()) {
|
||||||
containers.push_back(subContainer);
|
if (Container* subContainer = tmpContainerItem->getContainer()) {
|
||||||
|
containers.push_back(subContainer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2324,9 +2326,11 @@ Cylinder* Player::queryDestination(int32_t& index, const Thing& thing, Item** de
|
|||||||
return tmpContainer;
|
return tmpContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (Container* subContainer = tmpItem->getContainer()) {
|
if (g_config.getBoolean(ConfigManager::QUERY_PLAYER_CONTAINERS)) {
|
||||||
containers.push_back(subContainer);
|
if (Container* subContainer = tmpItem->getContainer()) {
|
||||||
}*/
|
containers.push_back(subContainer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user