Lua functions

GetShardID

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

Historical signature: GetShardID(npc)

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

Function: GetShardID(npc)

Description: Gets the shard database id of the Spawn.

Parameters:

  • npc (Spawn) - Spawn object representing npc.

Returns: UInt32 shard database id of the Spawn.

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 shardid = GetShardID(NPC)

Evidence: server/SpawnScripts/Generic/SpiritShard.lua:38; binding EQ2Emu_lua_GetShardID.

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