makes the multi link support update faster and does some basic checks
This commit is contained in:
parent
8f5446f89a
commit
7302a732c1
4 changed files with 30 additions and 16 deletions
|
|
@ -36,7 +36,7 @@ namespace BetterSecondBot
|
|||
Bot.LastStatusMessage = NewStatusMessage;
|
||||
ConsoleLog.Status(Bot.LastStatusMessage);
|
||||
}
|
||||
Thread.Sleep(5000);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
Bot.GetClient.Network.Logout();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace BetterSecondBot
|
|||
last_cnc_status = NewStatusMessage;
|
||||
ConsoleLog.Status(last_cnc_status);
|
||||
}
|
||||
Thread.Sleep(5000);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
ConsoleLog.Status("Shutting down now");
|
||||
if (my_http_server.GetBot != null)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace BSB.bottypes
|
|||
{
|
||||
if (delay_appearence_update == 0)
|
||||
{
|
||||
delay_appearence_update = helpers.UnixTimeNow() + 5;
|
||||
delay_appearence_update = helpers.UnixTimeNow();
|
||||
}
|
||||
else if (delay_appearence_update > 0)
|
||||
{
|
||||
|
|
@ -34,7 +34,7 @@ namespace BSB.bottypes
|
|||
delay_appearence_update = -1;
|
||||
if(Client.Appearance.RequestSetAppearance() == "retry")
|
||||
{
|
||||
delay_appearence_update = helpers.UnixTimeNow() + 5;
|
||||
delay_appearence_update = helpers.UnixTimeNow() + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ namespace BSB.bottypes
|
|||
}
|
||||
}
|
||||
}
|
||||
return "Rendering: "+ delay_appearence_update.ToString()+" "+base.GetStatus();
|
||||
return base.GetStatus();
|
||||
}
|
||||
|
||||
protected override void AfterBotLoginHandler()
|
||||
|
|
|
|||
|
|
@ -459,29 +459,43 @@ namespace OpenMetaverse
|
|||
{
|
||||
try
|
||||
{
|
||||
KeyValuePair<string,List < InventoryBase >> reply = Client.Inventory.FolderContents_replyed(GetCOF().UUID, Client.Self.AgentID, true, true, InventorySortOrder.ByDate, 40 * 1000, false);
|
||||
if (reply.Key == "ok")
|
||||
if (Client != null)
|
||||
{
|
||||
List<InventoryBase> contents = reply.Value;
|
||||
List<InventoryItem> wareables = new List<InventoryItem>();
|
||||
if (contents != null)
|
||||
if (Client.Self != null)
|
||||
{
|
||||
foreach (InventoryBase item in contents)
|
||||
if (Client.Self.AgentID != null)
|
||||
{
|
||||
if ((item is InventoryWearable) || (item is InventoryObject))
|
||||
InventoryFolder cof = GetCOF();
|
||||
if (cof != null)
|
||||
{
|
||||
wareables.Add((InventoryItem)item);
|
||||
KeyValuePair<string, List<InventoryBase>> reply = Client.Inventory.FolderContents_replyed(cof.UUID, Client.Self.AgentID, true, true, InventorySortOrder.ByDate, 40 * 1000, false);
|
||||
if (reply.Key == "ok")
|
||||
{
|
||||
List<InventoryBase> contents = reply.Value;
|
||||
List<InventoryItem> wareables = new List<InventoryItem>();
|
||||
if (contents != null)
|
||||
{
|
||||
foreach (InventoryBase item in contents)
|
||||
{
|
||||
if ((item is InventoryWearable) || (item is InventoryObject))
|
||||
{
|
||||
wareables.Add((InventoryItem)item);
|
||||
}
|
||||
}
|
||||
Client.Appearance.ReplaceOutfit(wareables, false);
|
||||
}
|
||||
}
|
||||
return reply.Key;
|
||||
}
|
||||
}
|
||||
Client.Appearance.ReplaceOutfit(wareables, false);
|
||||
}
|
||||
}
|
||||
return reply.Key;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return "fail";
|
||||
|
||||
}
|
||||
return "retry";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue