Inventory doesn't use cPackets
git-svn-id: http://mc-server.googlecode.com/svn/trunk@784 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
e92b9e7ecb
commit
530be5bd66
@ -10,10 +10,6 @@
|
|||||||
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
#include "packets/cPacket_WindowClick.h"
|
|
||||||
#include "packets/cPacket_WholeInventory.h"
|
|
||||||
#include "packets/cPacket_InventorySlot.h"
|
|
||||||
|
|
||||||
#include "items/Item.h"
|
#include "items/Item.h"
|
||||||
|
|
||||||
|
|
||||||
@ -306,15 +302,10 @@ void cInventory::SendSlot( int a_SlotNum )
|
|||||||
{
|
{
|
||||||
if (Item->IsEmpty())
|
if (Item->IsEmpty())
|
||||||
{
|
{
|
||||||
|
// Sanitize items that are not completely empty (ie. count == 0, but type != empty)
|
||||||
Item->Empty();
|
Item->Empty();
|
||||||
}
|
}
|
||||||
cPacket_InventorySlot InventorySlot;
|
m_Owner->GetClientHandle()->SendInventorySlot(0, a_SlotNum, *Item);
|
||||||
InventorySlot.m_ItemCount = Item->m_ItemCount;
|
|
||||||
InventorySlot.m_ItemID = (short) Item->m_ItemID;
|
|
||||||
InventorySlot.m_ItemUses = (char) Item->m_ItemHealth;
|
|
||||||
InventorySlot.m_SlotNum = (short) a_SlotNum;
|
|
||||||
InventorySlot.m_WindowID = 0; // Inventory window ID
|
|
||||||
m_Owner->GetClientHandle()->Send( InventorySlot );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user