Function: AddLanguage(Player, LanguageID)
Description:
Grants a language from the master languages catalogue to the original Player and adds its matching language skill when available.
Parameters:
Player: Spawn - The Player receiving the language.LanguageID: int32 - Language database ID. Missing definitions do not grant a row.
Returns: None.
Behavior and ownership: The operation copies the language definition and name before skill callbacks. Player language admission coalesces the same ID under its list lock, so reentrant or concurrent grants do not create duplicate rows or repeat the language save. Language names retain their bounded 49-byte runtime representation with a terminating null byte. Skill lookup still prefers the numeric language ID and falls back to the name.
The original Player and connection are retained through the operation. Replacing the catalogue during a callback cannot invalidate its selected language. Notification uses the original connection and stops after its Player relationship or session generation changes; the grant can still apply to a valid Player without an active connection.