Beispiel #1
0
        public TibiaObject getTibiaObject()
        {
            if (tibiaObject == null)
            {
                switch (type)
                {
                case TibiaObjectType.Creature:
                    tibiaObject = MainForm.getCreature(id);
                    break;

                case TibiaObjectType.Item:
                    tibiaObject = MainForm.getItem(id);
                    break;

                case TibiaObjectType.NPC:
                    tibiaObject = MainForm.getNPC(id);
                    break;

                case TibiaObjectType.Mount:
                    tibiaObject = MainForm.getMount(id);
                    break;

                case TibiaObjectType.Outfit:
                    tibiaObject = MainForm.getOutfit(id);
                    break;

                case TibiaObjectType.Spell:
                    tibiaObject = MainForm.getSpell(id);
                    break;
                }
            }
            return(tibiaObject);
        }