当前位置: 首页>>代码示例>>C#>>正文


C# IntelligentCreatureType类代码示例

本文整理汇总了C#中IntelligentCreatureType的典型用法代码示例。如果您正苦于以下问题:C# IntelligentCreatureType类的具体用法?C# IntelligentCreatureType怎么用?C# IntelligentCreatureType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IntelligentCreatureType类属于命名空间,在下文中一共展示了IntelligentCreatureType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IntelligentCreatureObject

 protected internal IntelligentCreatureObject(MonsterInfo info)
     : base(info)
 {
     ActionTime = Envir.Time + 1000;
     petType = (IntelligentCreatureType)info.Effect;
     CustomName = info.Name;
 }
开发者ID:mstation,项目名称:mir2,代码行数:7,代码来源:IntelligentCreatureObject.cs

示例2: UserIntelligentCreature

        public UserIntelligentCreature(BinaryReader reader)
        {
            PetType = (IntelligentCreatureType)reader.ReadByte();
            Info = IntelligentCreatureInfo.GetCreatureInfo(PetType);

            CustomName = reader.ReadString();
            Fullness = reader.ReadInt32();
            SlotIndex = reader.ReadInt32();
            ExpireTime = reader.ReadInt64();
            BlackstoneTime = reader.ReadInt64();

            petMode = (IntelligentCreaturePickupMode)reader.ReadByte();

            Filter = new IntelligentCreatureItemFilter(reader);
            if (Envir.LoadVersion > 48)
            {
                Filter.PickupGrade = (ItemGrade)reader.ReadByte();

                MaintainFoodTime = reader.ReadInt64();//maintain food buff
            }
        }
开发者ID:nerestaren,项目名称:mir2,代码行数:21,代码来源:CharacterInfo.cs

示例3: GetCreatureInfo

 public static IntelligentCreatureInfo GetCreatureInfo(IntelligentCreatureType petType)
 {
     for (int i = 0; i < Creatures.Count; i++)
     {
         IntelligentCreatureInfo info = Creatures[i];
         if (info.PetType != petType) continue;
         return info;
     }
     return null;
 }
开发者ID:nerestaren,项目名称:mir2,代码行数:10,代码来源:CharacterInfo.cs

示例4: CheckHasIntelligentCreature

 public bool CheckHasIntelligentCreature(IntelligentCreatureType petType)
 {
     for (int i = 0; i < IntelligentCreatures.Count; i++)
         if (IntelligentCreatures[i].PetType == petType) return true;
     return false;
 }
开发者ID:nerestaren,项目名称:mir2,代码行数:6,代码来源:CharacterInfo.cs

示例5: ReadPacket

 protected override void ReadPacket(BinaryReader reader)
 {
     int count = reader.ReadInt32();
     for (int i = 0; i < count; i++)
         CreatureList.Add(new ClientIntelligentCreature(reader));
     CreatureSummoned = reader.ReadBoolean();
     SummonedCreatureType = (IntelligentCreatureType)reader.ReadByte();
     PearlCount = reader.ReadInt32();
 }
开发者ID:beyourself,项目名称:gameshop,代码行数:9,代码来源:ServerPackets.cs

示例6: UnSummonIntelligentCreature

        public void UnSummonIntelligentCreature(IntelligentCreatureType pType, bool doUpdate = true)
        {
            if (pType == IntelligentCreatureType.None) return;

            for (int i = 0; i < Pets.Count; i++)
            {
                if (Pets[i].Info.AI != 64) continue;
                if (((IntelligentCreatureObject)Pets[i]).petType != pType) continue;

                if (doUpdate) ReceiveChat((string.Format("Creature {0} has been dismissed.", ((IntelligentCreatureObject)Pets[i]).CustomName)), ChatType.System);

                Pets[i].Die();

                CreatureSummoned = false;
                SummonedCreatureType = IntelligentCreatureType.None;
                break;
            }
            //update client
            if (doUpdate) GetCreaturesInfo();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:20,代码来源:PlayerObject.cs

示例7: RefreshCreatureSummoned

 public void RefreshCreatureSummoned()
 {
     if (SummonedCreatureType == IntelligentCreatureType.None || !CreatureSummoned)
     {
         //make sure both are in the unsummoned state
         CreatureSummoned = false;
         SummonedCreatureType = IntelligentCreatureType.None;
         return;
     }
     bool petFound = false;
     for (int i = 0; i < Pets.Count; i++)
     {
         if (Pets[i].Info.AI != 64) continue;
         if (((IntelligentCreatureObject)Pets[i]).petType != SummonedCreatureType) continue;
         petFound = true;
         break;
     }
     if (!petFound)
     {
         SMain.EnqueueDebugging(string.Format("{0}: SummonedCreature no longer exists?!?. {1}", Name, SummonedCreatureType.ToString()));
         CreatureSummoned = false;
         SummonedCreatureType = IntelligentCreatureType.None;
     }
 }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:24,代码来源:PlayerObject.cs

示例8: IntelligentCreatureSay

        public void IntelligentCreatureSay(IntelligentCreatureType pType, string message)
        {
            if (!CreatureSummoned || message == "") return;
            if (pType != SummonedCreatureType) return;

            for (int i = 0; i < Pets.Count; i++)
            {
                if (Pets[i].Info.AI != 64) continue;
                if (((IntelligentCreatureObject)Pets[i]).petType != pType) continue;

                Enqueue(new S.ObjectChat { ObjectID = Pets[i].ObjectID, Text = message, Type = ChatType.Normal });
                return;
            }
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:14,代码来源:PlayerObject.cs

示例9: UpdateCreatureBlackstoneTime

        public void UpdateCreatureBlackstoneTime(IntelligentCreatureType pType, long blackstonetime)
        {
            if (pType == IntelligentCreatureType.None) return;

            for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
            {
                if (Info.IntelligentCreatures[i].PetType != pType) continue;
                Info.IntelligentCreatures[i].BlackstoneTime = blackstonetime;
                break;
            }

            //update client
            //GetCreaturesInfo();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:14,代码来源:PlayerObject.cs

示例10: UpdateCreatureMaintainFoodTime

        public void UpdateCreatureMaintainFoodTime(IntelligentCreatureType pType, long maintainfoodtime)
        {
            if (pType == IntelligentCreatureType.None) return;

            for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
            {
                if (Info.IntelligentCreatures[i].PetType != pType) continue;
                Info.IntelligentCreatures[i].MaintainFoodTime = maintainfoodtime;
                break;
            }

            //update client
            //GetCreaturesInfo();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:14,代码来源:PlayerObject.cs

示例11: UpdateCreatureFullness

        public void UpdateCreatureFullness(IntelligentCreatureType pType, int fullness)
        {
            if (pType == IntelligentCreatureType.None) return;

            for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
            {
                if (Info.IntelligentCreatures[i].PetType != pType) continue;
                Info.IntelligentCreatures[i].Fullness = fullness;
                break;
            }

            //update client
            //GetCreaturesInfo();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:14,代码来源:PlayerObject.cs

示例12: UpdateSummonedCreature

        public void UpdateSummonedCreature(IntelligentCreatureType pType)
        {
            if (pType == IntelligentCreatureType.None) return;

            UserIntelligentCreature creatureInfo = null;
            for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
            {
                if (Info.IntelligentCreatures[i].PetType != pType) continue;

                creatureInfo = Info.IntelligentCreatures[i];
                break;
            }
            if (creatureInfo == null) return;

            for (int i = 0; i < Pets.Count; i++)
            {
                if (Pets[i].Info.AI != 64) continue;
                if (((IntelligentCreatureObject)Pets[i]).petType != pType) continue;

                ((IntelligentCreatureObject)Pets[i]).CustomName = creatureInfo.CustomName;
                ((IntelligentCreatureObject)Pets[i]).ItemFilter = creatureInfo.Filter;
                ((IntelligentCreatureObject)Pets[i]).CurrentPickupMode = creatureInfo.petMode;
                break;
            }
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:25,代码来源:PlayerObject.cs

示例13: ReleaseIntelligentCreature

        public void ReleaseIntelligentCreature(IntelligentCreatureType pType, bool doUpdate = true)
        {
            if (pType == IntelligentCreatureType.None) return;

            //remove creature
            for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
            {
                if (Info.IntelligentCreatures[i].PetType != pType) continue;

                if (doUpdate) ReceiveChat((string.Format("Creature {0} has been released.", Info.IntelligentCreatures[i].CustomName)), ChatType.System);

                Info.IntelligentCreatures.Remove(Info.IntelligentCreatures[i]);
                break;
            }

            //re-arange slots
            for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
                Info.IntelligentCreatures[i].SlotIndex = i;

            //update client
            if (doUpdate) GetCreaturesInfo();
        }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:22,代码来源:PlayerObject.cs

示例14: Clear

 public void Clear()
 {
     PetType = IntelligentCreatureType.None;
     Visible = false;
     SelectButton(false);
 }
开发者ID:ElijahLOMCN,项目名称:mir2,代码行数:6,代码来源:GameScene.cs

示例15: ClientIntelligentCreature

    public ClientIntelligentCreature(BinaryReader reader)
    {
        PetType = (IntelligentCreatureType)reader.ReadByte();
        Icon = reader.ReadInt32();

        CustomName = reader.ReadString();
        Fullness = reader.ReadInt32();
        SlotIndex = reader.ReadInt32();
        ExpireTime = reader.ReadInt64();
        BlackstoneTime = reader.ReadInt64();

        petMode = (IntelligentCreaturePickupMode)reader.ReadByte();

        CreatureRules = new IntelligentCreatureRules(reader);
        Filter = new IntelligentCreatureItemFilter(reader);
        Filter.PickupGrade = (ItemGrade)reader.ReadByte();
        MaintainFoodTime = reader.ReadInt64();
    }
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:18,代码来源:Common.cs


注:本文中的IntelligentCreatureType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。