mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 18:20:36 +01:00
[mff_pclasses] Remember to remove hunter bonus
- MFF PClasses : Remove hunter armor bonus upon unassigning
This commit is contained in:
parent
1191a57374
commit
3035e9660e
@ -19,6 +19,10 @@ pclasses.api.register_class("hunter", {
|
||||
end,
|
||||
on_unassigned = function(pname)
|
||||
sprint.decrease_maxstamina(pname, 10)
|
||||
if tmp[pname] then
|
||||
sprint.decrease_maxstamina(pname, 10)
|
||||
tmp[pname] = nil
|
||||
end
|
||||
end,
|
||||
on_update = function(pname)
|
||||
local reinforced = pclasses.api.util.does_wear_full_armor(pname, "reinforcedleather", true)
|
||||
|
@ -55,8 +55,8 @@ end
|
||||
function pclasses.api.set_player_class(pname, cname, inform)
|
||||
if pclasses.api.get_class_by_name(cname) then
|
||||
if pclasses.api.get_player_class(pname) then
|
||||
pclasses.api.get_class_by_name(pclasses.api.get_player_class(pname)).on_unassigned(pname)
|
||||
pclasses.api.get_class_by_name(pclasses.api.get_player_class(pname)).on_update(pname)
|
||||
pclasses.api.get_class_by_name(pclasses.api.get_player_class(pname)).on_unassigned(pname)
|
||||
end
|
||||
pclasses.data.players[pname] = cname
|
||||
local newclass = pclasses.api.get_class_by_name(cname)
|
||||
|
Loading…
Reference in New Issue
Block a user