Item panel is a place where players organize their items. The following graph shows how we composite the item panel in Flash. The panel consists of a close button and 19 item slots. The itemSlot0
and itemSlot1
represent both hands, and itemSlot2
represent the riding. Players can arrange items within slots. They can put riding item in the riding slot. Riding item is a special item that players can ride on for faster movement. We are going to query items from server-side and display them in this panel according to the position.
Similar to the buildings in the previous chapter, we have a definition for all items. We reference items by using their ID and the definition lets us get all the information of the item from the item ID. In this example, we put the item definition in an XML file. In production virtual world, we should keep the definition in the server to prevent users from modifying it in client-side.
public function ItemDefinition...