public COMDT_PLAYERINFO() { this.szName = new byte[64]; this.stDetail = (COMDT_PLAYERINFO_DETAIL)ProtocolObjectPool.Get(COMDT_PLAYERINFO_DETAIL.CLASS_ID); this.astChoiceHero = new COMDT_CHOICEHERO[3]; for (int i = 0; i < 3; i++) { this.astChoiceHero[i] = (COMDT_CHOICEHERO)ProtocolObjectPool.Get(COMDT_CHOICEHERO.CLASS_ID); } }
public override void OnUse() { this.stDetail = (COMDT_PLAYERINFO_DETAIL)ProtocolObjectPool.Get(COMDT_PLAYERINFO_DETAIL.CLASS_ID); if (this.astChoiceHero != null) { for (int i = 0; i < this.astChoiceHero.Length; i++) { this.astChoiceHero[i] = (COMDT_CHOICEHERO)ProtocolObjectPool.Get(COMDT_CHOICEHERO.CLASS_ID); } } }
public override void OnRelease() { this.bObjCamp = 0; this.bObjType = 0; this.bPosOfCamp = 0; this.dwObjId = 0; this.dwLevel = 0; if (this.stDetail != null) { this.stDetail.Release(); this.stDetail = null; } if (this.astChoiceHero != null) { for (int i = 0; i < this.astChoiceHero.Length; i++) { if (this.astChoiceHero[i] != null) { this.astChoiceHero[i].Release(); this.astChoiceHero[i] = null; } } } }