====== Buff Class ====== Class For Buff Interface [[developer_center:developer_editor:script|Return To Previous Page]] ------ ===== API list ===== ^ Class:apiName(parameters) ^ Return ^ Description ^ | Buff:addBuff(objid:number, buffid:number, bufflv:number, customticks:number) | ErrorCode.OK | Add effects to the object | | Buff:removeBuff(objid:number, buffid:number) | ErrorCode.OK | Remove the specified effect from the object | | Buff:clearAllBuff(objid:number) | ErrorCode.OK | Clear all effects for the object | | Buff:clearAllBadBuff(objid:number) | ErrorCode.OK | Clear all negative effects for the object | | Buff:hasBuff(objid:number, buffid:number, bufflv:number) | ErrorCode.OK code:number | Determine whether the object has the specified effect | | Buff:getBuffList(objid:number) | ErrorCode.OK num:number, arr:table(effect ID array) | Get the list of effects on the object | | Buff:getBuffNumByBuffid(objid:number, buffid:number) | ErrorCode.OK num:number | Get the number of specified effects on the object | | Buff:getBuffIndex(objid:number, buffid:number) | ErrorCode.OK ix:number | Get the index position of the specified effect on the object (index starts from 1) | | Buff:getBuffLeftTime(objid:number, buffid:number) | ErrorCode.OK num:number | Get the remaining time of the specified effect on the object | | Buff:getBuffName(objid:number, buffid:number) | ErrorCode.OK name:string | Get the name of the status effect on the object | | Buff:GetBuffDefName(buffid:number) | ErrorCode.OK name:string | Get the status effect name | | Buff:GetBuffDefDesc(buffid:number) | ErrorCode.OK desc:string | Get the status effect description |