92 lines
3.1 KiB
C#
92 lines
3.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using System.IO;
|
|
using BrewMonster;
|
|
using ModelRenderer.Scripts.Common;
|
|
using ModelRenderer.Scripts.GameData;
|
|
using UnityEngine;
|
|
using PerfectWorld.Scripts.Managers;
|
|
using BrewMonster.Network;
|
|
using BrewMonster.Scripts.Managers;
|
|
using BrewMonster.Scripts;
|
|
using CSNetwork.GPDataType;
|
|
using System.Runtime.InteropServices;
|
|
namespace BrewMonster.Scripts
|
|
{
|
|
public class EC_IvtrStone : EC_IvtrItem
|
|
{
|
|
// Data in database
|
|
protected STONE_SUB_TYPE m_pDBSubType;
|
|
protected STONE_ESSENCE m_pDBEssence;
|
|
/// <summary>
|
|
/// Not create logic yet (add summary later)
|
|
/// </summary>
|
|
/// <param name="tid">Template id</param>
|
|
/// <param name="expire_date">Expire date</param>
|
|
public EC_IvtrStone(int tid, int expire_date) : base(tid, expire_date)
|
|
{
|
|
m_iCID = (int)EC_IvtrEquip.EQUIP_CLASS_ID.ICID_STONE;
|
|
|
|
// Get database data
|
|
elementdataman pDB = ElementDataManProvider.GetElementDataMan();
|
|
DATA_TYPE DataType = default;
|
|
m_pDBEssence = (STONE_ESSENCE)pDB.get_data_ptr((uint)tid, ID_SPACE.ID_SPACE_ESSENCE,ref DataType);
|
|
// m_pDBSubType = (STONE_SUB_TYPE*)pDB->get_data_ptr(m_pDBEssence->id_sub_type, ID_SPACE_ESSENCE, DataType);
|
|
|
|
m_iPileLimit = m_pDBEssence.pile_num_max;
|
|
m_iPrice = m_pDBEssence.price;
|
|
m_iShopPrice = m_pDBEssence.shop_price;
|
|
m_iProcType = (int)m_pDBEssence.proc_type;
|
|
m_i64EquipMask = 0;
|
|
m_bEmbeddable = true;
|
|
|
|
m_bNeedUpdate = false;
|
|
}
|
|
|
|
public EC_IvtrStone(EC_IvtrStone other) : base(other)
|
|
{
|
|
m_pDBEssence = other.m_pDBEssence;
|
|
m_pDBSubType= other.m_pDBSubType;
|
|
}
|
|
|
|
public STONE_ESSENCE GetDBEssence() { return m_pDBEssence; }
|
|
public override bool SetItemInfo(byte[] pInfoData, int iDataLen)
|
|
{
|
|
base.SetItemInfo(pInfoData, iDataLen);
|
|
return true;
|
|
}
|
|
public override string GetIconFile()
|
|
{
|
|
return m_pDBEssence.FileIcon;
|
|
}
|
|
public override string GetName()
|
|
{
|
|
return m_pDBEssence.Name;
|
|
}
|
|
protected override string GetNormalDesc(bool bRepair)
|
|
{
|
|
m_strDesc = "";
|
|
CECStringTab pDescTab = EC_Game.GetItemDesc();
|
|
int white = (int)DescriptipionMsg.ITEMDESC_COL_WHITE;
|
|
int namecol = DecideNameCol();
|
|
if (m_iCount > 1)
|
|
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAMENUMBER), GetName(), m_iCount);
|
|
else
|
|
AddDescText(namecol, true, pDescTab.GetWideString((int)DescriptipionMsg.ITEMDESC_NAME), GetName());
|
|
AddIDDescText();
|
|
AddExpireTimeDesc();
|
|
AddPriceDesc(white, bRepair);
|
|
AddExtDescText();
|
|
return m_strDesc;
|
|
|
|
}
|
|
public override string GetDropModel()
|
|
{
|
|
return m_pDBEssence.FileMatter;
|
|
}
|
|
|
|
}
|
|
}
|
|
|