public void FromBin(NetSocket.ByteArray bin) { bin.Get_(out char_idx); name = bin.GetStringData((int)twp.app.unit.EUnitLimit.LIMIT_NAME_STR_LENGTH + 1); bin.Get_(out char_type); bin.Get_(out country); bin.Get_(out flags); }
public bool is_online; //是否在线 public void FromBin(NetSocket.ByteArray bin) { bin.Get_(out char_idx); char_name = bin.GetStringData((int)twp.app.unit.EUnitLimit.LIMIT_NAME_STR_LENGTH + 1); byte v; bin.Get_(out v); relation_type = (RelationType)v; bin.Get_(out battle_integral); sbyte isonline; bin.Get_(out isonline); is_online = (isonline == 0)? false : true; }