跳转至

Zig:玩家

Player

Zig
1
2
3
4
5
pub const Player = struct {
    sel_kind: SelKind,
    sel_value: []const u8,
    // ...
};

一名玩家,由选择器指定。

Player.byName

Zig
pub fn byName(sel_name: []const u8) Player
  • 参数:
    • sel_name : []const u8
  • 返回值类型:Player

Player.byXuid

Zig
pub fn byXuid(sel_xuid: []const u8) Player
  • 参数:
    • sel_xuid : []const u8
  • 返回值类型:Player

Player.byUuid

Zig
pub fn byUuid(sel_uuid: []const u8) Player
  • 参数:
    • sel_uuid : []const u8
  • 返回值类型:Player

Player.cSel

Zig
pub fn cSel(self: Player) core.c.PierPlayerSel
  • 返回值类型:core.c.PierPlayerSel

Player.gameType

Zig
pub fn gameType(self: Player) core.Error!f64

PIER_PPROP_GAME_TYPE:(G) Player::getPlayerGameType;写入用 player_set_gamemode

Player.level

Zig
pub fn level(self: Player) core.Error!f64

PIER_PPROP_LEVEL:(S) 属性 Player::LEVEL()

Player.setLevel

Zig
pub fn setLevel(self: Player, new_value: f64) core.Error!void

写入 PIER_PPROP_LEVEL:(S) 属性 Player::LEVEL()

  • 参数:
    • new_value : f64
  • 返回值类型:core.Error!void
  • 对应槽位:player_set_num

Player.experience

Zig
pub fn experience(self: Player) core.Error!f64

PIER_PPROP_EXPERIENCE:(S) 属性 Player::EXPERIENCE()(经验条进度,0 到 1)

Player.setExperience

Zig
pub fn setExperience(self: Player, new_value: f64) core.Error!void

写入 PIER_PPROP_EXPERIENCE:(S) 属性 Player::EXPERIENCE()(经验条进度,0 到 1)

  • 参数:
    • new_value : f64
  • 返回值类型:core.Error!void
  • 对应槽位:player_set_num

Player.hunger

Zig
pub fn hunger(self: Player) core.Error!f64

PIER_PPROP_HUNGER:(S) 属性 Player::HUNGER()

Player.setHunger

Zig
pub fn setHunger(self: Player, new_value: f64) core.Error!void

写入 PIER_PPROP_HUNGER:(S) 属性 Player::HUNGER()

  • 参数:
    • new_value : f64
  • 返回值类型:core.Error!void
  • 对应槽位:player_set_num

Player.saturation

Zig
pub fn saturation(self: Player) core.Error!f64

PIER_PPROP_SATURATION:(S) 属性 Player::SATURATION()

Player.setSaturation

Zig
pub fn setSaturation(self: Player, new_value: f64) core.Error!void

写入 PIER_PPROP_SATURATION:(S) 属性 Player::SATURATION()

  • 参数:
    • new_value : f64
  • 返回值类型:core.Error!void
  • 对应槽位:player_set_num

Player.exhaustion

Zig
pub fn exhaustion(self: Player) core.Error!f64

PIER_PPROP_EXHAUSTION:(S) 属性 Player::EXHAUSTION()

Player.setExhaustion

Zig
pub fn setExhaustion(self: Player, new_value: f64) core.Error!void

写入 PIER_PPROP_EXHAUSTION:(S) 属性 Player::EXHAUSTION()

  • 参数:
    • new_value : f64
  • 返回值类型:core.Error!void
  • 对应槽位:player_set_num

Player.xpNeededNextLevel

Zig
pub fn xpNeededNextLevel(self: Player) core.Error!f64

PIER_PPROP_XP_NEEDED_NEXT_LEVEL:(G) Player::getXpNeededForNextLevel

Player.luck

Zig
pub fn luck(self: Player) core.Error!f64

PIER_PPROP_LUCK:(G) Player::getLuck

Player.selectedSlot

Zig
pub fn selectedSlot(self: Player) core.Error!f64

PIER_PPROP_SELECTED_SLOT:(G) Player::getSelectedItemSlot;设置用 PIER_PACT_SET_SELECTED_SLOT

Player.isOperator

Zig
pub fn isOperator(self: Player) core.Error!bool

PIER_PPROP_IS_OPERATOR:(G) Player::isOperator

Player.canUseOperatorBlocks

Zig
pub fn canUseOperatorBlocks(self: Player) core.Error!bool

PIER_PPROP_CAN_USE_OPERATOR_BLOCKS:(G) Player::canUseOperatorBlocks

Player.isFlying

Zig
pub fn isFlying(self: Player) core.Error!bool

PIER_PPROP_IS_FLYING:(G) Player::isFlying

Player.canJump

Zig
pub fn canJump(self: Player) core.Error!bool

PIER_PPROP_CAN_JUMP:(G) Player::canJump

Player.isEmoting

Zig
pub fn isEmoting(self: Player) core.Error!bool

PIER_PPROP_IS_EMOTING:(G) Player::isEmoting

Player.isInRaid

Zig
pub fn isInRaid(self: Player) core.Error!bool

PIER_PPROP_IS_IN_RAID:(G) Player::isInRaid

Player.isHurt

Zig
pub fn isHurt(self: Player) core.Error!bool

PIER_PPROP_IS_HURT:(G) Player::isHurt

Player.isScoping

Zig
pub fn isScoping(self: Player) core.Error!bool

PIER_PPROP_IS_SCOPING:(G) Player::isScoping

Player.canSleep

Zig
pub fn canSleep(self: Player) core.Error!bool

PIER_PPROP_CAN_SLEEP:(G) Player::canSleep

Player.hasRespawnPosition

Zig
pub fn hasRespawnPosition(self: Player) core.Error!bool

PIER_PPROP_HAS_RESPAWN_POSITION:(G) Player::hasRespawnPosition

Player.clientSubId

Zig
pub fn clientSubId(self: Player) core.Error!f64

PIER_PPROP_CLIENT_SUB_ID:(G) Player::getClientSubId

Player.canUseAbility

Zig
pub fn canUseAbility(self: Player) core.Error!bool

PIER_PPROP_CAN_USE_ABILITY:(G) Player::canUseAbility;能力编号要经 player_action 的读取路径传入,见 PIER_PACT_CAN_USE_ABILITY

Player.direction

Zig
pub fn direction(self: Player) core.Error!f64

PIER_PPROP_DIRECTION:(G) Player::getDirection(0=南,1=西,2=北,3=东)

Player.chunkRadius

Zig
pub fn chunkRadius(self: Player) core.Error!f64

PIER_PPROP_CHUNK_RADIUS:(G) Player::getChunkRadius

Player.networkRtt

Zig
pub fn networkRtt(self: Player) core.Error!f64

PIER_PPROP_NETWORK_RTT:(G) getNetworkStatus().mPing(毫秒)

Player.platform

Zig
pub fn platform(self: Player) core.Error!f64

PIER_PPROP_PLATFORM:(G) Player::getPlatform

Player.enchantmentSeed

Zig
pub fn enchantmentSeed(self: Player) core.Error!f64

PIER_PPROP_ENCHANTMENT_SEED:(G) Player::getEnchantmentSeed

Player.isUsingItem

Zig
pub fn isUsingItem(self: Player) core.Error!bool

PIER_PPROP_IS_USING_ITEM:(G) Player::isUsingItem

Player.isBlocking

Zig
pub fn isBlocking(self: Player) core.Error!bool

PIER_PPROP_IS_BLOCKING:(G) Player::isBlocking

Player.isGliding

Zig
pub fn isGliding(self: Player) core.Error!bool

PIER_PPROP_IS_GLIDING:(G) Player::isGliding

Player.isSwimming

Zig
pub fn isSwimming(self: Player) core.Error!bool

PIER_PPROP_IS_SWIMMING:(G) Player::isSwimming

Player.permissionLevel

Zig
pub fn permissionLevel(self: Player) core.Error!f64

PIER_PPROP_PERMISSION_LEVEL:(G) Player::getPlayerPermissionLevel

Player.score

Zig
pub fn score(self: Player) core.Error!f64

PIER_PPROP_SCORE:(G) Player::getScore

Player.fallDistance

Zig
pub fn fallDistance(self: Player) core.Error!f64

PIER_PPROP_FALL_DISTANCE:(G) Actor::getFallDistance

Player.isDead

Zig
pub fn isDead(self: Player) core.Error!bool

PIER_PPROP_IS_DEAD:(G) Actor::isDead

Player.hasDiedBefore

Zig
pub fn hasDiedBefore(self: Player) core.Error!bool

PIER_PPROP_HAS_DIED_BEFORE:(G) Player::hasDiedBefore

Player.dimension

Zig
pub fn dimension(self: Player) core.Error!f64

PIER_PPROP_DIMENSION:(G) Actor::getDimensionId

Player.realName

Zig
pub fn realName(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_REAL_NAME:取自 Player::getRealName

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.uuid

Zig
pub fn uuid(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_UUID:取自 Player::getUuid().asString()

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.xuid

Zig
pub fn xuid(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_XUID:取自 Player::getXuid

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.ipAndPort

Zig
pub fn ipAndPort(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_IP_AND_PORT:取自 Player::getIPAndPort

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.localeCode

Zig
pub fn localeCode(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_LOCALE_CODE:取自 Player::getLocaleCode

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.nameTag

Zig
pub fn nameTag(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_NAME_TAG:取自 Actor::getNameTag(显示名)

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.lastDeathPos

Zig
pub fn lastDeathPos(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_LAST_DEATH_POS:SNBT {x,y,z};没有时为 ""

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.lastDeathDimension

Zig
pub fn lastDeathDimension(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_LAST_DEATH_DIMENSION:维度 id,以字符串表示

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.networkStatus

Zig
pub fn networkStatus(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_NETWORK_STATUS:SNBT {ping,avg_ping,packet_loss,max_ping}

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.platformOnlineId

Zig
pub fn platformOnlineId(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_PLATFORM_ONLINE_ID:取自 Player::getPlatformOnlineId

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.respawnPos

Zig
pub fn respawnPos(self: Player, allocator: std.mem.Allocator) core.Error![]u8

PIER_PSTR_RESPAWN_POS:SNBT {x,y,z,dim}:这名玩家会在哪里重生。不会为空:没有床的玩家报告的是世界出生点,这两种情况区分不开。

  • 参数:
    • allocator : std.mem.Allocator
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_get_str

Player.setAbility

Zig
pub fn setAbility(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_ABILITY:a 为 AbilitiesIndex,b 为 0 或 1(布尔类的能力)或者浮点数(FlySpeed 等)。写完以后会把 PlayerPermissionLevel 恢复成写之前的值:引擎的 LayeredAbilities::setAbility 走的是「切换到自定义权限」那条路,会把玩家推到 Custom,而这个等级会和能力层一起放进 UpdateAbilitiesPacket 发给客户端。要改权限等级,用 PIER_PACT_SET_PERMISSION_LEVEL。玩家加入完成之前(Player::isPlayerInitialized)调用会被拒绝,返回 false:客户端还在加载时写入的能力会一直不同步,直到玩家重新进入。模拟玩家不受这个限制。

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.canUseAbilityAction

Zig
pub fn canUseAbilityAction(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_CAN_USE_ABILITY:a 为 AbilitiesIndex,输出 "0" 或 "1",调用 Player::canUseAbility

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.setSelectedSlot

Zig
pub fn setSelectedSlot(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_SELECTED_SLOT:a 为槽位,调用 Player::setSelectedSlot

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.giveItem

Zig
pub fn giveItem(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_GIVE_ITEM:sarg 为物品 SNBT,经 ItemStack::fromTag 和 Player::addAndRefresh 给出

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.setSpawnPoint

Zig
pub fn setSpawnPoint(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_SPAWN_POINT:a、b、c 为坐标,sarg 为维度 id(任何已注册的维度都可以);原生调用 Player::setRespawnPosition

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.clearTitle

Zig
pub fn clearTitle(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_CLEAR_TITLE:原生发送 SetTitlePacket(Clear)

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.setTitle

Zig
pub fn setTitle(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_TITLE:sarg 为文本,a 为位置(0 主标题,1 副标题,2 动作栏);原生发送 SetTitlePacket,文本原样发送

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.addExperience

Zig
pub fn addExperience(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_ADD_EXPERIENCE:a 为经验值,调用 Player::addExperience

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.addLevels

Zig
pub fn addLevels(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_ADD_LEVELS:a 为等级数,调用 Player::addLevels

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.startCooldown

Zig
pub fn startCooldown(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_START_COOLDOWN:sarg 为物品名,a 为刻数,调用 Player::startItemCooldown

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.startRiding

Zig
pub fn startRiding(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_START_RIDING:a 为坐骑的 ActorUniqueID(低 64 位),调用 Player::startRiding

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.stopRiding

Zig
pub fn stopRiding(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_STOP_RIDING:调用 Player::stopRiding

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.attack

Zig
pub fn attack(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_ATTACK:a 为目标的 ActorUniqueID(低 64 位),调用 Player::attack

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.drop

Zig
pub fn drop(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_DROP:sarg 为物品 SNBT,a 为是否随机抛出(0 或 1),调用 Player::drop

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.interact

Zig
pub fn interact(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_INTERACT:a 为目标的 ActorUniqueID,调用 Player::interact

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.startUsingItem

Zig
pub fn startUsingItem(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_START_USING_ITEM:sarg 为物品 SNBT,a 为持续时间,调用 Player::startUsingItem

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.stopUsingItem

Zig
pub fn stopUsingItem(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_STOP_USING_ITEM:调用 Player::stopUsingItem

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.setChunkRadius

Zig
pub fn setChunkRadius(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_CHUNK_RADIUS:a 为半径,调用 Player::setChunkRadius

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.setEnchantmentSeed

Zig
pub fn setEnchantmentSeed(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_ENCHANTMENT_SEED:a 为种子,调用 Player::setEnchantmentSeed

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.registerTrackedBoss

Zig
pub fn registerTrackedBoss(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_REGISTER_TRACKED_BOSS:a 为 Boss 的 ActorUniqueID,调用 Player::registerTrackedBoss

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.unregisterTrackedBoss

Zig
pub fn unregisterTrackedBoss(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_UNREGISTER_TRACKED_BOSS:a 为 Boss 的 ActorUniqueID,调用 Player::unRegisterTrackedBoss

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.playEmote

Zig
pub fn playEmote(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_PLAY_EMOTE:sarg 为表情的 id,调用 Player::playEmote

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.resendAllChunks

Zig
pub fn resendAllChunks(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_RESEND_ALL_CHUNKS:调用 Player::resendAllChunks

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.openInventory

Zig
pub fn openInventory(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_OPEN_INVENTORY:调用 Player::openInventory

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.sidebarSet

Zig
pub fn sidebarSet(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SIDEBAR_SET:sarg 为 "obj\ntitle\nline…",只对这名玩家显示的侧边栏

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.sidebarClear

Zig
pub fn sidebarClear(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SIDEBAR_CLEAR:sarg 为计分项,发送 RemoveObjectivePacket

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

Player.setPermissionLevel

Zig
pub fn setPermissionLevel(self: Player, allocator: std.mem.Allocator, s_arg: []const u8, n_a: f64, n_b: f64, n_c: f64) core.Error![]u8

PIER_PACT_SET_PERMISSION_LEVEL:a 为 PlayerPermissionLevel(0 Visitor,1 Member,2 Operator,3 Custom)。调用 LayeredAbilities::setPlayerPermissions 并发送 UpdateAbilitiesPacket。读取一侧是 PIER_PPROP_PERMISSION_LEVEL。和 PIER_PACT_SET_ABILITY 一样,玩家加入完成之前调用会被拒绝。

这个动作有输出时,输出就是返回值;每个参数的含义写在 abi.h 里这个常量的注释中。

  • 参数:
    • allocator : std.mem.Allocator
    • s_arg : []const u8
    • n_a : f64
    • n_b : f64
    • n_c : f64
  • 返回值类型:core.Error![]u8
  • 对应槽位:player_action

SelKind

Zig
1
2
3
pub const SelKind = enum(i32) {
    name = 0, xuid = 1, uuid = 2
};

Player 选择器用什么来指定玩家。关于权限、金钱或归属的判断,要以 xuid 为键:名字会换主人。