public static MoleMole.MPAvatarDataItem Deserialize(MoleMole.MPProtocol.MPAvatarDataItem table, MoleMole.MPAvatarDataItem obj) { if (obj == null) { obj = new MoleMole.MPAvatarDataItem(); } obj.avatarID = table.AvatarID; obj.level = table.Level; obj.star = table.Star; obj.finalHP = table.FinalHP; obj.finalSP = table.FinalSP; obj.finalAttack = table.FinalAttack; obj.finalCritical = table.FinalCritical; obj.finalDefense = table.FinalDefense; return(obj); }
public static Offset <MoleMole.MPProtocol.MPAvatarDataItem> Serialize(FlatBufferBuilder builder, MoleMole.MPAvatarDataItem obj) { MoleMole.MPProtocol.MPAvatarDataItem.StartMPAvatarDataItem(builder); MoleMole.MPProtocol.MPAvatarDataItem.AddAvatarID(builder, obj.avatarID); MoleMole.MPProtocol.MPAvatarDataItem.AddLevel(builder, obj.level); MoleMole.MPProtocol.MPAvatarDataItem.AddStar(builder, obj.star); MoleMole.MPProtocol.MPAvatarDataItem.AddFinalHP(builder, obj.finalHP); MoleMole.MPProtocol.MPAvatarDataItem.AddFinalSP(builder, obj.finalSP); MoleMole.MPProtocol.MPAvatarDataItem.AddFinalAttack(builder, obj.finalAttack); MoleMole.MPProtocol.MPAvatarDataItem.AddFinalCritical(builder, obj.finalCritical); MoleMole.MPProtocol.MPAvatarDataItem.AddFinalDefense(builder, obj.finalDefense); return(MoleMole.MPProtocol.MPAvatarDataItem.EndMPAvatarDataItem(builder)); }
public static object DeserializeToObject(Table table, object obj) { if (table.GetType() == typeof(MoleMole.MPProtocol.MPStageData)) { if (obj == null) { obj = new MoleMole.MPStageData(); } return(Deserialize((MoleMole.MPProtocol.MPStageData)table, (MoleMole.MPStageData)obj)); } if (table.GetType() == typeof(MoleMole.MPProtocol.MPAvatarDataItem)) { if (obj == null) { obj = new MoleMole.MPAvatarDataItem(); } return(Deserialize((MoleMole.MPProtocol.MPAvatarDataItem)table, (MoleMole.MPAvatarDataItem)obj)); } if (table.GetType() == typeof(Packet_Event_EvtHittingOther)) { if (obj == null) { obj = new EvtHittingOther(); } return(Deserialize((Packet_Event_EvtHittingOther)table, (EvtHittingOther)obj)); } if (table.GetType() == typeof(Packet_Event_EvtBeingHit)) { if (obj == null) { obj = new EvtBeingHit(); } return(Deserialize((Packet_Event_EvtBeingHit)table, (EvtBeingHit)obj)); } if (table.GetType() == typeof(Packet_Event_EvtAttackLanded)) { if (obj == null) { obj = new EvtAttackLanded(); } return(Deserialize((Packet_Event_EvtAttackLanded)table, (EvtAttackLanded)obj)); } if (table.GetType() == typeof(Packet_Event_EvtEvadeSuccess)) { if (obj == null) { obj = new EvtEvadeSuccess(); } return(Deserialize((Packet_Event_EvtEvadeSuccess)table, (EvtEvadeSuccess)obj)); } if (table.GetType() == typeof(Packet_Event_EvtBulletHit)) { if (obj == null) { obj = new EvtBulletHit(); } return(Deserialize((Packet_Event_EvtBulletHit)table, (EvtBulletHit)obj)); } if (table.GetType() == typeof(MPAttackData)) { if (obj == null) { obj = new AttackData(); } return(Deserialize((MPAttackData)table, (AttackData)obj)); } if (table.GetType() == typeof(MPAttackResult)) { if (obj == null) { obj = new AttackResult(); } return(Deserialize((MPAttackResult)table, (AttackResult)obj)); } if (table.GetType() != typeof(MPHitCollision)) { return(obj); } if (obj == null) { obj = new AttackResult.HitCollsion(); } return(Deserialize((MPHitCollision)table, (AttackResult.HitCollsion)obj)); }