sebastian-heinz / Arrowgene.DragonsDogmaOnline

Server for Dragons Dogma Online
GNU Affero General Public License v3.0
143 stars 45 forks source link

Core skills don't change properly when switching jobs #358

Open alborrajo opened 4 weeks ago

alborrajo commented 4 weeks ago

Describe the bug It's possible to use a core skill that hasn't been unlocked yet when switching to that job from another where the skill was unlocked

To Reproduce Steps to reproduce the behavior:

  1. Play as sorcerer, without the floating core skill unlocked. You won't be able to float
  2. Switch to Priest, unlock the floating core skill. You'll be able to float
  3. Switch back to Sorcerer, still without the floating core skill unlocked. You'll be able to float in spite of that
  4. This error will persist until relogging

Expected behavior You shouldn't be able to float until the core skill was unlocked

Additional context We may need to send an NTC after job change informing of the current job's core skills

pacampbell commented 4 weeks ago

I see some errors in public server logs which might be related (I edited some file paths for potentially sensitive data)?

2024-06-23 08:32:54 - Error - DdonSqlDb`3: System.NullReferenceException: Object reference not set to an instance of an object.
   at Arrowgene.Ddon.Database.Sql.Core.DdonSqlDb`3.AddParameter(TCom command, UInt32 commonId, JobId equippedToJob, Byte slotNo, Ability ability) in Arrowgene.Ddon.Database\Sql\Core\DdonSqlDbEquippedAbility.cs:line 137
   at Arrowgene.Ddon.Database.Sql.Core.DdonSqlDb`3.<>c__DisplayClass232_0.<InsertEquippedAbility>b__0(TCom command) in Arrowgene.Ddon.Database\Sql\Core\DdonSqlDbEquippedAbility.cs:line 48
   at Arrowgene.Ddon.Database.Sql.SqlDb`3.ExecuteNonQuery(TCon conn, String query, Action`1 nonQueryAction) in Arrowgene.Ddon.Database\Sql\SqlDb.cs:line 102
2024-06-23 08:32:54 - Error - DdonSqlDb`3: Exception during query: INSERT INTO "ddon_equipped_ability" ("character_common_id", "equipped_to_job", "job", "slot_no", "ability_id") VALUES (@character_common_id, @equipped_to_job, @job, @slot_no, @ability_id);
2024-06-23 08:32:54 - Error - DdonSqlDb`3: System.NullReferenceException: Object reference not set to an instance of an object.
   at Arrowgene.Ddon.Database.Sql.Core.DdonSqlDb`3.AddParameter(TCom command, UInt32 commonId, JobId equippedToJob, Byte slotNo, Ability ability) in Arrowgene.Ddon.Database\Sql\Core\DdonSqlDbEquippedAbility.cs:line 137
   at Arrowgene.Ddon.Database.Sql.Core.DdonSqlDb`3.<>c__DisplayClass232_0.<InsertEquippedAbility>b__0(TCom command) in Arrowgene.Ddon.Database\Sql\Core\DdonSqlDbEquippedAbility.cs:line 48
   at Arrowgene.Ddon.Database.Sql.SqlDb`3.ExecuteNonQuery(TCon conn, String query, Action`1 nonQueryAction) in Arrowgene.Ddon.Database\Sql\SqlDb.cs:line 102
2024-06-23 08:32:54 - Error - DdonSqlDb`3: Exception during query: INSERT INTO "ddon_equipped_ability" ("character_common_id", "equipped_to_job", "job", "slot_no", "ability_id") VALUES (@character_common_id, @equipped_to_job, @job, @slot_no, @ability_id);
2024-06-23 08:32:54 - Error - DdonSqlDb`3: System.NullReferenceException: Object reference not set to an instance of an object.
   at Arrowgene.Ddon.Database.Sql.Core.DdonSqlDb`3.AddParameter(TCom command, UInt32 commonId, JobId equippedToJob, Byte slotNo, Ability ability) in Arrowgene.Ddon.Database\Sql\Core\DdonSqlDbEquippedAbility.cs:line 137
   at Arrowgene.Ddon.Database.Sql.Core.DdonSqlDb`3.<>c__DisplayClass232_0.<InsertEquippedAbility>b__0(TCom command) inArrowgene.Ddon.Database\Sql\Core\DdonSqlDbEquippedAbility.cs:line 48
   at Arrowgene.Ddon.Database.Sql.SqlDb`3.ExecuteNonQuery(TCon conn, String query, Action`1 nonQueryAction) in Arrowgene.Ddon.Database\Sql\SqlDb.cs:line 102
alborrajo commented 4 weeks ago

Abilities are augments while this issue happens with core skills, so it's unlikely to be related