Class MapleFamilyCharacter

java.lang.Object
handling.world.family.MapleFamilyCharacter
All Implemented Interfaces:
Serializable

public class MapleFamilyCharacter extends Object implements Serializable
家族成員的輕量資料快照,同時支援線上(從 MapleCharacter 構建)與離線(從資料庫構建)兩種來源。

持有成員的基本資訊(等級、職業、頻道、在線狀態)以及家族樹狀關係欄位:

  • seniorid:直屬前輩的角色 ID(0 表示無前輩)。
  • junior1 / junior2:最多兩位直屬後輩的角色 ID。
  • currentrep / totalrep:當前與累計家族聲望值。
  • pedigree:家系圖快取(含自身、前輩、兄弟、後輩),由 resetPedigree 重算。
  • descendants:遞迴計算的後裔總數,由 resetDescendants 從族長開始全樹重算。

MapleFamily 在載入或新增成員時建立並持有; getAllJuniors/getOnlineJuniors 遞迴遍歷子樹,供廣播與分裂邏輯使用。

See Also:
  • Field Details

  • Constructor Details

    • MapleFamilyCharacter

      public MapleFamilyCharacter(MapleCharacter c, int fid, int sid, int j1, int j2)
    • MapleFamilyCharacter

      public MapleFamilyCharacter(int _id, int _lv, String _name, int _channel, int _job, int _fid, int _sid, int _jr1, int _jr2, int _crep, int _trep, boolean _on)
  • Method Details

    • getLevel

      public int getLevel()
    • setLevel

      public void setLevel(int l)
    • getId

      public int getId()
    • setChannel

      public void setChannel(int ch)
    • getChannel

      public int getChannel()
    • getJobId

      public int getJobId()
    • setJobId

      public void setJobId(int job)
    • getCurrentRep

      public int getCurrentRep()
    • setCurrentRep

      public void setCurrentRep(int cr)
    • getTotalRep

      public int getTotalRep()
    • setTotalRep

      public void setTotalRep(int tr)
    • getJunior1

      public int getJunior1()
    • getJunior2

      public int getJunior2()
    • setJunior1

      public void setJunior1(int trs)
    • setJunior2

      public void setJunior2(int trs)
    • getSeniorId

      public int getSeniorId()
    • setSeniorId

      public void setSeniorId(int si)
    • getFamilyId

      public int getFamilyId()
    • setFamilyId

      public void setFamilyId(int fi)
    • isOnline

      public boolean isOnline()
    • getName

      public String getName()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • setOnline

      public void setOnline(boolean f)
    • getAllJuniors

      public List<MapleFamilyCharacter> getAllJuniors(MapleFamily fam)
    • getOnlineJuniors

      public List<MapleFamilyCharacter> getOnlineJuniors(MapleFamily fam)
    • getPedigree

      public List<Integer> getPedigree()
    • resetPedigree

      public void resetPedigree(MapleFamily fam)
    • getDescendants

      public int getDescendants()
    • resetDescendants

      public int resetDescendants(MapleFamily fam)
    • getNoJuniors

      public int getNoJuniors()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object