Manual/PricePlugin

Registering a custom price plugin to BastionLoot.

 

Create a minimal addon

in the .toc add a

## Dependencies: BastionLoot

line so it loads after BastionLoot.

 

Define a GetPrice function

In the .lua file add a GetPrice function

function signature

local function GetPrice(item, progress) -- progress is optional

  -- parse item (can be link, itemstring or itemid) and calculate your gear points

  -- can be dynamic calculation or simply a table reference with static prices

  -- return the price (gearpoints)

  return price, tier, price2 -- tier, price2 are optional

end

 

Register your pricesystem with BastionLoot

in the same .lua file 

  • give your pricesystem a name
  • get a reference to BastionLoot
  • register your pricesystem as below

 

local name_version = "MyPricesv1"

local system = {func=GetPrice, flavor="_wrath"} -- flavor can be "_classic", "_bcc" or "_wrath"

BastionLoot:RegisterPriceSystem(name_version, system)

 

Distribute

Package and give your plugin addon to your guild members (or at least officers/loot admins)

to be installed along-side BastionLoot. 

 

Select your pricesystem in BastionLoot

Assuming everything went well your new pricesystem will appear as an admin option inside BastionLoot.

Select it and it will be shared to the other guild members.

Optionally add it to the guildinformation page in-game as {MyPricesv1}

Admin Reference