forked from cafeberry/cafeberry
update lcemp networking
This commit is contained in:
@@ -1577,7 +1577,10 @@ bool PlayerConnection::isDisconnected()
|
||||
void PlayerConnection::handleDebugOptions(shared_ptr<DebugOptionsPacket> packet)
|
||||
{
|
||||
//Player player = dynamic_pointer_cast<Player>( player->shared_from_this() );
|
||||
player->SetDebugOptions(packet->m_uiVal);
|
||||
if(app.DebugSettingsOn())
|
||||
{
|
||||
player->SetDebugOptions(packet->m_uiVal);
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet)
|
||||
@@ -1587,6 +1590,10 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet)
|
||||
if(iRecipe == -1)
|
||||
return;
|
||||
|
||||
int recipeCount = (int)Recipes::getInstance()->getRecipies()->size();
|
||||
if(iRecipe < 0 || iRecipe >= recipeCount)
|
||||
return;
|
||||
|
||||
Recipy::INGREDIENTS_REQUIRED *pRecipeIngredientsRequired=Recipes::getInstance()->getRecipeIngredientsArray();
|
||||
shared_ptr<ItemInstance> pTempItemInst=pRecipeIngredientsRequired[iRecipe].pRecipy->assemble(nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user