Cleanup, probable bug fixes with floating numbers, and some other quick fixes
This commit is contained in:
parent
018311cdb8
commit
d75a396bed
@ -69,10 +69,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ActorSystem.Implementations
|
|||||||
player.Inventory.GetBag().GrabSomeItems(-110888638, 1);
|
player.Inventory.GetBag().GrabSomeItems(-110888638, 1);
|
||||||
if (!World.Game.IsHardcore)
|
if (!World.Game.IsHardcore)
|
||||||
player.Inventory.RemoveGoldAmount(250000);
|
player.Inventory.RemoveGoldAmount(250000);
|
||||||
if (FastRandom.Instance.Next(100) < chance)
|
World.SpawnRandomEquip(player, player,
|
||||||
World.SpawnRandomEquip(player, player, LootManager.Epic, player.Level);
|
FastRandom.Instance.Next(100) < chance ? LootManager.Epic : LootManager.Rare, player.Level);
|
||||||
else
|
|
||||||
World.SpawnRandomEquip(player, player, LootManager.Rare, player.Level);
|
|
||||||
|
|
||||||
var toon = player.Toon.DBToon;
|
var toon = player.Toon.DBToon;
|
||||||
toon.ChestsOpened++;
|
toon.ChestsOpened++;
|
||||||
|
|||||||
@ -62,7 +62,11 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
|
|
||||||
public ItemTypeTable ItemType => ItemGroup.FromHash(ItemDefinition.ItemTypesGBID);
|
public ItemTypeTable ItemType => ItemGroup.FromHash(ItemDefinition.ItemTypesGBID);
|
||||||
|
|
||||||
public bool Unidentified = false;
|
public bool Unidentified
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
public int EquipGemType
|
public int EquipGemType
|
||||||
{
|
{
|
||||||
@ -81,11 +85,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
|
|
||||||
public int Rating
|
public int Rating
|
||||||
{
|
{
|
||||||
get
|
get => AffixList.Select(a => a.Rating).Sum() + (int)Gems.Select(g => g.ItemDefinition.Cost * 6f).Sum();
|
||||||
{
|
set => Logger.Warn("Rating is readonly");
|
||||||
return AffixList.Select(a => a.Rating).Sum() + (int)Gems.Select(g => g.ItemDefinition.Cost * 6f).Sum();
|
|
||||||
}
|
|
||||||
set { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public D3.Items.RareItemName RareItemName = null;
|
public D3.Items.RareItemName RareItemName = null;
|
||||||
@ -94,8 +95,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
|
|
||||||
public int EquipmentSlot { get; private set; }
|
public int EquipmentSlot { get; private set; }
|
||||||
|
|
||||||
public Vector2D
|
public Vector2D InventoryLocation
|
||||||
InventoryLocation
|
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
private set;
|
private set;
|
||||||
@ -186,7 +186,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
|
|
||||||
if (AffixList.Count > 0)
|
if (AffixList.Count > 0)
|
||||||
{
|
{
|
||||||
if (Attributes[GameAttribute.Requirement, 57] != AffixList[0].Definition.OverrideLevelReq &&
|
if (Math.Abs(Attributes[GameAttribute.Requirement, 57] - AffixList[0].Definition.OverrideLevelReq) > 0.001 &&
|
||||||
AffixList[0].Definition.OverrideLevelReq != 0)
|
AffixList[0].Definition.OverrideLevelReq != 0)
|
||||||
Attributes[GameAttribute.Requirement, 57] = AffixList[0].Definition.OverrideLevelReq;
|
Attributes[GameAttribute.Requirement, 57] = AffixList[0].Definition.OverrideLevelReq;
|
||||||
foreach (var affix in AffixList)
|
foreach (var affix in AffixList)
|
||||||
@ -226,7 +226,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
Attributes[GameAttribute.TeamID] = 0;
|
Attributes[GameAttribute.TeamID] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item(World world, ItemTable definition, int ForceQualityLevel = -1, bool crafted = false, int seed = -1)
|
public Item(World world, ItemTable definition, int forceQualityLevel = -1, bool crafted = false, int seed = -1)
|
||||||
: base(world, (ActorSno)definition.SNOActor)
|
: base(world, (ActorSno)definition.SNOActor)
|
||||||
{
|
{
|
||||||
GBHandle.GBID = definition.Hash;
|
GBHandle.GBID = definition.Hash;
|
||||||
@ -244,8 +244,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
Attributes[GameAttribute.Item_Quality_Level] = 3;
|
Attributes[GameAttribute.Item_Quality_Level] = 3;
|
||||||
if (definition.Name.ToLower().Contains("unique") || definition.Quality == ItemTable.ItemQuality.Legendary)
|
if (definition.Name.ToLower().Contains("unique") || definition.Quality == ItemTable.ItemQuality.Legendary)
|
||||||
Attributes[GameAttribute.Item_Quality_Level] = 9;
|
Attributes[GameAttribute.Item_Quality_Level] = 9;
|
||||||
if (ForceQualityLevel > -1)
|
if (forceQualityLevel > -1)
|
||||||
Attributes[GameAttribute.Item_Quality_Level] = ForceQualityLevel;
|
Attributes[GameAttribute.Item_Quality_Level] = forceQualityLevel;
|
||||||
if (definition.SNOSet != -1) Attributes[GameAttribute.Item_Quality_Level] = 9;
|
if (definition.SNOSet != -1) Attributes[GameAttribute.Item_Quality_Level] = 9;
|
||||||
|
|
||||||
if (ItemDefinition.Name.ToLower().Contains("unique_gem"))
|
if (ItemDefinition.Name.ToLower().Contains("unique_gem"))
|
||||||
@ -355,7 +355,7 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
a = Attributes[GameAttribute.Requirement, 57];
|
a = Attributes[GameAttribute.Requirement, 57];
|
||||||
}
|
}
|
||||||
|
|
||||||
//Жесткая перепись требуемого уровня для легендарного оружия, в случае его бага на 70 лвл.
|
// Hard rewrite of the required level for legendary weapons, in case of its bug on 70 lvls.
|
||||||
if (Attributes[GameAttribute.Item_Quality_Level] > 8)
|
if (Attributes[GameAttribute.Item_Quality_Level] > 8)
|
||||||
if (Attributes[GameAttribute.Requirement, 57] == 0)
|
if (Attributes[GameAttribute.Requirement, 57] == 0)
|
||||||
Attributes[GameAttribute.Item_Level_Requirement_Override] = 1;
|
Attributes[GameAttribute.Item_Level_Requirement_Override] = 1;
|
||||||
@ -375,15 +375,15 @@ namespace DiIiS_NA.GameServer.GSSystem.ItemsSystem
|
|||||||
Attributes[GameAttribute.Unidentified] = false;
|
Attributes[GameAttribute.Unidentified] = false;
|
||||||
|
|
||||||
Owner.World.Game.GameDBSession.SessionUpdate(DBInventory);
|
Owner.World.Game.GameDBSession.SessionUpdate(DBInventory);
|
||||||
if (Owner is Player)
|
if (Owner is Player player)
|
||||||
{
|
{
|
||||||
Unreveal(Owner as Player);
|
Unreveal(player);
|
||||||
Reveal(Owner as Player);
|
Reveal(player);
|
||||||
if (ItemDefinition.Name.Contains("Unique"))
|
if (ItemDefinition.Name.Contains("Unique"))
|
||||||
{
|
{
|
||||||
((Player)Owner).UniqueItemIdentified(DBInventory.Id);
|
player.UniqueItemIdentified(DBInventory.Id);
|
||||||
//if (Program.MaxLevel == 70)
|
//if (Program.MaxLevel == 70)
|
||||||
((Player)Owner).UnlockTransmog(ItemDefinition.Hash);
|
player.UnlockTransmog(ItemDefinition.Hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
user.block.title