public static IKingdomFactory Create(KingdomType kingdomType)
 {
     return(kingdomType switch
     {
         KingdomType.ELF => new ElfKingdomFactory(),
         KingdomType.ORC => new OrcKingdomFactory(),
         _ => throw new Exception()
     });
示例#2
0
 //TO CONTINUE
 public CharacterObjectType(ObjectTypeEnum objectType, uint objectId, uint id, uint linkId, float x, float y, float z, float angle, float angleX,
                            short scale, string name, int count_data, ushort[] rIndexes_data, int[] values_data, byte count_buff, byte[] buffsns, int[] buffIds,
                            int[] ticks, uint characterId, byte sex, int job, int authority, int serverId, string vipbar_name, short constellation, short city,
                            byte hair_mesh, uint hair_color, byte head_mesh, uint option, uint teamId, string vendor_sentence, int slaughter, int kill_num, int fame,
                            byte pk_mode, byte pk_name, int gray_time, int prot_cool_down_start, int issf_, int items_count, ItemType[] items, byte ext_param_count,
                            byte[] index, int[] value, int title_count, int[] titles, int title_flag, byte title_count2, int[] titles2, int[] host_ids, KingdomType kingdom,
                            MasterType master, MarriageType marriage, int show_count, int[] indexes_show, int vessel_refine_lv, int vessel_equip_index, bool vessel_is_equip, bool flag_data, FlagsDataType flagsData)
     : base(objectType, objectId, id, linkId, x, y, z, angle, angleX, scale, name, count_data, rIndexes_data, values_data, count_buff, buffsns, buffIds, ticks)
 {
     this.characterId          = characterId;
     this.sex                  = sex;
     this.job                  = job;
     this.authority            = authority;
     this.serverId             = serverId;
     this.vipbar_name          = vipbar_name;
     this.constellation        = constellation;
     this.city                 = city;
     this.hair_mesh            = hair_mesh;
     this.hair_color           = hair_color;
     this.head_mesh            = head_mesh;
     this.option               = option;
     this.teamId               = teamId;
     this.vendor_sentence      = vendor_sentence;
     this.slaughter            = slaughter;
     this.kill_num             = kill_num;
     this.fame                 = fame;
     this.pk_mode              = pk_mode;
     this.pk_name              = pk_name;
     this.gray_time            = gray_time;
     this.prot_cool_down_start = prot_cool_down_start;
     this.issf_                = issf_;
     this.items_count          = items_count;
     this.items                = items;
     this.ext_param_count      = ext_param_count;
     this.index                = index;
     this.value                = value;
     this.title_count          = title_count;
     this.titles               = titles;
     this.title_flag           = title_flag;
     this.title_count          = title_count;
     this.titles2              = titles2;
     this.kingdom              = kingdom;
     this.master               = master;
     this.marriage             = marriage;
     this.show_count           = show_count;
     this.indexes_show         = indexes_show;
     this.vessel_refine_lv     = vessel_refine_lv;
     this.vessel_equip_index   = vessel_equip_index;
     this.vessel_is_equip      = vessel_is_equip;
     this.flag_data            = flag_data;
     this.flagsData            = flagsData;
 }
示例#3
0
            public static IKingdomFactory makeFactory(KingdomType type)
            {
                switch (type)
                {
                case KingdomType.ELF:
                    return(new ElfKingdomFactory());

                case KingdomType.ORC:
                    return(new OrcKingdomFactory());

                default:
                    throw new ArgumentException("Kingdom not supported!");
                }
            }
示例#4
0
        public static IKingdomFactory CreateKingdomFactory(KingdomType kingdomType)
        {
            switch (kingdomType)
            {
            case KingdomType.Elf:
                return(new ElfKingdomFactory());

            case KingdomType.Orcish:
                return(new OrcishKingdomFactory());

            case KingdomType.Human:
                return(new HumanKingdomFactory());

            default:
                return(null);
            }
        }