本文整理汇总了C#中IntelligentCreatureType类的典型用法代码示例。如果您正苦于以下问题:C# IntelligentCreatureType类的具体用法?C# IntelligentCreatureType怎么用?C# IntelligentCreatureType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntelligentCreatureType类属于命名空间,在下文中一共展示了IntelligentCreatureType类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: SummonIntelligentCreature
public void SummonIntelligentCreature(IntelligentCreatureType pType)
{
if (pType == IntelligentCreatureType.None) return;
if (CreatureSummoned == true || SummonedCreatureType != IntelligentCreatureType.None) return;
for (int i = 0; i < Info.IntelligentCreatures.Count; i++)
{
if (Info.IntelligentCreatures[i].PetType != pType) continue;
MonsterInfo mInfo = Envir.GetMonsterInfo(Settings.IntelligentCreatureNameList[(byte)pType]);
if (mInfo == null) return;
byte petlevel = 0;//for future use
MonsterObject monster = MonsterObject.GetMonster(mInfo);
if (monster == null) return;
monster.PetLevel = petlevel;
monster.Master = this;
monster.MaxPetLevel = 7;
monster.Direction = Direction;
monster.ActionTime = Envir.Time + 1000;
((IntelligentCreatureObject)monster).CustomName = Info.IntelligentCreatures[i].CustomName;
((IntelligentCreatureObject)monster).CreatureRules = new IntelligentCreatureRules
{
MinimalFullness = Info.IntelligentCreatures[i].Info.MinimalFullness,
MousePickupEnabled = Info.IntelligentCreatures[i].Info.MousePickupEnabled,
MousePickupRange = Info.IntelligentCreatures[i].Info.MousePickupRange,
AutoPickupEnabled = Info.IntelligentCreatures[i].Info.AutoPickupEnabled,
AutoPickupRange = Info.IntelligentCreatures[i].Info.AutoPickupRange,
SemiAutoPickupEnabled = Info.IntelligentCreatures[i].Info.SemiAutoPickupEnabled,
SemiAutoPickupRange = Info.IntelligentCreatures[i].Info.SemiAutoPickupRange,
CanProduceBlackStone = Info.IntelligentCreatures[i].Info.CanProduceBlackStone
};
((IntelligentCreatureObject)monster).ItemFilter = Info.IntelligentCreatures[i].Filter;
((IntelligentCreatureObject)monster).CurrentPickupMode = Info.IntelligentCreatures[i].petMode;
((IntelligentCreatureObject)monster).Fullness = Info.IntelligentCreatures[i].Fullness;
((IntelligentCreatureObject)monster).blackstoneTime = Info.IntelligentCreatures[i].BlackstoneTime;
((IntelligentCreatureObject)monster).maintainfoodTime = Info.IntelligentCreatures[i].MaintainFoodTime;
if (!CurrentMap.ValidPoint(Front)) return;
monster.Spawn(CurrentMap, Front);
Pets.Add(monster);//make a new creaturelist ?
CreatureSummoned = true;
SummonedCreatureType = pType;
ReceiveChat((string.Format("Creature {0} has been summoned.", Info.IntelligentCreatures[i].CustomName)), ChatType.System);
break;
}
//update client
GetCreaturesInfo();
}
开发者ID:thedeaths,项目名称:official-mir2c-,代码行数:53,代码来源:PlayerObject.cs
示例17: SetButtonInfo
private void SetButtonInfo(ClientIntelligentCreature pet)
{
if (pet == null) return;
PetType = pet.PetType;
NameLabel.Text = pet.CustomName.ToString();
PetButton.Index = pet.Icon;
PetButton.PressedIndex = pet.Icon;
SetCreatureFrames();
}
开发者ID:ElijahLOMCN,项目名称:mir2,代码行数:13,代码来源:GameScene.cs
示例18: Load
public void Load(S.UserInformation info)
{
Id = info.RealId;
Name = info.Name;
NameColour = info.NameColour;
GuildName = info.GuildName;
GuildRankName = info.GuildRank;
Class = info.Class;
Gender = info.Gender;
Level = info.Level;
CurrentLocation = info.Location;
MapLocation = info.Location;
GameScene.Scene.MapControl.AddObject(this);
Direction = info.Direction;
Hair = info.Hair;
HP = info.HP;
MP = info.MP;
Experience = info.Experience;
MaxExperience = info.MaxExperience;
LevelEffects = info.LevelEffects;
Inventory = info.Inventory;
Equipment = info.Equipment;
QuestInventory = info.QuestInventory;
Magics = info.Magics;
IntelligentCreatures = info.IntelligentCreatures;//IntelligentCreature
SummonedCreatureType = info.SummonedCreatureType;//IntelligentCreature
CreatureSummoned = info.CreatureSummoned;//IntelligentCreature
BindAllItems();
RefreshStats();
SetAction();
}
开发者ID:nerestaren,项目名称:mir2,代码行数:42,代码来源:UserObject.cs
注:本文中的IntelligentCreatureType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论