コード例 #1
0
ファイル: Skill.cs プロジェクト: neowutran/ShinraMeter
 public Skill(long amount, Database.Type type, Entity target, Player targetPlayer, Entity source, Player sourcePlayer, int skillId, bool hotdot,
     bool critic, long time, NpcInfo pet, HitDirection direction)
 {
     Amount = amount;
     Type = type;
     EntityTarget = target;
     EntitySource = source;
     PlayerTarget = targetPlayer;
     PlayerSource = sourcePlayer;
     SkillId = skillId;
     Critic = critic;
     HotDot = hotdot;
     Time = time;
     Pet = pet;
     Direction = direction;
     Source = source;
     Target = target;
     if(PlayerSource != null)
     {
         Source = PlayerSource.User;
     }
     if(PlayerTarget != null)
     {
         Target = PlayerTarget.User;
     }
 }
コード例 #2
0
ファイル: UserEntity.cs プロジェクト: bonekid/TeraDamageMeter
        public static UserEntity ForEntity(Entity entity)
        {
            var projectile = entity as ProjectileEntity;
            if (projectile != null)
                entity = projectile.Owner;

            return entity as UserEntity;
        }
コード例 #3
0
ファイル: UserEntity.cs プロジェクト: hawkwork/CasualMeter
 public static UserEntity ForEntity(Entity entity)
 {
     var ownedEntity = entity as IHasOwner;
     while (ownedEntity != null && ownedEntity.Owner != null)
     {
         entity = ownedEntity.Owner;
         ownedEntity = entity as IHasOwner;
     }
     return entity as UserEntity;
 }
コード例 #4
0
ファイル: NpcEntity.cs プロジェクト: kuko0411/TeraDamageMeter
 public NpcEntity(EntityId id, EntityId ownerId, Entity owner)
     : base(id)
 {
     OwnerId = ownerId;
     Owner = owner;
 }