From 919e6bef84e3670b206f192613558274a341b976 Mon Sep 17 00:00:00 2001
From: Stefan Dombrowski <stefan@uni-bonn.de>
Date: Sat, 28 Aug 2010 18:56:14 +0200
Subject: Fixing omitted items in equipment window

Bug description: If a player has equipable items only, then the equipment
backend gets not initialized. As a consequence the equipment window
remains empty. This is particularly a problem for new characters.

Signed-off-by: Jared Adams <jaxad0127@gmail.com>
---
 src/net/tmwa/inventoryhandler.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index fd979dc6..7363c738 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -127,6 +127,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
     int index, amount, itemId, equipType, arrow;
     int identified, cards[4], itemType;
     Inventory *inventory = player_node->getInventory();
+    player_node->mEquipment->setBackend(&mEquips);
 
     switch (msg.getId())
     {
@@ -136,8 +137,6 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
             {
                 // Clear inventory - this will be a complete refresh
                 mEquips.clear();
-                player_node->mEquipment->setBackend(&mEquips);
-
                 inventory->clear();
             }
             else
-- 
cgit v1.2.3-70-g09d2