From c28f8c07374493de31e5581dcd53ad99a2ff917a Mon Sep 17 00:00:00 2001 From: nsensfel Date: Mon, 29 Apr 2019 17:43:18 +0200 Subject: Dialyzer error, compiles, some issues w/ client. Dialyzer says: bnt_join_battle.erl:103: The created fun has no local return bnt_join_battle.erl:122: The call shr_inventory:ataxia_add_equipment(shr_equipment:unresolved(),shr_inventory:type()) does not have an opaque term of type shr_equipment:type() as 1st argument bnt_join_battle.erl:310: Function repair_join_battle/6 will never be called shr_inventory:ataxia_add_equipment(shr_equipment:unresolved(),shr_inventory:type()) is defined, though... Still some hiccups with what is sent to the client. --- src/shared/struct/shr_omnimods.erl | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/shared/struct/shr_omnimods.erl') diff --git a/src/shared/struct/shr_omnimods.erl b/src/shared/struct/shr_omnimods.erl index 8d82287..081477d 100644 --- a/src/shared/struct/shr_omnimods.erl +++ b/src/shared/struct/shr_omnimods.erl @@ -29,8 +29,7 @@ ( [ default/0, - new/4, - new_dirty/4 + new/4 ] ). @@ -64,14 +63,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --spec cleanup_entry_list (list(entry())) -> list(entry()). -cleanup_entry_list (ModList) -> - [First|Rem] = ModList, - case First of - {none, _} -> Rem; - _ -> ModList - end. - -spec apply_coefficient_to_mods (float(), mods()) -> mods(). apply_coefficient_to_mods (Coef, Mods) -> dict:map(fun (_Name, Val) -> shr_math_util:ceil(Coef * Val) end, Mods). @@ -119,23 +110,6 @@ new (AttributeMods, StatisticMods, AttackMods, DefenseMods) -> -spec default () -> type(). default () -> new([], [], [], []). --spec new_dirty -( - list(entry()), - list(entry()), - list(entry()), - list(entry()) - ) - -> type(). -new_dirty(AttributeMods, StatisticMods, AttackMods, DefenseMods) -> - new - ( - cleanup_entry_list(AttributeMods), - cleanup_entry_list(StatisticMods), - cleanup_entry_list(AttackMods), - cleanup_entry_list(DefenseMods) - ). - %%% Modification -spec merge (type(), type()) -> type(). merge (OmniA, OmniB) -> -- cgit v1.2.3-70-g09d2