예제 #1
0
        public bool TryGetPlayerRelationship(WowPlayer player, out Relationship relationship)
        {
            if (PlayerRelationships.ContainsKey(player.Guid))
            {
                relationship = PlayerRelationships[player.Guid];
                return(true);
            }

            relationship = default;
            return(false);
        }
예제 #2
0
        public void AddPlayerRelationship(WowPlayer player, RelationshipLevel initialRelationship = RelationshipLevel.Neutral)
        {
            if (!IsPlayerKnown(player))
            {
                PlayerRelationships.TryAdd(player.Guid, new Relationship()
                {
                    Score             = (float)initialRelationship,
                    FirstSeen         = DateTime.Now,
                    FirstSeenMapId    = WowInterface.I.ObjectManager.MapId,
                    FirstSeenPosition = player.Position
                });
            }

            PlayerRelationships[player.Guid].Poll(player);
        }
예제 #3
0
 public bool IsPlayerKnown(WowPlayer player)
 {
     return(PlayerRelationships.ContainsKey(player.Guid));
 }