Class: Trader

Trader()

new Trader()

Source:

Members

Schema

Source:

goods

Source:

index

Source:

index

Source:

index

Source:

index

Source:

index

Source:

index

Source:

index

Source:

markets

Source:

markets

Source:

markets

Source:

markets

Source:

markets

Source:

markets

Source:

markets

Source:

markets[undefined]

Source:

Methods

AddResources()

Source:

CalculateGain()

Source:

CanTrade()

Source:

GenerateResources()

Source:

GetFirstMarket()

Source:

GetGarrisonGainMultiplier()

Source:

GetGoods()

Source:

GetRange()

Source:

GetSecondMarket()

Source:

GetTraderGainMultiplier()

Source:

HasBothMarkets()

Source:

HasMarket()

Returns true if the trader has the given market (can be either a market or a mirage)
Source:

Init()

Source:

OnGarrisonedUnitsChanged()

Source:

PerformTrade()

Source:

RemoveMarket()

Remove a market when this trader can no longer trade with it
Source:

RemoveTargetMarket(id) → {boolean}

Remove market from trade route iff only first market is set.
Parameters:
Name Type Description
id number of market to be removed.
Source:
Returns:
true iff removal was successful.
Type
boolean

SetTargetMarket()

Source:

StopTrading()

Source:

SwitchMarket()

Switch between a market and its mirage according to visibility
Source: