Skip to content

ClaimBuffClasses

Names the buff classes the server takes over from the game.

With a class claimed, a buff of that class a player’s game applies by itself - a potion drunk, a poison, the game’s own drunkenness - is undone on their client within a second unless the server gave it (GivePlayerBuff). The way a mode keeps the game’s own potions from opening a hole in the server-owned health: with Potion claimed, a potion only works through the server’s consumption path. The class names are the pages of the buff list - Potion, Poison, Alcohol, Hangover, Unconsciousness, Plague …; an unknown one is logged and ignored. The whole list replaces the previous one and goes to every client; {} claims nothing. Nothing is claimed by default.

ClaimBuffClasses(classes)
Parameter Type
classes table a list of class names

nothing

function OnGameModeInit()
ClaimBuffClasses({"Potion", "Poison", "Alcohol", "Hangover"})
end

GetClaimedBuffClasses · GivePlayerBuff · OnPlayerUseItem · the Buffs and the drink group of the index