Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.AbstractCraftingSkill Class Reference

AbstractCraftingSkill is the base class for all crafting skill. More...

Inheritance diagram for DOL.GS.AbstractCraftingSkill:
DOL.GS.AbstractProfession DOL.GS.BasicCrafting DOL.GS.ClothWorking DOL.GS.GemCutting DOL.GS.HerbalCrafting DOL.GS.LeatherCrafting DOL.GS.MetalWorking DOL.GS.WoodWorking

List of all members.

Public Member Functions

virtual void CraftItem (GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList< DBCraftedXItem > rawMaterials)
 Called when player tries to begin crafting an item.
virtual bool CheckSecondCraftingSkillRequirement (GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList< DBCraftedXItem > rawMaterials)
 Check if the player has enough secondary crafting skill to build the item.
virtual bool CheckRawMaterials (GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList< DBCraftedXItem > rawMaterials)
 Verify that player has the needed materials to craft an item.
virtual void GainCraftingSkillPoints (GamePlayer player, DBCraftedItem recipe, IList< DBCraftedXItem > rawMaterials)
 Gain a point in the appropriate skills for a recipe and materials.
virtual bool RemoveUsedMaterials (GamePlayer player, DBCraftedItem recipe, IList< DBCraftedXItem > rawMaterials)
 Remove used raw material from player inventory.
virtual int CalculateChanceToMakeItem (GamePlayer player, DBCraftedItem recipe)
 Calculate chance to succes.
virtual int CalculateChanceToGainPoint (GamePlayer player, DBCraftedItem recipe)
 Calculate chance to gain point.
virtual int GetCraftingTime (GamePlayer player, DBCraftedItem recipe, IList< DBCraftedXItem > rawMaterials)
 Calculate crafting time.
virtual int GetSecondaryCraftingSkillMinimumLevel (DBCraftedItem recipe, ItemTemplate itemToCraft)
 Calculate the minumum needed secondary crafting skill level to make the item.
int GetItemCon (int crafterSkill, int itemCraftingLevel)
 get item con color compared to crafters skill

Public Attributes

const int CRAFT_DISTANCE = 512
 the maximum possible range within a player has to be to a forge , lathe ect to craft an item
const string PLAYER_CRAFTER = "PLAYER_CRAFTER"
 The player currently crafting.
const string RECIPE_BEING_CRAFTED = "RECIPE_BEING_CRAFTED"
 The recipe being crafted.
const string RECIPE_RAW_MATERIAL_LIST = "RECIPE_RAW_MATERIAL_LIST"
 The list of raw materials for the recipe beign crafted.

Protected Member Functions

virtual void StartCraftingTimerAndSetCallBackMethod (GamePlayer player, DBCraftedItem recipe, IList< DBCraftedXItem > rawMaterials, int craftingTime)
virtual void StopCraftingCurrentItem (GamePlayer player, ItemTemplate itemToCraft)
virtual bool CanPlayerStartToCraftItem (GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList< DBCraftedXItem > rawMaterials)
virtual int MakeItem (RegionTimer timer)
 Make the item when craft time is finished.
virtual bool CheckForTools (GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList< DBCraftedXItem > rawMaterials)
 Check if the player is near the needed tools (forge, lathe, etc)
virtual void BuildCraftedItem (GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft)
 Make the crafted item and add it to player's inventory.

Protected Attributes

const int subSkillCap = 1300

Static Protected Attributes

static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType)

Properties

virtual string CRAFTER_TITLE_PREFIX [get]
eCraftingSkill eSkill [get, set]
byte Icon [get, set]
string Name [get, set]

Detailed Description

AbstractCraftingSkill is the base class for all crafting skill.


Member Function Documentation

virtual void DOL.GS.AbstractCraftingSkill.BuildCraftedItem ( GamePlayer  player,
DBCraftedItem  recipe,
ItemTemplate  itemToCraft 
) [protected, virtual]

Make the crafted item and add it to player's inventory.

Parameters:
player
recipe
Returns:

Reimplemented in DOL.GS.SiegeCrafting.

virtual int DOL.GS.AbstractCraftingSkill.CalculateChanceToGainPoint ( GamePlayer  player,
DBCraftedItem  recipe 
) [virtual]

Calculate chance to gain point.

virtual int DOL.GS.AbstractCraftingSkill.CalculateChanceToMakeItem ( GamePlayer  player,
DBCraftedItem  recipe 
) [virtual]

Calculate chance to succes.

virtual bool DOL.GS.AbstractCraftingSkill.CheckForTools ( GamePlayer  player,
DBCraftedItem  recipe,
ItemTemplate  itemToCraft,
IList< DBCraftedXItem >  rawMaterials 
) [protected, virtual]

Check if the player is near the needed tools (forge, lathe, etc)

Parameters:
playerthe crafting player
recipethe recipe being used
itemToCraftthe item to make
rawMaterialsa list of raw materials needed to create this item
Returns:
true if required tools are found

Reimplemented in DOL.GS.AdvancedCraftingSkill, DOL.GS.Alchemy, DOL.GS.ArmorCrafting, DOL.GS.BasicCrafting, DOL.GS.Fletching, DOL.GS.MetalWorking, DOL.GS.SpellCrafting, DOL.GS.Tailoring, and DOL.GS.WeaponCrafting.

virtual bool DOL.GS.AbstractCraftingSkill.CheckRawMaterials ( GamePlayer  player,
DBCraftedItem  recipe,
ItemTemplate  itemToCraft,
IList< DBCraftedXItem >  rawMaterials 
) [virtual]

Verify that player has the needed materials to craft an item.

virtual bool DOL.GS.AbstractCraftingSkill.CheckSecondCraftingSkillRequirement ( GamePlayer  player,
DBCraftedItem  recipe,
ItemTemplate  itemToCraft,
IList< DBCraftedXItem >  rawMaterials 
) [virtual]

Check if the player has enough secondary crafting skill to build the item.

Parameters:
player
recipe
Returns:
virtual void DOL.GS.AbstractCraftingSkill.CraftItem ( GamePlayer  player,
DBCraftedItem  recipe,
ItemTemplate  itemToCraft,
IList< DBCraftedXItem >  rawMaterials 
) [virtual]

Called when player tries to begin crafting an item.

virtual void DOL.GS.AbstractCraftingSkill.GainCraftingSkillPoints ( GamePlayer  player,
DBCraftedItem  recipe,
IList< DBCraftedXItem >  rawMaterials 
) [virtual]
virtual int DOL.GS.AbstractCraftingSkill.GetCraftingTime ( GamePlayer  player,
DBCraftedItem  recipe,
IList< DBCraftedXItem >  rawMaterials 
) [virtual]

Calculate crafting time.

int DOL.GS.AbstractCraftingSkill.GetItemCon ( int  crafterSkill,
int  itemCraftingLevel 
)

get item con color compared to crafters skill

Parameters:
crafterSkill
itemCraftingLevel
Returns:
-3 grey, -2 green, -1 blue, 0 yellow, 1 orange, 2 red, 3 purple
virtual int DOL.GS.AbstractCraftingSkill.GetSecondaryCraftingSkillMinimumLevel ( DBCraftedItem  recipe,
ItemTemplate  itemToCraft 
) [virtual]

Calculate the minumum needed secondary crafting skill level to make the item.

Reimplemented in DOL.GS.ArmorCrafting, DOL.GS.Fletching, DOL.GS.Tailoring, and DOL.GS.WeaponCrafting.

virtual int DOL.GS.AbstractCraftingSkill.MakeItem ( RegionTimer  timer) [protected, virtual]

Make the item when craft time is finished.

virtual bool DOL.GS.AbstractCraftingSkill.RemoveUsedMaterials ( GamePlayer  player,
DBCraftedItem  recipe,
IList< DBCraftedXItem >  rawMaterials 
) [virtual]

Remove used raw material from player inventory.

Parameters:
player
recipe
Returns:

Member Data Documentation

the maximum possible range within a player has to be to a forge , lathe ect to craft an item

const string DOL.GS.AbstractCraftingSkill.PLAYER_CRAFTER = "PLAYER_CRAFTER"

The player currently crafting.

const string DOL.GS.AbstractCraftingSkill.RECIPE_BEING_CRAFTED = "RECIPE_BEING_CRAFTED"

The recipe being crafted.

const string DOL.GS.AbstractCraftingSkill.RECIPE_RAW_MATERIAL_LIST = "RECIPE_RAW_MATERIAL_LIST"

The list of raw materials for the recipe beign crafted.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events