コード例 #1
0
ファイル: Artifact.cs プロジェクト: dryftr/Legends-Viewer
 public void Resolve(World world)
 {
     if (HolderId != -1)
     {
         Holder = world.GetHistoricalFigure(HolderId);
     }
     if (WrittenContentIds.Any())
     {
         WrittenContents = new List <WrittenContent>();
         foreach (var writtenContentId in WrittenContentIds)
         {
             WrittenContents.Add(world.GetWrittenContent(writtenContentId));
         }
     }
 }
コード例 #2
0
ファイル: Artifact.cs プロジェクト: piperlolot/LegendsViewer
 public void Resolve(World world)
 {
     if (HolderId > 0)
     {
         Holder = world.GetHistoricalFigure(HolderId);
         if (Holder != null && !Holder.HoldingArtifacts.Contains(this))
         {
             Holder.HoldingArtifacts.Add(this);
         }
     }
     if (WrittenContentIds.Any())
     {
         WrittenContents = new List <WrittenContent>();
         foreach (var writtenContentId in WrittenContentIds)
         {
             WrittenContents.Add(world.GetWrittenContent(writtenContentId));
         }
     }
 }