fix issue where inventory type was case sensitive.
This commit is contained in:
parent
e51dcfc894
commit
25ac5378e1
2 changed files with 4 additions and 2 deletions
|
|
@ -20,14 +20,15 @@ namespace SecondBotEvents.Commands
|
||||||
[ReturnHintsFailure("No action")]
|
[ReturnHintsFailure("No action")]
|
||||||
[ReturnHintsFailure("Events service is not running")]
|
[ReturnHintsFailure("Events service is not running")]
|
||||||
[ReturnHints("Event added")]
|
[ReturnHints("Event added")]
|
||||||
[ArgHints("inventoryType", "What type to watch for", "Text", "texture", new string[] { "texture","sound","callcard","landmark","clothing",
|
[ArgHints("inventoryType", "What type to watch for", "Text", "Texture", new string[] { "Texture","Sound","Callcard","Landmark","Clothing",
|
||||||
"object","notecard","lsltext","lslbyte","animation","gesture","mesh" })]
|
"Object","Notecard","Lsltext","Lslbyte","Animation","Gesture","Mesh" })]
|
||||||
[ArgHints("outputTarget", "Where to send the updates to", "SMART")]
|
[ArgHints("outputTarget", "Where to send the updates to", "SMART")]
|
||||||
[CmdTypeSet()]
|
[CmdTypeSet()]
|
||||||
public object SetInventoryUpdate(string inventoryType, string outputTarget)
|
public object SetInventoryUpdate(string inventoryType, string outputTarget)
|
||||||
{
|
{
|
||||||
if (master.EventsService.isRunning() == true)
|
if (master.EventsService.isRunning() == true)
|
||||||
{
|
{
|
||||||
|
inventoryType = inventoryType.ToLower().FirstCharToUpper();
|
||||||
master.EventsService.AddInventoryEvent(inventoryType, outputTarget);
|
master.EventsService.AddInventoryEvent(inventoryType, outputTarget);
|
||||||
return BasicReply("Ok");
|
return BasicReply("Ok");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public void InventoryUpdateEvent(Dictionary<string, string> detail)
|
public void InventoryUpdateEvent(Dictionary<string, string> detail)
|
||||||
{
|
{
|
||||||
|
detail["itemtype"] = detail["itemtype"].ToLower().FirstCharToUpper();
|
||||||
if (InventoryEvents.ContainsKey(detail["itemtype"]) == true)
|
if (InventoryEvents.ContainsKey(detail["itemtype"]) == true)
|
||||||
{
|
{
|
||||||
foreach(string A in InventoryEvents[detail["itemtype"]])
|
foreach(string A in InventoryEvents[detail["itemtype"]])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue