Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
 public static int GetOffer(int cosortiaID1, int consortiaID2, eGameType gameType)
 {
     return(ConsortiaMgr.GetOffer(ConsortiaMgr.FindConsortiaAlly(cosortiaID1, consortiaID2), gameType));
 }