public void From(GameLogic.cmd_war_equipscheme _scheme) { DispositionName = _scheme.szSchemeName; DispositionTitle = _scheme.szTitle; DispositionID = _scheme.bySchemeID; if (_scheme.nEquipIDList != null) { DispositionGoods = _scheme.nEquipIDList; } }
public void From(GameLogic.cmd_war_equipscheme _scheme, bool _isCurrent = false) { this.DispositionID = _scheme.bySchemeID; this.Name = _scheme.szSchemeName; this.Author = _scheme.szAuthorName; if (_scheme.nEquipIDList != null) { _scheme.nEquipIDList.CopyTo(this.GoodsList, 0); } this.IsCurrent = _isCurrent; this.HeroID = _scheme.nHeroID; }
public GameLogic.cmd_war_equipscheme To() { GameLogic.cmd_war_equipscheme scheme = new GameLogic.cmd_war_equipscheme(); scheme.bySchemeID = (byte)DispositionID; scheme.szAuthorName = Author; scheme.szSchemeName = Name; scheme.nEquipIDList = new int[12]; scheme.nHeroID = HeroID; GoodsList.CopyTo(scheme.nEquipIDList, 0); return(scheme); }