Vampiir ability problem

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Vampiir ability problem

Postby whria78 » Wed Dec 10, 2014 12:36 am

SVN3388 , Client 1.109
Vampiir ability problem.

As the screenshot below, all +0
e5965ae478908a9c3284dffc559c1b95_20141208151605_ifxekkwk.jpg
e5965ae478908a9c3284dffc559c1b95_20141208151605_ifxekkwk.jpg (45.95 KiB) Viewed 1148 times
User avatar
whria78
Contributor
 
Posts: 128
Joined: Fri Sep 21, 2007 11:27 pm

Re: Vampiir ability problem

Postby Leodagan » Wed Dec 10, 2014 6:17 am

I'll need to make more test around this, I'm pretty sure I had some work around for this kind of Ability work...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Vampiir ability problem

Postby whria78 » Sun Jan 11, 2015 3:10 pm

Is there any way to fix this problem?

vamviir has a lot of disadvantage.

I try to check the class VampiirAbility. but I have no clue to fix this problem
Code: Select all
public class VampiirStrength : VampiirAbility { public VampiirStrength(DBAbility dba, int level) : base(dba, level, eProperty.Strength) { } public override int GetAmountForLevel(int level) { //(+3 strength every level starting level 6), return level < 6 ? 0 : (level - 5) * 3; } }
User avatar
whria78
Contributor
 
Posts: 128
Joined: Fri Sep 21, 2007 11:27 pm

Re: Vampiir ability problem

Postby whria78 » Thu Jan 15, 2015 6:46 am

Fixed. ^^

Specialization.cs

Code: Select all
protected virtual List<Ability> GetAbilitiesForLiving(GameLiving living, int level) { // Select only Enabled and Max Level Abilities List<Ability> abs = SkillBase.GetSpecAbilityList(KeyName, living is GamePlayer ? ((GamePlayer)living).CharacterClass.ID : 0); // Get order of first appearing skills IOrderedEnumerable<Ability> order = abs.GroupBy(item => item.KeyName) .Select(ins => ins.OrderBy(it => it.SpecLevelRequirement).First()) .Where(item => item.SpecLevelRequirement <= level) .OrderBy(item => item.SpecLevelRequirement) .ThenBy(item => item.ID); // Get best of skills List<Ability> best = abs.Where(item => item.SpecLevelRequirement <= level) .GroupBy(item => item.KeyName) .Select(ins => ins.OrderByDescending(it => it.SpecLevelRequirement).First()).ToList(); List<Ability> results = new List<Ability>(); // make some kind of "Join" between the order of appearance and the best abilities. foreach (Ability ab in order) { for (int r = 0 ; r < best.Count ; r++) { if (best[r].KeyName == ab.KeyName) { // WHRIA if (best[r].KeyName.Contains("Vampiir Dex") || best[r].KeyName.Contains("Vampiir Qui") || best[r].KeyName.Contains("Vampiir Str") || best[r].KeyName.Contains("Vampiir Con") ) { best[r].Level = living.Level; } // END results.Add(best[r]); best.RemoveAt(r); break; } } } return results; }
User avatar
whria78
Contributor
 
Posts: 128
Joined: Fri Sep 21, 2007 11:27 pm

Re: Vampiir ability problem

Postby Leodagan » Thu Jan 15, 2015 1:03 pm

Great Whria, you targeted the trouble :)

The ability level of Vampiir buffs should be raising with character level and there are actually no mechanisms to do this ;)

But I cannot use your fix to apply on SVN Code Base :D

I made all these "Data-Driven" Specialization to get rid of most Hardcoded behavior, this is definitely a bad idea to get some hardcoded behavior back into the most "base-class" specialization :D

The best way to implement this would be to create a new "Subclass" of "Specialization", and move all Vampiir Ability to their own "Specialization" Tree implementing this new class :

Something Like "IncreasingAbilityCareerSpecialization" Subclassing "LiveCareerSpecialization", overriding the method that returns living abilities to enforce each level to the current player level ;)

An other way could be to link EACH levels of Vampiir Ability to the Vampiir Career (but that would bring about 180 new records in SpecXAbility...)

Which way would you choose ?
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Vampiir ability problem

Postby whria78 » Thu Jan 15, 2015 1:17 pm

I dont know much about the class structure of Gameserver.

As you said, to create a new subclass may be a good choice. :)

Vampiir problem came from the fact that some of the vampiir abilities are dependent on player's level , not ability's level.
User avatar
whria78
Contributor
 
Posts: 128
Joined: Fri Sep 21, 2007 11:27 pm

Re: Vampiir ability problem

Postby Leodagan » Thu Jan 15, 2015 3:51 pm

Yes that's a great way to describe it "Ability based on Living Level and not Skill Level", it may need some experiments around other GameServer Object (GameLiving => GamePlayer) but VampiirAbility could be updated to behave differently than other Abilities and match this description :)

I didn't check all the code around Ability granting to be sure it could work, but it should be possible to override "Ability.Activate()" or "Ability.OnLevelChange()" to enforce Ability.Level = living.Level for the specific VampiirAbility class :)

I need to check GameLiving code to see what happen if we change dynamically an Ability Level, and what methods are triggered if we try to replace a "Leveled" Ability with a "Level 0" Ability (in older releases this was totally discarded if New Ability.Level was less than current Ability.Level...)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest