Change EconomyDataRequest signature to use an IClientAPI rather than UUID. This is needed because recent LL viewer codebases call this earlier in login when the client is not yet established in the sim and can't be found by UUID.

Sending the reply requires having the IClientAPI.
avinationmerge
Melanie 2013-04-25 21:35:18 +01:00
parent 2093d87e20
commit 40036ca05f
3 changed files with 8 additions and 13 deletions

View File

@ -320,7 +320,7 @@ namespace OpenSim.Framework
public delegate void ObjectPermissions(
IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set);
public delegate void EconomyDataRequest(UUID agentID);
public delegate void EconomyDataRequest(IClientAPI client);
public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);

View File

@ -9860,7 +9860,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest;
if (handlerEconomoyDataRequest != null)
{
handlerEconomoyDataRequest(AgentId);
handlerEconomoyDataRequest(this);
}
return true;
}

View File

@ -688,19 +688,14 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
/// Event called Economy Data Request handler.
/// </summary>
/// <param name="agentId"></param>
public void EconomyDataRequestHandler(UUID agentId)
public void EconomyDataRequestHandler(IClientAPI user)
{
IClientAPI user = LocateClientObject(agentId);
Scene s = LocateSceneClientIn(user.AgentId);
if (user != null)
{
Scene s = LocateSceneClientIn(user.AgentId);
user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate,
PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor,
PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload,
TeleportMinPrice, TeleportPriceExponent);
}
user.SendEconomyData(EnergyEfficiency, s.RegionInfo.ObjectCapacity, ObjectCount, PriceEnergyUnit, PriceGroupCreate,
PriceObjectClaim, PriceObjectRent, PriceObjectScaleFactor, PriceParcelClaim, PriceParcelClaimFactor,
PriceParcelRent, PricePublicObjectDecay, PricePublicObjectDelete, PriceRentLight, PriceUpload,
TeleportMinPrice, TeleportPriceExponent);
}
private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e)