mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-28 23:16:15 -04:00
28 lines
557 B
SQL
28 lines
557 B
SQL
declare
|
|
i number;
|
|
|
|
begin
|
|
select count(*) into i
|
|
from object_variable_names
|
|
where name = 'intWeaponType';
|
|
|
|
if i = 0 then
|
|
select max(id) into i
|
|
from object_variable_names;
|
|
|
|
insert into object_variable_names
|
|
values (i + 1, 'intWeaponType');
|
|
end if;
|
|
|
|
select min(id) into i
|
|
from object_variable_names
|
|
where name = 'intWeaponType';
|
|
|
|
insert into object_variables
|
|
select object_id, i as name_id, 0 as type, '1' as value, 0 as detached
|
|
from objects
|
|
where object_template_id = -635207508; -- object/weapon/ranged/rifle/rifle_proton.iff
|
|
|
|
end;
|
|
/
|