Inventory changes made by plugins are now propagated to the client

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1495 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-05-19 18:41:16 +00:00
parent 9dab3c4e8f
commit 5d3ade0267
3 changed files with 19 additions and 23 deletions

View File

@ -460,5 +460,6 @@ function HandleWoolCmd(Split, Player)
Player:GetInventory():SetSlot(6, Wool); Player:GetInventory():SetSlot(6, Wool);
Player:GetInventory():SetSlot(7, Wool); Player:GetInventory():SetSlot(7, Wool);
Player:GetInventory():SetSlot(8, Wool); Player:GetInventory():SetSlot(8, Wool);
Player:SendMessage("You have been bluewooled :)");
return true; return true;
end end

View File

@ -476,15 +476,8 @@ enum
E_BLOCK_WOODEN_STEP_APPLE = 0, E_BLOCK_WOODEN_STEP_APPLE = 0,
E_BLOCK_WOODEN_STEP_CONIFER = 1, E_BLOCK_WOODEN_STEP_CONIFER = 1,
E_BLOCK_WOODEN_STEP_BIRCH = 2, E_BLOCK_WOODEN_STEP_BIRCH = 2,
E_BLOCK_WOODEN_STEP_JUNGLE = 3 E_BLOCK_WOODEN_STEP_JUNGLE = 3,
} ;
enum
{
// E_ITEM_COAL metas: // E_ITEM_COAL metas:
E_META_COAL_NORMAL = 0, E_META_COAL_NORMAL = 0,
E_META_COAL_CHARCOAL = 1, E_META_COAL_CHARCOAL = 1,

View File

@ -197,6 +197,8 @@ void cInventory::SetSlot(int a_SlotNum, const cItem & a_Item)
{ {
m_Owner.GetWorld()->BroadcastEntityEquipment(m_Owner, SlotNumToEntityEquipmentID(a_SlotNum), a_Item, m_Owner.GetClientHandle()); m_Owner.GetWorld()->BroadcastEntityEquipment(m_Owner, SlotNumToEntityEquipmentID(a_SlotNum), a_Item, m_Owner.GetClientHandle());
} }
SendSlot(a_SlotNum);
} }