本文整理汇总了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;
}
示例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
}
}
示例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;
}
示例4: CheckHasIntelligentCreature
public bool CheckHasIntelligentCreature(IntelligentCreatureType petType)
{
for (int i = 0; i < IntelligentCreatures.Count; i++)
if (IntelligentCreatures[i].PetType == petType) return true;
return false;
}
示例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();
}
示例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();
}
示例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;
}
}
示例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;
}
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
}
示例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();
}
示例14: Clear
public void Clear()
{
PetType = IntelligentCreatureType.None;
Visible = false;
SelectButton(false);
}
示例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();
}