move the inventory update event trigger to a better place
This commit is contained in:
parent
5fc740daa6
commit
684b305af5
1 changed files with 6 additions and 4 deletions
|
|
@ -165,11 +165,17 @@ namespace SecondBotEvents.Services
|
|||
|
||||
protected void BotInventoryAdd(object o, InventoryObjectAddedEventArgs e)
|
||||
{
|
||||
InventoryItem F = (InventoryItem)e.Obj;
|
||||
Dictionary<string, string> details = new Dictionary<string, string>
|
||||
{
|
||||
{ "itemname", e.Obj.Name },
|
||||
{ "itemuuid", e.Obj.UUID.ToString() },
|
||||
{ "itemtype", F.AssetType.ToString() },
|
||||
};
|
||||
if (master.EventsService.isRunning() == true)
|
||||
{
|
||||
master.EventsService.InventoryUpdateEvent(details);
|
||||
}
|
||||
JsonOuputCleaner(details, "InventoryAdd");
|
||||
}
|
||||
|
||||
|
|
@ -198,10 +204,6 @@ namespace SecondBotEvents.Services
|
|||
details["itemname"] = itm.Name;
|
||||
}
|
||||
}
|
||||
if(master.EventsService.isRunning() == true)
|
||||
{
|
||||
master.EventsService.InventoryUpdateEvent(details);
|
||||
}
|
||||
JsonOuputCleaner(details, "InventoryOffer");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue