ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
| TUserMagic | | | | --- | --- | --- | | **属性名称** | **功能** | **功能** | | **属性** | | | | property Name: String; | Y | 技能名称 | | property Job: Byte; | Y | 职业(0:战士 1:法师 2:道士 3:刺客 4:弓箭手 5:和尚) | | property MagID: Word; | Y | 技能ID值 | | property Level: Byte; | | 技能修炼等级 | | property TranPoint: Integer; | | 技能当前等级修炼值 | | property UseTime: LongWord; | | 上次技能使用时间 | | property MagicInfo: TMagic; | | 技能数据库结,可访问技能的基础定义 | | property Strengthen: Byte; | | 强化技能等级(最高255) | 范例: ``` Unit Q28; Interface Uses Classes, SysUtils, DateUtils; Procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); Implementation Procedure Main(Npc: TNormNPC; Player: TPlayObject; Args: TArgs); Var AMag: TUserMagic; Begin AMag := Player.Findskill('魔法盾'); //获取魔法盾对象 If AMag <> Nil Then //首先判断是不是存在这个技能 Begin If AMag.Level = 0 Then Begin AMag.TranPoint := AMag.TranPoint + 10; //将修炼点+10 Player.Updatemagic(AMag); //技能更新后发送更新消息给客户端 End; End; End; End. ```