From 223967b80d783df1be2df5f74ddf198f373fbc57 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 12 Jun 2012 21:30:32 +0000 Subject: Added working crafting hooks HOOK_PRE_CRAFTING, HOOK_CRAFTING_NO_RECIPE and HOOK_POST_CRAFTING git-svn-id: http://mc-server.googlecode.com/svn/trunk@598 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cSurvivalInventory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/cSurvivalInventory.cpp') diff --git a/source/cSurvivalInventory.cpp b/source/cSurvivalInventory.cpp index cd7b96ad8..4a573572d 100644 --- a/source/cSurvivalInventory.cpp +++ b/source/cSurvivalInventory.cpp @@ -74,7 +74,7 @@ void cSurvivalInventory::Clicked( cPacket* a_ClickPacket ) cCraftingGrid Grid(m_Slots + c_CraftOffset + 1, 2, 2); cCraftingRecipe Recipe(Grid); - cRoot::Get()->GetCraftingRecipes()->GetRecipe(Grid, Recipe); + cRoot::Get()->GetCraftingRecipes()->GetRecipe(m_Owner, Grid, Recipe); if ((Packet->m_SlotNum == 0) && !bDontCook) { @@ -85,10 +85,10 @@ void cSurvivalInventory::Clicked( cPacket* a_ClickPacket ) Grid.CopyToItems(m_Slots + c_CraftOffset + 1); // Get the recipe for the new grid contents: - cRoot::Get()->GetCraftingRecipes()->GetRecipe(Grid, Recipe); + cRoot::Get()->GetCraftingRecipes()->GetRecipe(m_Owner, Grid, Recipe); } m_Slots[c_CraftOffset] = Recipe.GetResult(); - LOGD("You cooked: %i x %i !!", m_Slots[c_CraftOffset].m_ItemID, m_Slots[c_CraftOffset].m_ItemCount ); + LOGD("%s cooked: %i x %i !!", m_Owner->GetName().c_str(), m_Slots[c_CraftOffset].m_ItemID, m_Slots[c_CraftOffset].m_ItemCount ); SendWholeInventory( m_Owner->GetClientHandle() ); } SendSlot( 0 ); -- cgit v1.2.3