TUserItem
TUserItem 属性名称 功能 属性 property Name: String 数据库中物品名称 property DisplayName: String 物品在客户端显示的名称(过滤了属性字符及末尾的数字) property Job: Byte 和物品数据库字段值对应,_DuraMax为数据库字段DuraMax property StdMode: Byte property Shape: Byte property AniCount: Byte property Source: ShortInt property Need: Byte property NeedLevel: Integer property Price: Integer property _DuraMax: Integer property Price2: Integer 物品当前卖出价格,受持久、极品属性及数量等因素影响 property MakeIndex: int64 物品唯一ID值 property ItemIndex: Word 物品数据库中此物品序号 property Dura: Integer 当前持久(可叠加物品为数量) property DuraMax: Integer 最大持久 property MaxDate: TDateTime 到期时间(0为无限制) property Color: Byte 物品颜色(0-255,可在版本工具中预览颜色) property State : TItemState; 物品特殊设置类,详情查看TItemState类 property AddLAC: Word 增加防御点数下限 property AddLMAC: Word 增加魔法防御点数下限 property AddLDC: Word 增加攻击点数下限 property AddLMC: Word 增加魔法点数下限 property AddLSC: Word 增加道术点数下限 property AddLTC: Word 增加的射术点数下限 property AddLPC: Word 增加的刺术点数下限 property AddLWC: Word 增加的武术点数下限 property AddAC: Word 增加防御点数上限 property AddMAC: Word 增加魔法防御点数上限 property AddDC: Word 增加攻击点数上限 property AddMC: Word 增加魔法点数上限 property AddSC: Word 增加道术点数上限 property AddTC: Word 增加的射术点数上限 property AddPC: Word 增加的刺术点数上限 property AddWC: Word 增加的武术点数上限 property AddHitPoint: Byte 准确点 property AddHitSpeed: Byte 攻击速度 property AddSpeedPoint: Byte 敏捷 property AddAntiMagic: Byte 魔法躲避 property AddAntiPoison: Byte 中毒躲避 property AddHealthRecover: Byte 体力回复 property AddSpellRecover: Byte 魔法恢复 property AddPoisonRecover: Byte 中毒恢复 property AddLuck: Byte 幸运值 property Upgrade: Byte 已强化次数 property MaxUpgrade: Byte 最大可强化次数 property OpenedSoul: Boolean 是否开启了魂炼(注意和开启魂炼函数OpenSoul的区别) property SoulLevel: Byte 魂炼等级 property SoulExp: Integer 当前魂炼经验值 property SoulMaxExp: Integer 当前等级的最大魂炼经验值 property EffectType: Byte 物品特效 property TotalAbility: Integer 物品战斗力 property AddPoint[Index: int64 ]: TAddPointItem 附加属性值,Index为0-6,表示一共可指定最大7个附加属性 property AddLevel[Index: int64 ]: TAddLevelItem 强化属性,index为0-5,表示一共可支持6个强化属性 property AddHold[Index: Integer ]: Integer 打孔状态,Index为0-5,分别表示第一到第6个孔,值为-1表示没开孔,0表示已开孔,大于0则表示镶嵌的宝石的数据库序号 UserItem.OutWay[const index:integer]:word; 修改物品的产出途径 对应的文字提示在 版本管理器 扩展数据库 物品产出类型对照表 即可对其进行编辑 ,支持[0..40]共41条,如果输入文本中有{S=Line},将自动画一条装备属性背景中的分割线 UserItem.OutWay2[const index:integer]:integer; outway2[0..41]的值必须在物品自定义备注对照表中添加关键字Value才会显示。
举例说明item.outway[0]:=100; 对照表中此处文字为 {S=神力附体 HP+:$OUTWAY2$;c=251}; 则客户端会自动解析outway2[0]的值替换$OUTWAY2$这一关键字给客户端显示 。
UserItem.OutWay3[const index:integer]:integer; outway3[0..41]的值必须在物品自定义备注对照表中添加关键字$OUTWAY3$才会显示。
举例说明item.outway[0]:=100; 对照表中此处文字为 {S=神力附体 HP+:$OUTWAY3$;c=251}; 则客户端会自动解析outway3[0]的值替换$OUTWAY3$这一关键字给客户端显示 。
function CustomEffect: Word; 改变自定义特效。使用版本管理器内的特效配置ID 进行修改。 property CanInQuickBar : Boolean; 动态修改物品是否可以放入快捷栏 property CustomCaption[Index:Integer]: String; 物品来源字段设置功能 0-2 property DropEff: Word; 地面掉落特效,取DropEff.data文件中每10个图片为一组,显示为地面掉落特效 从1开始 0为无特效 property FromDateTime: TDateTime; 物品产出时间 函数名称 功能 函数 function Rename(const NewName: String ): Boolean ; 装备改名,返回改名是否成功 function RevertName: Boolean ; 将已改名的装备还原为物品数据库的名称 function MakeHole: Boolean ; 开一个孔,最多可以开3个孔 function OpenSoul: Boolean ; 开启魂炼功能 function CopyFrom(Source: TUserItem): Boolean ; 从另外一个物品拷贝属性 function MakeString : String ; 将装备格式化为属性字符串,供客户端显示用
范例:
{
示例中使用了DateUtils单元,此单元为系统处理日期的单元,在单元use段必须引用此单元
}
unit Q28;
interface
uses Classes, SysUtils, DateUtils;
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
implementation
procedure Main(Npc: TNormNPC; Player: TPlayObject; Args: TArgs);
begin
if Player.Wepon <> nil then
begin
Player.Wepon.state.Bind := True; //装备为绑定状态
Player.Wepon.MaxDate := DateUtils.IncDay(Now, 7); //武器的有效期为当前时间加7天
Player.Wepon.MakeHole; //打一个孔,如果已开3孔则无效
Player.UpdateItem(Player.Wepon); //任何装备的属性更新,最后都必须给客户端发送更新消息
end;
end;
end.
引擎官网:www.91M2.com 交流群:5555999 此引擎仅供测试,切勿用于商业用途。如有侵权请立即联系我们,我们将在第一时间删除。