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("Events service is not running")]
|
||||
[ReturnHints("Event added")]
|
||||
[ArgHints("inventoryType", "What type to watch for", "Text", "texture", new string[] { "texture","sound","callcard","landmark","clothing",
|
||||
"object","notecard","lsltext","lslbyte","animation","gesture","mesh" })]
|
||||
[ArgHints("inventoryType", "What type to watch for", "Text", "Texture", new string[] { "Texture","Sound","Callcard","Landmark","Clothing",
|
||||
"Object","Notecard","Lsltext","Lslbyte","Animation","Gesture","Mesh" })]
|
||||
[ArgHints("outputTarget", "Where to send the updates to", "SMART")]
|
||||
[CmdTypeSet()]
|
||||
public object SetInventoryUpdate(string inventoryType, string outputTarget)
|
||||
{
|
||||
if (master.EventsService.isRunning() == true)
|
||||
{
|
||||
inventoryType = inventoryType.ToLower().FirstCharToUpper();
|
||||
master.EventsService.AddInventoryEvent(inventoryType, outputTarget);
|
||||
return BasicReply("Ok");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ namespace SecondBotEvents.Services
|
|||
|
||||
public void InventoryUpdateEvent(Dictionary<string, string> detail)
|
||||
{
|
||||
detail["itemtype"] = detail["itemtype"].ToLower().FirstCharToUpper();
|
||||
if (InventoryEvents.ContainsKey(detail["itemtype"]) == true)
|
||||
{
|
||||
foreach(string A in InventoryEvents[detail["itemtype"]])
|
||||
|
|
|
|||
Loading…
Reference in a new issue