RetrieveCampaignDBObject(object, string, location, object)

Get a campaign object stored on a player in the default database for this module.

object RetrieveCampaignDBObject(
    object oPC,
    string sVarname,
    location lLoc,
    object oInventory = OBJECT_INVALID
);

Parameters

oPC

Player this variable is attached to.

sVarname

Name of the variable to retrieve.

lLoc

Location to create the object at.

oInventory

Owner to attempt to create the object within. (Default: OBJECT_INVALID)


Description

Get a campaign object stored on a player in the default database for this module.

NOTE: This does not get a reference, it creates the actual object, either in oPC's inventory if possible or in the specified location if not. It should NOT be used like SetLocalObject and GetLocalObject.

If you pass in a valid object for oInventory, the object will be retrieved in that object's inventory instead of oPC's.

You should use DeleteCampaignDBVariable to remove the object once you are done retrieving it, or else the database will bloat.



Remarks

This is a wrapper for RetrieveCampaignObject. It sends GetCampaignDBName as the first parameter.

If oInventory is not a valid object (OBJECT_INVALID), then oPC is used, instead of oInventory, as the 4th parameter in the call to RetrieveCampaignObject.


Requirements

#include "x0_i0_campaign"


Version

???

See Also

functions:  DeleteCampaignDBVariable | RetrieveCampaignObject | StoreCampaignDBObject
categories:  Database Functions


author: Baragg, editor: Mistress