Functions

loadShop

Loads all the shop's items from the XML file data/items.xml.

« More »

getItem

Gets an Item object from the shop from its name.

« More »

initShop

Marks the shop as created in the session.

« More »

sendShop

Returns the shop array if it was created.

« More »

buildShop

Creates the shop in the session and sends it to the client.

Debits the shop's cost from the player's gold.
« More »

buyItem

Debits the item's cost specified as the item POST parameter, adds it to the Inventory and sends it to the client.

« More »

useItem

Invoke useItem on an item passed as the item POST parameter, sends to the client the updated player stats and the item.

« More »