API:AccountBagFrame Update

__NOTOC__
Called when the AccountBagFrame frame's events are trigged. See AccountBagFrame_OnEvent.
AccountBagFrame_Update()
== Parameters ==
=== Arguments ===
:None
=== Returns ===
:nil
== Example ==
AccountBagFrame_OnUpdate()
== Related Functions ==
* AccountBagFrame_OnEvent
* AccountBagFrame_OnLoad
* AccountBagFrame_OnShow
== Source Code ==
function AccountBagFrame_Update()
	local itemButton;
	local texture, name, itemCount, locked;
	
	for i = 1, MAX_ACCOUNT_BAG_ITEMS do	
		itemButton = getglobal("AccountBagItemButton"..i);
		texture, name, itemCount, locked = GetAccountBagItemInfo(i);
		
		if ( texture == nil ) then
			texture = "";
		end
		if ( name == nil ) then
			name = "";
		end
		if ( itemCount == nil ) then
			itemCount = 0;
		end
		
		if ( texture ) then
			SetItemButtonTexture(itemButton, texture);
			SetItemButtonCount(itemButton, itemCount);
			SetItemButtonLuminance(itemButton, locked);
		end
	end
	AccountBagNumItems:SetText(TEXT("ACCOUNTBAG_NUMITEMS")..GetAccountBagNumItems());
end
Category:Functions