Skip to content
Back to skills

Zinc Dual Index Pattern

ASecurity

War3Lib/Xlimon 的 Zinc/JASS 紧凑数组、尾部交换删除(swap-remove)与双索引/分组索引模式。 用于实现或 review 高频 create/destroy 的 Buff、Effect、Queue、中央计时器、按玩家分组列表、物品或召唤物紧凑表; 当需要 removeAt、O(1) 删除、遍历删除回退、并行数组同步 swap、或全局视图+分组视图索引一致性时使用。

  • 11 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
documentation

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add Crainax/War3Lib --skill zinc-dual-index-pattern --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Zinc Dual Index Pattern?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Zinc Dual Index Pattern
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/crainax-zinc-dual-index-pattern/badge)](https://www.skillsdirectory.com/skills/crainax-zinc-dual-index-pattern)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: zinc-dual-index-pattern
description: >
  War3Lib/Xlimon 的 Zinc/JASS 紧凑数组、尾部交换删除(swap-remove)与双索引/分组索引模式。
  用于实现或 review 高频 create/destroy 的 Buff、Effect、Queue、中央计时器、按玩家分组列表、物品或召唤物紧凑表;
  当需要 removeAt、O(1) 删除、遍历删除回退、并行数组同步 swap、或全局视图+分组视图索引一致性时使用。
---

# Zinc 双重索引 + 紧凑数组模式(War3Lib/Xlimon)

按需加载参考文档;先根据当前仓库选择对应示例,再实现:

- **紧凑遍历**:数组无空洞,`for` 遍历不需要跳过空位
- **O(1) 删除**:用尾部交换(swap-remove)移除元素
- **双视图索引**:同一实例同时存在于“全局列表”和“分组列表”,并能分别遍历/查询

## 仓库分流

- 当前仓库是 War3Lib 时,优先读取 `references/war3lib-examples.md`。
- 当前仓库是 Xlimon 时,优先读取 `references/xlimon-examples.md`;不要把 War3Lib 文件名、类型名或示例路径机械搬入地图项目。
- 通用算法与检查项使用其余 references;并行数组发生 swap 时必须同步更新所有列与反向索引。

## References(按需打开)

- `references/overview.md`
- `references/swap-remove.md`
- `references/dual-index-template.md`
- `references/war3lib-examples.md`
- `references/xlimon-examples.md`
- `references/checklist.md`

Files in this skill

  • SKILL.md1004 B
  • references/checklist.md1.1 KB
  • references/dual-index-template.md2.8 KB
  • references/overview.md2 KB
  • references/swap-remove.md1.9 KB
  • references/war3lib-examples.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.