general

api:

install
source · Clone the upstream repo
git clone https://github.com/agatho/trinitycore-mcp
manifest: data/api_docs/general/ProfessionManager_GetProfessionSkill.yaml
source content

api: class: ProfessionManager method: GetProfessionSkill signature: uint16 ProfessionManager::GetProfessionSkill(int * player, ProfessionType profession) const documentation: brief: Retrieves the skill level of a specified profession for the given player. description: The GetProfessionSkill method returns the current skill level of a specific profession for a player. It takes a pointer to a player object and a profession type, then retrieves and returns the corresponding skill value. This method is commonly used in World of Warcraft's TrinityCore server implementation to manage player character progression and profession tracking. The returned value represents the player's current proficiency in the specified profession, typically ranging from 1 to 700 for maximum skill level. The method does not modify any data but rather fetches existing profession information from the player's data structure. parameters:

  • name: player description: Pointer to the player object whose profession skill is being retrieved. This parameter must point to a valid Player instance or the behavior is undefined.

  • name: profession description: Enumeration value specifying the type of profession to query. Must be a valid ProfessionType enum value representing a known profession in the game. returns: Returns a uint16 value representing the player's current skill level in the specified profession. The value typically ranges from 1 to 700, where 1 represents the lowest skill level and 700 represents maximum skill. Returns 0 if the player does not have the specified profession or if an error occurs during retrieval. examples:

  • title: Basic Usage Example code: "Player* player = ...; // Assume valid player pointer\nuint16 cookingSkill
    \ = sProfessionManager->GetProfessionSkill(player, PROFESSION_COOKING);\nif
    \ (cookingSkill > 0) {\n printf("Player's Cooking skill: %u\n", cookingSkill);\n
    }" language: cpp

  • title: Checking Multiple Professions code: 'Player* player = ...;

    uint16 miningSkill = sProfessionManager->GetProfessionSkill(player, PROFESSION_MINING);

    uint16 blacksmithingSkill = sProfessionManager->GetProfessionSkill(player, PROFESSION_BLACKSMITHING);

    printf("Mining: %u, Blacksmithing: %u\n", miningSkill, blacksmithingSkill);' language: cpp notes: This method accesses player data structures and should only be called when the player object is valid and in a consistent state. The profession skill values are typically stored in the player's database record or in-memory data structure. Performance is generally good as this is a simple lookup operation, but repeated calls on large numbers of players may impact server performance. warnings: Ensure that the player pointer passed to this method is not null and points to a valid Player object. Passing an invalid pointer will likely result in undefined behavior or crash. Also, be aware that profession types must match exactly with those defined in the game's profession system to avoid incorrect results. related:

  • SetProfessionSkill

  • HasProfession

  • AddProfessionSkill metadata: confidence: 0.9 generated_at: '2025-11-01T08:02:06.666924' generator: lmstudio-qwen3-coder-30b version: 1.0.0 source: core