Lua functions

GetShardCharID

Registered in this checkout as EQ2Emu_lua_GetShardCharID; implementation found at WorldServer/Lua/LuaFunctions.cpp:14521.

Historical signature: GetShardCharID(ShardID)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: GetShardCharID(ShardID)

Description: Given a spirit shard’s ID, returns the character ID of the player who owns that shard.

Parameters:

  • npc (Spawn) - Spawn object representing npc.

Returns: UInt32 char id of the shards player.

Checked example

Active call in a local runtime Lua script. Argument count matches current fixed C++ readers. This is a contextual call pattern, not a tested standalone script.

local charID = GetShardCharID(NPC)

Evidence: server/SpawnScripts/Generic/SpiritShard.lua:15; binding EQ2Emu_lua_GetShardCharID.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.