Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using GTANetworkAPI;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -113,6 +114,20 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
this.timerCount = 0;
|
||||
}
|
||||
|
||||
private void reloadGangTurfs()
|
||||
{
|
||||
var t = Task.Factory.StartNew(() =>
|
||||
{
|
||||
ChatService.Broadcast("DEBUG: reloadGangTurfs(...)");
|
||||
Task.Delay(10000).Wait();
|
||||
Gangwar.loadTurfs();
|
||||
Gangwar.loadTurfs_ToAllPlayers();
|
||||
ChatService.Broadcast("DEBUG: reloadGangTurfs()...10 Sekunden um");
|
||||
});
|
||||
t.Wait();
|
||||
|
||||
}
|
||||
|
||||
private void Tick(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
if (this.status == "attack")
|
||||
@@ -152,18 +167,18 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
|
||||
foreach (Player gangwarPlayer in this.playerInGangwar)
|
||||
{
|
||||
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score, 100 - timerCount);
|
||||
gangwarPlayer.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score, 40 - timerCount);
|
||||
}
|
||||
if (this.Att_Score >= 200)
|
||||
/*if (this.Att_Score >= 200)
|
||||
{
|
||||
this.takeOver(this.Attacker);
|
||||
}
|
||||
else if (this.Def_Score >= 200)
|
||||
{
|
||||
this.takeOver(this.Owner);
|
||||
}
|
||||
}*/
|
||||
timerCount += 1;
|
||||
if (timerCount >= 100) //change to 900 (seconds) before release for testing reasons change to whatever you like
|
||||
if (timerCount >= 40) //change to 900 (seconds) before release for testing reasons change to whatever you like
|
||||
{
|
||||
if (this.Att_Score > this.Def_Score)
|
||||
{
|
||||
@@ -288,6 +303,7 @@ namespace ReallifeGamemode.Server.Gangwar
|
||||
NAPI.ClientEvent.TriggerClientEventForAll("CLIENT:Turf_Conquered", JsonConvert.SerializeObject(this.TurfID), JsonConvert.SerializeObject(this.status), JsonConvert.SerializeObject(this.Owner));
|
||||
Gangwar.loadTurfs();
|
||||
Gangwar.loadTurfs_ToAllPlayers();
|
||||
reloadGangTurfs();
|
||||
}
|
||||
|
||||
public void attack(string attacker)
|
||||
|
||||
Reference in New Issue
Block a user