Page 1 of 1

Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 7:56 am
by Tyriada
Hello,

With DOL last version, we get warnings when we try to log on a class with shield ability :
Code: Select all
Parsing ability display name: keyname='Shield' '1|Shield Ability : Small Shield;2|Shield Ability : Medium Shields;3|Shield Ability : Large Shields', No Value for Level 0
When GetAbility is loading this ability : (SkillBase.cs l.2382)
Code: Select all
Ability dba = GetNewAbilityInstance(dbab); dba.Level = level; return dba;
...the GetNewAbilityInstance is fired, that create a new Ability() which launch UpdateCurrentName() at the end of its constructor.
This last function need the Level to display the good name (especially Shield ability). But the level is not set at this moment.

At the moment, we use BaseClasses. (For information)

Anyone had the same warning ? Did you know about this ? A fix planified ?

Thank you.

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 10:00 am
by DrStrange
Yep, get the same on mine and have not got around to figuring out what it is. Think it maybe the CL crap however I don't really know.

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 10:10 am
by Leodagan
It's just a warning message displaying there is a missing Ability Name for Shield Ability Level 0 (which is an Ability that is never used at Level 0)

It can be filtered out with Log4.NET config I think ;)

No "Fix" is planned (nothing is broken), but there could be some change in Logging behavior for later revisions...

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 5:50 pm
by Tyriada
Ok, thank you :)

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 7:13 pm
by Leodagan
you can update your database "Shield" Ability with
Code: Select all
0|Shield Ability : none;1|Shield Ability : Small Shield;2|Shield Ability : Medium Shields;3|Shield Ability : Large Shields

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 7:51 pm
by Stephen
Yes, it's just a warnings for the zero value.
Code: Select all
/// <summary> /// the size of a shield /// </summary> public abstract class ShieldLevel { public const int Small = 1; public const int Medium = 2; public const int Large = 3; }
You should use this
Code: Select all
player.AddAbility(SkillBase.GetAbility(Abilities.Shield, ShieldLevel.Large));
It might be a good thing to use that in the playerclasses with the method OnLevelUp

Like for the midgard warrior abilities..
Code: Select all
/// <summary> /// Update all skills and add new for current level /// </summary> /// <param name="player"></param> public override void OnLevelUp(GamePlayer player, int previousLevel) { base.OnLevelUp(player, previousLevel); player.AddAbility(SkillBase.GetAbility(Abilities.Weapon_Thrown)); player.AddAbility(SkillBase.GetAbility(Abilities.Shield, ShieldLevel.Medium)); player.AddSpecialization(SkillBase.GetSpecialization(Specs.Shields)); player.AddSpecialization(SkillBase.GetSpecialization(Specs.Thrown_Weapons)); if(player.Level >= 5) { player.AddAbility(SkillBase.GetAbility(Abilities.TauntingShout)); } if (player.Level >= 7) { player.AddAbility(SkillBase.GetAbility(Abilities.Protect, 1)); } if (player.Level >= 10) { player.AddAbility(SkillBase.GetAbility(Abilities.MidArmor, ArmorLevel.Chain)); player.AddAbility(SkillBase.GetAbility(Abilities.Shield, ShieldLevel.Large)); } if (player.Level >= 12) { player.AddAbility(SkillBase.GetAbility(Abilities.Intercept)); } if (player.Level >= 13) { player.AddAbility(SkillBase.GetAbility(Abilities.Protect, 2)); } if (player.Level >= 15) { player.AddAbility(SkillBase.GetAbility(Abilities.MetalGuard)); player.AddAbility(SkillBase.GetAbility(Abilities.Evade, 1)); player.AddAbility(SkillBase.GetAbility(Abilities.Tireless)); } if (player.Level >= 18) { player.AddAbility(SkillBase.GetAbility(Abilities.Protect, 3)); } if (player.Level >= 30) { player.AddAbility(SkillBase.GetAbility(Abilities.BolsteringRoar)); } if (player.Level >= 35) { player.AddAbility(SkillBase.GetAbility(Abilities.Stoicism)); player.AddAbility(SkillBase.GetAbility(Abilities.ClimbSpikes)); } if (player.Level >= 40) { player.AddAbility(SkillBase.GetAbility(Abilities.Rampage)); } if (player.Level >= 41) { player.AddAbility(SkillBase.GetAbility(Abilities.MemoriesOfWar)); player.AddAbility(SkillBase.GetAbility(Abilities.ScarsOfBattle)); } if (player.Level >= 50) { player.AddAbility(SkillBase.GetAbility(Abilities.Fury)); } }
This should works for the new characters ;) But i don't know in the latest svn revision some of those are handled somewhere else

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 9:05 pm
by Leodagan
This is completely outdated code :D

These are "hardcoded" characterclass spec/skill checks, with Data Career it's all handled in database ;)

And I still "insist" there are no BUGS, just some warning because if you add manually "Shield" Ability at Level 0 to some player there is no text to be displayed ;)

Re: Warnings : Shield ability level name display

PostPosted: Tue Aug 04, 2015 9:37 pm
by Stephen
This is completely outdated code :D

These are "hardcoded" characterclass spec/skill checks, with Data Career it's all handled in database ;)

And I still "insist" there are no BUGS, just some warning because if you add manually "Shield" Ability at Level 0 to some player there is no text to be displayed ;)
eheh thank you ;) I think i'm outdated too ;> it looks like i'll have to check the new revisions ;D