unit Q2;
interface
uses Classes, SysUtils;
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
implementation
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
var
I: Integer;
AItem: TUserItem;
begin
for I := 0 to Player.CustomItemCount - 1 do //循环取每个物品放置位置上的物品,Player.CustomItemCount表示当前自定义UI上可放置物品的格子总数
begin
AItem := Player.CustomItem[I];
if AItem <> nil then //如果物品不为空(即这个位置放入了物品)
begin
//做些事情!
end;
end;
end;
本站所有文章均为《龙引擎》原创,转载请注明出处来自https://www.longm2.cn/2998.html
暂无评论