diff --git a/webapp/bootstrap/config_loader.php b/webapp/bootstrap/config_loader.php index 605cbda..51f5cfb 100644 --- a/webapp/bootstrap/config_loader.php +++ b/webapp/bootstrap/config_loader.php @@ -52,22 +52,14 @@ function getRedisConfig($hash_value) return $g_conf_redis_cluster[$idx]; } -function getSkinConfig($g_conf_skin_cluster ,$hash_value) +function getSkinConfig($skin_table ,$item_id) { - if ($hash_value < 0) { - die('hash_value < 0 ' . $hash_value); - } - $idx = $hash_value % count($g_conf_skin_cluster); - return $g_conf_skin_cluster[$idx]; + return array_key_exists($item_id, $skin_table) ? $skin_table[$item_id] : null; } -function getEquipConfig($g_conf_equip_cluster ,$hash_value) +function getEquipConfig($equip_table, $item_id) { - if ($hash_value < 0) { - die('hash_value < 0 ' . $hash_value); - } - $idx = $hash_value % count($g_conf_equip_cluster); - return $g_conf_equip_cluster[$idx]; + return array_key_exists($item_id, $equip_table) ? $equip_table[$item_id] : null; } checkMysqlConfig();