本文整理匯總了C#中ActorController.GetPetInfoID方法的典型用法代碼示例。如果您正苦於以下問題:C# ActorController.GetPetInfoID方法的具體用法?C# ActorController.GetPetInfoID怎麽用?C# ActorController.GetPetInfoID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ActorController
的用法示例。
在下文中一共展示了ActorController.GetPetInfoID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AddActorCombatLog
private void AddActorCombatLog(ActorController actor)
{
if (actor == null || this.combatLog == null)
{
return;
}
if (actor.HighestDamage > this.combatLog.HighestDamage)
{
this.combatLog.HighestDamage = actor.HighestDamage;
}
if (actor.HighestHeal > this.combatLog.HighestHeal)
{
this.combatLog.HighestHeal = actor.HighestHeal;
}
for (int i = 0; i < this.combatLog.Data.Count; i++)
{
if (this.combatLog.Data[i].PetID == actor.GetPetInfoID() && this.combatLog.Data[i].SocketSlot == actor.SocketSlot)
{
this.combatLog.Data[i].HPPct = (int)actor.CurHP * 100 / (int)actor.MaxHP;
this.combatLog.Data[i].DamageTaken += actor.DamageTaken;
this.combatLog.Data[i].DamageTakenCount += actor.DamageTakenCount;
this.combatLog.Data[i].HealTaken += actor.HealTaken;
this.combatLog.Data[i].HealTakenCount += actor.HealTakenCount;
this.combatLog.Data[i].Damage += actor.TotalDamage;
this.combatLog.Data[i].Heal += actor.TotalHeal;
for (int j = 0; j < actor.Skills.Length; j++)
{
if (actor.Skills[j] != null && actor.Skills[j].Info != null)
{
bool flag = false;
for (int k = 0; k < this.combatLog.Data[i].Data.Count; k++)
{
if (actor.Skills[j].Info.ID == this.combatLog.Data[i].Data[k].SkillID)
{
this.combatLog.Data[i].Data[k].Count += actor.Skills[j].Count;
this.combatLog.Data[i].Data[k].Damage += actor.Skills[j].Damage;
this.combatLog.Data[i].Data[k].Heal += actor.Skills[j].Heal;
if (actor.Skills[j].HighDamage > this.combatLog.Data[i].Data[k].HighDamage)
{
this.combatLog.Data[i].Data[k].HighDamage = actor.Skills[j].HighDamage;
}
flag = true;
break;
}
}
if (!flag)
{
SkillLog skillLog = new SkillLog();
skillLog.SkillID = actor.Skills[j].Info.ID;
skillLog.Count = actor.Skills[j].Count;
skillLog.Damage = actor.Skills[j].Damage;
skillLog.Heal = actor.Skills[j].Heal;
skillLog.HighDamage = actor.Skills[j].HighDamage;
this.combatLog.Data[i].Data.Add(skillLog);
}
}
}
return;
}
}
ActorCombatLog actorCombatLog = new ActorCombatLog();
actorCombatLog.PetID = actor.GetPetInfoID();
actorCombatLog.HPPct = (int)actor.CurHP * 100 / (int)actor.MaxHP;
actorCombatLog.DamageTaken += actor.DamageTaken;
actorCombatLog.DamageTakenCount += actor.DamageTakenCount;
actorCombatLog.HealTaken += actor.HealTaken;
actorCombatLog.HealTakenCount += actor.HealTakenCount;
actorCombatLog.Damage += actor.TotalDamage;
actorCombatLog.Heal += actor.TotalHeal;
actorCombatLog.SocketSlot = actor.SocketSlot;
for (int l = 0; l < actor.Skills.Length; l++)
{
if (actor.Skills[l] != null && actor.Skills[l].Info != null)
{
SkillLog skillLog2 = new SkillLog();
skillLog2.SkillID = actor.Skills[l].Info.ID;
skillLog2.Count = actor.Skills[l].Count;
skillLog2.Damage = actor.Skills[l].Damage;
skillLog2.Heal = actor.Skills[l].Heal;
skillLog2.HighDamage = actor.Skills[l].HighDamage;
actorCombatLog.Data.Add(skillLog2);
}
}
this.combatLog.Data.Add(actorCombatLog);
}