Rename Bot.BotManager to Manager
parent
e9f2a9bddb
commit
9ae0641871
|
@ -49,8 +49,15 @@ namespace pCampBot
|
|||
|
||||
public delegate void AnEvent(Bot callbot, EventType someevent); // event delegate for bot events
|
||||
|
||||
public BotManager BotManager { get; private set; }
|
||||
private IConfig startupConfig; // bot config, passed from BotManager
|
||||
/// <summary>
|
||||
/// Bot manager.
|
||||
/// </summary>
|
||||
public BotManager Manager { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Bot config, passed from BotManager.
|
||||
/// </summary>
|
||||
private IConfig startupConfig;
|
||||
|
||||
/// <summary>
|
||||
/// Behaviours implemented by this bot.
|
||||
|
@ -132,7 +139,7 @@ namespace pCampBot
|
|||
Password = password;
|
||||
LoginUri = loginUri;
|
||||
|
||||
BotManager = bm;
|
||||
Manager = bm;
|
||||
startupConfig = bm.Config;
|
||||
readconfig();
|
||||
|
||||
|
@ -222,7 +229,7 @@ namespace pCampBot
|
|||
Client.Self.Jump(true);
|
||||
|
||||
// Extract nearby region information.
|
||||
Client.Grid.GridRegion += BotManager.Grid_GridRegion;
|
||||
Client.Grid.GridRegion += Manager.Grid_GridRegion;
|
||||
uint xUint, yUint;
|
||||
Utils.LongToUInts(Client.Network.CurrentSim.Handle, out xUint, out yUint);
|
||||
ushort minX, minY, maxX, maxY;
|
||||
|
@ -484,13 +491,13 @@ namespace pCampBot
|
|||
|
||||
private void GetTexture(UUID textureID)
|
||||
{
|
||||
lock (BotManager.AssetsReceived)
|
||||
lock (Manager.AssetsReceived)
|
||||
{
|
||||
// Don't request assets more than once.
|
||||
if (BotManager.AssetsReceived.ContainsKey(textureID))
|
||||
if (Manager.AssetsReceived.ContainsKey(textureID))
|
||||
return;
|
||||
|
||||
BotManager.AssetsReceived[textureID] = false;
|
||||
Manager.AssetsReceived[textureID] = false;
|
||||
Client.Assets.RequestImage(textureID, ImageType.Normal, Asset_TextureCallback_Texture);
|
||||
}
|
||||
}
|
||||
|
@ -502,8 +509,8 @@ namespace pCampBot
|
|||
|
||||
public void Asset_ReceivedCallback(AssetDownload transfer, Asset asset)
|
||||
{
|
||||
lock (BotManager.AssetsReceived)
|
||||
BotManager.AssetsReceived[asset.AssetID] = true;
|
||||
lock (Manager.AssetsReceived)
|
||||
Manager.AssetsReceived[asset.AssetID] = true;
|
||||
|
||||
// if (wear == "save")
|
||||
// {
|
||||
|
|
Loading…
Reference in New Issue