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;
|
Bot.LastStatusMessage = NewStatusMessage;
|
||||||
ConsoleLog.Status(Bot.LastStatusMessage);
|
ConsoleLog.Status(Bot.LastStatusMessage);
|
||||||
}
|
}
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(1000);
|
||||||
}
|
}
|
||||||
Bot.GetClient.Network.Logout();
|
Bot.GetClient.Network.Logout();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace BetterSecondBot
|
||||||
last_cnc_status = NewStatusMessage;
|
last_cnc_status = NewStatusMessage;
|
||||||
ConsoleLog.Status(last_cnc_status);
|
ConsoleLog.Status(last_cnc_status);
|
||||||
}
|
}
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(1000);
|
||||||
}
|
}
|
||||||
ConsoleLog.Status("Shutting down now");
|
ConsoleLog.Status("Shutting down now");
|
||||||
if (my_http_server.GetBot != null)
|
if (my_http_server.GetBot != null)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace BSB.bottypes
|
||||||
{
|
{
|
||||||
if (delay_appearence_update == 0)
|
if (delay_appearence_update == 0)
|
||||||
{
|
{
|
||||||
delay_appearence_update = helpers.UnixTimeNow() + 5;
|
delay_appearence_update = helpers.UnixTimeNow();
|
||||||
}
|
}
|
||||||
else if (delay_appearence_update > 0)
|
else if (delay_appearence_update > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -34,7 +34,7 @@ namespace BSB.bottypes
|
||||||
delay_appearence_update = -1;
|
delay_appearence_update = -1;
|
||||||
if(Client.Appearance.RequestSetAppearance() == "retry")
|
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()
|
protected override void AfterBotLoginHandler()
|
||||||
|
|
|
||||||
|
|
@ -459,29 +459,43 @@ namespace OpenMetaverse
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
KeyValuePair<string,List < InventoryBase >> reply = Client.Inventory.FolderContents_replyed(GetCOF().UUID, Client.Self.AgentID, true, true, InventorySortOrder.ByDate, 40 * 1000, false);
|
if (Client != null)
|
||||||
if (reply.Key == "ok")
|
|
||||||
{
|
{
|
||||||
List<InventoryBase> contents = reply.Value;
|
if (Client.Self != null)
|
||||||
List<InventoryItem> wareables = new List<InventoryItem>();
|
|
||||||
if (contents != 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
|
catch
|
||||||
{
|
{
|
||||||
return "fail";
|
|
||||||
}
|
}
|
||||||
|
return "retry";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue