Ejemplo n.º 1
0
    public void ServerAddScoreForTurretKill(uLink.NetworkPlayer player, int extraGold)
    {
#if !DEADZONE_CLIENT
        PlayerPersistantInfo ppi = PPIManager.Instance.GetPPI(player);

        ppi.AddScore(GameplayRewards.TurretKill);
        ppi.AddExperience(GameplayRewards.TurretKill, E_AddMoneyAction.KillSentry);
        ppi.AddGoldFromGameplay(extraGold);

        Server.Instance.ShowCombatMsgOnClient(ppi.Player, Client.E_MessageType.Turret, GameplayRewards.TurretKill, (short)(GameplayRewards.TurretKill * GameplayRewards.MoneyModificator));

        if (extraGold > 0)
        {
            Server.Instance.ShowGoldMsgOnClient(player, (short)extraGold);
        }

        SortDescending();
        SynchronizeScore(ppi);
#endif
    }
Ejemplo n.º 2
0
    public void ServerAddScoreForKill(uLink.NetworkPlayer victim,
                                      uLink.NetworkPlayer killer,
                                      List <BlackBoard.DamageData> damageData,
                                      E_BodyPart bodyPart,
                                      int extraGold)
    {
#if !DEADZONE_CLIENT
        PlayerPersistantInfo victimPPI = PPIManager.Instance.GetPPI(victim);
        PlayerPersistantInfo killerPPI = PPIManager.Instance.GetPPI(killer);

        if (killer != victim)
        {
            victimPPI.Score.Deaths++;             // check this!!!!
            SynchronizeScore(victimPPI);

            killerPPI.Score.Kills++;         // check this!!!!
            killerPPI.AddGoldFromGameplay(extraGold);

            Server.Instance.ShowMessageOnClients(killerPPI.NameForGui + " " + TextDatabase.instance[MPMessages.Kill] + " " + victimPPI.NameForGui);

            DistributeKills(victim, killer, bodyPart);

            if (extraGold > 0)
            {
                Server.Instance.ShowGoldMsgOnClient(killerPPI.Player, (short)extraGold);
            }
        }
        else
        {
            killerPPI.Score.Deaths++;             // check this!!!!
            killerPPI.AddScore(GameplayRewards.Suicide);
            Server.Instance.ShowMessageOnClients(killerPPI.NameForGui + " " + TextDatabase.instance[MPMessages.Suicide]);
            SynchronizeScore(killerPPI);
        }

        ServerSetState(victim, PlayerPersistantInfo.E_State.Connected, true);

        SortDescending();
#endif
    }