Add default head icons for the player

This commit is contained in:
Melledy
2025-11-19 03:45:54 -08:00
parent 207a1e25d4
commit c97300f98a
2 changed files with 8 additions and 4 deletions

View File

@@ -68,6 +68,10 @@ public class Inventory extends PlayerManager implements GameDatabaseObject {
this.shopBuyCount = new ItemParamMap(); this.shopBuyCount = new ItemParamMap();
this.mallBuyCount = new String2IntMap(); this.mallBuyCount = new String2IntMap();
// Add player heads
this.getHeadIcons().add(101);
this.getHeadIcons().add(102);
// Add titles directly // Add titles directly
this.getTitles().add(player.getTitlePrefix()); this.getTitles().add(player.getTitlePrefix());
this.getTitles().add(player.getTitleSuffix()); this.getTitles().add(player.getTitleSuffix());
@@ -164,16 +168,16 @@ public class Inventory extends PlayerManager implements GameDatabaseObject {
// Add character skins // Add character skins
for (var character : getPlayer().getCharacters().getCharacterCollection()) { for (var character : getPlayer().getCharacters().getCharacterCollection()) {
// Add default skin id // Add default head icon id
icons.add(character.getData().getDefaultSkinId()); icons.add(character.getData().getDefaultSkinId());
// Add advance skin // Add advance head icon
if (character.getAdvance() >= character.getData().getAdvanceSkinUnlockLevel()) { if (character.getAdvance() >= character.getData().getAdvanceSkinUnlockLevel()) {
icons.add(character.getData().getAdvanceSkinId()); icons.add(character.getData().getAdvanceSkinId());
} }
} }
// Finally, add extra skins // Finally, add extra head icons
icons.addAll(this.getHeadIcons()); icons.addAll(this.getHeadIcons());
// Complete and return // Complete and return

View File

@@ -135,7 +135,7 @@ public class Player implements GameDatabaseObject {
this.name = name; this.name = name;
this.signature = ""; this.signature = "";
this.gender = gender; this.gender = gender;
this.headIcon = 101; this.headIcon = gender ? 101 : 102;
this.skinId = 10301; this.skinId = 10301;
this.titlePrefix = 1; this.titlePrefix = 1;
this.titleSuffix = 2; this.titleSuffix = 2;