fix: achievements crashes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Monster.h"
|
||||
|
||||
#include "Item.h"
|
||||
#include "GenericStats.h"
|
||||
|
||||
GenericStats *GenericStats::instance = nullptr;
|
||||
@@ -835,7 +836,10 @@ byteArray GenericStats::param_itemsSmelted(int id, int aux, int count)
|
||||
|
||||
byteArray GenericStats::param_itemsUsed(shared_ptr<Player> plr, shared_ptr<ItemInstance> itm)
|
||||
{
|
||||
if ( (plr != nullptr) && (itm != nullptr) ) return instance->getParam_itemsUsed(plr, itm);
|
||||
if ((plr != nullptr) && (itm != nullptr)) {
|
||||
if (itm->id == Item::porkChop_cooked_Id) return instance->param_eatPorkChop();
|
||||
return instance->getParam_itemsUsed(plr, itm);
|
||||
}
|
||||
else return instance->getParam_noArgs();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user