Цитата(Hubble @ 10.10.2015, 16:26)
Каким способом это сделать ?
Цитата
1. I have included a few examples, a normal kryss, a normal bracelet, a normal cloak, and two artifacts (Aegis and Inquisitors Resolution). These are commented and will get you started on creating your own levelable versions of items. With the new format, basically you would create levelable items using the exact same code as any other item, only referring to BaseLevelXXX instead of BaseXXX (where XXX is the type of item, like Armor, Sword, etc)
****NOTE**** you can still use your old versions of levelable items with a few required modifications, please read the attached upgrade instructions for upgrading older version items
2. Now that you have created levelable items, you need to make the following changes to BaseCreature.cs to let these items gain experience...
Open up your basecreature.cs and find the following in the OnDamage method
Code:
if ( speechType != null && !willKill )
speechType.OnDamage( this, amount );
Add this immediately after...
Code:
if ( !Summoned && willKill )
LevelItemManager.CheckItems( from, this );
3. Now you can modify the definable parameters of the leveling system. To do this,
* Open LevelableItems\New\LevelableItemSettings.cs and modify the following code to your preference...
Code:
//These are the definable features for item leveling...
public static readonly int DefaultMaxLevel = 10; //Default Max level for items.
public static readonly int MaxLevelsCap = 100; //Number of total levels items can go up to when maxed.
public static readonly bool EnableExpCap = true; //true = Cap experience per level. false = no cap.
public static readonly bool DisplayExpProp = true; //true = Display experience on item onmouseover/click.
//These are the definable features for spending points...
public static readonly int PointsPerLevel = 5; //How many spending points an item gets per level.
public static readonly bool DoubleArtifactCost = true; //true = Artifact attributes will cost double points.
//These are the definable features for Level Increasing...
public const bool BlacksmithOnly = true; //true = May only be used by char with blacksmithy.
public const double BlacksmithSkillRequired = 100; // Amount of Blacksmith skill required to validate deeds (if BlacksmithOnly is true).
public const bool RewardBlacksmith = true; //true = give the blacksmith reward for validating (if BlacksmithOnly is true).
public const int BlacksmithRewardAmt = 500; // Amount to pay blacksmith if they validate deed for another player (if BlacksmithOnly and RewardBlacksmith are true).
Обратите внимание на пункты 2 и 3.