Ejemplo n.º 1
0
        public static double GetStandingServerEntityToPlayerHierarchy(this IStandingHandler standingHandler, long serverEntityEid, Character character)
        {
            var playersCorporationEid = character.CorporationEid;
            var playersAllianceEid    = character.AllianceEid;

            if (serverEntityEid == playersAllianceEid || serverEntityEid == playersCorporationEid)
            {
                //own corp or alliance
                return(10.0);
            }

            double standing;

            //was standing set for this alliance?
            if (standingHandler.TryGetStanding(serverEntityEid, playersAllianceEid, out standing))
            {
                //if yes, then it overrides everything
                return(standing);
            }

            //was the standing set for the player's corp?
            if (standingHandler.TryGetStanding(serverEntityEid, playersCorporationEid, out standing))
            {
                return(standing);
            }

            //was the standing set this player?
            if (standingHandler.TryGetStanding(serverEntityEid, character.Eid, out standing))
            {
                return(standing);
            }

            return(0);
        }
Ejemplo n.º 2
0
        public static double GetStanding(this IStandingHandler standingHandler, long sourceEID, long targetEID)
        {
            double standing;

            standingHandler.TryGetStanding(sourceEID, targetEID, out standing);
            return(standing);
        }