Ejemplo n.º 1
0
        public static int KillPlayer(GamePlayer win, GamePlayer lose, Dictionary <GamePlayer, Player> players, eRoomType roomType, eGameType gameClass)
        {
            int result;

            if (roomType != eRoomType.Match)
            {
                result = -1;
            }
            else
            {
                int state = ConsortiaMgr.FindConsortiaAlly(win.PlayerCharacter.ConsortiaID, lose.PlayerCharacter.ConsortiaID);
                if (state == -1)
                {
                    result = state;
                }
                else
                {
                    int offer = ConsortiaMgr.GetOffer(state, gameClass);
                    if (lose.PlayerCharacter.Offer < offer)
                    {
                        offer = lose.PlayerCharacter.Offer;
                    }
                    if (offer != 0)
                    {
                        players[win].GainOffer  = offer;
                        players[lose].GainOffer = -offer;
                    }
                    result = state;
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        public static int KillPlayer(GamePlayer win, GamePlayer lose, Dictionary <GamePlayer, Player> players, eRoomType roomType, eGameType gameClass)
        {
            if (roomType != eRoomType.Match)
            {
                return(-1);
            }
            int num = ConsortiaMgr.FindConsortiaAlly(win.PlayerCharacter.ConsortiaID, lose.PlayerCharacter.ConsortiaID);

            if (num == -1)
            {
                return(num);
            }
            int offer = ConsortiaMgr.GetOffer(num, gameClass);

            if (lose.PlayerCharacter.Offer < offer)
            {
                offer = lose.PlayerCharacter.Offer;
            }
            if (offer != 0)
            {
                players[win].GainOffer  = offer;
                players[lose].GainOffer = -offer;
            }
            return(num);
        }
Ejemplo n.º 3
0
        public static int CanConsortiaFight(int consortiaID1, int consortiaID2)
        {
            if (consortiaID1 == 0 || consortiaID2 == 0 || consortiaID1 == consortiaID2)
            {
                return(-1);
            }
            ConsortiaInfo consortiaInfo  = ConsortiaMgr.FindConsortiaInfo(consortiaID1);
            ConsortiaInfo consortiaInfo2 = ConsortiaMgr.FindConsortiaInfo(consortiaID2);

            if (consortiaInfo == null || consortiaInfo2 == null || consortiaInfo.Level < 3 || consortiaInfo2.Level < 3)
            {
                return(-1);
            }
            return(ConsortiaMgr.FindConsortiaAlly(consortiaID1, consortiaID2));
        }
Ejemplo n.º 4
0
        public static int CanConsortiaFight(int consortiaID1, int consortiaID2)
        {
            int result;

            if (consortiaID1 == 0 || consortiaID2 == 0 || consortiaID1 == consortiaID2)
            {
                result = -1;
            }
            else
            {
                ConsortiaInfo consortia  = ConsortiaMgr.FindConsortiaInfo(consortiaID1);
                ConsortiaInfo consortia2 = ConsortiaMgr.FindConsortiaInfo(consortiaID2);
                if (consortia == null || consortia2 == null || consortia.Level < 3 || consortia2.Level < 3)
                {
                    result = -1;
                }
                else
                {
                    result = ConsortiaMgr.FindConsortiaAlly(consortiaID1, consortiaID2);
                }
            }
            return(result);
        }
Ejemplo n.º 5
0
 public static int GetOffer(int cosortiaID1, int consortiaID2, eGameType gameType)
 {
     return(ConsortiaMgr.GetOffer(ConsortiaMgr.FindConsortiaAlly(cosortiaID1, consortiaID2), gameType));
 }