37 lines
		
	
	
		
			835 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
		
		
			
		
	
	
			37 lines
		
	
	
		
			835 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
|  | local _M = {} | ||
|  | local GameplayTag = import("GameplayTag") | ||
|  | local BusyGamePlayLibrary = import("BusyGamePlayLibrary") | ||
|  | 
 | ||
|  | local function GetConfig(func_name, config_id) | ||
|  |     local state, config = BusyGamePlayLibrary[func_name](config_id, nil) | ||
|  |     if state == true then | ||
|  |         return config | ||
|  |     else | ||
|  |         return nil | ||
|  |     end | ||
|  | end | ||
|  | 
 | ||
|  | function _M.GetItemConfigByID(item_id) | ||
|  |     return GetConfig("GetLevelItemConfig", item_id) | ||
|  | end | ||
|  | 
 | ||
|  | function _M.GetItemResourceConfig(item_id) | ||
|  |     return GetConfig("GetItemResourceConfig", item_id) | ||
|  | end | ||
|  | 
 | ||
|  | function _M.GetItemDescConfig(item_id) | ||
|  |     return GetConfig("GetLevelItemDescription", item_id) | ||
|  | 
 | ||
|  | end | ||
|  | 
 | ||
|  | function _M.GetRoleConfigByID(role_id) | ||
|  |     return GetConfig("GetRoleConfig", role_id) | ||
|  | end | ||
|  | 
 | ||
|  | function _M.GetGameplayTag(name) | ||
|  |     local tag = GameplayTag(name) | ||
|  |     tag.TagName = name | ||
|  |     return tag | ||
|  | end | ||
|  | 
 | ||
|  | return _M |