items: Add EX traps to the default inventory. Fix Stun Trap EX description.

This commit is contained in:
Loïc Hoguin 2010-09-28 18:02:12 +02:00
parent c894e492de
commit d443deebb1
4 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,7 @@
-record(psu_consumable_item_variables, {quantity}).
-record(psu_special_item_variables, {}).
-record(psu_striking_weapon_item_variables, {is_active=0, slot=0, current_pp, max_pp, element, pa=#psu_pa{type=0, level=0}}).
-record(psu_trap_item_variables, {quantity}).
%% Items.

Binary file not shown.

View File

@ -82,6 +82,9 @@ event({char_select_enter, Slot, _BackToPreviousField}, State=#state{gid=GID}) ->
{16#03010000, #psu_consumable_item_variables{quantity=10}},
{16#03020000, #psu_consumable_item_variables{quantity=3}},
{16#03010900, #psu_consumable_item_variables{quantity=1}},
{16#0c020900, #psu_trap_item_variables{quantity=10}},
{16#0c020a00, #psu_trap_item_variables{quantity=10}},
{16#0c020b00, #psu_trap_item_variables{quantity=10}},
{16#01010900, #psu_striking_weapon_item_variables{current_pp=99, max_pp=100, element=#psu_element{type=1, percent=50}}},
{16#01010a00, #psu_striking_weapon_item_variables{current_pp=99, max_pp=100, element=#psu_element{type=2, percent=50}}},
{16#01010b00, #psu_striking_weapon_item_variables{current_pp=99, max_pp=100, element=#psu_element{type=3, percent=50}}}]},

View File

@ -438,6 +438,12 @@ build_0a0a_item_variables([{ItemID, #psu_special_item_variables{}}|Tail], Acc) -
16#11020200 -> << 0:32 >>
end,
Bin = << 0:32, ItemIndex:32/little, ItemID:32, 0:24, 16#80:8, 0:56, 16#80:8, 0:32, Action/binary, 0:32 >>,
build_0a0a_item_variables(Tail, [Bin|Acc]);
build_0a0a_item_variables([{ItemID, #psu_trap_item_variables{quantity=Quantity}}|Tail], Acc) ->
#psu_item{rarity=Rarity, data=#psu_trap_item{max_quantity=MaxQuantity}} = proplists:get_value(ItemID, ?ITEMS),
ItemIndex = 0,
RarityInt = Rarity - 1,
Bin = << 0:32, ItemIndex:32/little, ItemID:32, Quantity:32/little, MaxQuantity:32/little, 0:24, RarityInt:8, 0:96 >>,
build_0a0a_item_variables(Tail, [Bin|Acc]).
build_0a0a_item_constants([], Acc) ->