Help Heroic Level OpenNos Error

03/27/2017 16:54 teddy45100#1
Hello,

I have a problem for the heroic level...

I put the code of prosecutor in:
OpenNos. GameObject, Character.cs, GenerateXp

That gives:

Quote:
private void GenerateXp(MapMonster monster, bool isMonsterOwner)
{
if (Session.Character.Level = 90)
{
Session.Character.HeroLevel = 1;
}

NpcMonster monsterinfo = monster.Monster;
if (!DAOFactory.PenaltyLogDAO.LoadByAccount(AccountId ).Any(s => s.Penalty == PenaltyType.BlockExp && s.DateEnd > DateTime.Now))
{

The problem for the line yew (Session.Character.Level = 90)
Impossible to convert implicitly ' byte ' en ' bool '

And when I create a character, I up level 2 and I have level 1 heroic...





Help me svp
03/28/2017 10:42 Liihes#2
Quote:
if (Session.Character.Level = 90)
In c# the Operator '=' stores the value of its right-hand Operand to the storage Location of ist left-hand Operand. Try using '==' instead of '='.
'==' checks if the right-hand Operand has the same value like the left-hand Operand, and if, it returns true. This should fix this problem.

Take a look at (I've choosen French language for u):
[Only registered and activated users can see links. Click Here To Register...] (=)
[Only registered and activated users can see links. Click Here To Register...] (==)
03/29/2017 07:47 Singleplayer™#3
private void GenerateXp(MapMonster monster, bool isMonsterOwner)
{
if (Session.Character.Level >= 90)
{
if (Session.Character.HeroLevel <=55)
{
Session.Character.HeroLevel++;
}
}
03/31/2017 18:04 teddy45100#4
Thank you, problem solved