Refuse a talent unless it outranks the held one with the same sub type
Test on dev (character Moo): with Enhanced Strength held, the client shaded an Increased Strength runestone red and showed its refusal popup, but the server applied it as a downgrade. The client's 0x4768D0 (ArcRuneTemplate vtable slot 0x1E8) blocks a talent when a held talent with the same rune_sub_type has an equal or higher rank, rank 0 included. AddRune's rank-0 replace branch is never reached past that check. Value changes vs the previous commit: - Rank-0 stat runes are refused while any rank of their chain is held (same as the old DB type 4 block) - Rank-0 talents in the same group (e.g. Bloodline sub-race runestones) are refused instead of replacing each other Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0536aea27a
commit
26aa8de86c
1 file changed
+3
-2
@@ -126,7 +126,8 @@ public class ApplyRuneMsg extends ClientNetMsg {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Client 0x4695D0: a talent replaces a held one with the same sub type when its rank is 0 or higher
|
||||
// Client 0x4768D0 refuses a talent unless its rank beats the held one with the same sub type (rank 0 included);
|
||||
// AddRune (0x4695D0) then replaces the held talent
|
||||
CharacterRune replacedRune = null;
|
||||
|
||||
if (rb.getRuneType() == mbEnums.RuneType.TALENT) {
|
||||
@@ -145,7 +146,7 @@ public class ApplyRuneMsg extends ClientNetMsg {
|
||||
}
|
||||
|
||||
if (replacedRune != null) {
|
||||
if (rb.getRank() != 0 && rb.getRank() <= replacedRune.getRuneBase().getRank())
|
||||
if (rb.getRank() <= replacedRune.getRuneBase().getRank())
|
||||
return false;
|
||||
} else if (talentCount >= MAX_TALENTS)
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user