Changes on Attachment Manager.

Removed attachment due to failure in attachment manager.
Changed Database to Live Database -> will be changed after Master merge

Add to enteties.ts RageObject and RageObjectPool for Attachment Manager
This commit is contained in:
michael.reiswich
2021-04-03 16:06:44 +02:00
parent 894ae7465f
commit 0543775330
11 changed files with 147 additions and 30 deletions

View File

@@ -53,7 +53,7 @@ namespace ReallifeGamemode.Server.Events
{
ChatService.BroadcastAdmin("!{#FFFF00}*** " + player.Name + " hat den Server verlassen", AdminLevel.MAPPING);
}
/*
TaxiDriverJob taxiJob = JobManager.GetJob<TaxiDriverJob>();
TaxiContract taxiContract = taxiJob.TaxiContracts.Where(t => t.Name == player.Name).FirstOrDefault();
@@ -64,6 +64,7 @@ namespace ReallifeGamemode.Server.Events
taxiJob.TaxiContracts.Remove(taxiContract);
}
}
*/
var listReports = Report.Report.listReports;
ReportManage temp;
for (int a = 0; a < listReports.Count; a++)

View File

@@ -358,12 +358,13 @@ namespace ReallifeGamemode.Server.Events
using (var context = new DatabaseContext())
{
/*
if (player.HasAttachment("ammobox"))
{
player.AddAttachment("ammobox", true);
player.StopAnimation();
}
*/
bool unloadedWeaponPackage = false;
List<UserItem> fItem = context.UserItems.Where(u => u.UserId == user.Id).ToList();

View File

@@ -102,7 +102,7 @@ namespace ReallifeGamemode.Server.Inventory
if (!player.HasAttachment("ammobox"))
{
player.PlayAnimation("anim@heists@box_carry@", "idle", 49);
player.AddAttachment("ammobox", false);
//player.AddAttachment("ammobox", false);
NAPI.Player.SetPlayerCurrentWeapon(player, WeaponHash.Unarmed);
}
}

View File

@@ -208,7 +208,7 @@ namespace ReallifeGamemode.Server.Job
Player target = data.getPartnerClient(player);
if (target != null) target.TriggerEvent("MuellmannUpdateColshape", colshapeIndex);
player.TriggerEvent("renderTextOnScreen", "Wirf den Müllsack in den Müllwagen.");
player.AddAttachment("binbag", false);
//player.AddAttachment("binbag", false);
return;
}
}
@@ -277,7 +277,7 @@ namespace ReallifeGamemode.Server.Job
}
dbContext.SaveChanges();
}
player.AddAttachment("binbag", true);
// player.AddAttachment("binbag", true);
if (player.GetUser(dbContext).trashcount >= 20)
{

View File

@@ -349,7 +349,7 @@ public class BehindVehiclePoint
if (!player.HasAttachment("ammobox"))
{
player.PlayAnimation("anim@heists@box_carry@", "idle", 49);
player.AddAttachment("ammobox", false);
//player.AddAttachment("ammobox", false);
NAPI.Player.SetPlayerCurrentWeapon(player, WeaponHash.Unarmed);
}
}

View File

@@ -137,7 +137,7 @@ public class AttachmentSyncExample : Script
player.AddAttachment(Base36Extensions.FromBase36(hash), true);
}
/* [Command("xdd")]
//[Command("xdd")]
public void attachment(Player player)
{
Vehicle veh = player.Vehicle;
@@ -152,7 +152,7 @@ public class AttachmentSyncExample : Script
veh.ClearAttachments();
}
}
*/
}