56 lines
2.0 KiB
C#
56 lines
2.0 KiB
C#
using BrewMonster;
|
|
using BrewMonster.Scripts;
|
|
using BrewMonster.Scripts.Managers;
|
|
using ModelRenderer.Scripts.GameData;
|
|
|
|
public partial class CECHostPlayer
|
|
{
|
|
public int[] m_aEquips = new int[InventoryConst.IVTRSIZE_EQUIPPACK];
|
|
|
|
public bool UpdateEquipSkins()
|
|
{
|
|
var equipPack = EC_Inventory.GetPack(EC_Inventory.IVTRTYPE_EQUIPPACK);
|
|
|
|
int[] aNewEquips = new int[InventoryConst.IVTRSIZE_EQUIPPACK];
|
|
EC_IvtrItem pItem = null;
|
|
for (int i = 0; i < InventoryConst.IVTRSIZE_EQUIPPACK; i++)
|
|
{
|
|
|
|
if (equipPack.TryGetValue(i, out pItem))
|
|
{
|
|
aNewEquips[i] = pItem.m_tid;
|
|
}
|
|
}
|
|
|
|
ShowEquipments(aNewEquips, true, true);
|
|
|
|
return true;
|
|
}
|
|
|
|
public void ShowEquipments(int[] pEquipmentID, bool bLoadAtOnce, bool bForceLoad)
|
|
{
|
|
var elemendataman = BrewMonster.ElementDataManProvider.GetElementDataMan();
|
|
DATA_TYPE DataType = default;
|
|
for (int i = 0; i < InventoryConst.IVTRSIZE_EQUIPPACK; i++)
|
|
{
|
|
if (pEquipmentID[i] != m_aEquips[i])
|
|
{
|
|
// new equipment. Need to load and equip to host player
|
|
var equipData = elemendataman.get_data_ptr((uint)pEquipmentID[i], ID_SPACE.ID_SPACE_ESSENCE, ref DataType);
|
|
switch (DataType)
|
|
{
|
|
case DATA_TYPE.DT_WEAPON_ESSENCE:
|
|
var weaponData = (WEAPON_ESSENCE)equipData;
|
|
BMLogger.Log($"ShowEquipments():: Weapon Essence: {weaponData.FileModelRight} -- {weaponData.FileModelLeft}");
|
|
break;
|
|
case DATA_TYPE.DT_ARMOR_ESSENCE:
|
|
var armorData = (ARMOR_ESSENCE)equipData;
|
|
BMLogger.Log($"ShowEquipments():: Armor Essence: {armorData.RealName}");
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |