RustTip

OnNpcConversationEnded

OxideCarbonNPC

Called when an npc conversation ends.

void OnNpcConversationEnded(NPCTalking nPCTalking, BasePlayer player)
Works — the game method in this build is the one the hook was written for.

Parameters

nPCTalking
NPCTalking
player
BasePlayer

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnNpcConversationEnded(NPCTalking nPCTalking, BasePlayer player)
{
    Puts("OnNpcConversationEnded");
}

Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.

Injection point

Rust.opj (Oxide)
void NPCTalking.Server_OnConversationEnded(BasePlayer)

Passes: NPCTalking nPCTalking, BasePlayer player

WorksReturnBehavior: ContinueArgumentBehavior: AllAssembly-CSharp.dll

Where it is called (this branch's game code)

public virtual void Server_OnConversationEnded(BasePlayer player)
{
	Interface.CallHook("OnNpcConversationEnded", this, player);
	if (player != null && conversingPlayers.Contains(player))
	{
		player.ClearActiveTalkingToNpc(this);
		conversingPlayers.Remove(player);
	}
}

Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.