update lcemp networking

This commit is contained in:
2026-08-14 07:02:50 +03:00
parent 125819419f
commit 6853eab85f
51 changed files with 629 additions and 183 deletions
+8 -1
View File
@@ -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);