コード例 #1
0
 public object[] ToObjectArray()
 {
     return(new object[]
     {
         PlayerID,
         Name,
         IsRejoining,
         EquippedWeaponItemModel == null ? EMPTY_OBJECT_ARRAY : EquippedWeaponItemModel.ToObjectArray(),
         EquippedOffHandItemModel == null? EMPTY_OBJECT_ARRAY : EquippedOffHandItemModel.ToObjectArray(),
         EquippedArmorItemModel == null ?  EMPTY_OBJECT_ARRAY : EquippedArmorItemModel.ToObjectArray(),
         CombatantModel.ToObjectArray()
     });
 }
コード例 #2
0
ファイル: NpcModel.cs プロジェクト: jSandhu/multiplayer_game
        public object[] ToObjectArray()
        {
            object[] alwaysDroppedItemIdObjects = AlwaysDroppedItemIDs == null ? new object[0] : new object[AlwaysDroppedItemIDs.Length];
            for (int i = 0; i < alwaysDroppedItemIdObjects.Length; i++)
            {
                alwaysDroppedItemIdObjects[i] = AlwaysDroppedItemIDs[i];
            }

            return(new object[]
            {
                ID,
                Name,
                (int)NpcRole,
                (int)NpcRace,
                (int)NpcSize,
                (int)RarityType,
                CombatantModel.ToObjectArray(),
                alwaysDroppedItemIdObjects
            });
        }